@blockcerts/blockcerts-verifier 1.43.0 → 1.43.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/dist/ie11.js +2 -2
- package/dist/main.js +2 -2
- package/package.json +1 -1
- package/scripts/automated-update-blockcerts.org.sh +51 -0
package/dist/ie11.js
CHANGED
|
@@ -213,7 +213,7 @@ if("@preserve"in t)return"@null"===t["@preserve"]?null:t["@preserve"];if(XX(t))r
|
|
|
213
213
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
214
214
|
*/var MY=FG.IdentifierIssuer,RY=q$.expand,NY=Z$.flatten,LY=dX.fromRDF,jY=PX.toRDF,DY=LX.frameMergedOrDefault,BY=PG.isArray,UY=PG.isObject,FY=PG.isString,zY=OG.isSubjectReference,HY=y$.getInitialContext,qY=y$.process,VY=y$.getAllContexts,KY=cY.compact,WY=cY.compactIri,JY=cY.removePreserve,GY=$$.createNodeMap,$Y=$$.createMergedNodeMap,XY=$$.mergeNodeMaps,YY=void 0!==bz&&bz.versions&&bz.versions.node,QY=!YY&&("undefined"!=typeof window||"undefined"!=typeof self),ZY=function(e){var t={};function r(t,r){var n=r.documentLoader,i=void 0===n?e.documentLoader:n,a=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(r,["documentLoader"]);return Object.assign({},{documentLoader:i},a,t)}return e.compact=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c,l,f,d,h,p,v,b,g=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(g.length<2)){t.next=2;break}throw new TypeError("Could not compact, too few arguments.");case 2:if(null!==i){t.next=4;break}throw new CG("The compaction context must not be null.","jsonld.CompactError",{code:"invalid local context"});case 4:if(null!==n){t.next=6;break}return t.abrupt("return",null);case 6:if((a=r(a,{base:FY(n)?n:"",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new MY("_:b")})).link&&(a.skipExpansion=!0),a.compactToRelative||delete a.base,!a.skipExpansion){t.next=12;break}t.t0=n,t.next=15;break;case 12:return t.next=14,e.expand(n,a);case 14:t.t0=t.sent;case 15:return o=t.t0,t.next=18,e.processContext(HY(a),i,a);case 18:s=t.sent,u=KY({activeCtx:s,element:o,options:a,compactionMap:a.compactionMap}),a.compactArrays&&!a.graph&&BY(u)?1===u.length?u=u[0]:0===u.length&&(u={}):a.graph&&UY(u)&&(u=[u]),UY(i)&&"@context"in i&&(i=i["@context"]),i=FG.clone(i),BY(i)||(i=[i]),c=i,i=[];for(l=0;l<c.length;++l)(!UY(c[l])||Object.keys(c[l]).length>0)&&i.push(c[l]);if(f=i.length>0,1===i.length&&(i=i[0]),BY(u))d=WY({activeCtx:s,iri:"@graph",relativeTo:{vocab:!0}}),h=u,u={},f&&(u["@context"]=i),u[d]=h;else if(UY(u)&&f)for(v in p=u,u={"@context":i},p)u[v]=p[v];return a.framing&&(b=WY({activeCtx:s,iri:"@graph",relativeTo:{vocab:!0}}),// remove @preserve from results
|
|
215
215
|
// remove @preserve from results
|
|
216
|
-
a.link={},u[b]=JY(s,u[b],a)),t.abrupt("return",u);case 28:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.expand=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o,s,u,c,l,f,d=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(d.length<1)){t.next=2;break}throw new TypeError("Could not expand, too few arguments.");case 2:if(!1===(i=r(i,{keepFreeFloatingNodes:!1})).expansionMap&&(i.expansionMap=void 0),a={},o=[],"expandContext"in i&&(s=FG.clone(i.expandContext),UY(s)&&"@context"in s?a.expandContext=s:a.expandContext={"@context":s},o.push(a.expandContext)),!FY(n)){t.next=12;break}return t.next=8,e.get(n,i);case 8:c=t.sent,u=c.documentUrl,a.input=c.document,c.contextUrl&&(a.remoteContext={"@context":c.contextUrl},o.push(a.remoteContext)),t.next=13;break;case 12:a.input=FG.clone(n);case 13:return"base"in i||(i.base=u||""),t.next=16,VY(a,i);case 16:return l=HY(i),o.forEach((function(e){l=qY({activeCtx:l,localCtx:e,options:i})})),f=RY({activeCtx:l,element:a.input,options:i,expansionMap:i.expansionMap}),t.abrupt("return",(UY(f)&&"@graph"in f&&1===Object.keys(f).length?f=f["@graph"]:null===f&&(f=[]),BY(f)||(f=[f]),f));case 20:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.flatten=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(c.length<1)){t.next=2;break}return t.abrupt("return",new TypeError("Could not flatten, too few arguments."));case 2:return i="function"==typeof i?null:i||null,a=r(a,{base:FY(n)?n:""}),t.next=5,e.expand(n,a);case 5:if(o=t.sent,s=NY(o),null!==i){t.next=9;break}return t.abrupt("return",s);case 9:return a.graph=!0,a.skipExpansion=!0,t.next=12,e.compact(s,i,a);case 12:return u=t.sent,t.abrupt("return",u);case 14:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.frame=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c,l,f,d,h,p=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(p.length<2)){t.next=2;break}throw new TypeError("Could not frame, too few arguments.");case 2:if(a=r(a,{base:FY(n)?n:"",embed:"@last",explicit:!1,requireAll:!0,omitDefault:!1,pruneBlankNodeIdentifiers:!0,bnodesToClear:[]}),!FY(i)){t.next=7;break}return t.next=5,e.get(i,a);case 5:o=t.sent,i=o.document,o.contextUrl&&((s=i["@context"])?BY(s)?s.push(o.contextUrl):s=[s,o.contextUrl]:s=o.contextUrl,i["@context"]=s);case 7:return u=i&&i["@context"]||{},t.next=10,e.expand(n,a);case 10:return c=t.sent,(l=FG.clone(a)).isFrame=!0,l.keepFreeFloatingNodes=!0,t.next=15,e.expand(i,l);case 15:return f=t.sent,l.merged=!("@graph"in i),d=DY(c,f,l),l.graph=!0,l.skipExpansion=!0,l.link={},l.framing=!0,t.next=21,e.compact(d,u,l);case 21:return h=t.sent,t.abrupt("return",h);case 23:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.link=FG.callbackify(function(){var t=CY(Jt.mark((function t(r,n,i){var a;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={},t.abrupt("return",(n&&(a["@context"]=n),a["@embed"]="@link",e.frame(r,a,i)));case 2:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.normalize=e.canonize=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o,s,u=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(u.length<1)){t.next=2;break}throw new TypeError("Could not canonize, too few arguments.");case 2:if(!("inputFormat"in(i=r(i,{base:FY(n)?n:"",algorithm:"URDNA2015",skipExpansion:!1})))){t.next=7;break}if("application/n-quads"===i.inputFormat||"application/nquads"===i.inputFormat){t.next=5;break}throw new CG("Unknown canonicalization input format.","jsonld.CanonizeError");case 5:return a=WG.parse(n),t.abrupt("return",fK.canonize(a,i));case 7:return delete(o=FG.clone(i)).format,o.produceGeneralizedRdf=!1,t.next=11,e.toRDF(n,o);case 11:return s=t.sent,t.abrupt("return",fK.canonize(s,i));case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.fromRDF=FG.callbackify(function(){var e=CY(Jt.mark((function e(n,i){var a,o,s,u=arguments;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(u.length<1)){e.next=2;break}throw new TypeError("Could not convert from RDF, too few arguments.");case 2:if(i=r(i,{format:FY(n)?"application/n-quads":void 0}),a=i.format,s=i.rdfParser,!a){e.next=10;break}if(s=s||t[a]){e.next=8;break}throw new CG("Unknown input format.","jsonld.UnknownFormat",{format:a});case 8:e.next=11;break;case 10:s=function(){return n};case 11:return o=s.length>1?new Promise((function(e,t){s(n,(function(r,n){r?t(r):e(n)}))})):Promise.resolve(s(n)),e.next=14,o;case 14:return o=e.sent,Array.isArray(o)||(o=WG.legacyDatasetToQuads(o)),e.abrupt("return",LY(o,i));case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.toRDF=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o,s=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(s.length<1)){t.next=2;break}throw new TypeError("Could not convert to RDF, too few arguments.");case 2:if(!(i=r(i,{base:FY(n)?n:"",skipExpansion:!1})).skipExpansion){t.next=6;break}t.t0=n,t.next=9;break;case 6:return t.next=8,e.expand(n,i);case 8:t.t0=t.sent;case 9:if(a=t.t0,o=jY(a,i),!i.format){t.next=17;break}if("application/n-quads"!==i.format&&"application/nquads"!==i.format){t.next=16;break}return t.next=15,WG.serialize(o);case 15:return t.abrupt("return",t.sent);case 16:throw new CG("Unknown output format.","jsonld.UnknownFormat",{format:i.format});case 17:return t.abrupt("return",o);case 18:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.createNodeMap=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o.length<1)){t.next=2;break}throw new TypeError("Could not create node map, too few arguments.");case 2:return i=r(i,{base:FY(n)?n:""}),t.next=5,e.expand(n,i);case 5:return a=t.sent,t.abrupt("return",$Y(a,i));case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.merge=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c,l,f,d,h,p,v,b,g,m,y,w,_,x,k=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(k.length<1)){t.next=2;break}throw new TypeError("Could not merge, too few arguments.");case 2:if(BY(n)){t.next=4;break}throw new TypeError('Could not merge, "docs" must be an array.');case 4:return i="function"==typeof i?null:i||null,a=r(a,{}),t.next=7,Promise.all(n.map((function(t){var r=Object.assign({},a);return e.expand(t,r)})));case 7:o=t.sent,s=!0,"mergeNodes"in a&&(s=a.mergeNodes),u=a.issuer||new MY("_:b"),c={"@default":{}},l=0;case 12:if(!(l<o.length)){t.next=29;break}if(f=FG.relabelBlankNodes(o[l],{issuer:new MY("_:b"+l+"-")}),GY(f,d=s||0===l?c:{"@default":{}},"@default",u),d===c){t.next=26;break}t.t0=Jt.keys(d);case 16:if((t.t1=t.t0()).done){t.next=26;break}if(h=t.t1.value,p=d[h],h in c){t.next=22;break}return c[h]=p,t.abrupt("continue",16);case 22:for(b in v=c[h],p)b in v||(v[b]=p[b]);t.next=16;break;case 26:++l,t.next=12;break;case 29:for(g=XY(c),m=[],y=Object.keys(g).sort(),w=0;w<y.length;++w)_=g[y[w]],zY(_)||m.push(_);if(null!==i){t.next=33;break}return t.abrupt("return",m);case 33:return a.graph=!0,a.skipExpansion=!0,t.next=36,e.compact(m,i,a);case 36:return x=t.sent,t.abrupt("return",x);case 38:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),Object.defineProperty(e,"documentLoader",{get:function(){return e._documentLoader},set:function(t){return e._documentLoader=FG.normalizeDocumentLoader(t)}}),e.documentLoader=function(){var e=CY(Jt.mark((function e(t){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new CG("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.loadDocument=FG.callbackify(CY(Jt.mark((function t(){var r=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.documentLoader.apply(null,r));case 1:case"end":return t.stop()}}),t)})))),e.get=FG.callbackify(function(){var t=CY(Jt.mark((function t(r,n){var i,a;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="function"==typeof n.documentLoader?FG.normalizeDocumentLoader(n.documentLoader):e.documentLoader,t.next=3,i(r);case 3:if(a=t.sent,t.prev=4,a.document){t.next=7;break}throw new CG("No remote document found at the given URL.","jsonld.NullRemoteDocument");case 7:FY(a.document)&&(a.document=JSON.parse(a.document)),t.next=13;break;case 10:throw t.prev=10,t.t0=t.catch(4),new CG("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:t.t0,remoteDoc:a});case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()),e.processContext=FG.callbackify(function(){var e=CY(Jt.mark((function e(t,n,i){var a;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r(i,{base:""}),null!==n){e.next=2;break}return e.abrupt("return",HY(i));case 2:return n=FG.clone(n),UY(n)&&"@context"in n||(n={"@context":n}),e.next=5,VY(n,i);case 5:return a=e.sent,e.abrupt("return",qY({activeCtx:t,localCtx:a,options:i}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),e.getContextValue=y$.getContextValue,e.documentLoaders={},e.documentLoaders.node=wY,e.documentLoaders.xhr=PY,e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new CG('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",WG.parse),e.registerRDFParser("application/nquads",WG.parse),e.registerRDFParser("rdfa-api",function(){function e(){a(this,e)}return s(e,[{key:"parse",value:function(e){for(var t={"@default":[]},r=e.getSubjects(),n=0;n<r.length;++n){var i=r[n];if(null!==i){var a=e.getSubjectTriples(i);if(null!==a){var o=a.predicates;for(var s in o)for(var u=o[s].objects,c=0;c<u.length;++c){var l=u[c],f={};0===i.indexOf("_:")?f.subject={type:"blank node",value:i}:f.subject={type:"IRI",value:i},0===s.indexOf("_:")?f.predicate={type:"blank node",value:s}:f.predicate={type:"IRI",value:s};var d=l.value;if(l.type===ZG){var h=new("undefined"==typeof XMLSerializer?cK.XMLSerializer:XMLSerializer);d="";for(var p=0;p<l.value.length;p++)l.value[p].nodeType===KG.ELEMENT_NODE?d+=h.serializeToString(l.value[p]):l.value[p].nodeType===KG.TEXT_NODE&&(d+=l.value[p].nodeValue)}f.object={},l.type===QG?0===l.value.indexOf("_:")?f.object.type="blank node":f.object.type="IRI":(f.object.type="literal",l.type===YG?l.language?(f.object.datatype=XG,f.object.language=l.language):f.object.datatype=e$:f.object.datatype=l.type),f.object.value=d,t["@default"].push(f)}}}}return t}}]),e}().parse),e.url=n$,e.util=FG,Object.assign(e,FG),e.promises=e,e.RequestQueue=pY,e.JsonLdProcessor=function(e){var t=function(){function e(){a(this,e)}return s(e,[{key:"toString",value:function(){return"[object JsonLdProcessor]"}}]),e}();return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}(e),QY&&void 0===BU.JsonLdProcessor&&Object.defineProperty(BU,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor}),YY?e.useDocumentLoader("node"):"undefined"!=typeof XMLHttpRequest&&e.useDocumentLoader("xhr"),e},eQ=function e(){return ZY((function(){return e()}))};ZY(eQ);var tQ=eQ,rQ=FU((function(e){LV.gte(bz.version,"8.6.0")?e.exports=IG:e.exports=tQ}));rQ.jsonld;var nQ=FU((function(e){!function(t){var r={bytesToHex:function(e){return function(e){return e.map((function(e){return 2,(t=e.toString(16)).length>2?t:Array(2-t.length+1).join("0")+t;var t})).join("")}(e)},hexToBytes:function(e){if(e.length%2==1)throw new Error("hexToBytes can't have a string with an odd number of characters.");return 0===e.indexOf("0x")&&(e=e.slice(2)),e.match(/../g).map((function(e){return parseInt(e,16)}))}};e.exports?e.exports=r:t.convertHex=r}(BU)})),iQ=FU((function(e){!function(t){var r={bytesToString:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")},stringToBytes:function(e){return e.split("").map((function(e){return e.charCodeAt(0)}))}};r.UTF8={bytesToString:function(e){return decodeURIComponent(escape(r.bytesToString(e)))},stringToBytes:function(e){return r.stringToBytes(unescape(encodeURIComponent(e)))}},e.exports?e.exports=r:t.convertString=r}(BU)})),aQ=FU((function(e){!function(t){var r={};e.exports?(r.bytesToHex=nQ.bytesToHex,r.convertString=iQ,e.exports=o):(r.bytesToHex=t.convertHex.bytesToHex,r.convertString=t.convertString,t.sha256=o);var n=[];!function(){function e(e){for(var t=Math.sqrt(e),r=2;r<=t;r++)if(!(e%r))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)e(r)&&(n[i]=t(Math.pow(r,1/3)),i++),r++}();var i=[],a=function(e,t,r){for(var a=e[0],o=e[1],s=e[2],u=e[3],c=e[4],l=e[5],f=e[6],d=e[7],h=0;h<64;h++){if(h<16)i[h]=0|t[r+h];else{var p=i[h-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,b=i[h-2],g=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;i[h]=v+i[h-7]+g+i[h-16]}var m=a&o^a&s^o&s,y=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),w=d+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&l^~c&f)+n[h]+i[h];d=f,f=l,l=c,c=u+w|0,u=s,s=o,o=a,a=w+(y+m)|0}e[0]=e[0]+a|0,e[1]=e[1]+o|0,e[2]=e[2]+s|0,e[3]=e[3]+u|0,e[4]=e[4]+c|0,e[5]=e[5]+l|0,e[6]=e[6]+f|0,e[7]=e[7]+d|0};function o(e,t){e.constructor===String&&(e=r.convertString.UTF8.stringToBytes(e));var n=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],i=function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t}(e),o=8*e.length;i[o>>5]|=128<<24-o%32,i[15+(o+64>>9<<4)]=o;for(var s=0;s<i.length;s+=16)a(n,i,s);var u=function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}(n);return t&&t.asBytes?u:t&&t.asString?r.convertString.bytesToString(u):r.bytesToHex(u)}o.x2=function(e,t){return o(o(e,{asBytes:!0}),t)}}(BU)}));function oQ(e){e=e.trim();for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substring(r,r+2),16));return t}function sQ(e,t){return dU(this,void 0,void 0,Jt.mark((function r(){var n,i,a,o;return Jt.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e["@context"],i=e,!function(e){return e===lU.V1_1||e===lU.V1_2}(t)&&(n.find((function(e){return e===Object(e)&&"@vocab"in e}))?n=null:n.push({"@vocab":"http://fallback.org/"})),a="undefined"!=typeof window&&void 0!==window.XMLHttpRequest?rQ.documentLoaders.xhr():rQ.documentLoaders.node(),rQ.documentLoader=function(e,t){return e in IU?t(null,{contextUrl:null,document:IU[e],documentUrl:e}):a(e,t)},o={algorithm:"URDNA2015",format:"application/nquads"},r.abrupt("return",(n&&(o.expandContext=n),new Promise((function(e,t){rQ.normalize(i,o,(function(r,n){if(r)console.error(r),t(new jU("computeLocalHash",OU("errors","failedJsonLdNormalization")));else{var i=function(e){var t=/<http:\/\/fallback\.org\/(.*)>/.exec(e);if(t){for(var r=[],n=0;n<t.length;n++)r.push(t[n]);return r}return null}(n);i?t(new jU("computeLocalHash","".concat(OU("errors","foundUnmappedFields"),": ").concat(i.join(", ")))):e(aQ(function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}(n)))}}))}))));case 7:case"end":return r.stop()}}),r)})))}var uQ=FU((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),cQ=FU((function(e,t){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var r=KF.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=KF:(n(KF,t),t.Buffer=i),i.prototype=Object.create(r.prototype),n(r,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return KF.SlowBuffer(e)}}));cQ.Buffer;var lQ=NH.EventEmitter;function fQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var hQ=KF.Buffer,pQ=cK.inspect,vQ=pQ&&pQ.custom||"inspect";function bQ(e,t,r){hQ.prototype.copy.call(e,t,r)}var gQ=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return(t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return hQ.alloc(0);for(var t=hQ.allocUnsafe(e>>>0),r=this.head,n=0;r;)bQ(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=hQ.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:vQ,value:function(e,t){return pQ(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fQ(Object(r),!0).forEach((function(t){dQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function mQ(e,t){wQ(e,t),yQ(e)}function yQ(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function wQ(e,t){e.emit("error",t)}var _Q=function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,nz(wQ,this,e)):nz(wQ,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?nz(yQ,r):(r._writableState.errorEmitted=!0,nz(mQ,r,e)):nz(mQ,r,e):t?(nz(yQ,r),t(e)):nz(yQ,r)})),this)},xQ=function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},kQ=function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)},SQ={};function EQ(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,SQ[e]=n}function IQ(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}EQ("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),EQ("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,a,o;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(IQ(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(s," ").concat(i," ").concat(IQ(t,"type"))}return o+". Received type ".concat(r(n))}),TypeError),EQ("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),EQ("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),EQ("ERR_STREAM_PREMATURE_CLOSE","Premature close"),EQ("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),EQ("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),EQ("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),EQ("ERR_STREAM_WRITE_AFTER_END","write after end"),EQ("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),EQ("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),EQ("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var AQ={codes:SQ},PQ=AQ.codes.ERR_INVALID_OPT_VALUE,TQ=function(e,t,r,n){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new PQ(n?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384};function OQ(e){try{if(!BU.localStorage)return!1}catch(e){return!1}var t=BU.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}var CQ,MQ=YQ;function RQ(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}YQ.WritableState=XQ;var NQ,LQ=function(e,t){if(OQ("noDeprecation"))return e;var r=!1;return function(){if(!r){if(OQ("throwDeprecation"))throw new Error(t);OQ("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}},jQ=KF.Buffer,DQ=BU.Uint8Array||function(){},BQ=TQ,UQ=AQ.codes,FQ=UQ.ERR_INVALID_ARG_TYPE,zQ=UQ.ERR_METHOD_NOT_IMPLEMENTED,HQ=UQ.ERR_MULTIPLE_CALLBACK,qQ=UQ.ERR_STREAM_CANNOT_PIPE,VQ=UQ.ERR_STREAM_DESTROYED,KQ=UQ.ERR_STREAM_NULL_VALUES,WQ=UQ.ERR_STREAM_WRITE_AFTER_END,JQ=UQ.ERR_UNKNOWN_ENCODING,GQ=kQ;function $Q(){}function XQ(e,t,r){CQ=CQ||aZ,e=e||{},"boolean"!=typeof r&&(r=t instanceof CQ),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=BQ(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new HQ;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(nz(i,n),nz(nZ,e,t),e._writableState.errorEmitted=!0,GQ(e,n)):(i(n),e._writableState.errorEmitted=!0,GQ(e,n),nZ(e,t))}(e,r,n,t,i);else{var a=tZ(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||eZ(e,r),n?nz(ZQ,e,r,a,i):ZQ(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new RQ(this)}function YQ(e){var t=this instanceof(CQ=CQ||aZ);if(!t&&!NQ.call(YQ,this))return new YQ(e);this._writableState=new XQ(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),lQ.call(this)}function QQ(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new VQ("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function ZQ(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),nZ(e,t)}function eZ(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)i[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;i.allBuffers=s,QQ(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new RQ(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback;if(QQ(e,t,!1,t.objectMode?1:u.length,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function tZ(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function rZ(e,t){e._final((function(r){t.pendingcb--,r&&GQ(e,r),t.prefinished=!0,e.emit("prefinish"),nZ(e,t)}))}function nZ(e,t){var r=tZ(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,nz(rZ,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}uQ(YQ,lQ),XQ.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(XQ.prototype,"buffer",{get:LQ((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(NQ=Function.prototype[Symbol.hasInstance],Object.defineProperty(YQ,Symbol.hasInstance,{value:function(e){return!!NQ.call(this,e)||this===YQ&&e&&e._writableState instanceof XQ}})):NQ=function(e){return e instanceof this},YQ.prototype.pipe=function(){GQ(this,new qQ)},YQ.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,o=!i.objectMode&&(n=e,jQ.isBuffer(n)||n instanceof DQ);return o&&!jQ.isBuffer(e)&&(e=function(e){return jQ.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=$Q),i.ending?function(e,t){var r=new WQ;GQ(e,r),nz(t,r)}(this,r):(o||function(e,t,r,n){var i;return null===r?i=new KQ:"string"==typeof r||t.objectMode||(i=new FQ("chunk",["string","Buffer"],r)),!i||(GQ(e,i),nz(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=jQ.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else QQ(e,t,!1,s,n,i,a);return u}(this,i,o,e,t,r)),a},YQ.prototype.cork=function(){this._writableState.corked++},YQ.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||eZ(this,e))},YQ.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new JQ(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(YQ.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(YQ.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),YQ.prototype._write=function(e,t,r){r(new zQ("_write()"))},YQ.prototype._writev=null,YQ.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,nZ(e,t),r&&(t.finished?nz(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(YQ.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(YQ.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),YQ.prototype.destroy=_Q,YQ.prototype._undestroy=xQ,YQ.prototype._destroy=function(e,t){t(e)};var iZ=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},aZ=cZ;uQ(cZ,KZ);for(var oZ=iZ(MQ.prototype),sZ=0;sZ<oZ.length;sZ++){var uZ=oZ[sZ];cZ.prototype[uZ]||(cZ.prototype[uZ]=MQ.prototype[uZ])}function cZ(e){if(!(this instanceof cZ))return new cZ(e);KZ.call(this,e),MQ.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",lZ)))}function lZ(){this._writableState.ended||nz(fZ,this)}function fZ(e){e.end()}Object.defineProperty(cZ.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(cZ.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(cZ.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(cZ.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}});var dZ=cQ.Buffer,hZ=dZ.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},pZ=vZ;function vZ(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(dZ.isEncoding===hZ||!hZ(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=mZ,this.end=yZ,t=4;break;case"utf8":this.fillLast=gZ,t=4;break;case"base64":this.text=wZ,this.end=_Z,t=3;break;default:return this.write=xZ,void(this.end=kZ)}this.lastNeed=0,this.lastTotal=0,this.lastChar=dZ.allocUnsafe(t)}function bZ(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function gZ(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function mZ(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function yZ(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function wZ(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function _Z(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function xZ(e){return e.toString(this.encoding)}function kZ(e){return e&&e.length?this.write(e):""}vZ.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},vZ.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},vZ.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=bZ(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=bZ(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=bZ(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},vZ.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var SZ={StringDecoder:pZ},EZ=AQ.codes.ERR_STREAM_PREMATURE_CLOSE;function IZ(){}var AZ,PZ=function e(t,r,n){if("function"==typeof r)return e(t,null,r);r||(r={}),n=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(n||IZ);var i=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,o=function(){t.writable||u()},s=t._writableState&&t._writableState.finished,u=function(){a=!1,s=!0,i||n.call(t)},c=t._readableState&&t._readableState.endEmitted,l=function(){i=!1,c=!0,a||n.call(t)},f=function(e){n.call(t,e)},d=function(){var e;return i&&!c?(t._readableState&&t._readableState.ended||(e=new EZ),n.call(t,e)):a&&!s?(t._writableState&&t._writableState.ended||(e=new EZ),n.call(t,e)):void 0},h=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",d),t.req?h():t.on("request",h)):a&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",l),t.on("finish",u),!1!==r.error&&t.on("error",f),t.on("close",d),function(){t.removeListener("complete",u),t.removeListener("abort",d),t.removeListener("request",h),t.req&&t.req.removeListener("finish",u),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",u),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",d)}};function TZ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var OZ=Symbol("lastResolve"),CZ=Symbol("lastReject"),MZ=Symbol("error"),RZ=Symbol("ended"),NZ=Symbol("lastPromise"),LZ=Symbol("handlePromise"),jZ=Symbol("stream");function DZ(e,t){return{value:e,done:t}}function BZ(e){var t=e[OZ];if(null!==t){var r=e[jZ].read();null!==r&&(e[NZ]=null,e[OZ]=null,e[CZ]=null,t(DZ(r,!1)))}}function UZ(e){nz(BZ,e)}var FZ,zZ=Object.getPrototypeOf((function(){})),HZ=Object.setPrototypeOf((TZ(AZ={get stream(){return this[jZ]},next:function(){var e=this,t=this[MZ];if(null!==t)return Promise.reject(t);if(this[RZ])return Promise.resolve(DZ(void 0,!0));if(this[jZ].destroyed)return new Promise((function(t,r){nz((function(){e[MZ]?r(e[MZ]):t(DZ(void 0,!0))}))}));var r,n=this[NZ];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[RZ]?r(DZ(void 0,!0)):t[LZ](r,n)}),n)}}(n,this));else{var i=this[jZ].read();if(null!==i)return Promise.resolve(DZ(i,!1));r=new Promise(this[LZ])}return this[NZ]=r,r}},Symbol.asyncIterator,(function(){return this})),TZ(AZ,"return",(function(){var e=this;return new Promise((function(t,r){e[jZ].destroy(null,(function(e){e?r(e):t(DZ(void 0,!0))}))}))})),AZ),zZ),qZ=function(e){var t,r=Object.create(HZ,(TZ(t={},jZ,{value:e,writable:!0}),TZ(t,OZ,{value:null,writable:!0}),TZ(t,CZ,{value:null,writable:!0}),TZ(t,MZ,{value:null,writable:!0}),TZ(t,RZ,{value:e._readableState.endEmitted,writable:!0}),TZ(t,LZ,{value:function(e,t){var n=r[jZ].read();n?(r[NZ]=null,r[OZ]=null,r[CZ]=null,e(DZ(n,!1))):(r[OZ]=e,r[CZ]=t)},writable:!0}),t));return r[NZ]=null,PZ(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[CZ];return null!==t&&(r[NZ]=null,r[OZ]=null,r[CZ]=null,t(e)),void(r[MZ]=e)}var n=r[OZ];null!==n&&(r[NZ]=null,r[OZ]=null,r[CZ]=null,n(DZ(void 0,!0))),r[RZ]=!0})),e.on("readable",UZ.bind(null,r)),r},VZ=function(){throw new Error("Readable.from is not available in the browser")},KZ=u0;u0.ReadableState=s0;var WZ,JZ=function(e,t){return e.listeners(t).length},GZ=KF.Buffer,$Z=BU.Uint8Array||function(){};WZ=cK&&cK.debuglog?cK.debuglog("stream"):function(){};var XZ,YZ,QZ,ZZ=TQ,e0=AQ.codes,t0=e0.ERR_INVALID_ARG_TYPE,r0=e0.ERR_STREAM_PUSH_AFTER_EOF,n0=e0.ERR_METHOD_NOT_IMPLEMENTED,i0=e0.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;uQ(u0,lQ);var a0=kQ,o0=["error","close","destroy","pause","resume"];function s0(e,t,r){FZ=FZ||aZ,e=e||{},"boolean"!=typeof r&&(r=t instanceof FZ),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=ZZ(this,e,"readableHighWaterMark",r),this.buffer=new gQ,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(XZ||(XZ=SZ.StringDecoder),this.decoder=new XZ(e.encoding),this.encoding=e.encoding)}function u0(e){if(FZ=FZ||aZ,!(this instanceof u0))return new u0(e);var t=this instanceof FZ;this._readableState=new s0(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),lQ.call(this)}function c0(e,t,r,n,i){WZ("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(WZ("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?d0(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,h0(e)))}}(e,o);else if(i||(a=function(e,t){var r,n;return n=t,GZ.isBuffer(n)||n instanceof $Z||"string"==typeof t||void 0===t||e.objectMode||(r=new t0("chunk",["string","Buffer","Uint8Array"],t)),r}(o,t)),a)a0(e,a);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===GZ.prototype||(t=function(e){return GZ.from(e)}(t)),n)o.endEmitted?a0(e,new i0):l0(e,o,t,!0);else if(o.ended)a0(e,new r0);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?l0(e,o,t,!1):p0(e,o)):l0(e,o,t,!1)}else n||(o.reading=!1,p0(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function l0(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&d0(e)),p0(e,t)}function f0(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function d0(e){var t=e._readableState;WZ("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(WZ("emitReadable",t.flowing),t.emittedReadable=!0,nz(h0,e))}function h0(e){var t=e._readableState;WZ("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,y0(e)}function p0(e,t){t.readingMore||(t.readingMore=!0,nz(v0,e,t))}function v0(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(WZ("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function b0(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function g0(e){WZ("readable nexttick read 0"),e.read(0)}function m0(e,t){WZ("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),y0(e),t.flowing&&!t.reading&&e.read(0)}function y0(e){var t=e._readableState;for(WZ("flow",t.flowing);t.flowing&&null!==e.read(););}function w0(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function _0(e){var t=e._readableState;WZ("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,nz(x0,t,e))}function x0(e,t){if(WZ("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function k0(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(u0.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),u0.prototype.destroy=_Q,u0.prototype._undestroy=xQ,u0.prototype._destroy=function(e,t){t(e)},u0.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=GZ.from(e,t),t=""),r=!0),c0(this,e,t,!1,r)},u0.prototype.unshift=function(e){return c0(this,e,null,!0,!1)},u0.prototype.isPaused=function(){return!1===this._readableState.flowing},u0.prototype.setEncoding=function(e){XZ||(XZ=SZ.StringDecoder);var t=new XZ(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this},u0.prototype.read=function(e){WZ("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return WZ("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_0(this):d0(this),null;if(0===(e=f0(e,t))&&t.ended)return 0===t.length&&_0(this),null;var n,i=t.needReadable;return WZ("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&WZ("length less than watermark",i=!0),t.ended||t.reading?WZ("reading or ended",i=!1):i&&(WZ("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=f0(r,t))),null===(n=e>0?w0(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_0(this)),null!==n&&this.emit("data",n),n},u0.prototype._read=function(e){a0(this,new n0("_read()"))},u0.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,WZ("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end||e===bz.stdout||e===bz.stderr?d:a;function a(){WZ("onend"),e.end()}n.endEmitted?nz(i):r.once("end",i),e.on("unpipe",(function t(i,h){WZ("onunpipe"),i===r&&h&&!1===h.hasUnpiped&&(h.hasUnpiped=!0,WZ("cleanup"),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("drain",o),e.removeListener("error",c),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",d),r.removeListener("data",u),s=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||o())}));var o=function(e){return function(){var t=e._readableState;WZ("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&JZ(e,"data")&&(t.flowing=!0,y0(e))}}(r);e.on("drain",o);var s=!1;function u(t){WZ("ondata");var i=e.write(t);WZ("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==k0(n.pipes,e))&&!s&&(WZ("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(t){WZ("onerror",t),d(),e.removeListener("error",c),0===JZ(e,"error")&&a0(e,t)}function l(){e.removeListener("finish",f),d()}function f(){WZ("onfinish"),e.removeListener("close",l),d()}function d(){WZ("unpipe"),r.unpipe(e)}return r.on("data",u),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",l),e.once("finish",f),e.emit("pipe",r),n.flowing||(WZ("pipe resume"),r.resume()),e},u0.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=k0(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},u0.prototype.on=function(e,t){var r=lQ.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,WZ("on readable",n.length,n.reading),n.length?d0(this):n.reading||nz(g0,this))),r},u0.prototype.addListener=u0.prototype.on,u0.prototype.removeListener=function(e,t){var r=lQ.prototype.removeListener.call(this,e,t);return"readable"===e&&nz(b0,this),r},u0.prototype.removeAllListeners=function(e){var t=lQ.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||nz(b0,this),t},u0.prototype.resume=function(){var e=this._readableState;return e.flowing||(WZ("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,nz(m0,e,t))}(this,e)),e.paused=!1,this},u0.prototype.pause=function(){return WZ("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(WZ("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},u0.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(WZ("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){WZ("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<o0.length;a++)e.on(o0[a],this.emit.bind(this,o0[a]));return this._read=function(t){WZ("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(u0.prototype[Symbol.asyncIterator]=function(){return void 0===YZ&&(YZ=qZ),YZ(this)}),Object.defineProperty(u0.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(u0.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(u0.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),u0._fromList=w0,Object.defineProperty(u0.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(u0.from=function(e,t){return void 0===QZ&&(QZ=VZ),QZ(u0,e,t)});var S0=C0,E0=AQ.codes,I0=E0.ERR_METHOD_NOT_IMPLEMENTED,A0=E0.ERR_MULTIPLE_CALLBACK,P0=E0.ERR_TRANSFORM_ALREADY_TRANSFORMING,T0=E0.ERR_TRANSFORM_WITH_LENGTH_0;function O0(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new A0);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function C0(e){if(!(this instanceof C0))return new C0(e);aZ.call(this,e),this._transformState={afterTransform:O0.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",M0)}function M0(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?R0(this,null,null):this._flush((function(t,r){R0(e,t,r)}))}function R0(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new T0;if(e._transformState.transforming)throw new P0;return e.push(null)}uQ(C0,aZ),C0.prototype.push=function(e,t){return this._transformState.needTransform=!1,aZ.prototype.push.call(this,e,t)},C0.prototype._transform=function(e,t,r){r(new I0("_transform()"))},C0.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},C0.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},C0.prototype._destroy=function(e,t){aZ.prototype._destroy.call(this,e,(function(e){t(e)}))};var N0,L0=j0;function j0(e){if(!(this instanceof j0))return new j0(e);S0.call(this,e)}uQ(j0,S0),j0.prototype._transform=function(e,t,r){r(null,e)};var D0=AQ.codes,B0=D0.ERR_MISSING_ARGS,U0=D0.ERR_STREAM_DESTROYED;function F0(e){if(e)throw e}function z0(e,t,r,n){n=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(n);var i=!1;e.on("close",(function(){i=!0})),void 0===N0&&(N0=PZ),N0(e,{readable:t,writable:r},(function(e){if(e)return n(e);i=!0,n()}));var a=!1;return function(t){if(!i&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void n(t||new U0("pipe"))}}function H0(e){e()}function q0(e,t){return e.pipe(t)}function V0(e){return e.length?"function"!=typeof e[e.length-1]?F0:e.pop():F0}var K0=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=V0(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new B0("streams");var a=t.map((function(e,r){var o=r<t.length-1;return z0(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(H0),o||(a.forEach(H0),i(n))}))}));return t.reduce(q0)},W0=FU((function(e,t){(t=e.exports=KZ).Stream=t,t.Readable=t,t.Writable=MQ,t.Duplex=aZ,t.Transform=S0,t.PassThrough=L0,t.finished=PZ,t.pipeline=K0}));W0.Stream,W0.Readable,W0.Writable,W0.Duplex,W0.Transform,W0.PassThrough,W0.finished,W0.pipeline;var J0=cQ.Buffer,G0=W0.Transform;function $0(e){G0.call(this),this._block=J0.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}uQ($0,G0),$0.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},$0.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},$0.prototype.update=function(e,t){if(function(e,t){if(!J0.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");J0.isBuffer(e)||(e=J0.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var a=0,o=8*e.length;o>0;++a)this._length[a]+=o,(o=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*o);return this},$0.prototype._update=function(){throw new Error("_update is not implemented")},$0.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},$0.prototype._digest=function(){throw new Error("_digest is not implemented")};var X0=$0,Y0=cQ.Buffer,Q0=new Array(16);function Z0(){X0.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function e1(e,t){return e<<t|e>>>32-t}function t1(e,t,r,n,i,a,o){return e1(e+(t&r|~t&n)+i+a|0,o)+t|0}function r1(e,t,r,n,i,a,o){return e1(e+(t&n|r&~n)+i+a|0,o)+t|0}function n1(e,t,r,n,i,a,o){return e1(e+(t^r^n)+i+a|0,o)+t|0}function i1(e,t,r,n,i,a,o){return e1(e+(r^(t|~n))+i+a|0,o)+t|0}uQ(Z0,X0),Z0.prototype._update=function(){for(var e=Q0,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d;r=t1(r,n,i,a,e[0],3614090360,7),a=t1(a,r,n,i,e[1],3905402710,12),i=t1(i,a,r,n,e[2],606105819,17),n=t1(n,i,a,r,e[3],3250441966,22),r=t1(r,n,i,a,e[4],4118548399,7),a=t1(a,r,n,i,e[5],1200080426,12),i=t1(i,a,r,n,e[6],2821735955,17),n=t1(n,i,a,r,e[7],4249261313,22),r=t1(r,n,i,a,e[8],1770035416,7),a=t1(a,r,n,i,e[9],2336552879,12),i=t1(i,a,r,n,e[10],4294925233,17),n=t1(n,i,a,r,e[11],2304563134,22),r=t1(r,n,i,a,e[12],1804603682,7),a=t1(a,r,n,i,e[13],4254626195,12),i=t1(i,a,r,n,e[14],2792965006,17),r=r1(r,n=t1(n,i,a,r,e[15],1236535329,22),i,a,e[1],4129170786,5),a=r1(a,r,n,i,e[6],3225465664,9),i=r1(i,a,r,n,e[11],643717713,14),n=r1(n,i,a,r,e[0],3921069994,20),r=r1(r,n,i,a,e[5],3593408605,5),a=r1(a,r,n,i,e[10],38016083,9),i=r1(i,a,r,n,e[15],3634488961,14),n=r1(n,i,a,r,e[4],3889429448,20),r=r1(r,n,i,a,e[9],568446438,5),a=r1(a,r,n,i,e[14],3275163606,9),i=r1(i,a,r,n,e[3],4107603335,14),n=r1(n,i,a,r,e[8],1163531501,20),r=r1(r,n,i,a,e[13],2850285829,5),a=r1(a,r,n,i,e[2],4243563512,9),i=r1(i,a,r,n,e[7],1735328473,14),r=n1(r,n=r1(n,i,a,r,e[12],2368359562,20),i,a,e[5],4294588738,4),a=n1(a,r,n,i,e[8],2272392833,11),i=n1(i,a,r,n,e[11],1839030562,16),n=n1(n,i,a,r,e[14],4259657740,23),r=n1(r,n,i,a,e[1],2763975236,4),a=n1(a,r,n,i,e[4],1272893353,11),i=n1(i,a,r,n,e[7],4139469664,16),n=n1(n,i,a,r,e[10],3200236656,23),r=n1(r,n,i,a,e[13],681279174,4),a=n1(a,r,n,i,e[0],3936430074,11),i=n1(i,a,r,n,e[3],3572445317,16),n=n1(n,i,a,r,e[6],76029189,23),r=n1(r,n,i,a,e[9],3654602809,4),a=n1(a,r,n,i,e[12],3873151461,11),i=n1(i,a,r,n,e[15],530742520,16),r=i1(r,n=n1(n,i,a,r,e[2],3299628645,23),i,a,e[0],4096336452,6),a=i1(a,r,n,i,e[7],1126891415,10),i=i1(i,a,r,n,e[14],2878612391,15),n=i1(n,i,a,r,e[5],4237533241,21),r=i1(r,n,i,a,e[12],1700485571,6),a=i1(a,r,n,i,e[3],2399980690,10),i=i1(i,a,r,n,e[10],4293915773,15),n=i1(n,i,a,r,e[1],2240044497,21),r=i1(r,n,i,a,e[8],1873313359,6),a=i1(a,r,n,i,e[15],4264355552,10),i=i1(i,a,r,n,e[6],2734768916,15),n=i1(n,i,a,r,e[13],1309151649,21),r=i1(r,n,i,a,e[4],4149444226,6),a=i1(a,r,n,i,e[11],3174756917,10),i=i1(i,a,r,n,e[2],718787259,15),n=i1(n,i,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},Z0.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Y0.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var a1=Z0,o1=KF.Buffer,s1=new Array(16),u1=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c1=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f1=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d1=[0,1518500249,1859775393,2400959708,2840853838],h1=[1352829926,1548603684,1836072691,2053994217,0];function p1(){X0.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function v1(e,t){return e<<t|e>>>32-t}function b1(e,t,r,n,i,a,o,s){return v1(e+(t^r^n)+a+o|0,s)+i|0}function g1(e,t,r,n,i,a,o,s){return v1(e+(t&r|~t&n)+a+o|0,s)+i|0}function m1(e,t,r,n,i,a,o,s){return v1(e+((t|~r)^n)+a+o|0,s)+i|0}function y1(e,t,r,n,i,a,o,s){return v1(e+(t&n|r&~n)+a+o|0,s)+i|0}function w1(e,t,r,n,i,a,o,s){return v1(e+(t^(r|~n))+a+o|0,s)+i|0}uQ(p1,X0),p1.prototype._update=function(){for(var e=s1,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,s=0|this._a,u=0|this._b,c=0|this._c,l=0|this._d,f=0|this._e,d=0;d<80;d+=1){var h,p;d<16?(h=b1(r,n,i,a,o,e[u1[d]],d1[0],l1[d]),p=w1(s,u,c,l,f,e[c1[d]],h1[0],f1[d])):d<32?(h=g1(r,n,i,a,o,e[u1[d]],d1[1],l1[d]),p=y1(s,u,c,l,f,e[c1[d]],h1[1],f1[d])):d<48?(h=m1(r,n,i,a,o,e[u1[d]],d1[2],l1[d]),p=m1(s,u,c,l,f,e[c1[d]],h1[2],f1[d])):d<64?(h=y1(r,n,i,a,o,e[u1[d]],d1[3],l1[d]),p=g1(s,u,c,l,f,e[c1[d]],h1[3],f1[d])):(h=w1(r,n,i,a,o,e[u1[d]],d1[4],l1[d]),p=b1(s,u,c,l,f,e[c1[d]],h1[4],f1[d])),r=o,o=a,a=v1(i,10),i=n,n=h,s=f,f=l,l=v1(c,10),c=u,u=p}var v=this._b+i+l|0;this._b=this._c+a+f|0,this._c=this._d+o+s|0,this._d=this._e+r+u|0,this._e=this._a+n+c|0,this._a=v},p1.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o1.alloc?o1.alloc(20):new o1(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};var _1=p1,x1=cQ.Buffer;function k1(e,t){this._block=x1.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}k1.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=x1.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,o=0;o<i;){for(var s=a%n,u=Math.min(i-o,n-s),c=0;c<u;c++)r[s+c]=e[o+c];o+=u,(a+=u)%n==0&&this._update(r)}return this._len+=i,this},k1.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},k1.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var S1=k1,E1=cQ.Buffer,I1=[1518500249,1859775393,-1894007588,-899497514],A1=new Array(80);function P1(){this.init(),this._w=A1,S1.call(this,64,56)}function T1(e){return e<<30|e>>>2}function O1(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}uQ(P1,S1),P1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},P1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=r[u-3]^r[u-8]^r[u-14]^r[u-16];for(var c=0;c<80;++c){var l=~~(c/20),f=0|((t=n)<<5|t>>>27)+O1(l,i,a,o)+s+r[c]+I1[l];s=o,o=a,a=T1(i),i=n,n=f}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},P1.prototype._hash=function(){var e=E1.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var C1=P1,M1=cQ.Buffer,R1=[1518500249,1859775393,-1894007588,-899497514],N1=new Array(80);function L1(){this.init(),this._w=N1,S1.call(this,64,56)}function j1(e){return e<<5|e>>>27}function D1(e){return e<<30|e>>>2}function B1(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}uQ(L1,S1),L1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},L1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=(t=r[u-3]^r[u-8]^r[u-14]^r[u-16])<<1|t>>>31;for(var c=0;c<80;++c){var l=~~(c/20),f=j1(n)+B1(l,i,a,o)+s+r[c]+R1[l]|0;s=o,o=a,a=D1(i),i=n,n=f}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},L1.prototype._hash=function(){var e=M1.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var U1=L1,F1=cQ.Buffer,z1=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],H1=new Array(64);function q1(){this.init(),this._w=H1,S1.call(this,64,56)}function V1(e,t,r){return r^e&(t^r)}function K1(e,t,r){return e&t|r&(e|t)}function W1(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function J1(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function G1(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function $1(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}uQ(q1,S1),q1.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},q1.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,s=0|this._f,u=0|this._g,c=0|this._h,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<64;++l)t[l]=$1(t[l-2])+t[l-7]+G1(t[l-15])+t[l-16]|0;for(var f=0;f<64;++f){var d=c+J1(o)+V1(o,s,u)+z1[f]+t[f]|0,h=W1(r)+K1(r,n,i)|0;c=u,u=s,s=o,o=a+d|0,a=i,i=n,n=r,r=d+h|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},q1.prototype._hash=function(){var e=F1.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var X1=q1,Y1=cQ.Buffer,Q1=new Array(64);function Z1(){this.init(),this._w=Q1,S1.call(this,64,56)}uQ(Z1,X1),Z1.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Z1.prototype._hash=function(){var e=Y1.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var e2=Z1,t2=cQ.Buffer,r2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],n2=new Array(160);function i2(){this.init(),this._w=n2,S1.call(this,128,112)}function a2(e,t,r){return r^e&(t^r)}function o2(e,t,r){return e&t|r&(e|t)}function s2(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function u2(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c2(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function l2(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f2(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d2(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function h2(e,t){return e>>>0<t>>>0?1:0}uQ(i2,S1),i2.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i2.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,s=0|this._fh,u=0|this._gh,c=0|this._hh,l=0|this._al,f=0|this._bl,d=0|this._cl,h=0|this._dl,p=0|this._el,v=0|this._fl,b=0|this._gl,g=0|this._hl,m=0;m<32;m+=2)t[m]=e.readInt32BE(4*m),t[m+1]=e.readInt32BE(4*m+4);for(;m<160;m+=2){var y=t[m-30],w=t[m-30+1],_=c2(y,w),x=l2(w,y),k=f2(y=t[m-4],w=t[m-4+1]),S=d2(w,y),E=t[m-14],I=t[m-14+1],A=t[m-32],P=t[m-32+1],T=x+I|0,O=_+E+h2(T,x)|0;O=(O=O+k+h2(T=T+S|0,S)|0)+A+h2(T=T+P|0,P)|0,t[m]=O,t[m+1]=T}for(var C=0;C<160;C+=2){O=t[C],T=t[C+1];var M=o2(r,n,i),R=o2(l,f,d),N=s2(r,l),L=s2(l,r),j=u2(o,p),D=u2(p,o),B=r2[C],U=r2[C+1],F=a2(o,s,u),z=a2(p,v,b),H=g+D|0,q=c+j+h2(H,g)|0;q=(q=(q=q+F+h2(H=H+z|0,z)|0)+B+h2(H=H+U|0,U)|0)+O+h2(H=H+T|0,T)|0;var V=L+R|0,K=N+M+h2(V,L)|0;c=u,g=b,u=s,b=v,s=o,v=p,o=a+q+h2(p=h+H|0,h)|0,a=i,h=d,i=n,d=f,n=r,f=l,r=q+K+h2(l=H+V|0,H)|0}this._al=this._al+l|0,this._bl=this._bl+f|0,this._cl=this._cl+d|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+v|0,this._gl=this._gl+b|0,this._hl=this._hl+g|0,this._ah=this._ah+r+h2(this._al,l)|0,this._bh=this._bh+n+h2(this._bl,f)|0,this._ch=this._ch+i+h2(this._cl,d)|0,this._dh=this._dh+a+h2(this._dl,h)|0,this._eh=this._eh+o+h2(this._el,p)|0,this._fh=this._fh+s+h2(this._fl,v)|0,this._gh=this._gh+u+h2(this._gl,b)|0,this._hh=this._hh+c+h2(this._hl,g)|0},i2.prototype._hash=function(){var e=t2.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var p2=i2,v2=cQ.Buffer,b2=new Array(160);function g2(){this.init(),this._w=b2,S1.call(this,128,112)}uQ(g2,p2),g2.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},g2.prototype._hash=function(){var e=v2.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var m2=g2,y2=FU((function(e){var t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};t.sha=C1,t.sha1=U1,t.sha224=e2,t.sha256=X1,t.sha384=m2,t.sha512=p2})),w2=cQ.Buffer,_2=Nq.Transform,x2=YH.StringDecoder;function k2(e){_2.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}uQ(k2,_2),k2.prototype.update=function(e,t,r){"string"==typeof e&&(e=w2.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},k2.prototype.setAutoPadding=function(){},k2.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},k2.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},k2.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},k2.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},k2.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},k2.prototype._finalOrDigest=function(e){var t=this.__final()||w2.alloc(0);return e&&(t=this._toString(t,e,!0)),t},k2.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new x2(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n};var S2=k2;function E2(e){S2.call(this,"digest"),this._hash=e}uQ(E2,S2),E2.prototype._update=function(e){this._hash.update(e)},E2.prototype._final=function(){return this._hash.digest()};var I2=function(e){return"md5"===(e=e.toLowerCase())?new a1:"rmd160"===e||"ripemd160"===e?new _1:new E2(y2(e))},A2=cQ.Buffer,P2=A2.alloc(128);function T2(e,t){S2.call(this,"digest"),"string"==typeof t&&(t=A2.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=A2.concat([t,P2],64));for(var r=this._ipad=A2.allocUnsafe(64),n=this._opad=A2.allocUnsafe(64),i=0;i<64;i++)r[i]=54^t[i],n[i]=92^t[i];this._hash=[r]}uQ(T2,S2),T2.prototype._update=function(e){this._hash.push(e)},T2.prototype._final=function(){var e=this._alg(A2.concat(this._hash));return this._alg(A2.concat([this._opad,e]))};var O2=T2,C2=function(e){return(new a1).update(e).digest()},M2=cQ.Buffer,R2=M2.alloc(128);function N2(e,t){S2.call(this,"digest"),"string"==typeof t&&(t=M2.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new _1:y2(e)).update(t).digest():t.length<r&&(t=M2.concat([t,R2],r));for(var n=this._ipad=M2.allocUnsafe(r),i=this._opad=M2.allocUnsafe(r),a=0;a<r;a++)n[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new _1:y2(e),this._hash.update(n)}uQ(N2,S2),N2.prototype._update=function(e){this._hash.update(e)},N2.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new _1:y2(this._alg)).update(this._opad).update(e).digest()};var L2=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new N2("rmd160",t):"md5"===e?new O2(C2,t):new N2(e,t)},j2=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hash160=function(e){var t=I2("sha256").update(e).digest();try{return I2("rmd160").update(t).digest()}catch(e){return I2("ripemd160").update(t).digest()}},t.hmacSHA512=function(e,t){return L2("sha512",e).update(t).digest()}}));UU(j2),j2.hash160,j2.hmacSHA512;var D2=cQ.Buffer,B2=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),a=i.charCodeAt(0);if(255!==t[a])throw new TypeError(i+" is ambiguous");t[a]=n}var o=e.length,s=e.charAt(0),u=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return D2.alloc(0);var r=0;if(" "!==e[r]){for(var n=0,i=0;e[r]===s;)n++,r++;for(var a=(e.length-r)*u+1>>>0,c=new Uint8Array(a);e[r];){var l=t[e.charCodeAt(r)];if(255===l)return;for(var f=0,d=a-1;(0!==l||f<i)&&-1!==d;d--,f++)l+=o*c[d]>>>0,c[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,r++}if(" "!==e[r]){for(var h=a-i;h!==a&&0===c[h];)h++;var p=D2.allocUnsafe(n+(a-h));p.fill(0,0,n);for(var v=n;h!==a;)p[v++]=c[h++];return p}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=D2.from(t)),!D2.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,n=0,i=0,a=t.length;i!==a&&0===t[i];)i++,r++;for(var u=(a-i)*c+1>>>0,l=new Uint8Array(u);i!==a;){for(var f=t[i],d=0,h=u-1;(0!==f||d<n)&&-1!==h;h--,d++)f+=256*l[h]>>>0,l[h]=f%o>>>0,f=f/o>>>0;if(0!==f)throw new Error("Non-zero carry");n=d,i++}for(var p=u-n;p!==u&&0===l[p];)p++;for(var v=s.repeat(r);p<u;++p)v+=e.charAt(l[p]);return v},decodeUnsafe:l,decode:function(e){var t=l(e);if(t)return t;throw new Error("Non-base"+o+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),U2=cQ.Buffer,F2=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return B2.encode(U2.concat([t,r],t.length+4))},decode:function(e){var r=t(B2.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=B2.decodeUnsafe(e);if(r)return t(r)}}}((function(e){var t=I2("sha256").update(e).digest();return I2("sha256").update(t).digest()})),z2=FU((function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==r(e)?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:cK.Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==r(e)&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==r(e))return this._initArray(e,t,i);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a<e.length&&(16===t?this._parseHex(e,a,i):(this._parseBase(e,t,a),"le"===i&&this._initArray(this.toArray(),t,i)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,o=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,l=r;l<s;l+=n)u=c(e,l,l+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var f=1;for(u=c(e,l,e.length,t),l=0;l<o;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(o=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);r=0!=(a=s>>>24-i&16777215)||o!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?v+r:l[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),l=this.clone();if(u){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)a=(t=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)a=(t=(0|r.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,l=0|o[0],f=8191&l,d=l>>>13,h=0|o[1],p=8191&h,v=h>>>13,b=0|o[2],g=8191&b,m=b>>>13,y=0|o[3],w=8191&y,_=y>>>13,x=0|o[4],k=8191&x,S=x>>>13,E=0|o[5],I=8191&E,A=E>>>13,P=0|o[6],T=8191&P,O=P>>>13,C=0|o[7],M=8191&C,R=C>>>13,N=0|o[8],L=8191&N,j=N>>>13,D=0|o[9],B=8191&D,U=D>>>13,F=0|s[0],z=8191&F,H=F>>>13,q=0|s[1],V=8191&q,K=q>>>13,W=0|s[2],J=8191&W,G=W>>>13,$=0|s[3],X=8191&$,Y=$>>>13,Q=0|s[4],Z=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ve=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,z)|0))<<13)|0;c=((a=Math.imul(d,H))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(v,z)|0,a=Math.imul(v,H);var ge=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,V)|0))<<13)|0;c=((a=a+Math.imul(d,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(m,z)|0,a=Math.imul(m,H),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,K)|0;var me=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,J)|0))<<13)|0;c=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,a=Math.imul(_,H),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,G)|0;var ye=(c+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,X)|0))<<13)|0;c=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,H))+Math.imul(S,z)|0,a=Math.imul(S,H),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,V)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(A,z)|0,a=Math.imul(A,H),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,V)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((a=a+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,H))+Math.imul(O,z)|0,a=Math.imul(O,H),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(A,V)|0,a=a+Math.imul(A,K)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0;var xe=(c+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(d,ae)|0))<<13)|0;c=((a=a+Math.imul(d,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,H))+Math.imul(R,z)|0,a=Math.imul(R,H),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,G)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0;var ke=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((a=a+Math.imul(d,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,H))+Math.imul(j,z)|0,a=Math.imul(j,H),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(R,V)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,G)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,a=a+Math.imul(v,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,H))+Math.imul(U,z)|0,a=Math.imul(U,H),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(j,V)|0,a=a+Math.imul(j,K)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(A,Z)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ve)|0)+Math.imul(d,pe)|0))<<13)|0;c=((a=a+Math.imul(d,ve)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,V),i=(i=Math.imul(B,K))+Math.imul(U,V)|0,a=Math.imul(U,K),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(j,J)|0,a=a+Math.imul(j,G)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,a=a+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0;var Ie=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((a=a+Math.imul(v,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,G))+Math.imul(U,J)|0,a=Math.imul(U,G),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(j,X)|0,a=a+Math.imul(j,Y)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,de)|0;var Ae=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(m,pe)|0))<<13)|0;c=((a=a+Math.imul(m,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,Y))+Math.imul(U,X)|0,a=Math.imul(U,Y),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(j,Z)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((a=a+Math.imul(_,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,Z),i=(i=Math.imul(B,ee))+Math.imul(U,Z)|0,a=Math.imul(U,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(A,fe)|0,a=a+Math.imul(A,de)|0;var Te=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ve)|0)+Math.imul(S,pe)|0))<<13)|0;c=((a=a+Math.imul(S,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(U,re)|0,a=Math.imul(U,ne),n=n+Math.imul(L,ae)|0,i=(i=i+Math.imul(L,oe)|0)+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,fe)|0,a=a+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ve)|0)+Math.imul(A,pe)|0))<<13)|0;c=((a=a+Math.imul(A,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,ae),i=(i=Math.imul(B,oe))+Math.imul(U,ae)|0,a=Math.imul(U,oe),n=n+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(j,ue)|0,a=a+Math.imul(j,ce)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0;var Ce=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((a=a+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,ue),i=(i=Math.imul(B,ce))+Math.imul(U,ue)|0,a=Math.imul(U,ce),n=n+Math.imul(L,fe)|0,i=(i=i+Math.imul(L,de)|0)+Math.imul(j,fe)|0,a=a+Math.imul(j,de)|0;var Me=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((a=a+Math.imul(R,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(U,fe)|0,a=Math.imul(U,de);var Re=(c+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((a=a+Math.imul(j,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(n=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((a=Math.imul(U,ve))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=be,u[1]=ge,u[2]=me,u[3]=ye,u[4]=we,u[5]=_e,u[6]=xe,u[7]=ke,u[8]=Se,u[9]=Ee,u[10]=Ie,u[11]=Ae,u[12]=Pe,u[13]=Te,u[14]=Oe,u[15]=Ce,u[16]=Me,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,r.length++),r};function v(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=h),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var l=a-c,f=(0|e.words[l])*(0|t.words[c]),d=67108863&f;s=67108863&(d=d+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},b.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var f=u,d=c,h=0;h<o;h++){var p=r[l+h],v=n[l+h],b=r[l+h+o],g=n[l+h+o],m=f*b-d*g;g=f*g+d*b,b=m,r[l+h]=p+b,n[l+h]=v+g,r[l+h+o]=p-b,n[l+h+o]=v-g,h!==s&&(m=u*f-c*d,d=u*d+c*f,f=m)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,l,f,n,i);for(var h=0;h<n;h++){var p=s[h]*l[h]-u[h]*f[h];u[h]=s[h]*f[h]+u[h]*l[h],s[h]=p}return this.conjugate(s,u,n),this.transform(s,u,d,a,n,i),this.conjugate(d,a,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),v(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-a|f>>>a,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,s&&(s.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new k(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(y,m),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,m),i(_,m),i(x,m),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var v=h,b=0;0!==v.cmp(s);b++)v=v.redSqr();n(b<p);var g=this.pow(f,new a(1).iushln(p-b-1));d=d.redMul(g),f=g.redSqr(),h=h.redMul(f),p=b}return d},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new S(e)},i(S,k),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,BU)})),H2="lib/elliptic.js",q2=["lib"],V2={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},K2={type:"git",url:"git@github.com:indutny/elliptic"},W2=["EC","Elliptic","curve","Cryptography"],J2="Fedor Indutny <fedor@indutny.com>",G2={url:"https://github.com/indutny/elliptic/issues"},$2="https://github.com/indutny/elliptic",X2={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},Y2={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},Q2={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:H2,files:q2,scripts:V2,repository:K2,keywords:W2,author:J2,license:"MIT",bugs:G2,homepage:$2,devDependencies:X2,dependencies:Y2},Z2=Object.freeze({__proto__:null,name:"elliptic",version:"6.5.4",description:"EC cryptography",main:H2,files:q2,scripts:V2,repository:K2,keywords:W2,author:J2,license:"MIT",bugs:G2,homepage:$2,devDependencies:X2,dependencies:Y2,default:Q2}),e3=t3;function t3(e,t){if(!e)throw new Error(t||"Assertion failed")}t3.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var r3,n3=FU((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,o=255&i;a?r.push(a,o):r.push(o)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),i3=FU((function(e,t){var r=t;r.assert=e3,r.toArray=n3.toArray,r.zero2=n3.zero2,r.toHex=n3.toHex,r.encode=n3.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,a=e.clone(),o=0;o<n.length;o++){var s,u=a.andln(i-1);a.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,a.isubn(s)):s=0,n[o]=s,a.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,a=0;e.cmpn(-i)>0||t.cmpn(-a)>0;){var o,s,u=e.andln(3)+i&3,c=t.andln(3)+a&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(o),s=0==(1&c)?0:3!=(n=t.andln(7)+a&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===o+1&&(i=1-i),2*a===s+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new z2(e,"hex","le")}})),a3=function(e){return r3||(r3=new o3(null)),r3.generate(e)};function o3(e){this.rand=e}var s3=o3;if(o3.prototype.generate=function(e){return this._rand(e)},o3.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==("undefined"==typeof self?"undefined":r(self)))self.crypto&&self.crypto.getRandomValues?o3.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?o3.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==("undefined"==typeof window?"undefined":r(window))&&(o3.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var u3=cK;if("function"!=typeof u3.randomBytes)throw new Error("Not supported");o3.prototype._rand=function(e){return u3.randomBytes(e)}}catch(dU){}a3.Rand=s3;var c3=i3.getNAF,l3=i3.getJSF,f3=i3.assert;function d3(e,t){this.type=e,this.p=new z2(t.p,16),this.red=t.prime?z2.red(t.prime):z2.mont(this.p),this.zero=new z2(0).toRed(this.red),this.one=new z2(1).toRed(this.red),this.two=new z2(2).toRed(this.red),this.n=t.n&&new z2(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var h3=d3;function p3(e,t){this.curve=e,this.type=t,this.precomputed=null}d3.prototype.point=function(){throw new Error("Not implemented")},d3.prototype.validate=function(){throw new Error("Not implemented")},d3.prototype._fixedNafMul=function(e,t){f3(e.precomputed);var r=e._getDoubles(),n=c3(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,o,s=[];for(a=0;a<n.length;a+=r.step){o=0;for(var u=a+r.step-1;u>=a;u--)o=(o<<1)+n[u];s.push(o)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(a=0;a<s.length;a++)(o=s[a])===f?l=l.mixedAdd(r.points[a]):o===-f&&(l=l.mixedAdd(r.points[a].neg()));c=c.add(l)}return c.toP()},d3.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=c3(t,r,this._bitLength),o=this.jpoint(null,null,null),s=a.length-1;s>=0;s--){for(var u=0;s>=0&&0===a[s];s--)u++;if(s>=0&&u++,o=o.dblp(u),s<0)break;var c=a[s];f3(0!==c),o="affine"===e.type?c>0?o.mixedAdd(i[c-1>>1]):o.mixedAdd(i[-c-1>>1].neg()):c>0?o.add(i[c-1>>1]):o.add(i[-c-1>>1].neg())}return"affine"===e.type?o.toP():o},d3.prototype._wnafMulAdd=function(e,t,r,n,i){var a,o,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(a=0;a<n;a++){var d=(s=t[a])._getNAFPoints(e);u[a]=d.wnd,c[a]=d.points}for(a=n-1;a>=1;a-=2){var h=a-1,p=a;if(1===u[h]&&1===u[p]){var v=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(v[1]=t[h].add(t[p]),v[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(v[1]=t[h].toJ().mixedAdd(t[p]),v[2]=t[h].add(t[p].neg())):(v[1]=t[h].toJ().mixedAdd(t[p]),v[2]=t[h].toJ().mixedAdd(t[p].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],g=l3(r[h],r[p]);for(f=Math.max(g[0].length,f),l[h]=new Array(f),l[p]=new Array(f),o=0;o<f;o++){var m=0|g[0][o],y=0|g[1][o];l[h][o]=b[3*(m+1)+(y+1)],l[p][o]=0,c[h]=v}}else l[h]=c3(r[h],u[h],this._bitLength),l[p]=c3(r[p],u[p],this._bitLength),f=Math.max(l[h].length,f),f=Math.max(l[p].length,f)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(a=f;a>=0;a--){for(var x=0;a>=0;){var k=!0;for(o=0;o<n;o++)_[o]=0|l[o][a],0!==_[o]&&(k=!1);if(!k)break;x++,a--}if(a>=0&&x++,w=w.dblp(x),a<0)break;for(o=0;o<n;o++){var S=_[o];0!==S&&(S>0?s=c[o][S-1>>1]:S<0&&(s=c[o][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(a=0;a<n;a++)c[a]=null;return i?w:w.toP()},d3.BasePoint=p3,p3.prototype.eq=function(){throw new Error("Not implemented")},p3.prototype.validate=function(){return this.curve.validate(this)},d3.prototype.decodePoint=function(e,t){e=i3.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?f3(e[e.length-1]%2==0):7===e[0]&&f3(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},p3.prototype.encodeCompressed=function(e){return this.encode(e,!0)},p3.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},p3.prototype.encode=function(e,t){return i3.encode(this._encode(t),e)},p3.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},p3.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},p3.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)n=n.dbl();r.push(n)}return{step:e,points:r}},p3.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},p3.prototype._getBeta=function(){return null},p3.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var v3=i3.assert;function b3(e){h3.call(this,"short",e),this.a=new z2(e.a,16).toRed(this.red),this.b=new z2(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}uQ(b3,h3);var g3=b3;function m3(e,t,r,n){h3.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new z2(t,16),this.y=new z2(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function y3(e,t,r,n){h3.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new z2(0)):(this.x=new z2(t,16),this.y=new z2(r,16),this.z=new z2(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}function w3(e){h3.call(this,"mont",e),this.a=new z2(e.a,16).toRed(this.red),this.b=new z2(e.b,16).toRed(this.red),this.i4=new z2(4).toRed(this.red).redInvm(),this.two=new z2(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}b3.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new z2(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new z2(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],v3(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new z2(e.a,16),b:new z2(e.b,16)}})):this._getEndoBasis(r)}}},b3.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:z2.mont(e),r=new z2(2).toRed(t).redInvm(),n=r.redNeg(),i=new z2(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},b3.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,o,s,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,d=this.n.clone(),h=new z2(1),p=new z2(0),v=new z2(0),b=new z2(1),g=0;0!==f.cmpn(0);){var m=d.div(f);u=d.sub(m.mul(f)),c=v.sub(m.mul(h));var y=b.sub(m.mul(p));if(!n&&u.cmp(l)<0)t=s.neg(),r=h,n=u.neg(),i=c;else if(n&&2==++g)break;s=u,d=f,f=u,v=h,h=c,b=p,p=y}a=u.neg(),o=c;var w=n.sqr().add(i.sqr());return a.sqr().add(o.sqr()).cmp(w)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:i},{a:a,b:o}]},b3.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),u=i.mul(r.b),c=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:u.add(c).neg()}},b3.prototype.pointFromX=function(e,t){(e=new z2(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},b3.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},b3.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],u=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),u=u.neg(!0)),n[2*a]=s,n[2*a+1]=u,i[2*a]=o.k1,i[2*a+1]=o.k2}for(var c=this._wnafMulAdd(1,n,i,2*a,r),l=0;l<2*a;l++)n[l]=null,i[l]=null;return c},uQ(m3,h3.BasePoint),b3.prototype.point=function(e,t,r){return new m3(this,e,t,r)},b3.prototype.pointFromJSON=function(e,t){return m3.fromJSON(this,e,t)},m3.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},m3.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},m3.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},m3.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},m3.prototype.isInfinity=function(){return this.inf},m3.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},m3.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},m3.prototype.getX=function(){return this.x.fromRed()},m3.prototype.getY=function(){return this.y.fromRed()},m3.prototype.mul=function(e){return e=new z2(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},m3.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},m3.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},m3.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},m3.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},m3.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},uQ(y3,h3.BasePoint),b3.prototype.jpoint=function(e,t,r){return new y3(this,e,t,r)},y3.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},y3.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},y3.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=a.redSub(o);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(a.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},y3.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),c=u.redMul(o),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(o);return this.curve.jpoint(f,d,h)},y3.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,s=this.z,u=s.redSqr().redSqr(),c=o.redAdd(o);for(t=0;t<e;t++){var l=a.redSqr(),f=c.redSqr(),d=f.redSqr(),h=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=a.redMul(f),v=h.redSqr().redISub(p.redAdd(p)),b=p.redISub(v),g=h.redMul(b);g=g.redIAdd(g).redISub(d);var m=c.redMul(s);t+1<e&&(u=u.redMul(d)),a=v,s=m,c=g}return this.curve.jpoint(a,c.redMul(i),s)},y3.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},y3.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(o).redISub(o),c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(o.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),d=f.redSqr(),h=this.x.redAdd(f).redSqr().redISub(l).redISub(d);h=h.redIAdd(h);var p=l.redAdd(l).redIAdd(l),v=p.redSqr(),b=d.redIAdd(d);b=(b=b.redIAdd(b)).redIAdd(b),e=v.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},y3.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(o).redISub(o);e=u;var c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(o.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),d=this.x.redMul(f),h=this.x.redSub(l).redMul(this.x.redAdd(l));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),v=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var b=f.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=h.redMul(p.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,r)},y3.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(o),l=s.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),d=o.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(f).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,h,p)},y3.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(s).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.y.redMul(c.redMul(u.redISub(c)).redISub(o.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(o).redSqr().redISub(r).redISub(s);return this.curve.jpoint(f,d,h)},y3.prototype.mul=function(e,t){return e=new z2(e,t),this.curve._wnafMul(this,e)},y3.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},y3.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},y3.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},y3.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},uQ(w3,h3);var _3=w3;function x3(e,t,r){h3.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new z2(t,16),this.z=new z2(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}w3.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},uQ(x3,h3.BasePoint),w3.prototype.decodePoint=function(e,t){return this.point(i3.toArray(e,t),1)},w3.prototype.point=function(e,t){return new x3(this,e,t)},w3.prototype.pointFromJSON=function(e){return x3.fromJSON(this,e)},x3.prototype.precompute=function(){},x3.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},x3.fromJSON=function(e,t){return new x3(e,t[0],t[1]||e.one)},x3.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},x3.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},x3.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},x3.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},x3.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),u=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,u)},x3.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},x3.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},x3.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},x3.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},x3.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},x3.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var k3=i3.assert;function S3(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,h3.call(this,"edwards",e),this.a=new z2(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new z2(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new z2(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),k3(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}uQ(S3,h3);var E3=S3;function I3(e,t,r,n,i){h3.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new z2(t,16),this.y=new z2(r,16),this.z=n?new z2(n,16):this.curve.one,this.t=i&&new z2(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}S3.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},S3.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},S3.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},S3.prototype.pointFromX=function(e,t){(e=new z2(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(i.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},S3.prototype.pointFromY=function(e,t){(e=new z2(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},S3.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},uQ(I3,h3.BasePoint),S3.prototype.pointFromJSON=function(e){return I3.fromJSON(this,e)},S3.prototype.point=function(e,t,r,n){return new I3(this,e,t,r,n)},I3.fromJSON=function(e,t){return new I3(e,t[0],t[1],t[2])},I3.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},I3.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},I3.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),u=i.redMul(o),c=a.redMul(s),l=i.redMul(s),f=o.redMul(a);return this.curve.point(u,c,f,l)},I3.prototype._projDbl=function(){var e,t,r,n,i,a,o=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=o.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),a=c.redSub(i).redISub(i),e=o.redSub(s).redISub(u).redMul(a),t=c.redMul(n.redSub(u)),r=c.redMul(a))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),a=n.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(n)).redMul(a),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(a);return this.curve.point(e,t,r)},I3.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},I3.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=a.redMul(o),l=s.redMul(u),f=a.redMul(u),d=o.redMul(s);return this.curve.point(c,l,d,f)},I3.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),u=i.redSub(s),c=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),f=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=u.redMul(c)):(t=n.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},I3.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},I3.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},I3.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},I3.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},I3.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},I3.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},I3.prototype.getX=function(){return this.normalize(),this.x.fromRed()},I3.prototype.getY=function(){return this.normalize(),this.y.fromRed()},I3.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},I3.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},I3.prototype.toP=I3.prototype.normalize,I3.prototype.mixedAdd=I3.prototype.add;var A3=FU((function(e,t){var r=t;r.base=h3,r.short=g3,r.mont=_3,r.edwards=E3}));function P3(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function T3(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function O3(e){return 1===e.length?"0"+e:e}function C3(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var M3={inherits:uQ,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):P3(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},toHex:function(e){for(var t="",r=0;r<e.length;r++)t+=O3(e[r].toString(16));return t},htonl:T3,toHex32:function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=T3(i)),r+=C3(i.toString(16))}return r},zero2:O3,zero8:C3,join32:function(e,t,r,n){var i=r-t;e3(i%4==0);for(var a=new Array(i/4),o=0,s=t;o<a.length;o++,s+=4){var u;u="big"===n?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],a[o]=u>>>0}return a},split32:function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var a=e[n];"big"===t?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,n){return e+t+r+n>>>0},sum32_5:function(e,t,r,n,i){return e+t+r+n+i>>>0},sum64:function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a<n?1:0)+r+i;e[t]=o>>>0,e[t+1]=a},sum64_hi:function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},sum64_lo:function(e,t,r,n){return t+n>>>0},sum64_4_hi:function(e,t,r,n,i,a,o,s){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+a>>>0)<a?1:0,e+r+i+o+(u+=(c=c+s>>>0)<s?1:0)>>>0},sum64_4_lo:function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},sum64_5_hi:function(e,t,r,n,i,a,o,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)<t?1:0,l+=(f=f+a>>>0)<a?1:0,l+=(f=f+s>>>0)<s?1:0,e+r+i+o+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},sum64_5_lo:function(e,t,r,n,i,a,o,s,u,c){return t+n+a+s+c>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function R3(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var N3=R3;R3.prototype.update=function(e,t){if(e=M3.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=M3.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},R3.prototype.digest=function(e){return this.update(this._pad()),e3(null===this.pending),this._digest(e)},R3.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a<this.padLength;a++)n[i++]=0;return n};var L3={BlockHash:N3},j3=M3.rotr32;function D3(e,t,r){return e&t^~e&r}function B3(e,t,r){return e&t^e&r^t&r}function U3(e,t,r){return e^t^r}var F3=function(e,t,r,n){return 0===e?D3(t,r,n):1===e||3===e?U3(t,r,n):2===e?B3(t,r,n):void 0},z3=D3,H3=B3,q3=function(e){return j3(e,2)^j3(e,13)^j3(e,22)},V3=function(e){return j3(e,6)^j3(e,11)^j3(e,25)},K3=function(e){return j3(e,7)^j3(e,18)^e>>>3},W3=function(e){return j3(e,17)^j3(e,19)^e>>>10},J3=M3.rotl32,G3=M3.sum32,$3=M3.sum32_5,X3=F3,Y3=L3.BlockHash,Q3=[1518500249,1859775393,2400959708,3395469782];function Z3(){if(!(this instanceof Z3))return new Z3;Y3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}M3.inherits(Z3,Y3);var e4=Z3;Z3.blockSize=512,Z3.outSize=160,Z3.hmacStrength=80,Z3.padLength=64,Z3.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=J3(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],u=this.h[4];for(n=0;n<r.length;n++){var c=~~(n/20),l=$3(J3(i,5),X3(c,a,o,s),u,r[n],Q3[c]);u=s,s=o,o=J3(a,30),a=i,i=l}this.h[0]=G3(this.h[0],i),this.h[1]=G3(this.h[1],a),this.h[2]=G3(this.h[2],o),this.h[3]=G3(this.h[3],s),this.h[4]=G3(this.h[4],u)},Z3.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"big"):M3.split32(this.h,"big")};var t4=M3.sum32,r4=M3.sum32_4,n4=M3.sum32_5,i4=z3,a4=H3,o4=q3,s4=V3,u4=K3,c4=W3,l4=L3.BlockHash,f4=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function d4(){if(!(this instanceof d4))return new d4;l4.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=f4,this.W=new Array(64)}M3.inherits(d4,l4);var h4=d4;function p4(){if(!(this instanceof p4))return new p4;h4.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}d4.blockSize=512,d4.outSize=256,d4.hmacStrength=192,d4.padLength=64,d4.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=r4(c4(r[n-2]),r[n-7],u4(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],f=this.h[7];for(e3(this.k.length===r.length),n=0;n<r.length;n++){var d=n4(f,s4(u),i4(u,c,l),this.k[n],r[n]),h=t4(o4(i),a4(i,a,o));f=l,l=c,c=u,u=t4(s,d),s=o,o=a,a=i,i=t4(d,h)}this.h[0]=t4(this.h[0],i),this.h[1]=t4(this.h[1],a),this.h[2]=t4(this.h[2],o),this.h[3]=t4(this.h[3],s),this.h[4]=t4(this.h[4],u),this.h[5]=t4(this.h[5],c),this.h[6]=t4(this.h[6],l),this.h[7]=t4(this.h[7],f)},d4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"big"):M3.split32(this.h,"big")},M3.inherits(p4,h4);var v4=p4;p4.blockSize=512,p4.outSize=224,p4.hmacStrength=192,p4.padLength=64,p4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h.slice(0,7),"big"):M3.split32(this.h.slice(0,7),"big")};var b4=M3.rotr64_hi,g4=M3.rotr64_lo,m4=M3.shr64_hi,y4=M3.shr64_lo,w4=M3.sum64,_4=M3.sum64_hi,x4=M3.sum64_lo,k4=M3.sum64_4_hi,S4=M3.sum64_4_lo,E4=M3.sum64_5_hi,I4=M3.sum64_5_lo,A4=L3.BlockHash,P4=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function T4(){if(!(this instanceof T4))return new T4;A4.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=P4,this.W=new Array(160)}M3.inherits(T4,A4);var O4=T4;function C4(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function M4(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function R4(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function N4(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function L4(e,t){var r=b4(e,t,28)^b4(t,e,2)^b4(t,e,7);return r<0&&(r+=4294967296),r}function j4(e,t){var r=g4(e,t,28)^g4(t,e,2)^g4(t,e,7);return r<0&&(r+=4294967296),r}function D4(e,t){var r=b4(e,t,14)^b4(e,t,18)^b4(t,e,9);return r<0&&(r+=4294967296),r}function B4(e,t){var r=g4(e,t,14)^g4(e,t,18)^g4(t,e,9);return r<0&&(r+=4294967296),r}function U4(e,t){var r=b4(e,t,1)^b4(e,t,8)^m4(e,t,7);return r<0&&(r+=4294967296),r}function F4(e,t){var r=g4(e,t,1)^g4(e,t,8)^y4(e,t,7);return r<0&&(r+=4294967296),r}function z4(e,t){var r=b4(e,t,19)^b4(t,e,29)^m4(e,t,6);return r<0&&(r+=4294967296),r}function H4(e,t){var r=g4(e,t,19)^g4(t,e,29)^y4(e,t,6);return r<0&&(r+=4294967296),r}function q4(){if(!(this instanceof q4))return new q4;O4.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}T4.blockSize=1024,T4.outSize=512,T4.hmacStrength=192,T4.padLength=128,T4.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=z4(r[n-4],r[n-3]),a=H4(r[n-4],r[n-3]),o=r[n-14],s=r[n-13],u=U4(r[n-30],r[n-29]),c=F4(r[n-30],r[n-29]),l=r[n-32],f=r[n-31];r[n]=k4(i,a,o,s,u,c,l,f),r[n+1]=S4(i,a,o,s,u,c,l,f)}},T4.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],o=this.h[3],s=this.h[4],u=this.h[5],c=this.h[6],l=this.h[7],f=this.h[8],d=this.h[9],h=this.h[10],p=this.h[11],v=this.h[12],b=this.h[13],g=this.h[14],m=this.h[15];e3(this.k.length===r.length);for(var y=0;y<r.length;y+=2){var w=g,_=m,x=D4(f,d),k=B4(f,d),S=C4(f,0,h,0,v),E=M4(0,d,0,p,0,b),I=this.k[y],A=this.k[y+1],P=r[y],T=r[y+1],O=E4(w,_,x,k,S,E,I,A,P,T),C=I4(w,_,x,k,S,E,I,A,P,T);w=L4(n,i),_=j4(n,i),x=R4(n,0,a,0,s),k=N4(0,i,0,o,0,u);var M=_4(w,_,x,k),R=x4(w,_,x,k);g=v,m=b,v=h,b=p,h=f,p=d,f=_4(c,l,O,C),d=x4(l,l,O,C),c=s,l=u,s=a,u=o,a=n,o=i,n=_4(O,C,M,R),i=x4(O,C,M,R)}w4(this.h,0,n,i),w4(this.h,2,a,o),w4(this.h,4,s,u),w4(this.h,6,c,l),w4(this.h,8,f,d),w4(this.h,10,h,p),w4(this.h,12,v,b),w4(this.h,14,g,m)},T4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"big"):M3.split32(this.h,"big")},M3.inherits(q4,O4);var V4=q4;q4.blockSize=1024,q4.outSize=384,q4.hmacStrength=192,q4.padLength=128,q4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h.slice(0,12),"big"):M3.split32(this.h.slice(0,12),"big")};var K4={sha1:e4,sha224:v4,sha256:h4,sha384:V4,sha512:O4},W4=M3.rotl32,J4=M3.sum32,G4=M3.sum32_3,$4=M3.sum32_4,X4=L3.BlockHash;function Y4(){if(!(this instanceof Y4))return new Y4;X4.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}M3.inherits(Y4,X4);var Q4=Y4;function Z4(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function e6(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function t6(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Y4.blockSize=512,Y4.outSize=160,Y4.hmacStrength=192,Y4.padLength=64,Y4.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],a=this.h[3],o=this.h[4],s=r,u=n,c=i,l=a,f=o,d=0;d<80;d++){var h=J4(W4($4(r,Z4(d,n,i,a),e[r6[d]+t],e6(d)),i6[d]),o);r=o,o=a,a=W4(i,10),i=n,n=h,h=J4(W4($4(s,Z4(79-d,u,c,l),e[n6[d]+t],t6(d)),a6[d]),f),s=f,f=l,l=W4(c,10),c=u,u=h}h=G4(this.h[1],i,l),this.h[1]=G4(this.h[2],a,f),this.h[2]=G4(this.h[3],o,s),this.h[3]=G4(this.h[4],r,u),this.h[4]=G4(this.h[0],n,c),this.h[0]=h},Y4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"little"):M3.split32(this.h,"little")};var r6=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],n6=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],i6=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a6=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],o6={ripemd160:Q4};function s6(e,t,r){if(!(this instanceof s6))return new s6(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(M3.toArray(t,r))}var u6=s6;s6.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),e3(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},s6.prototype.update=function(e,t){return this.inner.update(e,t),this},s6.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};var c6=FU((function(e,t){var r=t;r.utils=M3,r.common=L3,r.sha=K4,r.ripemd=o6,r.hmac=u6,r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160})),l6={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}},f6=FU((function(e,t){var r,n=t,i=i3.assert;function a(e){"short"===e.type?this.curve=new A3.short(e):"edwards"===e.type?this.curve=new A3.edwards(e):this.curve=new A3.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=a,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:c6.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:c6.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:c6.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:c6.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:c6.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c6.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c6.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=l6}catch(e){r=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:c6.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function d6(e){if(!(this instanceof d6))return new d6(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n3.toArray(e.entropy,e.entropyEnc||"hex"),r=n3.toArray(e.nonce,e.nonceEnc||"hex"),n=n3.toArray(e.pers,e.persEnc||"hex");e3(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var h6=d6;d6.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},d6.prototype._hmac=function(){return new c6.hmac(this.hash,this.K)},d6.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},d6.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=n3.toArray(e,t),r=n3.toArray(r,n),e3(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},d6.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=n3.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var a=i.slice(0,e);return this._update(r),this._reseed++,n3.encode(a,t)};var p6=i3.assert;function v6(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var b6=v6;v6.fromPublic=function(e,t,r){return t instanceof v6?t:new v6(e,{pub:t,pubEnc:r})},v6.fromPrivate=function(e,t,r){return t instanceof v6?t:new v6(e,{priv:t,privEnc:r})},v6.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},v6.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},v6.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},v6.prototype._importPrivate=function(e,t){this.priv=new z2(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},v6.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?p6(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||p6(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},v6.prototype.derive=function(e){return e.validate()||p6(e.validate(),"public point not validated"),e.mul(this.priv).getX()},v6.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},v6.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},v6.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var g6=i3.assert;function m6(e,t){if(e instanceof m6)return e;this._importDER(e,t)||(g6(e.r&&e.s,"Signature without r or s"),this.r=new z2(e.r,16),this.s=new z2(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var y6=m6;function w6(){this.place=0}function _6(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,a=0,o=t.place;a<n;a++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function x6(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function k6(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}m6.prototype._importDER=function(e,t){e=i3.toArray(e,t);var r=new w6;if(48!==e[r.place++])return!1;var n=_6(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=_6(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var o=_6(e,r);if(!1===o)return!1;if(e.length!==o+r.place)return!1;var s=e.slice(r.place,o+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new z2(a),this.s=new z2(s),this.recoveryParam=null,!0},m6.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=x6(t),r=x6(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];k6(n,t.length),(n=n.concat(t)).push(2),k6(n,r.length);var i=n.concat(r),a=[48];return k6(a,i.length),a=a.concat(i),i3.encode(a,e)};var S6=i3.assert;function E6(e){if(!(this instanceof E6))return new E6(e);"string"==typeof e&&(S6(Object.prototype.hasOwnProperty.call(f6,e),"Unknown curve "+e),e=f6[e]),e instanceof f6.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var I6=E6;E6.prototype.keyPair=function(e){return new b6(this,e)},E6.prototype.keyFromPrivate=function(e,t){return b6.fromPrivate(this,e,t)},E6.prototype.keyFromPublic=function(e,t){return b6.fromPublic(this,e,t)},E6.prototype.genKeyPair=function(e){e||(e={});for(var t=new h6({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a3(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new z2(2));;){var i=new z2(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},E6.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},E6.prototype.sign=function(e,t,n,i){"object"==r(n)&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new z2(e,16));for(var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),s=e.toArray("be",a),u=new h6({hash:this.hash,entropy:o,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new z2(1)),l=0;;l++){var f=i.k?i.k(l):new z2(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var v=f.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return i.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new y6({r:p,s:v,recoveryParam:b})}}}}}},E6.prototype.verify=function(e,t,r,n){e=this._truncateToN(new z2(e,16)),r=this.keyFromPublic(r,n);var i=(t=new y6(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,s=a.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)},E6.prototype.recoverPubKey=function(e,t,r,n){S6((3&r)===r,"The recovery param is more than two bits"),t=new y6(t,n);var i=this.n,a=new z2(e),o=t.r,s=t.s,u=1&r,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),u):this.curve.pointFromX(o,u);var l=t.r.invm(i),f=i.sub(a).mul(l).umod(i),d=s.mul(l).umod(i);return this.g.mulAdd(f,o,d)},E6.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new y6(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var A6=i3.assert,P6=i3.parseBytes,T6=i3.cachedProperty;function O6(e,t){this.eddsa=e,this._secret=P6(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=P6(t.pub)}O6.fromPublic=function(e,t){return t instanceof O6?t:new O6(e,{pub:t})},O6.fromSecret=function(e,t){return t instanceof O6?t:new O6(e,{secret:t})},O6.prototype.secret=function(){return this._secret},T6(O6,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),T6(O6,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),T6(O6,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),T6(O6,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),T6(O6,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),T6(O6,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),O6.prototype.sign=function(e){return A6(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},O6.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},O6.prototype.getSecret=function(e){return A6(this._secret,"KeyPair is public only"),i3.encode(this.secret(),e)},O6.prototype.getPublic=function(e){return i3.encode(this.pubBytes(),e)};var C6=O6,M6=i3.assert,R6=i3.cachedProperty,N6=i3.parseBytes;function L6(e,t){this.eddsa=e,"object"!=r(t)&&(t=N6(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),M6(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof z2&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}R6(L6,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),R6(L6,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),R6(L6,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),R6(L6,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),L6.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},L6.prototype.toHex=function(){return i3.encode(this.toBytes(),"hex").toUpperCase()};var j6=L6,D6=i3.assert,B6=i3.parseBytes;function U6(e){if(D6("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof U6))return new U6(e);e=f6[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=c6.sha512}var F6=U6;U6.prototype.sign=function(e,t){e=B6(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),s=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:a})},U6.prototype.verify=function(e,t,r){e=B6(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},U6.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return i3.intFromLE(e.digest()).umod(this.curve.n)},U6.prototype.keyFromPublic=function(e){return C6.fromPublic(this,e)},U6.prototype.keyFromSecret=function(e){return C6.fromSecret(this,e)},U6.prototype.makeSignature=function(e){return e instanceof j6?e:new j6(this,e)},U6.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},U6.prototype.decodePoint=function(e){var t=(e=i3.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=i3.intFromLE(r);return this.curve.pointFromY(i,n)},U6.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},U6.prototype.decodeInt=function(e){return i3.intFromLE(e)},U6.prototype.isPoint=function(e){return e instanceof this.pointClass};var z6=zU(Z2),H6=FU((function(e,t){var r=t;r.version=z6.version,r.utils=i3,r.rand=a3,r.curve=A3,r.curves=f6,r.ec=I6,r.eddsa=F6})),q6=sF.alloc(1,1),V6=sF.alloc(1,0),K6=new H6.ec("secp256k1"),W6=sF.alloc(32,0),J6=sF.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),G6=sF.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),$6=K6.curve.n,X6=$6.shrn(1),Y6=K6.curve.g;function Q6(e){return qF(e)&&32===e.length}function Z6(e){return!!Q6(e)&&e.compare(J6)<0}function e5(e){if(!qF(e))return!1;if(e.length<33)return!1;var t=e[0],r=e.slice(1,33);if(0===r.compare(W6))return!1;if(r.compare(G6)>=0)return!1;if((2===t||3===t)&&33===e.length){try{o5(e)}catch(e){return!1}return!0}var n=e.slice(33);return 0!==n.compare(W6)&&!(n.compare(G6)>=0)&&4===t&&65===e.length}function t5(e){return 4!==e[0]}function r5(e){return!!Q6(e)&&e.compare(W6)>0&&e.compare(J6)<0}function n5(e,t){return void 0===e&&void 0!==t?t5(t):void 0===e||e}function i5(e){return new z2(e)}function a5(e){return e.toArrayLike(sF,"be",32)}function o5(e){return K6.curve.decodePoint(e)}function s5(e,t){return sF.from(e._encode(t))}function u5(e,t,r){if(!Q6(e))throw new TypeError("Expected Hash");if(!r5(t))throw new TypeError("Expected Private");if(void 0!==r&&!Q6(r))throw new TypeError("Expected Extra Data (32 bytes)");var n,i,a=i5(t),o=i5(e);(function(e,t,r,n,i){var a=sF.alloc(32,0),o=sF.alloc(32,1);a=L2("sha256",a).update(o).update(V6).update(t).update(e).update(i||"").digest(),o=L2("sha256",a).update(o).digest(),a=L2("sha256",a).update(o).update(q6).update(t).update(e).update(i||"").digest(),o=L2("sha256",a).update(o).digest();for(var s=o=L2("sha256",a).update(o).digest();!n(s)||!r(s);)a=L2("sha256",a).update(o).update(V6).digest(),o=L2("sha256",a).update(o).digest(),s=o=L2("sha256",a).update(o).digest()})(e,t,(function(e){var t=i5(e),r=Y6.mul(t);return!r.isInfinity()&&(0!==(n=r.x.umod($6)).isZero()&&0!==(i=t.invm($6).mul(o.add(a.mul(n))).umod($6)).isZero())}),r5,r),i.cmp(X6)>0&&(i=$6.sub(i));var s=sF.allocUnsafe(64);return a5(n).copy(s,0),a5(i).copy(s,32),s}var c5={isPoint:e5,isPointCompressed:function(e){return!!e5(e)&&t5(e)},isPrivate:r5,pointAdd:function(e,t,r){if(!e5(e))throw new TypeError("Expected Point");if(!e5(t))throw new TypeError("Expected Point");var n=o5(e),i=o5(t),a=n.add(i);return a.isInfinity()?null:s5(a,n5(r,e))},pointAddScalar:function(e,t,r){if(!e5(e))throw new TypeError("Expected Point");if(!Z6(t))throw new TypeError("Expected Tweak");var n=n5(r,e),i=o5(e);if(0===t.compare(W6))return s5(i,n);var a=i5(t),o=Y6.mul(a),s=i.add(o);return s.isInfinity()?null:s5(s,n)},pointCompress:function(e,t){if(!e5(e))throw new TypeError("Expected Point");var r=o5(e);if(r.isInfinity())throw new TypeError("Expected Point");return s5(r,n5(t,e))},pointFromScalar:function(e,t){if(!r5(e))throw new TypeError("Expected Private");var r=i5(e),n=Y6.mul(r);return n.isInfinity()?null:s5(n,n5(t))},pointMultiply:function(e,t,r){if(!e5(e))throw new TypeError("Expected Point");if(!Z6(t))throw new TypeError("Expected Tweak");var n=n5(r,e),i=o5(e),a=i5(t),o=i.mul(a);return o.isInfinity()?null:s5(o,n)},privateAdd:function(e,t){if(!r5(e))throw new TypeError("Expected Private");if(!Z6(t))throw new TypeError("Expected Tweak");var r=i5(e),n=i5(t),i=a5(r.add(n).umod($6));return r5(i)?i:null},privateSub:function(e,t){if(!r5(e))throw new TypeError("Expected Private");if(!Z6(t))throw new TypeError("Expected Tweak");var r=i5(e),n=i5(t),i=a5(r.sub(n).umod($6));return r5(i)?i:null},sign:function(e,t){return u5(e,t)},signWithEntropy:function(e,t,r){return u5(e,t,r)},verify:function(e,t,r,n){if(!Q6(e))throw new TypeError("Expected Hash");if(!e5(t))throw new TypeError("Expected Point");if(!function(e){var t=e.slice(0,32),r=e.slice(32,64);return qF(e)&&64===e.length&&t.compare(J6)<0&&r.compare(J6)<0}(r))throw new TypeError("Expected Signature");var i=o5(t),a=i5(r.slice(0,32)),o=i5(r.slice(32,64));if(n&&o.cmp(X6)>0)return!1;if(a.gtn(0)<=0)return!1;if(o.gtn(0)<=0)return!1;var s=i5(e),u=o.invm($6),c=s.mul(u).umod($6),l=a.mul(u).umod($6),f=Y6.mulAdd(c,i,l);return!f.isInfinity()&&f.x.umod($6).eq(a)}},l5={Array:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return null!=e&&e.constructor===Array})),Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return null==e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==r(e)},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var f5 in l5.Null=l5.Nil,l5)l5[f5].toJSON=function(e){return e}.bind(null,f5);var d5=l5;function h5(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function p5(e){return d5.Nil(e)?"":h5(e.constructor)}function v5(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function b5(e){return d5.Function(e)?e.toJSON?e.toJSON():h5(e):d5.Array(e)?"Array":e&&d5.Object(e)?"Object":void 0!==e?e:""}function g5(e,t,r){var n=function(e){return d5.Function(e)?"":d5.String(e)?JSON.stringify(e):e&&d5.Object(e)?"":e}(t);return"Expected "+b5(e)+", got"+(""!==r?" "+r:"")+(""!==n?" "+n:"")}function m5(e,t,r){r=r||p5(t),this.message=g5(e,t,r),v5(this,m5),this.__type=e,this.__value=t,this.__valueTypeName=r}function y5(e,t,r,n,i){e?(i=i||p5(n),this.message=function(e,t,r,n,i){var a='" of type ';return"key"===t&&(a='" with key type '),g5('property "'+b5(r)+a+b5(e),n,i)}(e,r,t,n,i)):this.message='Unexpected property "'+t+'"',v5(this,m5),this.__label=r,this.__property=t,this.__type=e,this.__value=n,this.__valueTypeName=i}m5.prototype=Object.create(Error.prototype),m5.prototype.constructor=m5,y5.prototype=Object.create(Error.prototype),y5.prototype.constructor=m5;var w5=m5,_5=y5,x5=function(e,t){return new m5(e,{},t)},k5=function(e,t,r){return e instanceof y5?(t=t+"."+e.__property,e=new y5(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof m5&&(e=new y5(e.__type,t,r,e.__value,e.__valueTypeName)),v5(e),e},S5=b5,E5=p5;function I5(e){return qF(e)}function A5(e){return"string"==typeof e&&/^([0-9a-f]{2})+$/i.test(e)}function P5(e,t){var r=e.toJSON();function n(n){if(!e(n))return!1;if(n.length===t)return!0;throw x5(r+"(Length: "+t+")",r+"(Length: "+n.length+")")}return n.toJSON=function(){return r},n}var T5=P5.bind(null,d5.Array),O5=P5.bind(null,I5),C5=P5.bind(null,A5),M5=P5.bind(null,d5.String),R5=Math.pow(2,53)-1,N5={ArrayN:T5,Buffer:I5,BufferN:O5,Finite:function(e){return"number"==typeof e&&isFinite(e)},Hex:A5,HexN:C5,Int8:function(e){return e<<24>>24===e},Int16:function(e){return e<<16>>16===e},Int32:function(e){return(0|e)===e},Int53:function(e){return"number"==typeof e&&e>=-R5&&e<=R5&&Math.floor(e)===e},Range:function(e,t,r){function n(n,i){return r(n,i)&&n>e&&n<t}return r=r||d5.Number,n.toJSON=function(){return"".concat(r.toJSON()," between [").concat(e,", ").concat(t,"]")},n},StringN:M5,UInt8:function(e){return(255&e)===e},UInt16:function(e){return(65535&e)===e},UInt32:function(e){return e>>>0===e},UInt53:function(e){return"number"==typeof e&&e>=0&&e<=R5&&Math.floor(e)===e}};for(var L5 in N5)N5[L5].toJSON=function(e){return e}.bind(null,L5);var j5=N5,D5=S5,B5=w5,U5=_5,F5=k5,z5=E5,H5={arrayOf:function(e,t){function r(r,n){return!!d5.Array(r)&&!d5.Nil(r)&&!(void 0!==t.minLength&&r.length<t.minLength)&&!(void 0!==t.maxLength&&r.length>t.maxLength)&&(void 0===t.length||r.length===t.length)&&r.every((function(t,r){try{return V5(e,t,n)}catch(e){throw F5(e,r)}}))}return e=q5(e),t=t||{},r.toJSON=function(){var r="["+D5(e)+"]";return void 0!==t.length?r+="{"+t.length+"}":void 0===t.minLength&&void 0===t.maxLength||(r+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),r},r},maybe:function e(t){function r(r,n){return d5.Nil(r)||t(r,n,e)}return t=q5(t),r.toJSON=function(){return"?"+D5(t)},r},map:function(e,t){function r(r,n){if(!d5.Object(r))return!1;if(d5.Nil(r))return!1;for(var i in r){try{t&&V5(t,i,n)}catch(e){throw F5(e,i,"key")}try{var a=r[i];V5(e,a,n)}catch(e){throw F5(e,i)}}return!0}return e=q5(e),t&&(t=q5(t)),r.toJSON=t?function(){return"{"+D5(t)+": "+D5(e)+"}"}:function(){return"{"+D5(e)+"}"},r},object:function(e){var t={};for(var r in e)t[r]=q5(e[r]);function n(e,r){if(!d5.Object(e))return!1;if(d5.Nil(e))return!1;var n;try{for(n in t)V5(t[n],e[n],r)}catch(e){throw F5(e,n)}if(r)for(n in e)if(!t[n])throw new U5(void 0,n);return!0}return n.toJSON=function(){return D5(t)},n},anyOf:function(){var e=[].slice.call(arguments).map(q5);function t(t,r){return e.some((function(e){try{return V5(e,t,r)}catch(e){return!1}}))}return t.toJSON=function(){return e.map(D5).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(q5);function t(t,r){return e.every((function(e){try{return V5(e,t,r)}catch(e){return!1}}))}return t.toJSON=function(){return e.map(D5).join(" & ")},t},quacksLike:function(e){function t(t){return e===z5(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(q5);function t(t,r){return!d5.Nil(t)&&!d5.Nil(t.length)&&(!r||t.length===e.length)&&e.every((function(e,n){try{return V5(e,t[n],r)}catch(e){throw F5(e,n)}}))}return t.toJSON=function(){return"("+e.map(D5).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function q5(e){if(d5.String(e))return"?"===e[0]?H5.maybe(e.slice(1)):d5[e]||H5.quacksLike(e);if(e&&d5.Object(e)){if(d5.Array(e)){if(1!==e.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return H5.arrayOf(e[0])}return H5.object(e)}return d5.Function(e)?e:H5.value(e)}function V5(e,t,r,n){if(d5.Function(e)){if(e(t,r))return!0;throw new B5(n||e,t)}return V5(q5(e),t,r)}for(var K5 in H5.oneOf=H5.anyOf,d5)V5[K5]=d5[K5];for(K5 in H5)V5[K5]=H5[K5];for(K5 in j5)V5[K5]=j5[K5];V5.compile=q5,V5.TfTypeError=B5,V5.TfPropertyTypeError=U5;var W5=V5;function J5(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function G5(e,t,r){var n=new sF(r?34:33);return n.writeUInt8(e,0),t.copy(n,1),r&&(n[33]=1),n}var $5=function(e,t){return J5(F2.decode(e),t)},X5=function(e,t,r){return"number"==typeof e?F2.encode(G5(e,t,r)):F2.encode(G5(e.version,e.privateKey,e.compressed))},Y5=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=W5.BufferN(32),n=W5.compile({wif:W5.UInt8,bip32:{public:W5.UInt32,private:W5.UInt32}}),i={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},o=2147483648,u=Math.pow(2,31)-1;function c(e){return W5.String(e)&&null!==e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function l(e){return W5.UInt32(e)&&e<=u}var f=function(){function e(t,r,i,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;a(this,e),this.__D=t,this.__Q=r,this.chainCode=i,this.network=o,this.__DEPTH=s,this.__INDEX=u,this.__PARENT_FINGERPRINT=c,W5(n,o),this.lowR=!1}return s(e,[{key:"depth",get:function(){return this.__DEPTH}},{key:"index",get:function(){return this.__INDEX}},{key:"parentFingerprint",get:function(){return this.__PARENT_FINGERPRINT}},{key:"publicKey",get:function(){return void 0===this.__Q&&(this.__Q=c5.pointFromScalar(this.__D,!0)),this.__Q}},{key:"privateKey",get:function(){return this.__D}},{key:"identifier",get:function(){return j2.hash160(this.publicKey)}},{key:"fingerprint",get:function(){return this.identifier.slice(0,4)}},{key:"compressed",get:function(){return!0}},{key:"isNeutered",value:function(){return void 0===this.__D}},{key:"neutered",value:function(){return p(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}},{key:"toBase58",value:function(){var e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,r=sF.allocUnsafe(78);return r.writeUInt32BE(t,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),F2.encode(r)}},{key:"toWIF",value:function(){if(!this.privateKey)throw new TypeError("Missing private key");return X5(this.network.wif,this.privateKey,!0)}},{key:"derive",value:function(e){W5(W5.UInt32,e);var t=e>=o,r=sF.allocUnsafe(37);if(t){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");r[0]=0,this.privateKey.copy(r,1),r.writeUInt32BE(e,33)}else this.publicKey.copy(r,0),r.writeUInt32BE(e,33);var n,i=j2.hmacSHA512(this.chainCode,r),a=i.slice(0,32),s=i.slice(32);if(!c5.isPrivate(a))return this.derive(e+1);if(this.isNeutered()){var u=c5.pointAddScalar(this.publicKey,a,!0);if(null===u)return this.derive(e+1);n=p(u,s,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{var c=c5.privateAdd(this.privateKey,a);if(null==c)return this.derive(e+1);n=h(c,s,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return n}},{key:"deriveHardened",value:function(e){return W5(l,e),this.derive(e+o)}},{key:"derivePath",value:function(e){W5(c,e);var t=e.split("/");if("m"===t[0]){if(this.parentFingerprint)throw new TypeError("Expected master, got child");t=t.slice(1)}return t.reduce((function(e,t){var r;return"'"===t.slice(-1)?(r=parseInt(t.slice(0,-1),10),e.deriveHardened(r)):(r=parseInt(t,10),e.derive(r))}),this)}},{key:"sign",value:function(e,t){if(!this.privateKey)throw new Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return c5.sign(e,this.privateKey);for(var r=c5.sign(e,this.privateKey),n=sF.alloc(32,0),i=0;r[0]>127;)i++,n.writeUIntLE(i,0,6),r=c5.signWithEntropy(e,this.privateKey,n);return r}},{key:"verify",value:function(e,t){return c5.verify(e,this.publicKey,t)}}]),e}();function d(e,t,r){return h(e,t,r)}function h(e,t,n,a,o,s){if(W5({privateKey:r,chainCode:r},{privateKey:e,chainCode:t}),n=n||i,!c5.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return new f(e,void 0,t,n,a,o,s)}function p(e,t,n,a,o,s){if(W5({publicKey:W5.BufferN(33),chainCode:r},{publicKey:e,chainCode:t}),n=n||i,!c5.isPoint(e))throw new TypeError("Point is not on the curve");return new f(void 0,e,t,n,a,o,s)}t.fromBase58=function(e,t){var r=F2.decode(e);if(78!==r.length)throw new TypeError("Invalid buffer length");t=t||i;var n=r.readUInt32BE(0);if(n!==t.bip32.private&&n!==t.bip32.public)throw new TypeError("Invalid network version");var a=r[4],o=r.readUInt32BE(5);if(0===a&&0!==o)throw new TypeError("Invalid parent fingerprint");var s=r.readUInt32BE(9);if(0===a&&0!==s)throw new TypeError("Invalid index");var u,c=r.slice(13,45);if(n===t.bip32.private){if(0!==r.readUInt8(45))throw new TypeError("Invalid private key");u=h(r.slice(46,78),c,t,a,s,o)}else u=p(r.slice(45,78),c,t,a,s,o);return u},t.fromPrivateKey=d,t.fromPublicKey=function(e,t,r){return p(e,t,r)},t.fromSeed=function(e,t){if(W5(W5.Buffer,e),e.length<16)throw new TypeError("Seed should be at least 128 bits");if(e.length>64)throw new TypeError("Seed should be at most 512 bits");t=t||i;var r=j2.hmacSHA512(sF.from("Bitcoin seed","utf8"),e);return d(r.slice(0,32),r.slice(32),t)}}));UU(Y5),Y5.fromBase58,Y5.fromPrivateKey,Y5.fromPublicKey,Y5.fromSeed;var Q5=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fromSeed=Y5.fromSeed,t.fromBase58=Y5.fromBase58,t.fromPublicKey=Y5.fromPublicKey,t.fromPrivateKey=Y5.fromPrivateKey}));UU(Q5),Q5.fromSeed,Q5.fromBase58,Q5.fromPublicKey,Q5.fromPrivateKey;var Z5=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bitcoin={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},t.regtest={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},t.testnet={messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}}));UU(Z5),Z5.bitcoin,Z5.regtest,Z5.testnet;var e8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e,t,r){t=t||4,r=void 0===r||r;var n=e.length;if(0===n)return 0;if(n>t)throw new TypeError("Script number overflow");if(r&&0==(127&e[n-1])&&(n<=1||0==(128&e[n-2])))throw new Error("Non-minimally encoded script number");if(5===n){var i=e.readUInt32LE(0),a=e.readUInt8(4);return 128&a?-(4294967296*(-129&a)+i):4294967296*a+i}for(var o=0,s=0;s<n;++s)o|=e[s]<<8*s;return 128&e[n-1]?-(o&~(128<<8*(n-1))):o},t.encode=function(e){for(var t,r=Math.abs(e),n=(t=r)>2147483647?5:t>8388607?4:t>32767?3:t>127?2:t>0?1:0,i=sF.allocUnsafe(n),a=e<0,o=0;o<n;++o)i.writeUInt8(255&r,o),r>>=8;return 128&i[n-1]?i.writeUInt8(a?128:0,n-1):a&&(i[n-1]|=128),i}}));UU(e8),e8.decode,e8.encode;var t8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Math.pow(2,31)-1;function n(e){return W5.String(e)&&!!e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}t.UInt31=function(e){return W5.UInt32(e)&&e<=r},t.BIP32Path=n,n.toJSON=function(){return"BIP32 derivation path"},t.Signer=function(e){return(W5.Buffer(e.publicKey)||"function"==typeof e.getPublicKey)&&"function"==typeof e.sign},t.Satoshi=function(e){return W5.UInt53(e)&&e<=21e14},t.ECPoint=W5.quacksLike("Point"),t.Network=W5.compile({messagePrefix:W5.oneOf(W5.Buffer,W5.String),bip32:{public:W5.UInt32,private:W5.UInt32},pubKeyHash:W5.UInt8,scriptHash:W5.UInt8,wif:W5.UInt8}),t.Buffer256bit=W5.BufferN(32),t.Hash160bit=W5.BufferN(20),t.Hash256bit=W5.BufferN(32),t.Number=W5.Number,t.Array=W5.Array,t.Boolean=W5.Boolean,t.String=W5.String,t.Buffer=W5.Buffer,t.Hex=W5.Hex,t.maybe=W5.maybe,t.tuple=W5.tuple,t.UInt8=W5.UInt8,t.UInt32=W5.UInt32,t.Function=W5.Function,t.BufferN=W5.BufferN,t.Null=W5.Null,t.oneOf=W5.oneOf}));UU(t8),t8.UInt31,t8.BIP32Path,t8.Signer,t8.Satoshi,t8.ECPoint,t8.Network,t8.Buffer256bit,t8.Hash160bit,t8.Hash256bit,t8.Number,t8.Array,t8.Boolean,t8.String,t8.Buffer,t8.Hex,t8.maybe,t8.tuple,t8.UInt8,t8.UInt32,t8.Function,t8.BufferN,t8.Null,t8.oneOf;var r8=cQ.Buffer,n8=function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},i8=function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},a8=function(e,t){var r=e.length,n=t.length;if(0===r)throw new Error("R length is zero");if(0===n)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(n>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(n>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var i=r8.allocUnsafe(6+r+n);return i[0]=48,i[1]=i.length-2,i[2]=2,i[3]=e.length,e.copy(i,4),i[4+r]=2,i[5+r]=t.length,t.copy(i,6+r),i},o8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=sF.alloc(1,0);function n(e){for(var t=0;0===e[t];)++t;return t===e.length?r:128&(e=e.slice(t))[0]?sF.concat([r,e],1+e.length):e}function i(e){0===e[0]&&(e=e.slice(1));var t=sF.alloc(32,0),r=Math.max(0,32-e.length);return e.copy(t,r),t}t.decode=function(e){var t=e.readUInt8(e.length-1),r=-129&t;if(r<=0||r>=4)throw new Error("Invalid hashType "+t);var n=i8(e.slice(0,-1)),a=i(n.r),o=i(n.s);return{signature:sF.concat([a,o],64),hashType:t}},t.encode=function(e,t){W5({signature:t8.BufferN(64),hashType:t8.UInt8},{signature:e,hashType:t});var r=-129&t;if(r<=0||r>=4)throw new Error("Invalid hashType "+t);var i=sF.allocUnsafe(1);i.writeUInt8(t,0);var a=n(e.slice(0,32)),o=n(e.slice(32,64));return sF.concat([a8(a,o),i])}}));UU(o8),o8.decode,o8.encode;var s8=zU(Object.freeze({__proto__:null,OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255,default:{OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}}));function u8(e){return e<s8.OP_PUSHDATA1?1:e<=255?2:e<=65535?3:5}var c8={encodingLength:u8,encode:function(e,t,r){var n=u8(t);return 1===n?e.writeUInt8(t,r):2===n?(e.writeUInt8(s8.OP_PUSHDATA1,r),e.writeUInt8(t,r+1)):3===n?(e.writeUInt8(s8.OP_PUSHDATA2,r),e.writeUInt16LE(t,r+1)):(e.writeUInt8(s8.OP_PUSHDATA4,r),e.writeUInt32LE(t,r+1)),n},decode:function(e,t){var r,n,i=e.readUInt8(t);if(i<s8.OP_PUSHDATA1)r=i,n=1;else if(i===s8.OP_PUSHDATA1){if(t+2>e.length)return null;r=e.readUInt8(t+1),n=2}else if(i===s8.OP_PUSHDATA2){if(t+3>e.length)return null;r=e.readUInt16LE(t+1),n=3}else{if(t+5>e.length)return null;if(i!==s8.OP_PUSHDATA4)throw new Error("Unexpected opcode");r=e.readUInt32LE(t+1),n=5}return{opcode:i,number:r,size:n}}},l8={};for(var f8 in s8)l8[s8[f8]]=f8;var d8=l8,h8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OPS=s8;var r=t.OPS.OP_RESERVED;function n(e){return t8.Buffer(e)||function(e){return t8.Number(e)&&(e===t.OPS.OP_0||e>=t.OPS.OP_1&&e<=t.OPS.OP_16||e===t.OPS.OP_1NEGATE)}(e)}function i(e){return t8.Array(e)&&e.every(n)}function a(e){return 0===e.length?t.OPS.OP_0:1===e.length?e[0]>=1&&e[0]<=16?r+e[0]:129===e[0]?t.OPS.OP_1NEGATE:void 0:void 0}function o(e){return qF(e)}function s(e){return qF(e)}function u(e){if(o(e))return e;W5(t8.Array,e);var t=e.reduce((function(e,t){return s(t)?1===t.length&&void 0!==a(t)?e+1:e+c8.encodingLength(t.length)+t.length:e+1}),0),r=sF.allocUnsafe(t),n=0;if(e.forEach((function(e){if(s(e)){var t=a(e);if(void 0!==t)return r.writeUInt8(t,n),void(n+=1);n+=c8.encode(r,e.length,n),e.copy(r,n),n+=e.length}else r.writeUInt8(e,n),n+=1})),n!==r.length)throw new Error("Could not decode chunks");return r}function c(e){if(r=e,t8.Array(r))return e;var r;W5(t8.Buffer,e);for(var n=[],i=0;i<e.length;){var o=e[i];if(o>t.OPS.OP_0&&o<=t.OPS.OP_PUSHDATA4){var s=c8.decode(e,i);if(null===s)return null;if((i+=s.size)+s.number>e.length)return null;var u=e.slice(i,i+s.number);i+=s.number;var c=a(u);void 0!==c?n.push(c):n.push(u)}else n.push(o),i+=1}return n}function l(e){var t=-129&e;return t>0&&t<4}t.isPushOnly=i,t.compile=u,t.decompile=c,t.toASM=function(e){return o(e)&&(e=c(e)),e.map((function(e){if(s(e)){var t=a(e);if(void 0===t)return e.toString("hex");e=t}return d8[e]})).join(" ")},t.fromASM=function(e){return W5(t8.String,e),u(e.split(" ").map((function(e){return void 0!==t.OPS[e]?t.OPS[e]:(W5(t8.Hex,e),sF.from(e,"hex"))})))},t.toStack=function(e){return e=c(e),W5(i,e),e.map((function(e){return s(e)?e:e===t.OPS.OP_0?sF.allocUnsafe(0):e8.encode(e-r)}))},t.isCanonicalPubKey=function(e){return c5.isPoint(e)},t.isDefinedHashType=l,t.isCanonicalScriptSignature=function(e){return!!qF(e)&&!!l(e[e.length-1])&&n8(e.slice(0,-1))},t.number=e8,t.signature=o8}));UU(h8),h8.OPS,h8.isPushOnly,h8.compile,h8.decompile,h8.toASM,h8.fromASM,h8.toStack,h8.isCanonicalPubKey,h8.isDefinedHashType,h8.isCanonicalScriptSignature,h8.number,h8.signature;var p8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.prop=function(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=r.call(this);return this[t]=e,e},set:function(e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})}})},t.value=function(e){var t;return function(){return void 0!==t||(t=e()),t}}}));UU(p8),p8.prop,p8.value;var v8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2data=function(e,t){if(!e.data&&!e.output)throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),data:W5.maybe(W5.arrayOf(W5.Buffer))},e);var n={name:"embed",network:e.network||Z5.bitcoin};if(p8.prop(n,"output",(function(){if(e.data)return h8.compile([r.OP_RETURN].concat(e.data))})),p8.prop(n,"data",(function(){if(e.output)return h8.decompile(e.output).slice(1)})),t.validate&&e.output){var i=h8.decompile(e.output);if(i[0]!==r.OP_RETURN)throw new TypeError("Output is invalid");if(!i.slice(1).every(W5.Buffer))throw new TypeError("Output is invalid");if(e.data&&!function(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}(e.data,n.data))throw new TypeError("Data mismatch")}return Object.assign(n,e)}}));UU(v8),v8.p2data;var b8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS,n=r.OP_RESERVED;function i(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}t.p2ms=function(e,t){if(!(e.input||e.output||e.pubkeys&&void 0!==e.m||e.signatures))throw new TypeError("Not enough data");function a(e){return h8.isCanonicalScriptSignature(e)||void 0!==(t.allowIncomplete&&e===r.OP_0)}t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),m:W5.maybe(W5.Number),n:W5.maybe(W5.Number),output:W5.maybe(W5.Buffer),pubkeys:W5.maybe(W5.arrayOf(c5.isPoint)),signatures:W5.maybe(W5.arrayOf(a)),input:W5.maybe(W5.Buffer)},e);var o={network:e.network||Z5.bitcoin},s=[],u=!1;function c(e){u||(u=!0,s=h8.decompile(e),o.m=s[0]-n,o.n=s[s.length-2]-n,o.pubkeys=s.slice(1,-2))}if(p8.prop(o,"output",(function(){if(e.m&&o.n&&e.pubkeys)return h8.compile([].concat(n+e.m,e.pubkeys,n+o.n,r.OP_CHECKMULTISIG))})),p8.prop(o,"m",(function(){if(o.output)return c(o.output),o.m})),p8.prop(o,"n",(function(){if(o.pubkeys)return o.pubkeys.length})),p8.prop(o,"pubkeys",(function(){if(e.output)return c(e.output),o.pubkeys})),p8.prop(o,"signatures",(function(){if(e.input)return h8.decompile(e.input).slice(1)})),p8.prop(o,"input",(function(){if(e.signatures)return h8.compile([r.OP_0].concat(e.signatures))})),p8.prop(o,"witness",(function(){if(o.input)return[]})),p8.prop(o,"name",(function(){if(o.m&&o.n)return"p2ms(".concat(o.m," of ").concat(o.n,")")})),t.validate){if(e.output){if(c(e.output),!W5.Number(s[0]))throw new TypeError("Output is invalid");if(!W5.Number(s[s.length-2]))throw new TypeError("Output is invalid");if(s[s.length-1]!==r.OP_CHECKMULTISIG)throw new TypeError("Output is invalid");if(o.m<=0||o.n>16||o.m>o.n||o.n!==s.length-3)throw new TypeError("Output is invalid");if(!o.pubkeys.every((function(e){return c5.isPoint(e)})))throw new TypeError("Output is invalid");if(void 0!==e.m&&e.m!==o.m)throw new TypeError("m mismatch");if(void 0!==e.n&&e.n!==o.n)throw new TypeError("n mismatch");if(e.pubkeys&&!i(e.pubkeys,o.pubkeys))throw new TypeError("Pubkeys mismatch")}if(e.pubkeys){if(void 0!==e.n&&e.n!==e.pubkeys.length)throw new TypeError("Pubkey count mismatch");if(o.n=e.pubkeys.length,o.n<o.m)throw new TypeError("Pubkey count cannot be less than m")}if(e.signatures){if(e.signatures.length<o.m)throw new TypeError("Not enough signatures provided");if(e.signatures.length>o.m)throw new TypeError("Too many signatures provided")}if(e.input){if(e.input[0]!==r.OP_0)throw new TypeError("Input is invalid");if(0===o.signatures.length||!o.signatures.every(a))throw new TypeError("Input has invalid signature(s)");if(e.signatures&&!i(e.signatures,o.signatures))throw new TypeError("Signature mismatch");if(void 0!==e.m&&e.m!==e.signatures.length)throw new TypeError("Signature count mismatch")}}return Object.assign(o,e)}}));UU(b8),b8.p2ms;var g8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2pk=function(e,t){if(!(e.input||e.output||e.pubkey||e.input||e.signature))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),pubkey:W5.maybe(c5.isPoint),signature:W5.maybe(h8.isCanonicalScriptSignature),input:W5.maybe(W5.Buffer)},e);var n=p8.value((function(){return h8.decompile(e.input)})),i={name:"p2pk",network:e.network||Z5.bitcoin};if(p8.prop(i,"output",(function(){if(e.pubkey)return h8.compile([e.pubkey,r.OP_CHECKSIG])})),p8.prop(i,"pubkey",(function(){if(e.output)return e.output.slice(1,-1)})),p8.prop(i,"signature",(function(){if(e.input)return n()[0]})),p8.prop(i,"input",(function(){if(e.signature)return h8.compile([e.signature])})),p8.prop(i,"witness",(function(){if(i.input)return[]})),t.validate){if(e.output){if(e.output[e.output.length-1]!==r.OP_CHECKSIG)throw new TypeError("Output is invalid");if(!c5.isPoint(i.pubkey))throw new TypeError("Output pubkey is invalid");if(e.pubkey&&!e.pubkey.equals(i.pubkey))throw new TypeError("Pubkey mismatch")}if(e.signature&&e.input&&!e.input.equals(i.input))throw new TypeError("Signature mismatch");if(e.input){if(1!==n().length)throw new TypeError("Input is invalid");if(!h8.isCanonicalScriptSignature(i.signature))throw new TypeError("Input has invalid signature")}}return Object.assign(i,e)}}));UU(g8),g8.p2pk;var m8=FU((function(e,t){function r(e){try{return I2("rmd160").update(e).digest()}catch(t){return I2("ripemd160").update(e).digest()}}function n(e){return I2("sha256").update(e).digest()}Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=r,t.sha1=function(e){return I2("sha1").update(e).digest()},t.sha256=n,t.hash160=function(e){return r(n(e))},t.hash256=function(e){return n(n(e))}}));UU(m8),m8.ripemd160,m8.sha1,m8.sha256,m8.hash160,m8.hash256;var y8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2pkh=function(e,t){if(!(e.address||e.hash||e.output||e.pubkey||e.input))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(20)),output:W5.maybe(W5.BufferN(25)),pubkey:W5.maybe(c5.isPoint),signature:W5.maybe(h8.isCanonicalScriptSignature),input:W5.maybe(W5.Buffer)},e);var n=p8.value((function(){var t=F2.decode(e.address);return{version:t.readUInt8(0),hash:t.slice(1)}})),i=p8.value((function(){return h8.decompile(e.input)})),a=e.network||Z5.bitcoin,o={name:"p2pkh",network:a};if(p8.prop(o,"address",(function(){if(o.hash){var e=sF.allocUnsafe(21);return e.writeUInt8(a.pubKeyHash,0),o.hash.copy(e,1),F2.encode(e)}})),p8.prop(o,"hash",(function(){return e.output?e.output.slice(3,23):e.address?n().hash:e.pubkey||o.pubkey?m8.hash160(e.pubkey||o.pubkey):void 0})),p8.prop(o,"output",(function(){if(o.hash)return h8.compile([r.OP_DUP,r.OP_HASH160,o.hash,r.OP_EQUALVERIFY,r.OP_CHECKSIG])})),p8.prop(o,"pubkey",(function(){if(e.input)return i()[1]})),p8.prop(o,"signature",(function(){if(e.input)return i()[0]})),p8.prop(o,"input",(function(){if(e.pubkey&&e.signature)return h8.compile([e.signature,e.pubkey])})),p8.prop(o,"witness",(function(){if(o.input)return[]})),t.validate){var s=sF.from([]);if(e.address){if(n().version!==a.pubKeyHash)throw new TypeError("Invalid version or Network mismatch");if(20!==n().hash.length)throw new TypeError("Invalid address");s=n().hash}if(e.hash){if(s.length>0&&!s.equals(e.hash))throw new TypeError("Hash mismatch");s=e.hash}if(e.output){if(25!==e.output.length||e.output[0]!==r.OP_DUP||e.output[1]!==r.OP_HASH160||20!==e.output[2]||e.output[23]!==r.OP_EQUALVERIFY||e.output[24]!==r.OP_CHECKSIG)throw new TypeError("Output is invalid");var u=e.output.slice(3,23);if(s.length>0&&!s.equals(u))throw new TypeError("Hash mismatch");s=u}if(e.pubkey){var c=m8.hash160(e.pubkey);if(s.length>0&&!s.equals(c))throw new TypeError("Hash mismatch");s=c}if(e.input){var l=i();if(2!==l.length)throw new TypeError("Input is invalid");if(!h8.isCanonicalScriptSignature(l[0]))throw new TypeError("Input has invalid signature");if(!c5.isPoint(l[1]))throw new TypeError("Input has invalid pubkey");if(e.signature&&!e.signature.equals(l[0]))throw new TypeError("Signature mismatch");if(e.pubkey&&!e.pubkey.equals(l[1]))throw new TypeError("Pubkey mismatch");var f=m8.hash160(l[1]);if(s.length>0&&!s.equals(f))throw new TypeError("Hash mismatch")}}return Object.assign(o,e)}}));UU(y8),y8.p2pkh;var w8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2sh=function(e,t){if(!(e.address||e.hash||e.output||e.redeem||e.input))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(20)),output:W5.maybe(W5.BufferN(23)),redeem:W5.maybe({network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),input:W5.maybe(W5.Buffer),witness:W5.maybe(W5.arrayOf(W5.Buffer))}),input:W5.maybe(W5.Buffer),witness:W5.maybe(W5.arrayOf(W5.Buffer))},e);var n=e.network;n||(n=e.redeem&&e.redeem.network||Z5.bitcoin);var i={network:n},a=p8.value((function(){var t=F2.decode(e.address);return{version:t.readUInt8(0),hash:t.slice(1)}})),o=p8.value((function(){return h8.decompile(e.input)})),s=p8.value((function(){var t=o();return{network:n,output:t[t.length-1],input:h8.compile(t.slice(0,-1)),witness:e.witness||[]}}));if(p8.prop(i,"address",(function(){if(i.hash){var e=sF.allocUnsafe(21);return e.writeUInt8(i.network.scriptHash,0),i.hash.copy(e,1),F2.encode(e)}})),p8.prop(i,"hash",(function(){return e.output?e.output.slice(2,22):e.address?a().hash:i.redeem&&i.redeem.output?m8.hash160(i.redeem.output):void 0})),p8.prop(i,"output",(function(){if(i.hash)return h8.compile([r.OP_HASH160,i.hash,r.OP_EQUAL])})),p8.prop(i,"redeem",(function(){if(e.input)return s()})),p8.prop(i,"input",(function(){if(e.redeem&&e.redeem.input&&e.redeem.output)return h8.compile([].concat(h8.decompile(e.redeem.input),e.redeem.output))})),p8.prop(i,"witness",(function(){return i.redeem&&i.redeem.witness?i.redeem.witness:i.input?[]:void 0})),p8.prop(i,"name",(function(){var e=["p2sh"];return void 0!==i.redeem&&e.push(i.redeem.name),e.join("-")})),t.validate){var u=sF.from([]);if(e.address){if(a().version!==n.scriptHash)throw new TypeError("Invalid version or Network mismatch");if(20!==a().hash.length)throw new TypeError("Invalid address");u=a().hash}if(e.hash){if(u.length>0&&!u.equals(e.hash))throw new TypeError("Hash mismatch");u=e.hash}if(e.output){if(23!==e.output.length||e.output[0]!==r.OP_HASH160||20!==e.output[1]||e.output[22]!==r.OP_EQUAL)throw new TypeError("Output is invalid");var c=e.output.slice(2,22);if(u.length>0&&!u.equals(c))throw new TypeError("Hash mismatch");u=c}var l=function(e){if(e.output){var t=h8.decompile(e.output);if(!t||t.length<1)throw new TypeError("Redeem.output too short");var r=m8.hash160(e.output);if(u.length>0&&!u.equals(r))throw new TypeError("Hash mismatch");u=r}if(e.input){var n=e.input.length>0,i=e.witness&&e.witness.length>0;if(!n&&!i)throw new TypeError("Empty input");if(n&&i)throw new TypeError("Input and witness provided");if(n){var a=h8.decompile(e.input);if(!h8.isPushOnly(a))throw new TypeError("Non push-only scriptSig")}}};if(e.input){var f=o();if(!f||f.length<1)throw new TypeError("Input too short");if(!qF(s().output))throw new TypeError("Input is invalid");l(s())}if(e.redeem){if(e.redeem.network&&e.redeem.network!==n)throw new TypeError("Network mismatch");if(e.input){var d=s();if(e.redeem.output&&!e.redeem.output.equals(d.output))throw new TypeError("Redeem.output mismatch");if(e.redeem.input&&!e.redeem.input.equals(d.input))throw new TypeError("Redeem.input mismatch")}l(e.redeem)}if(e.witness&&e.redeem&&e.redeem.witness&&!function(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}(e.redeem.witness,e.witness))throw new TypeError("Witness and redeem.witness mismatch")}return Object.assign(i,e)}}));UU(w8),w8.p2sh;for(var _8="qpzry9x8gf2tvdw0s3jn54khce6mua7l",x8={},k8=0;k8<_8.length;k8++){var S8=_8.charAt(k8);if(void 0!==x8[S8])throw new TypeError(S8+" is ambiguous");x8[S8]=k8}function E8(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function I8(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=E8(t)^n>>5}for(t=E8(t),r=0;r<e.length;++r){var i=e.charCodeAt(r);t=E8(t)^31&i}return t}function A8(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var i=(e=r).lastIndexOf("1");if(-1===i)return"No separator character for "+e;if(0===i)return"Missing prefix for "+e;var a=e.slice(0,i),o=e.slice(i+1);if(o.length<6)return"Data too short";var s=I8(a);if("string"==typeof s)return s;for(var u=[],c=0;c<o.length;++c){var l=o.charAt(c),f=x8[l];if(void 0===f)return"Unknown character "+l;s=E8(s)^f,c+6>=o.length||u.push(f)}return 1!==s?"Invalid checksum for "+e:{prefix:a,words:u}}function P8(e,t,r,n){for(var i=0,a=0,o=(1<<r)-1,s=[],u=0;u<e.length;++u)for(i=i<<t|e[u],a+=t;a>=r;)a-=r,s.push(i>>a&o);if(n)a>0&&s.push(i<<r-a&o);else{if(a>=t)return"Excess padding";if(i<<r-a&o)return"Non-zero padding"}return s}var T8=function(e){var t=A8.apply(null,arguments);if("object"==r(t))return t;throw new Error(t)},O8=function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var n=I8(e=e.toLowerCase());if("string"==typeof n)throw new Error(n);for(var i=e+"1",a=0;a<t.length;++a){var o=t[a];if(o>>5!=0)throw new Error("Non 5-bit word");n=E8(n)^o,i+=_8.charAt(o)}for(a=0;a<6;++a)n=E8(n);for(n^=1,a=0;a<6;++a)i+=_8.charAt(n>>5*(5-a)&31);return i},C8=function(e){var t=P8(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},M8=function(e){var t=P8(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)},R8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS,n=sF.alloc(0);t.p2wpkh=function(e,t){if(!(e.address||e.hash||e.output||e.pubkey||e.witness))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(20)),input:W5.maybe(W5.BufferN(0)),network:W5.maybe(W5.Object),output:W5.maybe(W5.BufferN(22)),pubkey:W5.maybe(c5.isPoint),signature:W5.maybe(h8.isCanonicalScriptSignature),witness:W5.maybe(W5.arrayOf(W5.Buffer))},e);var i=p8.value((function(){var t=T8(e.address),r=t.words.shift(),n=M8(t.words);return{version:r,prefix:t.prefix,data:sF.from(n)}})),a=e.network||Z5.bitcoin,o={name:"p2wpkh",network:a};if(p8.prop(o,"address",(function(){if(o.hash){var e=C8(o.hash);return e.unshift(0),O8(a.bech32,e)}})),p8.prop(o,"hash",(function(){return e.output?e.output.slice(2,22):e.address?i().data:e.pubkey||o.pubkey?m8.hash160(e.pubkey||o.pubkey):void 0})),p8.prop(o,"output",(function(){if(o.hash)return h8.compile([r.OP_0,o.hash])})),p8.prop(o,"pubkey",(function(){return e.pubkey?e.pubkey:e.witness?e.witness[1]:void 0})),p8.prop(o,"signature",(function(){if(e.witness)return e.witness[0]})),p8.prop(o,"input",(function(){if(o.witness)return n})),p8.prop(o,"witness",(function(){if(e.pubkey&&e.signature)return[e.signature,e.pubkey]})),t.validate){var s=sF.from([]);if(e.address){if(a&&a.bech32!==i().prefix)throw new TypeError("Invalid prefix or Network mismatch");if(0!==i().version)throw new TypeError("Invalid address version");if(20!==i().data.length)throw new TypeError("Invalid address data");s=i().data}if(e.hash){if(s.length>0&&!s.equals(e.hash))throw new TypeError("Hash mismatch");s=e.hash}if(e.output){if(22!==e.output.length||e.output[0]!==r.OP_0||20!==e.output[1])throw new TypeError("Output is invalid");if(s.length>0&&!s.equals(e.output.slice(2)))throw new TypeError("Hash mismatch");s=e.output.slice(2)}if(e.pubkey){var u=m8.hash160(e.pubkey);if(s.length>0&&!s.equals(u))throw new TypeError("Hash mismatch");if(s=u,!c5.isPoint(e.pubkey)||33!==e.pubkey.length)throw new TypeError("Invalid pubkey for p2wpkh")}if(e.witness){if(2!==e.witness.length)throw new TypeError("Witness is invalid");if(!h8.isCanonicalScriptSignature(e.witness[0]))throw new TypeError("Witness has invalid signature");if(!c5.isPoint(e.witness[1])||33!==e.witness[1].length)throw new TypeError("Witness has invalid pubkey");if(e.signature&&!e.signature.equals(e.witness[0]))throw new TypeError("Signature mismatch");if(e.pubkey&&!e.pubkey.equals(e.witness[1]))throw new TypeError("Pubkey mismatch");var c=m8.hash160(e.witness[1]);if(s.length>0&&!s.equals(c))throw new TypeError("Hash mismatch")}}return Object.assign(o,e)}}));UU(R8),R8.p2wpkh;var N8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS,n=sF.alloc(0);function i(e){return!(!qF(e)||65!==e.length||4!==e[0]||!c5.isPoint(e))}t.p2wsh=function(e,t){if(!(e.address||e.hash||e.output||e.redeem||e.witness))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(32)),output:W5.maybe(W5.BufferN(34)),redeem:W5.maybe({input:W5.maybe(W5.Buffer),network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),witness:W5.maybe(W5.arrayOf(W5.Buffer))}),input:W5.maybe(W5.BufferN(0)),witness:W5.maybe(W5.arrayOf(W5.Buffer))},e);var a=p8.value((function(){var t=T8(e.address),r=t.words.shift(),n=M8(t.words);return{version:r,prefix:t.prefix,data:sF.from(n)}})),o=p8.value((function(){return h8.decompile(e.redeem.input)})),s=e.network;s||(s=e.redeem&&e.redeem.network||Z5.bitcoin);var u={network:s};if(p8.prop(u,"address",(function(){if(u.hash){var e=C8(u.hash);return e.unshift(0),O8(s.bech32,e)}})),p8.prop(u,"hash",(function(){return e.output?e.output.slice(2):e.address?a().data:u.redeem&&u.redeem.output?m8.sha256(u.redeem.output):void 0})),p8.prop(u,"output",(function(){if(u.hash)return h8.compile([r.OP_0,u.hash])})),p8.prop(u,"redeem",(function(){if(e.witness)return{output:e.witness[e.witness.length-1],input:n,witness:e.witness.slice(0,-1)}})),p8.prop(u,"input",(function(){if(u.witness)return n})),p8.prop(u,"witness",(function(){if(e.redeem&&e.redeem.input&&e.redeem.input.length>0&&e.redeem.output&&e.redeem.output.length>0){var t=h8.toStack(o());return u.redeem=Object.assign({witness:t},e.redeem),u.redeem.input=n,[].concat(t,e.redeem.output)}if(e.redeem&&e.redeem.output&&e.redeem.witness)return[].concat(e.redeem.witness,e.redeem.output)})),p8.prop(u,"name",(function(){var e=["p2wsh"];return void 0!==u.redeem&&e.push(u.redeem.name),e.join("-")})),t.validate){var c=sF.from([]);if(e.address){if(a().prefix!==s.bech32)throw new TypeError("Invalid prefix or Network mismatch");if(0!==a().version)throw new TypeError("Invalid address version");if(32!==a().data.length)throw new TypeError("Invalid address data");c=a().data}if(e.hash){if(c.length>0&&!c.equals(e.hash))throw new TypeError("Hash mismatch");c=e.hash}if(e.output){if(34!==e.output.length||e.output[0]!==r.OP_0||32!==e.output[1])throw new TypeError("Output is invalid");var l=e.output.slice(2);if(c.length>0&&!c.equals(l))throw new TypeError("Hash mismatch");c=l}if(e.redeem){if(e.redeem.network&&e.redeem.network!==s)throw new TypeError("Network mismatch");if(e.redeem.input&&e.redeem.input.length>0&&e.redeem.witness&&e.redeem.witness.length>0)throw new TypeError("Ambiguous witness source");if(e.redeem.output){if(0===h8.decompile(e.redeem.output).length)throw new TypeError("Redeem.output is invalid");var f=m8.sha256(e.redeem.output);if(c.length>0&&!c.equals(f))throw new TypeError("Hash mismatch");c=f}if(e.redeem.input&&!h8.isPushOnly(o()))throw new TypeError("Non push-only scriptSig");if(e.witness&&e.redeem.witness&&!function(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}(e.witness,e.redeem.witness))throw new TypeError("Witness and redeem.witness mismatch");if(e.redeem.input&&o().some(i)||e.redeem.output&&(h8.decompile(e.redeem.output)||[]).some(i))throw new TypeError("redeem.input or redeem.output contains uncompressed pubkey")}if(e.witness&&e.witness.length>0){var d=e.witness[e.witness.length-1];if(e.redeem&&e.redeem.output&&!e.redeem.output.equals(d))throw new TypeError("Witness and redeem.output mismatch");if(e.witness.some(i)||(h8.decompile(d)||[]).some(i))throw new TypeError("Witness contains uncompressed pubkey")}}return Object.assign(u,e)}}));UU(N8),N8.p2wsh;var L8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.embed=v8.p2data,t.p2ms=b8.p2ms,t.p2pk=g8.p2pk,t.p2pkh=y8.p2pkh,t.p2sh=w8.p2sh,t.p2wpkh=R8.p2wpkh,t.p2wsh=N8.p2wsh}));UU(L8),L8.embed,L8.p2ms,L8.p2pk,L8.p2pkh,L8.p2sh,L8.p2wpkh,L8.p2wsh;var j8=FU((function(e,t){function r(e){var t=F2.decode(e);if(t.length<21)throw new TypeError(e+" is too short");if(t.length>21)throw new TypeError(e+" is too long");return{version:t.readUInt8(0),hash:t.slice(1)}}function n(e){var t=T8(e),r=M8(t.words.slice(1));return{version:t.words[0],prefix:t.prefix,data:sF.from(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase58Check=r,t.fromBech32=n,t.toBase58Check=function(e,t){W5(t8.tuple(t8.Hash160bit,t8.UInt8),arguments);var r=sF.allocUnsafe(21);return r.writeUInt8(t,0),e.copy(r,1),F2.encode(r)},t.toBech32=function(e,t,r){var n=C8(e);return n.unshift(t),O8(r,n)},t.fromOutputScript=function(e,t){t=t||Z5.bitcoin;try{return L8.p2pkh({output:e,network:t}).address}catch(e){}try{return L8.p2sh({output:e,network:t}).address}catch(e){}try{return L8.p2wpkh({output:e,network:t}).address}catch(e){}try{return L8.p2wsh({output:e,network:t}).address}catch(e){}throw new Error(h8.toASM(e)+" has no matching Address")},t.toOutputScript=function(e,t){var i,a;t=t||Z5.bitcoin;try{i=r(e)}catch(e){}if(i){if(i.version===t.pubKeyHash)return L8.p2pkh({hash:i.hash}).output;if(i.version===t.scriptHash)return L8.p2sh({hash:i.hash}).output}else{try{a=n(e)}catch(e){}if(a){if(a.prefix!==t.bech32)throw new Error(e+" has an invalid prefix");if(0===a.version){if(20===a.data.length)return L8.p2wpkh({hash:a.data}).output;if(32===a.data.length)return L8.p2wsh({hash:a.data}).output}}}throw new Error(e+" has no matching Script")}}));UU(j8),j8.fromBase58Check,j8.fromBech32,j8.toBase58Check,j8.toBech32,j8.fromOutputScript,j8.toOutputScript;var D8=FU((function(e){var t=65536,r=cQ.Buffer,n=BU.crypto||BU.msCrypto;n&&n.getRandomValues?e.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var a=r.allocUnsafe(e);if(e>0)if(e>t)for(var o=0;o<e;o+=t)n.getRandomValues(a.slice(o,o+t));else n.getRandomValues(a);return"function"==typeof i?nz((function(){i(null,a)})):a}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}})),B8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=W5.maybe(W5.compile({compressed:t8.maybe(t8.Boolean),network:t8.maybe(t8.Network)})),n=function(){function e(t,r,n){a(this,e),this.__D=t,this.__Q=r,this.lowR=!1,void 0===n&&(n={}),this.compressed=void 0===n.compressed||n.compressed,this.network=n.network||Z5.bitcoin,void 0!==r&&(this.__Q=c5.pointCompress(r,this.compressed))}return s(e,[{key:"privateKey",get:function(){return this.__D}},{key:"publicKey",get:function(){return this.__Q||(this.__Q=c5.pointFromScalar(this.__D,this.compressed)),this.__Q}},{key:"toWIF",value:function(){if(!this.__D)throw new Error("Missing private key");return X5(this.network.wif,this.__D,this.compressed)}},{key:"sign",value:function(e,t){if(!this.__D)throw new Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return c5.sign(e,this.__D);for(var r=c5.sign(e,this.__D),n=sF.alloc(32,0),i=0;r[0]>127;)i++,n.writeUIntLE(i,0,6),r=c5.signWithEntropy(e,this.__D,n);return r}},{key:"verify",value:function(e,t){return c5.verify(e,this.publicKey,t)}}]),e}();function i(e,t){if(W5(t8.Buffer256bit,e),!c5.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return W5(r,t),new n(e,void 0,t)}t.fromPrivateKey=i,t.fromPublicKey=function(e,t){return W5(c5.isPoint,e),W5(r,t),new n(void 0,e,t)},t.fromWIF=function(e,t){var r=$5(e),n=r.version;if(t8.Array(t)){if(!(t=t.filter((function(e){return n===e.wif})).pop()))throw new Error("Unknown network version")}else if(t=t||Z5.bitcoin,n!==t.wif)throw new Error("Invalid network version");return i(r.privateKey,{compressed:r.compressed,network:t})},t.makeRandom=function(e){W5(r,e),void 0===e&&(e={});var t,n=e.rng||D8;do{t=n(32),W5(t8.Buffer256bit,t)}while(!c5.isPrivate(t));return i(t,e)}}));UU(B8),B8.fromPrivateKey,B8.fromPublicKey,B8.fromWIF,B8.makeRandom;var U8=cQ.Buffer;function F8(e){if(e<0||e>9007199254740991||e%1!=0)throw new RangeError("value out of range")}function z8(e){return F8(e),e<253?1:e<=65535?3:e<=4294967295?5:9}var H8={encode:function e(t,r,n){if(F8(t),r||(r=U8.allocUnsafe(z8(t))),!U8.isBuffer(r))throw new TypeError("buffer must be a Buffer instance");return n||(n=0),t<253?(r.writeUInt8(t,n),e.bytes=1):t<=65535?(r.writeUInt8(253,n),r.writeUInt16LE(t,n+1),e.bytes=3):t<=4294967295?(r.writeUInt8(254,n),r.writeUInt32LE(t,n+1),e.bytes=5):(r.writeUInt8(255,n),r.writeUInt32LE(t>>>0,n+1),r.writeUInt32LE(t/4294967296|0,n+5),e.bytes=9),r},decode:function e(t,r){if(!U8.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");r||(r=0);var n=t.readUInt8(r);if(n<253)return e.bytes=1,n;if(253===n)return e.bytes=3,t.readUInt16LE(r+1);if(254===n)return e.bytes=5,t.readUInt32LE(r+1);e.bytes=9;var i=t.readUInt32LE(r+1),a=4294967296*t.readUInt32LE(r+5)+i;return F8(a),a},encodingLength:z8},q8=FU((function(e,t){function r(e,t){if("number"!=typeof e)throw new Error("cannot write a non-number as a number");if(e<0)throw new Error("specified a negative value for writing an unsigned value");if(e>t)throw new Error("RangeError: value out of range");if(Math.floor(e)!==e)throw new Error("value has a fractional component")}function n(e,t){var n=e.readUInt32LE(t),i=e.readUInt32LE(t+4);return r((i*=4294967296)+n,9007199254740991),i+n}function i(e,t,n){return r(t,9007199254740991),e.writeInt32LE(-1&t,n),e.writeUInt32LE(Math.floor(t/4294967296),n+4),n+8}Object.defineProperty(t,"__esModule",{value:!0}),t.readUInt64LE=n,t.writeUInt64LE=i,t.reverseBuffer=function(e){if(e.length<1)return e;for(var t=e.length-1,r=0,n=0;n<e.length/2;n++)r=e[n],e[n]=e[t],e[t]=r,t--;return e},t.cloneBuffer=function(e){var t=sF.allocUnsafe(e.length);return e.copy(t),t},t.BufferWriter=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this.buffer=t,this.offset=r,W5(t8.tuple(t8.Buffer,t8.UInt32),[t,r])}return s(e,[{key:"writeUInt8",value:function(e){this.offset=this.buffer.writeUInt8(e,this.offset)}},{key:"writeInt32",value:function(e){this.offset=this.buffer.writeInt32LE(e,this.offset)}},{key:"writeUInt32",value:function(e){this.offset=this.buffer.writeUInt32LE(e,this.offset)}},{key:"writeUInt64",value:function(e){this.offset=i(this.buffer,e,this.offset)}},{key:"writeVarInt",value:function(e){H8.encode(e,this.buffer,this.offset),this.offset+=H8.encode.bytes}},{key:"writeSlice",value:function(e){if(this.buffer.length<this.offset+e.length)throw new Error("Cannot write slice out of bounds");this.offset+=e.copy(this.buffer,this.offset)}},{key:"writeVarSlice",value:function(e){this.writeVarInt(e.length),this.writeSlice(e)}},{key:"writeVector",value:function(e){var t=this;this.writeVarInt(e.length),e.forEach((function(e){return t.writeVarSlice(e)}))}}]),e}(),t.BufferReader=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this.buffer=t,this.offset=r,W5(t8.tuple(t8.Buffer,t8.UInt32),[t,r])}return s(e,[{key:"readUInt8",value:function(){var e=this.buffer.readUInt8(this.offset);return this.offset++,e}},{key:"readInt32",value:function(){var e=this.buffer.readInt32LE(this.offset);return this.offset+=4,e}},{key:"readUInt32",value:function(){var e=this.buffer.readUInt32LE(this.offset);return this.offset+=4,e}},{key:"readUInt64",value:function(){var e=n(this.buffer,this.offset);return this.offset+=8,e}},{key:"readVarInt",value:function(){var e=H8.decode(this.buffer,this.offset);return this.offset+=H8.decode.bytes,e}},{key:"readSlice",value:function(e){if(this.buffer.length<this.offset+e)throw new Error("Cannot read slice out of bounds");var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}},{key:"readVarSlice",value:function(){return this.readSlice(this.readVarInt())}},{key:"readVector",value:function(){for(var e=this.readVarInt(),t=[],r=0;r<e;r++)t.push(this.readVarSlice());return t}}]),e}()}));UU(q8),q8.readUInt64LE,q8.writeUInt64LE,q8.reverseBuffer,q8.cloneBuffer,q8.BufferWriter,q8.BufferReader;var V8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=e.length;return H8.encodingLength(t)+t}var i=sF.allocUnsafe(0),o=[],u=sF.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),c=sF.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),l=sF.from("ffffffffffffffff","hex"),f={script:i,valueBuffer:l},d=function(){function e(){a(this,e),this.version=1,this.locktime=0,this.ins=[],this.outs=[]}return s(e,[{key:"isCoinbase",value:function(){return 1===this.ins.length&&e.isCoinbaseHash(this.ins[0].hash)}},{key:"addInput",value:function(t,r,n,a){return W5(t8.tuple(t8.Hash256bit,t8.UInt32,t8.maybe(t8.UInt32),t8.maybe(t8.Buffer)),arguments),t8.Null(n)&&(n=e.DEFAULT_SEQUENCE),this.ins.push({hash:t,index:r,script:a||i,sequence:n,witness:o})-1}},{key:"addOutput",value:function(e,t){return W5(t8.tuple(t8.Buffer,t8.Satoshi),arguments),this.outs.push({script:e,value:t})-1}},{key:"hasWitnesses",value:function(){return this.ins.some((function(e){return 0!==e.witness.length}))}},{key:"weight",value:function(){return 3*this.byteLength(!1)+this.byteLength(!0)}},{key:"virtualSize",value:function(){return Math.ceil(this.weight()/4)}},{key:"byteLength",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e&&this.hasWitnesses();return(t?10:8)+H8.encodingLength(this.ins.length)+H8.encodingLength(this.outs.length)+this.ins.reduce((function(e,t){return e+40+n(t.script)}),0)+this.outs.reduce((function(e,t){return e+8+n(t.script)}),0)+(t?this.ins.reduce((function(e,t){return e+function(e){var t=e.length;return H8.encodingLength(t)+e.reduce((function(e,t){return e+n(t)}),0)}(t.witness)}),0):0)}},{key:"clone",value:function(){var t=new e;return t.version=this.version,t.locktime=this.locktime,t.ins=this.ins.map((function(e){return{hash:e.hash,index:e.index,script:e.script,sequence:e.sequence,witness:e.witness}})),t.outs=this.outs.map((function(e){return{script:e.script,value:e.value}})),t}},{key:"hashForSignature",value:function(t,n,a){if(W5(t8.tuple(t8.UInt32,t8.Buffer,t8.Number),arguments),t>=this.ins.length)return c;var o=h8.compile(h8.decompile(n).filter((function(e){return e!==r.OPS.OP_CODESEPARATOR}))),s=this.clone();if((31&a)===e.SIGHASH_NONE)s.outs=[],s.ins.forEach((function(e,r){r!==t&&(e.sequence=0)}));else if((31&a)===e.SIGHASH_SINGLE){if(t>=this.outs.length)return c;s.outs.length=t+1;for(var u=0;u<t;u++)s.outs[u]=f;s.ins.forEach((function(e,r){r!==t&&(e.sequence=0)}))}a&e.SIGHASH_ANYONECANPAY?(s.ins=[s.ins[t]],s.ins[0].script=o):(s.ins.forEach((function(e){e.script=i})),s.ins[t].script=o);var l=sF.allocUnsafe(s.byteLength(!1)+4);return l.writeInt32LE(a,l.length-4),s.__toBuffer(l,0,!1),m8.hash256(l)}},{key:"hashForWitnessV0",value:function(t,r,i,a){W5(t8.tuple(t8.UInt32,t8.Buffer,t8.Satoshi,t8.UInt32),arguments);var o,s=sF.from([]),c=u,l=u,f=u;if(a&e.SIGHASH_ANYONECANPAY||(s=sF.allocUnsafe(36*this.ins.length),o=new q8.BufferWriter(s,0),this.ins.forEach((function(e){o.writeSlice(e.hash),o.writeUInt32(e.index)})),l=m8.hash256(s)),a&e.SIGHASH_ANYONECANPAY||(31&a)===e.SIGHASH_SINGLE||(31&a)===e.SIGHASH_NONE||(s=sF.allocUnsafe(4*this.ins.length),o=new q8.BufferWriter(s,0),this.ins.forEach((function(e){o.writeUInt32(e.sequence)})),f=m8.hash256(s)),(31&a)!==e.SIGHASH_SINGLE&&(31&a)!==e.SIGHASH_NONE){var d=this.outs.reduce((function(e,t){return e+8+n(t.script)}),0);s=sF.allocUnsafe(d),o=new q8.BufferWriter(s,0),this.outs.forEach((function(e){o.writeUInt64(e.value),o.writeVarSlice(e.script)})),c=m8.hash256(s)}else if((31&a)===e.SIGHASH_SINGLE&&t<this.outs.length){var h=this.outs[t];s=sF.allocUnsafe(8+n(h.script)),(o=new q8.BufferWriter(s,0)).writeUInt64(h.value),o.writeVarSlice(h.script),c=m8.hash256(s)}s=sF.allocUnsafe(156+n(r)),o=new q8.BufferWriter(s,0);var p=this.ins[t];return o.writeUInt32(this.version),o.writeSlice(l),o.writeSlice(f),o.writeSlice(p.hash),o.writeUInt32(p.index),o.writeVarSlice(r),o.writeUInt64(i),o.writeUInt32(p.sequence),o.writeSlice(c),o.writeUInt32(this.locktime),o.writeUInt32(a),m8.hash256(s)}},{key:"getHash",value:function(e){return e&&this.isCoinbase()?sF.alloc(32,0):m8.hash256(this.__toBuffer(void 0,void 0,e))}},{key:"getId",value:function(){return q8.reverseBuffer(this.getHash(!1)).toString("hex")}},{key:"toBuffer",value:function(e,t){return this.__toBuffer(e,t,!0)}},{key:"toHex",value:function(){return this.toBuffer(void 0,void 0).toString("hex")}},{key:"setInputScript",value:function(e,t){W5(t8.tuple(t8.Number,t8.Buffer),arguments),this.ins[e].script=t}},{key:"setWitness",value:function(e,t){W5(t8.tuple(t8.Number,[t8.Buffer]),arguments),this.ins[e].witness=t}},{key:"__toBuffer",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t||(t=sF.allocUnsafe(this.byteLength(n)));var i=new q8.BufferWriter(t,r||0);i.writeInt32(this.version);var a=n&&this.hasWitnesses();return a&&(i.writeUInt8(e.ADVANCED_TRANSACTION_MARKER),i.writeUInt8(e.ADVANCED_TRANSACTION_FLAG)),i.writeVarInt(this.ins.length),this.ins.forEach((function(e){i.writeSlice(e.hash),i.writeUInt32(e.index),i.writeVarSlice(e.script),i.writeUInt32(e.sequence)})),i.writeVarInt(this.outs.length),this.outs.forEach((function(e){void 0!==e.value?i.writeUInt64(e.value):i.writeSlice(e.valueBuffer),i.writeVarSlice(e.script)})),a&&this.ins.forEach((function(e){i.writeVector(e.witness)})),i.writeUInt32(this.locktime),void 0!==r?t.slice(r,i.offset):t}}],[{key:"fromBuffer",value:function(t,r){var n=new q8.BufferReader(t),i=new e;i.version=n.readInt32();var a=n.readUInt8(),s=n.readUInt8(),u=!1;a===e.ADVANCED_TRANSACTION_MARKER&&s===e.ADVANCED_TRANSACTION_FLAG?u=!0:n.offset-=2;for(var c=n.readVarInt(),l=0;l<c;++l)i.ins.push({hash:n.readSlice(32),index:n.readUInt32(),script:n.readVarSlice(),sequence:n.readUInt32(),witness:o});for(var f=n.readVarInt(),d=0;d<f;++d)i.outs.push({value:n.readUInt64(),script:n.readVarSlice()});if(u){for(var h=0;h<c;++h)i.ins[h].witness=n.readVector();if(!i.hasWitnesses())throw new Error("Transaction has superfluous witness data")}if(i.locktime=n.readUInt32(),r)return i;if(n.offset!==t.length)throw new Error("Transaction has unexpected data");return i}},{key:"fromHex",value:function(t){return e.fromBuffer(sF.from(t,"hex"),!1)}},{key:"isCoinbaseHash",value:function(e){W5(t8.Hash256bit,e);for(var t=0;t<32;++t)if(0!==e[t])return!1;return!0}}]),e}();d.DEFAULT_SEQUENCE=4294967295,d.SIGHASH_ALL=1,d.SIGHASH_NONE=2,d.SIGHASH_SINGLE=3,d.SIGHASH_ANYONECANPAY=128,d.ADVANCED_TRANSACTION_MARKER=0,d.ADVANCED_TRANSACTION_FLAG=1,t.Transaction=d}));UU(V8),V8.Transaction;var K8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=new TypeError("Cannot compute merkle root for zero transactions"),i=new TypeError("Cannot compute witness commit for non-segwit block"),o=function(){function e(){a(this,e),this.version=1,this.prevHash=void 0,this.merkleRoot=void 0,this.timestamp=0,this.witnessCommit=void 0,this.bits=0,this.nonce=0,this.transactions=void 0}return s(e,[{key:"getWitnessCommit",value:function(){if(!u(this.transactions))return null;var e=this.transactions[0].outs.filter((function(e){return e.script.slice(0,6).equals(sF.from("6a24aa21a9ed","hex"))})).map((function(e){return e.script.slice(6,38)}));if(0===e.length)return null;var t=e[e.length-1];return t instanceof sF&&32===t.length?t:null}},{key:"hasWitnessCommit",value:function(){return this.witnessCommit instanceof sF&&32===this.witnessCommit.length||null!==this.getWitnessCommit()}},{key:"hasWitness",value:function(){return(e=this.transactions)instanceof Array&&e.some((function(e){return"object"==r(e)&&e.ins instanceof Array&&e.ins.some((function(e){return"object"==r(e)&&e.witness instanceof Array&&e.witness.length>0}))}));var e}},{key:"weight",value:function(){return 3*this.byteLength(!1,!1)+this.byteLength(!1,!0)}},{key:"byteLength",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e||!this.transactions?80:80+H8.encodingLength(this.transactions.length)+this.transactions.reduce((function(e,r){return e+r.byteLength(t)}),0)}},{key:"getHash",value:function(){return m8.hash256(this.toBuffer(!0))}},{key:"getId",value:function(){return q8.reverseBuffer(this.getHash()).toString("hex")}},{key:"getUTCDate",value:function(){var e=new Date(0);return e.setUTCSeconds(this.timestamp),e}},{key:"toBuffer",value:function(e){var t=sF.allocUnsafe(this.byteLength(e)),r=new q8.BufferWriter(t);return r.writeInt32(this.version),r.writeSlice(this.prevHash),r.writeSlice(this.merkleRoot),r.writeUInt32(this.timestamp),r.writeUInt32(this.bits),r.writeUInt32(this.nonce),e||!this.transactions||(H8.encode(this.transactions.length,t,r.offset),r.offset+=H8.encode.bytes,this.transactions.forEach((function(e){var n=e.byteLength();e.toBuffer(t,r.offset),r.offset+=n}))),t}},{key:"toHex",value:function(e){return this.toBuffer(e).toString("hex")}},{key:"checkTxRoots",value:function(){var e=this.hasWitnessCommit();return!(!e&&this.hasWitness())&&this.__checkMerkleRoot()&&(!e||this.__checkWitnessCommit())}},{key:"checkProofOfWork",value:function(){var t=q8.reverseBuffer(this.getHash()),r=e.calculateTarget(this.bits);return t.compare(r)<=0}},{key:"__checkMerkleRoot",value:function(){if(!this.transactions)throw n;var t=e.calculateMerkleRoot(this.transactions);return 0===this.merkleRoot.compare(t)}},{key:"__checkWitnessCommit",value:function(){if(!this.transactions)throw n;if(!this.hasWitnessCommit())throw i;var t=e.calculateMerkleRoot(this.transactions,!0);return 0===this.witnessCommit.compare(t)}}],[{key:"fromBuffer",value:function(t){if(t.length<80)throw new Error("Buffer too small (< 80 bytes)");var r=new q8.BufferReader(t),n=new e;if(n.version=r.readInt32(),n.prevHash=r.readSlice(32),n.merkleRoot=r.readSlice(32),n.timestamp=r.readUInt32(),n.bits=r.readUInt32(),n.nonce=r.readUInt32(),80===t.length)return n;var i=function(){var e=V8.Transaction.fromBuffer(r.buffer.slice(r.offset),!0);return r.offset+=e.byteLength(),e},a=r.readVarInt();n.transactions=[];for(var o=0;o<a;++o){var s=i();n.transactions.push(s)}var u=n.getWitnessCommit();return u&&(n.witnessCommit=u),n}},{key:"fromHex",value:function(t){return e.fromBuffer(sF.from(t,"hex"))}},{key:"calculateTarget",value:function(e){var t=((4278190080&e)>>24)-3,r=8388607&e,n=sF.alloc(32,0);return n.writeUIntBE(r,29-t,3),n}},{key:"calculateMerkleRoot",value:function(e,t){if(W5([{getHash:t8.Function}],e),0===e.length)throw n;if(t&&!u(e))throw i;var r=function(e,t){if(!Array.isArray(e))throw TypeError("Expected values Array");if("function"!=typeof t)throw TypeError("Expected digest Function");for(var r=e.length,n=e.concat();r>1;){for(var i=0,a=0;a<r;a+=2,++i){var o=n[a],s=a+1===r?o:n[a+1],u=sF.concat([o,s]);n[i]=t(u)}r=i}return n[0]}(e.map((function(e){return e.getHash(t)})),m8.hash256);return t?m8.hash256(sF.concat([r,e[0].ins[0].witness[0]])):r}}]),e}();function u(e){return e instanceof Array&&e[0]&&e[0].ins&&e[0].ins instanceof Array&&e[0].ins[0]&&e[0].ins[0].witness&&e[0].ins[0].witness instanceof Array&&e[0].ins[0].witness.length>0}t.Block=o}));UU(K8),K8.Block;var W8=FU((function(e,t){var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.GlobalTypes||(t.GlobalTypes={}))[r.UNSIGNED_TX=0]="UNSIGNED_TX",r[r.GLOBAL_XPUB=1]="GLOBAL_XPUB",t.GLOBAL_TYPE_NAMES=["unsignedTx","globalXpub"],(n=t.InputTypes||(t.InputTypes={}))[n.NON_WITNESS_UTXO=0]="NON_WITNESS_UTXO",n[n.WITNESS_UTXO=1]="WITNESS_UTXO",n[n.PARTIAL_SIG=2]="PARTIAL_SIG",n[n.SIGHASH_TYPE=3]="SIGHASH_TYPE",n[n.REDEEM_SCRIPT=4]="REDEEM_SCRIPT",n[n.WITNESS_SCRIPT=5]="WITNESS_SCRIPT",n[n.BIP32_DERIVATION=6]="BIP32_DERIVATION",n[n.FINAL_SCRIPTSIG=7]="FINAL_SCRIPTSIG",n[n.FINAL_SCRIPTWITNESS=8]="FINAL_SCRIPTWITNESS",n[n.POR_COMMITMENT=9]="POR_COMMITMENT",t.INPUT_TYPE_NAMES=["nonWitnessUtxo","witnessUtxo","partialSig","sighashType","redeemScript","witnessScript","bip32Derivation","finalScriptSig","finalScriptWitness","porCommitment"],(i=t.OutputTypes||(t.OutputTypes={}))[i.REDEEM_SCRIPT=0]="REDEEM_SCRIPT",i[i.WITNESS_SCRIPT=1]="WITNESS_SCRIPT",i[i.BIP32_DERIVATION=2]="BIP32_DERIVATION",t.OUTPUT_TYPE_NAMES=["redeemScript","witnessScript","bip32Derivation"]}));UU(W8),W8.GlobalTypes,W8.GLOBAL_TYPE_NAMES,W8.InputTypes,W8.INPUT_TYPE_NAMES,W8.OutputTypes,W8.OUTPUT_TYPE_NAMES;var J8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.GlobalTypes.GLOBAL_XPUB)throw new Error("Decode Error: could not decode globalXpub with key 0x"+e.key.toString("hex"));if(79!==e.key.length||![2,3].includes(e.key[46]))throw new Error("Decode Error: globalXpub has invalid extended pubkey in key 0x"+e.key.toString("hex"));if(e.value.length/4%1!=0)throw new Error("Decode Error: Global GLOBAL_XPUB value length should be multiple of 4");var t,r=e.key.slice(1),n={masterFingerprint:e.value.slice(0,4),extendedPubkey:r,path:"m"},i=T(function(e){return k(Array(e).keys())}(e.value.length/4-1));try{for(i.s();!(t=i.n()).done;){var a=t.value,o=e.value.readUInt32LE(4*a+4),s=!!(2147483648&o),u=2147483647&o;n.path+="/"+u.toString(10)+(s?"'":"")}}catch(e){i.e(e)}finally{i.f()}return n},t.encode=function(e){var t=sF.from([W8.GlobalTypes.GLOBAL_XPUB]),r=sF.concat([t,e.extendedPubkey]),n=e.path.split("/"),i=sF.allocUnsafe(4*n.length);e.masterFingerprint.copy(i,0);var a=4;return n.slice(1).forEach((function(e){var t="'"===e.slice(-1),r=2147483647&parseInt(t?e.slice(0,-1):e,10);t&&(r+=2147483648),i.writeUInt32LE(r,a),a+=4})),{key:r,value:i}},t.expected="{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }",t.check=function(e){var t=e.extendedPubkey,r=e.masterFingerprint,n=e.path;return qF(t)&&78===t.length&&[2,3].indexOf(t[45])>-1&&qF(r)&&4===r.length&&"string"==typeof n&&!!n.match(/^m(\/\d+'?)+$/)},t.canAddToArray=function(e,t,r){var n=t.extendedPubkey.toString("hex");return!r.has(n)&&(r.add(n),0===e.filter((function(e){return e.extendedPubkey.equals(t.extendedPubkey)})).length)}}));UU(J8),J8.decode,J8.encode,J8.expected,J8.check,J8.canAddToArray;var G8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.encode=function(e){return{key:sF.from([W8.GlobalTypes.UNSIGNED_TX]),value:e.toBuffer()}}}));UU(G8),G8.encode;var $8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.FINAL_SCRIPTSIG)throw new Error("Decode Error: could not decode finalScriptSig with key 0x"+e.key.toString("hex"));return e.value},t.encode=function(e){return{key:sF.from([W8.InputTypes.FINAL_SCRIPTSIG]),value:e}},t.expected="Buffer",t.check=function(e){return qF(e)},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.finalScriptSig}}));UU($8),$8.decode,$8.encode,$8.expected,$8.check,$8.canAdd;var X8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.FINAL_SCRIPTWITNESS)throw new Error("Decode Error: could not decode finalScriptWitness with key 0x"+e.key.toString("hex"));return e.value},t.encode=function(e){return{key:sF.from([W8.InputTypes.FINAL_SCRIPTWITNESS]),value:e}},t.expected="Buffer",t.check=function(e){return qF(e)},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.finalScriptWitness}}));UU(X8),X8.decode,X8.encode,X8.expected,X8.check,X8.canAdd;var Y8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.NON_WITNESS_UTXO)throw new Error("Decode Error: could not decode nonWitnessUtxo with key 0x"+e.key.toString("hex"));return e.value},t.encode=function(e){return{key:sF.from([W8.InputTypes.NON_WITNESS_UTXO]),value:e}},t.expected="Buffer",t.check=function(e){return qF(e)},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.nonWitnessUtxo}}));UU(Y8),Y8.decode,Y8.encode,Y8.expected,Y8.check,Y8.canAdd;var Q8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.PARTIAL_SIG)throw new Error("Decode Error: could not decode partialSig with key 0x"+e.key.toString("hex"));if(34!==e.key.length&&66!==e.key.length||![2,3,4].includes(e.key[1]))throw new Error("Decode Error: partialSig has invalid pubkey in key 0x"+e.key.toString("hex"));return{pubkey:e.key.slice(1),signature:e.value}},t.encode=function(e){var t=sF.from([W8.InputTypes.PARTIAL_SIG]);return{key:sF.concat([t,e.pubkey]),value:e.signature}},t.expected="{ pubkey: Buffer; signature: Buffer; }",t.check=function(e){return qF(e.pubkey)&&qF(e.signature)&&[33,65].includes(e.pubkey.length)&&[2,3,4].includes(e.pubkey[0])&&function(e){if(!qF(e)||e.length<9)return!1;if(48!==e[0])return!1;if(e.length!==e[1]+3)return!1;if(2!==e[2])return!1;var t=e[3];if(t>33||t<1)return!1;if(2!==e[3+t+1])return!1;var r=e[3+t+2];return!(r>33||r<1)&&e.length===3+t+2+r+2}(e.signature)},t.canAddToArray=function(e,t,r){var n=t.pubkey.toString("hex");return!r.has(n)&&(r.add(n),0===e.filter((function(e){return e.pubkey.equals(t.pubkey)})).length)}}));UU(Q8),Q8.decode,Q8.encode,Q8.expected,Q8.check,Q8.canAddToArray;var Z8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.POR_COMMITMENT)throw new Error("Decode Error: could not decode porCommitment with key 0x"+e.key.toString("hex"));return e.value.toString("utf8")},t.encode=function(e){return{key:sF.from([W8.InputTypes.POR_COMMITMENT]),value:sF.from(e,"utf8")}},t.expected="string",t.check=function(e){return"string"==typeof e},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.porCommitment}}));UU(Z8),Z8.decode,Z8.encode,Z8.expected,Z8.check,Z8.canAdd;var e9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.SIGHASH_TYPE)throw new Error("Decode Error: could not decode sighashType with key 0x"+e.key.toString("hex"));return e.value.readUInt32LE(0)},t.encode=function(e){var t=sF.from([W8.InputTypes.SIGHASH_TYPE]),r=sF.allocUnsafe(4);return r.writeUInt32LE(e,0),{key:t,value:r}},t.expected="number",t.check=function(e){return"number"==typeof e},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.sighashType}}));UU(e9),e9.decode,e9.encode,e9.expected,e9.check,e9.canAdd;var t9=FU((function(e,t){function r(e){if(e<0||e>9007199254740991||e%1!=0)throw new RangeError("value out of range")}function n(e){return r(e),e<253?1:e<=65535?3:e<=4294967295?5:9}Object.defineProperty(t,"__esModule",{value:!0}),t.encode=function e(t,i,a){if(r(t),i||(i=sF.allocUnsafe(n(t))),!qF(i))throw new TypeError("buffer must be a Buffer instance");return a||(a=0),t<253?(i.writeUInt8(t,a),Object.assign(e,{bytes:1})):t<=65535?(i.writeUInt8(253,a),i.writeUInt16LE(t,a+1),Object.assign(e,{bytes:3})):t<=4294967295?(i.writeUInt8(254,a),i.writeUInt32LE(t,a+1),Object.assign(e,{bytes:5})):(i.writeUInt8(255,a),i.writeUInt32LE(t>>>0,a+1),i.writeUInt32LE(t/4294967296|0,a+5),Object.assign(e,{bytes:9})),i},t.decode=function e(t,n){if(!qF(t))throw new TypeError("buffer must be a Buffer instance");n||(n=0);var i=t.readUInt8(n);if(i<253)return Object.assign(e,{bytes:1}),i;if(253===i)return Object.assign(e,{bytes:3}),t.readUInt16LE(n+1);if(254===i)return Object.assign(e,{bytes:5}),t.readUInt32LE(n+1);Object.assign(e,{bytes:9});var a=t.readUInt32LE(n+1),o=4294967296*t.readUInt32LE(n+5)+a;return r(o),o},t.encodingLength=n}));UU(t9),t9.encode,t9.decode,t9.encodingLength;var r9=FU((function(e,t){function r(e){var t=e.key.length,r=e.value.length,n=t9.encodingLength(t),i=t9.encodingLength(r),a=sF.allocUnsafe(n+t+i+r);return t9.encode(t,a,0),e.key.copy(a,n),t9.encode(r,a,n+t),e.value.copy(a,n+t+i),a}function n(e,t){if("number"!=typeof e)throw new Error("cannot write a non-number as a number");if(e<0)throw new Error("specified a negative value for writing an unsigned value");if(e>t)throw new Error("RangeError: value out of range");if(Math.floor(e)!==e)throw new Error("value has a fractional component")}Object.defineProperty(t,"__esModule",{value:!0}),t.range=function(e){return k(Array(e).keys())},t.reverseBuffer=function(e){if(e.length<1)return e;for(var t=e.length-1,r=0,n=0;n<e.length/2;n++)r=e[n],e[n]=e[t],e[t]=r,t--;return e},t.keyValsToBuffer=function(e){var t=e.map(r);return t.push(sF.from([0])),sF.concat(t)},t.keyValToBuffer=r,t.readUInt64LE=function(e,t){var r=e.readUInt32LE(t),i=e.readUInt32LE(t+4);return n((i*=4294967296)+r,9007199254740991),i+r},t.writeUInt64LE=function(e,t,r){return n(t,9007199254740991),e.writeInt32LE(-1&t,r),e.writeUInt32LE(Math.floor(t/4294967296),r+4),r+8}}));UU(r9),r9.range,r9.reverseBuffer,r9.keyValsToBuffer,r9.keyValToBuffer,r9.readUInt64LE,r9.writeUInt64LE;var n9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.WITNESS_UTXO)throw new Error("Decode Error: could not decode witnessUtxo with key 0x"+e.key.toString("hex"));var t=r9.readUInt64LE(e.value,0),r=8,n=t9.decode(e.value,r);r+=t9.encodingLength(n);var i=e.value.slice(r);if(i.length!==n)throw new Error("Decode Error: WITNESS_UTXO script is not proper length");return{script:i,value:t}},t.encode=function(e){var t=e.script,r=e.value,n=t9.encodingLength(t.length),i=sF.allocUnsafe(8+n+t.length);return r9.writeUInt64LE(i,r,0),t9.encode(t.length,i,8),t.copy(i,8+n),{key:sF.from([W8.InputTypes.WITNESS_UTXO]),value:i}},t.expected="{ script: Buffer; value: number; }",t.check=function(e){return qF(e.script)&&"number"==typeof e.value},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.witnessUtxo}}));UU(n9),n9.decode,n9.encode,n9.expected,n9.check,n9.canAdd;var i9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeConverter=function(e){return{decode:function(t){if(t.key[0]!==e)throw new Error("Decode Error: could not decode bip32Derivation with key 0x"+t.key.toString("hex"));if(34!==t.key.length&&66!==t.key.length||![2,3,4].includes(t.key[1]))throw new Error("Decode Error: bip32Derivation has invalid pubkey in key 0x"+t.key.toString("hex"));if(t.value.length/4%1!=0)throw new Error("Decode Error: Input BIP32_DERIVATION value length should be multiple of 4");var r,n=t.key.slice(1),i={masterFingerprint:t.value.slice(0,4),pubkey:n,path:"m"},a=T(function(e){return k(Array(e).keys())}(t.value.length/4-1));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=t.value.readUInt32LE(4*o+4),u=!!(2147483648&s),c=2147483647&s;i.path+="/"+c.toString(10)+(u?"'":"")}}catch(e){a.e(e)}finally{a.f()}return i},encode:function(t){var r=sF.from([e]),n=sF.concat([r,t.pubkey]),i=t.path.split("/"),a=sF.allocUnsafe(4*i.length);t.masterFingerprint.copy(a,0);var o=4;return i.slice(1).forEach((function(e){var t="'"===e.slice(-1),r=2147483647&parseInt(t?e.slice(0,-1):e,10);t&&(r+=2147483648),a.writeUInt32LE(r,o),o+=4})),{key:n,value:a}},check:function(e){return qF(e.pubkey)&&qF(e.masterFingerprint)&&"string"==typeof e.path&&[33,65].includes(e.pubkey.length)&&[2,3,4].includes(e.pubkey[0])&&4===e.masterFingerprint.length},expected:"{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }",canAddToArray:function(e,t,r){var n=t.pubkey.toString("hex");return!r.has(n)&&(r.add(n),0===e.filter((function(e){return e.pubkey.equals(t.pubkey)})).length)}}}}));UU(i9),i9.makeConverter;var a9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeChecker=function(e){return function(t){var r;if(e.includes(t.key[0])&&(33!==(r=t.key.slice(1)).length&&65!==r.length||![2,3,4].includes(r[0])))throw new Error("Format Error: invalid pubkey in key 0x"+t.key.toString("hex"));return r}}}));UU(a9),a9.makeChecker;var o9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeConverter=function(e){return{decode:function(t){if(t.key[0]!==e)throw new Error("Decode Error: could not decode redeemScript with key 0x"+t.key.toString("hex"));return t.value},encode:function(t){return{key:sF.from([e]),value:t}},check:function(e){return qF(e)},expected:"Buffer",canAdd:function(e,t){return!!e&&!!t&&void 0===e.redeemScript}}}}));UU(o9),o9.makeConverter;var s9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeConverter=function(e){return{decode:function(t){if(t.key[0]!==e)throw new Error("Decode Error: could not decode witnessScript with key 0x"+t.key.toString("hex"));return t.value},encode:function(t){return{key:sF.from([e]),value:t}},check:function(e){return qF(e)},expected:"Buffer",canAdd:function(e,t){return!!e&&!!t&&void 0===e.witnessScript}}}}));UU(s9),s9.makeConverter;var u9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={unsignedTx:G8,globalXpub:J8,checkPubkey:a9.makeChecker([])};t.globals=r;var n={nonWitnessUtxo:Y8,partialSig:Q8,sighashType:e9,finalScriptSig:$8,finalScriptWitness:X8,porCommitment:Z8,witnessUtxo:n9,bip32Derivation:i9.makeConverter(W8.InputTypes.BIP32_DERIVATION),redeemScript:o9.makeConverter(W8.InputTypes.REDEEM_SCRIPT),witnessScript:s9.makeConverter(W8.InputTypes.WITNESS_SCRIPT),checkPubkey:a9.makeChecker([W8.InputTypes.PARTIAL_SIG,W8.InputTypes.BIP32_DERIVATION])};t.inputs=n;var i={bip32Derivation:i9.makeConverter(W8.OutputTypes.BIP32_DERIVATION),redeemScript:o9.makeConverter(W8.OutputTypes.REDEEM_SCRIPT),witnessScript:s9.makeConverter(W8.OutputTypes.WITNESS_SCRIPT),checkPubkey:a9.makeChecker([W8.OutputTypes.BIP32_DERIVATION])};t.outputs=i}));UU(u9),u9.globals,u9.inputs,u9.outputs;var c9=FU((function(e,t){function r(e,t,r){if(!t.equals(sF.from([r])))throw new Error("Format Error: Invalid ".concat(e," key: ").concat(t.toString("hex")))}function n(e,t){var n,i=t.globalMapKeyVals,a=t.inputKeyVals,o=t.outputKeyVals,s={unsignedTx:e},u=0,c=T(i);try{for(c.s();!(n=c.n()).done;){var l=n.value;switch(l.key[0]){case W8.GlobalTypes.UNSIGNED_TX:if(r("global",l.key,W8.GlobalTypes.UNSIGNED_TX),u>0)throw new Error("Format Error: GlobalMap has multiple UNSIGNED_TX");u++;break;case W8.GlobalTypes.GLOBAL_XPUB:void 0===s.globalXpub&&(s.globalXpub=[]),s.globalXpub.push(u9.globals.globalXpub.decode(l));break;default:s.unknownKeyVals||(s.unknownKeyVals=[]),s.unknownKeyVals.push(l)}}}catch(e){c.e(e)}finally{c.f()}var f,d=a.length,h=o.length,p=[],v=[],b=T(r9.range(d));try{for(b.s();!(f=b.n()).done;){var g,m=f.value,y={},w=T(a[m]);try{for(w.s();!(g=w.n()).done;){var _=g.value;switch(u9.inputs.checkPubkey(_),_.key[0]){case W8.InputTypes.NON_WITNESS_UTXO:if(r("input",_.key,W8.InputTypes.NON_WITNESS_UTXO),void 0!==y.nonWitnessUtxo)throw new Error("Format Error: Input has multiple NON_WITNESS_UTXO");y.nonWitnessUtxo=u9.inputs.nonWitnessUtxo.decode(_);break;case W8.InputTypes.WITNESS_UTXO:if(r("input",_.key,W8.InputTypes.WITNESS_UTXO),void 0!==y.witnessUtxo)throw new Error("Format Error: Input has multiple WITNESS_UTXO");y.witnessUtxo=u9.inputs.witnessUtxo.decode(_);break;case W8.InputTypes.PARTIAL_SIG:void 0===y.partialSig&&(y.partialSig=[]),y.partialSig.push(u9.inputs.partialSig.decode(_));break;case W8.InputTypes.SIGHASH_TYPE:if(r("input",_.key,W8.InputTypes.SIGHASH_TYPE),void 0!==y.sighashType)throw new Error("Format Error: Input has multiple SIGHASH_TYPE");y.sighashType=u9.inputs.sighashType.decode(_);break;case W8.InputTypes.REDEEM_SCRIPT:if(r("input",_.key,W8.InputTypes.REDEEM_SCRIPT),void 0!==y.redeemScript)throw new Error("Format Error: Input has multiple REDEEM_SCRIPT");y.redeemScript=u9.inputs.redeemScript.decode(_);break;case W8.InputTypes.WITNESS_SCRIPT:if(r("input",_.key,W8.InputTypes.WITNESS_SCRIPT),void 0!==y.witnessScript)throw new Error("Format Error: Input has multiple WITNESS_SCRIPT");y.witnessScript=u9.inputs.witnessScript.decode(_);break;case W8.InputTypes.BIP32_DERIVATION:void 0===y.bip32Derivation&&(y.bip32Derivation=[]),y.bip32Derivation.push(u9.inputs.bip32Derivation.decode(_));break;case W8.InputTypes.FINAL_SCRIPTSIG:r("input",_.key,W8.InputTypes.FINAL_SCRIPTSIG),y.finalScriptSig=u9.inputs.finalScriptSig.decode(_);break;case W8.InputTypes.FINAL_SCRIPTWITNESS:r("input",_.key,W8.InputTypes.FINAL_SCRIPTWITNESS),y.finalScriptWitness=u9.inputs.finalScriptWitness.decode(_);break;case W8.InputTypes.POR_COMMITMENT:r("input",_.key,W8.InputTypes.POR_COMMITMENT),y.porCommitment=u9.inputs.porCommitment.decode(_);break;default:y.unknownKeyVals||(y.unknownKeyVals=[]),y.unknownKeyVals.push(_)}}}catch(e){w.e(e)}finally{w.f()}p.push(y)}}catch(e){b.e(e)}finally{b.f()}var x,k=T(r9.range(h));try{for(k.s();!(x=k.n()).done;){var S,E=x.value,I={},A=T(o[E]);try{for(A.s();!(S=A.n()).done;){var P=S.value;switch(u9.outputs.checkPubkey(P),P.key[0]){case W8.OutputTypes.REDEEM_SCRIPT:if(r("output",P.key,W8.OutputTypes.REDEEM_SCRIPT),void 0!==I.redeemScript)throw new Error("Format Error: Output has multiple REDEEM_SCRIPT");I.redeemScript=u9.outputs.redeemScript.decode(P);break;case W8.OutputTypes.WITNESS_SCRIPT:if(r("output",P.key,W8.OutputTypes.WITNESS_SCRIPT),void 0!==I.witnessScript)throw new Error("Format Error: Output has multiple WITNESS_SCRIPT");I.witnessScript=u9.outputs.witnessScript.decode(P);break;case W8.OutputTypes.BIP32_DERIVATION:void 0===I.bip32Derivation&&(I.bip32Derivation=[]),I.bip32Derivation.push(u9.outputs.bip32Derivation.decode(P));break;default:I.unknownKeyVals||(I.unknownKeyVals=[]),I.unknownKeyVals.push(P)}}}catch(e){A.e(e)}finally{A.f()}v.push(I)}}catch(e){k.e(e)}finally{k.f()}return{globalMap:s,inputs:p,outputs:v}}Object.defineProperty(t,"__esModule",{value:!0}),t.psbtFromBuffer=function(e,t){var r=0;function i(){var t=t9.decode(e,r);r+=t9.encodingLength(t);var n=e.slice(r,r+t);return r+=t,n}function a(){return{key:i(),value:i()}}function o(){if(r>=e.length)throw new Error("Format Error: Unexpected End of PSBT");var t=0===e.readUInt8(r);return t&&r++,t}if(1886610036!==function(){var t=e.readUInt32BE(r);return r+=4,t}())throw new Error("Format Error: Invalid Magic Number");if(255!==function(){var t=e.readUInt8(r);return r+=1,t}())throw new Error("Format Error: Magic Number must be followed by 0xff separator");for(var s=[],u={};!o();){var c=a(),l=c.key.toString("hex");if(u[l])throw new Error("Format Error: Keys must be unique for global keymap: key "+l);u[l]=1,s.push(c)}var f=s.filter((function(e){return e.key[0]===W8.GlobalTypes.UNSIGNED_TX}));if(1!==f.length)throw new Error("Format Error: Only one UNSIGNED_TX allowed");var d,h=t(f[0].value),p=h.getInputOutputCounts(),v=p.inputCount,b=p.outputCount,g=[],m=[],y=T(r9.range(v));try{for(y.s();!(d=y.n()).done;){for(var w=d.value,_={},x=[];!o();){var k=a(),S=k.key.toString("hex");if(_[S])throw new Error("Format Error: Keys must be unique for each input: input index "+w+" key "+S);_[S]=1,x.push(k)}g.push(x)}}catch(e){y.e(e)}finally{y.f()}var E,I=T(r9.range(b));try{for(I.s();!(E=I.n()).done;){for(var A=E.value,P={},O=[];!o();){var C=a(),M=C.key.toString("hex");if(P[M])throw new Error("Format Error: Keys must be unique for each output: output index "+A+" key "+M);P[M]=1,O.push(C)}m.push(O)}}catch(e){I.e(e)}finally{I.f()}return n(h,{globalMapKeyVals:s,inputKeyVals:g,outputKeyVals:m})},t.checkKeyBuffer=r,t.psbtFromKeyVals=n}));UU(c9),c9.psbtFromBuffer,c9.checkKeyBuffer,c9.psbtFromKeyVals;var l9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.psbtToBuffer=function(e){var t=i({globalMap:e.globalMap,inputs:e.inputs,outputs:e.outputs}),r=t.globalKeyVals,n=t.inputKeyVals,a=t.outputKeyVals,o=r9.keyValsToBuffer(r),s=function(e){return 0===e.length?[sF.from([0])]:e.map(r9.keyValsToBuffer)},u=s(n),c=s(a),l=sF.allocUnsafe(5);return l.writeUIntBE(482972169471,0,5),sF.concat([l,o].concat(u,c))};var r=function(e,t){return e.key.compare(t.key)};function n(e,t){var n=new Set,i=Object.entries(e).reduce((function(e,r){var i=_(r,2),a=i[0],o=i[1];if("unknownKeyVals"===a)return e;var s=t[a];if(void 0===s)return e;var u=(Array.isArray(o)?o:[o]).map(s.encode);return u.map((function(e){return e.key.toString("hex")})).forEach((function(e){if(n.has(e))throw new Error("Serialize Error: Duplicate key: "+e);n.add(e)})),e.concat(u)}),[]),a=e.unknownKeyVals?e.unknownKeyVals.filter((function(e){return!n.has(e.key.toString("hex"))})):[];return i.concat(a).sort(r)}function i(e){var t=e.globalMap,r=e.inputs,i=e.outputs;return{globalKeyVals:n(t,u9.globals),inputKeyVals:r.map((function(e){return n(e,u9.inputs)})),outputKeyVals:i.map((function(e){return n(e,u9.outputs)}))}}t.psbtToKeyVals=i}));UU(l9),l9.psbtToBuffer,l9.psbtToKeyVals;var f9=FU((function(e,t){function r(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),r(c9),r(l9)}));UU(f9);var d9=FU((function(e,t){function r(e,t,r){return function(n){if(!e.has(n)){var i=r.filter((function(e){return e.key.toString("hex")===n}))[0];t.push(i),e.add(n)}}}function n(e){return e.globalMap.unsignedTx}function i(e){var t=new Set;return e.forEach((function(e){var r=e.key.toString("hex");if(t.has(r))throw new Error("Combine: KeyValue Map keys should be unique");t.add(r)})),t}Object.defineProperty(t,"__esModule",{value:!0}),t.combine=function(e){var t=e[0],a=f9.psbtToKeyVals(t),o=e.slice(1);if(0===o.length)throw new Error("Combine: Nothing to combine");var s=n(t);if(void 0===s)throw new Error("Combine: Self missing transaction");var u,c=i(a.globalKeyVals),l=a.inputKeyVals.map(i),f=a.outputKeyVals.map(i),d=T(o);try{var h=function(){var e=u.value,t=n(e);if(void 0===t||!t.toBuffer().equals(s.toBuffer()))throw new Error("Combine: One of the Psbts does not have the same transaction.");var o=f9.psbtToKeyVals(e);i(o.globalKeyVals).forEach(r(c,a.globalKeyVals,o.globalKeyVals)),o.inputKeyVals.map(i).forEach((function(e,t){return e.forEach(r(l[t],a.inputKeyVals[t],o.inputKeyVals[t]))})),o.outputKeyVals.map(i).forEach((function(e,t){return e.forEach(r(f[t],a.outputKeyVals[t],o.outputKeyVals[t]))}))};for(d.s();!(u=d.n()).done;)h()}catch(e){d.e(e)}finally{d.f()}return f9.psbtFromKeyVals(s,{globalMapKeyVals:a.globalKeyVals,inputKeyVals:a.inputKeyVals,outputKeyVals:a.outputKeyVals})}}));UU(d9),d9.combine;var h9=FU((function(e,t){function r(e,t){var r=e[t];if(void 0===r)throw new Error("No input #".concat(t));return r}function n(e,t,r,n){throw new Error("Data for ".concat(e," key ").concat(t," is incorrect: Expected ").concat(r," and got ").concat(JSON.stringify(n)))}function i(e){return function(t,r){for(var i=function(){var i=o[a],s=t[i],u=u9[e+"s"][i]||{},c=u.canAdd,l=u.canAddToArray,f=u.check,d=u.expected;if(f)if(!!l){if(!Array.isArray(s)||r[i]&&!Array.isArray(r[i]))throw new Error("Key type ".concat(i," must be an array"));s.every(f)||n(e,i,d,s);var h=r[i]||[],p=new Set;if(!s.every((function(e){return l(h,e,p)})))throw new Error("Can not add duplicate data to array");r[i]=h.concat(s)}else{if(f(s)||n(e,i,d,s),!c(r,s))throw new Error("Can not add duplicate data to ".concat(e));r[i]=s}},a=0,o=Object.keys(t);a<o.length;a++)i()}}Object.defineProperty(t,"__esModule",{value:!0}),t.checkForInput=r,t.checkForOutput=function(e,t){var r=e[t];if(void 0===r)throw new Error("No output #".concat(t));return r},t.checkHasKey=function(e,t,r){if(e.key[0]<r)throw new Error("Use the method for your specific key instead of addUnknownKeyVal*");if(t&&0!==t.filter((function(t){return t.key.equals(e.key)})).length)throw new Error("Duplicate Key: ".concat(e.key.toString("hex")))},t.getEnumLength=function(e){var t=0;return Object.keys(e).forEach((function(e){Number(isNaN(Number(e)))&&t++})),t},t.inputCheckUncleanFinalized=function(e,t){var r=!1;if(t.nonWitnessUtxo||t.witnessUtxo){var n=!!t.redeemScript,i=!!t.witnessScript,a=!n||!!t.finalScriptSig,o=!i||!!t.finalScriptWitness,s=!!t.finalScriptSig||!!t.finalScriptWitness;r=a&&o&&s}if(!1===r)throw new Error("Input #".concat(e," has too much or too little data to clean"))},t.updateGlobal=i("global"),t.updateInput=i("input"),t.updateOutput=i("output"),t.addInputAttributes=function(e,n){var i=r(e,e.length-1);t.updateInput(n,i)},t.addOutputAttributes=function(e,n){var i=r(e,e.length-1);t.updateOutput(n,i)},t.defaultVersionSetter=function(e,t){if(!qF(t)||t.length<4)throw new Error("Set Version: Invalid Transaction");return t.writeUInt32LE(e,0),t},t.defaultLocktimeSetter=function(e,t){if(!qF(t)||t.length<4)throw new Error("Set Locktime: Invalid Transaction");return t.writeUInt32LE(e,t.length-4),t}}));UU(h9),h9.checkForInput,h9.checkForOutput,h9.checkHasKey,h9.getEnumLength,h9.inputCheckUncleanFinalized,h9.updateGlobal,h9.updateInput,h9.updateOutput,h9.addInputAttributes,h9.addOutputAttributes,h9.defaultVersionSetter,h9.defaultLocktimeSetter;var p9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Psbt=function(){function e(t){a(this,e),this.inputs=[],this.outputs=[],this.globalMap={unsignedTx:t}}return s(e,[{key:"toBase64",value:function(){return this.toBuffer().toString("base64")}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toBuffer",value:function(){return f9.psbtToBuffer(this)}},{key:"updateGlobal",value:function(e){return h9.updateGlobal(e,this.globalMap),this}},{key:"updateInput",value:function(e,t){var r=h9.checkForInput(this.inputs,e);return h9.updateInput(t,r),this}},{key:"updateOutput",value:function(e,t){var r=h9.checkForOutput(this.outputs,e);return h9.updateOutput(t,r),this}},{key:"addUnknownKeyValToGlobal",value:function(e){return h9.checkHasKey(e,this.globalMap.unknownKeyVals,h9.getEnumLength(W8.GlobalTypes)),this.globalMap.unknownKeyVals||(this.globalMap.unknownKeyVals=[]),this.globalMap.unknownKeyVals.push(e),this}},{key:"addUnknownKeyValToInput",value:function(e,t){var r=h9.checkForInput(this.inputs,e);return h9.checkHasKey(t,r.unknownKeyVals,h9.getEnumLength(W8.InputTypes)),r.unknownKeyVals||(r.unknownKeyVals=[]),r.unknownKeyVals.push(t),this}},{key:"addUnknownKeyValToOutput",value:function(e,t){var r=h9.checkForOutput(this.outputs,e);return h9.checkHasKey(t,r.unknownKeyVals,h9.getEnumLength(W8.OutputTypes)),r.unknownKeyVals||(r.unknownKeyVals=[]),r.unknownKeyVals.push(t),this}},{key:"addInput",value:function(e){var t=this;this.globalMap.unsignedTx.addInput(e),this.inputs.push({unknownKeyVals:[]});var r=e.unknownKeyVals||[],n=this.inputs.length-1;if(!Array.isArray(r))throw new Error("unknownKeyVals must be an Array");return r.forEach((function(e){return t.addUnknownKeyValToInput(n,e)})),h9.addInputAttributes(this.inputs,e),this}},{key:"addOutput",value:function(e){var t=this;this.globalMap.unsignedTx.addOutput(e),this.outputs.push({unknownKeyVals:[]});var r=e.unknownKeyVals||[],n=this.outputs.length-1;if(!Array.isArray(r))throw new Error("unknownKeyVals must be an Array");return r.forEach((function(e){return t.addUnknownKeyValToInput(n,e)})),h9.addOutputAttributes(this.outputs,e),this}},{key:"clearFinalizedInput",value:function(e){var t=h9.checkForInput(this.inputs,e);h9.inputCheckUncleanFinalized(e,t);for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];["witnessUtxo","nonWitnessUtxo","finalScriptSig","finalScriptWitness","unknownKeyVals"].includes(i)||delete t[i]}return this}},{key:"combine",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=d9.combine([this].concat(t));return Object.assign(this,n),this}},{key:"getTransaction",value:function(){return this.globalMap.unsignedTx.toBuffer()}}],[{key:"fromBase64",value:function(e,t){var r=sF.from(e,"base64");return this.fromBuffer(r,t)}},{key:"fromHex",value:function(e,t){var r=sF.from(e,"hex");return this.fromBuffer(r,t)}},{key:"fromBuffer",value:function(e,t){var r=f9.psbtFromBuffer(e,t),n=new this(r.globalMap.unsignedTx);return Object.assign(n,r),n}}]),e}()}));UU(p9),p9.Psbt;var v9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={network:Z5.bitcoin,maximumFeeRate:5e3},n=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new p9.Psbt(new o);a(this,e),this.data=n,this.opts=Object.assign({},r,t),this.__CACHE={__NON_WITNESS_UTXO_TX_CACHE:[],__NON_WITNESS_UTXO_BUF_CACHE:[],__TX_IN_CACHE:{},__TX:this.data.globalMap.unsignedTx.tx,__UNSAFE_SIGN_NONSEGWIT:!1},0===this.data.inputs.length&&this.setVersion(2);var i=function(e,t,r,n){return Object.defineProperty(e,t,{enumerable:r,writable:n})};i(this,"__CACHE",!1,!0),i(this,"opts",!1,!0)}return s(e,[{key:"inputCount",get:function(){return this.data.inputs.length}},{key:"version",get:function(){return this.__CACHE.__TX.version},set:function(e){this.setVersion(e)}},{key:"locktime",get:function(){return this.__CACHE.__TX.locktime},set:function(e){this.setLocktime(e)}},{key:"txInputs",get:function(){return this.__CACHE.__TX.ins.map((function(e){return{hash:q8.cloneBuffer(e.hash),index:e.index,sequence:e.sequence}}))}},{key:"txOutputs",get:function(){var e=this;return this.__CACHE.__TX.outs.map((function(t){var r;try{r=j8.fromOutputScript(t.script,e.opts.network)}catch(t){}return{script:q8.cloneBuffer(t.script),value:t.value,address:r}}))}},{key:"combine",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.data).combine.apply(e,k(r.map((function(e){return e.data})))),this}},{key:"clone",value:function(){var t=e.fromBuffer(this.data.toBuffer());return t.opts=JSON.parse(JSON.stringify(this.opts)),t}},{key:"setMaximumFeeRate",value:function(e){y(e),this.opts.maximumFeeRate=e}},{key:"setVersion",value:function(e){y(e),w(this.data.inputs,"setVersion");var t=this.__CACHE;return t.__TX.version=e,t.__EXTRACTED_TX=void 0,this}},{key:"setLocktime",value:function(e){y(e),w(this.data.inputs,"setLocktime");var t=this.__CACHE;return t.__TX.locktime=e,t.__EXTRACTED_TX=void 0,this}},{key:"setInputSequence",value:function(e,t){y(t),w(this.data.inputs,"setInputSequence");var r=this.__CACHE;if(r.__TX.ins.length<=e)throw new Error("Input index too high");return r.__TX.ins[e].sequence=t,r.__EXTRACTED_TX=void 0,this}},{key:"addInputs",value:function(e){var t=this;return e.forEach((function(e){return t.addInput(e)})),this}},{key:"addInput",value:function(e){if(arguments.length>1||!e||void 0===e.hash||void 0===e.index)throw new Error("Invalid arguments for Psbt.addInput. Requires single object with at least [hash] and [index]");w(this.data.inputs,"addInput"),e.witnessScript&&H(e.witnessScript);var t=this.__CACHE;this.data.addInput(e),E(t,t.__TX.ins[t.__TX.ins.length-1]);var r=this.data.inputs.length-1,n=this.data.inputs[r];return n.nonWitnessUtxo&&j(this.__CACHE,n,r),t.__FEE=void 0,t.__FEE_RATE=void 0,t.__EXTRACTED_TX=void 0,this}},{key:"addOutputs",value:function(e){var t=this;return e.forEach((function(e){return t.addOutput(e)})),this}},{key:"addOutput",value:function(e){if(arguments.length>1||!e||void 0===e.value||void 0===e.address&&void 0===e.script)throw new Error("Invalid arguments for Psbt.addOutput. Requires single object with at least [script or address] and [value]");w(this.data.inputs,"addOutput");var t=e,r=t.address;if("string"==typeof r){var n=this.opts.network,i=j8.toOutputScript(r,n);e=Object.assign(e,{script:i})}var a=this.__CACHE;return this.data.addOutput(e),a.__FEE=void 0,a.__FEE_RATE=void 0,a.__EXTRACTED_TX=void 0,this}},{key:"extractTransaction",value:function(e){if(!this.data.inputs.every(l))throw new Error("Not finalized");var t=this.__CACHE;if(e||function(e,t,r){var n=t.__FEE_RATE||e.getFeeRate(),i=t.__EXTRACTED_TX.virtualSize(),a=n*i;if(n>=r.maximumFeeRate)throw new Error("Warning: You are paying around ".concat((a/1e8).toFixed(8)," in fees, which is ").concat(n," satoshi per byte for a transaction with a VSize of ").concat(i," bytes (segwit counted as 0.25 byte per byte). Use setMaximumFeeRate method to raise your threshold, or pass true to the first arg of extractTransaction."))}(this,t,this.opts),t.__EXTRACTED_TX)return t.__EXTRACTED_TX;var r=t.__TX.clone();return D(this.data.inputs,r,t,!0),r}},{key:"getFeeRate",value:function(){return O("__FEE_RATE","fee rate",this.data.inputs,this.__CACHE)}},{key:"getFee",value:function(){return O("__FEE","fee",this.data.inputs,this.__CACHE)}},{key:"finalizeAllInputs",value:function(){var e=this;return h9.checkForInput(this.data.inputs,0),K(this.data.inputs.length).forEach((function(t){return e.finalizeInput(t)})),this}},{key:"finalizeInput",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C,r=h9.checkForInput(this.data.inputs,e),n=function(e,t,r){var n=r.__TX,i={script:null,isSegwit:!1,isP2SH:!1,isP2WSH:!1};if(i.isP2SH=!!t.redeemScript,i.isP2WSH=!!t.witnessScript,t.witnessScript)i.script=t.witnessScript;else if(t.redeemScript)i.script=t.redeemScript;else if(t.nonWitnessUtxo){var a=B(r,t,e),o=n.ins[e].index;i.script=a.outs[o].script}else t.witnessUtxo&&(i.script=t.witnessUtxo.script);return(t.witnessScript||v(i.script))&&(i.isSegwit=!0),i}(e,r,this.__CACHE),i=n.script,a=n.isP2SH,o=n.isP2WSH,s=n.isSegwit;if(!i)throw new Error("No script found for input #".concat(e));x(r);var u=t(e,r,i,s,a,o),c=u.finalScriptSig,l=u.finalScriptWitness;if(c&&this.data.updateInput(e,{finalScriptSig:c}),l&&this.data.updateInput(e,{finalScriptWitness:l}),!c&&!l)throw new Error("Unknown error finalizing input #".concat(e));return this.data.clearFinalizedInput(e),this}},{key:"getInputType",value:function(e){var t=h9.checkForInput(this.data.inputs,e),r=z(U(e,t,this.__CACHE),e,"input",t.redeemScript||function(e){if(!e)return;var t=h8.decompile(e);if(!t)return;var r,n=t[t.length-1];if(!qF(n)||F(n)||(r=n,h8.isCanonicalScriptSignature(r)))return;return h8.decompile(n)?n:void 0}(t.finalScriptSig),t.witnessScript||function(e){if(!e)return;var t=L(e),r=t[t.length-1];if(F(r))return;return h8.decompile(r)?r:void 0}(t.finalScriptWitness));return("raw"===r.type?"":r.type+"-")+V(r.meaningfulScript)}},{key:"inputHasPubkey",value:function(e,t){return function(e,t,r,n){return q(e,z(U(r,t,n),r,"input",t.redeemScript,t.witnessScript).meaningfulScript)}(t,h9.checkForInput(this.data.inputs,e),e,this.__CACHE)}},{key:"inputHasHDKey",value:function(e,t){var r=h9.checkForInput(this.data.inputs,e),n=m(t);return!!r.bip32Derivation&&r.bip32Derivation.some(n)}},{key:"outputHasPubkey",value:function(e,t){return function(e,t,r,n){return q(e,z(n.__TX.outs[r].script,r,"output",t.redeemScript,t.witnessScript).meaningfulScript)}(t,h9.checkForOutput(this.data.outputs,e),e,this.__CACHE)}},{key:"outputHasHDKey",value:function(e,t){var r=h9.checkForOutput(this.data.outputs,e),n=m(t);return!!r.bip32Derivation&&r.bip32Derivation.some(n)}},{key:"validateSignaturesOfAllInputs",value:function(){var e=this;return h9.checkForInput(this.data.inputs,0),K(this.data.inputs.length).map((function(t){return e.validateSignaturesOfInput(t)})).reduce((function(e,t){return!0===t&&e}),!0)}},{key:"validateSignaturesOfInput",value:function(e,t){var r=this.data.inputs[e],n=(r||{}).partialSig;if(!r||!n||n.length<1)throw new Error("No signatures to validate");var i=t?n.filter((function(e){return e.pubkey.equals(t)})):n;if(i.length<1)throw new Error("No signatures for this pubkey");var a,o,s,u,c=[],l=T(i);try{for(l.s();!(u=l.n()).done;){var f=u.value,d=h8.signature.decode(f.signature),h=s!==d.hashType?R(e,Object.assign({},r,{sighashType:d.hashType}),this.__CACHE,!0):{hash:a,script:o},p=h.hash,v=h.script;s=d.hashType,a=p,o=v,S(f.pubkey,v,"verify");var b=B8.fromPublicKey(f.pubkey);c.push(b.verify(p,d.signature))}}catch(e){l.e(e)}finally{l.f()}return c.every((function(e){return!0===e}))}},{key:"signAllInputsHD",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];if(!e||!e.publicKey||!e.fingerprint)throw new Error("Need HDSigner to sign input");var r,n=[],i=T(K(this.data.inputs.length));try{for(i.s();!(r=i.n()).done;){var a=r.value;try{this.signInputHD(a,e,t),n.push(!0)}catch(e){n.push(!1)}}}catch(e){i.e(e)}finally{i.f()}if(n.every((function(e){return!1===e})))throw new Error("No inputs were signed");return this}},{key:"signAllInputsHDAsync",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];return new Promise((function(n,i){if(!e||!e.publicKey||!e.fingerprint)return i(new Error("Need HDSigner to sign input"));var a,o=[],s=[],u=T(K(t.data.inputs.length));try{for(u.s();!(a=u.n()).done;){var c=a.value;s.push(t.signInputHDAsync(c,e,r).then((function(){o.push(!0)}),(function(){o.push(!1)})))}}catch(e){u.e(e)}finally{u.f()}return Promise.all(s).then((function(){if(o.every((function(e){return!1===e})))return i(new Error("No inputs were signed"));n()}))}))}},{key:"signInputHD",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];if(!t||!t.publicKey||!t.fingerprint)throw new Error("Need HDSigner to sign input");return N(e,this.data.inputs,t).forEach((function(t){return r.signInput(e,t,n)})),this}},{key:"signInputHDAsync",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];return new Promise((function(i,a){if(!t||!t.publicKey||!t.fingerprint)return a(new Error("Need HDSigner to sign input"));var o=N(e,r.data.inputs,t).map((function(t){return r.signInputAsync(e,t,n)}));return Promise.all(o).then((function(){i()})).catch(a)}))}},{key:"signAllInputs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];if(!e||!e.publicKey)throw new Error("Need Signer to sign input");var r,n=[],i=T(K(this.data.inputs.length));try{for(i.s();!(r=i.n()).done;){var a=r.value;try{this.signInput(a,e,t),n.push(!0)}catch(e){n.push(!1)}}}catch(e){i.e(e)}finally{i.f()}if(n.every((function(e){return!1===e})))throw new Error("No inputs were signed");return this}},{key:"signAllInputsAsync",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];return new Promise((function(n,i){if(!e||!e.publicKey)return i(new Error("Need Signer to sign input"));var a,o=[],s=[],u=T(t.data.inputs.entries());try{for(u.s();!(a=u.n()).done;){var c=_(a.value,1)[0];s.push(t.signInputAsync(c,e,r).then((function(){o.push(!0)}),(function(){o.push(!1)})))}}catch(e){u.e(e)}finally{u.f()}return Promise.all(s).then((function(){if(o.every((function(e){return!1===e})))return i(new Error("No inputs were signed"));n()}))}))}},{key:"signInput",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];if(!t||!t.publicKey)throw new Error("Need Signer to sign input");var n=M(this.data.inputs,e,t.publicKey,this.__CACHE,r),i=n.hash,a=n.sighashType,o=[{pubkey:t.publicKey,signature:h8.signature.encode(t.sign(i),a)}];return this.data.updateInput(e,{partialSig:o}),this}},{key:"signInputAsync",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];return Promise.resolve().then((function(){if(!t||!t.publicKey)throw new Error("Need Signer to sign input");var i=M(r.data.inputs,e,t.publicKey,r.__CACHE,n),a=i.hash,o=i.sighashType;return Promise.resolve(t.sign(a)).then((function(n){var i=[{pubkey:t.publicKey,signature:h8.signature.encode(n,o)}];r.data.updateInput(e,{partialSig:i})}))}))}},{key:"toBuffer",value:function(){return u(this.__CACHE),this.data.toBuffer()}},{key:"toHex",value:function(){return u(this.__CACHE),this.data.toHex()}},{key:"toBase64",value:function(){return u(this.__CACHE),this.data.toBase64()}},{key:"updateGlobal",value:function(e){return this.data.updateGlobal(e),this}},{key:"updateInput",value:function(e,t){return t.witnessScript&&H(t.witnessScript),this.data.updateInput(e,t),t.nonWitnessUtxo&&j(this.__CACHE,this.data.inputs[e],e),this}},{key:"updateOutput",value:function(e,t){return this.data.updateOutput(e,t),this}},{key:"addUnknownKeyValToGlobal",value:function(e){return this.data.addUnknownKeyValToGlobal(e),this}},{key:"addUnknownKeyValToInput",value:function(e,t){return this.data.addUnknownKeyValToInput(e,t),this}},{key:"addUnknownKeyValToOutput",value:function(e,t){return this.data.addUnknownKeyValToOutput(e,t),this}},{key:"clearFinalizedInput",value:function(e){return this.data.clearFinalizedInput(e),this}}],[{key:"fromBase64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=sF.from(e,"base64");return this.fromBuffer(r,t)}},{key:"fromHex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=sF.from(e,"hex");return this.fromBuffer(r,t)}},{key:"fromBuffer",value:function(t){var r,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=p9.Psbt.fromBuffer(t,i),s=new e(a,o);return r=s.__CACHE.__TX,n=s.__CACHE,r.ins.forEach((function(e){E(n,e)})),s}}]),e}();t.Psbt=n;var i=function(e){return new o(e)},o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sF.from([2,0,0,0,0,0,0,0,0,0]);a(this,e),this.tx=V8.Transaction.fromBuffer(t),function(e){if(!e.ins.every((function(e){return e.script&&0===e.script.length&&e.witness&&0===e.witness.length})))throw new Error("Format Error: Transaction ScriptSigs are not empty")}(this.tx),Object.defineProperty(this,"tx",{enumerable:!1,writable:!0})}return s(e,[{key:"getInputOutputCounts",value:function(){return{inputCount:this.tx.ins.length,outputCount:this.tx.outs.length}}},{key:"addInput",value:function(e){if(void 0===e.hash||void 0===e.index||!qF(e.hash)&&"string"!=typeof e.hash||"number"!=typeof e.index)throw new Error("Error adding input.");var t="string"==typeof e.hash?q8.reverseBuffer(sF.from(e.hash,"hex")):e.hash;this.tx.addInput(t,e.index,e.sequence)}},{key:"addOutput",value:function(e){if(void 0===e.script||void 0===e.value||!qF(e.script)||"number"!=typeof e.value)throw new Error("Error adding output.");this.tx.addOutput(e.script,e.value)}},{key:"toBuffer",value:function(){return this.tx.toBuffer()}}]),e}();function u(e){if(!1!==e.__UNSAFE_SIGN_NONSEGWIT)throw new Error("Not BIP174 compliant, can not export")}function c(e,t,r){if(!t)return!1;var n;if(n=r?r.map((function(e){var r=B8.fromPublicKey(e,{compressed:!0}).publicKey;return t.find((function(e){return e.pubkey.equals(r)}))})).filter((function(e){return!!e})):t,n.length>e)throw new Error("Too many signatures");return n.length===e}function l(e){return!!e.finalScriptSig||!!e.finalScriptWitness}function f(e){return function(t){try{return e({output:t}),!0}catch(e){return!1}}}var d=f(L8.p2ms),h=f(L8.p2pk),p=f(L8.p2pkh),v=f(L8.p2wpkh),b=f(L8.p2wsh),g=f(L8.p2sh);function m(e){return function(t){return!!t.masterFingerprint.equals(e.fingerprint)&&!!e.derivePath(t.path).publicKey.equals(t.pubkey)}}function y(e){if("number"!=typeof e||e!==Math.floor(e)||e>4294967295||e<0)throw new Error("Invalid 32 bit integer")}function w(e,t){e.forEach((function(e){var r=!1,n=[];if(0===(e.partialSig||[]).length){if(!e.finalScriptSig&&!e.finalScriptWitness)return;n=function(e){var t=e.finalScriptSig&&h8.decompile(e.finalScriptSig)||[],r=e.finalScriptWitness&&h8.decompile(e.finalScriptWitness)||[];return t.concat(r).filter((function(e){return qF(e)&&h8.isCanonicalScriptSignature(e)})).map((function(e){return{signature:e}}))}(e)}else n=e.partialSig;if(n.forEach((function(e){var n=h8.signature.decode(e.signature).hashType,i=[];switch(n&V8.Transaction.SIGHASH_ANYONECANPAY&&i.push("addInput"),31&n){case V8.Transaction.SIGHASH_ALL:break;case V8.Transaction.SIGHASH_SINGLE:case V8.Transaction.SIGHASH_NONE:i.push("addOutput"),i.push("setInputSequence")}-1===i.indexOf(t)&&(r=!0)})),r)throw new Error("Can not modify transaction, signatures exist.")}))}function x(e){if(e.sighashType&&e.partialSig){var t=e.partialSig,r=e.sighashType;t.forEach((function(e){var t=h8.signature.decode(e.signature).hashType;if(r!==t)throw new Error("Signature sighash does not match input sighash type")}))}}function S(e,t,r){if(!q(e,t))throw new Error("Can not ".concat(r," for this input with the key ").concat(e.toString("hex")))}function E(e,t){var r=q8.reverseBuffer(sF.from(t.hash)).toString("hex")+":"+t.index;if(e.__TX_IN_CACHE[r])throw new Error("Duplicate input detected.");e.__TX_IN_CACHE[r]=1}function I(e,t){return function(r,n,i,a){var o=e({redeem:{output:i}}).output;if(!n.equals(o))throw new Error("".concat(t," for ").concat(a," #").concat(r," doesn't match the scriptPubKey in the prevout"))}}var A=I(L8.p2sh,"Redeem script"),P=I(L8.p2wsh,"Witness script");function O(e,t,r,n){if(!r.every(l))throw new Error("PSBT must be finalized to calculate ".concat(t));if("__FEE_RATE"===e&&n.__FEE_RATE)return n.__FEE_RATE;if("__FEE"===e&&n.__FEE)return n.__FEE;var i,a=!0;return n.__EXTRACTED_TX?(i=n.__EXTRACTED_TX,a=!1):i=n.__TX.clone(),D(r,i,n,a),"__FEE_RATE"===e?n.__FEE_RATE:"__FEE"===e?n.__FEE:void 0}function C(e,t,r,n,i,a){var o=V(r);if(!function(e,t,r){switch(r){case"pubkey":case"pubkeyhash":case"witnesspubkeyhash":return c(1,e.partialSig);case"multisig":var n=L8.p2ms({output:t});return c(n.m,e.partialSig,n.pubkeys);default:return!1}}(t,r,o))throw new Error("Can not finalize input #".concat(e));return function(e,t,r,n,i,a){var o,s,u=function(e,t,r){var n;switch(t){case"multisig":var i=function(e,t){return L8.p2ms({output:e}).pubkeys.map((function(e){return(t.filter((function(t){return t.pubkey.equals(e)}))[0]||{}).signature})).filter((function(e){return!!e}))}(e,r);n=L8.p2ms({output:e,signatures:i});break;case"pubkey":n=L8.p2pk({output:e,signature:r[0].signature});break;case"pubkeyhash":n=L8.p2pkh({output:e,pubkey:r[0].pubkey,signature:r[0].signature});break;case"witnesspubkeyhash":n=L8.p2wpkh({output:e,pubkey:r[0].pubkey,signature:r[0].signature})}return n}(e,t,r),c=a?L8.p2wsh({redeem:u}):null,l=i?L8.p2sh({redeem:c||u}):null;return n?(s=function(e){var t,r=sF.allocUnsafe(0);function n(e){var t=r.length,n=t9.encodingLength(e);r=sF.concat([r,sF.allocUnsafe(n)]),t9.encode(e,r,t)}function i(e){n(e.length),function(e){r=sF.concat([r,sF.from(e)])}(e)}return n((t=e).length),t.forEach(i),r}(c?c.witness:u.witness),l&&(o=l.input)):o=l?l.input:u.input,{finalScriptSig:o,finalScriptWitness:s}}(r,o,t.partialSig,n,i,a)}function M(e,t,r,n,i){var a=R(t,h9.checkForInput(e,t),n,!1,i),o=a.hash,s=a.sighashType;return S(r,a.script,"sign"),{hash:o,sighashType:s}}function R(e,t,r,n,i){var a,o,s=r.__TX,u=t.sighashType||V8.Transaction.SIGHASH_ALL;if(i&&i.indexOf(u)<0){var c=function(e){var t=e&V8.Transaction.SIGHASH_ANYONECANPAY?"SIGHASH_ANYONECANPAY | ":"";switch(31&e){case V8.Transaction.SIGHASH_ALL:t+="SIGHASH_ALL";break;case V8.Transaction.SIGHASH_SINGLE:t+="SIGHASH_SINGLE";break;case V8.Transaction.SIGHASH_NONE:t+="SIGHASH_NONE"}return t}(u);throw new Error("Sighash type is not allowed. Retry the sign method passing the sighashTypes array of whitelisted types. Sighash type: ".concat(c))}if(t.nonWitnessUtxo){var l=B(r,t,e),f=s.ins[e].hash,d=l.getHash();if(!f.equals(d))throw new Error("Non-witness UTXO hash for input #".concat(e," doesn't match the hash specified in the prevout"));var h=s.ins[e].index;o=l.outs[h]}else{if(!t.witnessUtxo)throw new Error("Need a Utxo input item for signing");o=t.witnessUtxo}var p=z(o.script,e,"input",t.redeemScript,t.witnessScript),b=p.meaningfulScript,g=p.type;if(["p2sh-p2wsh","p2wsh"].indexOf(g)>=0)a=s.hashForWitnessV0(e,b,o.value,u);else if(v(b)){var m=L8.p2pkh({hash:b.slice(2)}).output;a=s.hashForWitnessV0(e,m,o.value,u)}else{if(void 0===t.nonWitnessUtxo&&!1===r.__UNSAFE_SIGN_NONSEGWIT)throw new Error("Input #".concat(e," has witnessUtxo but non-segwit script: ").concat(b.toString("hex")));n||!1===r.__UNSAFE_SIGN_NONSEGWIT||console.warn("Warning: Signing non-segwit inputs without the full parent transaction means there is a chance that a miner could feed you incorrect information to trick you into paying large fees. This behavior is the same as the old TransactionBuilder class when signing non-segwit scripts. You are not able to export this Psbt with toBuffer|toBase64|toHex since it is not BIP174 compliant.\n*********************\nPROCEED WITH CAUTION!\n*********************"),a=s.hashForSignature(e,b,u)}return{script:b,sighashType:u,hash:a}}function N(e,t,r){var n=h9.checkForInput(t,e);if(!n.bip32Derivation||0===n.bip32Derivation.length)throw new Error("Need bip32Derivation to sign with HD");var i=n.bip32Derivation.map((function(e){return e.masterFingerprint.equals(r.fingerprint)?e:void 0})).filter((function(e){return!!e}));if(0===i.length)throw new Error("Need one bip32Derivation masterFingerprint to match the HDSigner fingerprint");return i.map((function(e){var t=r.derivePath(e.path);if(!e.pubkey.equals(t.publicKey))throw new Error("pubkey did not match bip32Derivation");return t}))}function L(e){var t=0;function r(){var r=t9.decode(e,t);return t+=t9.decode.bytes,r}function n(){return function(r){return t+=r,e.slice(t-r,t)}(r())}return function(){for(var e=r(),t=[],i=0;i<e;i++)t.push(n());return t}()}function j(e,t,r){e.__NON_WITNESS_UTXO_BUF_CACHE[r]=t.nonWitnessUtxo;var n=V8.Transaction.fromBuffer(t.nonWitnessUtxo);e.__NON_WITNESS_UTXO_TX_CACHE[r]=n;var i=e,a=r;delete t.nonWitnessUtxo,Object.defineProperty(t,"nonWitnessUtxo",{enumerable:!0,get:function(){var e=i.__NON_WITNESS_UTXO_BUF_CACHE[a],t=i.__NON_WITNESS_UTXO_TX_CACHE[a];if(void 0!==e)return e;var r=t.toBuffer();return i.__NON_WITNESS_UTXO_BUF_CACHE[a]=r,r},set:function(e){i.__NON_WITNESS_UTXO_BUF_CACHE[a]=e}})}function D(e,t,r,n){var i=0;e.forEach((function(e,a){if(n&&e.finalScriptSig&&(t.ins[a].script=e.finalScriptSig),n&&e.finalScriptWitness&&(t.ins[a].witness=L(e.finalScriptWitness)),e.witnessUtxo)i+=e.witnessUtxo.value;else if(e.nonWitnessUtxo){var o=B(r,e,a),s=t.ins[a].index,u=o.outs[s];i+=u.value}}));var a=t.outs.reduce((function(e,t){return e+t.value}),0),o=i-a;if(o<0)throw new Error("Outputs are spending more than Inputs");var s=t.virtualSize();r.__FEE=o,r.__EXTRACTED_TX=t,r.__FEE_RATE=Math.floor(o/s)}function B(e,t,r){var n=e.__NON_WITNESS_UTXO_TX_CACHE;return n[r]||j(e,t,r),n[r]}function U(e,t,r){if(void 0!==t.witnessUtxo)return t.witnessUtxo.script;if(void 0!==t.nonWitnessUtxo)return B(r,t,e).outs[r.__TX.ins[e].index].script;throw new Error("Can't find pubkey in input without Utxo data")}function F(e){return 33===e.length&&h8.isCanonicalPubKey(e)}function z(e,t,r,n,i){var a,o=g(e),s=o&&n&&b(n),u=b(e);if(o&&void 0===n)throw new Error("scriptPubkey is P2SH but redeemScript missing");if((u||s)&&void 0===i)throw new Error("scriptPubkey or redeemScript is P2WSH but witnessScript missing");return s?(a=i,A(t,e,n,r),P(t,n,i,r),H(a)):u?(a=i,P(t,e,i,r),H(a)):o?(a=n,A(t,e,n,r)):a=e,{meaningfulScript:a,type:s?"p2sh-p2wsh":o?"p2sh":u?"p2wsh":"raw"}}function H(e){if(v(e)||g(e))throw new Error("P2WPKH or P2SH can not be contained within P2WSH")}function q(e,t){var r=m8.hash160(e),n=h8.decompile(t);if(null===n)throw new Error("Unknown script error");return n.some((function(t){return"number"!=typeof t&&(t.equals(e)||t.equals(r))}))}function V(e){return v(e)?"witnesspubkeyhash":p(e)?"pubkeyhash":d(e)?"multisig":h(e)?"pubkey":"nonstandard"}function K(e){return k(Array(e).keys())}}));UU(v9),v9.Psbt;var b9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){return e===r.OPS.OP_0||h8.isCanonicalScriptSignature(e)}function i(e,t){var i=h8.decompile(e);return!(i.length<2)&&i[0]===r.OPS.OP_0&&(t?i.slice(1).every(n):i.slice(1).every(h8.isCanonicalScriptSignature))}t.check=i,i.toJSON=function(){return"multisig input"}}));UU(b9),b9.check;var g9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8,n=r.OPS.OP_RESERVED;function i(e,t){var i=h8.decompile(e);if(i.length<4)return!1;if(i[i.length-1]!==r.OPS.OP_CHECKMULTISIG)return!1;if(!t8.Number(i[0]))return!1;if(!t8.Number(i[i.length-2]))return!1;var a=i[0]-n,o=i[i.length-2]-n;return!(a<=0)&&(!(o>16)&&(!(a>o)&&(o===i.length-3&&(!!t||i.slice(1,-2).every(h8.isCanonicalPubKey)))))}t.check=i,i.toJSON=function(){return"multi-sig output"}}));UU(g9),g9.check;var m9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=b9,t.output=g9}));UU(m9),m9.input,m9.output;var y9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;function n(e){var t=h8.compile(e);return t.length>1&&t[0]===r.OP_RETURN}t.check=n,n.toJSON=function(){return"null data output"};var i={check:n};t.output=i}));UU(y9),y9.check,y9.output;var w9=FU((function(e,t){function r(e){var t=h8.decompile(e);return 1===t.length&&h8.isCanonicalScriptSignature(t[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"pubKey input"}}));UU(w9),w9.check;var _9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.decompile(e);return 2===t.length&&h8.isCanonicalPubKey(t[0])&&t[1]===r.OPS.OP_CHECKSIG}t.check=n,n.toJSON=function(){return"pubKey output"}}));UU(_9),_9.check;var x9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=w9,t.output=_9}));UU(x9),x9.input,x9.output;var k9=FU((function(e,t){function r(e){var t=h8.decompile(e);return 2===t.length&&h8.isCanonicalScriptSignature(t[0])&&h8.isCanonicalPubKey(t[1])}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"pubKeyHash input"}}));UU(k9),k9.check;var S9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 25===t.length&&t[0]===r.OPS.OP_DUP&&t[1]===r.OPS.OP_HASH160&&20===t[2]&&t[23]===r.OPS.OP_EQUALVERIFY&&t[24]===r.OPS.OP_CHECKSIG}t.check=n,n.toJSON=function(){return"pubKeyHash output"}}));UU(S9),S9.check;var E9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=k9,t.output=S9}));UU(E9),E9.input,E9.output;var I9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 22===t.length&&t[0]===r.OPS.OP_0&&20===t[1]}t.check=n,n.toJSON=function(){return"Witness pubKeyHash output"}}));UU(I9),I9.check;var A9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 34===t.length&&t[0]===r.OPS.OP_0&&32===t[1]}t.check=n,n.toJSON=function(){return"Witness scriptHash output"}}));UU(A9),A9.check;var P9=FU((function(e,t){function r(e,t){var r=h8.decompile(e);if(r.length<1)return!1;var n=r[r.length-1];if(!qF(n))return!1;var i=h8.decompile(h8.compile(r.slice(0,-1))),a=h8.decompile(n);return!!a&&!!h8.isPushOnly(i)&&(1===r.length?A9.check(a)||I9.check(a):!(!E9.input.check(i)||!E9.output.check(a))||!(!m9.input.check(i,t)||!m9.output.check(a))||!(!x9.input.check(i)||!x9.output.check(a)))}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"scriptHash input"}}));UU(P9),P9.check;var T9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 23===t.length&&t[0]===r.OPS.OP_HASH160&&20===t[1]&&t[22]===r.OPS.OP_EQUAL}t.check=n,n.toJSON=function(){return"scriptHash output"}}));UU(T9),T9.check;var O9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=P9,t.output=T9}));UU(O9),O9.input,O9.output;var C9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8,n=sF.from("aa21a9ed","hex");function i(e){var t=h8.compile(e);return t.length>37&&t[0]===r.OPS.OP_RETURN&&36===t[1]&&t.slice(2,6).equals(n)}t.check=i,i.toJSON=function(){return"Witness commitment output"},t.encode=function(e){W5(t8.Hash256bit,e);var t=sF.allocUnsafe(36);return n.copy(t,0),e.copy(t,4),h8.compile([r.OPS.OP_RETURN,t])},t.decode=function(e){return W5(i,e),h8.decompile(e)[1].slice(4,36)}}));UU(C9),C9.check,C9.encode,C9.decode;var M9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.output=C9}));UU(M9),M9.output;var R9=FU((function(e,t){function r(e){var t,r=h8.decompile(e);return 2===r.length&&h8.isCanonicalScriptSignature(r[0])&&(t=r[1],h8.isCanonicalPubKey(t)&&33===t.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"witnessPubKeyHash input"}}));UU(R9),R9.check;var N9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=R9,t.output=I9}));UU(N9),N9.input,N9.output;var L9=FU((function(e,t){function r(e,t){if(W5(W5.Array,e),e.length<1)return!1;var r=e[e.length-1];if(!qF(r))return!1;var n=h8.decompile(r);if(!n||0===n.length)return!1;var i=h8.compile(e.slice(0,-1));return!(!E9.input.check(i)||!E9.output.check(n))||!(!m9.input.check(i,t)||!m9.output.check(n))||!(!x9.input.check(i)||!x9.output.check(n))}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"witnessScriptHash input"}}));UU(L9),L9.check;var j9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=L9,t.output=A9}));UU(j9),j9.input,j9.output;var D9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={P2MS:"multisig",NONSTANDARD:"nonstandard",NULLDATA:"nulldata",P2PK:"pubkey",P2PKH:"pubkeyhash",P2SH:"scripthash",P2WPKH:"witnesspubkeyhash",P2WSH:"witnessscripthash",WITNESS_COMMITMENT:"witnesscommitment"};t.types=r,t.output=function(e){if(N9.output.check(e))return r.P2WPKH;if(j9.output.check(e))return r.P2WSH;if(E9.output.check(e))return r.P2PKH;if(O9.output.check(e))return r.P2SH;var t=h8.decompile(e);if(!t)throw new TypeError("Invalid script");return m9.output.check(t)?r.P2MS:x9.output.check(t)?r.P2PK:M9.output.check(t)?r.WITNESS_COMMITMENT:y9.output.check(t)?r.NULLDATA:r.NONSTANDARD},t.input=function(e,t){var n=h8.decompile(e);if(!n)throw new TypeError("Invalid script");return E9.input.check(n)?r.P2PKH:O9.input.check(n,t)?r.P2SH:m9.input.check(n,t)?r.P2MS:x9.input.check(n)?r.P2PK:r.NONSTANDARD},t.witness=function(e,t){var n=h8.decompile(e);if(!n)throw new TypeError("Invalid script");return N9.input.check(n)?r.P2WPKH:j9.input.check(n,t)?r.P2WSH:r.NONSTANDARD}}));UU(D9),D9.types,D9.output,D9.input,D9.witness;var B9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=h8,i=D9.types,o=new Set(["p2pkh","p2pk","p2wpkh","p2ms","p2sh-p2pkh","p2sh-p2pk","p2sh-p2wpkh","p2sh-p2ms","p2wsh-p2pkh","p2wsh-p2pk","p2wsh-p2ms","p2sh-p2wsh-p2pkh","p2sh-p2wsh-p2pk","p2sh-p2wsh-p2ms"]);function u(e,t,r){try{W5(e,t)}catch(e){throw new Error(r)}}var c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z5.bitcoin,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500;a(this,e),this.network=t,this.maximumFeeRate=r,this.__PREV_TX_SET={},this.__INPUTS=[],this.__TX=new V8.Transaction,this.__TX.version=2,this.__USE_LOW_R=!1,console.warn("Deprecation Warning: TransactionBuilder will be removed in the future. (v6.x.x or later) Please use the Psbt class instead. Examples of usage are available in the transactions-psbt.js integration test file on our Github. A high level explanation is available in the psbt.ts and psbt.js files as well.")}return s(e,[{key:"setLowR",value:function(e){return W5(W5.maybe(W5.Boolean),e),void 0===e&&(e=!0),this.__USE_LOW_R=e,e}},{key:"setLockTime",value:function(e){if(W5(t8.UInt32,e),this.__INPUTS.some((function(e){return!!e.signatures&&e.signatures.some((function(e){return void 0!==e}))})))throw new Error("No, this would invalidate signatures");this.__TX.locktime=e}},{key:"setVersion",value:function(e){W5(t8.UInt32,e),this.__TX.version=e}},{key:"addInput",value:function(e,t,r,n){if(!this.__canModifyInputs())throw new Error("No, this would invalidate signatures");var i,a;if("string"==typeof(a=e)||a instanceof String)e=q8.reverseBuffer(sF.from(e,"hex"));else if(function(e){return e instanceof V8.Transaction}(e)){var o=e.outs[t];n=o.script,i=o.value,e=e.getHash(!1)}return this.__addInputUnsafe(e,t,{sequence:r,prevOutScript:n,value:i})}},{key:"addOutput",value:function(e,t){if(!this.__canModifyOutputs())throw new Error("No, this would invalidate signatures");return"string"==typeof e&&(e=j8.toOutputScript(e,this.network)),this.__TX.addOutput(e,t)}},{key:"build",value:function(){return this.__build(!1)}},{key:"buildIncomplete",value:function(){return this.__build(!0)}},{key:"sign",value:function(e,t,n,a,s,c){!function(e){var t,r=e.input,n=e.ourPubKey,i=e.keyPair,a=e.signatureHash,o=e.hashType,s=e.useLowR,u=!1,c=T(r.pubkeys.entries());try{for(c.s();!(t=c.n()).done;){var l=_(t.value,2),f=l[0],d=l[1];if(n.equals(d)){if(r.signatures[f])throw new Error("Signature already exists");if(33!==n.length&&r.hasWitness)throw new Error("BIP143 rejects uncompressed public keys in P2WPKH or P2WSH");var h=i.sign(a,s);r.signatures[f]=h8.signature.encode(h,o),u=!0}}}catch(e){c.e(e)}finally{c.f()}if(!u)throw new Error("Key pair cannot sign for this input")}(function(e,t,n,a,s,c,l,d,p,v,b){var g;if("number"==typeof s)console.warn("DEPRECATED: TransactionBuilder sign method arguments will change in v6, please use the TxbSignArg interface"),g=s;else{var m;if("object"!=r(s))throw new TypeError("TransactionBuilder sign first arg must be TxbSignArg or number");!function(e,t){if(!o.has(t.prevOutScriptType))throw new TypeError('Unknown prevOutScriptType "'.concat(t.prevOutScriptType,'"'));u(W5.Number,t.vin,"sign must include vin parameter as Number (input index)"),u(t8.Signer,t.keyPair,"sign must include keyPair parameter as Signer interface"),u(W5.maybe(W5.Number),t.hashType,"sign hashType parameter must be a number");var r=(e[t.vin]||[]).prevOutType,n=t.prevOutScriptType;switch(n){case"p2pkh":if(r&&"pubkeyhash"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2pkh: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2pk":if(r&&"pubkey"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2pk: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2wpkh":if(r&&"witnesspubkeyhash"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2wpkh: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessValue"));break;case"p2ms":if(r&&"multisig"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2ms: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2sh-p2wpkh":if(r&&"scripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2sh-p2wpkh: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.Buffer,t.redeemScript,"".concat(n," requires redeemScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessValue"));break;case"p2sh-p2ms":case"p2sh-p2pk":case"p2sh-p2pkh":if(r&&"scripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type ").concat(n,": ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.Buffer,t.redeemScript,"".concat(n," requires redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2wsh-p2ms":case"p2wsh-p2pk":case"p2wsh-p2pkh":if(r&&"witnessscripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type ").concat(n,": ").concat(r));u(W5.Buffer,t.witnessScript,"".concat(n," requires witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessValue"));break;case"p2sh-p2wsh-p2ms":case"p2sh-p2wsh-p2pk":case"p2sh-p2wsh-p2pkh":if(r&&"scripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type ").concat(n,": ").concat(r));u(W5.Buffer,t.witnessScript,"".concat(n," requires witnessScript")),u(W5.Buffer,t.redeemScript,"".concat(n," requires witnessScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessScript"))}}(t,s),g=(m=s).vin,c=m.keyPair,l=m.redeemScript,d=m.hashType,p=m.witnessValue,v=m.witnessScript}if(void 0===c)throw new Error("sign requires keypair");if(c.network&&c.network!==e)throw new TypeError("Inconsistent network");if(!t[g])throw new Error("No input at index: "+g);if(n(d=d||V8.Transaction.SIGHASH_ALL))throw new Error("Transaction needs outputs");var y=t[g];if(void 0!==y.redeemScript&&l&&!y.redeemScript.equals(l))throw new Error("Inconsistent redeemScript");var w=c.publicKey||c.getPublicKey&&c.getPublicKey();if(!h(y)){if(void 0!==p){if(void 0!==y.value&&y.value!==p)throw new Error("Input did not match witnessValue");W5(t8.Satoshi,p),y.value=p}if(!h(y)){var _=function(e,t,r,n){if(r&&n){var a=L8.p2wsh({redeem:{output:n}}),o=L8.p2wsh({output:r}),s=L8.p2sh({redeem:{output:r}}),u=L8.p2sh({redeem:a});if(!a.hash.equals(o.hash))throw new Error("Witness script inconsistent with prevOutScript");if(!s.hash.equals(u.hash))throw new Error("Redeem script inconsistent with prevOutScript");var c=f(a.redeem.output,t);if(!c.pubkeys)throw new Error(c.type+" not supported as witnessScript ("+h8.toASM(n)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(c.signatures=e.signatures);var l=n;if(c.type===i.P2WPKH)throw new Error("P2SH(P2WSH(P2WPKH)) is a consensus failure");return{redeemScript:r,redeemScriptType:i.P2WSH,witnessScript:n,witnessScriptType:c.type,prevOutType:i.P2SH,prevOutScript:s.output,hasWitness:!0,signScript:l,signType:c.type,pubkeys:c.pubkeys,signatures:c.signatures,maxSignatures:c.maxSignatures}}if(r){var d=L8.p2sh({redeem:{output:r}});if(e.prevOutScript){var h;try{h=L8.p2sh({output:e.prevOutScript})}catch(e){throw new Error("PrevOutScript must be P2SH")}if(!d.hash.equals(h.hash))throw new Error("Redeem script inconsistent with prevOutScript")}var p=f(d.redeem.output,t);if(!p.pubkeys)throw new Error(p.type+" not supported as redeemScript ("+h8.toASM(r)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(p.signatures=e.signatures);var v=r;return p.type===i.P2WPKH&&(v=L8.p2pkh({pubkey:p.pubkeys[0]}).output),{redeemScript:r,redeemScriptType:p.type,prevOutType:i.P2SH,prevOutScript:d.output,hasWitness:p.type===i.P2WPKH,signScript:v,signType:p.type,pubkeys:p.pubkeys,signatures:p.signatures,maxSignatures:p.maxSignatures}}if(n){var b=L8.p2wsh({redeem:{output:n}});if(e.prevOutScript){var g=L8.p2wsh({output:e.prevOutScript});if(!b.hash.equals(g.hash))throw new Error("Witness script inconsistent with prevOutScript")}var m=f(b.redeem.output,t);if(!m.pubkeys)throw new Error(m.type+" not supported as witnessScript ("+h8.toASM(n)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(m.signatures=e.signatures);var y=n;if(m.type===i.P2WPKH)throw new Error("P2WSH(P2WPKH) is a consensus failure");return{witnessScript:n,witnessScriptType:m.type,prevOutType:i.P2WSH,prevOutScript:b.output,hasWitness:!0,signScript:y,signType:m.type,pubkeys:m.pubkeys,signatures:m.signatures,maxSignatures:m.maxSignatures}}if(e.prevOutType&&e.prevOutScript){if(e.prevOutType===i.P2SH)throw new Error("PrevOutScript is "+e.prevOutType+", requires redeemScript");if(e.prevOutType===i.P2WSH)throw new Error("PrevOutScript is "+e.prevOutType+", requires witnessScript");if(!e.prevOutScript)throw new Error("PrevOutScript is missing");var w=f(e.prevOutScript,t);if(!w.pubkeys)throw new Error(w.type+" not supported ("+h8.toASM(e.prevOutScript)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(w.signatures=e.signatures);var _=e.prevOutScript;return w.type===i.P2WPKH&&(_=L8.p2pkh({pubkey:w.pubkeys[0]}).output),{prevOutType:w.type,prevOutScript:e.prevOutScript,hasWitness:w.type===i.P2WPKH,signScript:_,signType:w.type,pubkeys:w.pubkeys,signatures:w.signatures,maxSignatures:w.maxSignatures}}var x=L8.p2pkh({pubkey:t}).output;return{prevOutType:i.P2PKH,prevOutScript:x,hasWitness:!1,signScript:x,signType:i.P2PKH,pubkeys:[t],signatures:[void 0]}}(y,w,l,v);Object.assign(y,_)}if(!h(y))throw Error(y.prevOutType+" not supported")}return{input:y,ourPubKey:w,keyPair:c,signatureHash:y.hasWitness?a.hashForWitnessV0(g,y.signScript,y.value,d):a.hashForSignature(g,y.signScript,d),hashType:d,useLowR:!!b}}(this.network,this.__INPUTS,this.__needsOutputs.bind(this),this.__TX,e,t,n,a,s,c,this.__USE_LOW_R))}},{key:"__addInputUnsafe",value:function(e,t,r){if(V8.Transaction.isCoinbaseHash(e))throw new Error("coinbase inputs not supported");var n=e.toString("hex")+":"+t;if(void 0!==this.__PREV_TX_SET[n])throw new Error("Duplicate TxOut: "+n);var i={};if(void 0!==r.script&&(i=l(r.script,r.witness||[])),void 0!==r.value&&(i.value=r.value),!i.prevOutScript&&r.prevOutScript){var a;if(!i.pubkeys&&!i.signatures){var o=f(r.prevOutScript);o.pubkeys&&(i.pubkeys=o.pubkeys,i.signatures=o.signatures),a=o.type}i.prevOutScript=r.prevOutScript,i.prevOutType=a||D9.output(r.prevOutScript)}var s=this.__TX.addInput(e,t,r.sequence,r.scriptSig);return this.__INPUTS[s]=i,this.__PREV_TX_SET[n]=!0,s}},{key:"__build",value:function(e){if(!e){if(!this.__TX.ins.length)throw new Error("Transaction has no inputs");if(!this.__TX.outs.length)throw new Error("Transaction has no outputs")}var t=this.__TX.clone();if(this.__INPUTS.forEach((function(r,n){if(!r.prevOutType&&!e)throw new Error("Transaction is not complete");var a=d(r.prevOutType,r,e);if(a)t.setInputScript(n,a.input),t.setWitness(n,a.witness);else{if(!e&&r.prevOutType===i.NONSTANDARD)throw new Error("Unknown input type");if(!e)throw new Error("Not enough information")}})),!e&&this.__overMaximumFees(t.virtualSize()))throw new Error("Transaction has absurd fees");return t}},{key:"__canModifyInputs",value:function(){return this.__INPUTS.every((function(e){return!e.signatures||e.signatures.every((function(e){return!e||0!=(p(e)&V8.Transaction.SIGHASH_ANYONECANPAY)}))}))}},{key:"__needsOutputs",value:function(e){return e===V8.Transaction.SIGHASH_ALL?0===this.__TX.outs.length:0===this.__TX.outs.length&&this.__INPUTS.some((function(e){return!!e.signatures&&e.signatures.some((function(e){return!!e&&!(p(e)&V8.Transaction.SIGHASH_NONE)}))}))}},{key:"__canModifyOutputs",value:function(){var e=this.__TX.ins.length,t=this.__TX.outs.length;return this.__INPUTS.every((function(r){return void 0===r.signatures||r.signatures.every((function(r){if(!r)return!0;var n=31&p(r);return n===V8.Transaction.SIGHASH_NONE||n===V8.Transaction.SIGHASH_SINGLE&&e<=t}))}))}},{key:"__overMaximumFees",value:function(e){return(this.__INPUTS.reduce((function(e,t){return e+(t.value>>>0)}),0)-this.__TX.outs.reduce((function(e,t){return e+t.value}),0))/e>this.maximumFeeRate}}],[{key:"fromTransaction",value:function(t,r){var n=new e(r);return n.setVersion(t.version),n.setLockTime(t.locktime),t.outs.forEach((function(e){n.addOutput(e.script,e.value)})),t.ins.forEach((function(e){n.__addInputUnsafe(e.hash,e.index,{sequence:e.sequence,script:e.script,witness:e.witness})})),n.__INPUTS.forEach((function(e,r){!function(e,t,r){if(e.redeemScriptType===i.P2MS&&e.redeemScript&&e.pubkeys.length!==e.signatures.length){var n=e.signatures.concat();e.signatures=e.pubkeys.map((function(i){var a,o=B8.fromPublicKey(i);return n.some((function(i,s){if(!i)return!1;var u=h8.signature.decode(i),c=t.hashForSignature(r,e.redeemScript,u.hashType);return!!o.verify(c,u.signature)&&(n[s]=void 0,a=i,!0)})),a}))}}(e,t,r)})),n}}]),e}();function l(e,t,r,n){if(0===e.length&&0===t.length)return{};if(!r){var a=D9.input(e,!0),o=D9.witness(t,!0);a===i.NONSTANDARD&&(a=void 0),o===i.NONSTANDARD&&(o=void 0),r=a||o}switch(r){case i.P2WPKH:var s=L8.p2wpkh({witness:t}),u=s.output,c=s.pubkey,f=s.signature;return{prevOutScript:u,prevOutType:i.P2WPKH,pubkeys:[c],signatures:[f]};case i.P2PKH:var d=L8.p2pkh({input:e}),h=d.output,p=d.pubkey,v=d.signature;return{prevOutScript:h,prevOutType:i.P2PKH,pubkeys:[p],signatures:[v]};case i.P2PK:var b=L8.p2pk({input:e}).signature;return{prevOutType:i.P2PK,pubkeys:[void 0],signatures:[b]};case i.P2MS:var g=L8.p2ms({input:e,output:n},{allowIncomplete:!0}),m=g.m,y=g.pubkeys,w=g.signatures;return{prevOutType:i.P2MS,pubkeys:y,signatures:w,maxSignatures:m}}if(r===i.P2SH){var _=L8.p2sh({input:e,witness:t}),x=_.output,k=_.redeem,S=D9.output(k.output),E=l(k.input,k.witness,S,k.output);return E.prevOutType?{prevOutScript:x,prevOutType:i.P2SH,redeemScript:k.output,redeemScriptType:E.prevOutType,witnessScript:E.witnessScript,witnessScriptType:E.witnessScriptType,pubkeys:E.pubkeys,signatures:E.signatures}:{}}if(r===i.P2WSH){var I,A=L8.p2wsh({input:e,witness:t}),P=A.output,T=A.redeem,O=D9.output(T.output);return(I=O===i.P2WPKH?l(T.input,T.witness,O):l(h8.compile(T.witness),[],O,T.output)).prevOutType?{prevOutScript:P,prevOutType:i.P2WSH,witnessScript:T.output,witnessScriptType:I.prevOutType,pubkeys:I.pubkeys,signatures:I.signatures}:{}}return{prevOutType:i.NONSTANDARD,prevOutScript:e}}function f(e,t){W5(t8.Buffer,e);var r=D9.output(e);switch(r){case i.P2PKH:if(!t)return{type:r};var n=L8.p2pkh({output:e}).hash,a=m8.hash160(t);return n.equals(a)?{type:r,pubkeys:[t],signatures:[void 0]}:{type:r};case i.P2WPKH:if(!t)return{type:r};var o=L8.p2wpkh({output:e}).hash,s=m8.hash160(t);return o.equals(s)?{type:r,pubkeys:[t],signatures:[void 0]}:{type:r};case i.P2PK:return{type:r,pubkeys:[L8.p2pk({output:e}).pubkey],signatures:[void 0]};case i.P2MS:var u=L8.p2ms({output:e});return{type:r,pubkeys:u.pubkeys,signatures:u.pubkeys.map((function(){})),maxSignatures:u.m}}return{type:r}}function d(e,t,r){var a=t.pubkeys||[],o=t.signatures||[];switch(e){case i.P2PKH:if(0===a.length)break;if(0===o.length)break;return L8.p2pkh({pubkey:a[0],signature:o[0]});case i.P2WPKH:if(0===a.length)break;if(0===o.length)break;return L8.p2wpkh({pubkey:a[0],signature:o[0]});case i.P2PK:if(0===a.length)break;if(0===o.length)break;return L8.p2pk({signature:o[0]});case i.P2MS:var s=t.maxSignatures;o=r?o.map((function(e){return e||n.OPS.OP_0})):o.filter((function(e){return e}));var u=!r||s===o.length;return L8.p2ms({m:s,pubkeys:a,signatures:o},{allowIncomplete:r,validate:u});case i.P2SH:var c=d(t.redeemScriptType,t,r);if(!c)return;return L8.p2sh({redeem:{output:c.output||t.redeemScript,input:c.input,witness:c.witness}});case i.P2WSH:var l=d(t.witnessScriptType,t,r);if(!l)return;return L8.p2wsh({redeem:{output:t.witnessScript,input:l.input,witness:l.witness}})}}function h(e){return void 0!==e.signScript&&void 0!==e.signType&&void 0!==e.pubkeys&&void 0!==e.signatures&&e.signatures.length===e.pubkeys.length&&e.pubkeys.length>0&&(!1===e.hasWitness||void 0!==e.value)}function p(e){return e.readUInt8(e.length-1)}t.TransactionBuilder=c}));UU(B9),B9.TransactionBuilder;var U9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bip32=Q5,t.address=j8,t.crypto=m8,t.ECPair=B8,t.networks=Z5,t.payments=L8,t.script=h8,t.Block=K8.Block,t.Psbt=v9.Psbt;var r=h8;t.opcodes=r.OPS,t.Transaction=V8.Transaction,t.TransactionBuilder=B9.TransactionBuilder}));function F9(e,t,r){var n="",i=function(e,t){var r=null;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&n.toLowerCase()===t.toLowerCase()&&(r=n);return e[r]}(e,t),a=OV(r);if(i?(i.created&&a<=i.created&&(n="invalidIssuingAddressCreationTime"),i.revoked&&a>=i.revoked&&(n="invalidIssuingAddressRevoked"),i.expires&&a>=i.expires&&(n="invalidIssuingAddressExpired")):n="invalidIssuingAddressUnknown",n)throw new jU("checkAuthenticity",OU("errors",n))}UU(U9),U9.bitcoin,U9.bip32,U9.address,U9.crypto,U9.ECPair,U9.networks,U9.payments,U9.script,U9.Block,U9.Psbt,U9.opcodes,U9.Transaction,U9.TransactionBuilder;var z9=Gq("Verifier"),H9=function(){function e(t){var r=t.certificateJson,n=t.chain,i=t.expires,o=t.id,s=t.issuer,u=t.receipt,c=t.revocationKey,l=t.transactionId,f=t.version,d=t.explorerAPIs;a(this,e),this.chain=n,this.expires=i,this.id=o,this.issuer=s,this.receipt=u,this.revocationKey=c,this.version=f,this.transactionId=l,this.explorerAPIs=d;var h=r.document;h||(h=this._retrieveDocumentBeforeIssuance(r)),this.documentToVerify=Object.assign({},h),this._stepsStatuses=[]}return s(e,[{key:"verify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};return dU(this,void 0,void 0,Jt.mark((function t(){var r;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._stepCallback=e,this.version!==pU.V1_1){t.next=2;break}throw new jU("","Verification of 1.1 certificates is not supported by this component. See the python cert-verifier for legacy verification");case 2:if(!MV.chains.isMockChain(this.chain)){t.next=7;break}return t.next=5,this._verifyV2Mock();case 5:t.next=9;break;case 7:return t.next=9,this._verifyMain();case 9:return r=this._stepsStatuses.find((function(e){return"failure"===e.status})),t.abrupt("return",r?this._failed(r):this._succeed());case 11:case"end":return t.stop()}}),t,this)})))}},{key:"_getRevocationListUrl",value:function(e){var t;return(null===(t=this.issuer)||void 0===t?void 0:t.revocationList)?this.issuer.revocationList:e.revocationList}},{key:"_doAction",value:function(e,t){return dU(this,void 0,void 0,Jt.mark((function r(){var n,i;return Jt.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this._isFailing()){r.next=2;break}return r.abrupt("return");case 2:return e&&(n=MV.i18n.getText("subSteps","".concat(e,"LabelPending")),z9(n),this._updateStatusCallback(e,n,"starting")),r.prev=3,r.next=6,t();case 6:return i=r.sent,r.abrupt("return",(e&&(this._updateStatusCallback(e,n,"success"),this._stepsStatuses.push({step:e,label:n,status:"success"})),i));case 10:r.prev=10,r.t0=r.catch(3),e&&(this._updateStatusCallback(e,n,"failure",r.t0.message),this._stepsStatuses.push({code:e,label:n,status:"failure",errorMessage:r.t0.message}));case 13:case"end":return r.stop()}}),r,this,[[3,10]])})))}},{key:"_stepCallback",value:function(e){}},{key:"_verifyMain",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getTransactionId();case 2:return e.next=4,this.computeLocalHash();case 4:return e.next=6,this.fetchRemoteHash();case 6:return e.next=8,this.getIssuerProfile();case 8:return e.next=10,this.parseIssuerKeys();case 10:return e.next=12,this.compareHashes();case 12:return e.next=14,this.checkMerkleRoot();case 14:return e.next=16,this.checkReceipt();case 16:return e.next=18,this.checkRevokedStatus();case 18:return e.next=20,this.checkAuthenticity();case 20:return e.next=22,this.checkExpiresDate();case 22:case"end":return e.stop()}}),e,this)})))}},{key:"_verifyV2Mock",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.computeLocalHash();case 2:return e.next=4,this.compareHashes();case 4:return e.next=6,this.checkReceipt();case 6:return e.next=8,this.checkExpiresDate();case 8:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionId",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("getTransactionId",(function(){return function(e){if("string"==typeof e&&e.length>0)return e;throw new jU("getTransactionId",OU("errors","isTransactionIdValid"))}(t.transactionId)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"computeLocalHash",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("computeLocalHash",(function(){return dU(t,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sQ(this.documentToVerify,this.version);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 2:this.localHash=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"fetchRemoteHash",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("fetchRemoteHash",(function(){return dU(t,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,MV.verifier.lookForTx({transactionId:this.transactionId,chain:this.chain.code,explorerAPIs:this.explorerAPIs});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 2:this.txData=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getIssuerProfile",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("getIssuerProfile",(function(){return dU(t,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,MV.verifier.getIssuerProfile(this.issuer);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 2:this.issuer=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"parseIssuerKeys",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("parseIssuerKeys",(function(){return MV.verifier.parseIssuerKeys(t.issuer)}));case 2:this.issuerPublicKeyList=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"compareHashes",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("compareHashes",(function(){!function(e,t){if(e!==t)throw new jU("compareHashes",OU("errors","ensureHashesEqual"))}(t.localHash,t.receipt.targetHash)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkMerkleRoot",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkMerkleRoot",(function(){return function(e,t){if(e!==t)throw new jU("checkMerkleRoot",OU("errors","ensureMerkleRootEqual"));return!0}(t.receipt.merkleRoot,t.txData.remoteHash)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkReceipt",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkReceipt",(function(){return function(e){var t=e.targetHash,r=e.merkleRoot;try{var n=e.proof||e.path;if(n)for(var i in n){var a=n[i],o=void 0;if(void 0!==a.left)o=oQ("".concat(a.left).concat(t)),t=aQ(o);else{if(void 0===a.right)throw new jU("checkReceipt","Trigger catch error.");o=oQ("".concat(t).concat(a.right)),t=aQ(o)}}}catch(e){throw new jU("checkReceipt",OU("errors","ensureValidReceipt"))}if(t!==r)throw new jU("checkReceipt",OU("errors","invalidMerkleReceipt"))}(t.receipt)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkRevokedStatus",value:function(){var e;return dU(this,void 0,void 0,Jt.mark((function t(){var r,n,i=this;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.version!==pU.V1_2){t.next=4;break}n=(null===(e=this.txData)||void 0===e?void 0:e.revokedAddresses)||[],r=[MV.verifier.parseRevocationKey(this.issuer),this.revocationKey],t.next=8;break;case 4:return t.next=6,this._doAction(null,(function(){return dU(i,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,MV.verifier.getRevokedAssertions(this._getRevocationListUrl(this.issuer),this.id);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 6:n=t.sent,r=this.id;case 8:return t.next=10,this._doAction("checkRevokedStatus",(function(){return function(e,t){if(e&&t){Array.isArray(t)||(t=[t]);var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.filter((function(e){return-1!==t.indexOf(e)})).filter((function(e,t,r){return r.indexOf(e)===t}))}(t=t.filter((function(e){return null!=e})),e.map((function(e){return e.id})));if(r.length>0){var n=e.findIndex((function(e){return e.id===r[0]}));if(n>-1)throw new jU("checkRevokedStatus",MV.certificates.generateRevocationReason(e[n].revocationReason))}}}(n,r)}));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"checkAuthenticity",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkAuthenticity",(function(){return F9(t.issuerPublicKeyList,t.txData.issuingAddress,t.txData.time)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkExpiresDate",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkExpiresDate",(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){var t=OV(e);if(new Date>=t)throw new jU("checkExpiresDate",OU("errors","ensureNotExpired"))}}(t.expires)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"_failed",value:function(e){var t=e.errorMessage;return z9("failure:".concat(t)),this._setFinalStep({status:"failure",message:t})}},{key:"_isFailing",value:function(){return this._stepsStatuses.some((function(e){return"failure"===e.status}))}},{key:"_retrieveDocumentBeforeIssuance",value:function(e){var t=Object.assign({},e);return delete t.signature,t}},{key:"_succeed",value:function(){var e=MV.chains.isMockChain(this.chain)?MV.i18n.getText("success","mocknet"):MV.i18n.getText("success","blockchain");return z9(e),this._setFinalStep({status:"success",message:e})}},{key:"_setFinalStep",value:function(e){return{code:"final",status:e.status,message:e.message}}},{key:"_updateStatusCallback",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(null!=e){var i={code:e,label:t,status:r};n&&(i.errorMessage=n),this._stepCallback(i)}}}]),e}(),q9=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a(this,e),this.explorerAPIs=[],this._setOptions(n),"object"!=r(t))try{t=JSON.parse(t)}catch(t){throw new Error(MV.i18n.getText("errors","certificateNotValid"))}this.certificateJson=qU(t)}return s(e,[{key:"init",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.parseJson(this.certificateJson);case 2:case"end":return e.stop()}}),e,this)})))}},{key:"parseJson",value:function(e){return dU(this,void 0,void 0,Jt.mark((function t(){var r;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,NV(e);case 2:if((r=t.sent).isFormatValid){t.next=5;break}throw new Error(r.error);case 5:this._setProperties(r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"verify",value:function(e){return dU(this,void 0,void 0,Jt.mark((function t(){var r;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new H9({certificateJson:this.certificateJson,chain:this.chain,expires:this.expires,id:this.id,issuer:this.issuer,receipt:this.receipt,revocationKey:this.revocationKey,transactionId:this.transactionId,version:this.version,explorerAPIs:qU(this.explorerAPIs)}),t.next=3,r.verify(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"_setOptions",value:function(e){this.options=Object.assign({},AU,e),this.locale=MV.i18n.ensureIsSupported("auto"===this.options.locale?MV.i18n.detectLocale():this.options.locale),this.explorerAPIs=this.options.explorerAPIs||[],TU.locale=this.locale}},{key:"_setProperties",value:function(e){var t=e.certificateImage,r=e.chain,n=e.description,i=e.expires,a=e.id,o=e.isFormatValid,s=e.issuedOn,u=e.issuer,c=e.metadataJson,l=e.name,f=e.publicKey,d=e.receipt,h=e.recipientFullName,p=e.recordLink,v=e.revocationKey,b=e.sealImage,g=e.signature,m=e.signatureImage,y=e.subtitle,w=e.version;this.isFormatValid=o,this.certificateImage=t,this.chain=r,this.description=n,this.expires=i,this.id=a,this.issuedOn=s,this.issuer=u,this.metadataJson=c,this.name=l,this.publicKey=f,this.receipt=d,this.recipientFullName=h,this.recordLink=p,this.revocationKey=v,this.sealImage=b,this.signature=g,this.signatureImage=m,this.subtitle=y,this.verificationSteps=MV.certificates.getVerificationMap(r),this.version=w,this._setTransactionDetails()}},{key:"_setTransactionDetails",value:function(){this.transactionId=MV.certificates.getTransactionId(this.receipt),this.rawTransactionLink=MV.certificates.getTransactionLink(this.transactionId,this.chain,!0),this.transactionLink=MV.certificates.getTransactionLink(this.transactionId,this.chain)}}]),e}();var V9=Object.freeze({__proto__:null,displayHtmlHasNoWidthConstraint:function(e){const t=(new DOMParser).parseFromString(e,"text/html");return t.body.childElementCount===t.body.querySelectorAll(Bt.map((e=>`section[class*="${e}"]`)).join(", ")).length},download:function(e){return e+Ut},initializeVerificationSteps:function(e){var r=JSON.parse(JSON.stringify(e.verificationSteps));return r.map((function(e,n){return t(t({},e),{},{isLast:n===r.length-1,status:XB.DEFAULT})}))},retrieve:function(e){return YB(e)||QB(e)?fetch(e+Ut).then((function(e){return e.text()})).then((function(e){try{return{certificateDefinition:JSON.parse(e)}}catch(e){return console.log(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcertsUrl"}}})).catch(ZB):(console.error("Invalid url to retrieve:",e),null)},read:function(e){return tU.apply(this,arguments)},parse:function(e,t={}){return aU(this,void 0,void 0,(function*(){t.locale||(t.locale="auto");try{let r;return r=1===jd(e["@context"])?new q9(e,t):new $B(e,t),yield r.init(),{certificateDefinition:r}}catch(e){return console.error(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcerts"}}}))},isPathToCertificateValidURI:function(e){return YB(e)||QB(e)}});var K9=Object.freeze({__proto__:null,dispatch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;if(e&&"string"==typeof e&&n&&"object"===r(n)){var a=new CustomEvent(e,{detail:t({certificateDefinition:n},i)});window.dispatchEvent(a)}}}),W9=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!window.Proxy){var t=jt();return new t(e,Dt)}return new Proxy(e,Dt)}({certificates:V9,events:K9});function J9(e,t){return e(t={exports:{}},t.exports),t.exports}function G9(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var $9=/javascript\s*\:/gim;var X9={whiteList:G9(),getDefaultWhiteList:G9,onAttr:function(e,t,r){},onIgnoreAttr:function(e,t,r){},safeAttrValue:function(e,t){return $9.test(t)?"":t}},Y9=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},Q9=function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")};var Z9=function(e,t){";"!==(e=Q9(e))[e.length-1]&&(e+=";");var r=e.length,n=!1,i=0,a=0,o="";function s(){if(!n){var r=Y9(e.slice(i,a)),s=r.indexOf(":");if(-1!==s){var u=Y9(r.slice(0,s)),c=Y9(r.slice(s+1));if(u){var l=t(i,o.length,u,c,r);l&&(o+=l+"; ")}}}i=a+1}for(;a<r;a++){var u=e[a];if("/"===u&&"*"===e[a+1]){var c=e.indexOf("*/",a+2);if(-1===c)break;i=(a=c+1)+1,n=!1}else"("===u?n=!0:")"===u?n=!1:";"===u?n||s():"\n"===u&&s()}return Y9(o)};function e7(e){return null==e}function t7(e){e=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{}),e.whiteList=e.whiteList||X9.whiteList,e.onAttr=e.onAttr||X9.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||X9.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||X9.safeAttrValue,this.options=e}t7.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,r=t.whiteList,n=t.onAttr,i=t.onIgnoreAttr,a=t.safeAttrValue;return Z9(e,(function(e,t,o,s,u){var c=r[o],l=!1;if(!0===c?l=c:"function"==typeof c?l=c(s):c instanceof RegExp&&(l=c.test(s)),!0!==l&&(l=!1),s=a(o,s)){var f,d={position:t,sourcePosition:e,source:u,isWhite:l};return l?e7(f=n(o,s,d))?o+":"+s:f:e7(f=i(o,s,d))?void 0:f}}))};var r7=t7,n7=J9((function(e,t){for(var r in t=e.exports=function(e,t){return new r7(t).process(e)},t.FilterCSS=r7,X9)t[r]=X9[r];"undefined"!=typeof window&&(window.filterCSS=e.exports)}));n7.cssfilter,n7.FilterCSS;var i7=function(e,t){var r,n;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},a7=function(e,t,r){var n,i;if(Array.prototype.forEach)return e.forEach(t,r);for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},o7=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},s7=function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1},u7=n7.FilterCSS,c7=n7.getDefaultWhiteList;function l7(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var f7=new u7;function d7(e){return e.replace(h7,"<").replace(p7,">")}var h7=/</g,p7=/>/g,v7=/"/g,b7=/"/g,g7=/&#([a-zA-Z0-9]*);?/gim,m7=/:?/gim,y7=/&newline;?/gim,w7=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,_7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,x7=/u\s*r\s*l\s*\(.*/gi;function k7(e){return e.replace(v7,""")}function S7(e){return e.replace(b7,'"')}function E7(e){return e.replace(g7,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function I7(e){return e.replace(m7,":").replace(y7," ")}function A7(e){for(var t="",r=0,n=e.length;r<n;r++)t+=e.charCodeAt(r)<32?" ":e.charAt(r);return o7(t)}function P7(e){return e=A7(e=I7(e=E7(e=S7(e))))}function T7(e){return e=d7(e=k7(e))}var O7=/<!--[\s\S]*?-->/g;var C7=function(e,t,r,n){if(r=P7(r),"href"===t||"src"===t){if("#"===(r=o7(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===t){if(w7.lastIndex=0,w7.test(r))return""}else if("style"===t){if(_7.lastIndex=0,_7.test(r))return"";if(x7.lastIndex=0,x7.test(r)&&(w7.lastIndex=0,w7.test(r)))return"";!1!==n&&(r=(n=n||f7).process(r))}return r=T7(r)},M7=function(e,t){"function"!=typeof t&&(t=function(){});var r=!Array.isArray(e),n=[],i=!1;return{onIgnoreTag:function(a,o,s){if(function(t){return!!r||-1!==i7(e,t)}(a)){if(s.isClosing){var u="[/removed]",c=s.position+u.length;return n.push([!1!==i?i:s.position,c]),i=!1,u}return i||(i=s.position),"[removed]"}return t(a,o,s)},remove:function(e){var t="",r=0;return a7(n,(function(n){t+=e.slice(r,n[0]),r=n[1]})),t+=e.slice(r)}}},R7=function(e){return e.replace(O7,"")},N7=function(e){var t=e.split("");return t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})),t.join("")},L7={whiteList:{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},getDefaultWhiteList:l7,onTag:function(e,t,r){},onIgnoreTag:function(e,t,r){},onTagAttr:function(e,t,r){},onIgnoreTagAttr:function(e,t,r){},safeAttrValue:C7,escapeHtml:d7,escapeQuote:k7,unescapeQuote:S7,escapeHtmlEntities:E7,escapeDangerHtml5Entities:I7,clearNonPrintableCharacter:A7,friendlyAttrValue:P7,escapeAttrValue:T7,onIgnoreTagStripAll:function(){return""},StripTagBody:M7,stripCommentTag:R7,stripBlankChar:N7,cssFilter:f7,getDefaultCSSWhiteList:c7};function j7(e){var t=s7(e);if(-1===t)var r=e.slice(1,-1);else r=e.slice(1,t+1);return"/"===(r=o7(r).toLowerCase()).slice(0,1)&&(r=r.slice(1)),"/"===r.slice(-1)&&(r=r.slice(0,-1)),r}function D7(e){return"</"===e.slice(0,2)}var B7=/[^a-zA-Z0-9_:\.\-]/gim;function U7(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"="===r?t:-1}}function F7(e,t){for(;t>0;t--){var r=e[t];if(" "!==r)return"="===r?t:-1}}function z7(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}var H7=function(e,t,r){var n="",i=0,a=!1,o=!1,s=0,u=e.length,c="",l="";e:for(s=0;s<u;s++){var f=e.charAt(s);if(!1===a){if("<"===f){a=s;continue}}else if(!1===o){if("<"===f){n+=r(e.slice(i,s)),a=s,i=s;continue}if(">"===f){n+=r(e.slice(i,a)),c=j7(l=e.slice(a,s+1)),n+=t(a,n.length,c,l,D7(l)),i=s+1,a=!1;continue}if('"'===f||"'"===f)for(var d=1,h=e.charAt(s-d);""===h.trim()||"="===h;){if("="===h){o=f;continue e}h=e.charAt(s-++d)}}else if(f===o){o=!1;continue}}return i<e.length&&(n+=r(e.substr(i))),n},q7=function(e,t){var r=0,n=[],i=!1,a=e.length;function o(e,r){if(!((e=(e=o7(e)).replace(B7,"").toLowerCase()).length<1)){var i=t(e,r||"");i&&n.push(i)}}for(var s=0;s<a;s++){var u,c=e.charAt(s);if(!1!==i||"="!==c)if(!1===i||s!==r||'"'!==c&&"'"!==c||"="!==e.charAt(s-1))if(/\s|\n|\t/.test(c)){if(e=e.replace(/\s|\n|\t/g," "),!1===i){if(-1===(u=U7(e,s))){o(o7(e.slice(r,s))),i=!1,r=s+1;continue}s=u-1;continue}if(-1===(u=F7(e,s-1))){o(i,z7(o7(e.slice(r,s)))),i=!1,r=s+1;continue}}else;else{if(-1===(u=e.indexOf(c,s+1)))break;o(i,o7(e.slice(r+1,u))),i=!1,r=(s=u)+1}else i=e.slice(r,s),r=s+1}return r<e.length&&(!1===i?o(e.slice(r)):o(i,z7(o7(e.slice(r))))),o7(n.join(" "))},V7={parseTag:H7,parseAttr:q7},K7=n7.FilterCSS,W7=V7.parseTag,J7=V7.parseAttr;function G7(e){return null==e}function $7(e){e=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=L7.onIgnoreTagStripAll),e.whiteList=e.whiteList||L7.whiteList,e.onTag=e.onTag||L7.onTag,e.onTagAttr=e.onTagAttr||L7.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||L7.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||L7.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||L7.safeAttrValue,e.escapeHtml=e.escapeHtml||L7.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new K7(e.css))}$7.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,r=t.whiteList,n=t.onTag,i=t.onIgnoreTag,a=t.onTagAttr,o=t.onIgnoreTagAttr,s=t.safeAttrValue,u=t.escapeHtml,c=this.cssFilter;t.stripBlankChar&&(e=L7.stripBlankChar(e)),t.allowCommentTag||(e=L7.stripCommentTag(e));var l=!1;if(t.stripIgnoreTagBody){l=L7.StripTagBody(t.stripIgnoreTagBody,i);i=l.onIgnoreTag}var f=W7(e,(function(e,t,l,f,d){var h,p={sourcePosition:e,position:t,isClosing:d,isWhite:r.hasOwnProperty(l)};if(!G7(h=n(l,f,p)))return h;if(p.isWhite){if(p.isClosing)return"</"+l+">";var v=function(e){var t=s7(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var r="/"===(e=o7(e.slice(t+1,-1)))[e.length-1];return r&&(e=o7(e.slice(0,-1))),{html:e,closing:r}}(f),b=r[l],g=J7(v.html,(function(e,t){var r,n=-1!==i7(b,e);return G7(r=a(l,e,t,n))?n?(t=s(l,e,t,c))?e+'="'+t+'"':e:G7(r=o(l,e,t,n))?void 0:r:r}));f="<"+l;return g&&(f+=" "+g),v.closing&&(f+=" /"),f+=">"}return G7(h=i(l,f,p))?u(f):h}),u);return l&&(f=l.remove(f)),f};var X7=$7,Y7=J9((function(e,t){function r(e,t){return new X7(t).process(e)}for(var n in(t=e.exports=r).filterXSS=r,t.FilterXSS=X7,L7)t[n]=L7[n];for(var n in V7)t[n]=V7[n];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)}));Y7.xss,Y7.filterXSS,Y7.FilterXSS;var Q7=t(t({},n7.getDefaultWhiteList()),{},{bottom:!0,left:!0,float:!0,overflow:!0,position:!0,right:!0,top:!0,transform:!0,opacity:!0,"transform-origin":!0,"flex-direction":!0,"flex-wrap":!0,"justify-content":!0,"align-items":!0,"white-space":!0,"line-height":!0});var Z7=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,eee=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,tee=/u\s*r\s*l\s*\(.*/gi,ree={whiteList:function(){var e=Y7.getDefaultWhiteList();return Object.keys(e).forEach((function(t){e[t].push("style"),e[t].push("class"),e[t].push("download")})),e}(),css:!1,stripIgnoreTagBody:!0,onTagAttr:function(e,t,r,n){if("style"===t)return"".concat(t,'="').concat(n7(r,{whiteList:Q7}).replace(/; /g,";"),'"');if("img"===e&&"src"===t&&function(e){return!!e.match(/^data:.+;base64,/)}(r)){var i=function(e){return e.split("base64,")[1]}(r);try{return atob(i),"".concat(t,'="').concat(r,'"')}catch(e){return t}}},safeAttrValue:function(e,t,r,n){if(r=Y7.friendlyAttrValue(r),"href"===t||"src"===t){if("#"===(r=function(e){if(String.prototype.trim)return e.trim();return e.replace(/(^\s*)|(\s*$)/g,"")}(r)))return"#";if(!function(e){return["http://","https://","mailto:","tel:","data:","#","/"].some((function(t){return e.substr(0,t.length)===t}))}(r))return""}else if("background"===t){if(Z7.lastIndex=0,Z7.test(r))return""}else if("style"===t){if(eee.lastIndex=0,eee.test(r))return"";if(tee.lastIndex=0,tee.test(r)&&(Z7.lastIndex=0,Z7.test(r)))return"";!1!==n&&(r=(n=n||Y7.getDefaultCSSWhiteList()).process(r))}return r=Y7.escapeAttrValue(r)}},nee=new Y7.FilterXSS(ree);function iee(e){return nee.process(e)}var aee="en";var oee={locale:aee},see={en:{errors:{errorLabel:"Error",invalidBlockcerts:"Not a valid Blockcerts credential. Please check with the issuer or recipient that has provided this credential.",invalidBlockcertsUrl:"Not a valid credential URL.",invalidFormatDragAndDrop:"Only JSON files are accepted",invalidUrl:"This does not seem to be a valid URL.",noDownloadLink:"No link provided for download!",noMetadata:"No metadata specified for this record",noShareUrl:"No URL to share!",noTransactionId:"No transaction ID"},text:{brandName:"Blockcerts",blockcertsHint:"Visit Blockcerts website",by:"by",certified:"Certified by",closeButton:"Click to close",downloadLink:"Download Record in JSON format",dragAndDropHint:"(you can also drag & drop your file).",fileUpload:"Choose JSON file",issued:"Issued on",issueDate:"Issue Date",issuerName:"Issuer",issuerPublicKey:"Issuer's public key",item:"Item",itemPlural:"Items",metadataButton:"View Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Recipient",share:"Share on",shareButton:"Share on Social Networks",signed:"Signed by",substepsListClose:"Hide",substepsListHint:"Toggle open list of substeps",transactionId:"Transaction ID",urlInput:"Enter the certificate URL",urlInputPlaceholder:"Certificate URL",verificationStepProgress:"Verifying step...",verify:"Verify",verifyAgain:"Verify again",verifyOther:"Verify another record",viewRecord:"View Record"},date:{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],pattern:"MM DD, YYYY"}},es:{errors:{errorLabel:"Error",invalidBlockcerts:"No es una credencial válida de Blockcerts. Verifique con el emisor o el destinatario que ha proporcionado esta credencial.",invalidBlockcertsUrl:"No es URL de certificado valido.",invalidFormatDragAndDrop:"Solo se aceptan archivos JSON",invalidUrl:"Esto no parece ser un URL válido.",noDownloadLink:"Enlace para descargar no proporcionado!",noMetadata:"No se han especificado metadatos para este registro",noShareUrl:"No hay URL para compartir!",noTransactionId:"No ID de transacción"},text:{brandName:"Blockcerts",blockcertsHint:"Visite el sitio web de Blockcerts",by:"por",certified:"Certificado por",closeButton:"Haz Click para cerrar",downloadLink:"Descarga el Registro en formato JSON",dragAndDropHint:"(también puedes arrastrar y soltar tu archivo).",fileUpload:"Escoge archivo JSON",issued:"Emitido el",issueDate:"Fecha de Emisión",issuerName:"Emisor",issuerPublicKey:"Llave publica del Emisor",item:"Elemento",itemPlural:"Elementos",metadataButton:"Ver Metadata",metadataTitle:"Metadata",motto:"Blockcerts, El Estándar Abierto para Credenciales Blockchain",recipient:"Recipiente",share:"Comparte en",shareButton:"Comparte en Redes Sociales",signed:"Firmado Por",substepsListClose:"Esconde",substepsListHint:"Pasa lista abierta de sub-pasos",transactionId:"ID de Transacción",urlInput:"Ingrese el URL del certificado",urlInputPlaceholder:"Certificado del URL",verificationStepProgress:"Paso de verificación...",verify:"Verifica",verifyAgain:"Verifica nuevamente",verifyOther:"Verifica otro registro",viewRecord:"Ver Registro"},date:{months:["enero","feb","marzo","abr","mayo","jun","jul","agosto","set","oct","nov","dic"],pattern:"MM DD, YYYY"}},fr:{errors:{errorLabel:"Erreur",invalidBlockcerts:"Ceci n'est pas un certificat Blockcerts valide. Veuillez s'il vous plaît contrôler avec l'organisme émetteur ou le récipiendaire de ce certificat.",invalidBlockcertsUrl:"Ceci n'est pas une URL de certificat valide.",invalidFormatDragAndDrop:"Seul le format JSON est accepté",invalidUrl:"URL invalide",noDownloadLink:"Aucun lien disponible pour le téléchargement!",noMetadata:"Ce certificat ne contient pas de métadata",noShareUrl:"Pas d'URL à partager!",noTransactionId:"Pas d'identifiant de transaction"},text:{brandName:"Blockcerts",blockcertsHint:"Visiter le site de Blockcerts",by:"par",certified:"Certifié par",closeButton:"Cliquer pour fermer",downloadLink:"Télécharger le certificat au format JSON",dragAndDropHint:"(vous pouvez aussi glisser et déposer votre fichier).",fileUpload:"Choisir un fichier JSON",issued:"Émis le",issueDate:"Date d'émission",issuerName:"Émetteur",issuerPublicKey:"Clé publique de l'émetteur",item:"point contrôlé",itemPlural:"points contrôlés",metadataButton:"Voir les métadata",metadataTitle:"Métadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titulaire",share:"Partager sur",shareButton:"Partager sur les réseaux sociaux",signed:"Signé par",substepsListClose:"Fermer",substepsListHint:"Afficher les sous-étapes",transactionId:"Identifiant de transaction",urlInput:"Entrez l'URL du certificat",urlInputPlaceholder:"URL du certificat",verificationStepProgress:"Vérification en cours...",verify:"Vérifier",verifyAgain:"Vérifier de nouveau",verifyOther:"Vérifier un autre certificat",viewRecord:"Voir le certificat"},date:{months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Aout","Sept","Oct","Nov","Déc"],pattern:"DD MM YYYY"}},it:{errors:{errorLabel:"Errore",invalidBlockcerts:"Non è una definizione valida di Blockcerts.",invalidBlockcertsUrl:"Non è un URL di certificato valido.",invalidFormatDragAndDrop:"Sono accettati solo file JSON",invalidUrl:"Questo non sembra essere un URL valido.",noDownloadLink:"Link per il download non fornito!",noMetadata:"Nessun Metadata specificato per questo record",noShareUrl:"Non c'è un URL da condividere!",noTransactionId:"Nessun ID transazione"},text:{brandName:"Blockcerts",blockcertsHint:"Visita il sito Web Blockcerts",by:"da",certified:"Certificato da",closeButton:"Fai clic per chiudere",downloadLink:"Scarica il Record in formato JSON",dragAndDropHint:"(puoi anche trascinare il file).",fileUpload:"Scegli il file JSON",issued:"Rilasciato il",issueDate:"Data",issuerName:"Organizzazione Issuer",issuerPublicKey:"Chiave pubblica del Issuer",item:"Elemento",itemPlural:"Elementi",metadataButton:"Visualizza Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titolare",share:"Condividi",shareButton:"Condividi sui Social Network",signed:"Firmato da",substepsListClose:"Nascondi",substepsListHint:"Mostra gli step secondari",transactionId:"ID transazione",urlInput:"Inserisci l'URL del certificato",urlInputPlaceholder:"URL del certificato",verificationStepProgress:"Step di verifica...",verify:"Verifica",verifyAgain:"Verifica di nuovo",verifyOther:"Verifica un altro record",viewRecord:"Visualizza il Record"},date:{months:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],pattern:"DD MM YYYY"}}};function uee(){return see}function cee(e,t,r,n){if(!e)return"";if(e.includes(".")){const r=e.split(".");e=r[0],t=r[1]}if(!t)return"";r&&n>1&&(t+="Plural");const i=uee();return i[oee.locale]?i[oee.locale][e]?i[oee.locale][e][t]?i[oee.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]"}function lee(e){var t=cee("date","pattern"),r=new Date(e),n=function(e,t){var r=cee("date","months");return e.replace("MM",r[t])}(t,r.getMonth());return n=function(e,t){return e.replace("DD",t)}(n,r.getDate()),n=function(e,t){return e.replace("YYYY",t)}(n,r.getFullYear()),n}function fee(e){return e.certificateDefinition}function dee(e){const t=fee(e);return t?t.issuedOn:""}function hee(e){return fee(e)?lee(dee(e)):""}function pee(e){const t=fee(e);return t?t.recipientFullName:""}function vee(e){const t=fee(e);return t?t.name:""}function bee(e){const t=fee(e);return t?t.issuer.name:""}function gee(e){const t=fee(e);return t?t.issuer.image:""}function mee(e){const t=fee(e);if(!t)return"";const{displayHtml:r,display:n}=t.certificateJson;if(r)return iee(r);if(n)switch(n.contentMediaType){case"text/html":return iee(n.content);case"image/png":case"image/jpeg":case"image/gif":case"image/bmp":return`<img src="data:${n.contentMediaType};${n.contentEncoding},${n.content}"/>`;case"application/pdf":return`<embed width="100%" height="100%" type="application/pdf" src="data:${n.contentMediaType};${n.contentEncoding},${n.content}"/>`;default:return""}return""}function yee(e){const t=fee(e);return t&&YB(t.recordLink)?t.recordLink:""}function wee(e){const t=yee(e);return t?W9.certificates.download(t):""}function _ee(e){const t=fee(e);if(t)try{return JSON.parse(t.metadataJson)}catch(e){return null}return null}function xee(e){const t=fee(e);return t?t.transactionLink:""}function kee(e){const t=fee(e);return t?t.transactionId:""}function See(e){const t=fee(e);if(t){const{chain:e}=t;return e.name}return""}function Eee(e){const t=See(e);return"Mocknet"===t||t.includes("Testnet")}function Iee(e){return e.verifiedSteps||[]}function Aee(e,t){return Iee(e).find((e=>e.code===t))}function Pee(e){return Iee(e).some((e=>e.status===XB.FAILURE))}function Tee(e){const t=fee(e);return t?t.certificateImage:""}function Oee(e){const t=fee(e);return t?t.subtitle:""}function Cee(e){const t=fee(e);return t?t.description:""}function Mee(e){const t=fee(e);return t?t.signatureImage:""}function Ree(e){const t=fee(e);return t?t.sealImage:""}function Nee(e){return e.finalStep}function Lee(e){const t=fee(e);return t?t.publicKey:""}function jee(e,r){switch(r.type){case Tt:return function(e,r){var n=r.payload.resetSteps;return t(t({},e),{},{verifiedSteps:n})}(e,r);case St:return function(e,r){return t(t({},e),r.payload.options)}(e,r);case Et:return function(e,r){return t(t(t({},e),r.payload),r.payload.certificateDefinition&&{verifiedSteps:W9.certificates.initializeVerificationSteps(r.payload.certificateDefinition)})}(e,r);case It:return function(e,r){return t(t({},e),{},{certificateDefinition:r.payload.definition})}(e,r);case At:return function(e,r){return t(t({},e),{},{input:t(t({},e.input),{},{certificateUrl:r.payload.url})})}(e,r);case Ct:return function(e,t){var r=t.payload,n=r.parentStepCode,i=r.status;return Aee(e,n).status=i,e}(e,r);case Pt:return function(e,r){return t(t({},e),{},{input:t(t({},e.input),{},{isValid:r.payload.isValid})})}(e,r);case Nt:return function(e,r){var n=r.payload.errorMessage;return t(t({},e),{},{errorMessage:n})}(e,r);case Lt:return function(e,r){return t(t({},e),{},{showVerificationModal:r.payload.showVerificationModal})}(e,r);case Ot:return function(e,t){var r,n,i,a=Aee(e,t.payload.parentStep);return r=a,n=t.payload,i=r.subSteps.findIndex((function(e){return e.code===n.code})),r.subSteps[i]=n,e}(e,r);case Mt:return function(e,r){return t(t({},e),{},{verificationStatus:r.payload.status})}(e,r);case Rt:return function(e,r){return t(t({},e),{},{finalStep:r.payload.finalStep})}(e,r);default:return e}}var Dee,Bee="card",Uee="full",Fee="bright",zee="dark";function Hee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t({input:{},verifiedSteps:[],finalStep:null,verificationStatus:XB.DEFAULT,showVerificationModal:!1,displayMode:Bee,theme:Fee},e)}var qee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hee(),t=[at];return et(jee,e,nt.apply(void 0,t))}();function Vee(e,n){var i=n.mapDispatchToProps,o=void 0===i?{}:i,u=n.mapStateToProps,f=void 0===u?function(){}:u,d=n.ownProps,h=void 0===d?{}:d;return function(n){c(u,n);var i=m(u);function u(){return a(this,u),i.apply(this,arguments)}return s(u,[{key:"mapDispatchToProps",value:function(){return function(e,t){if("function"==typeof e)return tt(e,t);if("object"!==r(e)||null===e)throw new Error($e(16));var n={};for(var i in e){var a=e[i];"function"==typeof a&&(n[i]=tt(a,t))}return n}(o,qee.dispatch)}},{key:"mapStateToProps",value:function(){return f(qee.getState())}},{key:"_render",value:function(r){var n=t(t(t({},this.mapDispatchToProps()),this.mapStateToProps()),r);return Fe(Dee||(Dee=w(["",""])),e(n))}},{key:"_stateChanged",value:function(e){this._requestRender()}}],[{key:"properties",get:function(){return h}}]),u}(function(e){return function(t){return function(t){c(n,t);var r=m(n);function n(){return a(this,n),r.apply(this,arguments)}return s(n,[{key:"connectedCallback",value:function(){var t=this;this.__storeUnsubscribe=e.subscribe((function(){return t._stateChanged(e.getState())})),this._stateChanged(e.getState()),y(l(n.prototype),"connectedCallback",this)&&y(l(n.prototype),"connectedCallback",this).call(this)}},{key:"disconnectedCallback",value:function(){this.__storeUnsubscribe(),y(l(n.prototype),"disconnectedCallback",this)&&y(l(n.prototype),"disconnectedCallback",this).call(this)}},{key:"_stateChanged",value:function(e){throw new Error("_stateChanged() not implemented")}}]),n}(t)}}(qee)(Ke))}function Kee(e){return{type:Nt,payload:{errorMessage:e}}}function Wee(e){return function(t){t({type:Pt,payload:{isValid:e}}),t(Kee(e?null:"errors.invalidUrl"))}}function Jee(e){return function(t,r){if(null!=e){var n=Aee(r(),e),i=n.status;i===XB.DEFAULT&&function(e){return e.subSteps.some((function(e){return e.status===XB.SUCCESS}))}(n)&&(i=XB.STARTED),i!==XB.DEFAULT&&function(e){return e.subSteps.every((function(e){return e.status===XB.SUCCESS}))}(n)&&(i=XB.SUCCESS),function(e){return e.subSteps.some((function(e){return e.status===XB.FAILURE}))}(n)&&(i=XB.FAILURE),t({type:Ct,payload:{parentStepCode:e,status:i}})}}}var Gee=new(function(){function e(){a(this,e),this.queue=[],this.dispatchCb=null,this.isExecuting=!1,this.intervalId=null,this.dispatchNext=this.dispatchNext.bind(this)}return s(e,[{key:"registerCb",value:function(e){this.dispatchCb=e}},{key:"push",value:function(e){this.queue.push(e)}},{key:"dispatchNext",value:function(){var e=this.queue.shift();e?this.dispatchCb(e):this.intervalId&&(this.isExecuting=!1,clearInterval(this.intervalId))}},{key:"execute",value:function(){!this.isExecuting&&this.queue.length&&(this.isExecuting=!0,this.intervalId=setInterval(this.dispatchNext,200))}}]),e}());function $ee(e){return function(r,n){var i=n().verifiedSteps.find((function(t){return t.subSteps.some((function(t){return t.code===e.code}))})).code,a=t(t(t({},e),e.errorMessage&&{errorMessage:e.errorMessage}),{},{parentStep:i}),o=function(e){return function(t){e({type:Ot,payload:t}),e(Jee(t.parentStep))}}(r);Gee.dispatchCb||Gee.registerCb(o),Gee.push(a),Gee.execute()}}function Xee(){return function(e,t){var r=fee(t()),n=[];r&&(n=W9.certificates.initializeVerificationSteps(r)),e({type:Tt,payload:{resetSteps:n}})}}function Yee(e){return{type:Mt,payload:{status:e}}}function Qee(e){return e.disableVerify}function Zee(e){return e.allowDownload}function ete(e){return e.allowSocialShare}function tte(e){return e.showMetadata}function rte(e){return e.displayMode}function nte(e){return e.theme}function ite(e){return e.locale}function ate(e){return e.explorerAPIs}function ote(e){return e.clickableUrls}function ste(e){return e.didResolverUrl}function ute(e){return"string"==typeof e&&(e={label:e}),{type:Rt,payload:{finalStep:e}}}function cte(){return function(){var e=i(Jt.mark((function e(t,r){var n,i,a;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Qee(n=r())){e.next=4;break}return console.warn("Verification is disabled"),e.abrupt("return");case 4:if(t({type:"VERIFY_CERTIFICATE"}),t(Yee(XB.STARTED)),t(Xee()),!(i=fee(n))){e.next=15;break}return W9.events.dispatch("certificate-verify",i),e.next=12,i.verify((function(e){t($ee(e))}));case 12:a=e.sent,t(ute(a.message)),t(Yee(a.status));case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}function lte(e){return{type:Lt,payload:{showVerificationModal:e}}}function fte(e){return function(t,r){return aU(this,void 0,void 0,(function*(){const n=r(),i={locale:ite(n),explorerAPIs:ate(n),didResolverUrl:ste(n)},{certificateDefinition:a,errorMessage:o}=yield W9.certificates.parse(e,i);t(Kee(o)),t({type:Et,payload:{certificateDefinition:a}}),W9.events.dispatch("certificate-load",a),null!=a&&(yield t((function(e,t){return aU(this,void 0,void 0,(function*(){(function(e){return e.disableAutoVerify})(t())||(e({type:kt}),e(lte(!0))),yield e(cte())}))})))}))}}function dte(e){return function(){var t=i(Jt.mark((function t(r){var n,i;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=W9.certificates.isPathToCertificateValidURI(e),r(Wee(n)),n){t.next=4;break}return t.abrupt("return",null);case 4:return r({type:At,payload:{url:e}}),t.next=7,W9.certificates.retrieve(e);case 7:if(!(i=t.sent).certificateDefinition){t.next=13;break}return t.next=11,r(fte(i.certificateDefinition));case 11:t.next=14;break;case 13:r(Kee(i.errorMessage));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}var hte=/(-\w)/g,pte=function(e){return e[1].toUpperCase()};var vte,bte={src:String,"disable-auto-verify":Boolean,"disable-verify":Boolean,"allow-download":Boolean,"allow-social-share":Boolean,"display-mode":String,"show-metadata":Boolean,"clickable-urls":Boolean,theme:0,locale:String,explorerAPIs:{},"did-resolver-url":String},gte=Object.keys(bte).map((function(e){return e.replace(hte,pte)})).reduce((function(e,t){return e[t]=bte[t],e}),{});function mte(e){var t,r=Object.keys(see).map((function(e){return e.toLowerCase()}));if(!(t=r.indexOf(e.toLowerCase())>-1)){var n=e.substr(0,2).toLowerCase(),i=r.map((function(e){return e.split("-")[0]})).indexOf(n);(t=i>-1)&&(e=r[i])}return t||(e=aee),function(e){var t=e.split("-");return t.length>1?"".concat(t[0].toLowerCase(),"-").concat(t[1].toUpperCase()):t[0].toLowerCase()}(e)}function yte(e){"auto"!==e&&e||(e=navigator.language||navigator.userLanguage||navigator.browserLanguage||aee),oee.locale=mte(e)}var wte,_te=Fe(vte||(vte=w(["<style>.buv-c-input{font-size:15px;color:#031532;border-radius:2px 0 0 2px;padding:12px 15px;background-color:#f3f4f5;border:solid 1px rgba(3,21,50,0.13);box-sizing:border-box;width:100%}.buv-c-input.is-invalid{border:2px solid #f00}.buv-c-input::-moz-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-c-input::-webkit-input-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-c-input:-moz-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-c-input:-ms-input-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"])));function xte(e){return void 0===e.input.isValid||e.input.isValid}var kte,Ste=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onInput,r=void 0===t?function(){}:t,n=e.isValid,i=void 0===n||n,a="buv-c-input ".concat(i?"":"is-invalid");return Fe(wte||(wte=w(["\n ","\n <label \n for='certificate-json-url'\n class='buv-u-visually-hidden'>","</label>\n <input \n type='text'\n id='certificate-json-url'\n placeholder='","'\n class$='","'\n on-input='","'\n />\n "])),_te,cee("text.urlInput"),cee("text.urlInputPlaceholder"),a,(function(e){r(e.target.value)}))}),{mapDispatchToProps:{onInput:dte},mapStateToProps:function(e){return{isValid:xte(e)}}});window.customElements.define("buv-input",Ste);var Ete,Ite=Fe(kte||(kte=w(["<style>.buv-c-verify-button{background-color:#2ab27b;border-radius:0 2px 2px 0;color:#fff;cursor:pointer;display:block;font-size:15px;font-weight:400;padding:12px 38px;border:1px solid #2ab27b;width:100%}.buv-c-verify-button__label{cursor:pointer}.buv-c-verify-button--hollow{background:#fff;color:#2ab27b;font-weight:100;text-transform:uppercase;padding:12px 30px;font-size:13px}.buv-c-verify-button--link{background:none;color:#031532;border:0;text-decoration:underline;padding:0;margin-top:5px;font-size:13px}.buv-c-verify-button.is-disabled{pointer-events:none}\n</style>"])));var Ate,Pte={onClick:function(){return function(e,t){e({type:"START_VERFICATION_PROCESS"}),e(lte(!0)),e(cte())}}},Tte=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isHollow,r=void 0!==t&&t,n=e.isDisabled,i=void 0!==n&&n,a=e.onClick,o=void 0===a?function(){}:a,s=e.type,u=void 0===s?"":s,c=["buv-c-verify-button",r?"buv-c-verify-button--hollow":"",i?"is-disabled":"","link"===u?"buv-c-verify-button--link":""].join(" ");return Fe(Ete||(Ete=w(["\n ","\n <button class$='","' on-click='","' disabled?='","'>\n <label class='buv-c-verify-button__label'><slot>","</slot></label>\n </button>\n "])),Ite,c,o,i,cee("text.verify"))}),{mapDispatchToProps:Pte,mapStateToProps:function(e){return{isDisabled:Qee(e)||!fee(e)}},ownProps:{isHollow:Boolean,type:String}});window.customElements.define("buv-verify-button",Tte);var Ote,Cte,Mte=Fe(Ate||(Ate=w(["<style>.buv-c-certificate-input{display:flex;width:100%;padding:40px 30px;background-color:rgba(255,255,255,0.1);border:1px solid rgba(0,0,0,0.1);box-sizing:border-box}@media only screen and (max-width: 600px){.buv-c-certificate-input{flex-direction:column;grid-row-gap:10px;height:162px;padding:30px;justify-content:space-between}}.buv-c-certificate-input__input{width:100%}\n</style>"]))),Rte=Vee((function(e){var t=e.showInput;return void 0===t||t?Fe(Ote||(Ote=w(["\n ",'\n <section class="buv-c-certificate-input buv-qa-certificate-input">\n <buv-input class="buv-c-certificate-input__input"></buv-input><buv-verify-button></buv-verify-button> \n </section>\n'])),Mte):null}),{mapStateToProps:function(e){return{showInput:!fee(e)}}});window.customElements.define("buv-certificate-input",Rte);var Nte,Lte=Fe(Cte||(Cte=w(['<style>.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:transparent}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-c-download-link{text-decoration:none;color:currentColor}.buv-c-download-link--icon{background-image:url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20id%3D%22Capa%5f1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20width%3D%22433.5px%22%20height%3D%22433.5px%22%20fill%3D%22%236e7e8e%22%20viewBox%3D%220%200%20433.5%20433.5%22%20style%3D%22enable-background%3Anew%200%200%20433.5%20433.5%3B%22%20xml%3Aspace%3D%22preserve%22%0A%09%3E%3Cg%3E%3Cg%20id%3D%22file-download%22%3E%3Cpath%20d%3D%22M395.25%2C153h-102V0h-153v153h-102l178.5%2C178.5L395.25%2C153z%20M38.25%2C382.5v51h357v-51H38.25z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");width:17px;height:17px;background-size:17px}.buv-c-download-link.is-disabled{pointer-events:none}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>'])));var jte=Vee((function(e){var t=e.downloadLink,r=e.display,n="plaintext"===(void 0===r?"":r),i=cee(t?"text.downloadLink":"errors.noDownloadLink"),a=["buv-c-download-link","buv-o-button-link",t?"":"is-disabled",n?"":"buv-c-download-link--icon"].join(" ");return Fe(Nte||(Nte=w(["\n ","\n <a class$='","' href='","' title$='","' aria-disabled?='","'>\n <span class$='","'>","</span>\n </a>"])),Lte,a,t,i,!t,n?"buv-o-button-link__label":"buv-u-visually-hidden",i)}),{mapStateToProps:function(e){return{downloadLink:wee(e)}},ownProps:{display:String}});window.customElements.define("buv-download-link",jte);var Dte;var Bte,Ute,Fte,zte,Hte,qte,Vte,Kte,Wte=Fe(Dte||(Dte=w(['<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:transparent}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-o-overlay{z-index:100;box-shadow:0 0 30px rgba(0,0,0,0.25);background-color:#fff}.buv-c-metadata-container{box-sizing:border-box;padding:47px;height:100%;width:400px;position:fixed;top:0;right:-400px;display:flex;flex-direction:column}.buv-c-metadata-container__close-button{top:52px;right:47px}.buv-c-metadata-container__title{border-bottom:solid 1px #e8e9eb;padding-bottom:38px;font-weight:300;margin:0 0 38px}.buv-c-metadata-link{padding:0}.buv-c-metadata-link--icon{background-image:url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%0A%09%20width%3D%22512px%22%20fill%3D%22%236e7e8e%22%20height%3D%22512px%22%20viewBox%3D%220%200%20512%20512%22%20enable-background%3D%22new%200%200%20512%20512%22%20xml%3Aspace%3D%22preserve%22%3E%0A%0A%3Cpath%20id%3D%22info-2-icon%22%20d%3D%22M255.998%2C90.001c91.74%2C0%2C166.002%2C74.241%2C166.002%2C165.998c0%2C91.741-74.245%2C166-166.002%2C166%0A%0A%09c-91.74%2C0-165.998-74.243-165.998-166C90%2C164.259%2C164.243%2C90.001%2C255.998%2C90.001%20M255.998%2C50.001%0A%0A%09C142.229%2C50.001%2C50%2C142.229%2C50%2C255.999c0%2C113.771%2C92.229%2C206%2C205.998%2C206c113.771%2C0%2C206.002-92.229%2C206.002-206%0A%0A%09C462%2C142.229%2C369.77%2C50.001%2C255.998%2C50.001L255.998%2C50.001z%20M285.822%2C367.567h-57.646V230.6h57.646V367.567z%20M257%2C202.268%0A%09c-17.522%2C0-31.729-14.206-31.729-31.73c0-17.522%2C14.206-31.729%2C31.729-31.729c17.524%2C0%2C31.728%2C14.206%2C31.728%2C31.729%0A%09C288.728%2C188.062%2C274.524%2C202.268%2C257%2C202.268z%22%2F%3E%3C%2Fsvg%3E");width:22px;height:22px;background-size:22px}.buv-c-metadata-list{margin:0;overflow:auto;flex:1}.buv-c-metadata-list__title{color:#999;line-height:15px}.buv-c-metadata-list__detail{margin:0 0 20px}.buv-c-metadata-list__detail-text{white-space:pre-wrap;word-wrap:break-word;font:inherit;margin:0}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}.buv-u-slide-from-right{opacity:0;-webkit-transition:right ease .5s, opacity .2s;-moz-transition:right ease .5s, opacity .2s;-ms-transition:right ease .5s, opacity .2s;-o-transition:right ease .5s, opacity .2s;transition:right ease .5s, opacity .2s}.buv-u-slide-from-right.is-active{right:0;opacity:1}\n</style>']))),Jte=Fe(Bte||(Bte=w(["<style>.buv-c-close-button{display:inline-block;overflow:hidden;cursor:pointer;border:0;width:20px;height:20px;position:absolute;background-color:transparent}.buv-c-close-button::before,.buv-c-close-button::after{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#000}.buv-c-close-button::before{transform:rotate(45deg)}.buv-c-close-button::after{transform:rotate(-45deg)}.buv-c-close-button--big{transform:scale(3)}.buv-c-close-button--hairline::before,.buv-c-close-button--hairline::after{height:1px}.buv-c-close-button--thick::before,.buv-c-close-button--thick::after{height:4px;margin-top:-2px}.buv-c-close-button--black::before,.buv-c-close-button--black::after{height:8px;margin-top:-4px}.buv-c-close-button--heavy::before,.buv-c-close-button--heavy::after{height:12px;margin-top:-6px}.buv-c-close-button--pointy::before,.buv-c-close-button--pointy::after{width:200%;left:-50%}.buv-c-close-button--rounded::before,.buv-c-close-button--rounded::after{border-radius:5px}.buv-c-close-button--blades::before,.buv-c-close-button--blades::after{border-radius:5px 0}.buv-c-close-button--warp::before,.buv-c-close-button--warp::after{border-radius:120% 0}.buv-c-close-button--fat::before,.buv-c-close-button--fat::after{border-radius:100%}.buv-c-close-button--position{position:relative}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),Gte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClick,r=void 0===t?function(){}:t,n=e.className,i=void 0===n?"":n,a="buv-c-close-button buv-c-close-button--hairline ".concat(i||"buv-c-close-button--position"," ");return Fe(Ute||(Ute=w(["\n ","\n <button onclick='","' class$='","'>\n <label class='buv-u-visually-hidden'>","</label>\n </button>\n "])),Jte,r,a,cee("text.closeButton"))};var $te=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.toggleOpen=e.toggleOpen.bind(b(e)),e}return s(r,[{key:"toggleOpen",value:function(){this.isOpen=!this.isOpen}},{key:"_render",value:function(e){var t=e.metadataList,r=e.display,n=["buv-o-overlay","buv-c-metadata-container","buv-u-slide-from-right",this.isOpen?"is-active":""].join(" "),i="";if(t){var a=function(e){return e.schema.properties.certificate.properties}(t);i=t.displayOrder.map((function(e){var r=e.split(".")[1],n=function(e,t){var r=t.split(".");return function e(t,r,n){var i=n.indexOf(r)+1,a=n[i];return a?Object.prototype.hasOwnProperty.call(t[r],a)?e(t[r],a,n):void 0:t[r]}(e,r[0],r)}(t,e);return function(e,t){var r=e.title,n=e.format,i=e.type;Array.isArray(i)&&(i=i[0]);var a=Fe(Fte||(Fte=w(["<dt class='buv-c-metadata-list__title'>","</dt>"])),r),o=!1,s="",u=t;if("string"===i)switch(n){case"uri":o=!0,s=t;break;case"email":s="mailto:".concat(t);break;case"phoneNumber":s="tel:".concat(t)}s&&(u=Fe(zte||(zte=w(['<a href="','" target="','" >',"</a>"])),s,o?"_blank":"",t));var c=Fe(Hte||(Hte=w(["<dd class='buv-c-metadata-list__detail'>\n <pre class='buv-c-metadata-list__detail-text'>","</pre></dd>"])),u);return Fe(qte||(qte=w(["","",""])),a,c)}(a[r],n)}))}var o="plaintext"===r,s=cee(t?"text.metadataButton":"errors.noMetadata"),u=["buv-c-metadata-link","buv-o-button-link",o?"":"buv-c-metadata-link--icon"].join(" ");return Fe(Vte||(Vte=w(["\n ","\n <button onclick='","' \n class$='","' \n disabled?='","' \n aria-disabled?='","'\n title$=",">\n <label class$='","'>","</label>\n </button>\n <section class$='","'>\n <h1 class='buv-c-metadata-container__title'>","</h1>\n ","\n <dl class='buv-c-metadata-list buv-o-text-12'>","</dl>\n </section>\n "])),Wte,this.toggleOpen,u,!t,!t,s,o?"buv-o-button-link__label":"buv-u-visually-hidden",s,n,cee("text.metadataTitle"),Gte({onClick:this.toggleOpen,className:"buv-c-metadata-container__close-button"}),i)}}],[{key:"properties",get:function(){return{isOpen:Boolean,metadataList:Object,display:String}}}]),r}(Ke);window.customElements.define("buv-metadata-raw",$te);var Xte,Yte=Vee((function(e){return Fe(Kte||(Kte=w(["\n <buv-metadata-raw\n metadataList='","'\n display='","'\n ></buv-metadata-raw>"])),e.metadataList,e.display)}),{mapStateToProps:function(e){return{metadataList:_ee(e)}},ownProps:{display:String}});window.customElements.define("buv-metadata",Yte);var Qte,Zte,ere,tre,rre,nre,ire=Fe(Xte||(Xte=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:transparent}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-overlay{z-index:100;box-shadow:0 0 30px rgba(0,0,0,0.25);background-color:#fff}.buv-c-social-share-link{width:17px;height:17px;background-size:17px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Capa_1' x='0px' y='0px' viewBox='0 0 473.932 473.932' style='enable-background:new 0 0 473.932 473.932;' xml:space='preserve' width='24px' height='24px'%3E%3Cg%3E%3Cg%3E%3Cpath d='M385.513,301.214c-27.438,0-51.64,13.072-67.452,33.09l-146.66-75.002 c1.92-7.161,3.3-14.56,3.3-22.347c0-8.477-1.639-16.458-3.926-24.224l146.013-74.656c15.725,20.924,40.553,34.6,68.746,34.6 c47.758,0,86.391-38.633,86.391-86.348C471.926,38.655,433.292,0,385.535,0c-47.65,0-86.326,38.655-86.326,86.326 c0,7.809,1.381,15.229,3.322,22.412L155.892,183.74c-15.833-20.039-40.079-33.154-67.56-33.154 c-47.715,0-86.326,38.676-86.326,86.369s38.612,86.348,86.326,86.348c28.236,0,53.043-13.719,68.832-34.664l145.948,74.656 c-2.287,7.744-3.947,15.79-3.947,24.289c0,47.693,38.676,86.348,86.326,86.348c47.758,0,86.391-38.655,86.391-86.348 C471.904,339.848,433.271,301.214,385.513,301.214z' fill='%236e7e8e'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\")}.buv-c-social-share-modal{position:absolute;padding:38px 34px 34px;width:120px}.buv-c-social-share-modal__close-button{top:10px;right:10px}.buv-c-social-share-modal__list{list-style-type:none;margin:0;padding:0}.buv-c-social-share-modal__list-item{margin-bottom:24px}.buv-c-social-share-modal__list-item--plaintext{margin-bottom:5px;font-size:13px}.buv-c-social-share-modal__list-item:last-child{margin-bottom:0}.buv-c-social-share-modal__link{text-decoration:none}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),are=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.toggleOpen=e.toggleOpen.bind(b(e)),e}return s(r,[{key:"toggleOpen",value:function(){this.isOpen=!this.isOpen}},{key:"sharingTemplate",value:function(e){var t=e.url,r=e.onShare,n=e.display;if(this.isOpen&&t){var i="plaintext"===n,a=[{name:"LinkedIn",shareUrl:"https://www.linkedin.com/shareArticle?url=".concat(t,"&mini=true")},{name:"Facebook",shareUrl:"https://www.facebook.com/sharer/sharer.php?u=".concat(t)},{name:"Twitter",shareUrl:"https://twitter.com/intent/tweet?url=".concat(t)}].map((function(e){return Fe(Qte||(Qte=w(["<li class$='buv-c-social-share-modal__list-item ","'>\n <a\n href='","'\n title='Share on ","'\n class='buv-o-link buv-c-social-share-modal__link'\n target='_blank'\n onclick='","'\n >\n <span>"," ","</span>\n </a>\n </li>"])),i?"buv-c-social-share-modal__list-item--plaintext":"",e.shareUrl,e.name,(function(){r(e.name)}),cee("text.share"),e.name)})),o=Fe(Zte||(Zte=w(["<ul class='buv-c-social-share-modal__list'>\n ","\n </ul>"])),a);return i?o:Fe(ere||(ere=w(["<div class='buv-c-social-share-modal buv-o-text-12 buv-o-overlay'>\n ","\n ","\n </div>"])),Gte({onClick:this.toggleOpen,className:"buv-c-social-share-modal__close-button"}),o)}}},{key:"sharingButton",value:function(e){var t=e.url;if("plaintext"!==e.display){var r=!!t,n=cee(r?"text.shareButton":"text.noShareUrl");return Fe(tre||(tre=w(["<button \n onclick='","'\n class='buv-c-social-share-link buv-o-button-link'\n disabled?='","'\n aria-disabled?='","'\n title$='","'\n >\n <label class='buv-u-visually-hidden'>","</label>\n </button>"])),this.toggleOpen,!r,!r,n,n)}this.isOpen=!0}},{key:"_render",value:function(e){return Fe(rre||(rre=w(["\n ","\n ","\n ","\n "])),ire,this.sharingButton(e),this.sharingTemplate(e))}}],[{key:"properties",get:function(){return{url:String,isOpen:String,onShare:Function,display:String}}}]),r}(Ke);window.customElements.define("buv-social-share-raw",are);var ore,sre={onShare:function(e){return function(t,r){var n=fee(r());W9.events.dispatch("certificate-share",n,{socialNetwork:e}),t({type:"SHARE_SOCIAL_NETWORK"})}}},ure=Vee((function(e){return Fe(nre||(nre=w(["\n <buv-social-share-raw\n url='","'\n onShare='","'\n display='","'\n ></buv-social-share-raw>"])),e.url,e.onShare,e.display)}),{mapDispatchToProps:sre,mapStateToProps:function(e){return{url:yee(e)}},ownProps:{display:String}});window.customElements.define("buv-social-share",ure);var cre,lre,fre,dre,hre,pre=Fe(ore||(ore=w(["<style>.buv-c-action-menu{display:flex;align-items:center;padding:0}.buv-c-action-menu-item{flex-basis:30px}\n</style>"]))),vre=Vee((function(e){var t=e.allowDownload,r=e.allowSocialShare,n=e.showMetadata,i=e.isVisible;return t||r||n||(i=!1),i?Fe(cre||(cre=w(["\n ","\n <menu class='buv-c-action-menu'>\n ","\n ","\n ","\n </menu>\n "])),pre,n?Fe(lre||(lre=w(["<menuitem class='buv-c-action-menu-item'><buv-metadata></buv-metadata></menuitem>"]))):"",t?Fe(fre||(fre=w(["<menuitem class='buv-c-action-menu-item'><buv-download-link></buv-download-link></menuitem>"]))):"",r?Fe(dre||(dre=w(["<menuitem class='buv-c-action-menu-item'><buv-social-share></buv-social-share></menuitem>"]))):""):null}),{mapStateToProps:function(e){return{allowDownload:Zee(e),allowSocialShare:ete(e),showMetadata:tte(e),isVisible:rte(e)===Uee&&!!fee(e)}}});window.customElements.define("buv-action-menu",vre);var bre,gre,mre,yre=Fe(hre||(hre=w(["<style>.buv-c-verification-modal__process{display:flex;justify-content:space-around}.buv-c-verification-modal__separator{margin-bottom:30px;background-color:rgba(3,21,50,0.05);height:1px;border:0 none}.buv-c-verification-modal__content{max-height:100vh;padding-bottom:43px;box-sizing:border-box;overflow:auto}@media only screen and (max-width: 600px){.buv-c-verification-modal__content{max-height:calc(100vh - 120px)}}\n</style>"]))),wre=Fe(bre||(bre=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),_re=!1,xre=!1;function kre(e){return function(){var t=i(Jt.mark((function t(r){var n;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:"UPLOAD_CERTIFICATE_DEFINITION"}),t.next=3,W9.certificates.read(e);case 3:n=t.sent,r(fte(JSON.parse(n)));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}var Sre,Ere=Vee((function(e){var t=e.onChange,r=void 0===t?function(){}:t,n=e.hideFileUpload;return void 0!==n&&n?null:Fe(gre||(gre=w(["\n ","\n <label for='buv-json-file-upload' class='buv-o-link buv-o-text-12'>\n <span class='buv-o-link__text--underline'>","</span>\n <input\n type='file'\n accept='application/json'\n id='buv-json-file-upload'\n class='buv-u-visually-hidden'\n onchange='","'\n />\n </label>\n ",""])),wre,cee("text.fileUpload"),(function(e){r(e.target.files[0])}),(_re?xre:(_re=!0,!("ontouchstart"in document.createElement("div"))&&(xre=!0)))?Fe(mre||(mre=w(['<span class="buv-o-text-12 qa-drag-and-drop-hint">',"</span>"])),cee("text.dragAndDropHint")):"")}),{mapDispatchToProps:{onChange:kre},mapStateToProps:function(e){return{hideFileUpload:fee(e)}}});function Ire(){return function(e){e(Xee()),e((function(e){e({type:"RESET_VERIFICATION_STATUS"}),e(Yee(XB.DEFAULT)),e(ute(null))})),e({type:It,payload:{definition:null}})}}window.customElements.define("buv-file-upload",Ere);var Are,Pre=Fe(Sre||(Sre=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-verify-other-certificate{display:block}\n</style>"])));var Tre,Ore=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClick,r=void 0===t?function(){}:t,n=e.isVisible,i=void 0!==n&&n;return i?Fe(Are||(Are=w(["\n ","\n <a onclick='","' class='buv-o-text-12 buv-o-link buv-c-verify-other-certificate buv-qa-verify-other-certificate'>\n <span class='buv-o-link__text--underline'>","</span>\n </a>\n "])),Pre,r,cee("text.verifyOther")):null}),{mapDispatchToProps:{onClick:Ire},mapStateToProps:function(e){return{isVisible:!!fee(e)}}});window.customElements.define("buv-verify-other-certificate",Ore);var Cre,Mre,Rre,Nre,Lre=Fe(Tre||(Tre=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-footer{width:100%;height:60px;background-color:rgba(0,0,0,0.1);color:#031532;fill:#111;display:flex;justify-content:space-between;align-items:center;padding:0 30px;box-sizing:border-box}.buv-c-footer a{line-height:1}.buv-c-footer--dark{color:#fff;fill:#fff}.buv-c-footer--forced{position:absolute;bottom:0;left:0;margin-top:0;justify-content:flex-end}\n</style>"]))),jre=Fe(Cre||(Cre=w(["<style>.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}.buv-c-logo{color:currentColor;text-decoration:none}.buv-c-logo--small{width:113px;height:16px}.buv-c-logo--medium{width:66%}.buv-c-logo__motto{font-size:12px}\n</style>"])));function Dre(){return Fe(Mre||(Mre=w(['\n <svg class=\'buv-qa-logo--simple buv-c-logo--small\' viewBox="0 0 113 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill-rule="evenodd" fill-opacity="0.37">\n <g id="blockcerts-logo" transform="translate(0.000000, -2.000000)" fill-rule="nonzero" fill="inherit">\n <path d="M19.5,5.06256945 L22.9958467,5.06256945 C24.617584,5.06256945 25.789567,5.29884552 26.5118308,5.77140473 C27.2340946,6.24396395 27.5952211,6.99038151 27.5952211,8.01067982 C27.5952211,8.69803869 27.4180141,9.26993416 27.0635947,9.72638339 C26.7091752,10.1828327 26.1990337,10.4701229 25.5331548,10.5882627 L25.5331548,10.6688121 C26.3601335,10.8245419 26.9682758,11.1319693 27.3576002,11.5911035 C27.7469246,12.0502377 27.9415838,12.6718049 27.9415838,13.4558236 C27.9415838,14.5137118 27.5724025,15.3420205 26.8340287,15.9407745 C26.0956549,16.5395285 25.0686595,16.8389011 23.7530117,16.8389011 L19.5,16.8389011 L19.5,5.06256945 Z M21.4251322,9.92775706 L23.2777698,9.92775706 C24.0832685,9.92775706 24.6712737,9.80022169 25.0418031,9.54514712 C25.4123325,9.29007254 25.5975944,8.85645225 25.5975944,8.24427327 C25.5975944,7.69116419 25.3975653,7.29110585 24.9975009,7.04408626 C24.5974366,6.79706667 23.9624447,6.67355873 23.0925061,6.67355873 L21.4251322,6.67355873 L21.4251322,9.92775706 Z M21.4251322,11.4904167 L21.4251322,15.2198568 L23.4710886,15.2198568 C24.2765872,15.2198568 24.8847296,15.0654719 25.2955339,14.7566974 C25.7063383,14.4479229 25.9117373,13.9606036 25.9117373,13.2947247 C25.9117373,12.6825457 25.7023108,12.2287882 25.2834515,11.9334387 C24.8645922,11.6380892 24.2282578,11.4904167 23.3744292,11.4904167 L21.4251322,11.4904167 Z M29.8953916,16.8389011 L29.8953916,5.06256945 L31.8205237,5.06256945 L31.8205237,15.1876371 L36.8065356,15.1876371 L36.8065356,16.8389011 L29.8953916,16.8389011 Z M48.4665536,10.9346254 C48.4665536,12.8517122 47.9872891,14.3418624 47.0287457,15.4051206 C46.0702024,16.4683789 44.7129575,17 42.9569704,17 C41.1795033,17 39.8142036,16.4724063 38.8610302,15.417203 C37.9078567,14.3619998 37.4312772,12.8624522 37.4312772,10.9185155 C37.4312772,8.97457869 37.9105417,7.48174356 38.8690851,6.43996528 C39.8276285,5.39818701 41.1956132,4.87730568 42.9730803,4.87730568 C44.7236973,4.87730568 46.0769148,5.40624187 47.0327734,6.46413012 C47.9886317,7.52201836 48.4665536,9.01216855 48.4665536,10.9346254 Z M39.4772336,10.9346254 C39.4772336,12.384523 39.7698937,13.4840121 40.3552227,14.2331259 C40.9405517,14.9822397 41.8077923,15.3567909 42.9569704,15.3567909 C44.1007786,15.3567909 44.9639915,14.9862671 45.5466357,14.2452083 C46.1292796,13.5041496 46.4205973,12.4006329 46.4205973,10.9346254 C46.4205973,9.49009776 46.1319648,8.39463599 45.5546906,7.64820724 C44.9774165,6.90177847 44.1168884,6.52856969 42.9730803,6.52856969 C41.8185322,6.52856969 40.9472642,6.90177847 40.3592502,7.64820724 C39.7712361,8.39463599 39.4772336,9.49009776 39.4772336,10.9346254 Z M55.5110875,6.54467959 C54.4048694,6.54467959 53.5349439,6.93668306 52.9012851,7.72070175 C52.267626,8.50472046 51.9508013,9.58675743 51.9508013,10.9668451 C51.9508013,12.4113727 52.2555437,13.5041496 52.8650377,14.2452083 C53.4745317,14.9862671 54.3565394,15.3567909 55.5110875,15.3567909 C56.0104969,15.3567909 56.4937888,15.3071193 56.960978,15.2077744 C57.4281673,15.1084296 57.9141441,14.9808942 58.4189233,14.8251645 L58.4189233,16.4764285 C57.4952848,16.8254779 56.4481523,17 55.2774942,17 C53.5537269,17 52.230044,16.4777762 51.3064055,15.4333129 C50.3827671,14.3888497 49.9209548,12.894672 49.9209548,10.9507353 C49.9209548,9.72637727 50.1451485,8.65508014 50.5935427,7.73681166 C51.041937,6.81854317 51.6903538,6.11508489 52.5388124,5.6264157 C53.3872709,5.13774651 54.3833893,4.89341558 55.5271976,4.89341558 C56.7300756,4.89341558 57.841647,5.14580137 58.8619454,5.65058054 L58.1692199,7.25351487 C57.7718405,7.06556518 57.3516451,6.90044043 56.9086208,6.75813566 C56.4655966,6.6158309 55.9997568,6.54467959 55.5110875,6.54467959 Z M69.4506556,16.8389011 L67.2194355,16.8389011 L63.522215,11.5065265 L62.3864676,12.4328454 L62.3864676,16.8389011 L60.4613353,16.8389011 L60.4613353,5.06256945 L62.3864676,5.06256945 L62.3864676,10.684922 C62.9127266,10.0405231 63.4362929,9.42029843 63.9571822,8.82422942 L67.1388858,5.06256945 L69.3298314,5.06256945 C67.2731248,7.47906546 65.7990842,9.20012177 64.9076657,10.2257901 L69.4506556,16.8389011 Z M75.6494201,5.63447064 C74.1726725,5.63447064 73.0100869,6.10702277 72.1616284,7.05214121 C71.3131696,7.99725964 70.8889467,9.29140808 70.8889467,10.9346254 C70.8889467,12.6154326 71.2890051,13.9203209 72.0891337,14.8493293 C72.8892625,15.7783378 74.0330533,16.242835 75.5205409,16.242835 C76.5086192,16.242835 77.4161342,16.1166421 78.2431127,15.8642525 L78.2431127,16.5891977 C77.4644642,16.8630673 76.4925103,17 75.3272222,17 C73.673265,17 72.3710617,16.4656939 71.4205732,15.3970657 C70.4700848,14.3284374 69.9948476,12.8356023 69.9948476,10.9185155 C69.9948476,9.72100746 70.2217264,8.66582002 70.6754907,7.75292154 C71.129255,6.84002305 71.781699,6.13522229 72.6328427,5.63849812 C73.4839862,5.14177394 74.4733922,4.89341558 75.6010904,4.89341558 C76.7502684,4.89341558 77.7786064,5.108212 78.6861348,5.53781129 L78.355882,6.27886635 C77.4966834,5.84926707 76.5945384,5.63447064 75.6494201,5.63447064 Z M86.8100316,16.8389011 L80.3741293,16.8389011 L80.3741293,5.06256945 L86.8100316,5.06256945 L86.8100316,5.81973441 L81.1957339,5.81973441 L81.1957339,10.2741198 L86.4958886,10.2741198 L86.4958886,11.0312847 L81.1957339,11.0312847 L81.1957339,16.0817361 L86.8100316,16.0817361 L86.8100316,16.8389011 Z M89.8029274,11.7079002 L89.8029274,16.8389011 L88.9813228,16.8389011 L88.9813228,5.06256945 L91.7844442,5.06256945 C93.2450817,5.06256945 94.3244339,5.33240746 95.0225327,5.87209156 C95.7206316,6.41177567 96.0696758,7.22397464 96.0696758,8.30871284 C96.0696758,9.09810153 95.8615917,9.76397044 95.4454173,10.3063395 C95.0292429,10.8487086 94.396936,11.2380272 93.5484774,11.4743068 L96.7462912,16.8389011 L95.7635877,16.8389011 L92.726873,11.7079002 L89.8029274,11.7079002 Z M89.8029274,10.9990649 L92.0502574,10.9990649 C93.0437059,10.9990649 93.814288,10.7775561 94.3620271,10.3345318 C94.909766,9.8915076 95.1836315,9.23772099 95.1836315,8.37315242 C95.1836315,7.4763639 94.9151361,6.82391977 94.378137,6.41580044 C93.8411379,6.00768112 92.9658423,5.80362452 91.7522245,5.80362452 L89.8029274,5.80362452 L89.8029274,10.9990649 Z M101.358231,16.8389011 L100.528572,16.8389011 L100.528572,5.8358443 L96.7024723,5.8358443 L96.7024723,5.06256945 L105.184331,5.06256945 L105.184331,5.8358443 L101.358231,5.8358443 L101.358231,16.8389011 Z M112.9377,13.8021863 C112.9377,14.7848947 112.576573,15.5635317 111.85431,16.1381207 C111.132046,16.7127098 110.172174,17 108.974666,17 C107.535509,17 106.431992,16.8415876 105.664083,16.5247582 L105.664083,15.7031536 C106.512542,16.062943 107.594579,16.242835 108.910227,16.242835 C109.876825,16.242835 110.64338,16.0213262 111.209914,15.5783019 C111.776448,15.1352777 112.059711,14.5539849 112.059711,13.8344061 C112.059711,13.3886968 111.965737,13.0195154 111.777788,12.7268509 C111.589838,12.4341864 111.283753,12.1670334 110.859524,11.9253838 C110.435294,11.6837342 109.812385,11.4232935 108.990776,11.144054 C107.787898,10.7305647 106.956904,10.2835196 106.49777,9.80290539 C106.038636,9.32229119 105.809072,8.68192935 105.809072,7.88180069 C105.809072,7.00112214 106.154089,6.28289661 106.844133,5.72710253 C107.534177,5.17130845 108.421555,4.89341558 109.506293,4.89341558 C110.612511,4.89341558 111.651589,5.10284209 112.623557,5.52170139 L112.325524,6.23053668 C111.348186,5.82241735 110.413821,5.61836075 109.522403,5.61836075 C108.652464,5.61836075 107.959746,5.8197324 107.444226,6.22248173 C106.928707,6.62523106 106.670952,7.17296194 106.670952,7.86569079 C106.670952,8.30066007 106.750158,8.65775912 106.908573,8.93699866 C107.066987,9.2162382 107.326085,9.46728151 107.685875,9.69013615 C108.045664,9.91299077 108.663204,10.1801438 109.538513,10.4916033 C110.456781,10.8084328 111.146815,11.1158602 111.608634,11.4138947 C112.070453,11.7119292 112.407415,12.0502335 112.619529,12.4288179 C112.831644,12.8074023 112.9377,13.2651872 112.9377,13.8021863 Z" id="BLOCKCERTS"></path>\n <path d="M10.9580699,13.4113689 C10.9580699,13.8630088 10.5919434,14.2291353 10.1403035,14.2291353 L0.81776652,14.2291353 C0.366126608,14.2291353 1.20000012e-07,13.8630088 1.2000001e-07,13.4113689 C1.2000001e-07,12.959729 0.366126608,12.5936025 0.81776652,12.5936025 L10.1403035,12.5936025 C10.5919434,12.5936025 10.9580699,12.959729 10.9580699,13.4113689 Z"></path>\n <path d="M14.2291354,13.411369 C14.2291354,13.8630089 13.8630089,14.2291354 13.411369,14.2291354 C12.9597291,14.2291354 12.5936026,13.8630089 12.5936026,13.411369 C12.5936026,12.9597291 12.9597291,12.5936026 13.411369,12.5936026 C13.8630089,12.5936026 14.2291354,12.9597291 14.2291354,13.411369 Z"></path>\n <path d="M9.4860908,16.6824348 C9.4860908,17.1340748 9.11996431,17.5002012 8.6683244,17.5002012 C8.21668449,17.5002012 7.850558,17.1340748 7.850558,16.6824348 C7.850558,16.2307949 8.21668449,15.8646684 8.6683244,15.8646684 C9.11996431,15.8646684 9.4860908,16.2307949 9.4860908,16.6824348 Z"></path>\n <path d="M14.2291356,6.869238 C14.2291356,7.32087791 13.8630092,7.6870044 13.4113692,7.6870044 C12.9597293,7.6870044 12.5936028,7.32087791 12.5936028,6.869238 C12.5936028,6.41759809 12.9597293,6.0514716 13.4113692,6.0514716 C13.8630092,6.0514716 14.2291356,6.41759809 14.2291356,6.869238 Z"></path>\n <path d="M1.63553264,6.8692384 C1.63553264,7.32087831 1.26940615,7.6870048 0.81776624,7.6870048 C0.366126328,7.6870048 -1.60000013e-07,7.32087831 -1.60000013e-07,6.8692384 C-1.60000013e-07,6.41759849 0.366126328,6.051472 0.81776624,6.051472 C1.26940615,6.051472 1.63553264,6.41759849 1.63553264,6.8692384 Z"></path><rect transform="translate(7.196344, 3.598172) rotate(90.000000) translate(-7.196344, -3.598172) " x="6.37857744" y="2.78040592" width="1.6355328" height="1.6355328" rx="0.8177664"></rect>\n <path d="M6.37857804,10.1403025 C6.37857804,10.5919424 6.01245155,10.9580689 5.56081164,10.9580689 C5.10917173,10.9580689 4.74304524,10.5919424 4.74304524,10.1403025 C4.74304524,9.68866261 5.10917173,9.32253612 5.56081164,9.32253612 C6.01245155,9.32253612 6.37857804,9.68866261 6.37857804,10.1403025 Z"></path>\n <path d="M14.2291348,3.5981724 C14.2291348,4.04981231 13.8630083,4.4159388 13.4113684,4.4159388 L10.4674093,4.4159388 C10.0157694,4.4159388 9.64964292,4.04981231 9.64964292,3.5981724 C9.64964292,3.14653249 10.0157694,2.780406 10.4674093,2.780406 L13.4113684,2.780406 C13.8630083,2.780406 14.2291348,3.14653249 14.2291348,3.5981724 Z"></path><rect transform="translate(2.371523, 3.598172) rotate(90.000000) translate(-2.371523, -3.598172) " x="1.55375644" y="1.226649" width="1.6355328" height="4.74304512" rx="0.8177664"></rect>\n <path d="M14.229135,10.140303 C14.229135,10.5919429 13.8630085,10.9580694 13.4113686,10.9580694 L8.83187672,10.9580694 C8.38023681,10.9580694 8.01411032,10.5919429 8.01411032,10.140303 C8.01411032,9.68866309 8.38023681,9.3225366 8.83187672,9.3225366 L13.4113686,9.3225366 C13.8630085,9.3225366 14.229135,9.68866309 14.229135,10.140303 Z"></path>\n <path d="M3.1075118,10.1403032 C3.1075118,10.5919431 2.74138531,10.9580696 2.2897454,10.9580696 L0.81776588,10.9580696 C0.366125968,10.9580696 -5.20000015e-07,10.5919431 -5.20000015e-07,10.1403032 C-5.20000015e-07,9.68866325 0.366125968,9.32253676 0.81776588,9.32253676 L2.2897454,9.32253676 C2.74138531,9.32253676 3.1075118,9.68866325 3.1075118,10.1403032 Z"></path>\n <path d="M14.2291356,16.6824352 C14.2291356,17.1340751 13.8630091,17.5002016 13.4113692,17.5002016 L11.9393897,17.5002016 C11.4877498,17.5002016 11.1216233,17.1340751 11.1216233,16.6824352 C11.1216233,16.2307953 11.4877498,15.8646688 11.9393897,15.8646688 L13.4113692,15.8646688 C13.8630091,15.8646688 14.2291356,16.2307953 14.2291356,16.6824352 Z"></path>\n <path d="M6.2150248,16.6824353 C6.2150248,17.1340752 5.84889831,17.5002017 5.3972584,17.5002017 L0.81776656,17.5002017 C0.366126648,17.5002017 1.59999985e-07,17.1340752 1.59999985e-07,16.6824353 C1.59999985e-07,16.2307954 0.366126648,15.8646689 0.81776656,15.8646689 L5.3972584,15.8646689 C5.84889831,15.8646689 6.2150248,16.2307954 6.2150248,16.6824353 Z"></path>\n <path d="M10.9580703,6.86923768 C10.9580703,7.32087759 10.5919438,7.68700408 10.1403039,7.68700408 L4.08883256,7.68700408 C3.63719265,7.68700408 3.27106616,7.32087759 3.27106616,6.86923768 C3.27106616,6.41759777 3.63719265,6.05147128 4.08883256,6.05147128 L10.1403039,6.05147128 C10.5919438,6.05147128 10.9580703,6.41759777 10.9580703,6.86923768 Z">\n </path> \n </g>\n </g> \n </svg>\n <span class=\'buv-u-visually-hidden\'>',"</span>\n "])),cee("text.brandname"))}function Bre(){return Fe(Rre||(Rre=w(['\n <svg class=\'buv-qa-logo--branded buv-c-logo--medium\' version="1.1" viewBox="0 0 686 163" xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(-76 -70)">\n <g transform="translate(76 53)">\n <path d="m119.52 35.613h21.191c9.8308 0 16.935 1.4323 21.313 4.2969 4.3783 2.8646 6.5674 7.3893 6.5674 13.574 0 4.1667-1.0742 7.6334-3.2227 10.4-2.1484 2.7669-5.2409 4.5085-9.2773 5.2246v0.48828c5.013 0.94402 8.6995 2.8076 11.06 5.5908 2.36 2.7832 3.54 6.5511 3.54 11.304 0 6.4128-2.2379 11.434-6.7139 15.063-4.4759 3.6296-10.701 5.4443-18.677 5.4443h-25.781v-71.387zm11.67 29.492h11.23c4.8828 0 8.4473-0.7731 10.693-2.3193s3.3691-4.1748 3.3691-7.8857c0-3.3529-1.2126-5.778-3.6377-7.2754-2.4251-1.4974-6.2744-2.2461-11.548-2.2461h-10.107v19.727zm0 9.4727v22.607h12.402c4.8828 0 8.5693-0.93586 11.06-2.8076 2.4902-1.8718 3.7354-4.8258 3.7354-8.8623 0-3.711-1.2695-6.4616-3.8086-8.252-2.5391-1.7904-6.3965-2.6855-11.572-2.6855h-11.816zm51.346 32.422v-71.387h11.67v61.377h30.225v10.01h-41.895zm112.58-35.791c0 11.621-2.9052 20.654-8.7158 27.1-5.8106 6.4453-14.038 9.668-24.683 9.668-10.775 0-19.051-3.1982-24.829-9.5947-5.778-6.3965-8.667-15.487-8.667-27.271s2.9052-20.833 8.7158-27.148c5.8106-6.3151 14.103-9.4727 24.878-9.4727 10.612 0 18.815 3.2063 24.609 9.6191s8.6914 15.446 8.6914 27.1zm-54.492 0c0 8.7891 1.7741 15.454 5.3223 19.995 3.5482 4.541 8.8053 6.8115 15.771 6.8115 6.9336 0 12.166-2.2461 15.698-6.7383 3.5319-4.4922 5.2979-11.182 5.2979-20.068 0-8.7566-1.7497-15.397-5.249-19.922-3.4994-4.5248-8.7158-6.7871-15.649-6.7871-6.9987 0-12.28 2.2623-15.845 6.7871s-5.3467 11.165-5.3467 19.922zm97.195-26.611c-6.7058 0-11.979 2.3763-15.82 7.1289-3.8412 4.7526-5.7617 11.312-5.7617 19.678 0 8.7566 1.8473 15.381 5.542 19.873 3.6947 4.4922 9.0413 6.7383 16.04 6.7383 3.0274 0 5.957-0.3011 8.7891-0.90332 2.832-0.60222 5.778-1.3753 8.8379-2.3193v10.01c-5.599 2.1159-11.947 3.1738-19.043 3.1738-10.449 0-18.473-3.1657-24.072-9.4971-5.599-6.3314-8.3984-15.389-8.3984-27.173 0-7.4219 1.359-13.916 4.0771-19.482 2.7181-5.5664 6.6487-9.8307 11.792-12.793s11.182-4.4434 18.115-4.4434c7.2917 0 14.03 1.5299 20.215 4.5898l-4.1992 9.7168c-2.4089-1.1393-4.956-2.1403-7.6416-3.0029-2.6856-0.86263-5.5094-1.2939-8.4717-1.2939zm84.5 62.402h-13.525l-22.412-32.324-6.8848 5.6152v26.709h-11.67v-71.387h11.67v34.082c3.1901-3.9063 6.3639-7.666 9.5215-11.279l19.287-22.803h13.281c-12.468 14.649-21.403 25.081-26.807 31.299l27.539 40.088zm37.576-67.92c-8.9519 0-15.999 2.8646-21.143 8.5938s-7.7148 13.574-7.7148 23.535c0 10.189 2.4251 18.099 7.2754 23.73 4.8503 5.6315 11.784 8.4473 20.801 8.4473 5.9896 0 11.491-0.76497 16.504-2.2949v4.3945c-4.7201 1.6602-10.612 2.4902-17.676 2.4902-10.026 0-17.92-3.2389-23.682-9.7168-5.7617-6.4779-8.6426-15.527-8.6426-27.148 0-7.2592 1.3753-13.656 4.126-19.189 2.7507-5.5339 6.7057-9.8063 11.865-12.817s11.157-4.5166 17.993-4.5166c6.9662 0 13.2 1.3021 18.701 3.9062l-2.002 4.4922c-5.2084-2.6042-10.677-3.9062-16.406-3.9062zm67.654 67.92h-39.014v-71.387h39.014v4.5898h-34.033v27.002h32.129v4.5898h-32.129v30.615h34.033v4.5898zm18.143-31.104v31.104h-4.9805v-71.387h16.992c8.8542 0 15.397 1.6357 19.629 4.9072s6.3477 8.195 6.3477 14.771c0 4.7852-1.2614 8.8216-3.7842 12.109-2.5228 3.2878-6.3558 5.6478-11.499 7.0801l19.385 32.52h-5.957l-18.408-31.104h-17.725zm0-4.2969h13.623c6.0222 0 10.693-1.3428 14.014-4.0283s4.9805-6.6487 4.9805-11.89c0-5.4362-1.6276-9.3913-4.8828-11.865-3.2552-2.474-8.5612-3.7109-15.918-3.7109h-11.816v31.494zm70.047 35.4h-5.0293v-66.699h-23.193v-4.6875h51.416v4.6875h-23.193v66.699zm70.193-18.408c0 5.9571-2.1891 10.677-6.5674 14.16-4.3783 3.4831-10.197 5.2246-17.456 5.2246-8.724 0-15.413-0.96028-20.068-2.8809v-4.9805c5.1433 2.181 11.702 3.2715 19.678 3.2715 5.8594 0 10.506-1.3428 13.94-4.0283 3.4343-2.6856 5.1514-6.2093 5.1514-10.571 0-2.7018-0.56966-4.9398-1.709-6.7139-1.1393-1.7741-2.9948-3.3935-5.5664-4.8584-2.5716-1.4649-6.3476-3.0436-11.328-4.7363-7.2917-2.5065-12.329-5.2165-15.112-8.1299s-4.1748-6.7952-4.1748-11.646c0-5.3386 2.0914-9.6924 6.2744-13.062 4.183-3.3692 9.5621-5.0537 16.138-5.0537 6.7058 0 13.005 1.2695 18.896 3.8086l-1.8066 4.2969c-5.9245-2.474-11.589-3.7109-16.992-3.7109-5.2735 0-9.4726 1.2207-12.598 3.6621-3.125 2.4414-4.6875 5.7617-4.6875 9.9609 0 2.6367 0.48014 4.8014 1.4404 6.4941 0.96029 1.6927 2.5309 3.2145 4.7119 4.5654 2.181 1.3509 5.9245 2.9704 11.23 4.8584 5.5664 1.9206 9.7493 3.7842 12.549 5.5908 2.7995 1.8066 4.8421 3.8574 6.1279 6.1523 1.2858 2.2949 1.9287 5.07 1.9287 8.3252z" fill="#182650" fill-rule="nonzero"/>\n <rect transform="translate(33.5 82) rotate(90) translate(-33.5 -82)" x="28.5" y="48.5" width="10" height="67" rx="5" fill="#2AB27B"/>\n <rect transform="translate(82 82) rotate(90) translate(-82 -82)" x="77" y="77" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(53 102) rotate(90) translate(-53 -102)" x="48" y="97" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(82 42) rotate(90) translate(-82 -42)" x="77" y="37" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(5 42) rotate(90) translate(-5 -42)" y="37" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(44 22) rotate(90) translate(-44 -22)" x="39" y="17" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(34 62) rotate(90) translate(-34 -62)" x="29" y="57" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(73 22) rotate(90) translate(-73 -22)" x="68" y="8" width="10" height="28" rx="5" fill="#2AB27B"/>\n <rect transform="translate(14.5 22) rotate(90) translate(-14.5 -22)" x="9.5" y="7.5" width="10" height="29" rx="5" fill="#2AB27B"/>\n <rect transform="translate(68 62) rotate(90) translate(-68 -62)" x="63" y="43" width="10" height="38" rx="5" fill="#2AB27B"/>\n <rect transform="translate(9.5 62) rotate(90) translate(-9.5 -62)" x="4.5" y="52.5" width="10" height="19" rx="5" fill="#2AB27B"/>\n <rect transform="translate(77.5 102) rotate(90) translate(-77.5 -102)" x="72.5" y="92.5" width="10" height="19" rx="5" fill="#2AB27B"/>\n <rect transform="translate(19 102) rotate(90) translate(-19 -102)" x="14" y="83" width="10" height="38" rx="5" fill="#2AB27B"/>\n <rect transform="translate(43.5 42) rotate(90) translate(-43.5 -42)" x="38.5" y="18.5" width="10" height="47" rx="5" fill="#2AB27B"/>\n <path d="m10.013 172h-2.6147v-20.164h-7.1213v-2.3225h16.857v2.3225h-7.1213v20.164zm21.656 0v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762s-1.6047-1.0151-2.9377-1.0151c-1.7739 0-3.0685 0.48193-3.8837 1.4458s-1.2228 2.543-1.2228 4.7373v8.8132h-2.5532v-23.933h2.5532v7.2444c0 0.87159-0.041015 1.5945-0.12305 2.1687h0.15381c0.50244-0.81006 1.2176-1.4484 2.1456-1.9149 0.92798-0.46656 1.9867-0.69983 3.1761-0.69983 2.061 0 3.6068 0.48962 4.6373 1.4689 1.0305 0.97925 1.5458 2.5353 1.5458 4.6681v10.997h-2.5532zm14.919 0.30762c-2.4917 0-4.4579-0.75878-5.8986-2.2764-1.4407-1.5176-2.161-3.6247-2.161-6.3215 0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826s-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm39.329 3.7529c0 3.5991-0.91003 6.4292-2.7301 8.4902-1.8201 2.061-4.3502 3.0916-7.5905 3.0916-3.312 0-5.8678-1.0126-7.6674-3.0377-1.7996-2.0252-2.6993-4.8834-2.6993-8.5748 0-3.6607 0.90233-6.4984 2.707-8.5133 1.8047-2.0149 4.3681-3.0223 7.6904-3.0223 3.23 0 5.7524 1.0254 7.5674 3.0762 1.815 2.0508 2.7224 4.8808 2.7224 8.4902zm-17.919 0c0 3.0454 0.64855 5.3551 1.9457 6.9291 1.2971 1.574 3.1813 2.361 5.6525 2.361 2.4917 0 4.3733-0.78442 5.6448-2.3533 1.2715-1.5689 1.9072-3.8811 1.9072-6.9368 0-3.0249-0.63317-5.3192-1.8995-6.8829-1.2664-1.5637-3.1402-2.3456-5.6217-2.3456-2.4917 0-4.3861 0.78698-5.6832 2.361-1.2971 1.574-1.9457 3.8631-1.9457 6.8676zm30.393 11.582c-1.0972 0-2.0995-0.20251-3.007-0.60754-0.90748-0.40503-1.6688-1.028-2.2841-1.8688h-0.18457c0.12305 0.98438 0.18457 1.9175 0.18457 2.7993v6.9368h-2.5532v-24.425h2.0764l0.35376 2.3071h0.12305c0.65625-0.92286 1.4202-1.5894 2.2917-1.9995 0.87159-0.41016 1.8713-0.61523 2.9993-0.61523 2.2354 0 3.9606 0.76391 5.1757 2.2917s1.8226 3.6709 1.8226 6.4292c0 2.7686-0.61779 4.9193-1.8534 6.4523-1.2356 1.533-2.9506 2.2994-5.1449 2.2994zm-0.36914-15.304c-1.7227 0-2.9685 0.4768-3.7375 1.4304s-1.1638 2.4712-1.1843 4.5527v0.56909c0 2.3687 0.39477 4.0631 1.1843 5.0834s2.0559 1.5304 3.7991 1.5304c1.4561 0 2.5968-0.58959 3.4222-1.7688 0.82544-1.1792 1.2382-2.8044 1.2382-4.8757 0-2.1021-0.41272-3.7145-1.2382-4.8373-0.82544-1.1228-1.9867-1.6842-3.4838-1.6842zm18.949 15.304c-2.4917 0-4.4579-0.75878-5.8986-2.2764s-2.161-3.6247-2.161-6.3215c0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826-0.80494 0.16919-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm22.779 15.027v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762-0.62549-0.67676-1.6047-1.0151-2.9377-1.0151-1.7637 0-3.0557 0.4768-3.876 1.4304-0.82032 0.95362-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689 1.0254 0.97925 1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm29.054-5.9832c0 1.979-0.71777 3.5222-2.1533 4.6296-1.4356 1.1074-3.3838 1.6611-5.8447 1.6611-2.666 0-4.7168-0.3435-6.1523-1.0305v-2.5225c0.92286 0.38965 1.9277 0.69726 3.0146 0.92285 1.0869 0.22559 2.1636 0.33838 3.23 0.33838 1.7432 0 3.0557-0.33068 3.9375-0.99206 0.88184-0.66138 1.3228-1.5817 1.3228-2.7609 0-0.7793-0.15637-1.4176-0.46912-1.9149-0.31274-0.49732-0.83569-0.95617-1.5688-1.3766-0.73316-0.42041-1.8483-0.89722-3.3453-1.4304-2.0918-0.74854-3.5863-1.6355-4.4835-2.6609s-1.3458-2.3635-1.3458-4.0144c0-1.7329 0.65112-3.1121 1.9534-4.1375 1.3023-1.0254 3.0249-1.5381 5.168-1.5381 2.2354 0 4.2912 0.41015 6.1677 1.2305l-0.81518 2.2764c-1.856-0.7793-3.6606-1.1689-5.4141-1.1689-1.3843 0-2.4661 0.29736-3.2454 0.89209s-1.1689 1.4202-1.1689 2.4763c0 0.7793 0.14355 1.4176 0.43066 1.9149s0.7716 0.95361 1.4535 1.3689 1.7252 0.87414 3.13 1.3766c2.3584 0.84082 3.9811 1.7432 4.868 2.707s1.3304 2.2148 1.3304 3.7529zm9.6592 4.1836c0.45117 0 0.88696-0.033324 1.3074-0.099975s0.75366-0.13586 0.99976-0.20764v1.9534c-0.27686 0.1333-0.68445 0.24353-1.2228 0.33069-0.53833 0.087159-1.0228 0.13074-1.4535 0.13074-3.2608 0-4.8911-1.7175-4.8911-5.1526v-10.028h-2.4148v-1.2305l2.4148-1.0613 1.0767-3.5991h1.4766v3.9067h4.8911v1.9841h-4.8911v9.9207c0 1.0151 0.24096 1.7944 0.7229 2.3379s1.1433 0.81518 1.9841 0.81518zm16.042 1.7996l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613s1.9816-0.38452 2.9762-0.38452c2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072s1.3407 0.7229 2.3456 0.7229zm24.456 1.7996v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762s-1.6047-1.0151-2.9377-1.0151c-1.7637 0-3.0557 0.4768-3.876 1.4304-0.82032 0.95362-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689s1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm19.272-2.261h-0.13843c-1.1792 1.7124-2.9429 2.5686-5.291 2.5686-2.2046 0-3.9196-0.75365-5.1449-2.261-1.2253-1.5073-1.838-3.6504-1.838-6.4292 0-2.7788 0.61523-4.9372 1.8457-6.4753 1.2305-1.5381 2.9429-2.3071 5.1372-2.3071 2.2866 0 4.04 0.83056 5.2603 2.4917h0.19995l-0.10767-1.2151-0.061523-1.1843v-6.8599h2.5532v23.933h-2.0764l-0.33838-2.261zm-5.1064 0.43066c1.7432 0 3.007-0.47424 3.7914-1.4227s1.1766-2.4789 1.1766-4.5912v-0.53833c0-2.3892-0.39734-4.0939-1.192-5.1141s-2.0636-1.5304-3.8068-1.5304c-1.4971 0-2.6429 0.5819-3.4376 1.7457s-1.192 2.807-1.192 4.9296c0 2.1533 0.39477 3.7786 1.1843 4.8757 0.78955 1.0972 1.9482 1.6458 3.4761 1.6458zm23.302 1.8303l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613 0.98951-0.25635 1.9816-0.38452 2.9762-0.38452 2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072 0.55884 0.48194 1.3407 0.7229 2.3456 0.7229zm20.61-15.365c0.74854 0 1.4202 0.061523 2.0149 0.18457l-0.35376 2.3687c-0.69727-0.15381-1.3125-0.23071-1.8457-0.23071-1.3638 0-2.5301 0.5537-3.4991 1.6611-0.969 1.1074-1.4535 2.4866-1.4535 4.1375v9.0439h-2.5532v-16.857h2.1072l0.29224 3.1223h0.12305c0.62549-1.0972 1.3791-1.9431 2.261-2.5378 0.88184-0.59473 1.8508-0.89209 2.907-0.89209zm16.011 14.904h-0.13843c-1.1792 1.7124-2.9429 2.5686-5.291 2.5686-2.2046 0-3.9195-0.75365-5.1449-2.261s-1.838-3.6504-1.838-6.4292c0-2.7788 0.61523-4.9372 1.8457-6.4753 1.2305-1.5381 2.9429-2.3071 5.1372-2.3071 2.2866 0 4.04 0.83056 5.2603 2.4917h0.19995l-0.10767-1.2151-0.061524-1.1843v-6.8599h2.5532v23.933h-2.0764l-0.33838-2.261zm-5.1064 0.43066c1.7432 0 3.007-0.47424 3.7914-1.4227 0.78443-0.94849 1.1766-2.4789 1.1766-4.5912v-0.53833c0-2.3892-0.39734-4.0939-1.192-5.1141-0.79468-1.0203-2.0636-1.5304-3.8068-1.5304-1.4971 0-2.6429 0.5819-3.4376 1.7457-0.79468 1.1638-1.192 2.807-1.192 4.9296 0 2.1533 0.39477 3.7786 1.1843 4.8757 0.78956 1.0972 1.9482 1.6458 3.4761 1.6458zm24.117 1.8303h-2.6147v-22.487h12.535v2.3225h-9.9207v8.2288h9.3208v2.3225h-9.3208v9.613zm27.809-8.4441c0 2.7481-0.69213 4.8937-2.0764 6.4369-1.3843 1.5432-3.2966 2.3148-5.7371 2.3148-1.5073 0-2.8455-0.35376-4.0144-1.0613s-2.0713-1.7226-2.707-3.0454c-0.63575-1.3228-0.95361-2.8711-0.95361-4.645 0-2.7481 0.687-4.8885 2.061-6.4215 1.374-1.533 3.2812-2.2994 5.7217-2.2994 2.3584 0 4.2323 0.78442 5.6217 2.3533 1.3894 1.5689 2.0841 3.6914 2.0841 6.3677zm-12.843 0c0 2.1533 0.43066 3.7939 1.292 4.9219 0.86133 1.1279 2.1277 1.6919 3.7991 1.6919s2.9403-0.5614 3.8068-1.6842c0.86646-1.1228 1.2997-2.766 1.2997-4.9296 0-2.1431-0.43322-3.7709-1.2997-4.8834-0.86646-1.1126-2.1456-1.6688-3.8375-1.6688-1.6714 0-2.9326 0.54858-3.7837 1.6458-0.85108 1.0972-1.2766 2.7327-1.2766 4.9065zm25.009-8.7209c0.74854 0 1.4202 0.061523 2.0149 0.18457l-0.35376 2.3687c-0.69727-0.15381-1.3125-0.23071-1.8457-0.23071-1.3638 0-2.5301 0.5537-3.4991 1.6611-0.969 1.1074-1.4535 2.4866-1.4535 4.1375v9.0439h-2.5532v-16.857h2.1072l0.29224 3.1223h0.12305c0.62549-1.0972 1.3791-1.9431 2.261-2.5378 0.88184-0.59473 1.8508-0.89209 2.907-0.89209zm13.735-5.3218h6.3523c2.9839 0 5.1423 0.44604 6.4753 1.3381 1.333 0.8921 1.9995 2.302 1.9995 4.2297 0 1.333-0.3717 2.4327-1.1151 3.2992s-1.8278 1.4279-3.2531 1.6842v0.15381c3.4146 0.58448 5.1218 2.3789 5.1218 5.3833 0 2.0098-0.67931 3.5786-2.038 4.7065-1.3586 1.1279-3.2582 1.6919-5.6986 1.6919h-7.8442v-22.487zm2.6147 9.6284h4.3066c1.8457 0 3.1736-0.28967 3.9836-0.86902 0.81006-0.57935 1.2151-1.556 1.2151-2.9301 0-1.2612-0.45117-2.1713-1.3535-2.7301-0.90235-0.55884-2.3379-0.83826-4.3066-0.83826h-3.8452v7.3674zm0 2.2148v8.4133h4.6912c1.815 0 3.1813-0.35119 4.099-1.0536 0.91773-0.7024 1.3766-1.8021 1.3766-3.2992 0-1.3945-0.46911-2.4199-1.4073-3.0762-0.93824-0.65625-2.3661-0.98438-4.2836-0.98438h-4.4758zm19.964 10.644h-2.5532v-23.933h2.5532v23.933zm19.964-8.4441c0 2.7481-0.69213 4.8937-2.0764 6.4369-1.3843 1.5432-3.2966 2.3148-5.7371 2.3148-1.5073 0-2.8455-0.35376-4.0144-1.0613s-2.0713-1.7226-2.707-3.0454c-0.63575-1.3228-0.95361-2.8711-0.95361-4.645 0-2.7481 0.687-4.8885 2.061-6.4215 1.374-1.533 3.2812-2.2994 5.7217-2.2994 2.3584 0 4.2323 0.78442 5.6217 2.3533 1.3894 1.5689 2.0841 3.6914 2.0841 6.3677zm-12.843 0c0 2.1533 0.43066 3.7939 1.292 4.9219 0.86133 1.1279 2.1277 1.6919 3.7991 1.6919s2.9403-0.5614 3.8068-1.6842c0.86646-1.1228 1.2997-2.766 1.2997-4.9296 0-2.1431-0.43322-3.7709-1.2997-4.8834-0.86646-1.1126-2.1456-1.6688-3.8375-1.6688-1.6714 0-2.9326 0.54858-3.7837 1.6458-0.85108 1.0972-1.2766 2.7327-1.2766 4.9065zm24.056 8.7517c-2.4404 0-4.3297-0.75109-5.6678-2.2533-1.3381-1.5022-2.0072-3.6273-2.0072-6.3754 0-2.8198 0.67931-4.9988 2.038-6.5369 1.3586-1.5381 3.2941-2.3071 5.8063-2.3071 0.81006 0 1.6201 0.087157 2.4302 0.26148 0.81006 0.17432 1.4458 0.37939 1.9072 0.61523l-0.78442 2.1687c-0.56397-0.22559-1.1792-0.41272-1.8457-0.5614-0.66651-0.14868-1.2561-0.22302-1.7688-0.22302-3.4248 0-5.1372 2.1841-5.1372 6.5522 0 2.0713 0.41784 3.6606 1.2535 4.7681 0.8357 1.1074 2.0738 1.6611 3.7145 1.6611 1.4048 0 2.8455-0.30249 4.322-0.90747v2.261c-1.1279 0.58448-2.5481 0.87671-4.2605 0.87671zm10.782-8.9363c0.44092-0.62549 1.1125-1.4458 2.0149-2.4609l5.4448-5.7678h3.03l-6.8291 7.1829 7.3059 9.6746h-3.0916l-5.9524-7.9673-1.9226 1.6611v6.3062h-2.5225v-23.933h2.5225v12.689c0 0.56397-0.041015 1.4355-0.12305 2.6147h0.12305zm20.118 8.9363c-2.4404 0-4.3297-0.75109-5.6678-2.2533-1.3381-1.5022-2.0072-3.6273-2.0072-6.3754 0-2.8198 0.67932-4.9988 2.038-6.5369 1.3586-1.5381 3.2941-2.3071 5.8063-2.3071 0.81006 0 1.6201 0.087157 2.4302 0.26148 0.81006 0.17432 1.4458 0.37939 1.9072 0.61523l-0.78442 2.1687c-0.56397-0.22559-1.1792-0.41272-1.8457-0.5614-0.66651-0.14868-1.2561-0.22302-1.7688-0.22302-3.4248 0-5.1372 2.1841-5.1372 6.5522 0 2.0713 0.41784 3.6606 1.2535 4.7681 0.8357 1.1074 2.0738 1.6611 3.7145 1.6611 1.4048 0 2.8455-0.30249 4.322-0.90747v2.261c-1.1279 0.58448-2.5481 0.87671-4.2605 0.87671zm19.795-0.30762v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762-0.62549-0.67676-1.6047-1.0151-2.9377-1.0151-1.7739 0-3.0685 0.48193-3.8837 1.4458-0.81519 0.96387-1.2228 2.543-1.2228 4.7373v8.8132h-2.5532v-23.933h2.5532v7.2444c0 0.87159-0.041015 1.5945-0.12305 2.1687h0.15381c0.50244-0.81006 1.2176-1.4484 2.1456-1.9149s1.9867-0.69983 3.1761-0.69983c2.061 0 3.6068 0.48962 4.6373 1.4689s1.5458 2.5353 1.5458 4.6681v10.997h-2.5532zm18.165 0l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613 0.98951-0.25635 1.9816-0.38452 2.9762-0.38452 2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072 0.55884 0.48194 1.3407 0.7229 2.3456 0.7229zm15.473 1.7996h-2.5532v-16.857h2.5532v16.857zm-2.7686-21.426c0-0.58448 0.14355-1.0126 0.43066-1.2843 0.28711-0.27173 0.64599-0.40759 1.0767-0.40759 0.41016 0 0.76391 0.13843 1.0613 0.41528 0.29736 0.27686 0.44604 0.70239 0.44604 1.2766s-0.14868 1.0023-0.44604 1.2843c-0.29736 0.28198-0.65112 0.42297-1.0613 0.42297-0.43067 0-0.78955-0.14099-1.0767-0.42297-0.28711-0.28198-0.43066-0.71008-0.43066-1.2843zm19.718 21.426v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762-0.62549-0.67676-1.6047-1.0151-2.9377-1.0151-1.7637 0-3.0557 0.4768-3.876 1.4304s-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689s1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm25.994-20.472c-2.4712 0-4.422 0.82287-5.8524 2.4686-1.4304 1.6458-2.1456 3.899-2.1456 6.7599 0 2.9429 0.68957 5.2167 2.0687 6.8214s3.3453 2.4071 5.8986 2.4071c1.5689 0 3.3581-0.28198 5.3679-0.84595v2.2917c-1.5586 0.58448-3.4812 0.87671-5.7678 0.87671-3.312 0-5.8678-1.0049-7.6674-3.0146-1.7996-2.0098-2.6993-4.8655-2.6993-8.5671 0-2.3174 0.43322-4.3476 1.2997-6.0908 0.86646-1.7432 2.1174-3.0864 3.7529-4.0298 1.6355-0.94336 3.5607-1.415 5.7755-1.415 2.3584 0 4.4194 0.43066 6.1831 1.292l-1.1074 2.2456c-1.7022-0.79981-3.4043-1.1997-5.1064-1.1997zm17.55 3.3069c0.74854 0 1.4202 0.061523 2.0149 0.18457l-0.35376 2.3687c-0.69727-0.15381-1.3125-0.23071-1.8457-0.23071-1.3638 0-2.5301 0.5537-3.4991 1.6611-0.969 1.1074-1.4535 2.4866-1.4535 4.1375v9.0439h-2.5532v-16.857h2.1072l0.29224 3.1223h0.12305c0.62549-1.0972 1.3791-1.9431 2.261-2.5378 0.88184-0.59473 1.8508-0.89209 2.907-0.89209zm11.659 17.473c-2.4917 0-4.4579-0.75878-5.8986-2.2764s-2.161-3.6247-2.161-6.3215c0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826-0.80494 0.16919-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm22.718 12.766h-0.13843c-1.1792 1.7124-2.9429 2.5686-5.291 2.5686-2.2046 0-3.9196-0.75365-5.1449-2.261s-1.838-3.6504-1.838-6.4292c0-2.7788 0.61523-4.9372 1.8457-6.4753 1.2305-1.5381 2.9429-2.3071 5.1372-2.3071 2.2866 0 4.04 0.83056 5.2603 2.4917h0.19995l-0.10767-1.2151-0.061524-1.1843v-6.8599h2.5532v23.933h-2.0764l-0.33838-2.261zm-5.1064 0.43066c1.7432 0 3.007-0.47424 3.7914-1.4227 0.78443-0.94849 1.1766-2.4789 1.1766-4.5912v-0.53833c0-2.3892-0.39734-4.0939-1.192-5.1141-0.79468-1.0203-2.0636-1.5304-3.8068-1.5304-1.4971 0-2.6429 0.5819-3.4376 1.7457s-1.192 2.807-1.192 4.9296c0 2.1533 0.39477 3.7786 1.1843 4.8757 0.78955 1.0972 1.9482 1.6458 3.4761 1.6458zm20.057 2.1379c-2.4917 0-4.4579-0.75878-5.8986-2.2764s-2.161-3.6247-2.161-6.3215c0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826-0.80494 0.16919-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm22.779 15.027v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762s-1.6047-1.0151-2.9377-1.0151c-1.7637 0-3.0557 0.4768-3.876 1.4304-0.82032 0.95362-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689s1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm13.243-1.7996c0.45118 0 0.88696-0.033324 1.3074-0.099975 0.42041-0.066651 0.75366-0.13586 0.99976-0.20764v1.9534c-0.27686 0.1333-0.68444 0.24353-1.2228 0.33069s-1.0228 0.13074-1.4535 0.13074c-3.2608 0-4.8911-1.7175-4.8911-5.1526v-10.028h-2.4148v-1.2305l2.4148-1.0613 1.0767-3.5991h1.4766v3.9067h4.8911v1.9841h-4.8911v9.9207c0 1.0151 0.24096 1.7944 0.7229 2.3379s1.1433 0.81518 1.9841 0.81518zm8.2288 1.7996h-2.5532v-16.857h2.5532v16.857zm-2.7686-21.426c0-0.58448 0.14355-1.0126 0.43066-1.2843 0.28711-0.27173 0.64599-0.40759 1.0767-0.40759 0.41016 0 0.76391 0.13843 1.0613 0.41528 0.29736 0.27686 0.44604 0.70239 0.44604 1.2766s-0.14868 1.0023-0.44604 1.2843c-0.29736 0.28198-0.65112 0.42297-1.0613 0.42297-0.43067 0-0.78955-0.14099-1.0767-0.42297-0.28711-0.28198-0.43066-0.71008-0.43066-1.2843zm18.549 21.426l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613 0.98951-0.25635 1.9816-0.38452 2.9762-0.38452 2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072 0.55884 0.48194 1.3407 0.7229 2.3456 0.7229zm15.473 1.7996h-2.5532v-23.933h2.5532v23.933zm16.288-4.5989c0 1.5689-0.58447 2.7788-1.7534 3.6299-1.169 0.85108-2.8096 1.2766-4.9219 1.2766-2.2354 0-3.9785-0.35376-5.2295-1.0613v-2.3687c0.81006 0.41016 1.6791 0.73315 2.6071 0.96899s1.8226 0.35376 2.684 0.35376c1.333 0 2.3584-0.21277 3.0762-0.6383s1.0767-1.0741 1.0767-1.9457c0-0.65625-0.28454-1.2176-0.85364-1.6842s-1.6791-1.0177-3.33-1.6534c-1.5689-0.58448-2.684-1.0946-3.3453-1.5304s-1.1536-0.93054-1.4766-1.4843c-0.323-0.55371-0.4845-1.2151-0.4845-1.9841 0-1.374 0.55883-2.4584 1.6765-3.2531 1.1177-0.79468 2.6506-1.192 4.5989-1.192 1.815 0 3.5889 0.36914 5.3218 1.1074l-0.90747 2.0764c-1.6919-0.69727-3.2248-1.0459-4.5989-1.0459-1.21 0-2.1226 0.1897-2.7378 0.56909-0.61524 0.3794-0.92285 0.90234-0.92285 1.5688 0 0.45117 0.11536 0.83569 0.34607 1.1536 0.23071 0.31787 0.60241 0.62036 1.1151 0.90747s1.4971 0.70239 2.9531 1.2458c1.9995 0.72803 3.3505 1.4612 4.0529 2.1995 0.7024 0.73828 1.0536 1.6663 1.0536 2.7839z" fill="#182650" fill-rule="nonzero"/>\n </g>\n </g>\n </g>\n </svg>\n <span class=\'buv-u-visually-hidden\'>',"</span>\n "])),cee("text.motto"))}var Ure,Fre,zre,Hre=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.className,r=e.showMotto,n=void 0!==r&&r;return Fe(Nre||(Nre=w(["\n ","\n <a href='https://www.blockcerts.org' title='","' class$='buv-c-logo ","'>\n ","\n </a>"])),jre,cee("text.blockcertsHint"),t,n?Bre():Dre())},qre=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.forceInPlace,r=void 0!==t&&t,n=e.interactive,i=void 0!==n&&n,a=e.theme,o=["buv-c-footer",r?"buv-c-footer--forced":"",a===zee?"buv-c-footer--dark":""].join(" ");return Fe(Ure||(Ure=w(["\n ","\n <footer class$='","'>\n ","\n ","\n </footer>"])),Lre,o,i?Fe(Fre||(Fre=w(["<section>\n <buv-file-upload></buv-file-upload>\n <buv-verify-other-certificate></buv-verify-other-certificate>\n </section>"]))):"",Hre())}),{mapStateToProps:function(e){return{theme:nte(e)}},ownProps:{forceInPlace:Boolean,interactive:Boolean}});window.customElements.define("buv-footer",qre);var Vre,Kre,Wre=Fe(zre||(zre=w(["<style>.buv-o-overlay{z-index:100;box-shadow:0 0 30px rgba(0,0,0,0.25);background-color:#fff}.buv-c-modal{position:fixed;width:100%;height:100%;background-color:rgba(3,21,50,0.7);top:0;left:0;z-index:1000}.buv-c-modal.is-hidden{display:none}.buv-c-modal__content{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:100vw;min-width:300px;max-width:600px;min-height:calc(600px - 50px);padding:38px 38px 98px;box-sizing:border-box}@media only screen and (max-width: 600px){.buv-c-modal__content{height:100vh;min-height:100vh}}.buv-c-modal__close-button{top:20px;right:20px}\n</style>"]))),Jre=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.handleClick=e.handleClick.bind(b(e)),e}return s(r,[{key:"close",value:function(){this.isOpen=!1}},{key:"handleClick",value:function(){this.close(),this._props.onClose()}},{key:"_propertiesChanged",value:function(e,t,n){this._props=e,y(l(r.prototype),"_propertiesChanged",this).call(this,e,t,n)}},{key:"_render",value:function(){var e=["buv-c-modal","buv-qa-modal",this.isOpen?"":"is-hidden"].join(" ");return Fe(Vre||(Vre=w(["\n ","\n <div class$='","' onclick='","'>\n <div class='buv-c-modal__content buv-o-overlay' onclick='","'>\n ","\n <slot></slot>\n </div> \n </div>\n "])),Wre,e,this.handleClick,(function(e){e.stopPropagation()}),Gte({className:"buv-c-modal__close-button",onClick:this.handleClick}))}}],[{key:"properties",get:function(){return{isOpen:Boolean,onClose:Function}}}]),r}(Ke);window.customElements.define("buv-modal",Jre);var Gre,$re,Xre,Yre,Qre,Zre,ene=Fe(Kre||(Kre=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}\n</style>"],["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}\n</style>"]))),tne=Fe(Gre||(Gre=w(["<style>.buv-c-error-message{background:rgba(208,2,27,0.1);border-radius:2px;letter-spacing:.05px;padding:10px}.buv-c-error-message--solid{background:#fff;border-radius:2px 2px 0 0;margin:0}.buv-c-error-message-title{color:#d0021b;font-weight:bold;display:block;margin-bottom:5px;font-size:15px}\n</style>"])));function rne(e){return function(e){return e.indexOf(".")>-1&&-1===e.indexOf(" ")}(e)?cee(e):e}function nne(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e)return null;var r=["buv-c-error-message","buv-qa-error-message",t?"buv-c-error-message--solid":""].join(" ");return Fe($re||($re=w(["\n ","\n <p class$='","'>\n <span class='buv-c-error-message-title'>","</span>\n ","\n </p>"])),tne,r,cee("errors.errorLabel"),rne(e))}function ine(e){var t=e.label;e.code;var r,n=e.status,i=e.errorMessage,a=e.isParent,o=e.isFirst,s=e.isTestChain,u=["buv-o-text-15","buv-c-verification-step","buv-c-badge",o?"is-first":"","is-".concat(n),s?"is-test":""].join(" ");return r=a?Fe(Xre||(Xre=w(["","<dt class$='","'>","</dt>"])),ene,u,t):Fe(Yre||(Yre=w(["","<dd class='buv-c-verification-step buv-c-verification-substep buv-o-text-12'>\n ","\n ","\n </dd>"])),ene,t,nne(i)),Fe(Qre||(Qre=w(["",""])),r)}var ane,one,sne,une=Fe(Zre||(Zre=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}.buv-c-final-verification-step{white-space:nowrap;opacity:0;position:relative;font-weight:600;font-size:15px;color:#031532;margin-top:15px}.buv-c-final-verification-step.is-success{font-size:21px;color:#2ab27b;line-height:19px}.buv-c-final-verification-step--standalone{margin-top:0}.buv-c-final-verification-step.is-test,.buv-c-final-verification-step--standalone.is-success{font-size:15px;color:#031532}.buv-c-final-verification-step.is-failure{font-size:13px;font-weight:400}.buv-c-verification-step__description{margin:0}.buv-c-final-verification-step.is-visible{opacity:1}.buv-c-final-verification-step.is-visible::after{opacity:1}.buv-c-final-verification-step::after{position:absolute;content:'';height:26px;width:23px;left:-37px;top:-3px;background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyM3B4IiB2aWV3Qm94PSIwIDAgMjAgMjMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZyBpZD0iVmVyaWZpY2F0aW9uIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI1NC4wMDAwMDAsIC00NzQuMDAwMDAwKSIgZmlsbD0iIzJBQjI3QiI+CiAgICAgICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQ4LjAwMDAwMCwgNDY5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2LDUgTDYsOS4xODE4MTgxOCBMNiwxNS40NTQ1NDU1IEM2LDIxLjI1NjgxODIgMTAuMjY2NjY2NywyNi42ODI3MjczIDE2LDI4IEMyMS43MzMzMzMzLDI2LjY4MjcyNzMgMjYsMjEuMjU2ODE4MiAyNiwxNS40NTQ1NDU1IEwyNiw5LjE4MTgxODE4IEwxNiw1IEwxNiw1IFogTTksMTcuNzUzNzE1NSBMMTAuNTI3NSwxNi4yNTY5MDAyIEwxMy4zMzMzMzMzLDE4Ljk5NTc1MzcgTDIwLjQ3MjUsMTIgTDIyLDEzLjUwNzQzMSBMMTMuMzMzMzMzMywyMiBMOSwxNy43NTM3MTU1IFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=\");background-repeat:no-repeat;background-position:center;background-size:contain;z-index:3}.buv-c-final-verification-step.is-test::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4IiBmaWxsPSIjRjVBNjIzIj48cGF0aCBkPSJNLjUgMTZoMTdMOSAxIC41IDE2em05LjUtMkg4di0yaDJ2MnptMC0zSDhWN2gydjR6Ii8+PC9zdmc+IA==\")}.buv-c-final-verification-step.is-failure::after{content:'\\274C';font-size:17px;top:-1px;color:#d0021b;background:none}.buv-c-final-verification-step--standalone-wrapper{padding:10px;box-sizing:border-box;border-left:3px solid}.buv-c-final-verification-step--standalone-wrapper.is-success{background-color:rgba(42,178,123,0.1);border-color:#2ab27b}.buv-c-final-verification-step--standalone-wrapper.is-failure{background-color:rgba(208,2,27,0.1);border-color:#d0021b}.buv-c-final-verification-step--standalone-wrapper.is-test{background-color:rgba(245,166,35,0.1);border-color:#f5a623}.buv-c-final-verification-step--standalone{margin:0 0 5px 30px;white-space:unset}.buv-c-final-verification-step--standalone.is-failure{margin-bottom:0}.buv-c-final-verification-step--standalone::after{left:-30px}.buv-c-verification-substep.is-final{display:none;line-height:1.35}.buv-c-verification-substep.is-final.is-visible{display:block}.buv-c-verification-substep::after{display:none}.buv-u-excluded-from-flow{position:absolute}.buv-u-full-width{width:100%}\n</style>"],["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}.buv-c-final-verification-step{white-space:nowrap;opacity:0;position:relative;font-weight:600;font-size:15px;color:#031532;margin-top:15px}.buv-c-final-verification-step.is-success{font-size:21px;color:#2ab27b;line-height:19px}.buv-c-final-verification-step--standalone{margin-top:0}.buv-c-final-verification-step.is-test,.buv-c-final-verification-step--standalone.is-success{font-size:15px;color:#031532}.buv-c-final-verification-step.is-failure{font-size:13px;font-weight:400}.buv-c-verification-step__description{margin:0}.buv-c-final-verification-step.is-visible{opacity:1}.buv-c-final-verification-step.is-visible::after{opacity:1}.buv-c-final-verification-step::after{position:absolute;content:'';height:26px;width:23px;left:-37px;top:-3px;background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyM3B4IiB2aWV3Qm94PSIwIDAgMjAgMjMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZyBpZD0iVmVyaWZpY2F0aW9uIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI1NC4wMDAwMDAsIC00NzQuMDAwMDAwKSIgZmlsbD0iIzJBQjI3QiI+CiAgICAgICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQ4LjAwMDAwMCwgNDY5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2LDUgTDYsOS4xODE4MTgxOCBMNiwxNS40NTQ1NDU1IEM2LDIxLjI1NjgxODIgMTAuMjY2NjY2NywyNi42ODI3MjczIDE2LDI4IEMyMS43MzMzMzMzLDI2LjY4MjcyNzMgMjYsMjEuMjU2ODE4MiAyNiwxNS40NTQ1NDU1IEwyNiw5LjE4MTgxODE4IEwxNiw1IEwxNiw1IFogTTksMTcuNzUzNzE1NSBMMTAuNTI3NSwxNi4yNTY5MDAyIEwxMy4zMzMzMzMzLDE4Ljk5NTc1MzcgTDIwLjQ3MjUsMTIgTDIyLDEzLjUwNzQzMSBMMTMuMzMzMzMzMywyMiBMOSwxNy43NTM3MTU1IFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=\");background-repeat:no-repeat;background-position:center;background-size:contain;z-index:3}.buv-c-final-verification-step.is-test::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4IiBmaWxsPSIjRjVBNjIzIj48cGF0aCBkPSJNLjUgMTZoMTdMOSAxIC41IDE2em05LjUtMkg4di0yaDJ2MnptMC0zSDhWN2gydjR6Ii8+PC9zdmc+IA==\")}.buv-c-final-verification-step.is-failure::after{content:'\\\\274C';font-size:17px;top:-1px;color:#d0021b;background:none}.buv-c-final-verification-step--standalone-wrapper{padding:10px;box-sizing:border-box;border-left:3px solid}.buv-c-final-verification-step--standalone-wrapper.is-success{background-color:rgba(42,178,123,0.1);border-color:#2ab27b}.buv-c-final-verification-step--standalone-wrapper.is-failure{background-color:rgba(208,2,27,0.1);border-color:#d0021b}.buv-c-final-verification-step--standalone-wrapper.is-test{background-color:rgba(245,166,35,0.1);border-color:#f5a623}.buv-c-final-verification-step--standalone{margin:0 0 5px 30px;white-space:unset}.buv-c-final-verification-step--standalone.is-failure{margin-bottom:0}.buv-c-final-verification-step--standalone::after{left:-30px}.buv-c-verification-substep.is-final{display:none;line-height:1.35}.buv-c-verification-substep.is-final.is-visible{display:block}.buv-c-verification-substep::after{display:none}.buv-u-excluded-from-flow{position:absolute}.buv-u-full-width{width:100%}\n</style>"])));function cne(e,t){return e.description?Fe(ane||(ane=w(["<p class='buv-c-verification-step__description buv-qa-final-step-description'>","</p>"])),e.description.replace("${chain}",t)):""}function lne(e){return e.verificationStatus}function fne(e){return e.showVerificationModal}var dne,hne=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.chain,r=void 0===t?"":t,n=e.transactionLink,i=void 0===n?"":n,a=e.isTestChain,o=e.isVisible,s=void 0!==o&&o,u=e.finalStep,c=void 0===u?null:u,l=e.hideLink,f=void 0!==l&&l,d=e.status,h=void 0!==d&&d,p=e.standalone,v=void 0!==p&&p;if(c){var b=[v?"buv-c-final-verification-step--standalone-wrapper":"","is-".concat(h),a?"is-test":""].join(" "),g=["buv-c-final-verification-step","buv-qa-final-verification-step",v?"buv-c-final-verification-step--standalone":"","buv-qa-verification-step",s?"is-visible":"",a?"is-test":"","is-".concat(h),h&&!v?"buv-c-badge buv-c-badge--large":""].join(" "),m=["buv-c-verification-substep",v?"":"buv-u-excluded-from-flow","buv-u-full-width","buv-o-text-12","is-final",s?"is-visible":""].join(" "),y=c.label,_=cne(c,r),x=!f&&c.linkText?Fe(one||(one=w(["<a class='buv-o-link' href='","' hidden?='","'>\n <span class='buv-o-link__text--underline buv-qa-transaction-link'>","</span>\n </a>"])),i,!i,c.linkText):"";return Fe(sne||(sne=w(["\n ","\n <div class$='","'>\n <dt class$='","'>","</dt>\n <dd class$='","'>\n ","\n ","\n </dd>\n <slot></slot>\n </div>\n "])),une,b,g,y,m,_,x)}}),{mapStateToProps:function(e){return{finalStep:Nee(e),chain:See(e),transactionLink:xee(e),isTestChain:Eee(e),status:lne(e)}},ownProps:{isVisible:Boolean,hideLink:Boolean,standalone:Boolean}});window.customElements.define("buv-final-verification-step",hne);var pne,vne,bne,gne=Fe(dne||(dne=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-c-substeps-list__link::after{content:'';width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid #768087;display:inline-block;vertical-align:2px;margin:0 6px;-webkit-transition:-webkit-transform .3s ease-in;-o-transition:transform .3s ease-in;transition:transform .3s ease-in}.buv-c-substeps-list__link.is-open::after{transform:rotate(180deg)}.buv-c-substeps-list__list{max-height:0;overflow:hidden;-webkit-transition:max-height .3s ease-in;-o-transition:max-height .3s ease-in;transition:max-height .3s ease-in;padding-left:50px;margin-left:-50px;padding-top:5px}.buv-c-substeps-list__list.is-open{height:auto}\n</style>"]))),mne=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.wasForcedOpen=!1,e.resetOpen=!1,e.toggleOpen=e.toggleOpen.bind(b(e)),e.totalHeight=0,e.heightWasReset=!1,e}return s(r,[{key:"toggleOpen",value:function(){this.wasForcedOpen&&!this.resetOpen&&(this.isOpen=!0,this.resetOpen=!0),this.isOpen=!this.isOpen}},{key:"_didRender",value:function(){if(!this.totalHeight){var e=this.shadowRoot.querySelectorAll(".buv-js-substeps-list__list")[0],t=e?Array.from(e.childNodes):[];this.totalHeight=t.reduce((function(e,t){return t.getBoundingClientRect?e+t.getBoundingClientRect().height:e}),0),this.wasForcedOpen&&!this.heightWasReset&&(e.style.maxHeight=this.totalHeight+"px",this.heightWasReset=!0)}}},{key:"_render",value:function(e){var t=e.subSteps,r=e.hasError;if(!t)return null;var n=this.isOpen;!this.wasForcedOpen&&r&&(n=!0,this.wasForcedOpen=!0);var i=t.filter((function(e){return e.status})),a=i.length,o="".concat(a," ").concat(cee("text","item",!0,a)),s=n?this.totalHeight:1,u=["buv-o-text-12","buv-o-link","buv-c-substeps-list__link",n?"is-open":""].join(" "),c=["buv-c-substeps-list__list","buv-js-substeps-list__list",n?"is-open":""].join(" ");return Fe(pne||(pne=w(["\n ","\n <a title='","' onclick='","' class$='","'>\n <span class='buv-o-link__text--underline'>","</span>\n </a>\n <div class$='","' style$='max-height: ","px'>\n ","\n </div>\n "])),gne,cee("text.substepsListHint"),this.toggleOpen,u,n?cee("text.substepsListClose"):o,c,s,i.map((function(e){return Fe(vne||(vne=w(["",""])),ine(e))})))}}],[{key:"properties",get:function(){return{subSteps:[],isOpen:Boolean,hasError:Boolean}}}]),r}(Ke);window.customElements.define("buv-substeps-list",mne);var yne,wne,_ne,xne,kne,Sne,Ene=Fe(bne||(bne=w(["<style>.buv-c-verification-process{position:relative}.buv-c-verification-progress-bar{position:absolute;left:13px;top:0;width:14px;display:flex;flex-direction:column;height:100%}.buv-c-verification-progress-bar__tube{min-height:14px;transition:flex .4s ease-in-out, max-height .4s ease-in;background-color:#2ab27b;border-radius:7px;flex-grow:0;opacity:0}.buv-c-verification-progress-bar__tube.has-started{flex-grow:1;opacity:1}.buv-c-verification-progress-bar__tube.is-test{background-color:#d8d8d8}.buv-c-verification-progress-bar__tube.has-errored{background-color:#d0021b}.buv-c-verification-progress-bar.no-transition{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.buv-c-verification-process__step-list{padding-left:46px;margin-top:0}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),Ine=function(e){c(n,e);var r=m(n);function n(){return a(this,n),r.apply(this,arguments)}return s(n,[{key:"verificationInProgressTemplate",value:function(){return Fe(yne||(yne=w(["\n <span class='buv-u-visually-hidden'>","</span>\n <svg width='20' height='7' viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg'><circle cx='15' cy='15' r='15'><animate attributeName='r' from='15' to='15' begin='0s' dur='0.8s' values='15;9;15' calcMode='linear' repeatCount='indefinite'/><animate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='0.8s' values='1;.5;1' calcMode='linear' repeatCount='indefinite'/></circle><circle cx='60' cy='15' r='9' fill-opacity=''.9'><animate attributeName='r' from='9' to='9' begin='0s' dur='0.8s' values='9;15;9' calcMode='linear' repeatCount='indefinite'/><animate attributeName='fill-opacity' from=''.5' to='.5' begin='0s' dur='0.8s' values='.5;1;.5' calcMode='linear' repeatCount='indefinite'/></circle><circle cx='105' cy='15' r='15'><animate attributeName='r' from='15' to='15' begin='0s' dur='0.8s' values='15;9;15' calcMode='linear' repeatCount='indefinite'/><animate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='0.8s' values='1;.5;1' calcMode='linear' repeatCount='indefinite'/></circle></svg>\n "])),cee("text.verificationStepProgress"))}},{key:"_didRender",value:function(){this.listElement||(this.listElement=this.shadowRoot.querySelectorAll(".buv-js-verification-process__step-list")[0])}},{key:"_render",value:function(e){var r=this,n=e.steps;e.transactionLink;var i=e.hasError,a=e.isTestChain,o=n.filter((function(e){return e.status!==XB.DEFAULT})).map((function(e,n){return Fe(wne||(wne=w(["\n ","\n ","\n "])),ine(t(t({},e),{},{isParent:!0,isFirst:0===n,isTestChain:a})),e.status===XB.STARTED?Fe(_ne||(_ne=w(["",""])),r.verificationInProgressTemplate()):Fe(xne||(xne=w(["<buv-substeps-list subSteps='","' hasError?='","'></buv-substeps-list>"])),e.subSteps,i))})),s=["buv-c-verification-progress-bar__tube","buv-qa-verification-progress-bar__tube",i?"has-errored":"",a?"is-test":"",o.length?"has-started":""].join(" "),u="".concat(this.listElement?this.listElement.getBoundingClientRect().height:0,"px"),c=n.every((function(e){return e.status===XB.SUCCESS}))||n.some((function(e){return e.status===XB.FAILURE}));return c&&(u="100%"),Fe(kne||(kne=w(["\n ","\n <section class='buv-c-verification-process'>\n <div class='buv-c-verification-progress-bar' >\n <div class$='","' style$='max-height: ","'></div>\n </div> \n <dl class='buv-c-verification-process__step-list buv-js-verification-process__step-list'>\n ","\n <buv-final-verification-step isVisible='","'></buv-final-verification-step>\n </dl>\n </section>\n "])),Ene,s,u,o,c&&!i)}}],[{key:"properties",get:function(){return{steps:[],transactionLink:String,hasError:Boolean,isTestChain:Boolean}}}]),n}(Ke);window.customElements.define("buv-verification-process-raw",Ine);var Ane,Pne=Vee((function(e){var t=e.steps;e.transactionLink;var r=e.hasError,n=e.isTestChain;return Fe(Sne||(Sne=w(["<buv-verification-process-raw\n steps='","'\n hasError?='","'\n isTestChain?='","'\n style='max-width: 100%;'\n ></buv-verification-process-raw>"])),t,r,n)}),{mapStateToProps:function(e){return{steps:JSON.parse(JSON.stringify(Iee(e))),isTestChain:Eee(e),hasError:Pee(e)}}});window.customElements.define("buv-verification-process",Pne);var Tne,One=Vee((function(e){var t=e.isOpen,r=e.onClose;return Fe(Ane||(Ane=w(["\n ","\n <buv-modal isOpen?='","' onClose='","'>\n <div class='buv-c-verification-modal__content'>\n <buv-card-certificate class='buv-c-verification-modal__certificate' hideRecordLink hideVerifyButton></buv-card-certificate>\n <hr class='buv-c-verification-modal__separator'/>\n <buv-verification-process class='buv-c-verification-modal__process'></buv-verification-process>\n </div>\n <buv-footer forceInPlace></buv-footer>\n </buv-modal>\n "])),yre,t,r)}),{mapDispatchToProps:{onClose:lte.bind(null,!1)},mapStateToProps:function(e){return{isOpen:fne(e)}}});window.customElements.define("buv-verification-modal",One);var Cne,Mne,Rne=Fe(Tne||(Tne=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-drag-and-drop__droparea{z-index:100;background-color:rgba(0,0,0,0.1);display:none;position:absolute;top:0;left:0;width:100%;height:100%}.buv-c-drag-and-drop__droparea.is-active{display:block}\n</style>"])));var Nne=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isDraggedOver=!1,e.denyDrop=!1,e.handleDragEnter=e.handleDragEnter.bind(b(e)),e.handleDragOver=e.handleDragOver.bind(b(e)),e.handleDragLeave=e.handleDragLeave.bind(b(e)),e.handleDrop=e.handleDrop.bind(b(e)),e}return s(r,[{key:"handleDragEnter",value:function(){this.isDraggedOver=!0}},{key:"handleDragOver",value:function(e){e.preventDefault()}},{key:"handleDragLeave",value:function(){this.isDraggedOver=!1}},{key:"handleDrop",value:function(e){e.preventDefault(),this.isDraggedOver=!1;var t=e.dataTransfer.files[0];this.denyDrop=!function(e){var t=e.name;return"json"===t.substr(t.length-4,4)}(t),this.denyDrop||this._props.onDrop(t)}},{key:"_propertiesChanged",value:function(e,t,n){this._props=e,y(l(r.prototype),"_propertiesChanged",this).call(this,e,t,n)}},{key:"_render",value:function(){var e=["buv-c-drag-and-drop__droparea",this.isDraggedOver?"is-active":""].join(" "),t=this.denyDrop?cee("errors.invalidFormatDragAndDrop"):"";return Fe(Cne||(Cne=w(["\n ","\n <div ondragenter='","'>\n <div class$='","'\n ondragover='","'\n ondragleave='","'\n ondrop='","'\n ></div>\n <span>","</span>\n <slot></slot>\n </div>"])),Rne,this.handleDragEnter,e,this.handleDragOver,this.handleDragLeave,this.handleDrop,t)}}],[{key:"properties",get:function(){return{isDraggedOver:Boolean,denyDrop:Boolean,onDrop:Function}}}]),r}(Ke);window.customElements.define("buv-drag-and-drop-raw",Nne);var Lne,jne=Vee((function(e){return Fe(Mne||(Mne=w(["\n <buv-drag-and-drop-raw\n onDrop='","'\n >\n <slot></slot>\n</buv-drag-and-drop-raw>"])),e.onDrop)}),{mapDispatchToProps:{onDrop:kre}});window.customElements.define("buv-drag-and-drop",jne);var Dne,Bne,Une,Fne,zne,Hne,qne=Fe(Lne||(Lne=w(["<style>.buv-c-verifier-main{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:#031532;position:relative}.buv-c-verifier-layout{display:flex;flex-direction:column}.buv-c-verifier-body{background-color:#fff;flex-grow:1}.buv-c-verifier-body--padded{padding:20px}\n</style>"]))),Vne=Fe(Dne||(Dne=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-card{position:relative;display:flex;margin-bottom:20px}.buv-c-card__img-wrapper{margin-right:1.5vw;min-width:50px;width:20%}.buv-c-card__img{max-width:100%;max-height:100%}.buv-c-card__title-wrapper{display:flex;flex-direction:column;justify-content:center}.buv-c-card__title{font-size:calc(16px + 0.5vw);margin-top:0;margin-bottom:0;font-weight:400;padding-right:100px}.buv-c-card__title--no-padding{padding:0}.buv-c-card__recipient{font-weight:600;margin:6px 0 12px}.buv-c-card__record-link{position:absolute;top:0;right:0;line-height:30px}.buv-c-card__record-link::after{content:'';border:solid currentColor;border-width:0 2px 2px 0;width:5px;height:5px;transform:rotate(-45deg);font-weight:bold;display:inline-block;margin-left:5px}.buv-c-card__verify-button{float:right}@media only screen and (max-width: 600px){.buv-c-card__title{font-size:16px}.buv-c-card__recipient{margin:6px 0}.buv-c-card__img-wrapper{margin-right:18px}}\n</style>"])));var Kne=Vee((function(e){var t=e.hasCertificateDefinition,r=e.recipientName,n=e.certificateTitle,i=e.issuedOn,a=e.issueDate,o=e.issuerName,s=e.recordLink,u=e.hideVerifyButton,c=e.hideRecordLink;if(!t)return null;s||c||(c=!0);var l=["buv-c-card__title",c?"buv-c-card__title--no-padding":""].join(" ");return Fe(Fne||(Fne=w(["\n ","\n <section class='buv-c-card'>\n <div class='buv-c-card__img-wrapper'>\n ","\n </div>\n <div class='buv-c-card__title-wrapper'>\n <h1 class$=",">","</h1>\n <h2 class$='"," buv-c-card__recipient'>","</h2>\n <span class='buv-o-text-12'>"," <time datetime$='","'>","</time> "," ","</span>\n </div>\n ","\n </section>\n ","\n "])),Vne,function(e){return new Promise((function(t){var r=new Image;r.addEventListener("load",(function(){t(Fe(Bne||(Bne=w(["<img src='","' alt='","' class='buv-c-card__img'/>"])),e.issuerLogo,e.issuerName))})),r.addEventListener("error",(function(){t(Fe(Une||(Une=w(["<p class='buv-o-text-15'>","</p>"])),e.issuerName))})),r.src=e.issuerLogo}))}(e),l,n,l,r,cee("text.issued"),i,a,cee("text.by"),o,c?"":Fe(zne||(zne=w(["<a class='buv-o-text-12 buv-o-link buv-c-card__record-link qa-card-record-link' href='","' target='_blank'>\n <span class='buv-o-link__text--underline'>","</span>\n </a>"])),s,cee("text.viewRecord")),u?"":Fe(Hne||(Hne=w(["<buv-final-verification-step class='buv-c-fullscreen-certificate__verification-status' isVisible hideLink standalone>\n <buv-verify-button type='link'>","</buv-verify-button>\n </buv-final-verification-step>"])),cee("text.verifyAgain")))}),{mapStateToProps:function(e){return{hasCertificateDefinition:!!fee(e),recipientName:pee(e),certificateTitle:vee(e),issueDate:hee(e),issuedOn:dee(e),issuerName:bee(e),issuerLogo:gee(e),recordLink:yee(e)}},ownProps:{hideRecordLink:Boolean,hideVerifyButton:Boolean}});window.customElements.define("buv-card-certificate",Kne);
|
|
216
|
+
a.link={},u[b]=JY(s,u[b],a)),t.abrupt("return",u);case 28:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.expand=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o,s,u,c,l,f,d=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(d.length<1)){t.next=2;break}throw new TypeError("Could not expand, too few arguments.");case 2:if(!1===(i=r(i,{keepFreeFloatingNodes:!1})).expansionMap&&(i.expansionMap=void 0),a={},o=[],"expandContext"in i&&(s=FG.clone(i.expandContext),UY(s)&&"@context"in s?a.expandContext=s:a.expandContext={"@context":s},o.push(a.expandContext)),!FY(n)){t.next=12;break}return t.next=8,e.get(n,i);case 8:c=t.sent,u=c.documentUrl,a.input=c.document,c.contextUrl&&(a.remoteContext={"@context":c.contextUrl},o.push(a.remoteContext)),t.next=13;break;case 12:a.input=FG.clone(n);case 13:return"base"in i||(i.base=u||""),t.next=16,VY(a,i);case 16:return l=HY(i),o.forEach((function(e){l=qY({activeCtx:l,localCtx:e,options:i})})),f=RY({activeCtx:l,element:a.input,options:i,expansionMap:i.expansionMap}),t.abrupt("return",(UY(f)&&"@graph"in f&&1===Object.keys(f).length?f=f["@graph"]:null===f&&(f=[]),BY(f)||(f=[f]),f));case 20:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.flatten=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(c.length<1)){t.next=2;break}return t.abrupt("return",new TypeError("Could not flatten, too few arguments."));case 2:return i="function"==typeof i?null:i||null,a=r(a,{base:FY(n)?n:""}),t.next=5,e.expand(n,a);case 5:if(o=t.sent,s=NY(o),null!==i){t.next=9;break}return t.abrupt("return",s);case 9:return a.graph=!0,a.skipExpansion=!0,t.next=12,e.compact(s,i,a);case 12:return u=t.sent,t.abrupt("return",u);case 14:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.frame=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c,l,f,d,h,p=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(p.length<2)){t.next=2;break}throw new TypeError("Could not frame, too few arguments.");case 2:if(a=r(a,{base:FY(n)?n:"",embed:"@last",explicit:!1,requireAll:!0,omitDefault:!1,pruneBlankNodeIdentifiers:!0,bnodesToClear:[]}),!FY(i)){t.next=7;break}return t.next=5,e.get(i,a);case 5:o=t.sent,i=o.document,o.contextUrl&&((s=i["@context"])?BY(s)?s.push(o.contextUrl):s=[s,o.contextUrl]:s=o.contextUrl,i["@context"]=s);case 7:return u=i&&i["@context"]||{},t.next=10,e.expand(n,a);case 10:return c=t.sent,(l=FG.clone(a)).isFrame=!0,l.keepFreeFloatingNodes=!0,t.next=15,e.expand(i,l);case 15:return f=t.sent,l.merged=!("@graph"in i),d=DY(c,f,l),l.graph=!0,l.skipExpansion=!0,l.link={},l.framing=!0,t.next=21,e.compact(d,u,l);case 21:return h=t.sent,t.abrupt("return",h);case 23:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.link=FG.callbackify(function(){var t=CY(Jt.mark((function t(r,n,i){var a;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={},t.abrupt("return",(n&&(a["@context"]=n),a["@embed"]="@link",e.frame(r,a,i)));case 2:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),e.normalize=e.canonize=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o,s,u=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(u.length<1)){t.next=2;break}throw new TypeError("Could not canonize, too few arguments.");case 2:if(!("inputFormat"in(i=r(i,{base:FY(n)?n:"",algorithm:"URDNA2015",skipExpansion:!1})))){t.next=7;break}if("application/n-quads"===i.inputFormat||"application/nquads"===i.inputFormat){t.next=5;break}throw new CG("Unknown canonicalization input format.","jsonld.CanonizeError");case 5:return a=WG.parse(n),t.abrupt("return",fK.canonize(a,i));case 7:return delete(o=FG.clone(i)).format,o.produceGeneralizedRdf=!1,t.next=11,e.toRDF(n,o);case 11:return s=t.sent,t.abrupt("return",fK.canonize(s,i));case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.fromRDF=FG.callbackify(function(){var e=CY(Jt.mark((function e(n,i){var a,o,s,u=arguments;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(u.length<1)){e.next=2;break}throw new TypeError("Could not convert from RDF, too few arguments.");case 2:if(i=r(i,{format:FY(n)?"application/n-quads":void 0}),a=i.format,s=i.rdfParser,!a){e.next=10;break}if(s=s||t[a]){e.next=8;break}throw new CG("Unknown input format.","jsonld.UnknownFormat",{format:a});case 8:e.next=11;break;case 10:s=function(){return n};case 11:return o=s.length>1?new Promise((function(e,t){s(n,(function(r,n){r?t(r):e(n)}))})):Promise.resolve(s(n)),e.next=14,o;case 14:return o=e.sent,Array.isArray(o)||(o=WG.legacyDatasetToQuads(o)),e.abrupt("return",LY(o,i));case 17:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),e.toRDF=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o,s=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(s.length<1)){t.next=2;break}throw new TypeError("Could not convert to RDF, too few arguments.");case 2:if(!(i=r(i,{base:FY(n)?n:"",skipExpansion:!1})).skipExpansion){t.next=6;break}t.t0=n,t.next=9;break;case 6:return t.next=8,e.expand(n,i);case 8:t.t0=t.sent;case 9:if(a=t.t0,o=jY(a,i),!i.format){t.next=17;break}if("application/n-quads"!==i.format&&"application/nquads"!==i.format){t.next=16;break}return t.next=15,WG.serialize(o);case 15:return t.abrupt("return",t.sent);case 16:throw new CG("Unknown output format.","jsonld.UnknownFormat",{format:i.format});case 17:return t.abrupt("return",o);case 18:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.createNodeMap=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i){var a,o=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(o.length<1)){t.next=2;break}throw new TypeError("Could not create node map, too few arguments.");case 2:return i=r(i,{base:FY(n)?n:""}),t.next=5,e.expand(n,i);case 5:return a=t.sent,t.abrupt("return",$Y(a,i));case 7:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()),e.merge=FG.callbackify(function(){var t=CY(Jt.mark((function t(n,i,a){var o,s,u,c,l,f,d,h,p,v,b,g,m,y,w,_,x,k=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(k.length<1)){t.next=2;break}throw new TypeError("Could not merge, too few arguments.");case 2:if(BY(n)){t.next=4;break}throw new TypeError('Could not merge, "docs" must be an array.');case 4:return i="function"==typeof i?null:i||null,a=r(a,{}),t.next=7,Promise.all(n.map((function(t){var r=Object.assign({},a);return e.expand(t,r)})));case 7:o=t.sent,s=!0,"mergeNodes"in a&&(s=a.mergeNodes),u=a.issuer||new MY("_:b"),c={"@default":{}},l=0;case 12:if(!(l<o.length)){t.next=29;break}if(f=FG.relabelBlankNodes(o[l],{issuer:new MY("_:b"+l+"-")}),GY(f,d=s||0===l?c:{"@default":{}},"@default",u),d===c){t.next=26;break}t.t0=Jt.keys(d);case 16:if((t.t1=t.t0()).done){t.next=26;break}if(h=t.t1.value,p=d[h],h in c){t.next=22;break}return c[h]=p,t.abrupt("continue",16);case 22:for(b in v=c[h],p)b in v||(v[b]=p[b]);t.next=16;break;case 26:++l,t.next=12;break;case 29:for(g=XY(c),m=[],y=Object.keys(g).sort(),w=0;w<y.length;++w)_=g[y[w]],zY(_)||m.push(_);if(null!==i){t.next=33;break}return t.abrupt("return",m);case 33:return a.graph=!0,a.skipExpansion=!0,t.next=36,e.compact(m,i,a);case 36:return x=t.sent,t.abrupt("return",x);case 38:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}()),Object.defineProperty(e,"documentLoader",{get:function(){return e._documentLoader},set:function(t){return e._documentLoader=FG.normalizeDocumentLoader(t)}}),e.documentLoader=function(){var e=CY(Jt.mark((function e(t){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new CG("Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.","jsonld.LoadDocumentError",{code:"loading document failed",url:t});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.loadDocument=FG.callbackify(CY(Jt.mark((function t(){var r=arguments;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.documentLoader.apply(null,r));case 1:case"end":return t.stop()}}),t)})))),e.get=FG.callbackify(function(){var t=CY(Jt.mark((function t(r,n){var i,a;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="function"==typeof n.documentLoader?FG.normalizeDocumentLoader(n.documentLoader):e.documentLoader,t.next=3,i(r);case 3:if(a=t.sent,t.prev=4,a.document){t.next=7;break}throw new CG("No remote document found at the given URL.","jsonld.NullRemoteDocument");case 7:FY(a.document)&&(a.document=JSON.parse(a.document)),t.next=13;break;case 10:throw t.prev=10,t.t0=t.catch(4),new CG("Could not retrieve a JSON-LD document from the URL.","jsonld.LoadDocumentError",{code:"loading document failed",cause:t.t0,remoteDoc:a});case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()),e.processContext=FG.callbackify(function(){var e=CY(Jt.mark((function e(t,n,i){var a;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r(i,{base:""}),null!==n){e.next=2;break}return e.abrupt("return",HY(i));case 2:return n=FG.clone(n),UY(n)&&"@context"in n||(n={"@context":n}),e.next=5,VY(n,i);case 5:return a=e.sent,e.abrupt("return",qY({activeCtx:t,localCtx:a,options:i}));case 7:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}()),e.getContextValue=y$.getContextValue,e.documentLoaders={},e.documentLoaders.node=wY,e.documentLoaders.xhr=PY,e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new CG('Unknown document loader type: "'+t+'"',"jsonld.UnknownDocumentLoader",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,r){t[e]=r},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser("application/n-quads",WG.parse),e.registerRDFParser("application/nquads",WG.parse),e.registerRDFParser("rdfa-api",function(){function e(){a(this,e)}return s(e,[{key:"parse",value:function(e){for(var t={"@default":[]},r=e.getSubjects(),n=0;n<r.length;++n){var i=r[n];if(null!==i){var a=e.getSubjectTriples(i);if(null!==a){var o=a.predicates;for(var s in o)for(var u=o[s].objects,c=0;c<u.length;++c){var l=u[c],f={};0===i.indexOf("_:")?f.subject={type:"blank node",value:i}:f.subject={type:"IRI",value:i},0===s.indexOf("_:")?f.predicate={type:"blank node",value:s}:f.predicate={type:"IRI",value:s};var d=l.value;if(l.type===ZG){var h=new("undefined"==typeof XMLSerializer?cK.XMLSerializer:XMLSerializer);d="";for(var p=0;p<l.value.length;p++)l.value[p].nodeType===KG.ELEMENT_NODE?d+=h.serializeToString(l.value[p]):l.value[p].nodeType===KG.TEXT_NODE&&(d+=l.value[p].nodeValue)}f.object={},l.type===QG?0===l.value.indexOf("_:")?f.object.type="blank node":f.object.type="IRI":(f.object.type="literal",l.type===YG?l.language?(f.object.datatype=XG,f.object.language=l.language):f.object.datatype=e$:f.object.datatype=l.type),f.object.value=d,t["@default"].push(f)}}}}return t}}]),e}().parse),e.url=n$,e.util=FG,Object.assign(e,FG),e.promises=e,e.RequestQueue=pY,e.JsonLdProcessor=function(e){var t=function(){function e(){a(this,e)}return s(e,[{key:"toString",value:function(){return"[object JsonLdProcessor]"}}]),e}();return Object.defineProperty(t,"prototype",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,"constructor",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,r){return arguments.length<2?Promise.reject(new TypeError("Could not compact, too few arguments.")):e.compact(t,r)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not expand, too few arguments.")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError("Could not flatten, too few arguments.")):e.flatten(t)},t}(e),QY&&void 0===BU.JsonLdProcessor&&Object.defineProperty(BU,"JsonLdProcessor",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor}),YY?e.useDocumentLoader("node"):"undefined"!=typeof XMLHttpRequest&&e.useDocumentLoader("xhr"),e},eQ=function e(){return ZY((function(){return e()}))};ZY(eQ);var tQ=eQ,rQ=FU((function(e){LV.gte(bz.version,"8.6.0")?e.exports=IG:e.exports=tQ}));rQ.jsonld;var nQ=FU((function(e){!function(t){var r={bytesToHex:function(e){return function(e){return e.map((function(e){return 2,(t=e.toString(16)).length>2?t:Array(2-t.length+1).join("0")+t;var t})).join("")}(e)},hexToBytes:function(e){if(e.length%2==1)throw new Error("hexToBytes can't have a string with an odd number of characters.");return 0===e.indexOf("0x")&&(e=e.slice(2)),e.match(/../g).map((function(e){return parseInt(e,16)}))}};e.exports?e.exports=r:t.convertHex=r}(BU)})),iQ=FU((function(e){!function(t){var r={bytesToString:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")},stringToBytes:function(e){return e.split("").map((function(e){return e.charCodeAt(0)}))}};r.UTF8={bytesToString:function(e){return decodeURIComponent(escape(r.bytesToString(e)))},stringToBytes:function(e){return r.stringToBytes(unescape(encodeURIComponent(e)))}},e.exports?e.exports=r:t.convertString=r}(BU)})),aQ=FU((function(e){!function(t){var r={};e.exports?(r.bytesToHex=nQ.bytesToHex,r.convertString=iQ,e.exports=o):(r.bytesToHex=t.convertHex.bytesToHex,r.convertString=t.convertString,t.sha256=o);var n=[];!function(){function e(e){for(var t=Math.sqrt(e),r=2;r<=t;r++)if(!(e%r))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)e(r)&&(n[i]=t(Math.pow(r,1/3)),i++),r++}();var i=[],a=function(e,t,r){for(var a=e[0],o=e[1],s=e[2],u=e[3],c=e[4],l=e[5],f=e[6],d=e[7],h=0;h<64;h++){if(h<16)i[h]=0|t[r+h];else{var p=i[h-15],v=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,b=i[h-2],g=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;i[h]=v+i[h-7]+g+i[h-16]}var m=a&o^a&s^o&s,y=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),w=d+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&l^~c&f)+n[h]+i[h];d=f,f=l,l=c,c=u+w|0,u=s,s=o,o=a,a=w+(y+m)|0}e[0]=e[0]+a|0,e[1]=e[1]+o|0,e[2]=e[2]+s|0,e[3]=e[3]+u|0,e[4]=e[4]+c|0,e[5]=e[5]+l|0,e[6]=e[6]+f|0,e[7]=e[7]+d|0};function o(e,t){e.constructor===String&&(e=r.convertString.UTF8.stringToBytes(e));var n=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],i=function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t}(e),o=8*e.length;i[o>>5]|=128<<24-o%32,i[15+(o+64>>9<<4)]=o;for(var s=0;s<i.length;s+=16)a(n,i,s);var u=function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}(n);return t&&t.asBytes?u:t&&t.asString?r.convertString.bytesToString(u):r.bytesToHex(u)}o.x2=function(e,t){return o(o(e,{asBytes:!0}),t)}}(BU)}));function oQ(e){e=e.trim();for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substring(r,r+2),16));return t}function sQ(e,t){return dU(this,void 0,void 0,Jt.mark((function r(){var n,i,a,o;return Jt.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e["@context"],i=e,!function(e){return e===lU.V1_1||e===lU.V1_2}(t)&&(n.find((function(e){return e===Object(e)&&"@vocab"in e}))?n=null:n.push({"@vocab":"http://fallback.org/"})),a="undefined"!=typeof window&&void 0!==window.XMLHttpRequest?rQ.documentLoaders.xhr():rQ.documentLoaders.node(),rQ.documentLoader=function(e,t){return e in IU?t(null,{contextUrl:null,document:IU[e],documentUrl:e}):a(e,t)},o={algorithm:"URDNA2015",format:"application/nquads"},r.abrupt("return",(n&&(o.expandContext=n),new Promise((function(e,t){rQ.normalize(i,o,(function(r,n){if(r)console.error(r),t(new jU("computeLocalHash",OU("errors","failedJsonLdNormalization")));else{var i=function(e){var t=/<http:\/\/fallback\.org\/(.*)>/.exec(e);if(t){for(var r=[],n=0;n<t.length;n++)r.push(t[n]);return r}return null}(n);i?t(new jU("computeLocalHash","".concat(OU("errors","foundUnmappedFields"),": ").concat(i.join(", ")))):e(aQ(function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<55296||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&e.charCodeAt(r)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}(n)))}}))}))));case 7:case"end":return r.stop()}}),r)})))}var uQ=FU((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),cQ=FU((function(e,t){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var r=KF.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function i(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=KF:(n(KF,t),t.Buffer=i),i.prototype=Object.create(r.prototype),n(r,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=r(e);return void 0!==t?"string"==typeof n?i.fill(t,n):i.fill(t):i.fill(0),i},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return KF.SlowBuffer(e)}}));cQ.Buffer;var lQ=NH.EventEmitter;function fQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var hQ=KF.Buffer,pQ=cK.inspect,vQ=pQ&&pQ.custom||"inspect";function bQ(e,t,r){hQ.prototype.copy.call(e,t,r)}var gQ=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t;return(t=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return hQ.alloc(0);for(var t=hQ.allocUnsafe(e>>>0),r=this.head,n=0;r;)bQ(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=hQ.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:vQ,value:function(e,t){return pQ(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fQ(Object(r),!0).forEach((function(t){dQ(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fQ(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function mQ(e,t){wQ(e,t),yQ(e)}function yQ(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function wQ(e,t){e.emit("error",t)}var _Q=function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,nz(wQ,this,e)):nz(wQ,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?nz(yQ,r):(r._writableState.errorEmitted=!0,nz(mQ,r,e)):nz(mQ,r,e):t?(nz(yQ,r),t(e)):nz(yQ,r)})),this)},xQ=function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},kQ=function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)},SQ={};function EQ(e,t,r){r||(r=Error);var n=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=e,SQ[e]=n}function IQ(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}EQ("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),EQ("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,a,o;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(IQ(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";o='The "'.concat(e,'" ').concat(s," ").concat(i," ").concat(IQ(t,"type"))}return o+". Received type ".concat(r(n))}),TypeError),EQ("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),EQ("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),EQ("ERR_STREAM_PREMATURE_CLOSE","Premature close"),EQ("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),EQ("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),EQ("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),EQ("ERR_STREAM_WRITE_AFTER_END","write after end"),EQ("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),EQ("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),EQ("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var AQ={codes:SQ},PQ=AQ.codes.ERR_INVALID_OPT_VALUE,TQ=function(e,t,r,n){var i=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,n,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new PQ(n?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384};function OQ(e){try{if(!BU.localStorage)return!1}catch(e){return!1}var t=BU.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}var CQ,MQ=YQ;function RQ(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}YQ.WritableState=XQ;var NQ,LQ=function(e,t){if(OQ("noDeprecation"))return e;var r=!1;return function(){if(!r){if(OQ("throwDeprecation"))throw new Error(t);OQ("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}},jQ=KF.Buffer,DQ=BU.Uint8Array||function(){},BQ=TQ,UQ=AQ.codes,FQ=UQ.ERR_INVALID_ARG_TYPE,zQ=UQ.ERR_METHOD_NOT_IMPLEMENTED,HQ=UQ.ERR_MULTIPLE_CALLBACK,qQ=UQ.ERR_STREAM_CANNOT_PIPE,VQ=UQ.ERR_STREAM_DESTROYED,KQ=UQ.ERR_STREAM_NULL_VALUES,WQ=UQ.ERR_STREAM_WRITE_AFTER_END,JQ=UQ.ERR_UNKNOWN_ENCODING,GQ=kQ;function $Q(){}function XQ(e,t,r){CQ=CQ||aZ,e=e||{},"boolean"!=typeof r&&(r=t instanceof CQ),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=BQ(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=!1===e.decodeStrings;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new HQ;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(nz(i,n),nz(nZ,e,t),e._writableState.errorEmitted=!0,GQ(e,n)):(i(n),e._writableState.errorEmitted=!0,GQ(e,n),nZ(e,t))}(e,r,n,t,i);else{var a=tZ(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||eZ(e,r),n?nz(ZQ,e,r,a,i):ZQ(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new RQ(this)}function YQ(e){var t=this instanceof(CQ=CQ||aZ);if(!t&&!NQ.call(YQ,this))return new YQ(e);this._writableState=new XQ(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),lQ.call(this)}function QQ(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new VQ("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function ZQ(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),nZ(e,t)}function eZ(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=!0;r;)i[o]=r,r.isBuf||(s=!1),r=r.next,o+=1;i.allBuffers=s,QQ(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new RQ(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,l=r.callback;if(QQ(e,t,!1,t.objectMode?1:u.length,u,c,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function tZ(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function rZ(e,t){e._final((function(r){t.pendingcb--,r&&GQ(e,r),t.prefinished=!0,e.emit("prefinish"),nZ(e,t)}))}function nZ(e,t){var r=tZ(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,nz(rZ,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}uQ(YQ,lQ),XQ.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(XQ.prototype,"buffer",{get:LQ((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(NQ=Function.prototype[Symbol.hasInstance],Object.defineProperty(YQ,Symbol.hasInstance,{value:function(e){return!!NQ.call(this,e)||this===YQ&&e&&e._writableState instanceof XQ}})):NQ=function(e){return e instanceof this},YQ.prototype.pipe=function(){GQ(this,new qQ)},YQ.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,o=!i.objectMode&&(n=e,jQ.isBuffer(n)||n instanceof DQ);return o&&!jQ.isBuffer(e)&&(e=function(e){return jQ.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=$Q),i.ending?function(e,t){var r=new WQ;GQ(e,r),nz(t,r)}(this,r):(o||function(e,t,r,n){var i;return null===r?i=new KQ:"string"==typeof r||t.objectMode||(i=new FQ("chunk",["string","Buffer"],r)),!i||(GQ(e,i),nz(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=jQ.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else QQ(e,t,!1,s,n,i,a);return u}(this,i,o,e,t,r)),a},YQ.prototype.cork=function(){this._writableState.corked++},YQ.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||eZ(this,e))},YQ.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new JQ(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(YQ.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(YQ.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),YQ.prototype._write=function(e,t,r){r(new zQ("_write()"))},YQ.prototype._writev=null,YQ.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,nZ(e,t),r&&(t.finished?nz(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(YQ.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(YQ.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),YQ.prototype.destroy=_Q,YQ.prototype._undestroy=xQ,YQ.prototype._destroy=function(e,t){t(e)};var iZ=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},aZ=cZ;uQ(cZ,KZ);for(var oZ=iZ(MQ.prototype),sZ=0;sZ<oZ.length;sZ++){var uZ=oZ[sZ];cZ.prototype[uZ]||(cZ.prototype[uZ]=MQ.prototype[uZ])}function cZ(e){if(!(this instanceof cZ))return new cZ(e);KZ.call(this,e),MQ.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",lZ)))}function lZ(){this._writableState.ended||nz(fZ,this)}function fZ(e){e.end()}Object.defineProperty(cZ.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(cZ.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(cZ.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(cZ.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}});var dZ=cQ.Buffer,hZ=dZ.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},pZ=vZ;function vZ(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(dZ.isEncoding===hZ||!hZ(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=mZ,this.end=yZ,t=4;break;case"utf8":this.fillLast=gZ,t=4;break;case"base64":this.text=wZ,this.end=_Z,t=3;break;default:return this.write=xZ,void(this.end=kZ)}this.lastNeed=0,this.lastTotal=0,this.lastChar=dZ.allocUnsafe(t)}function bZ(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function gZ(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function mZ(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function yZ(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function wZ(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function _Z(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function xZ(e){return e.toString(this.encoding)}function kZ(e){return e&&e.length?this.write(e):""}vZ.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},vZ.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},vZ.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=bZ(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=bZ(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=bZ(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},vZ.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var SZ={StringDecoder:pZ},EZ=AQ.codes.ERR_STREAM_PREMATURE_CLOSE;function IZ(){}var AZ,PZ=function e(t,r,n){if("function"==typeof r)return e(t,null,r);r||(r={}),n=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(n||IZ);var i=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,o=function(){t.writable||u()},s=t._writableState&&t._writableState.finished,u=function(){a=!1,s=!0,i||n.call(t)},c=t._readableState&&t._readableState.endEmitted,l=function(){i=!1,c=!0,a||n.call(t)},f=function(e){n.call(t,e)},d=function(){var e;return i&&!c?(t._readableState&&t._readableState.ended||(e=new EZ),n.call(t,e)):a&&!s?(t._writableState&&t._writableState.ended||(e=new EZ),n.call(t,e)):void 0},h=function(){t.req.on("finish",u)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",u),t.on("abort",d),t.req?h():t.on("request",h)):a&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",l),t.on("finish",u),!1!==r.error&&t.on("error",f),t.on("close",d),function(){t.removeListener("complete",u),t.removeListener("abort",d),t.removeListener("request",h),t.req&&t.req.removeListener("finish",u),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",u),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",d)}};function TZ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var OZ=Symbol("lastResolve"),CZ=Symbol("lastReject"),MZ=Symbol("error"),RZ=Symbol("ended"),NZ=Symbol("lastPromise"),LZ=Symbol("handlePromise"),jZ=Symbol("stream");function DZ(e,t){return{value:e,done:t}}function BZ(e){var t=e[OZ];if(null!==t){var r=e[jZ].read();null!==r&&(e[NZ]=null,e[OZ]=null,e[CZ]=null,t(DZ(r,!1)))}}function UZ(e){nz(BZ,e)}var FZ,zZ=Object.getPrototypeOf((function(){})),HZ=Object.setPrototypeOf((TZ(AZ={get stream(){return this[jZ]},next:function(){var e=this,t=this[MZ];if(null!==t)return Promise.reject(t);if(this[RZ])return Promise.resolve(DZ(void 0,!0));if(this[jZ].destroyed)return new Promise((function(t,r){nz((function(){e[MZ]?r(e[MZ]):t(DZ(void 0,!0))}))}));var r,n=this[NZ];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[RZ]?r(DZ(void 0,!0)):t[LZ](r,n)}),n)}}(n,this));else{var i=this[jZ].read();if(null!==i)return Promise.resolve(DZ(i,!1));r=new Promise(this[LZ])}return this[NZ]=r,r}},Symbol.asyncIterator,(function(){return this})),TZ(AZ,"return",(function(){var e=this;return new Promise((function(t,r){e[jZ].destroy(null,(function(e){e?r(e):t(DZ(void 0,!0))}))}))})),AZ),zZ),qZ=function(e){var t,r=Object.create(HZ,(TZ(t={},jZ,{value:e,writable:!0}),TZ(t,OZ,{value:null,writable:!0}),TZ(t,CZ,{value:null,writable:!0}),TZ(t,MZ,{value:null,writable:!0}),TZ(t,RZ,{value:e._readableState.endEmitted,writable:!0}),TZ(t,LZ,{value:function(e,t){var n=r[jZ].read();n?(r[NZ]=null,r[OZ]=null,r[CZ]=null,e(DZ(n,!1))):(r[OZ]=e,r[CZ]=t)},writable:!0}),t));return r[NZ]=null,PZ(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[CZ];return null!==t&&(r[NZ]=null,r[OZ]=null,r[CZ]=null,t(e)),void(r[MZ]=e)}var n=r[OZ];null!==n&&(r[NZ]=null,r[OZ]=null,r[CZ]=null,n(DZ(void 0,!0))),r[RZ]=!0})),e.on("readable",UZ.bind(null,r)),r},VZ=function(){throw new Error("Readable.from is not available in the browser")},KZ=u0;u0.ReadableState=s0;var WZ,JZ=function(e,t){return e.listeners(t).length},GZ=KF.Buffer,$Z=BU.Uint8Array||function(){};WZ=cK&&cK.debuglog?cK.debuglog("stream"):function(){};var XZ,YZ,QZ,ZZ=TQ,e0=AQ.codes,t0=e0.ERR_INVALID_ARG_TYPE,r0=e0.ERR_STREAM_PUSH_AFTER_EOF,n0=e0.ERR_METHOD_NOT_IMPLEMENTED,i0=e0.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;uQ(u0,lQ);var a0=kQ,o0=["error","close","destroy","pause","resume"];function s0(e,t,r){FZ=FZ||aZ,e=e||{},"boolean"!=typeof r&&(r=t instanceof FZ),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=ZZ(this,e,"readableHighWaterMark",r),this.buffer=new gQ,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(XZ||(XZ=SZ.StringDecoder),this.decoder=new XZ(e.encoding),this.encoding=e.encoding)}function u0(e){if(FZ=FZ||aZ,!(this instanceof u0))return new u0(e);var t=this instanceof FZ;this._readableState=new s0(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),lQ.call(this)}function c0(e,t,r,n,i){WZ("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(WZ("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?d0(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,h0(e)))}}(e,o);else if(i||(a=function(e,t){var r,n;return n=t,GZ.isBuffer(n)||n instanceof $Z||"string"==typeof t||void 0===t||e.objectMode||(r=new t0("chunk",["string","Buffer","Uint8Array"],t)),r}(o,t)),a)a0(e,a);else if(o.objectMode||t&&t.length>0)if("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===GZ.prototype||(t=function(e){return GZ.from(e)}(t)),n)o.endEmitted?a0(e,new i0):l0(e,o,t,!0);else if(o.ended)a0(e,new r0);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?l0(e,o,t,!1):p0(e,o)):l0(e,o,t,!1)}else n||(o.reading=!1,p0(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function l0(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&d0(e)),p0(e,t)}function f0(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function d0(e){var t=e._readableState;WZ("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(WZ("emitReadable",t.flowing),t.emittedReadable=!0,nz(h0,e))}function h0(e){var t=e._readableState;WZ("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,y0(e)}function p0(e,t){t.readingMore||(t.readingMore=!0,nz(v0,e,t))}function v0(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(WZ("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function b0(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function g0(e){WZ("readable nexttick read 0"),e.read(0)}function m0(e,t){WZ("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),y0(e),t.flowing&&!t.reading&&e.read(0)}function y0(e){var t=e._readableState;for(WZ("flow",t.flowing);t.flowing&&null!==e.read(););}function w0(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function _0(e){var t=e._readableState;WZ("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,nz(x0,t,e))}function x0(e,t){if(WZ("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function k0(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(u0.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),u0.prototype.destroy=_Q,u0.prototype._undestroy=xQ,u0.prototype._destroy=function(e,t){t(e)},u0.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=GZ.from(e,t),t=""),r=!0),c0(this,e,t,!1,r)},u0.prototype.unshift=function(e){return c0(this,e,null,!0,!1)},u0.prototype.isPaused=function(){return!1===this._readableState.flowing},u0.prototype.setEncoding=function(e){XZ||(XZ=SZ.StringDecoder);var t=new XZ(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this},u0.prototype.read=function(e){WZ("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return WZ("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_0(this):d0(this),null;if(0===(e=f0(e,t))&&t.ended)return 0===t.length&&_0(this),null;var n,i=t.needReadable;return WZ("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&WZ("length less than watermark",i=!0),t.ended||t.reading?WZ("reading or ended",i=!1):i&&(WZ("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=f0(r,t))),null===(n=e>0?w0(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&_0(this)),null!==n&&this.emit("data",n),n},u0.prototype._read=function(e){a0(this,new n0("_read()"))},u0.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,WZ("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end||e===bz.stdout||e===bz.stderr?d:a;function a(){WZ("onend"),e.end()}n.endEmitted?nz(i):r.once("end",i),e.on("unpipe",(function t(i,h){WZ("onunpipe"),i===r&&h&&!1===h.hasUnpiped&&(h.hasUnpiped=!0,WZ("cleanup"),e.removeListener("close",l),e.removeListener("finish",f),e.removeListener("drain",o),e.removeListener("error",c),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",d),r.removeListener("data",u),s=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||o())}));var o=function(e){return function(){var t=e._readableState;WZ("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&JZ(e,"data")&&(t.flowing=!0,y0(e))}}(r);e.on("drain",o);var s=!1;function u(t){WZ("ondata");var i=e.write(t);WZ("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==k0(n.pipes,e))&&!s&&(WZ("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(t){WZ("onerror",t),d(),e.removeListener("error",c),0===JZ(e,"error")&&a0(e,t)}function l(){e.removeListener("finish",f),d()}function f(){WZ("onfinish"),e.removeListener("close",l),d()}function d(){WZ("unpipe"),r.unpipe(e)}return r.on("data",u),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",l),e.once("finish",f),e.emit("pipe",r),n.flowing||(WZ("pipe resume"),r.resume()),e},u0.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=k0(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},u0.prototype.on=function(e,t){var r=lQ.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,WZ("on readable",n.length,n.reading),n.length?d0(this):n.reading||nz(g0,this))),r},u0.prototype.addListener=u0.prototype.on,u0.prototype.removeListener=function(e,t){var r=lQ.prototype.removeListener.call(this,e,t);return"readable"===e&&nz(b0,this),r},u0.prototype.removeAllListeners=function(e){var t=lQ.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||nz(b0,this),t},u0.prototype.resume=function(){var e=this._readableState;return e.flowing||(WZ("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,nz(m0,e,t))}(this,e)),e.paused=!1,this},u0.prototype.pause=function(){return WZ("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(WZ("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},u0.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(WZ("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){WZ("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<o0.length;a++)e.on(o0[a],this.emit.bind(this,o0[a]));return this._read=function(t){WZ("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(u0.prototype[Symbol.asyncIterator]=function(){return void 0===YZ&&(YZ=qZ),YZ(this)}),Object.defineProperty(u0.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(u0.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(u0.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),u0._fromList=w0,Object.defineProperty(u0.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(u0.from=function(e,t){return void 0===QZ&&(QZ=VZ),QZ(u0,e,t)});var S0=C0,E0=AQ.codes,I0=E0.ERR_METHOD_NOT_IMPLEMENTED,A0=E0.ERR_MULTIPLE_CALLBACK,P0=E0.ERR_TRANSFORM_ALREADY_TRANSFORMING,T0=E0.ERR_TRANSFORM_WITH_LENGTH_0;function O0(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new A0);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function C0(e){if(!(this instanceof C0))return new C0(e);aZ.call(this,e),this._transformState={afterTransform:O0.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",M0)}function M0(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?R0(this,null,null):this._flush((function(t,r){R0(e,t,r)}))}function R0(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new T0;if(e._transformState.transforming)throw new P0;return e.push(null)}uQ(C0,aZ),C0.prototype.push=function(e,t){return this._transformState.needTransform=!1,aZ.prototype.push.call(this,e,t)},C0.prototype._transform=function(e,t,r){r(new I0("_transform()"))},C0.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},C0.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},C0.prototype._destroy=function(e,t){aZ.prototype._destroy.call(this,e,(function(e){t(e)}))};var N0,L0=j0;function j0(e){if(!(this instanceof j0))return new j0(e);S0.call(this,e)}uQ(j0,S0),j0.prototype._transform=function(e,t,r){r(null,e)};var D0=AQ.codes,B0=D0.ERR_MISSING_ARGS,U0=D0.ERR_STREAM_DESTROYED;function F0(e){if(e)throw e}function z0(e,t,r,n){n=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(n);var i=!1;e.on("close",(function(){i=!0})),void 0===N0&&(N0=PZ),N0(e,{readable:t,writable:r},(function(e){if(e)return n(e);i=!0,n()}));var a=!1;return function(t){if(!i&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void n(t||new U0("pipe"))}}function H0(e){e()}function q0(e,t){return e.pipe(t)}function V0(e){return e.length?"function"!=typeof e[e.length-1]?F0:e.pop():F0}var K0=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=V0(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new B0("streams");var a=t.map((function(e,r){var o=r<t.length-1;return z0(e,o,r>0,(function(e){n||(n=e),e&&a.forEach(H0),o||(a.forEach(H0),i(n))}))}));return t.reduce(q0)},W0=FU((function(e,t){(t=e.exports=KZ).Stream=t,t.Readable=t,t.Writable=MQ,t.Duplex=aZ,t.Transform=S0,t.PassThrough=L0,t.finished=PZ,t.pipeline=K0}));W0.Stream,W0.Readable,W0.Writable,W0.Duplex,W0.Transform,W0.PassThrough,W0.finished,W0.pipeline;var J0=cQ.Buffer,G0=W0.Transform;function $0(e){G0.call(this),this._block=J0.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}uQ($0,G0),$0.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},$0.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},$0.prototype.update=function(e,t){if(function(e,t){if(!J0.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");J0.isBuffer(e)||(e=J0.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var a=0,o=8*e.length;o>0;++a)this._length[a]+=o,(o=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*o);return this},$0.prototype._update=function(){throw new Error("_update is not implemented")},$0.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},$0.prototype._digest=function(){throw new Error("_digest is not implemented")};var X0=$0,Y0=cQ.Buffer,Q0=new Array(16);function Z0(){X0.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function e1(e,t){return e<<t|e>>>32-t}function t1(e,t,r,n,i,a,o){return e1(e+(t&r|~t&n)+i+a|0,o)+t|0}function r1(e,t,r,n,i,a,o){return e1(e+(t&n|r&~n)+i+a|0,o)+t|0}function n1(e,t,r,n,i,a,o){return e1(e+(t^r^n)+i+a|0,o)+t|0}function i1(e,t,r,n,i,a,o){return e1(e+(r^(t|~n))+i+a|0,o)+t|0}uQ(Z0,X0),Z0.prototype._update=function(){for(var e=Q0,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d;r=t1(r,n,i,a,e[0],3614090360,7),a=t1(a,r,n,i,e[1],3905402710,12),i=t1(i,a,r,n,e[2],606105819,17),n=t1(n,i,a,r,e[3],3250441966,22),r=t1(r,n,i,a,e[4],4118548399,7),a=t1(a,r,n,i,e[5],1200080426,12),i=t1(i,a,r,n,e[6],2821735955,17),n=t1(n,i,a,r,e[7],4249261313,22),r=t1(r,n,i,a,e[8],1770035416,7),a=t1(a,r,n,i,e[9],2336552879,12),i=t1(i,a,r,n,e[10],4294925233,17),n=t1(n,i,a,r,e[11],2304563134,22),r=t1(r,n,i,a,e[12],1804603682,7),a=t1(a,r,n,i,e[13],4254626195,12),i=t1(i,a,r,n,e[14],2792965006,17),r=r1(r,n=t1(n,i,a,r,e[15],1236535329,22),i,a,e[1],4129170786,5),a=r1(a,r,n,i,e[6],3225465664,9),i=r1(i,a,r,n,e[11],643717713,14),n=r1(n,i,a,r,e[0],3921069994,20),r=r1(r,n,i,a,e[5],3593408605,5),a=r1(a,r,n,i,e[10],38016083,9),i=r1(i,a,r,n,e[15],3634488961,14),n=r1(n,i,a,r,e[4],3889429448,20),r=r1(r,n,i,a,e[9],568446438,5),a=r1(a,r,n,i,e[14],3275163606,9),i=r1(i,a,r,n,e[3],4107603335,14),n=r1(n,i,a,r,e[8],1163531501,20),r=r1(r,n,i,a,e[13],2850285829,5),a=r1(a,r,n,i,e[2],4243563512,9),i=r1(i,a,r,n,e[7],1735328473,14),r=n1(r,n=r1(n,i,a,r,e[12],2368359562,20),i,a,e[5],4294588738,4),a=n1(a,r,n,i,e[8],2272392833,11),i=n1(i,a,r,n,e[11],1839030562,16),n=n1(n,i,a,r,e[14],4259657740,23),r=n1(r,n,i,a,e[1],2763975236,4),a=n1(a,r,n,i,e[4],1272893353,11),i=n1(i,a,r,n,e[7],4139469664,16),n=n1(n,i,a,r,e[10],3200236656,23),r=n1(r,n,i,a,e[13],681279174,4),a=n1(a,r,n,i,e[0],3936430074,11),i=n1(i,a,r,n,e[3],3572445317,16),n=n1(n,i,a,r,e[6],76029189,23),r=n1(r,n,i,a,e[9],3654602809,4),a=n1(a,r,n,i,e[12],3873151461,11),i=n1(i,a,r,n,e[15],530742520,16),r=i1(r,n=n1(n,i,a,r,e[2],3299628645,23),i,a,e[0],4096336452,6),a=i1(a,r,n,i,e[7],1126891415,10),i=i1(i,a,r,n,e[14],2878612391,15),n=i1(n,i,a,r,e[5],4237533241,21),r=i1(r,n,i,a,e[12],1700485571,6),a=i1(a,r,n,i,e[3],2399980690,10),i=i1(i,a,r,n,e[10],4293915773,15),n=i1(n,i,a,r,e[1],2240044497,21),r=i1(r,n,i,a,e[8],1873313359,6),a=i1(a,r,n,i,e[15],4264355552,10),i=i1(i,a,r,n,e[6],2734768916,15),n=i1(n,i,a,r,e[13],1309151649,21),r=i1(r,n,i,a,e[4],4149444226,6),a=i1(a,r,n,i,e[11],3174756917,10),i=i1(i,a,r,n,e[2],718787259,15),n=i1(n,i,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},Z0.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Y0.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var a1=Z0,o1=KF.Buffer,s1=new Array(16),u1=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c1=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],l1=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f1=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d1=[0,1518500249,1859775393,2400959708,2840853838],h1=[1352829926,1548603684,1836072691,2053994217,0];function p1(){X0.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function v1(e,t){return e<<t|e>>>32-t}function b1(e,t,r,n,i,a,o,s){return v1(e+(t^r^n)+a+o|0,s)+i|0}function g1(e,t,r,n,i,a,o,s){return v1(e+(t&r|~t&n)+a+o|0,s)+i|0}function m1(e,t,r,n,i,a,o,s){return v1(e+((t|~r)^n)+a+o|0,s)+i|0}function y1(e,t,r,n,i,a,o,s){return v1(e+(t&n|r&~n)+a+o|0,s)+i|0}function w1(e,t,r,n,i,a,o,s){return v1(e+(t^(r|~n))+a+o|0,s)+i|0}uQ(p1,X0),p1.prototype._update=function(){for(var e=s1,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,s=0|this._a,u=0|this._b,c=0|this._c,l=0|this._d,f=0|this._e,d=0;d<80;d+=1){var h,p;d<16?(h=b1(r,n,i,a,o,e[u1[d]],d1[0],l1[d]),p=w1(s,u,c,l,f,e[c1[d]],h1[0],f1[d])):d<32?(h=g1(r,n,i,a,o,e[u1[d]],d1[1],l1[d]),p=y1(s,u,c,l,f,e[c1[d]],h1[1],f1[d])):d<48?(h=m1(r,n,i,a,o,e[u1[d]],d1[2],l1[d]),p=m1(s,u,c,l,f,e[c1[d]],h1[2],f1[d])):d<64?(h=y1(r,n,i,a,o,e[u1[d]],d1[3],l1[d]),p=g1(s,u,c,l,f,e[c1[d]],h1[3],f1[d])):(h=w1(r,n,i,a,o,e[u1[d]],d1[4],l1[d]),p=b1(s,u,c,l,f,e[c1[d]],h1[4],f1[d])),r=o,o=a,a=v1(i,10),i=n,n=h,s=f,f=l,l=v1(c,10),c=u,u=p}var v=this._b+i+l|0;this._b=this._c+a+f|0,this._c=this._d+o+s|0,this._d=this._e+r+u|0,this._e=this._a+n+c|0,this._a=v},p1.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o1.alloc?o1.alloc(20):new o1(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};var _1=p1,x1=cQ.Buffer;function k1(e,t){this._block=x1.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}k1.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=x1.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,o=0;o<i;){for(var s=a%n,u=Math.min(i-o,n-s),c=0;c<u;c++)r[s+c]=e[o+c];o+=u,(a+=u)%n==0&&this._update(r)}return this._len+=i,this},k1.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},k1.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var S1=k1,E1=cQ.Buffer,I1=[1518500249,1859775393,-1894007588,-899497514],A1=new Array(80);function P1(){this.init(),this._w=A1,S1.call(this,64,56)}function T1(e){return e<<30|e>>>2}function O1(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}uQ(P1,S1),P1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},P1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=r[u-3]^r[u-8]^r[u-14]^r[u-16];for(var c=0;c<80;++c){var l=~~(c/20),f=0|((t=n)<<5|t>>>27)+O1(l,i,a,o)+s+r[c]+I1[l];s=o,o=a,a=T1(i),i=n,n=f}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},P1.prototype._hash=function(){var e=E1.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var C1=P1,M1=cQ.Buffer,R1=[1518500249,1859775393,-1894007588,-899497514],N1=new Array(80);function L1(){this.init(),this._w=N1,S1.call(this,64,56)}function j1(e){return e<<5|e>>>27}function D1(e){return e<<30|e>>>2}function B1(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}uQ(L1,S1),L1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},L1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)r[u]=e.readInt32BE(4*u);for(;u<80;++u)r[u]=(t=r[u-3]^r[u-8]^r[u-14]^r[u-16])<<1|t>>>31;for(var c=0;c<80;++c){var l=~~(c/20),f=j1(n)+B1(l,i,a,o)+s+r[c]+R1[l]|0;s=o,o=a,a=D1(i),i=n,n=f}this._a=n+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},L1.prototype._hash=function(){var e=M1.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var U1=L1,F1=cQ.Buffer,z1=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],H1=new Array(64);function q1(){this.init(),this._w=H1,S1.call(this,64,56)}function V1(e,t,r){return r^e&(t^r)}function K1(e,t,r){return e&t|r&(e|t)}function W1(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function J1(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function G1(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function $1(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}uQ(q1,S1),q1.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},q1.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,s=0|this._f,u=0|this._g,c=0|this._h,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<64;++l)t[l]=$1(t[l-2])+t[l-7]+G1(t[l-15])+t[l-16]|0;for(var f=0;f<64;++f){var d=c+J1(o)+V1(o,s,u)+z1[f]+t[f]|0,h=W1(r)+K1(r,n,i)|0;c=u,u=s,s=o,o=a+d|0,a=i,i=n,n=r,r=d+h|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0,this._f=s+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},q1.prototype._hash=function(){var e=F1.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var X1=q1,Y1=cQ.Buffer,Q1=new Array(64);function Z1(){this.init(),this._w=Q1,S1.call(this,64,56)}uQ(Z1,X1),Z1.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Z1.prototype._hash=function(){var e=Y1.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var e2=Z1,t2=cQ.Buffer,r2=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],n2=new Array(160);function i2(){this.init(),this._w=n2,S1.call(this,128,112)}function a2(e,t,r){return r^e&(t^r)}function o2(e,t,r){return e&t|r&(e|t)}function s2(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function u2(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c2(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function l2(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f2(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function d2(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function h2(e,t){return e>>>0<t>>>0?1:0}uQ(i2,S1),i2.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i2.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,s=0|this._fh,u=0|this._gh,c=0|this._hh,l=0|this._al,f=0|this._bl,d=0|this._cl,h=0|this._dl,p=0|this._el,v=0|this._fl,b=0|this._gl,g=0|this._hl,m=0;m<32;m+=2)t[m]=e.readInt32BE(4*m),t[m+1]=e.readInt32BE(4*m+4);for(;m<160;m+=2){var y=t[m-30],w=t[m-30+1],_=c2(y,w),x=l2(w,y),k=f2(y=t[m-4],w=t[m-4+1]),S=d2(w,y),E=t[m-14],I=t[m-14+1],A=t[m-32],P=t[m-32+1],T=x+I|0,O=_+E+h2(T,x)|0;O=(O=O+k+h2(T=T+S|0,S)|0)+A+h2(T=T+P|0,P)|0,t[m]=O,t[m+1]=T}for(var C=0;C<160;C+=2){O=t[C],T=t[C+1];var M=o2(r,n,i),R=o2(l,f,d),N=s2(r,l),L=s2(l,r),j=u2(o,p),D=u2(p,o),B=r2[C],U=r2[C+1],F=a2(o,s,u),z=a2(p,v,b),H=g+D|0,q=c+j+h2(H,g)|0;q=(q=(q=q+F+h2(H=H+z|0,z)|0)+B+h2(H=H+U|0,U)|0)+O+h2(H=H+T|0,T)|0;var V=L+R|0,K=N+M+h2(V,L)|0;c=u,g=b,u=s,b=v,s=o,v=p,o=a+q+h2(p=h+H|0,h)|0,a=i,h=d,i=n,d=f,n=r,f=l,r=q+K+h2(l=H+V|0,H)|0}this._al=this._al+l|0,this._bl=this._bl+f|0,this._cl=this._cl+d|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+v|0,this._gl=this._gl+b|0,this._hl=this._hl+g|0,this._ah=this._ah+r+h2(this._al,l)|0,this._bh=this._bh+n+h2(this._bl,f)|0,this._ch=this._ch+i+h2(this._cl,d)|0,this._dh=this._dh+a+h2(this._dl,h)|0,this._eh=this._eh+o+h2(this._el,p)|0,this._fh=this._fh+s+h2(this._fl,v)|0,this._gh=this._gh+u+h2(this._gl,b)|0,this._hh=this._hh+c+h2(this._hl,g)|0},i2.prototype._hash=function(){var e=t2.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var p2=i2,v2=cQ.Buffer,b2=new Array(160);function g2(){this.init(),this._w=b2,S1.call(this,128,112)}uQ(g2,p2),g2.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},g2.prototype._hash=function(){var e=v2.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var m2=g2,y2=FU((function(e){var t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};t.sha=C1,t.sha1=U1,t.sha224=e2,t.sha256=X1,t.sha384=m2,t.sha512=p2})),w2=cQ.Buffer,_2=Nq.Transform,x2=YH.StringDecoder;function k2(e){_2.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}uQ(k2,_2),k2.prototype.update=function(e,t,r){"string"==typeof e&&(e=w2.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},k2.prototype.setAutoPadding=function(){},k2.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},k2.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},k2.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},k2.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},k2.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},k2.prototype._finalOrDigest=function(e){var t=this.__final()||w2.alloc(0);return e&&(t=this._toString(t,e,!0)),t},k2.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new x2(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n};var S2=k2;function E2(e){S2.call(this,"digest"),this._hash=e}uQ(E2,S2),E2.prototype._update=function(e){this._hash.update(e)},E2.prototype._final=function(){return this._hash.digest()};var I2=function(e){return"md5"===(e=e.toLowerCase())?new a1:"rmd160"===e||"ripemd160"===e?new _1:new E2(y2(e))},A2=cQ.Buffer,P2=A2.alloc(128);function T2(e,t){S2.call(this,"digest"),"string"==typeof t&&(t=A2.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=A2.concat([t,P2],64));for(var r=this._ipad=A2.allocUnsafe(64),n=this._opad=A2.allocUnsafe(64),i=0;i<64;i++)r[i]=54^t[i],n[i]=92^t[i];this._hash=[r]}uQ(T2,S2),T2.prototype._update=function(e){this._hash.push(e)},T2.prototype._final=function(){var e=this._alg(A2.concat(this._hash));return this._alg(A2.concat([this._opad,e]))};var O2=T2,C2=function(e){return(new a1).update(e).digest()},M2=cQ.Buffer,R2=M2.alloc(128);function N2(e,t){S2.call(this,"digest"),"string"==typeof t&&(t=M2.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new _1:y2(e)).update(t).digest():t.length<r&&(t=M2.concat([t,R2],r));for(var n=this._ipad=M2.allocUnsafe(r),i=this._opad=M2.allocUnsafe(r),a=0;a<r;a++)n[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new _1:y2(e),this._hash.update(n)}uQ(N2,S2),N2.prototype._update=function(e){this._hash.update(e)},N2.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new _1:y2(this._alg)).update(this._opad).update(e).digest()};var L2=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new N2("rmd160",t):"md5"===e?new O2(C2,t):new N2(e,t)},j2=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hash160=function(e){var t=I2("sha256").update(e).digest();try{return I2("rmd160").update(t).digest()}catch(e){return I2("ripemd160").update(t).digest()}},t.hmacSHA512=function(e,t){return L2("sha512",e).update(t).digest()}}));UU(j2),j2.hash160,j2.hmacSHA512;var D2=cQ.Buffer,B2=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var n=0;n<e.length;n++){var i=e.charAt(n),a=i.charCodeAt(0);if(255!==t[a])throw new TypeError(i+" is ambiguous");t[a]=n}var o=e.length,s=e.charAt(0),u=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function l(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return D2.alloc(0);var r=0;if(" "!==e[r]){for(var n=0,i=0;e[r]===s;)n++,r++;for(var a=(e.length-r)*u+1>>>0,c=new Uint8Array(a);e[r];){var l=t[e.charCodeAt(r)];if(255===l)return;for(var f=0,d=a-1;(0!==l||f<i)&&-1!==d;d--,f++)l+=o*c[d]>>>0,c[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,r++}if(" "!==e[r]){for(var h=a-i;h!==a&&0===c[h];)h++;var p=D2.allocUnsafe(n+(a-h));p.fill(0,0,n);for(var v=n;h!==a;)p[v++]=c[h++];return p}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=D2.from(t)),!D2.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,n=0,i=0,a=t.length;i!==a&&0===t[i];)i++,r++;for(var u=(a-i)*c+1>>>0,l=new Uint8Array(u);i!==a;){for(var f=t[i],d=0,h=u-1;(0!==f||d<n)&&-1!==h;h--,d++)f+=256*l[h]>>>0,l[h]=f%o>>>0,f=f/o>>>0;if(0!==f)throw new Error("Non-zero carry");n=d,i++}for(var p=u-n;p!==u&&0===l[p];)p++;for(var v=s.repeat(r);p<u;++p)v+=e.charAt(l[p]);return v},decodeUnsafe:l,decode:function(e){var t=l(e);if(t)return t;throw new Error("Non-base"+o+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),U2=cQ.Buffer,F2=function(e){function t(t){var r=t.slice(0,-4),n=t.slice(-4),i=e(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(t){var r=e(t);return B2.encode(U2.concat([t,r],t.length+4))},decode:function(e){var r=t(B2.decode(e));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(e){var r=B2.decodeUnsafe(e);if(r)return t(r)}}}((function(e){var t=I2("sha256").update(e).digest();return I2("sha256").update(t).digest()})),z2=FU((function(e){!function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"==r(e)?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:cK.Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==r(e)&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==r(e))return this._initArray(e,t,i);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var a=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(a++,this.negative=1),a<e.length&&(16===t?this._parseHex(e,a,i):(this._parseBase(e,t,a),"le"===i&&this._initArray(this.toArray(),t,i)))},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,a=0,o=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<a,this.words[o]|=67108863&i,a>=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,u=0,l=r;l<s;l+=n)u=c(e,l,l+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var f=1;for(u=c(e,l,e.length,t),l=0;l<o;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(o=(i=0|e.words[p])*(a=0|t.words[h])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);r=0!=(a=s>>>24-i&16777215)||o!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var v=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?v+r:l[c-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),l=this.clone();if(u){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)a=(t=(0|r.words[o])-(0|n.words[o])+a)>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)a=(t=(0|r.words[o])+a)>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,l=0|o[0],f=8191&l,d=l>>>13,h=0|o[1],p=8191&h,v=h>>>13,b=0|o[2],g=8191&b,m=b>>>13,y=0|o[3],w=8191&y,_=y>>>13,x=0|o[4],k=8191&x,S=x>>>13,E=0|o[5],I=8191&E,A=E>>>13,P=0|o[6],T=8191&P,O=P>>>13,C=0|o[7],M=8191&C,R=C>>>13,N=0|o[8],L=8191&N,j=N>>>13,D=0|o[9],B=8191&D,U=D>>>13,F=0|s[0],z=8191&F,H=F>>>13,q=0|s[1],V=8191&q,K=q>>>13,W=0|s[2],J=8191&W,G=W>>>13,$=0|s[3],X=8191&$,Y=$>>>13,Q=0|s[4],Z=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ve=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,z)|0))<<13)|0;c=((a=Math.imul(d,H))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(v,z)|0,a=Math.imul(v,H);var ge=(c+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(d,V)|0))<<13)|0;c=((a=a+Math.imul(d,K)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(m,z)|0,a=Math.imul(m,H),n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(v,V)|0,a=a+Math.imul(v,K)|0;var me=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,J)|0))<<13)|0;c=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,a=Math.imul(_,H),n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(m,V)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,G)|0;var ye=(c+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,X)|0))<<13)|0;c=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(k,z),i=(i=Math.imul(k,H))+Math.imul(S,z)|0,a=Math.imul(S,H),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,V)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,Y)|0;var we=(c+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(A,z)|0,a=Math.imul(A,H),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,V)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(v,Z)|0,a=a+Math.imul(v,ee)|0;var _e=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((a=a+Math.imul(d,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(T,z),i=(i=Math.imul(T,H))+Math.imul(O,z)|0,a=Math.imul(O,H),n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(A,V)|0,a=a+Math.imul(A,K)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,Y)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,Z)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(v,re)|0,a=a+Math.imul(v,ne)|0;var xe=(c+(n=n+Math.imul(f,ae)|0)|0)+((8191&(i=(i=i+Math.imul(f,oe)|0)+Math.imul(d,ae)|0))<<13)|0;c=((a=a+Math.imul(d,oe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(M,z),i=(i=Math.imul(M,H))+Math.imul(R,z)|0,a=Math.imul(R,H),n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(O,V)|0,a=a+Math.imul(O,K)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,G)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Z)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(p,ae)|0,i=(i=i+Math.imul(p,oe)|0)+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0;var ke=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((a=a+Math.imul(d,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,H))+Math.imul(j,z)|0,a=Math.imul(j,H),n=n+Math.imul(M,V)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(R,V)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,G)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(A,X)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Z)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,a=a+Math.imul(_,ne)|0,n=n+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,oe)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(v,ue)|0,a=a+Math.imul(v,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,z),i=(i=Math.imul(B,H))+Math.imul(U,z)|0,a=Math.imul(U,H),n=n+Math.imul(L,V)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(j,V)|0,a=a+Math.imul(j,K)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(O,X)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(A,Z)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,oe)|0)+Math.imul(_,ae)|0,a=a+Math.imul(_,oe)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(v,fe)|0,a=a+Math.imul(v,de)|0;var Ee=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ve)|0)+Math.imul(d,pe)|0))<<13)|0;c=((a=a+Math.imul(d,ve)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,V),i=(i=Math.imul(B,K))+Math.imul(U,V)|0,a=Math.imul(U,K),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(j,J)|0,a=a+Math.imul(j,G)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(O,Z)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,oe)|0)+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,a=a+Math.imul(_,ce)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,fe)|0,a=a+Math.imul(m,de)|0;var Ie=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ve)|0)+Math.imul(v,pe)|0))<<13)|0;c=((a=a+Math.imul(v,ve)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,G))+Math.imul(U,J)|0,a=Math.imul(U,G),n=n+Math.imul(L,X)|0,i=(i=i+Math.imul(L,Y)|0)+Math.imul(j,X)|0,a=a+Math.imul(j,Y)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(R,Z)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(I,ae)|0,i=(i=i+Math.imul(I,oe)|0)+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,fe)|0,a=a+Math.imul(_,de)|0;var Ae=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ve)|0)+Math.imul(m,pe)|0))<<13)|0;c=((a=a+Math.imul(m,ve)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,Y))+Math.imul(U,X)|0,a=Math.imul(U,Y),n=n+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,ee)|0)+Math.imul(j,Z)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,oe)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(S,fe)|0,a=a+Math.imul(S,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ve)|0)+Math.imul(_,pe)|0))<<13)|0;c=((a=a+Math.imul(_,ve)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,Z),i=(i=Math.imul(B,ee))+Math.imul(U,Z)|0,a=Math.imul(U,ee),n=n+Math.imul(L,re)|0,i=(i=i+Math.imul(L,ne)|0)+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(M,ae)|0,i=(i=i+Math.imul(M,oe)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(A,fe)|0,a=a+Math.imul(A,de)|0;var Te=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ve)|0)+Math.imul(S,pe)|0))<<13)|0;c=((a=a+Math.imul(S,ve)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=(i=Math.imul(B,ne))+Math.imul(U,re)|0,a=Math.imul(U,ne),n=n+Math.imul(L,ae)|0,i=(i=i+Math.imul(L,oe)|0)+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(O,fe)|0,a=a+Math.imul(O,de)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ve)|0)+Math.imul(A,pe)|0))<<13)|0;c=((a=a+Math.imul(A,ve)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,ae),i=(i=Math.imul(B,oe))+Math.imul(U,ae)|0,a=Math.imul(U,oe),n=n+Math.imul(L,ue)|0,i=(i=i+Math.imul(L,ce)|0)+Math.imul(j,ue)|0,a=a+Math.imul(j,ce)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(R,fe)|0,a=a+Math.imul(R,de)|0;var Ce=(c+(n=n+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ve)|0)+Math.imul(O,pe)|0))<<13)|0;c=((a=a+Math.imul(O,ve)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,ue),i=(i=Math.imul(B,ce))+Math.imul(U,ue)|0,a=Math.imul(U,ce),n=n+Math.imul(L,fe)|0,i=(i=i+Math.imul(L,de)|0)+Math.imul(j,fe)|0,a=a+Math.imul(j,de)|0;var Me=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ve)|0)+Math.imul(R,pe)|0))<<13)|0;c=((a=a+Math.imul(R,ve)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(U,fe)|0,a=Math.imul(U,de);var Re=(c+(n=n+Math.imul(L,pe)|0)|0)+((8191&(i=(i=i+Math.imul(L,ve)|0)+Math.imul(j,pe)|0))<<13)|0;c=((a=a+Math.imul(j,ve)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(n=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,ve))+Math.imul(U,pe)|0))<<13)|0;return c=((a=Math.imul(U,ve))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=be,u[1]=ge,u[2]=me,u[3]=ye,u[4]=we,u[5]=_e,u[6]=xe,u[7]=ke,u[8]=Se,u[9]=Ee,u[10]=Ie,u[11]=Ae,u[12]=Pe,u[13]=Te,u[14]=Oe,u[15]=Ce,u[16]=Me,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,r.length++),r};function v(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=h),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var l=a-c,f=(0|e.words[l])*(0|t.words[c]),d=67108863&f;s=67108863&(d=d+s|0),i+=(o=(o=o+(f/67108864|0)|0)+(d>>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},b.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var f=u,d=c,h=0;h<o;h++){var p=r[l+h],v=n[l+h],b=r[l+h+o],g=n[l+h+o],m=f*b-d*g;g=f*g+d*b,b=m,r[l+h]=p+b,n[l+h]=v+g,r[l+h+o]=p-b,n[l+h+o]=v-g,h!==s&&(m=u*f-c*d,d=u*d+c*f,f=m)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0==(-8192&a))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,l,f,n,i);for(var h=0;h<n;h++){var p=s[h]*l[h]-u[h]*f[h];u[h]=s[h]*f[h]+u[h]*l[h],s[h]=p}return this.conjugate(s,u,n),this.transform(s,u,d,a,n,i),this.conjugate(d,a,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),v(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-a|f>>>a,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},a.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;s=((a-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)s=(a=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(a=-(0|this.words[i])+s)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,s&&(s.words[u]=1));for(var f=u-1;f>=0;f--){var d=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,f);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=d)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var p=0,v=1;0==(r.words[0]&v)&&p<26;++p,v<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0==(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var f=0,d=1;0==(r.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(i=0===t.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new k(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(y,m),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,m),i(_,m),i(x,m),x.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return g[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var v=h,b=0;0!==v.cmp(s);b++)v=v.redSqr();n(b<p);var g=this.pow(f,new a(1).iushln(p-b-1));d=d.redMul(g),f=g.redSqr(),h=h.redMul(f),p=b}return d},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new a(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],o=0,s=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new S(e)},i(S,k),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,BU)})),H2="lib/elliptic.js",q2=["lib"],V2={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},K2={type:"git",url:"git@github.com:indutny/elliptic"},W2=["EC","Elliptic","curve","Cryptography"],J2="Fedor Indutny <fedor@indutny.com>",G2={url:"https://github.com/indutny/elliptic/issues"},$2="https://github.com/indutny/elliptic",X2={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},Y2={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},Q2={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:H2,files:q2,scripts:V2,repository:K2,keywords:W2,author:J2,license:"MIT",bugs:G2,homepage:$2,devDependencies:X2,dependencies:Y2},Z2=Object.freeze({__proto__:null,name:"elliptic",version:"6.5.4",description:"EC cryptography",main:H2,files:q2,scripts:V2,repository:K2,keywords:W2,author:J2,license:"MIT",bugs:G2,homepage:$2,devDependencies:X2,dependencies:Y2,default:Q2}),e3=t3;function t3(e,t){if(!e)throw new Error(t||"Assertion failed")}t3.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var r3,n3=FU((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,o=255&i;a?r.push(a,o):r.push(o)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),i3=FU((function(e,t){var r=t;r.assert=e3,r.toArray=n3.toArray,r.zero2=n3.zero2,r.toHex=n3.toHex,r.encode=n3.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,a=e.clone(),o=0;o<n.length;o++){var s,u=a.andln(i-1);a.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,a.isubn(s)):s=0,n[o]=s,a.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,a=0;e.cmpn(-i)>0||t.cmpn(-a)>0;){var o,s,u=e.andln(3)+i&3,c=t.andln(3)+a&3;3===u&&(u=-1),3===c&&(c=-1),o=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(o),s=0==(1&c)?0:3!=(n=t.andln(7)+a&7)&&5!==n||2!==u?c:-c,r[1].push(s),2*i===o+1&&(i=1-i),2*a===s+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new z2(e,"hex","le")}})),a3=function(e){return r3||(r3=new o3(null)),r3.generate(e)};function o3(e){this.rand=e}var s3=o3;if(o3.prototype.generate=function(e){return this._rand(e)},o3.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==("undefined"==typeof self?"undefined":r(self)))self.crypto&&self.crypto.getRandomValues?o3.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?o3.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==("undefined"==typeof window?"undefined":r(window))&&(o3.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var u3=cK;if("function"!=typeof u3.randomBytes)throw new Error("Not supported");o3.prototype._rand=function(e){return u3.randomBytes(e)}}catch(dU){}a3.Rand=s3;var c3=i3.getNAF,l3=i3.getJSF,f3=i3.assert;function d3(e,t){this.type=e,this.p=new z2(t.p,16),this.red=t.prime?z2.red(t.prime):z2.mont(this.p),this.zero=new z2(0).toRed(this.red),this.one=new z2(1).toRed(this.red),this.two=new z2(2).toRed(this.red),this.n=t.n&&new z2(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var h3=d3;function p3(e,t){this.curve=e,this.type=t,this.precomputed=null}d3.prototype.point=function(){throw new Error("Not implemented")},d3.prototype.validate=function(){throw new Error("Not implemented")},d3.prototype._fixedNafMul=function(e,t){f3(e.precomputed);var r=e._getDoubles(),n=c3(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,o,s=[];for(a=0;a<n.length;a+=r.step){o=0;for(var u=a+r.step-1;u>=a;u--)o=(o<<1)+n[u];s.push(o)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(a=0;a<s.length;a++)(o=s[a])===f?l=l.mixedAdd(r.points[a]):o===-f&&(l=l.mixedAdd(r.points[a].neg()));c=c.add(l)}return c.toP()},d3.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=c3(t,r,this._bitLength),o=this.jpoint(null,null,null),s=a.length-1;s>=0;s--){for(var u=0;s>=0&&0===a[s];s--)u++;if(s>=0&&u++,o=o.dblp(u),s<0)break;var c=a[s];f3(0!==c),o="affine"===e.type?c>0?o.mixedAdd(i[c-1>>1]):o.mixedAdd(i[-c-1>>1].neg()):c>0?o.add(i[c-1>>1]):o.add(i[-c-1>>1].neg())}return"affine"===e.type?o.toP():o},d3.prototype._wnafMulAdd=function(e,t,r,n,i){var a,o,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(a=0;a<n;a++){var d=(s=t[a])._getNAFPoints(e);u[a]=d.wnd,c[a]=d.points}for(a=n-1;a>=1;a-=2){var h=a-1,p=a;if(1===u[h]&&1===u[p]){var v=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(v[1]=t[h].add(t[p]),v[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(v[1]=t[h].toJ().mixedAdd(t[p]),v[2]=t[h].add(t[p].neg())):(v[1]=t[h].toJ().mixedAdd(t[p]),v[2]=t[h].toJ().mixedAdd(t[p].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],g=l3(r[h],r[p]);for(f=Math.max(g[0].length,f),l[h]=new Array(f),l[p]=new Array(f),o=0;o<f;o++){var m=0|g[0][o],y=0|g[1][o];l[h][o]=b[3*(m+1)+(y+1)],l[p][o]=0,c[h]=v}}else l[h]=c3(r[h],u[h],this._bitLength),l[p]=c3(r[p],u[p],this._bitLength),f=Math.max(l[h].length,f),f=Math.max(l[p].length,f)}var w=this.jpoint(null,null,null),_=this._wnafT4;for(a=f;a>=0;a--){for(var x=0;a>=0;){var k=!0;for(o=0;o<n;o++)_[o]=0|l[o][a],0!==_[o]&&(k=!1);if(!k)break;x++,a--}if(a>=0&&x++,w=w.dblp(x),a<0)break;for(o=0;o<n;o++){var S=_[o];0!==S&&(S>0?s=c[o][S-1>>1]:S<0&&(s=c[o][-S-1>>1].neg()),w="affine"===s.type?w.mixedAdd(s):w.add(s))}}for(a=0;a<n;a++)c[a]=null;return i?w:w.toP()},d3.BasePoint=p3,p3.prototype.eq=function(){throw new Error("Not implemented")},p3.prototype.validate=function(){return this.curve.validate(this)},d3.prototype.decodePoint=function(e,t){e=i3.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?f3(e[e.length-1]%2==0):7===e[0]&&f3(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},p3.prototype.encodeCompressed=function(e){return this.encode(e,!0)},p3.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},p3.prototype.encode=function(e,t){return i3.encode(this._encode(t),e)},p3.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},p3.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},p3.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)n=n.dbl();r.push(n)}return{step:e,points:r}},p3.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},p3.prototype._getBeta=function(){return null},p3.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var v3=i3.assert;function b3(e){h3.call(this,"short",e),this.a=new z2(e.a,16).toRed(this.red),this.b=new z2(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}uQ(b3,h3);var g3=b3;function m3(e,t,r,n){h3.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new z2(t,16),this.y=new z2(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function y3(e,t,r,n){h3.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new z2(0)):(this.x=new z2(t,16),this.y=new z2(r,16),this.z=new z2(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}function w3(e){h3.call(this,"mont",e),this.a=new z2(e.a,16).toRed(this.red),this.b=new z2(e.b,16).toRed(this.red),this.i4=new z2(4).toRed(this.red).redInvm(),this.two=new z2(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}b3.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new z2(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new z2(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],v3(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new z2(e.a,16),b:new z2(e.b,16)}})):this._getEndoBasis(r)}}},b3.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:z2.mont(e),r=new z2(2).toRed(t).redInvm(),n=r.redNeg(),i=new z2(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},b3.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,o,s,u,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,d=this.n.clone(),h=new z2(1),p=new z2(0),v=new z2(0),b=new z2(1),g=0;0!==f.cmpn(0);){var m=d.div(f);u=d.sub(m.mul(f)),c=v.sub(m.mul(h));var y=b.sub(m.mul(p));if(!n&&u.cmp(l)<0)t=s.neg(),r=h,n=u.neg(),i=c;else if(n&&2==++g)break;s=u,d=f,f=u,v=h,h=c,b=p,p=y}a=u.neg(),o=c;var w=n.sqr().add(i.sqr());return a.sqr().add(o.sqr()).cmp(w)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:i},{a:a,b:o}]},b3.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),u=i.mul(r.b),c=a.mul(n.b);return{k1:e.sub(o).sub(s),k2:u.add(c).neg()}},b3.prototype.pointFromX=function(e,t){(e=new z2(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},b3.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},b3.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],u=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),u=u.neg(!0)),n[2*a]=s,n[2*a+1]=u,i[2*a]=o.k1,i[2*a+1]=o.k2}for(var c=this._wnafMulAdd(1,n,i,2*a,r),l=0;l<2*a;l++)n[l]=null,i[l]=null;return c},uQ(m3,h3.BasePoint),b3.prototype.point=function(e,t,r){return new m3(this,e,t,r)},b3.prototype.pointFromJSON=function(e,t){return m3.fromJSON(this,e,t)},m3.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},m3.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},m3.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},m3.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},m3.prototype.isInfinity=function(){return this.inf},m3.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},m3.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},m3.prototype.getX=function(){return this.x.fromRed()},m3.prototype.getY=function(){return this.y.fromRed()},m3.prototype.mul=function(e){return e=new z2(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},m3.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},m3.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},m3.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},m3.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},m3.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},uQ(y3,h3.BasePoint),b3.prototype.jpoint=function(e,t,r){return new y3(this,e,t,r)},y3.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},y3.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},y3.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=a.redSub(o);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=n.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(a.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},y3.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),c=u.redMul(o),l=r.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(o);return this.curve.jpoint(f,d,h)},y3.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,s=this.z,u=s.redSqr().redSqr(),c=o.redAdd(o);for(t=0;t<e;t++){var l=a.redSqr(),f=c.redSqr(),d=f.redSqr(),h=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=a.redMul(f),v=h.redSqr().redISub(p.redAdd(p)),b=p.redISub(v),g=h.redMul(b);g=g.redIAdd(g).redISub(d);var m=c.redMul(s);t+1<e&&(u=u.redMul(d)),a=v,s=m,c=g}return this.curve.jpoint(a,c.redMul(i),s)},y3.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},y3.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(o).redISub(o),c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=s.redMul(o.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),d=f.redSqr(),h=this.x.redAdd(f).redSqr().redISub(l).redISub(d);h=h.redIAdd(h);var p=l.redAdd(l).redIAdd(l),v=p.redSqr(),b=d.redIAdd(d);b=(b=b.redIAdd(b)).redIAdd(b),e=v.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},y3.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(o).redISub(o);e=u;var c=a.redIAdd(a);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(o.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),d=this.x.redMul(f),h=this.x.redSub(l).redMul(this.x.redAdd(l));h=h.redAdd(h).redIAdd(h);var p=d.redIAdd(d),v=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(v),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var b=f.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=h.redMul(p.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,r)},y3.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(o),l=s.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),d=o.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(f).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,h,p)},y3.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(o=(o=(o=o.redIAdd(o)).redAdd(o).redIAdd(o)).redISub(a)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(s).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.y.redMul(c.redMul(u.redISub(c)).redISub(o.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(o).redSqr().redISub(r).redISub(s);return this.curve.jpoint(f,d,h)},y3.prototype.mul=function(e,t){return e=new z2(e,t),this.curve._wnafMul(this,e)},y3.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},y3.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},y3.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},y3.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},uQ(w3,h3);var _3=w3;function x3(e,t,r){h3.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new z2(t,16),this.z=new z2(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}w3.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},uQ(x3,h3.BasePoint),w3.prototype.decodePoint=function(e,t){return this.point(i3.toArray(e,t),1)},w3.prototype.point=function(e,t){return new x3(this,e,t)},w3.prototype.pointFromJSON=function(e){return x3.fromJSON(this,e)},x3.prototype.precompute=function(){},x3.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},x3.fromJSON=function(e,t){return new x3(e,t[0],t[1]||e.one)},x3.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},x3.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},x3.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},x3.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},x3.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(r),o=i.redMul(n),s=t.z.redMul(a.redAdd(o).redSqr()),u=t.x.redMul(a.redISub(o).redSqr());return this.curve.point(s,u)},x3.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},x3.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},x3.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},x3.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},x3.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},x3.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var k3=i3.assert;function S3(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,h3.call(this,"edwards",e),this.a=new z2(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new z2(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new z2(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),k3(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}uQ(S3,h3);var E3=S3;function I3(e,t,r,n,i){h3.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new z2(t,16),this.y=new z2(r,16),this.z=n?new z2(n,16):this.curve.one,this.t=i&&new z2(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}S3.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},S3.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},S3.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},S3.prototype.pointFromX=function(e,t){(e=new z2(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(i.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},S3.prototype.pointFromY=function(e,t){(e=new z2(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},S3.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},uQ(I3,h3.BasePoint),S3.prototype.pointFromJSON=function(e){return I3.fromJSON(this,e)},S3.prototype.point=function(e,t,r,n){return new I3(this,e,t,r,n)},I3.fromJSON=function(e,t){return new I3(e,t[0],t[1],t[2])},I3.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},I3.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},I3.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),u=i.redMul(o),c=a.redMul(s),l=i.redMul(s),f=o.redMul(a);return this.curve.point(u,c,f,l)},I3.prototype._projDbl=function(){var e,t,r,n,i,a,o=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(s)).redAdd(u);this.zOne?(e=o.redSub(s).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),a=c.redSub(i).redISub(i),e=o.redSub(s).redISub(u).redMul(a),t=c.redMul(n.redSub(u)),r=c.redMul(a))}else n=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),a=n.redSub(i).redSub(i),e=this.curve._mulC(o.redISub(n)).redMul(a),t=this.curve._mulC(n).redMul(s.redISub(u)),r=n.redMul(a);return this.curve.point(e,t,r)},I3.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},I3.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=a.redMul(o),l=s.redMul(u),f=a.redMul(u),d=o.redMul(s);return this.curve.point(c,l,d,f)},I3.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),u=i.redSub(s),c=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),f=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=u.redMul(c)):(t=n.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},I3.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},I3.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},I3.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},I3.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},I3.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},I3.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},I3.prototype.getX=function(){return this.normalize(),this.x.fromRed()},I3.prototype.getY=function(){return this.normalize(),this.y.fromRed()},I3.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},I3.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},I3.prototype.toP=I3.prototype.normalize,I3.prototype.mixedAdd=I3.prototype.add;var A3=FU((function(e,t){var r=t;r.base=h3,r.short=g3,r.mont=_3,r.edwards=E3}));function P3(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function T3(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function O3(e){return 1===e.length?"0"+e:e}function C3(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}var M3={inherits:uQ,toArray:function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):P3(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},toHex:function(e){for(var t="",r=0;r<e.length;r++)t+=O3(e[r].toString(16));return t},htonl:T3,toHex32:function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=T3(i)),r+=C3(i.toString(16))}return r},zero2:O3,zero8:C3,join32:function(e,t,r,n){var i=r-t;e3(i%4==0);for(var a=new Array(i/4),o=0,s=t;o<a.length;o++,s+=4){var u;u="big"===n?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],a[o]=u>>>0}return a},split32:function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var a=e[n];"big"===t?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},rotr32:function(e,t){return e>>>t|e<<32-t},rotl32:function(e,t){return e<<t|e>>>32-t},sum32:function(e,t){return e+t>>>0},sum32_3:function(e,t,r){return e+t+r>>>0},sum32_4:function(e,t,r,n){return e+t+r+n>>>0},sum32_5:function(e,t,r,n,i){return e+t+r+n+i>>>0},sum64:function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a<n?1:0)+r+i;e[t]=o>>>0,e[t+1]=a},sum64_hi:function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},sum64_lo:function(e,t,r,n){return t+n>>>0},sum64_4_hi:function(e,t,r,n,i,a,o,s){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+a>>>0)<a?1:0,e+r+i+o+(u+=(c=c+s>>>0)<s?1:0)>>>0},sum64_4_lo:function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},sum64_5_hi:function(e,t,r,n,i,a,o,s,u,c){var l=0,f=t;return l+=(f=f+n>>>0)<t?1:0,l+=(f=f+a>>>0)<a?1:0,l+=(f=f+s>>>0)<s?1:0,e+r+i+o+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},sum64_5_lo:function(e,t,r,n,i,a,o,s,u,c){return t+n+a+s+c>>>0},rotr64_hi:function(e,t,r){return(t<<32-r|e>>>r)>>>0},rotr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0},shr64_hi:function(e,t,r){return e>>>r},shr64_lo:function(e,t,r){return(e<<32-r|t>>>r)>>>0}};function R3(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var N3=R3;R3.prototype.update=function(e,t){if(e=M3.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=M3.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},R3.prototype.digest=function(e){return this.update(this._pad()),e3(null===this.pending),this._digest(e)},R3.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a<this.padLength;a++)n[i++]=0;return n};var L3={BlockHash:N3},j3=M3.rotr32;function D3(e,t,r){return e&t^~e&r}function B3(e,t,r){return e&t^e&r^t&r}function U3(e,t,r){return e^t^r}var F3=function(e,t,r,n){return 0===e?D3(t,r,n):1===e||3===e?U3(t,r,n):2===e?B3(t,r,n):void 0},z3=D3,H3=B3,q3=function(e){return j3(e,2)^j3(e,13)^j3(e,22)},V3=function(e){return j3(e,6)^j3(e,11)^j3(e,25)},K3=function(e){return j3(e,7)^j3(e,18)^e>>>3},W3=function(e){return j3(e,17)^j3(e,19)^e>>>10},J3=M3.rotl32,G3=M3.sum32,$3=M3.sum32_5,X3=F3,Y3=L3.BlockHash,Q3=[1518500249,1859775393,2400959708,3395469782];function Z3(){if(!(this instanceof Z3))return new Z3;Y3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}M3.inherits(Z3,Y3);var e4=Z3;Z3.blockSize=512,Z3.outSize=160,Z3.hmacStrength=80,Z3.padLength=64,Z3.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=J3(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],u=this.h[4];for(n=0;n<r.length;n++){var c=~~(n/20),l=$3(J3(i,5),X3(c,a,o,s),u,r[n],Q3[c]);u=s,s=o,o=J3(a,30),a=i,i=l}this.h[0]=G3(this.h[0],i),this.h[1]=G3(this.h[1],a),this.h[2]=G3(this.h[2],o),this.h[3]=G3(this.h[3],s),this.h[4]=G3(this.h[4],u)},Z3.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"big"):M3.split32(this.h,"big")};var t4=M3.sum32,r4=M3.sum32_4,n4=M3.sum32_5,i4=z3,a4=H3,o4=q3,s4=V3,u4=K3,c4=W3,l4=L3.BlockHash,f4=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function d4(){if(!(this instanceof d4))return new d4;l4.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=f4,this.W=new Array(64)}M3.inherits(d4,l4);var h4=d4;function p4(){if(!(this instanceof p4))return new p4;h4.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}d4.blockSize=512,d4.outSize=256,d4.hmacStrength=192,d4.padLength=64,d4.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=r4(c4(r[n-2]),r[n-7],u4(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],o=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],l=this.h[6],f=this.h[7];for(e3(this.k.length===r.length),n=0;n<r.length;n++){var d=n4(f,s4(u),i4(u,c,l),this.k[n],r[n]),h=t4(o4(i),a4(i,a,o));f=l,l=c,c=u,u=t4(s,d),s=o,o=a,a=i,i=t4(d,h)}this.h[0]=t4(this.h[0],i),this.h[1]=t4(this.h[1],a),this.h[2]=t4(this.h[2],o),this.h[3]=t4(this.h[3],s),this.h[4]=t4(this.h[4],u),this.h[5]=t4(this.h[5],c),this.h[6]=t4(this.h[6],l),this.h[7]=t4(this.h[7],f)},d4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"big"):M3.split32(this.h,"big")},M3.inherits(p4,h4);var v4=p4;p4.blockSize=512,p4.outSize=224,p4.hmacStrength=192,p4.padLength=64,p4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h.slice(0,7),"big"):M3.split32(this.h.slice(0,7),"big")};var b4=M3.rotr64_hi,g4=M3.rotr64_lo,m4=M3.shr64_hi,y4=M3.shr64_lo,w4=M3.sum64,_4=M3.sum64_hi,x4=M3.sum64_lo,k4=M3.sum64_4_hi,S4=M3.sum64_4_lo,E4=M3.sum64_5_hi,I4=M3.sum64_5_lo,A4=L3.BlockHash,P4=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function T4(){if(!(this instanceof T4))return new T4;A4.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=P4,this.W=new Array(160)}M3.inherits(T4,A4);var O4=T4;function C4(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function M4(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function R4(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function N4(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function L4(e,t){var r=b4(e,t,28)^b4(t,e,2)^b4(t,e,7);return r<0&&(r+=4294967296),r}function j4(e,t){var r=g4(e,t,28)^g4(t,e,2)^g4(t,e,7);return r<0&&(r+=4294967296),r}function D4(e,t){var r=b4(e,t,14)^b4(e,t,18)^b4(t,e,9);return r<0&&(r+=4294967296),r}function B4(e,t){var r=g4(e,t,14)^g4(e,t,18)^g4(t,e,9);return r<0&&(r+=4294967296),r}function U4(e,t){var r=b4(e,t,1)^b4(e,t,8)^m4(e,t,7);return r<0&&(r+=4294967296),r}function F4(e,t){var r=g4(e,t,1)^g4(e,t,8)^y4(e,t,7);return r<0&&(r+=4294967296),r}function z4(e,t){var r=b4(e,t,19)^b4(t,e,29)^m4(e,t,6);return r<0&&(r+=4294967296),r}function H4(e,t){var r=g4(e,t,19)^g4(t,e,29)^y4(e,t,6);return r<0&&(r+=4294967296),r}function q4(){if(!(this instanceof q4))return new q4;O4.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}T4.blockSize=1024,T4.outSize=512,T4.hmacStrength=192,T4.padLength=128,T4.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=z4(r[n-4],r[n-3]),a=H4(r[n-4],r[n-3]),o=r[n-14],s=r[n-13],u=U4(r[n-30],r[n-29]),c=F4(r[n-30],r[n-29]),l=r[n-32],f=r[n-31];r[n]=k4(i,a,o,s,u,c,l,f),r[n+1]=S4(i,a,o,s,u,c,l,f)}},T4.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],o=this.h[3],s=this.h[4],u=this.h[5],c=this.h[6],l=this.h[7],f=this.h[8],d=this.h[9],h=this.h[10],p=this.h[11],v=this.h[12],b=this.h[13],g=this.h[14],m=this.h[15];e3(this.k.length===r.length);for(var y=0;y<r.length;y+=2){var w=g,_=m,x=D4(f,d),k=B4(f,d),S=C4(f,0,h,0,v),E=M4(0,d,0,p,0,b),I=this.k[y],A=this.k[y+1],P=r[y],T=r[y+1],O=E4(w,_,x,k,S,E,I,A,P,T),C=I4(w,_,x,k,S,E,I,A,P,T);w=L4(n,i),_=j4(n,i),x=R4(n,0,a,0,s),k=N4(0,i,0,o,0,u);var M=_4(w,_,x,k),R=x4(w,_,x,k);g=v,m=b,v=h,b=p,h=f,p=d,f=_4(c,l,O,C),d=x4(l,l,O,C),c=s,l=u,s=a,u=o,a=n,o=i,n=_4(O,C,M,R),i=x4(O,C,M,R)}w4(this.h,0,n,i),w4(this.h,2,a,o),w4(this.h,4,s,u),w4(this.h,6,c,l),w4(this.h,8,f,d),w4(this.h,10,h,p),w4(this.h,12,v,b),w4(this.h,14,g,m)},T4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"big"):M3.split32(this.h,"big")},M3.inherits(q4,O4);var V4=q4;q4.blockSize=1024,q4.outSize=384,q4.hmacStrength=192,q4.padLength=128,q4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h.slice(0,12),"big"):M3.split32(this.h.slice(0,12),"big")};var K4={sha1:e4,sha224:v4,sha256:h4,sha384:V4,sha512:O4},W4=M3.rotl32,J4=M3.sum32,G4=M3.sum32_3,$4=M3.sum32_4,X4=L3.BlockHash;function Y4(){if(!(this instanceof Y4))return new Y4;X4.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}M3.inherits(Y4,X4);var Q4=Y4;function Z4(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function e6(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function t6(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}Y4.blockSize=512,Y4.outSize=160,Y4.hmacStrength=192,Y4.padLength=64,Y4.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],a=this.h[3],o=this.h[4],s=r,u=n,c=i,l=a,f=o,d=0;d<80;d++){var h=J4(W4($4(r,Z4(d,n,i,a),e[r6[d]+t],e6(d)),i6[d]),o);r=o,o=a,a=W4(i,10),i=n,n=h,h=J4(W4($4(s,Z4(79-d,u,c,l),e[n6[d]+t],t6(d)),a6[d]),f),s=f,f=l,l=W4(c,10),c=u,u=h}h=G4(this.h[1],i,l),this.h[1]=G4(this.h[2],a,f),this.h[2]=G4(this.h[3],o,s),this.h[3]=G4(this.h[4],r,u),this.h[4]=G4(this.h[0],n,c),this.h[0]=h},Y4.prototype._digest=function(e){return"hex"===e?M3.toHex32(this.h,"little"):M3.split32(this.h,"little")};var r6=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],n6=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],i6=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a6=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],o6={ripemd160:Q4};function s6(e,t,r){if(!(this instanceof s6))return new s6(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(M3.toArray(t,r))}var u6=s6;s6.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),e3(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},s6.prototype.update=function(e,t){return this.inner.update(e,t),this},s6.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};var c6=FU((function(e,t){var r=t;r.utils=M3,r.common=L3,r.sha=K4,r.ripemd=o6,r.hmac=u6,r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160})),l6={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}},f6=FU((function(e,t){var r,n=t,i=i3.assert;function a(e){"short"===e.type?this.curve=new A3.short(e):"edwards"===e.type?this.curve=new A3.edwards(e):this.curve=new A3.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new a(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=a,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:c6.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:c6.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:c6.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:c6.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:c6.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c6.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c6.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=l6}catch(e){r=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:c6.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function d6(e){if(!(this instanceof d6))return new d6(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=n3.toArray(e.entropy,e.entropyEnc||"hex"),r=n3.toArray(e.nonce,e.nonceEnc||"hex"),n=n3.toArray(e.pers,e.persEnc||"hex");e3(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var h6=d6;d6.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},d6.prototype._hmac=function(){return new c6.hmac(this.hash,this.K)},d6.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},d6.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=n3.toArray(e,t),r=n3.toArray(r,n),e3(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},d6.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=n3.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var a=i.slice(0,e);return this._update(r),this._reseed++,n3.encode(a,t)};var p6=i3.assert;function v6(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var b6=v6;v6.fromPublic=function(e,t,r){return t instanceof v6?t:new v6(e,{pub:t,pubEnc:r})},v6.fromPrivate=function(e,t,r){return t instanceof v6?t:new v6(e,{priv:t,privEnc:r})},v6.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},v6.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},v6.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},v6.prototype._importPrivate=function(e,t){this.priv=new z2(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},v6.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?p6(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||p6(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},v6.prototype.derive=function(e){return e.validate()||p6(e.validate(),"public point not validated"),e.mul(this.priv).getX()},v6.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},v6.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},v6.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var g6=i3.assert;function m6(e,t){if(e instanceof m6)return e;this._importDER(e,t)||(g6(e.r&&e.s,"Signature without r or s"),this.r=new z2(e.r,16),this.s=new z2(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var y6=m6;function w6(){this.place=0}function _6(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,a=0,o=t.place;a<n;a++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function x6(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function k6(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}m6.prototype._importDER=function(e,t){e=i3.toArray(e,t);var r=new w6;if(48!==e[r.place++])return!1;var n=_6(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=_6(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var o=_6(e,r);if(!1===o)return!1;if(e.length!==o+r.place)return!1;var s=e.slice(r.place,o+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new z2(a),this.s=new z2(s),this.recoveryParam=null,!0},m6.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=x6(t),r=x6(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];k6(n,t.length),(n=n.concat(t)).push(2),k6(n,r.length);var i=n.concat(r),a=[48];return k6(a,i.length),a=a.concat(i),i3.encode(a,e)};var S6=i3.assert;function E6(e){if(!(this instanceof E6))return new E6(e);"string"==typeof e&&(S6(Object.prototype.hasOwnProperty.call(f6,e),"Unknown curve "+e),e=f6[e]),e instanceof f6.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var I6=E6;E6.prototype.keyPair=function(e){return new b6(this,e)},E6.prototype.keyFromPrivate=function(e,t){return b6.fromPrivate(this,e,t)},E6.prototype.keyFromPublic=function(e,t){return b6.fromPublic(this,e,t)},E6.prototype.genKeyPair=function(e){e||(e={});for(var t=new h6({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a3(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new z2(2));;){var i=new z2(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},E6.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},E6.prototype.sign=function(e,t,n,i){"object"==r(n)&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new z2(e,16));for(var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),s=e.toArray("be",a),u=new h6({hash:this.hash,entropy:o,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new z2(1)),l=0;;l++){var f=i.k?i.k(l):new z2(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var v=f.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return i.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new y6({r:p,s:v,recoveryParam:b})}}}}}},E6.prototype.verify=function(e,t,r,n){e=this._truncateToN(new z2(e,16)),r=this.keyFromPublic(r,n);var i=(t=new y6(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,s=a.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),c)).isInfinity()&&o.eqXToP(i):!(o=this.g.mulAdd(u,r.getPublic(),c)).isInfinity()&&0===o.getX().umod(this.n).cmp(i)},E6.prototype.recoverPubKey=function(e,t,r,n){S6((3&r)===r,"The recovery param is more than two bits"),t=new y6(t,n);var i=this.n,a=new z2(e),o=t.r,s=t.s,u=1&r,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");o=c?this.curve.pointFromX(o.add(this.curve.n),u):this.curve.pointFromX(o,u);var l=t.r.invm(i),f=i.sub(a).mul(l).umod(i),d=s.mul(l).umod(i);return this.g.mulAdd(f,o,d)},E6.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new y6(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var A6=i3.assert,P6=i3.parseBytes,T6=i3.cachedProperty;function O6(e,t){this.eddsa=e,this._secret=P6(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=P6(t.pub)}O6.fromPublic=function(e,t){return t instanceof O6?t:new O6(e,{pub:t})},O6.fromSecret=function(e,t){return t instanceof O6?t:new O6(e,{secret:t})},O6.prototype.secret=function(){return this._secret},T6(O6,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),T6(O6,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),T6(O6,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),T6(O6,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),T6(O6,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),T6(O6,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),O6.prototype.sign=function(e){return A6(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},O6.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},O6.prototype.getSecret=function(e){return A6(this._secret,"KeyPair is public only"),i3.encode(this.secret(),e)},O6.prototype.getPublic=function(e){return i3.encode(this.pubBytes(),e)};var C6=O6,M6=i3.assert,R6=i3.cachedProperty,N6=i3.parseBytes;function L6(e,t){this.eddsa=e,"object"!=r(t)&&(t=N6(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),M6(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof z2&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}R6(L6,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),R6(L6,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),R6(L6,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),R6(L6,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),L6.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},L6.prototype.toHex=function(){return i3.encode(this.toBytes(),"hex").toUpperCase()};var j6=L6,D6=i3.assert,B6=i3.parseBytes;function U6(e){if(D6("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof U6))return new U6(e);e=f6[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=c6.sha512}var F6=U6;U6.prototype.sign=function(e,t){e=B6(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),s=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:a})},U6.prototype.verify=function(e,t,r){e=B6(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(a)},U6.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return i3.intFromLE(e.digest()).umod(this.curve.n)},U6.prototype.keyFromPublic=function(e){return C6.fromPublic(this,e)},U6.prototype.keyFromSecret=function(e){return C6.fromSecret(this,e)},U6.prototype.makeSignature=function(e){return e instanceof j6?e:new j6(this,e)},U6.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},U6.prototype.decodePoint=function(e){var t=(e=i3.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=i3.intFromLE(r);return this.curve.pointFromY(i,n)},U6.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},U6.prototype.decodeInt=function(e){return i3.intFromLE(e)},U6.prototype.isPoint=function(e){return e instanceof this.pointClass};var z6=zU(Z2),H6=FU((function(e,t){var r=t;r.version=z6.version,r.utils=i3,r.rand=a3,r.curve=A3,r.curves=f6,r.ec=I6,r.eddsa=F6})),q6=sF.alloc(1,1),V6=sF.alloc(1,0),K6=new H6.ec("secp256k1"),W6=sF.alloc(32,0),J6=sF.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),G6=sF.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),$6=K6.curve.n,X6=$6.shrn(1),Y6=K6.curve.g;function Q6(e){return qF(e)&&32===e.length}function Z6(e){return!!Q6(e)&&e.compare(J6)<0}function e5(e){if(!qF(e))return!1;if(e.length<33)return!1;var t=e[0],r=e.slice(1,33);if(0===r.compare(W6))return!1;if(r.compare(G6)>=0)return!1;if((2===t||3===t)&&33===e.length){try{o5(e)}catch(e){return!1}return!0}var n=e.slice(33);return 0!==n.compare(W6)&&!(n.compare(G6)>=0)&&4===t&&65===e.length}function t5(e){return 4!==e[0]}function r5(e){return!!Q6(e)&&e.compare(W6)>0&&e.compare(J6)<0}function n5(e,t){return void 0===e&&void 0!==t?t5(t):void 0===e||e}function i5(e){return new z2(e)}function a5(e){return e.toArrayLike(sF,"be",32)}function o5(e){return K6.curve.decodePoint(e)}function s5(e,t){return sF.from(e._encode(t))}function u5(e,t,r){if(!Q6(e))throw new TypeError("Expected Hash");if(!r5(t))throw new TypeError("Expected Private");if(void 0!==r&&!Q6(r))throw new TypeError("Expected Extra Data (32 bytes)");var n,i,a=i5(t),o=i5(e);(function(e,t,r,n,i){var a=sF.alloc(32,0),o=sF.alloc(32,1);a=L2("sha256",a).update(o).update(V6).update(t).update(e).update(i||"").digest(),o=L2("sha256",a).update(o).digest(),a=L2("sha256",a).update(o).update(q6).update(t).update(e).update(i||"").digest(),o=L2("sha256",a).update(o).digest();for(var s=o=L2("sha256",a).update(o).digest();!n(s)||!r(s);)a=L2("sha256",a).update(o).update(V6).digest(),o=L2("sha256",a).update(o).digest(),s=o=L2("sha256",a).update(o).digest()})(e,t,(function(e){var t=i5(e),r=Y6.mul(t);return!r.isInfinity()&&(0!==(n=r.x.umod($6)).isZero()&&0!==(i=t.invm($6).mul(o.add(a.mul(n))).umod($6)).isZero())}),r5,r),i.cmp(X6)>0&&(i=$6.sub(i));var s=sF.allocUnsafe(64);return a5(n).copy(s,0),a5(i).copy(s,32),s}var c5={isPoint:e5,isPointCompressed:function(e){return!!e5(e)&&t5(e)},isPrivate:r5,pointAdd:function(e,t,r){if(!e5(e))throw new TypeError("Expected Point");if(!e5(t))throw new TypeError("Expected Point");var n=o5(e),i=o5(t),a=n.add(i);return a.isInfinity()?null:s5(a,n5(r,e))},pointAddScalar:function(e,t,r){if(!e5(e))throw new TypeError("Expected Point");if(!Z6(t))throw new TypeError("Expected Tweak");var n=n5(r,e),i=o5(e);if(0===t.compare(W6))return s5(i,n);var a=i5(t),o=Y6.mul(a),s=i.add(o);return s.isInfinity()?null:s5(s,n)},pointCompress:function(e,t){if(!e5(e))throw new TypeError("Expected Point");var r=o5(e);if(r.isInfinity())throw new TypeError("Expected Point");return s5(r,n5(t,e))},pointFromScalar:function(e,t){if(!r5(e))throw new TypeError("Expected Private");var r=i5(e),n=Y6.mul(r);return n.isInfinity()?null:s5(n,n5(t))},pointMultiply:function(e,t,r){if(!e5(e))throw new TypeError("Expected Point");if(!Z6(t))throw new TypeError("Expected Tweak");var n=n5(r,e),i=o5(e),a=i5(t),o=i.mul(a);return o.isInfinity()?null:s5(o,n)},privateAdd:function(e,t){if(!r5(e))throw new TypeError("Expected Private");if(!Z6(t))throw new TypeError("Expected Tweak");var r=i5(e),n=i5(t),i=a5(r.add(n).umod($6));return r5(i)?i:null},privateSub:function(e,t){if(!r5(e))throw new TypeError("Expected Private");if(!Z6(t))throw new TypeError("Expected Tweak");var r=i5(e),n=i5(t),i=a5(r.sub(n).umod($6));return r5(i)?i:null},sign:function(e,t){return u5(e,t)},signWithEntropy:function(e,t,r){return u5(e,t,r)},verify:function(e,t,r,n){if(!Q6(e))throw new TypeError("Expected Hash");if(!e5(t))throw new TypeError("Expected Point");if(!function(e){var t=e.slice(0,32),r=e.slice(32,64);return qF(e)&&64===e.length&&t.compare(J6)<0&&r.compare(J6)<0}(r))throw new TypeError("Expected Signature");var i=o5(t),a=i5(r.slice(0,32)),o=i5(r.slice(32,64));if(n&&o.cmp(X6)>0)return!1;if(a.gtn(0)<=0)return!1;if(o.gtn(0)<=0)return!1;var s=i5(e),u=o.invm($6),c=s.mul(u).umod($6),l=a.mul(u).umod($6),f=Y6.mulAdd(c,i,l);return!f.isInfinity()&&f.x.umod($6).eq(a)}},l5={Array:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return null!=e&&e.constructor===Array})),Boolean:function(e){return"boolean"==typeof e},Function:function(e){return"function"==typeof e},Nil:function(e){return null==e},Number:function(e){return"number"==typeof e},Object:function(e){return"object"==r(e)},String:function(e){return"string"==typeof e},"":function(){return!0}};for(var f5 in l5.Null=l5.Nil,l5)l5[f5].toJSON=function(e){return e}.bind(null,f5);var d5=l5;function h5(e){return e.name||e.toString().match(/function (.*?)\s*\(/)[1]}function p5(e){return d5.Nil(e)?"":h5(e.constructor)}function v5(e,t){Error.captureStackTrace&&Error.captureStackTrace(e,t)}function b5(e){return d5.Function(e)?e.toJSON?e.toJSON():h5(e):d5.Array(e)?"Array":e&&d5.Object(e)?"Object":void 0!==e?e:""}function g5(e,t,r){var n=function(e){return d5.Function(e)?"":d5.String(e)?JSON.stringify(e):e&&d5.Object(e)?"":e}(t);return"Expected "+b5(e)+", got"+(""!==r?" "+r:"")+(""!==n?" "+n:"")}function m5(e,t,r){r=r||p5(t),this.message=g5(e,t,r),v5(this,m5),this.__type=e,this.__value=t,this.__valueTypeName=r}function y5(e,t,r,n,i){e?(i=i||p5(n),this.message=function(e,t,r,n,i){var a='" of type ';return"key"===t&&(a='" with key type '),g5('property "'+b5(r)+a+b5(e),n,i)}(e,r,t,n,i)):this.message='Unexpected property "'+t+'"',v5(this,m5),this.__label=r,this.__property=t,this.__type=e,this.__value=n,this.__valueTypeName=i}m5.prototype=Object.create(Error.prototype),m5.prototype.constructor=m5,y5.prototype=Object.create(Error.prototype),y5.prototype.constructor=m5;var w5=m5,_5=y5,x5=function(e,t){return new m5(e,{},t)},k5=function(e,t,r){return e instanceof y5?(t=t+"."+e.__property,e=new y5(e.__type,t,e.__label,e.__value,e.__valueTypeName)):e instanceof m5&&(e=new y5(e.__type,t,r,e.__value,e.__valueTypeName)),v5(e),e},S5=b5,E5=p5;function I5(e){return qF(e)}function A5(e){return"string"==typeof e&&/^([0-9a-f]{2})+$/i.test(e)}function P5(e,t){var r=e.toJSON();function n(n){if(!e(n))return!1;if(n.length===t)return!0;throw x5(r+"(Length: "+t+")",r+"(Length: "+n.length+")")}return n.toJSON=function(){return r},n}var T5=P5.bind(null,d5.Array),O5=P5.bind(null,I5),C5=P5.bind(null,A5),M5=P5.bind(null,d5.String),R5=Math.pow(2,53)-1,N5={ArrayN:T5,Buffer:I5,BufferN:O5,Finite:function(e){return"number"==typeof e&&isFinite(e)},Hex:A5,HexN:C5,Int8:function(e){return e<<24>>24===e},Int16:function(e){return e<<16>>16===e},Int32:function(e){return(0|e)===e},Int53:function(e){return"number"==typeof e&&e>=-R5&&e<=R5&&Math.floor(e)===e},Range:function(e,t,r){function n(n,i){return r(n,i)&&n>e&&n<t}return r=r||d5.Number,n.toJSON=function(){return"".concat(r.toJSON()," between [").concat(e,", ").concat(t,"]")},n},StringN:M5,UInt8:function(e){return(255&e)===e},UInt16:function(e){return(65535&e)===e},UInt32:function(e){return e>>>0===e},UInt53:function(e){return"number"==typeof e&&e>=0&&e<=R5&&Math.floor(e)===e}};for(var L5 in N5)N5[L5].toJSON=function(e){return e}.bind(null,L5);var j5=N5,D5=S5,B5=w5,U5=_5,F5=k5,z5=E5,H5={arrayOf:function(e,t){function r(r,n){return!!d5.Array(r)&&!d5.Nil(r)&&!(void 0!==t.minLength&&r.length<t.minLength)&&!(void 0!==t.maxLength&&r.length>t.maxLength)&&(void 0===t.length||r.length===t.length)&&r.every((function(t,r){try{return V5(e,t,n)}catch(e){throw F5(e,r)}}))}return e=q5(e),t=t||{},r.toJSON=function(){var r="["+D5(e)+"]";return void 0!==t.length?r+="{"+t.length+"}":void 0===t.minLength&&void 0===t.maxLength||(r+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),r},r},maybe:function e(t){function r(r,n){return d5.Nil(r)||t(r,n,e)}return t=q5(t),r.toJSON=function(){return"?"+D5(t)},r},map:function(e,t){function r(r,n){if(!d5.Object(r))return!1;if(d5.Nil(r))return!1;for(var i in r){try{t&&V5(t,i,n)}catch(e){throw F5(e,i,"key")}try{var a=r[i];V5(e,a,n)}catch(e){throw F5(e,i)}}return!0}return e=q5(e),t&&(t=q5(t)),r.toJSON=t?function(){return"{"+D5(t)+": "+D5(e)+"}"}:function(){return"{"+D5(e)+"}"},r},object:function(e){var t={};for(var r in e)t[r]=q5(e[r]);function n(e,r){if(!d5.Object(e))return!1;if(d5.Nil(e))return!1;var n;try{for(n in t)V5(t[n],e[n],r)}catch(e){throw F5(e,n)}if(r)for(n in e)if(!t[n])throw new U5(void 0,n);return!0}return n.toJSON=function(){return D5(t)},n},anyOf:function(){var e=[].slice.call(arguments).map(q5);function t(t,r){return e.some((function(e){try{return V5(e,t,r)}catch(e){return!1}}))}return t.toJSON=function(){return e.map(D5).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(q5);function t(t,r){return e.every((function(e){try{return V5(e,t,r)}catch(e){return!1}}))}return t.toJSON=function(){return e.map(D5).join(" & ")},t},quacksLike:function(e){function t(t){return e===z5(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(q5);function t(t,r){return!d5.Nil(t)&&!d5.Nil(t.length)&&(!r||t.length===e.length)&&e.every((function(e,n){try{return V5(e,t[n],r)}catch(e){throw F5(e,n)}}))}return t.toJSON=function(){return"("+e.map(D5).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function q5(e){if(d5.String(e))return"?"===e[0]?H5.maybe(e.slice(1)):d5[e]||H5.quacksLike(e);if(e&&d5.Object(e)){if(d5.Array(e)){if(1!==e.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return H5.arrayOf(e[0])}return H5.object(e)}return d5.Function(e)?e:H5.value(e)}function V5(e,t,r,n){if(d5.Function(e)){if(e(t,r))return!0;throw new B5(n||e,t)}return V5(q5(e),t,r)}for(var K5 in H5.oneOf=H5.anyOf,d5)V5[K5]=d5[K5];for(K5 in H5)V5[K5]=H5[K5];for(K5 in j5)V5[K5]=j5[K5];V5.compile=q5,V5.TfTypeError=B5,V5.TfPropertyTypeError=U5;var W5=V5;function J5(e,t){if(void 0!==t&&e[0]!==t)throw new Error("Invalid network version");if(33===e.length)return{version:e[0],privateKey:e.slice(1,33),compressed:!1};if(34!==e.length)throw new Error("Invalid WIF length");if(1!==e[33])throw new Error("Invalid compression flag");return{version:e[0],privateKey:e.slice(1,33),compressed:!0}}function G5(e,t,r){var n=new sF(r?34:33);return n.writeUInt8(e,0),t.copy(n,1),r&&(n[33]=1),n}var $5=function(e,t){return J5(F2.decode(e),t)},X5=function(e,t,r){return"number"==typeof e?F2.encode(G5(e,t,r)):F2.encode(G5(e.version,e.privateKey,e.compressed))},Y5=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=W5.BufferN(32),n=W5.compile({wif:W5.UInt8,bip32:{public:W5.UInt32,private:W5.UInt32}}),i={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},o=2147483648,u=Math.pow(2,31)-1;function c(e){return W5.String(e)&&null!==e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function l(e){return W5.UInt32(e)&&e<=u}var f=function(){function e(t,r,i,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;a(this,e),this.__D=t,this.__Q=r,this.chainCode=i,this.network=o,this.__DEPTH=s,this.__INDEX=u,this.__PARENT_FINGERPRINT=c,W5(n,o),this.lowR=!1}return s(e,[{key:"depth",get:function(){return this.__DEPTH}},{key:"index",get:function(){return this.__INDEX}},{key:"parentFingerprint",get:function(){return this.__PARENT_FINGERPRINT}},{key:"publicKey",get:function(){return void 0===this.__Q&&(this.__Q=c5.pointFromScalar(this.__D,!0)),this.__Q}},{key:"privateKey",get:function(){return this.__D}},{key:"identifier",get:function(){return j2.hash160(this.publicKey)}},{key:"fingerprint",get:function(){return this.identifier.slice(0,4)}},{key:"compressed",get:function(){return!0}},{key:"isNeutered",value:function(){return void 0===this.__D}},{key:"neutered",value:function(){return p(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}},{key:"toBase58",value:function(){var e=this.network,t=this.isNeutered()?e.bip32.public:e.bip32.private,r=sF.allocUnsafe(78);return r.writeUInt32BE(t,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),F2.encode(r)}},{key:"toWIF",value:function(){if(!this.privateKey)throw new TypeError("Missing private key");return X5(this.network.wif,this.privateKey,!0)}},{key:"derive",value:function(e){W5(W5.UInt32,e);var t=e>=o,r=sF.allocUnsafe(37);if(t){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");r[0]=0,this.privateKey.copy(r,1),r.writeUInt32BE(e,33)}else this.publicKey.copy(r,0),r.writeUInt32BE(e,33);var n,i=j2.hmacSHA512(this.chainCode,r),a=i.slice(0,32),s=i.slice(32);if(!c5.isPrivate(a))return this.derive(e+1);if(this.isNeutered()){var u=c5.pointAddScalar(this.publicKey,a,!0);if(null===u)return this.derive(e+1);n=p(u,s,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}else{var c=c5.privateAdd(this.privateKey,a);if(null==c)return this.derive(e+1);n=h(c,s,this.network,this.depth+1,e,this.fingerprint.readUInt32BE(0))}return n}},{key:"deriveHardened",value:function(e){return W5(l,e),this.derive(e+o)}},{key:"derivePath",value:function(e){W5(c,e);var t=e.split("/");if("m"===t[0]){if(this.parentFingerprint)throw new TypeError("Expected master, got child");t=t.slice(1)}return t.reduce((function(e,t){var r;return"'"===t.slice(-1)?(r=parseInt(t.slice(0,-1),10),e.deriveHardened(r)):(r=parseInt(t,10),e.derive(r))}),this)}},{key:"sign",value:function(e,t){if(!this.privateKey)throw new Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return c5.sign(e,this.privateKey);for(var r=c5.sign(e,this.privateKey),n=sF.alloc(32,0),i=0;r[0]>127;)i++,n.writeUIntLE(i,0,6),r=c5.signWithEntropy(e,this.privateKey,n);return r}},{key:"verify",value:function(e,t){return c5.verify(e,this.publicKey,t)}}]),e}();function d(e,t,r){return h(e,t,r)}function h(e,t,n,a,o,s){if(W5({privateKey:r,chainCode:r},{privateKey:e,chainCode:t}),n=n||i,!c5.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return new f(e,void 0,t,n,a,o,s)}function p(e,t,n,a,o,s){if(W5({publicKey:W5.BufferN(33),chainCode:r},{publicKey:e,chainCode:t}),n=n||i,!c5.isPoint(e))throw new TypeError("Point is not on the curve");return new f(void 0,e,t,n,a,o,s)}t.fromBase58=function(e,t){var r=F2.decode(e);if(78!==r.length)throw new TypeError("Invalid buffer length");t=t||i;var n=r.readUInt32BE(0);if(n!==t.bip32.private&&n!==t.bip32.public)throw new TypeError("Invalid network version");var a=r[4],o=r.readUInt32BE(5);if(0===a&&0!==o)throw new TypeError("Invalid parent fingerprint");var s=r.readUInt32BE(9);if(0===a&&0!==s)throw new TypeError("Invalid index");var u,c=r.slice(13,45);if(n===t.bip32.private){if(0!==r.readUInt8(45))throw new TypeError("Invalid private key");u=h(r.slice(46,78),c,t,a,s,o)}else u=p(r.slice(45,78),c,t,a,s,o);return u},t.fromPrivateKey=d,t.fromPublicKey=function(e,t,r){return p(e,t,r)},t.fromSeed=function(e,t){if(W5(W5.Buffer,e),e.length<16)throw new TypeError("Seed should be at least 128 bits");if(e.length>64)throw new TypeError("Seed should be at most 512 bits");t=t||i;var r=j2.hmacSHA512(sF.from("Bitcoin seed","utf8"),e);return d(r.slice(0,32),r.slice(32),t)}}));UU(Y5),Y5.fromBase58,Y5.fromPrivateKey,Y5.fromPublicKey,Y5.fromSeed;var Q5=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fromSeed=Y5.fromSeed,t.fromBase58=Y5.fromBase58,t.fromPublicKey=Y5.fromPublicKey,t.fromPrivateKey=Y5.fromPrivateKey}));UU(Q5),Q5.fromSeed,Q5.fromBase58,Q5.fromPublicKey,Q5.fromPrivateKey;var Z5=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bitcoin={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},t.regtest={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},t.testnet={messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}}));UU(Z5),Z5.bitcoin,Z5.regtest,Z5.testnet;var e8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e,t,r){t=t||4,r=void 0===r||r;var n=e.length;if(0===n)return 0;if(n>t)throw new TypeError("Script number overflow");if(r&&0==(127&e[n-1])&&(n<=1||0==(128&e[n-2])))throw new Error("Non-minimally encoded script number");if(5===n){var i=e.readUInt32LE(0),a=e.readUInt8(4);return 128&a?-(4294967296*(-129&a)+i):4294967296*a+i}for(var o=0,s=0;s<n;++s)o|=e[s]<<8*s;return 128&e[n-1]?-(o&~(128<<8*(n-1))):o},t.encode=function(e){for(var t,r=Math.abs(e),n=(t=r)>2147483647?5:t>8388607?4:t>32767?3:t>127?2:t>0?1:0,i=sF.allocUnsafe(n),a=e<0,o=0;o<n;++o)i.writeUInt8(255&r,o),r>>=8;return 128&i[n-1]?i.writeUInt8(a?128:0,n-1):a&&(i[n-1]|=128),i}}));UU(e8),e8.decode,e8.encode;var t8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Math.pow(2,31)-1;function n(e){return W5.String(e)&&!!e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}t.UInt31=function(e){return W5.UInt32(e)&&e<=r},t.BIP32Path=n,n.toJSON=function(){return"BIP32 derivation path"},t.Signer=function(e){return(W5.Buffer(e.publicKey)||"function"==typeof e.getPublicKey)&&"function"==typeof e.sign},t.Satoshi=function(e){return W5.UInt53(e)&&e<=21e14},t.ECPoint=W5.quacksLike("Point"),t.Network=W5.compile({messagePrefix:W5.oneOf(W5.Buffer,W5.String),bip32:{public:W5.UInt32,private:W5.UInt32},pubKeyHash:W5.UInt8,scriptHash:W5.UInt8,wif:W5.UInt8}),t.Buffer256bit=W5.BufferN(32),t.Hash160bit=W5.BufferN(20),t.Hash256bit=W5.BufferN(32),t.Number=W5.Number,t.Array=W5.Array,t.Boolean=W5.Boolean,t.String=W5.String,t.Buffer=W5.Buffer,t.Hex=W5.Hex,t.maybe=W5.maybe,t.tuple=W5.tuple,t.UInt8=W5.UInt8,t.UInt32=W5.UInt32,t.Function=W5.Function,t.BufferN=W5.BufferN,t.Null=W5.Null,t.oneOf=W5.oneOf}));UU(t8),t8.UInt31,t8.BIP32Path,t8.Signer,t8.Satoshi,t8.ECPoint,t8.Network,t8.Buffer256bit,t8.Hash160bit,t8.Hash256bit,t8.Number,t8.Array,t8.Boolean,t8.String,t8.Buffer,t8.Hex,t8.maybe,t8.tuple,t8.UInt8,t8.UInt32,t8.Function,t8.BufferN,t8.Null,t8.oneOf;var r8=cQ.Buffer,n8=function(e){if(e.length<8)return!1;if(e.length>72)return!1;if(48!==e[0])return!1;if(e[1]!==e.length-2)return!1;if(2!==e[2])return!1;var t=e[3];if(0===t)return!1;if(5+t>=e.length)return!1;if(2!==e[4+t])return!1;var r=e[5+t];return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},i8=function(e){if(e.length<8)throw new Error("DER sequence length is too short");if(e.length>72)throw new Error("DER sequence length is too long");if(48!==e[0])throw new Error("Expected DER sequence");if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid");if(2!==e[2])throw new Error("Expected DER integer");var t=e[3];if(0===t)throw new Error("R length is zero");if(5+t>=e.length)throw new Error("R length is too long");if(2!==e[4+t])throw new Error("Expected DER integer (2)");var r=e[5+t];if(0===r)throw new Error("S length is zero");if(6+t+r!==e.length)throw new Error("S length is invalid");if(128&e[4])throw new Error("R value is negative");if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded");if(128&e[t+6])throw new Error("S value is negative");if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded");return{r:e.slice(4,4+t),s:e.slice(6+t)}},a8=function(e,t){var r=e.length,n=t.length;if(0===r)throw new Error("R length is zero");if(0===n)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(n>33)throw new Error("S length is too long");if(128&e[0])throw new Error("R value is negative");if(128&t[0])throw new Error("S value is negative");if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded");if(n>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded");var i=r8.allocUnsafe(6+r+n);return i[0]=48,i[1]=i.length-2,i[2]=2,i[3]=e.length,e.copy(i,4),i[4+r]=2,i[5+r]=t.length,t.copy(i,6+r),i},o8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=sF.alloc(1,0);function n(e){for(var t=0;0===e[t];)++t;return t===e.length?r:128&(e=e.slice(t))[0]?sF.concat([r,e],1+e.length):e}function i(e){0===e[0]&&(e=e.slice(1));var t=sF.alloc(32,0),r=Math.max(0,32-e.length);return e.copy(t,r),t}t.decode=function(e){var t=e.readUInt8(e.length-1),r=-129&t;if(r<=0||r>=4)throw new Error("Invalid hashType "+t);var n=i8(e.slice(0,-1)),a=i(n.r),o=i(n.s);return{signature:sF.concat([a,o],64),hashType:t}},t.encode=function(e,t){W5({signature:t8.BufferN(64),hashType:t8.UInt8},{signature:e,hashType:t});var r=-129&t;if(r<=0||r>=4)throw new Error("Invalid hashType "+t);var i=sF.allocUnsafe(1);i.writeUInt8(t,0);var a=n(e.slice(0,32)),o=n(e.slice(32,64));return sF.concat([a8(a,o),i])}}));UU(o8),o8.decode,o8.encode;var s8=zU(Object.freeze({__proto__:null,OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255,default:{OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}}));function u8(e){return e<s8.OP_PUSHDATA1?1:e<=255?2:e<=65535?3:5}var c8={encodingLength:u8,encode:function(e,t,r){var n=u8(t);return 1===n?e.writeUInt8(t,r):2===n?(e.writeUInt8(s8.OP_PUSHDATA1,r),e.writeUInt8(t,r+1)):3===n?(e.writeUInt8(s8.OP_PUSHDATA2,r),e.writeUInt16LE(t,r+1)):(e.writeUInt8(s8.OP_PUSHDATA4,r),e.writeUInt32LE(t,r+1)),n},decode:function(e,t){var r,n,i=e.readUInt8(t);if(i<s8.OP_PUSHDATA1)r=i,n=1;else if(i===s8.OP_PUSHDATA1){if(t+2>e.length)return null;r=e.readUInt8(t+1),n=2}else if(i===s8.OP_PUSHDATA2){if(t+3>e.length)return null;r=e.readUInt16LE(t+1),n=3}else{if(t+5>e.length)return null;if(i!==s8.OP_PUSHDATA4)throw new Error("Unexpected opcode");r=e.readUInt32LE(t+1),n=5}return{opcode:i,number:r,size:n}}},l8={};for(var f8 in s8)l8[s8[f8]]=f8;var d8=l8,h8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OPS=s8;var r=t.OPS.OP_RESERVED;function n(e){return t8.Buffer(e)||function(e){return t8.Number(e)&&(e===t.OPS.OP_0||e>=t.OPS.OP_1&&e<=t.OPS.OP_16||e===t.OPS.OP_1NEGATE)}(e)}function i(e){return t8.Array(e)&&e.every(n)}function a(e){return 0===e.length?t.OPS.OP_0:1===e.length?e[0]>=1&&e[0]<=16?r+e[0]:129===e[0]?t.OPS.OP_1NEGATE:void 0:void 0}function o(e){return qF(e)}function s(e){return qF(e)}function u(e){if(o(e))return e;W5(t8.Array,e);var t=e.reduce((function(e,t){return s(t)?1===t.length&&void 0!==a(t)?e+1:e+c8.encodingLength(t.length)+t.length:e+1}),0),r=sF.allocUnsafe(t),n=0;if(e.forEach((function(e){if(s(e)){var t=a(e);if(void 0!==t)return r.writeUInt8(t,n),void(n+=1);n+=c8.encode(r,e.length,n),e.copy(r,n),n+=e.length}else r.writeUInt8(e,n),n+=1})),n!==r.length)throw new Error("Could not decode chunks");return r}function c(e){if(r=e,t8.Array(r))return e;var r;W5(t8.Buffer,e);for(var n=[],i=0;i<e.length;){var o=e[i];if(o>t.OPS.OP_0&&o<=t.OPS.OP_PUSHDATA4){var s=c8.decode(e,i);if(null===s)return null;if((i+=s.size)+s.number>e.length)return null;var u=e.slice(i,i+s.number);i+=s.number;var c=a(u);void 0!==c?n.push(c):n.push(u)}else n.push(o),i+=1}return n}function l(e){var t=-129&e;return t>0&&t<4}t.isPushOnly=i,t.compile=u,t.decompile=c,t.toASM=function(e){return o(e)&&(e=c(e)),e.map((function(e){if(s(e)){var t=a(e);if(void 0===t)return e.toString("hex");e=t}return d8[e]})).join(" ")},t.fromASM=function(e){return W5(t8.String,e),u(e.split(" ").map((function(e){return void 0!==t.OPS[e]?t.OPS[e]:(W5(t8.Hex,e),sF.from(e,"hex"))})))},t.toStack=function(e){return e=c(e),W5(i,e),e.map((function(e){return s(e)?e:e===t.OPS.OP_0?sF.allocUnsafe(0):e8.encode(e-r)}))},t.isCanonicalPubKey=function(e){return c5.isPoint(e)},t.isDefinedHashType=l,t.isCanonicalScriptSignature=function(e){return!!qF(e)&&!!l(e[e.length-1])&&n8(e.slice(0,-1))},t.number=e8,t.signature=o8}));UU(h8),h8.OPS,h8.isPushOnly,h8.compile,h8.decompile,h8.toASM,h8.fromASM,h8.toStack,h8.isCanonicalPubKey,h8.isDefinedHashType,h8.isCanonicalScriptSignature,h8.number,h8.signature;var p8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.prop=function(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=r.call(this);return this[t]=e,e},set:function(e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})}})},t.value=function(e){var t;return function(){return void 0!==t||(t=e()),t}}}));UU(p8),p8.prop,p8.value;var v8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2data=function(e,t){if(!e.data&&!e.output)throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),data:W5.maybe(W5.arrayOf(W5.Buffer))},e);var n={name:"embed",network:e.network||Z5.bitcoin};if(p8.prop(n,"output",(function(){if(e.data)return h8.compile([r.OP_RETURN].concat(e.data))})),p8.prop(n,"data",(function(){if(e.output)return h8.decompile(e.output).slice(1)})),t.validate&&e.output){var i=h8.decompile(e.output);if(i[0]!==r.OP_RETURN)throw new TypeError("Output is invalid");if(!i.slice(1).every(W5.Buffer))throw new TypeError("Output is invalid");if(e.data&&!function(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}(e.data,n.data))throw new TypeError("Data mismatch")}return Object.assign(n,e)}}));UU(v8),v8.p2data;var b8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS,n=r.OP_RESERVED;function i(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}t.p2ms=function(e,t){if(!(e.input||e.output||e.pubkeys&&void 0!==e.m||e.signatures))throw new TypeError("Not enough data");function a(e){return h8.isCanonicalScriptSignature(e)||void 0!==(t.allowIncomplete&&e===r.OP_0)}t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),m:W5.maybe(W5.Number),n:W5.maybe(W5.Number),output:W5.maybe(W5.Buffer),pubkeys:W5.maybe(W5.arrayOf(c5.isPoint)),signatures:W5.maybe(W5.arrayOf(a)),input:W5.maybe(W5.Buffer)},e);var o={network:e.network||Z5.bitcoin},s=[],u=!1;function c(e){u||(u=!0,s=h8.decompile(e),o.m=s[0]-n,o.n=s[s.length-2]-n,o.pubkeys=s.slice(1,-2))}if(p8.prop(o,"output",(function(){if(e.m&&o.n&&e.pubkeys)return h8.compile([].concat(n+e.m,e.pubkeys,n+o.n,r.OP_CHECKMULTISIG))})),p8.prop(o,"m",(function(){if(o.output)return c(o.output),o.m})),p8.prop(o,"n",(function(){if(o.pubkeys)return o.pubkeys.length})),p8.prop(o,"pubkeys",(function(){if(e.output)return c(e.output),o.pubkeys})),p8.prop(o,"signatures",(function(){if(e.input)return h8.decompile(e.input).slice(1)})),p8.prop(o,"input",(function(){if(e.signatures)return h8.compile([r.OP_0].concat(e.signatures))})),p8.prop(o,"witness",(function(){if(o.input)return[]})),p8.prop(o,"name",(function(){if(o.m&&o.n)return"p2ms(".concat(o.m," of ").concat(o.n,")")})),t.validate){if(e.output){if(c(e.output),!W5.Number(s[0]))throw new TypeError("Output is invalid");if(!W5.Number(s[s.length-2]))throw new TypeError("Output is invalid");if(s[s.length-1]!==r.OP_CHECKMULTISIG)throw new TypeError("Output is invalid");if(o.m<=0||o.n>16||o.m>o.n||o.n!==s.length-3)throw new TypeError("Output is invalid");if(!o.pubkeys.every((function(e){return c5.isPoint(e)})))throw new TypeError("Output is invalid");if(void 0!==e.m&&e.m!==o.m)throw new TypeError("m mismatch");if(void 0!==e.n&&e.n!==o.n)throw new TypeError("n mismatch");if(e.pubkeys&&!i(e.pubkeys,o.pubkeys))throw new TypeError("Pubkeys mismatch")}if(e.pubkeys){if(void 0!==e.n&&e.n!==e.pubkeys.length)throw new TypeError("Pubkey count mismatch");if(o.n=e.pubkeys.length,o.n<o.m)throw new TypeError("Pubkey count cannot be less than m")}if(e.signatures){if(e.signatures.length<o.m)throw new TypeError("Not enough signatures provided");if(e.signatures.length>o.m)throw new TypeError("Too many signatures provided")}if(e.input){if(e.input[0]!==r.OP_0)throw new TypeError("Input is invalid");if(0===o.signatures.length||!o.signatures.every(a))throw new TypeError("Input has invalid signature(s)");if(e.signatures&&!i(e.signatures,o.signatures))throw new TypeError("Signature mismatch");if(void 0!==e.m&&e.m!==e.signatures.length)throw new TypeError("Signature count mismatch")}}return Object.assign(o,e)}}));UU(b8),b8.p2ms;var g8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2pk=function(e,t){if(!(e.input||e.output||e.pubkey||e.input||e.signature))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),pubkey:W5.maybe(c5.isPoint),signature:W5.maybe(h8.isCanonicalScriptSignature),input:W5.maybe(W5.Buffer)},e);var n=p8.value((function(){return h8.decompile(e.input)})),i={name:"p2pk",network:e.network||Z5.bitcoin};if(p8.prop(i,"output",(function(){if(e.pubkey)return h8.compile([e.pubkey,r.OP_CHECKSIG])})),p8.prop(i,"pubkey",(function(){if(e.output)return e.output.slice(1,-1)})),p8.prop(i,"signature",(function(){if(e.input)return n()[0]})),p8.prop(i,"input",(function(){if(e.signature)return h8.compile([e.signature])})),p8.prop(i,"witness",(function(){if(i.input)return[]})),t.validate){if(e.output){if(e.output[e.output.length-1]!==r.OP_CHECKSIG)throw new TypeError("Output is invalid");if(!c5.isPoint(i.pubkey))throw new TypeError("Output pubkey is invalid");if(e.pubkey&&!e.pubkey.equals(i.pubkey))throw new TypeError("Pubkey mismatch")}if(e.signature&&e.input&&!e.input.equals(i.input))throw new TypeError("Signature mismatch");if(e.input){if(1!==n().length)throw new TypeError("Input is invalid");if(!h8.isCanonicalScriptSignature(i.signature))throw new TypeError("Input has invalid signature")}}return Object.assign(i,e)}}));UU(g8),g8.p2pk;var m8=FU((function(e,t){function r(e){try{return I2("rmd160").update(e).digest()}catch(t){return I2("ripemd160").update(e).digest()}}function n(e){return I2("sha256").update(e).digest()}Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=r,t.sha1=function(e){return I2("sha1").update(e).digest()},t.sha256=n,t.hash160=function(e){return r(n(e))},t.hash256=function(e){return n(n(e))}}));UU(m8),m8.ripemd160,m8.sha1,m8.sha256,m8.hash160,m8.hash256;var y8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2pkh=function(e,t){if(!(e.address||e.hash||e.output||e.pubkey||e.input))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(20)),output:W5.maybe(W5.BufferN(25)),pubkey:W5.maybe(c5.isPoint),signature:W5.maybe(h8.isCanonicalScriptSignature),input:W5.maybe(W5.Buffer)},e);var n=p8.value((function(){var t=F2.decode(e.address);return{version:t.readUInt8(0),hash:t.slice(1)}})),i=p8.value((function(){return h8.decompile(e.input)})),a=e.network||Z5.bitcoin,o={name:"p2pkh",network:a};if(p8.prop(o,"address",(function(){if(o.hash){var e=sF.allocUnsafe(21);return e.writeUInt8(a.pubKeyHash,0),o.hash.copy(e,1),F2.encode(e)}})),p8.prop(o,"hash",(function(){return e.output?e.output.slice(3,23):e.address?n().hash:e.pubkey||o.pubkey?m8.hash160(e.pubkey||o.pubkey):void 0})),p8.prop(o,"output",(function(){if(o.hash)return h8.compile([r.OP_DUP,r.OP_HASH160,o.hash,r.OP_EQUALVERIFY,r.OP_CHECKSIG])})),p8.prop(o,"pubkey",(function(){if(e.input)return i()[1]})),p8.prop(o,"signature",(function(){if(e.input)return i()[0]})),p8.prop(o,"input",(function(){if(e.pubkey&&e.signature)return h8.compile([e.signature,e.pubkey])})),p8.prop(o,"witness",(function(){if(o.input)return[]})),t.validate){var s=sF.from([]);if(e.address){if(n().version!==a.pubKeyHash)throw new TypeError("Invalid version or Network mismatch");if(20!==n().hash.length)throw new TypeError("Invalid address");s=n().hash}if(e.hash){if(s.length>0&&!s.equals(e.hash))throw new TypeError("Hash mismatch");s=e.hash}if(e.output){if(25!==e.output.length||e.output[0]!==r.OP_DUP||e.output[1]!==r.OP_HASH160||20!==e.output[2]||e.output[23]!==r.OP_EQUALVERIFY||e.output[24]!==r.OP_CHECKSIG)throw new TypeError("Output is invalid");var u=e.output.slice(3,23);if(s.length>0&&!s.equals(u))throw new TypeError("Hash mismatch");s=u}if(e.pubkey){var c=m8.hash160(e.pubkey);if(s.length>0&&!s.equals(c))throw new TypeError("Hash mismatch");s=c}if(e.input){var l=i();if(2!==l.length)throw new TypeError("Input is invalid");if(!h8.isCanonicalScriptSignature(l[0]))throw new TypeError("Input has invalid signature");if(!c5.isPoint(l[1]))throw new TypeError("Input has invalid pubkey");if(e.signature&&!e.signature.equals(l[0]))throw new TypeError("Signature mismatch");if(e.pubkey&&!e.pubkey.equals(l[1]))throw new TypeError("Pubkey mismatch");var f=m8.hash160(l[1]);if(s.length>0&&!s.equals(f))throw new TypeError("Hash mismatch")}}return Object.assign(o,e)}}));UU(y8),y8.p2pkh;var w8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;t.p2sh=function(e,t){if(!(e.address||e.hash||e.output||e.redeem||e.input))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(20)),output:W5.maybe(W5.BufferN(23)),redeem:W5.maybe({network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),input:W5.maybe(W5.Buffer),witness:W5.maybe(W5.arrayOf(W5.Buffer))}),input:W5.maybe(W5.Buffer),witness:W5.maybe(W5.arrayOf(W5.Buffer))},e);var n=e.network;n||(n=e.redeem&&e.redeem.network||Z5.bitcoin);var i={network:n},a=p8.value((function(){var t=F2.decode(e.address);return{version:t.readUInt8(0),hash:t.slice(1)}})),o=p8.value((function(){return h8.decompile(e.input)})),s=p8.value((function(){var t=o();return{network:n,output:t[t.length-1],input:h8.compile(t.slice(0,-1)),witness:e.witness||[]}}));if(p8.prop(i,"address",(function(){if(i.hash){var e=sF.allocUnsafe(21);return e.writeUInt8(i.network.scriptHash,0),i.hash.copy(e,1),F2.encode(e)}})),p8.prop(i,"hash",(function(){return e.output?e.output.slice(2,22):e.address?a().hash:i.redeem&&i.redeem.output?m8.hash160(i.redeem.output):void 0})),p8.prop(i,"output",(function(){if(i.hash)return h8.compile([r.OP_HASH160,i.hash,r.OP_EQUAL])})),p8.prop(i,"redeem",(function(){if(e.input)return s()})),p8.prop(i,"input",(function(){if(e.redeem&&e.redeem.input&&e.redeem.output)return h8.compile([].concat(h8.decompile(e.redeem.input),e.redeem.output))})),p8.prop(i,"witness",(function(){return i.redeem&&i.redeem.witness?i.redeem.witness:i.input?[]:void 0})),p8.prop(i,"name",(function(){var e=["p2sh"];return void 0!==i.redeem&&e.push(i.redeem.name),e.join("-")})),t.validate){var u=sF.from([]);if(e.address){if(a().version!==n.scriptHash)throw new TypeError("Invalid version or Network mismatch");if(20!==a().hash.length)throw new TypeError("Invalid address");u=a().hash}if(e.hash){if(u.length>0&&!u.equals(e.hash))throw new TypeError("Hash mismatch");u=e.hash}if(e.output){if(23!==e.output.length||e.output[0]!==r.OP_HASH160||20!==e.output[1]||e.output[22]!==r.OP_EQUAL)throw new TypeError("Output is invalid");var c=e.output.slice(2,22);if(u.length>0&&!u.equals(c))throw new TypeError("Hash mismatch");u=c}var l=function(e){if(e.output){var t=h8.decompile(e.output);if(!t||t.length<1)throw new TypeError("Redeem.output too short");var r=m8.hash160(e.output);if(u.length>0&&!u.equals(r))throw new TypeError("Hash mismatch");u=r}if(e.input){var n=e.input.length>0,i=e.witness&&e.witness.length>0;if(!n&&!i)throw new TypeError("Empty input");if(n&&i)throw new TypeError("Input and witness provided");if(n){var a=h8.decompile(e.input);if(!h8.isPushOnly(a))throw new TypeError("Non push-only scriptSig")}}};if(e.input){var f=o();if(!f||f.length<1)throw new TypeError("Input too short");if(!qF(s().output))throw new TypeError("Input is invalid");l(s())}if(e.redeem){if(e.redeem.network&&e.redeem.network!==n)throw new TypeError("Network mismatch");if(e.input){var d=s();if(e.redeem.output&&!e.redeem.output.equals(d.output))throw new TypeError("Redeem.output mismatch");if(e.redeem.input&&!e.redeem.input.equals(d.input))throw new TypeError("Redeem.input mismatch")}l(e.redeem)}if(e.witness&&e.redeem&&e.redeem.witness&&!function(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}(e.redeem.witness,e.witness))throw new TypeError("Witness and redeem.witness mismatch")}return Object.assign(i,e)}}));UU(w8),w8.p2sh;for(var _8="qpzry9x8gf2tvdw0s3jn54khce6mua7l",x8={},k8=0;k8<_8.length;k8++){var S8=_8.charAt(k8);if(void 0!==x8[S8])throw new TypeError(S8+" is ambiguous");x8[S8]=k8}function E8(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function I8(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=E8(t)^n>>5}for(t=E8(t),r=0;r<e.length;++r){var i=e.charCodeAt(r);t=E8(t)^31&i}return t}function A8(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var i=(e=r).lastIndexOf("1");if(-1===i)return"No separator character for "+e;if(0===i)return"Missing prefix for "+e;var a=e.slice(0,i),o=e.slice(i+1);if(o.length<6)return"Data too short";var s=I8(a);if("string"==typeof s)return s;for(var u=[],c=0;c<o.length;++c){var l=o.charAt(c),f=x8[l];if(void 0===f)return"Unknown character "+l;s=E8(s)^f,c+6>=o.length||u.push(f)}return 1!==s?"Invalid checksum for "+e:{prefix:a,words:u}}function P8(e,t,r,n){for(var i=0,a=0,o=(1<<r)-1,s=[],u=0;u<e.length;++u)for(i=i<<t|e[u],a+=t;a>=r;)a-=r,s.push(i>>a&o);if(n)a>0&&s.push(i<<r-a&o);else{if(a>=t)return"Excess padding";if(i<<r-a&o)return"Non-zero padding"}return s}var T8=function(e){var t=A8.apply(null,arguments);if("object"==r(t))return t;throw new Error(t)},O8=function(e,t,r){if(r=r||90,e.length+7+t.length>r)throw new TypeError("Exceeds length limit");var n=I8(e=e.toLowerCase());if("string"==typeof n)throw new Error(n);for(var i=e+"1",a=0;a<t.length;++a){var o=t[a];if(o>>5!=0)throw new Error("Non 5-bit word");n=E8(n)^o,i+=_8.charAt(o)}for(a=0;a<6;++a)n=E8(n);for(n^=1,a=0;a<6;++a)i+=_8.charAt(n>>5*(5-a)&31);return i},C8=function(e){var t=P8(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},M8=function(e){var t=P8(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)},R8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS,n=sF.alloc(0);t.p2wpkh=function(e,t){if(!(e.address||e.hash||e.output||e.pubkey||e.witness))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(20)),input:W5.maybe(W5.BufferN(0)),network:W5.maybe(W5.Object),output:W5.maybe(W5.BufferN(22)),pubkey:W5.maybe(c5.isPoint),signature:W5.maybe(h8.isCanonicalScriptSignature),witness:W5.maybe(W5.arrayOf(W5.Buffer))},e);var i=p8.value((function(){var t=T8(e.address),r=t.words.shift(),n=M8(t.words);return{version:r,prefix:t.prefix,data:sF.from(n)}})),a=e.network||Z5.bitcoin,o={name:"p2wpkh",network:a};if(p8.prop(o,"address",(function(){if(o.hash){var e=C8(o.hash);return e.unshift(0),O8(a.bech32,e)}})),p8.prop(o,"hash",(function(){return e.output?e.output.slice(2,22):e.address?i().data:e.pubkey||o.pubkey?m8.hash160(e.pubkey||o.pubkey):void 0})),p8.prop(o,"output",(function(){if(o.hash)return h8.compile([r.OP_0,o.hash])})),p8.prop(o,"pubkey",(function(){return e.pubkey?e.pubkey:e.witness?e.witness[1]:void 0})),p8.prop(o,"signature",(function(){if(e.witness)return e.witness[0]})),p8.prop(o,"input",(function(){if(o.witness)return n})),p8.prop(o,"witness",(function(){if(e.pubkey&&e.signature)return[e.signature,e.pubkey]})),t.validate){var s=sF.from([]);if(e.address){if(a&&a.bech32!==i().prefix)throw new TypeError("Invalid prefix or Network mismatch");if(0!==i().version)throw new TypeError("Invalid address version");if(20!==i().data.length)throw new TypeError("Invalid address data");s=i().data}if(e.hash){if(s.length>0&&!s.equals(e.hash))throw new TypeError("Hash mismatch");s=e.hash}if(e.output){if(22!==e.output.length||e.output[0]!==r.OP_0||20!==e.output[1])throw new TypeError("Output is invalid");if(s.length>0&&!s.equals(e.output.slice(2)))throw new TypeError("Hash mismatch");s=e.output.slice(2)}if(e.pubkey){var u=m8.hash160(e.pubkey);if(s.length>0&&!s.equals(u))throw new TypeError("Hash mismatch");if(s=u,!c5.isPoint(e.pubkey)||33!==e.pubkey.length)throw new TypeError("Invalid pubkey for p2wpkh")}if(e.witness){if(2!==e.witness.length)throw new TypeError("Witness is invalid");if(!h8.isCanonicalScriptSignature(e.witness[0]))throw new TypeError("Witness has invalid signature");if(!c5.isPoint(e.witness[1])||33!==e.witness[1].length)throw new TypeError("Witness has invalid pubkey");if(e.signature&&!e.signature.equals(e.witness[0]))throw new TypeError("Signature mismatch");if(e.pubkey&&!e.pubkey.equals(e.witness[1]))throw new TypeError("Pubkey mismatch");var c=m8.hash160(e.witness[1]);if(s.length>0&&!s.equals(c))throw new TypeError("Hash mismatch")}}return Object.assign(o,e)}}));UU(R8),R8.p2wpkh;var N8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS,n=sF.alloc(0);function i(e){return!(!qF(e)||65!==e.length||4!==e[0]||!c5.isPoint(e))}t.p2wsh=function(e,t){if(!(e.address||e.hash||e.output||e.redeem||e.witness))throw new TypeError("Not enough data");t=Object.assign({validate:!0},t||{}),W5({network:W5.maybe(W5.Object),address:W5.maybe(W5.String),hash:W5.maybe(W5.BufferN(32)),output:W5.maybe(W5.BufferN(34)),redeem:W5.maybe({input:W5.maybe(W5.Buffer),network:W5.maybe(W5.Object),output:W5.maybe(W5.Buffer),witness:W5.maybe(W5.arrayOf(W5.Buffer))}),input:W5.maybe(W5.BufferN(0)),witness:W5.maybe(W5.arrayOf(W5.Buffer))},e);var a=p8.value((function(){var t=T8(e.address),r=t.words.shift(),n=M8(t.words);return{version:r,prefix:t.prefix,data:sF.from(n)}})),o=p8.value((function(){return h8.decompile(e.redeem.input)})),s=e.network;s||(s=e.redeem&&e.redeem.network||Z5.bitcoin);var u={network:s};if(p8.prop(u,"address",(function(){if(u.hash){var e=C8(u.hash);return e.unshift(0),O8(s.bech32,e)}})),p8.prop(u,"hash",(function(){return e.output?e.output.slice(2):e.address?a().data:u.redeem&&u.redeem.output?m8.sha256(u.redeem.output):void 0})),p8.prop(u,"output",(function(){if(u.hash)return h8.compile([r.OP_0,u.hash])})),p8.prop(u,"redeem",(function(){if(e.witness)return{output:e.witness[e.witness.length-1],input:n,witness:e.witness.slice(0,-1)}})),p8.prop(u,"input",(function(){if(u.witness)return n})),p8.prop(u,"witness",(function(){if(e.redeem&&e.redeem.input&&e.redeem.input.length>0&&e.redeem.output&&e.redeem.output.length>0){var t=h8.toStack(o());return u.redeem=Object.assign({witness:t},e.redeem),u.redeem.input=n,[].concat(t,e.redeem.output)}if(e.redeem&&e.redeem.output&&e.redeem.witness)return[].concat(e.redeem.witness,e.redeem.output)})),p8.prop(u,"name",(function(){var e=["p2wsh"];return void 0!==u.redeem&&e.push(u.redeem.name),e.join("-")})),t.validate){var c=sF.from([]);if(e.address){if(a().prefix!==s.bech32)throw new TypeError("Invalid prefix or Network mismatch");if(0!==a().version)throw new TypeError("Invalid address version");if(32!==a().data.length)throw new TypeError("Invalid address data");c=a().data}if(e.hash){if(c.length>0&&!c.equals(e.hash))throw new TypeError("Hash mismatch");c=e.hash}if(e.output){if(34!==e.output.length||e.output[0]!==r.OP_0||32!==e.output[1])throw new TypeError("Output is invalid");var l=e.output.slice(2);if(c.length>0&&!c.equals(l))throw new TypeError("Hash mismatch");c=l}if(e.redeem){if(e.redeem.network&&e.redeem.network!==s)throw new TypeError("Network mismatch");if(e.redeem.input&&e.redeem.input.length>0&&e.redeem.witness&&e.redeem.witness.length>0)throw new TypeError("Ambiguous witness source");if(e.redeem.output){if(0===h8.decompile(e.redeem.output).length)throw new TypeError("Redeem.output is invalid");var f=m8.sha256(e.redeem.output);if(c.length>0&&!c.equals(f))throw new TypeError("Hash mismatch");c=f}if(e.redeem.input&&!h8.isPushOnly(o()))throw new TypeError("Non push-only scriptSig");if(e.witness&&e.redeem.witness&&!function(e,t){return e.length===t.length&&e.every((function(e,r){return e.equals(t[r])}))}(e.witness,e.redeem.witness))throw new TypeError("Witness and redeem.witness mismatch");if(e.redeem.input&&o().some(i)||e.redeem.output&&(h8.decompile(e.redeem.output)||[]).some(i))throw new TypeError("redeem.input or redeem.output contains uncompressed pubkey")}if(e.witness&&e.witness.length>0){var d=e.witness[e.witness.length-1];if(e.redeem&&e.redeem.output&&!e.redeem.output.equals(d))throw new TypeError("Witness and redeem.output mismatch");if(e.witness.some(i)||(h8.decompile(d)||[]).some(i))throw new TypeError("Witness contains uncompressed pubkey")}}return Object.assign(u,e)}}));UU(N8),N8.p2wsh;var L8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.embed=v8.p2data,t.p2ms=b8.p2ms,t.p2pk=g8.p2pk,t.p2pkh=y8.p2pkh,t.p2sh=w8.p2sh,t.p2wpkh=R8.p2wpkh,t.p2wsh=N8.p2wsh}));UU(L8),L8.embed,L8.p2ms,L8.p2pk,L8.p2pkh,L8.p2sh,L8.p2wpkh,L8.p2wsh;var j8=FU((function(e,t){function r(e){var t=F2.decode(e);if(t.length<21)throw new TypeError(e+" is too short");if(t.length>21)throw new TypeError(e+" is too long");return{version:t.readUInt8(0),hash:t.slice(1)}}function n(e){var t=T8(e),r=M8(t.words.slice(1));return{version:t.words[0],prefix:t.prefix,data:sF.from(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.fromBase58Check=r,t.fromBech32=n,t.toBase58Check=function(e,t){W5(t8.tuple(t8.Hash160bit,t8.UInt8),arguments);var r=sF.allocUnsafe(21);return r.writeUInt8(t,0),e.copy(r,1),F2.encode(r)},t.toBech32=function(e,t,r){var n=C8(e);return n.unshift(t),O8(r,n)},t.fromOutputScript=function(e,t){t=t||Z5.bitcoin;try{return L8.p2pkh({output:e,network:t}).address}catch(e){}try{return L8.p2sh({output:e,network:t}).address}catch(e){}try{return L8.p2wpkh({output:e,network:t}).address}catch(e){}try{return L8.p2wsh({output:e,network:t}).address}catch(e){}throw new Error(h8.toASM(e)+" has no matching Address")},t.toOutputScript=function(e,t){var i,a;t=t||Z5.bitcoin;try{i=r(e)}catch(e){}if(i){if(i.version===t.pubKeyHash)return L8.p2pkh({hash:i.hash}).output;if(i.version===t.scriptHash)return L8.p2sh({hash:i.hash}).output}else{try{a=n(e)}catch(e){}if(a){if(a.prefix!==t.bech32)throw new Error(e+" has an invalid prefix");if(0===a.version){if(20===a.data.length)return L8.p2wpkh({hash:a.data}).output;if(32===a.data.length)return L8.p2wsh({hash:a.data}).output}}}throw new Error(e+" has no matching Script")}}));UU(j8),j8.fromBase58Check,j8.fromBech32,j8.toBase58Check,j8.toBech32,j8.fromOutputScript,j8.toOutputScript;var D8=FU((function(e){var t=65536,r=cQ.Buffer,n=BU.crypto||BU.msCrypto;n&&n.getRandomValues?e.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var a=r.allocUnsafe(e);if(e>0)if(e>t)for(var o=0;o<e;o+=t)n.getRandomValues(a.slice(o,o+t));else n.getRandomValues(a);return"function"==typeof i?nz((function(){i(null,a)})):a}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}})),B8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=W5.maybe(W5.compile({compressed:t8.maybe(t8.Boolean),network:t8.maybe(t8.Network)})),n=function(){function e(t,r,n){a(this,e),this.__D=t,this.__Q=r,this.lowR=!1,void 0===n&&(n={}),this.compressed=void 0===n.compressed||n.compressed,this.network=n.network||Z5.bitcoin,void 0!==r&&(this.__Q=c5.pointCompress(r,this.compressed))}return s(e,[{key:"privateKey",get:function(){return this.__D}},{key:"publicKey",get:function(){return this.__Q||(this.__Q=c5.pointFromScalar(this.__D,this.compressed)),this.__Q}},{key:"toWIF",value:function(){if(!this.__D)throw new Error("Missing private key");return X5(this.network.wif,this.__D,this.compressed)}},{key:"sign",value:function(e,t){if(!this.__D)throw new Error("Missing private key");if(void 0===t&&(t=this.lowR),!1===t)return c5.sign(e,this.__D);for(var r=c5.sign(e,this.__D),n=sF.alloc(32,0),i=0;r[0]>127;)i++,n.writeUIntLE(i,0,6),r=c5.signWithEntropy(e,this.__D,n);return r}},{key:"verify",value:function(e,t){return c5.verify(e,this.publicKey,t)}}]),e}();function i(e,t){if(W5(t8.Buffer256bit,e),!c5.isPrivate(e))throw new TypeError("Private key not in range [1, n)");return W5(r,t),new n(e,void 0,t)}t.fromPrivateKey=i,t.fromPublicKey=function(e,t){return W5(c5.isPoint,e),W5(r,t),new n(void 0,e,t)},t.fromWIF=function(e,t){var r=$5(e),n=r.version;if(t8.Array(t)){if(!(t=t.filter((function(e){return n===e.wif})).pop()))throw new Error("Unknown network version")}else if(t=t||Z5.bitcoin,n!==t.wif)throw new Error("Invalid network version");return i(r.privateKey,{compressed:r.compressed,network:t})},t.makeRandom=function(e){W5(r,e),void 0===e&&(e={});var t,n=e.rng||D8;do{t=n(32),W5(t8.Buffer256bit,t)}while(!c5.isPrivate(t));return i(t,e)}}));UU(B8),B8.fromPrivateKey,B8.fromPublicKey,B8.fromWIF,B8.makeRandom;var U8=cQ.Buffer;function F8(e){if(e<0||e>9007199254740991||e%1!=0)throw new RangeError("value out of range")}function z8(e){return F8(e),e<253?1:e<=65535?3:e<=4294967295?5:9}var H8={encode:function e(t,r,n){if(F8(t),r||(r=U8.allocUnsafe(z8(t))),!U8.isBuffer(r))throw new TypeError("buffer must be a Buffer instance");return n||(n=0),t<253?(r.writeUInt8(t,n),e.bytes=1):t<=65535?(r.writeUInt8(253,n),r.writeUInt16LE(t,n+1),e.bytes=3):t<=4294967295?(r.writeUInt8(254,n),r.writeUInt32LE(t,n+1),e.bytes=5):(r.writeUInt8(255,n),r.writeUInt32LE(t>>>0,n+1),r.writeUInt32LE(t/4294967296|0,n+5),e.bytes=9),r},decode:function e(t,r){if(!U8.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");r||(r=0);var n=t.readUInt8(r);if(n<253)return e.bytes=1,n;if(253===n)return e.bytes=3,t.readUInt16LE(r+1);if(254===n)return e.bytes=5,t.readUInt32LE(r+1);e.bytes=9;var i=t.readUInt32LE(r+1),a=4294967296*t.readUInt32LE(r+5)+i;return F8(a),a},encodingLength:z8},q8=FU((function(e,t){function r(e,t){if("number"!=typeof e)throw new Error("cannot write a non-number as a number");if(e<0)throw new Error("specified a negative value for writing an unsigned value");if(e>t)throw new Error("RangeError: value out of range");if(Math.floor(e)!==e)throw new Error("value has a fractional component")}function n(e,t){var n=e.readUInt32LE(t),i=e.readUInt32LE(t+4);return r((i*=4294967296)+n,9007199254740991),i+n}function i(e,t,n){return r(t,9007199254740991),e.writeInt32LE(-1&t,n),e.writeUInt32LE(Math.floor(t/4294967296),n+4),n+8}Object.defineProperty(t,"__esModule",{value:!0}),t.readUInt64LE=n,t.writeUInt64LE=i,t.reverseBuffer=function(e){if(e.length<1)return e;for(var t=e.length-1,r=0,n=0;n<e.length/2;n++)r=e[n],e[n]=e[t],e[t]=r,t--;return e},t.cloneBuffer=function(e){var t=sF.allocUnsafe(e.length);return e.copy(t),t},t.BufferWriter=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this.buffer=t,this.offset=r,W5(t8.tuple(t8.Buffer,t8.UInt32),[t,r])}return s(e,[{key:"writeUInt8",value:function(e){this.offset=this.buffer.writeUInt8(e,this.offset)}},{key:"writeInt32",value:function(e){this.offset=this.buffer.writeInt32LE(e,this.offset)}},{key:"writeUInt32",value:function(e){this.offset=this.buffer.writeUInt32LE(e,this.offset)}},{key:"writeUInt64",value:function(e){this.offset=i(this.buffer,e,this.offset)}},{key:"writeVarInt",value:function(e){H8.encode(e,this.buffer,this.offset),this.offset+=H8.encode.bytes}},{key:"writeSlice",value:function(e){if(this.buffer.length<this.offset+e.length)throw new Error("Cannot write slice out of bounds");this.offset+=e.copy(this.buffer,this.offset)}},{key:"writeVarSlice",value:function(e){this.writeVarInt(e.length),this.writeSlice(e)}},{key:"writeVector",value:function(e){var t=this;this.writeVarInt(e.length),e.forEach((function(e){return t.writeVarSlice(e)}))}}]),e}(),t.BufferReader=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;a(this,e),this.buffer=t,this.offset=r,W5(t8.tuple(t8.Buffer,t8.UInt32),[t,r])}return s(e,[{key:"readUInt8",value:function(){var e=this.buffer.readUInt8(this.offset);return this.offset++,e}},{key:"readInt32",value:function(){var e=this.buffer.readInt32LE(this.offset);return this.offset+=4,e}},{key:"readUInt32",value:function(){var e=this.buffer.readUInt32LE(this.offset);return this.offset+=4,e}},{key:"readUInt64",value:function(){var e=n(this.buffer,this.offset);return this.offset+=8,e}},{key:"readVarInt",value:function(){var e=H8.decode(this.buffer,this.offset);return this.offset+=H8.decode.bytes,e}},{key:"readSlice",value:function(e){if(this.buffer.length<this.offset+e)throw new Error("Cannot read slice out of bounds");var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t}},{key:"readVarSlice",value:function(){return this.readSlice(this.readVarInt())}},{key:"readVector",value:function(){for(var e=this.readVarInt(),t=[],r=0;r<e;r++)t.push(this.readVarSlice());return t}}]),e}()}));UU(q8),q8.readUInt64LE,q8.writeUInt64LE,q8.reverseBuffer,q8.cloneBuffer,q8.BufferWriter,q8.BufferReader;var V8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=e.length;return H8.encodingLength(t)+t}var i=sF.allocUnsafe(0),o=[],u=sF.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),c=sF.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),l=sF.from("ffffffffffffffff","hex"),f={script:i,valueBuffer:l},d=function(){function e(){a(this,e),this.version=1,this.locktime=0,this.ins=[],this.outs=[]}return s(e,[{key:"isCoinbase",value:function(){return 1===this.ins.length&&e.isCoinbaseHash(this.ins[0].hash)}},{key:"addInput",value:function(t,r,n,a){return W5(t8.tuple(t8.Hash256bit,t8.UInt32,t8.maybe(t8.UInt32),t8.maybe(t8.Buffer)),arguments),t8.Null(n)&&(n=e.DEFAULT_SEQUENCE),this.ins.push({hash:t,index:r,script:a||i,sequence:n,witness:o})-1}},{key:"addOutput",value:function(e,t){return W5(t8.tuple(t8.Buffer,t8.Satoshi),arguments),this.outs.push({script:e,value:t})-1}},{key:"hasWitnesses",value:function(){return this.ins.some((function(e){return 0!==e.witness.length}))}},{key:"weight",value:function(){return 3*this.byteLength(!1)+this.byteLength(!0)}},{key:"virtualSize",value:function(){return Math.ceil(this.weight()/4)}},{key:"byteLength",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e&&this.hasWitnesses();return(t?10:8)+H8.encodingLength(this.ins.length)+H8.encodingLength(this.outs.length)+this.ins.reduce((function(e,t){return e+40+n(t.script)}),0)+this.outs.reduce((function(e,t){return e+8+n(t.script)}),0)+(t?this.ins.reduce((function(e,t){return e+function(e){var t=e.length;return H8.encodingLength(t)+e.reduce((function(e,t){return e+n(t)}),0)}(t.witness)}),0):0)}},{key:"clone",value:function(){var t=new e;return t.version=this.version,t.locktime=this.locktime,t.ins=this.ins.map((function(e){return{hash:e.hash,index:e.index,script:e.script,sequence:e.sequence,witness:e.witness}})),t.outs=this.outs.map((function(e){return{script:e.script,value:e.value}})),t}},{key:"hashForSignature",value:function(t,n,a){if(W5(t8.tuple(t8.UInt32,t8.Buffer,t8.Number),arguments),t>=this.ins.length)return c;var o=h8.compile(h8.decompile(n).filter((function(e){return e!==r.OPS.OP_CODESEPARATOR}))),s=this.clone();if((31&a)===e.SIGHASH_NONE)s.outs=[],s.ins.forEach((function(e,r){r!==t&&(e.sequence=0)}));else if((31&a)===e.SIGHASH_SINGLE){if(t>=this.outs.length)return c;s.outs.length=t+1;for(var u=0;u<t;u++)s.outs[u]=f;s.ins.forEach((function(e,r){r!==t&&(e.sequence=0)}))}a&e.SIGHASH_ANYONECANPAY?(s.ins=[s.ins[t]],s.ins[0].script=o):(s.ins.forEach((function(e){e.script=i})),s.ins[t].script=o);var l=sF.allocUnsafe(s.byteLength(!1)+4);return l.writeInt32LE(a,l.length-4),s.__toBuffer(l,0,!1),m8.hash256(l)}},{key:"hashForWitnessV0",value:function(t,r,i,a){W5(t8.tuple(t8.UInt32,t8.Buffer,t8.Satoshi,t8.UInt32),arguments);var o,s=sF.from([]),c=u,l=u,f=u;if(a&e.SIGHASH_ANYONECANPAY||(s=sF.allocUnsafe(36*this.ins.length),o=new q8.BufferWriter(s,0),this.ins.forEach((function(e){o.writeSlice(e.hash),o.writeUInt32(e.index)})),l=m8.hash256(s)),a&e.SIGHASH_ANYONECANPAY||(31&a)===e.SIGHASH_SINGLE||(31&a)===e.SIGHASH_NONE||(s=sF.allocUnsafe(4*this.ins.length),o=new q8.BufferWriter(s,0),this.ins.forEach((function(e){o.writeUInt32(e.sequence)})),f=m8.hash256(s)),(31&a)!==e.SIGHASH_SINGLE&&(31&a)!==e.SIGHASH_NONE){var d=this.outs.reduce((function(e,t){return e+8+n(t.script)}),0);s=sF.allocUnsafe(d),o=new q8.BufferWriter(s,0),this.outs.forEach((function(e){o.writeUInt64(e.value),o.writeVarSlice(e.script)})),c=m8.hash256(s)}else if((31&a)===e.SIGHASH_SINGLE&&t<this.outs.length){var h=this.outs[t];s=sF.allocUnsafe(8+n(h.script)),(o=new q8.BufferWriter(s,0)).writeUInt64(h.value),o.writeVarSlice(h.script),c=m8.hash256(s)}s=sF.allocUnsafe(156+n(r)),o=new q8.BufferWriter(s,0);var p=this.ins[t];return o.writeUInt32(this.version),o.writeSlice(l),o.writeSlice(f),o.writeSlice(p.hash),o.writeUInt32(p.index),o.writeVarSlice(r),o.writeUInt64(i),o.writeUInt32(p.sequence),o.writeSlice(c),o.writeUInt32(this.locktime),o.writeUInt32(a),m8.hash256(s)}},{key:"getHash",value:function(e){return e&&this.isCoinbase()?sF.alloc(32,0):m8.hash256(this.__toBuffer(void 0,void 0,e))}},{key:"getId",value:function(){return q8.reverseBuffer(this.getHash(!1)).toString("hex")}},{key:"toBuffer",value:function(e,t){return this.__toBuffer(e,t,!0)}},{key:"toHex",value:function(){return this.toBuffer(void 0,void 0).toString("hex")}},{key:"setInputScript",value:function(e,t){W5(t8.tuple(t8.Number,t8.Buffer),arguments),this.ins[e].script=t}},{key:"setWitness",value:function(e,t){W5(t8.tuple(t8.Number,[t8.Buffer]),arguments),this.ins[e].witness=t}},{key:"__toBuffer",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t||(t=sF.allocUnsafe(this.byteLength(n)));var i=new q8.BufferWriter(t,r||0);i.writeInt32(this.version);var a=n&&this.hasWitnesses();return a&&(i.writeUInt8(e.ADVANCED_TRANSACTION_MARKER),i.writeUInt8(e.ADVANCED_TRANSACTION_FLAG)),i.writeVarInt(this.ins.length),this.ins.forEach((function(e){i.writeSlice(e.hash),i.writeUInt32(e.index),i.writeVarSlice(e.script),i.writeUInt32(e.sequence)})),i.writeVarInt(this.outs.length),this.outs.forEach((function(e){void 0!==e.value?i.writeUInt64(e.value):i.writeSlice(e.valueBuffer),i.writeVarSlice(e.script)})),a&&this.ins.forEach((function(e){i.writeVector(e.witness)})),i.writeUInt32(this.locktime),void 0!==r?t.slice(r,i.offset):t}}],[{key:"fromBuffer",value:function(t,r){var n=new q8.BufferReader(t),i=new e;i.version=n.readInt32();var a=n.readUInt8(),s=n.readUInt8(),u=!1;a===e.ADVANCED_TRANSACTION_MARKER&&s===e.ADVANCED_TRANSACTION_FLAG?u=!0:n.offset-=2;for(var c=n.readVarInt(),l=0;l<c;++l)i.ins.push({hash:n.readSlice(32),index:n.readUInt32(),script:n.readVarSlice(),sequence:n.readUInt32(),witness:o});for(var f=n.readVarInt(),d=0;d<f;++d)i.outs.push({value:n.readUInt64(),script:n.readVarSlice()});if(u){for(var h=0;h<c;++h)i.ins[h].witness=n.readVector();if(!i.hasWitnesses())throw new Error("Transaction has superfluous witness data")}if(i.locktime=n.readUInt32(),r)return i;if(n.offset!==t.length)throw new Error("Transaction has unexpected data");return i}},{key:"fromHex",value:function(t){return e.fromBuffer(sF.from(t,"hex"),!1)}},{key:"isCoinbaseHash",value:function(e){W5(t8.Hash256bit,e);for(var t=0;t<32;++t)if(0!==e[t])return!1;return!0}}]),e}();d.DEFAULT_SEQUENCE=4294967295,d.SIGHASH_ALL=1,d.SIGHASH_NONE=2,d.SIGHASH_SINGLE=3,d.SIGHASH_ANYONECANPAY=128,d.ADVANCED_TRANSACTION_MARKER=0,d.ADVANCED_TRANSACTION_FLAG=1,t.Transaction=d}));UU(V8),V8.Transaction;var K8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=new TypeError("Cannot compute merkle root for zero transactions"),i=new TypeError("Cannot compute witness commit for non-segwit block"),o=function(){function e(){a(this,e),this.version=1,this.prevHash=void 0,this.merkleRoot=void 0,this.timestamp=0,this.witnessCommit=void 0,this.bits=0,this.nonce=0,this.transactions=void 0}return s(e,[{key:"getWitnessCommit",value:function(){if(!u(this.transactions))return null;var e=this.transactions[0].outs.filter((function(e){return e.script.slice(0,6).equals(sF.from("6a24aa21a9ed","hex"))})).map((function(e){return e.script.slice(6,38)}));if(0===e.length)return null;var t=e[e.length-1];return t instanceof sF&&32===t.length?t:null}},{key:"hasWitnessCommit",value:function(){return this.witnessCommit instanceof sF&&32===this.witnessCommit.length||null!==this.getWitnessCommit()}},{key:"hasWitness",value:function(){return(e=this.transactions)instanceof Array&&e.some((function(e){return"object"==r(e)&&e.ins instanceof Array&&e.ins.some((function(e){return"object"==r(e)&&e.witness instanceof Array&&e.witness.length>0}))}));var e}},{key:"weight",value:function(){return 3*this.byteLength(!1,!1)+this.byteLength(!1,!0)}},{key:"byteLength",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e||!this.transactions?80:80+H8.encodingLength(this.transactions.length)+this.transactions.reduce((function(e,r){return e+r.byteLength(t)}),0)}},{key:"getHash",value:function(){return m8.hash256(this.toBuffer(!0))}},{key:"getId",value:function(){return q8.reverseBuffer(this.getHash()).toString("hex")}},{key:"getUTCDate",value:function(){var e=new Date(0);return e.setUTCSeconds(this.timestamp),e}},{key:"toBuffer",value:function(e){var t=sF.allocUnsafe(this.byteLength(e)),r=new q8.BufferWriter(t);return r.writeInt32(this.version),r.writeSlice(this.prevHash),r.writeSlice(this.merkleRoot),r.writeUInt32(this.timestamp),r.writeUInt32(this.bits),r.writeUInt32(this.nonce),e||!this.transactions||(H8.encode(this.transactions.length,t,r.offset),r.offset+=H8.encode.bytes,this.transactions.forEach((function(e){var n=e.byteLength();e.toBuffer(t,r.offset),r.offset+=n}))),t}},{key:"toHex",value:function(e){return this.toBuffer(e).toString("hex")}},{key:"checkTxRoots",value:function(){var e=this.hasWitnessCommit();return!(!e&&this.hasWitness())&&this.__checkMerkleRoot()&&(!e||this.__checkWitnessCommit())}},{key:"checkProofOfWork",value:function(){var t=q8.reverseBuffer(this.getHash()),r=e.calculateTarget(this.bits);return t.compare(r)<=0}},{key:"__checkMerkleRoot",value:function(){if(!this.transactions)throw n;var t=e.calculateMerkleRoot(this.transactions);return 0===this.merkleRoot.compare(t)}},{key:"__checkWitnessCommit",value:function(){if(!this.transactions)throw n;if(!this.hasWitnessCommit())throw i;var t=e.calculateMerkleRoot(this.transactions,!0);return 0===this.witnessCommit.compare(t)}}],[{key:"fromBuffer",value:function(t){if(t.length<80)throw new Error("Buffer too small (< 80 bytes)");var r=new q8.BufferReader(t),n=new e;if(n.version=r.readInt32(),n.prevHash=r.readSlice(32),n.merkleRoot=r.readSlice(32),n.timestamp=r.readUInt32(),n.bits=r.readUInt32(),n.nonce=r.readUInt32(),80===t.length)return n;var i=function(){var e=V8.Transaction.fromBuffer(r.buffer.slice(r.offset),!0);return r.offset+=e.byteLength(),e},a=r.readVarInt();n.transactions=[];for(var o=0;o<a;++o){var s=i();n.transactions.push(s)}var u=n.getWitnessCommit();return u&&(n.witnessCommit=u),n}},{key:"fromHex",value:function(t){return e.fromBuffer(sF.from(t,"hex"))}},{key:"calculateTarget",value:function(e){var t=((4278190080&e)>>24)-3,r=8388607&e,n=sF.alloc(32,0);return n.writeUIntBE(r,29-t,3),n}},{key:"calculateMerkleRoot",value:function(e,t){if(W5([{getHash:t8.Function}],e),0===e.length)throw n;if(t&&!u(e))throw i;var r=function(e,t){if(!Array.isArray(e))throw TypeError("Expected values Array");if("function"!=typeof t)throw TypeError("Expected digest Function");for(var r=e.length,n=e.concat();r>1;){for(var i=0,a=0;a<r;a+=2,++i){var o=n[a],s=a+1===r?o:n[a+1],u=sF.concat([o,s]);n[i]=t(u)}r=i}return n[0]}(e.map((function(e){return e.getHash(t)})),m8.hash256);return t?m8.hash256(sF.concat([r,e[0].ins[0].witness[0]])):r}}]),e}();function u(e){return e instanceof Array&&e[0]&&e[0].ins&&e[0].ins instanceof Array&&e[0].ins[0]&&e[0].ins[0].witness&&e[0].ins[0].witness instanceof Array&&e[0].ins[0].witness.length>0}t.Block=o}));UU(K8),K8.Block;var W8=FU((function(e,t){var r,n,i;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.GlobalTypes||(t.GlobalTypes={}))[r.UNSIGNED_TX=0]="UNSIGNED_TX",r[r.GLOBAL_XPUB=1]="GLOBAL_XPUB",t.GLOBAL_TYPE_NAMES=["unsignedTx","globalXpub"],(n=t.InputTypes||(t.InputTypes={}))[n.NON_WITNESS_UTXO=0]="NON_WITNESS_UTXO",n[n.WITNESS_UTXO=1]="WITNESS_UTXO",n[n.PARTIAL_SIG=2]="PARTIAL_SIG",n[n.SIGHASH_TYPE=3]="SIGHASH_TYPE",n[n.REDEEM_SCRIPT=4]="REDEEM_SCRIPT",n[n.WITNESS_SCRIPT=5]="WITNESS_SCRIPT",n[n.BIP32_DERIVATION=6]="BIP32_DERIVATION",n[n.FINAL_SCRIPTSIG=7]="FINAL_SCRIPTSIG",n[n.FINAL_SCRIPTWITNESS=8]="FINAL_SCRIPTWITNESS",n[n.POR_COMMITMENT=9]="POR_COMMITMENT",t.INPUT_TYPE_NAMES=["nonWitnessUtxo","witnessUtxo","partialSig","sighashType","redeemScript","witnessScript","bip32Derivation","finalScriptSig","finalScriptWitness","porCommitment"],(i=t.OutputTypes||(t.OutputTypes={}))[i.REDEEM_SCRIPT=0]="REDEEM_SCRIPT",i[i.WITNESS_SCRIPT=1]="WITNESS_SCRIPT",i[i.BIP32_DERIVATION=2]="BIP32_DERIVATION",t.OUTPUT_TYPE_NAMES=["redeemScript","witnessScript","bip32Derivation"]}));UU(W8),W8.GlobalTypes,W8.GLOBAL_TYPE_NAMES,W8.InputTypes,W8.INPUT_TYPE_NAMES,W8.OutputTypes,W8.OUTPUT_TYPE_NAMES;var J8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.GlobalTypes.GLOBAL_XPUB)throw new Error("Decode Error: could not decode globalXpub with key 0x"+e.key.toString("hex"));if(79!==e.key.length||![2,3].includes(e.key[46]))throw new Error("Decode Error: globalXpub has invalid extended pubkey in key 0x"+e.key.toString("hex"));if(e.value.length/4%1!=0)throw new Error("Decode Error: Global GLOBAL_XPUB value length should be multiple of 4");var t,r=e.key.slice(1),n={masterFingerprint:e.value.slice(0,4),extendedPubkey:r,path:"m"},i=T(function(e){return k(Array(e).keys())}(e.value.length/4-1));try{for(i.s();!(t=i.n()).done;){var a=t.value,o=e.value.readUInt32LE(4*a+4),s=!!(2147483648&o),u=2147483647&o;n.path+="/"+u.toString(10)+(s?"'":"")}}catch(e){i.e(e)}finally{i.f()}return n},t.encode=function(e){var t=sF.from([W8.GlobalTypes.GLOBAL_XPUB]),r=sF.concat([t,e.extendedPubkey]),n=e.path.split("/"),i=sF.allocUnsafe(4*n.length);e.masterFingerprint.copy(i,0);var a=4;return n.slice(1).forEach((function(e){var t="'"===e.slice(-1),r=2147483647&parseInt(t?e.slice(0,-1):e,10);t&&(r+=2147483648),i.writeUInt32LE(r,a),a+=4})),{key:r,value:i}},t.expected="{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }",t.check=function(e){var t=e.extendedPubkey,r=e.masterFingerprint,n=e.path;return qF(t)&&78===t.length&&[2,3].indexOf(t[45])>-1&&qF(r)&&4===r.length&&"string"==typeof n&&!!n.match(/^m(\/\d+'?)+$/)},t.canAddToArray=function(e,t,r){var n=t.extendedPubkey.toString("hex");return!r.has(n)&&(r.add(n),0===e.filter((function(e){return e.extendedPubkey.equals(t.extendedPubkey)})).length)}}));UU(J8),J8.decode,J8.encode,J8.expected,J8.check,J8.canAddToArray;var G8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.encode=function(e){return{key:sF.from([W8.GlobalTypes.UNSIGNED_TX]),value:e.toBuffer()}}}));UU(G8),G8.encode;var $8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.FINAL_SCRIPTSIG)throw new Error("Decode Error: could not decode finalScriptSig with key 0x"+e.key.toString("hex"));return e.value},t.encode=function(e){return{key:sF.from([W8.InputTypes.FINAL_SCRIPTSIG]),value:e}},t.expected="Buffer",t.check=function(e){return qF(e)},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.finalScriptSig}}));UU($8),$8.decode,$8.encode,$8.expected,$8.check,$8.canAdd;var X8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.FINAL_SCRIPTWITNESS)throw new Error("Decode Error: could not decode finalScriptWitness with key 0x"+e.key.toString("hex"));return e.value},t.encode=function(e){return{key:sF.from([W8.InputTypes.FINAL_SCRIPTWITNESS]),value:e}},t.expected="Buffer",t.check=function(e){return qF(e)},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.finalScriptWitness}}));UU(X8),X8.decode,X8.encode,X8.expected,X8.check,X8.canAdd;var Y8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.NON_WITNESS_UTXO)throw new Error("Decode Error: could not decode nonWitnessUtxo with key 0x"+e.key.toString("hex"));return e.value},t.encode=function(e){return{key:sF.from([W8.InputTypes.NON_WITNESS_UTXO]),value:e}},t.expected="Buffer",t.check=function(e){return qF(e)},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.nonWitnessUtxo}}));UU(Y8),Y8.decode,Y8.encode,Y8.expected,Y8.check,Y8.canAdd;var Q8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.PARTIAL_SIG)throw new Error("Decode Error: could not decode partialSig with key 0x"+e.key.toString("hex"));if(34!==e.key.length&&66!==e.key.length||![2,3,4].includes(e.key[1]))throw new Error("Decode Error: partialSig has invalid pubkey in key 0x"+e.key.toString("hex"));return{pubkey:e.key.slice(1),signature:e.value}},t.encode=function(e){var t=sF.from([W8.InputTypes.PARTIAL_SIG]);return{key:sF.concat([t,e.pubkey]),value:e.signature}},t.expected="{ pubkey: Buffer; signature: Buffer; }",t.check=function(e){return qF(e.pubkey)&&qF(e.signature)&&[33,65].includes(e.pubkey.length)&&[2,3,4].includes(e.pubkey[0])&&function(e){if(!qF(e)||e.length<9)return!1;if(48!==e[0])return!1;if(e.length!==e[1]+3)return!1;if(2!==e[2])return!1;var t=e[3];if(t>33||t<1)return!1;if(2!==e[3+t+1])return!1;var r=e[3+t+2];return!(r>33||r<1)&&e.length===3+t+2+r+2}(e.signature)},t.canAddToArray=function(e,t,r){var n=t.pubkey.toString("hex");return!r.has(n)&&(r.add(n),0===e.filter((function(e){return e.pubkey.equals(t.pubkey)})).length)}}));UU(Q8),Q8.decode,Q8.encode,Q8.expected,Q8.check,Q8.canAddToArray;var Z8=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.POR_COMMITMENT)throw new Error("Decode Error: could not decode porCommitment with key 0x"+e.key.toString("hex"));return e.value.toString("utf8")},t.encode=function(e){return{key:sF.from([W8.InputTypes.POR_COMMITMENT]),value:sF.from(e,"utf8")}},t.expected="string",t.check=function(e){return"string"==typeof e},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.porCommitment}}));UU(Z8),Z8.decode,Z8.encode,Z8.expected,Z8.check,Z8.canAdd;var e9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.SIGHASH_TYPE)throw new Error("Decode Error: could not decode sighashType with key 0x"+e.key.toString("hex"));return e.value.readUInt32LE(0)},t.encode=function(e){var t=sF.from([W8.InputTypes.SIGHASH_TYPE]),r=sF.allocUnsafe(4);return r.writeUInt32LE(e,0),{key:t,value:r}},t.expected="number",t.check=function(e){return"number"==typeof e},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.sighashType}}));UU(e9),e9.decode,e9.encode,e9.expected,e9.check,e9.canAdd;var t9=FU((function(e,t){function r(e){if(e<0||e>9007199254740991||e%1!=0)throw new RangeError("value out of range")}function n(e){return r(e),e<253?1:e<=65535?3:e<=4294967295?5:9}Object.defineProperty(t,"__esModule",{value:!0}),t.encode=function e(t,i,a){if(r(t),i||(i=sF.allocUnsafe(n(t))),!qF(i))throw new TypeError("buffer must be a Buffer instance");return a||(a=0),t<253?(i.writeUInt8(t,a),Object.assign(e,{bytes:1})):t<=65535?(i.writeUInt8(253,a),i.writeUInt16LE(t,a+1),Object.assign(e,{bytes:3})):t<=4294967295?(i.writeUInt8(254,a),i.writeUInt32LE(t,a+1),Object.assign(e,{bytes:5})):(i.writeUInt8(255,a),i.writeUInt32LE(t>>>0,a+1),i.writeUInt32LE(t/4294967296|0,a+5),Object.assign(e,{bytes:9})),i},t.decode=function e(t,n){if(!qF(t))throw new TypeError("buffer must be a Buffer instance");n||(n=0);var i=t.readUInt8(n);if(i<253)return Object.assign(e,{bytes:1}),i;if(253===i)return Object.assign(e,{bytes:3}),t.readUInt16LE(n+1);if(254===i)return Object.assign(e,{bytes:5}),t.readUInt32LE(n+1);Object.assign(e,{bytes:9});var a=t.readUInt32LE(n+1),o=4294967296*t.readUInt32LE(n+5)+a;return r(o),o},t.encodingLength=n}));UU(t9),t9.encode,t9.decode,t9.encodingLength;var r9=FU((function(e,t){function r(e){var t=e.key.length,r=e.value.length,n=t9.encodingLength(t),i=t9.encodingLength(r),a=sF.allocUnsafe(n+t+i+r);return t9.encode(t,a,0),e.key.copy(a,n),t9.encode(r,a,n+t),e.value.copy(a,n+t+i),a}function n(e,t){if("number"!=typeof e)throw new Error("cannot write a non-number as a number");if(e<0)throw new Error("specified a negative value for writing an unsigned value");if(e>t)throw new Error("RangeError: value out of range");if(Math.floor(e)!==e)throw new Error("value has a fractional component")}Object.defineProperty(t,"__esModule",{value:!0}),t.range=function(e){return k(Array(e).keys())},t.reverseBuffer=function(e){if(e.length<1)return e;for(var t=e.length-1,r=0,n=0;n<e.length/2;n++)r=e[n],e[n]=e[t],e[t]=r,t--;return e},t.keyValsToBuffer=function(e){var t=e.map(r);return t.push(sF.from([0])),sF.concat(t)},t.keyValToBuffer=r,t.readUInt64LE=function(e,t){var r=e.readUInt32LE(t),i=e.readUInt32LE(t+4);return n((i*=4294967296)+r,9007199254740991),i+r},t.writeUInt64LE=function(e,t,r){return n(t,9007199254740991),e.writeInt32LE(-1&t,r),e.writeUInt32LE(Math.floor(t/4294967296),r+4),r+8}}));UU(r9),r9.range,r9.reverseBuffer,r9.keyValsToBuffer,r9.keyValToBuffer,r9.readUInt64LE,r9.writeUInt64LE;var n9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=function(e){if(e.key[0]!==W8.InputTypes.WITNESS_UTXO)throw new Error("Decode Error: could not decode witnessUtxo with key 0x"+e.key.toString("hex"));var t=r9.readUInt64LE(e.value,0),r=8,n=t9.decode(e.value,r);r+=t9.encodingLength(n);var i=e.value.slice(r);if(i.length!==n)throw new Error("Decode Error: WITNESS_UTXO script is not proper length");return{script:i,value:t}},t.encode=function(e){var t=e.script,r=e.value,n=t9.encodingLength(t.length),i=sF.allocUnsafe(8+n+t.length);return r9.writeUInt64LE(i,r,0),t9.encode(t.length,i,8),t.copy(i,8+n),{key:sF.from([W8.InputTypes.WITNESS_UTXO]),value:i}},t.expected="{ script: Buffer; value: number; }",t.check=function(e){return qF(e.script)&&"number"==typeof e.value},t.canAdd=function(e,t){return!!e&&!!t&&void 0===e.witnessUtxo}}));UU(n9),n9.decode,n9.encode,n9.expected,n9.check,n9.canAdd;var i9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeConverter=function(e){return{decode:function(t){if(t.key[0]!==e)throw new Error("Decode Error: could not decode bip32Derivation with key 0x"+t.key.toString("hex"));if(34!==t.key.length&&66!==t.key.length||![2,3,4].includes(t.key[1]))throw new Error("Decode Error: bip32Derivation has invalid pubkey in key 0x"+t.key.toString("hex"));if(t.value.length/4%1!=0)throw new Error("Decode Error: Input BIP32_DERIVATION value length should be multiple of 4");var r,n=t.key.slice(1),i={masterFingerprint:t.value.slice(0,4),pubkey:n,path:"m"},a=T(function(e){return k(Array(e).keys())}(t.value.length/4-1));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=t.value.readUInt32LE(4*o+4),u=!!(2147483648&s),c=2147483647&s;i.path+="/"+c.toString(10)+(u?"'":"")}}catch(e){a.e(e)}finally{a.f()}return i},encode:function(t){var r=sF.from([e]),n=sF.concat([r,t.pubkey]),i=t.path.split("/"),a=sF.allocUnsafe(4*i.length);t.masterFingerprint.copy(a,0);var o=4;return i.slice(1).forEach((function(e){var t="'"===e.slice(-1),r=2147483647&parseInt(t?e.slice(0,-1):e,10);t&&(r+=2147483648),a.writeUInt32LE(r,o),o+=4})),{key:n,value:a}},check:function(e){return qF(e.pubkey)&&qF(e.masterFingerprint)&&"string"==typeof e.path&&[33,65].includes(e.pubkey.length)&&[2,3,4].includes(e.pubkey[0])&&4===e.masterFingerprint.length},expected:"{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }",canAddToArray:function(e,t,r){var n=t.pubkey.toString("hex");return!r.has(n)&&(r.add(n),0===e.filter((function(e){return e.pubkey.equals(t.pubkey)})).length)}}}}));UU(i9),i9.makeConverter;var a9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeChecker=function(e){return function(t){var r;if(e.includes(t.key[0])&&(33!==(r=t.key.slice(1)).length&&65!==r.length||![2,3,4].includes(r[0])))throw new Error("Format Error: invalid pubkey in key 0x"+t.key.toString("hex"));return r}}}));UU(a9),a9.makeChecker;var o9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeConverter=function(e){return{decode:function(t){if(t.key[0]!==e)throw new Error("Decode Error: could not decode redeemScript with key 0x"+t.key.toString("hex"));return t.value},encode:function(t){return{key:sF.from([e]),value:t}},check:function(e){return qF(e)},expected:"Buffer",canAdd:function(e,t){return!!e&&!!t&&void 0===e.redeemScript}}}}));UU(o9),o9.makeConverter;var s9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.makeConverter=function(e){return{decode:function(t){if(t.key[0]!==e)throw new Error("Decode Error: could not decode witnessScript with key 0x"+t.key.toString("hex"));return t.value},encode:function(t){return{key:sF.from([e]),value:t}},check:function(e){return qF(e)},expected:"Buffer",canAdd:function(e,t){return!!e&&!!t&&void 0===e.witnessScript}}}}));UU(s9),s9.makeConverter;var u9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={unsignedTx:G8,globalXpub:J8,checkPubkey:a9.makeChecker([])};t.globals=r;var n={nonWitnessUtxo:Y8,partialSig:Q8,sighashType:e9,finalScriptSig:$8,finalScriptWitness:X8,porCommitment:Z8,witnessUtxo:n9,bip32Derivation:i9.makeConverter(W8.InputTypes.BIP32_DERIVATION),redeemScript:o9.makeConverter(W8.InputTypes.REDEEM_SCRIPT),witnessScript:s9.makeConverter(W8.InputTypes.WITNESS_SCRIPT),checkPubkey:a9.makeChecker([W8.InputTypes.PARTIAL_SIG,W8.InputTypes.BIP32_DERIVATION])};t.inputs=n;var i={bip32Derivation:i9.makeConverter(W8.OutputTypes.BIP32_DERIVATION),redeemScript:o9.makeConverter(W8.OutputTypes.REDEEM_SCRIPT),witnessScript:s9.makeConverter(W8.OutputTypes.WITNESS_SCRIPT),checkPubkey:a9.makeChecker([W8.OutputTypes.BIP32_DERIVATION])};t.outputs=i}));UU(u9),u9.globals,u9.inputs,u9.outputs;var c9=FU((function(e,t){function r(e,t,r){if(!t.equals(sF.from([r])))throw new Error("Format Error: Invalid ".concat(e," key: ").concat(t.toString("hex")))}function n(e,t){var n,i=t.globalMapKeyVals,a=t.inputKeyVals,o=t.outputKeyVals,s={unsignedTx:e},u=0,c=T(i);try{for(c.s();!(n=c.n()).done;){var l=n.value;switch(l.key[0]){case W8.GlobalTypes.UNSIGNED_TX:if(r("global",l.key,W8.GlobalTypes.UNSIGNED_TX),u>0)throw new Error("Format Error: GlobalMap has multiple UNSIGNED_TX");u++;break;case W8.GlobalTypes.GLOBAL_XPUB:void 0===s.globalXpub&&(s.globalXpub=[]),s.globalXpub.push(u9.globals.globalXpub.decode(l));break;default:s.unknownKeyVals||(s.unknownKeyVals=[]),s.unknownKeyVals.push(l)}}}catch(e){c.e(e)}finally{c.f()}var f,d=a.length,h=o.length,p=[],v=[],b=T(r9.range(d));try{for(b.s();!(f=b.n()).done;){var g,m=f.value,y={},w=T(a[m]);try{for(w.s();!(g=w.n()).done;){var _=g.value;switch(u9.inputs.checkPubkey(_),_.key[0]){case W8.InputTypes.NON_WITNESS_UTXO:if(r("input",_.key,W8.InputTypes.NON_WITNESS_UTXO),void 0!==y.nonWitnessUtxo)throw new Error("Format Error: Input has multiple NON_WITNESS_UTXO");y.nonWitnessUtxo=u9.inputs.nonWitnessUtxo.decode(_);break;case W8.InputTypes.WITNESS_UTXO:if(r("input",_.key,W8.InputTypes.WITNESS_UTXO),void 0!==y.witnessUtxo)throw new Error("Format Error: Input has multiple WITNESS_UTXO");y.witnessUtxo=u9.inputs.witnessUtxo.decode(_);break;case W8.InputTypes.PARTIAL_SIG:void 0===y.partialSig&&(y.partialSig=[]),y.partialSig.push(u9.inputs.partialSig.decode(_));break;case W8.InputTypes.SIGHASH_TYPE:if(r("input",_.key,W8.InputTypes.SIGHASH_TYPE),void 0!==y.sighashType)throw new Error("Format Error: Input has multiple SIGHASH_TYPE");y.sighashType=u9.inputs.sighashType.decode(_);break;case W8.InputTypes.REDEEM_SCRIPT:if(r("input",_.key,W8.InputTypes.REDEEM_SCRIPT),void 0!==y.redeemScript)throw new Error("Format Error: Input has multiple REDEEM_SCRIPT");y.redeemScript=u9.inputs.redeemScript.decode(_);break;case W8.InputTypes.WITNESS_SCRIPT:if(r("input",_.key,W8.InputTypes.WITNESS_SCRIPT),void 0!==y.witnessScript)throw new Error("Format Error: Input has multiple WITNESS_SCRIPT");y.witnessScript=u9.inputs.witnessScript.decode(_);break;case W8.InputTypes.BIP32_DERIVATION:void 0===y.bip32Derivation&&(y.bip32Derivation=[]),y.bip32Derivation.push(u9.inputs.bip32Derivation.decode(_));break;case W8.InputTypes.FINAL_SCRIPTSIG:r("input",_.key,W8.InputTypes.FINAL_SCRIPTSIG),y.finalScriptSig=u9.inputs.finalScriptSig.decode(_);break;case W8.InputTypes.FINAL_SCRIPTWITNESS:r("input",_.key,W8.InputTypes.FINAL_SCRIPTWITNESS),y.finalScriptWitness=u9.inputs.finalScriptWitness.decode(_);break;case W8.InputTypes.POR_COMMITMENT:r("input",_.key,W8.InputTypes.POR_COMMITMENT),y.porCommitment=u9.inputs.porCommitment.decode(_);break;default:y.unknownKeyVals||(y.unknownKeyVals=[]),y.unknownKeyVals.push(_)}}}catch(e){w.e(e)}finally{w.f()}p.push(y)}}catch(e){b.e(e)}finally{b.f()}var x,k=T(r9.range(h));try{for(k.s();!(x=k.n()).done;){var S,E=x.value,I={},A=T(o[E]);try{for(A.s();!(S=A.n()).done;){var P=S.value;switch(u9.outputs.checkPubkey(P),P.key[0]){case W8.OutputTypes.REDEEM_SCRIPT:if(r("output",P.key,W8.OutputTypes.REDEEM_SCRIPT),void 0!==I.redeemScript)throw new Error("Format Error: Output has multiple REDEEM_SCRIPT");I.redeemScript=u9.outputs.redeemScript.decode(P);break;case W8.OutputTypes.WITNESS_SCRIPT:if(r("output",P.key,W8.OutputTypes.WITNESS_SCRIPT),void 0!==I.witnessScript)throw new Error("Format Error: Output has multiple WITNESS_SCRIPT");I.witnessScript=u9.outputs.witnessScript.decode(P);break;case W8.OutputTypes.BIP32_DERIVATION:void 0===I.bip32Derivation&&(I.bip32Derivation=[]),I.bip32Derivation.push(u9.outputs.bip32Derivation.decode(P));break;default:I.unknownKeyVals||(I.unknownKeyVals=[]),I.unknownKeyVals.push(P)}}}catch(e){A.e(e)}finally{A.f()}v.push(I)}}catch(e){k.e(e)}finally{k.f()}return{globalMap:s,inputs:p,outputs:v}}Object.defineProperty(t,"__esModule",{value:!0}),t.psbtFromBuffer=function(e,t){var r=0;function i(){var t=t9.decode(e,r);r+=t9.encodingLength(t);var n=e.slice(r,r+t);return r+=t,n}function a(){return{key:i(),value:i()}}function o(){if(r>=e.length)throw new Error("Format Error: Unexpected End of PSBT");var t=0===e.readUInt8(r);return t&&r++,t}if(1886610036!==function(){var t=e.readUInt32BE(r);return r+=4,t}())throw new Error("Format Error: Invalid Magic Number");if(255!==function(){var t=e.readUInt8(r);return r+=1,t}())throw new Error("Format Error: Magic Number must be followed by 0xff separator");for(var s=[],u={};!o();){var c=a(),l=c.key.toString("hex");if(u[l])throw new Error("Format Error: Keys must be unique for global keymap: key "+l);u[l]=1,s.push(c)}var f=s.filter((function(e){return e.key[0]===W8.GlobalTypes.UNSIGNED_TX}));if(1!==f.length)throw new Error("Format Error: Only one UNSIGNED_TX allowed");var d,h=t(f[0].value),p=h.getInputOutputCounts(),v=p.inputCount,b=p.outputCount,g=[],m=[],y=T(r9.range(v));try{for(y.s();!(d=y.n()).done;){for(var w=d.value,_={},x=[];!o();){var k=a(),S=k.key.toString("hex");if(_[S])throw new Error("Format Error: Keys must be unique for each input: input index "+w+" key "+S);_[S]=1,x.push(k)}g.push(x)}}catch(e){y.e(e)}finally{y.f()}var E,I=T(r9.range(b));try{for(I.s();!(E=I.n()).done;){for(var A=E.value,P={},O=[];!o();){var C=a(),M=C.key.toString("hex");if(P[M])throw new Error("Format Error: Keys must be unique for each output: output index "+A+" key "+M);P[M]=1,O.push(C)}m.push(O)}}catch(e){I.e(e)}finally{I.f()}return n(h,{globalMapKeyVals:s,inputKeyVals:g,outputKeyVals:m})},t.checkKeyBuffer=r,t.psbtFromKeyVals=n}));UU(c9),c9.psbtFromBuffer,c9.checkKeyBuffer,c9.psbtFromKeyVals;var l9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.psbtToBuffer=function(e){var t=i({globalMap:e.globalMap,inputs:e.inputs,outputs:e.outputs}),r=t.globalKeyVals,n=t.inputKeyVals,a=t.outputKeyVals,o=r9.keyValsToBuffer(r),s=function(e){return 0===e.length?[sF.from([0])]:e.map(r9.keyValsToBuffer)},u=s(n),c=s(a),l=sF.allocUnsafe(5);return l.writeUIntBE(482972169471,0,5),sF.concat([l,o].concat(u,c))};var r=function(e,t){return e.key.compare(t.key)};function n(e,t){var n=new Set,i=Object.entries(e).reduce((function(e,r){var i=_(r,2),a=i[0],o=i[1];if("unknownKeyVals"===a)return e;var s=t[a];if(void 0===s)return e;var u=(Array.isArray(o)?o:[o]).map(s.encode);return u.map((function(e){return e.key.toString("hex")})).forEach((function(e){if(n.has(e))throw new Error("Serialize Error: Duplicate key: "+e);n.add(e)})),e.concat(u)}),[]),a=e.unknownKeyVals?e.unknownKeyVals.filter((function(e){return!n.has(e.key.toString("hex"))})):[];return i.concat(a).sort(r)}function i(e){var t=e.globalMap,r=e.inputs,i=e.outputs;return{globalKeyVals:n(t,u9.globals),inputKeyVals:r.map((function(e){return n(e,u9.inputs)})),outputKeyVals:i.map((function(e){return n(e,u9.outputs)}))}}t.psbtToKeyVals=i}));UU(l9),l9.psbtToBuffer,l9.psbtToKeyVals;var f9=FU((function(e,t){function r(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}Object.defineProperty(t,"__esModule",{value:!0}),r(c9),r(l9)}));UU(f9);var d9=FU((function(e,t){function r(e,t,r){return function(n){if(!e.has(n)){var i=r.filter((function(e){return e.key.toString("hex")===n}))[0];t.push(i),e.add(n)}}}function n(e){return e.globalMap.unsignedTx}function i(e){var t=new Set;return e.forEach((function(e){var r=e.key.toString("hex");if(t.has(r))throw new Error("Combine: KeyValue Map keys should be unique");t.add(r)})),t}Object.defineProperty(t,"__esModule",{value:!0}),t.combine=function(e){var t=e[0],a=f9.psbtToKeyVals(t),o=e.slice(1);if(0===o.length)throw new Error("Combine: Nothing to combine");var s=n(t);if(void 0===s)throw new Error("Combine: Self missing transaction");var u,c=i(a.globalKeyVals),l=a.inputKeyVals.map(i),f=a.outputKeyVals.map(i),d=T(o);try{var h=function(){var e=u.value,t=n(e);if(void 0===t||!t.toBuffer().equals(s.toBuffer()))throw new Error("Combine: One of the Psbts does not have the same transaction.");var o=f9.psbtToKeyVals(e);i(o.globalKeyVals).forEach(r(c,a.globalKeyVals,o.globalKeyVals)),o.inputKeyVals.map(i).forEach((function(e,t){return e.forEach(r(l[t],a.inputKeyVals[t],o.inputKeyVals[t]))})),o.outputKeyVals.map(i).forEach((function(e,t){return e.forEach(r(f[t],a.outputKeyVals[t],o.outputKeyVals[t]))}))};for(d.s();!(u=d.n()).done;)h()}catch(e){d.e(e)}finally{d.f()}return f9.psbtFromKeyVals(s,{globalMapKeyVals:a.globalKeyVals,inputKeyVals:a.inputKeyVals,outputKeyVals:a.outputKeyVals})}}));UU(d9),d9.combine;var h9=FU((function(e,t){function r(e,t){var r=e[t];if(void 0===r)throw new Error("No input #".concat(t));return r}function n(e,t,r,n){throw new Error("Data for ".concat(e," key ").concat(t," is incorrect: Expected ").concat(r," and got ").concat(JSON.stringify(n)))}function i(e){return function(t,r){for(var i=function(){var i=o[a],s=t[i],u=u9[e+"s"][i]||{},c=u.canAdd,l=u.canAddToArray,f=u.check,d=u.expected;if(f)if(!!l){if(!Array.isArray(s)||r[i]&&!Array.isArray(r[i]))throw new Error("Key type ".concat(i," must be an array"));s.every(f)||n(e,i,d,s);var h=r[i]||[],p=new Set;if(!s.every((function(e){return l(h,e,p)})))throw new Error("Can not add duplicate data to array");r[i]=h.concat(s)}else{if(f(s)||n(e,i,d,s),!c(r,s))throw new Error("Can not add duplicate data to ".concat(e));r[i]=s}},a=0,o=Object.keys(t);a<o.length;a++)i()}}Object.defineProperty(t,"__esModule",{value:!0}),t.checkForInput=r,t.checkForOutput=function(e,t){var r=e[t];if(void 0===r)throw new Error("No output #".concat(t));return r},t.checkHasKey=function(e,t,r){if(e.key[0]<r)throw new Error("Use the method for your specific key instead of addUnknownKeyVal*");if(t&&0!==t.filter((function(t){return t.key.equals(e.key)})).length)throw new Error("Duplicate Key: ".concat(e.key.toString("hex")))},t.getEnumLength=function(e){var t=0;return Object.keys(e).forEach((function(e){Number(isNaN(Number(e)))&&t++})),t},t.inputCheckUncleanFinalized=function(e,t){var r=!1;if(t.nonWitnessUtxo||t.witnessUtxo){var n=!!t.redeemScript,i=!!t.witnessScript,a=!n||!!t.finalScriptSig,o=!i||!!t.finalScriptWitness,s=!!t.finalScriptSig||!!t.finalScriptWitness;r=a&&o&&s}if(!1===r)throw new Error("Input #".concat(e," has too much or too little data to clean"))},t.updateGlobal=i("global"),t.updateInput=i("input"),t.updateOutput=i("output"),t.addInputAttributes=function(e,n){var i=r(e,e.length-1);t.updateInput(n,i)},t.addOutputAttributes=function(e,n){var i=r(e,e.length-1);t.updateOutput(n,i)},t.defaultVersionSetter=function(e,t){if(!qF(t)||t.length<4)throw new Error("Set Version: Invalid Transaction");return t.writeUInt32LE(e,0),t},t.defaultLocktimeSetter=function(e,t){if(!qF(t)||t.length<4)throw new Error("Set Locktime: Invalid Transaction");return t.writeUInt32LE(e,t.length-4),t}}));UU(h9),h9.checkForInput,h9.checkForOutput,h9.checkHasKey,h9.getEnumLength,h9.inputCheckUncleanFinalized,h9.updateGlobal,h9.updateInput,h9.updateOutput,h9.addInputAttributes,h9.addOutputAttributes,h9.defaultVersionSetter,h9.defaultLocktimeSetter;var p9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Psbt=function(){function e(t){a(this,e),this.inputs=[],this.outputs=[],this.globalMap={unsignedTx:t}}return s(e,[{key:"toBase64",value:function(){return this.toBuffer().toString("base64")}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toBuffer",value:function(){return f9.psbtToBuffer(this)}},{key:"updateGlobal",value:function(e){return h9.updateGlobal(e,this.globalMap),this}},{key:"updateInput",value:function(e,t){var r=h9.checkForInput(this.inputs,e);return h9.updateInput(t,r),this}},{key:"updateOutput",value:function(e,t){var r=h9.checkForOutput(this.outputs,e);return h9.updateOutput(t,r),this}},{key:"addUnknownKeyValToGlobal",value:function(e){return h9.checkHasKey(e,this.globalMap.unknownKeyVals,h9.getEnumLength(W8.GlobalTypes)),this.globalMap.unknownKeyVals||(this.globalMap.unknownKeyVals=[]),this.globalMap.unknownKeyVals.push(e),this}},{key:"addUnknownKeyValToInput",value:function(e,t){var r=h9.checkForInput(this.inputs,e);return h9.checkHasKey(t,r.unknownKeyVals,h9.getEnumLength(W8.InputTypes)),r.unknownKeyVals||(r.unknownKeyVals=[]),r.unknownKeyVals.push(t),this}},{key:"addUnknownKeyValToOutput",value:function(e,t){var r=h9.checkForOutput(this.outputs,e);return h9.checkHasKey(t,r.unknownKeyVals,h9.getEnumLength(W8.OutputTypes)),r.unknownKeyVals||(r.unknownKeyVals=[]),r.unknownKeyVals.push(t),this}},{key:"addInput",value:function(e){var t=this;this.globalMap.unsignedTx.addInput(e),this.inputs.push({unknownKeyVals:[]});var r=e.unknownKeyVals||[],n=this.inputs.length-1;if(!Array.isArray(r))throw new Error("unknownKeyVals must be an Array");return r.forEach((function(e){return t.addUnknownKeyValToInput(n,e)})),h9.addInputAttributes(this.inputs,e),this}},{key:"addOutput",value:function(e){var t=this;this.globalMap.unsignedTx.addOutput(e),this.outputs.push({unknownKeyVals:[]});var r=e.unknownKeyVals||[],n=this.outputs.length-1;if(!Array.isArray(r))throw new Error("unknownKeyVals must be an Array");return r.forEach((function(e){return t.addUnknownKeyValToInput(n,e)})),h9.addOutputAttributes(this.outputs,e),this}},{key:"clearFinalizedInput",value:function(e){var t=h9.checkForInput(this.inputs,e);h9.inputCheckUncleanFinalized(e,t);for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];["witnessUtxo","nonWitnessUtxo","finalScriptSig","finalScriptWitness","unknownKeyVals"].includes(i)||delete t[i]}return this}},{key:"combine",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=d9.combine([this].concat(t));return Object.assign(this,n),this}},{key:"getTransaction",value:function(){return this.globalMap.unsignedTx.toBuffer()}}],[{key:"fromBase64",value:function(e,t){var r=sF.from(e,"base64");return this.fromBuffer(r,t)}},{key:"fromHex",value:function(e,t){var r=sF.from(e,"hex");return this.fromBuffer(r,t)}},{key:"fromBuffer",value:function(e,t){var r=f9.psbtFromBuffer(e,t),n=new this(r.globalMap.unsignedTx);return Object.assign(n,r),n}}]),e}()}));UU(p9),p9.Psbt;var v9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={network:Z5.bitcoin,maximumFeeRate:5e3},n=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new p9.Psbt(new o);a(this,e),this.data=n,this.opts=Object.assign({},r,t),this.__CACHE={__NON_WITNESS_UTXO_TX_CACHE:[],__NON_WITNESS_UTXO_BUF_CACHE:[],__TX_IN_CACHE:{},__TX:this.data.globalMap.unsignedTx.tx,__UNSAFE_SIGN_NONSEGWIT:!1},0===this.data.inputs.length&&this.setVersion(2);var i=function(e,t,r,n){return Object.defineProperty(e,t,{enumerable:r,writable:n})};i(this,"__CACHE",!1,!0),i(this,"opts",!1,!0)}return s(e,[{key:"inputCount",get:function(){return this.data.inputs.length}},{key:"version",get:function(){return this.__CACHE.__TX.version},set:function(e){this.setVersion(e)}},{key:"locktime",get:function(){return this.__CACHE.__TX.locktime},set:function(e){this.setLocktime(e)}},{key:"txInputs",get:function(){return this.__CACHE.__TX.ins.map((function(e){return{hash:q8.cloneBuffer(e.hash),index:e.index,sequence:e.sequence}}))}},{key:"txOutputs",get:function(){var e=this;return this.__CACHE.__TX.outs.map((function(t){var r;try{r=j8.fromOutputScript(t.script,e.opts.network)}catch(t){}return{script:q8.cloneBuffer(t.script),value:t.value,address:r}}))}},{key:"combine",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.data).combine.apply(e,k(r.map((function(e){return e.data})))),this}},{key:"clone",value:function(){var t=e.fromBuffer(this.data.toBuffer());return t.opts=JSON.parse(JSON.stringify(this.opts)),t}},{key:"setMaximumFeeRate",value:function(e){y(e),this.opts.maximumFeeRate=e}},{key:"setVersion",value:function(e){y(e),w(this.data.inputs,"setVersion");var t=this.__CACHE;return t.__TX.version=e,t.__EXTRACTED_TX=void 0,this}},{key:"setLocktime",value:function(e){y(e),w(this.data.inputs,"setLocktime");var t=this.__CACHE;return t.__TX.locktime=e,t.__EXTRACTED_TX=void 0,this}},{key:"setInputSequence",value:function(e,t){y(t),w(this.data.inputs,"setInputSequence");var r=this.__CACHE;if(r.__TX.ins.length<=e)throw new Error("Input index too high");return r.__TX.ins[e].sequence=t,r.__EXTRACTED_TX=void 0,this}},{key:"addInputs",value:function(e){var t=this;return e.forEach((function(e){return t.addInput(e)})),this}},{key:"addInput",value:function(e){if(arguments.length>1||!e||void 0===e.hash||void 0===e.index)throw new Error("Invalid arguments for Psbt.addInput. Requires single object with at least [hash] and [index]");w(this.data.inputs,"addInput"),e.witnessScript&&H(e.witnessScript);var t=this.__CACHE;this.data.addInput(e),E(t,t.__TX.ins[t.__TX.ins.length-1]);var r=this.data.inputs.length-1,n=this.data.inputs[r];return n.nonWitnessUtxo&&j(this.__CACHE,n,r),t.__FEE=void 0,t.__FEE_RATE=void 0,t.__EXTRACTED_TX=void 0,this}},{key:"addOutputs",value:function(e){var t=this;return e.forEach((function(e){return t.addOutput(e)})),this}},{key:"addOutput",value:function(e){if(arguments.length>1||!e||void 0===e.value||void 0===e.address&&void 0===e.script)throw new Error("Invalid arguments for Psbt.addOutput. Requires single object with at least [script or address] and [value]");w(this.data.inputs,"addOutput");var t=e,r=t.address;if("string"==typeof r){var n=this.opts.network,i=j8.toOutputScript(r,n);e=Object.assign(e,{script:i})}var a=this.__CACHE;return this.data.addOutput(e),a.__FEE=void 0,a.__FEE_RATE=void 0,a.__EXTRACTED_TX=void 0,this}},{key:"extractTransaction",value:function(e){if(!this.data.inputs.every(l))throw new Error("Not finalized");var t=this.__CACHE;if(e||function(e,t,r){var n=t.__FEE_RATE||e.getFeeRate(),i=t.__EXTRACTED_TX.virtualSize(),a=n*i;if(n>=r.maximumFeeRate)throw new Error("Warning: You are paying around ".concat((a/1e8).toFixed(8)," in fees, which is ").concat(n," satoshi per byte for a transaction with a VSize of ").concat(i," bytes (segwit counted as 0.25 byte per byte). Use setMaximumFeeRate method to raise your threshold, or pass true to the first arg of extractTransaction."))}(this,t,this.opts),t.__EXTRACTED_TX)return t.__EXTRACTED_TX;var r=t.__TX.clone();return D(this.data.inputs,r,t,!0),r}},{key:"getFeeRate",value:function(){return O("__FEE_RATE","fee rate",this.data.inputs,this.__CACHE)}},{key:"getFee",value:function(){return O("__FEE","fee",this.data.inputs,this.__CACHE)}},{key:"finalizeAllInputs",value:function(){var e=this;return h9.checkForInput(this.data.inputs,0),K(this.data.inputs.length).forEach((function(t){return e.finalizeInput(t)})),this}},{key:"finalizeInput",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C,r=h9.checkForInput(this.data.inputs,e),n=function(e,t,r){var n=r.__TX,i={script:null,isSegwit:!1,isP2SH:!1,isP2WSH:!1};if(i.isP2SH=!!t.redeemScript,i.isP2WSH=!!t.witnessScript,t.witnessScript)i.script=t.witnessScript;else if(t.redeemScript)i.script=t.redeemScript;else if(t.nonWitnessUtxo){var a=B(r,t,e),o=n.ins[e].index;i.script=a.outs[o].script}else t.witnessUtxo&&(i.script=t.witnessUtxo.script);return(t.witnessScript||v(i.script))&&(i.isSegwit=!0),i}(e,r,this.__CACHE),i=n.script,a=n.isP2SH,o=n.isP2WSH,s=n.isSegwit;if(!i)throw new Error("No script found for input #".concat(e));x(r);var u=t(e,r,i,s,a,o),c=u.finalScriptSig,l=u.finalScriptWitness;if(c&&this.data.updateInput(e,{finalScriptSig:c}),l&&this.data.updateInput(e,{finalScriptWitness:l}),!c&&!l)throw new Error("Unknown error finalizing input #".concat(e));return this.data.clearFinalizedInput(e),this}},{key:"getInputType",value:function(e){var t=h9.checkForInput(this.data.inputs,e),r=z(U(e,t,this.__CACHE),e,"input",t.redeemScript||function(e){if(!e)return;var t=h8.decompile(e);if(!t)return;var r,n=t[t.length-1];if(!qF(n)||F(n)||(r=n,h8.isCanonicalScriptSignature(r)))return;return h8.decompile(n)?n:void 0}(t.finalScriptSig),t.witnessScript||function(e){if(!e)return;var t=L(e),r=t[t.length-1];if(F(r))return;return h8.decompile(r)?r:void 0}(t.finalScriptWitness));return("raw"===r.type?"":r.type+"-")+V(r.meaningfulScript)}},{key:"inputHasPubkey",value:function(e,t){return function(e,t,r,n){return q(e,z(U(r,t,n),r,"input",t.redeemScript,t.witnessScript).meaningfulScript)}(t,h9.checkForInput(this.data.inputs,e),e,this.__CACHE)}},{key:"inputHasHDKey",value:function(e,t){var r=h9.checkForInput(this.data.inputs,e),n=m(t);return!!r.bip32Derivation&&r.bip32Derivation.some(n)}},{key:"outputHasPubkey",value:function(e,t){return function(e,t,r,n){return q(e,z(n.__TX.outs[r].script,r,"output",t.redeemScript,t.witnessScript).meaningfulScript)}(t,h9.checkForOutput(this.data.outputs,e),e,this.__CACHE)}},{key:"outputHasHDKey",value:function(e,t){var r=h9.checkForOutput(this.data.outputs,e),n=m(t);return!!r.bip32Derivation&&r.bip32Derivation.some(n)}},{key:"validateSignaturesOfAllInputs",value:function(){var e=this;return h9.checkForInput(this.data.inputs,0),K(this.data.inputs.length).map((function(t){return e.validateSignaturesOfInput(t)})).reduce((function(e,t){return!0===t&&e}),!0)}},{key:"validateSignaturesOfInput",value:function(e,t){var r=this.data.inputs[e],n=(r||{}).partialSig;if(!r||!n||n.length<1)throw new Error("No signatures to validate");var i=t?n.filter((function(e){return e.pubkey.equals(t)})):n;if(i.length<1)throw new Error("No signatures for this pubkey");var a,o,s,u,c=[],l=T(i);try{for(l.s();!(u=l.n()).done;){var f=u.value,d=h8.signature.decode(f.signature),h=s!==d.hashType?R(e,Object.assign({},r,{sighashType:d.hashType}),this.__CACHE,!0):{hash:a,script:o},p=h.hash,v=h.script;s=d.hashType,a=p,o=v,S(f.pubkey,v,"verify");var b=B8.fromPublicKey(f.pubkey);c.push(b.verify(p,d.signature))}}catch(e){l.e(e)}finally{l.f()}return c.every((function(e){return!0===e}))}},{key:"signAllInputsHD",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];if(!e||!e.publicKey||!e.fingerprint)throw new Error("Need HDSigner to sign input");var r,n=[],i=T(K(this.data.inputs.length));try{for(i.s();!(r=i.n()).done;){var a=r.value;try{this.signInputHD(a,e,t),n.push(!0)}catch(e){n.push(!1)}}}catch(e){i.e(e)}finally{i.f()}if(n.every((function(e){return!1===e})))throw new Error("No inputs were signed");return this}},{key:"signAllInputsHDAsync",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];return new Promise((function(n,i){if(!e||!e.publicKey||!e.fingerprint)return i(new Error("Need HDSigner to sign input"));var a,o=[],s=[],u=T(K(t.data.inputs.length));try{for(u.s();!(a=u.n()).done;){var c=a.value;s.push(t.signInputHDAsync(c,e,r).then((function(){o.push(!0)}),(function(){o.push(!1)})))}}catch(e){u.e(e)}finally{u.f()}return Promise.all(s).then((function(){if(o.every((function(e){return!1===e})))return i(new Error("No inputs were signed"));n()}))}))}},{key:"signInputHD",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];if(!t||!t.publicKey||!t.fingerprint)throw new Error("Need HDSigner to sign input");return N(e,this.data.inputs,t).forEach((function(t){return r.signInput(e,t,n)})),this}},{key:"signInputHDAsync",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];return new Promise((function(i,a){if(!t||!t.publicKey||!t.fingerprint)return a(new Error("Need HDSigner to sign input"));var o=N(e,r.data.inputs,t).map((function(t){return r.signInputAsync(e,t,n)}));return Promise.all(o).then((function(){i()})).catch(a)}))}},{key:"signAllInputs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];if(!e||!e.publicKey)throw new Error("Need Signer to sign input");var r,n=[],i=T(K(this.data.inputs.length));try{for(i.s();!(r=i.n()).done;){var a=r.value;try{this.signInput(a,e,t),n.push(!0)}catch(e){n.push(!1)}}}catch(e){i.e(e)}finally{i.f()}if(n.every((function(e){return!1===e})))throw new Error("No inputs were signed");return this}},{key:"signAllInputsAsync",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[V8.Transaction.SIGHASH_ALL];return new Promise((function(n,i){if(!e||!e.publicKey)return i(new Error("Need Signer to sign input"));var a,o=[],s=[],u=T(t.data.inputs.entries());try{for(u.s();!(a=u.n()).done;){var c=_(a.value,1)[0];s.push(t.signInputAsync(c,e,r).then((function(){o.push(!0)}),(function(){o.push(!1)})))}}catch(e){u.e(e)}finally{u.f()}return Promise.all(s).then((function(){if(o.every((function(e){return!1===e})))return i(new Error("No inputs were signed"));n()}))}))}},{key:"signInput",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];if(!t||!t.publicKey)throw new Error("Need Signer to sign input");var n=M(this.data.inputs,e,t.publicKey,this.__CACHE,r),i=n.hash,a=n.sighashType,o=[{pubkey:t.publicKey,signature:h8.signature.encode(t.sign(i),a)}];return this.data.updateInput(e,{partialSig:o}),this}},{key:"signInputAsync",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[V8.Transaction.SIGHASH_ALL];return Promise.resolve().then((function(){if(!t||!t.publicKey)throw new Error("Need Signer to sign input");var i=M(r.data.inputs,e,t.publicKey,r.__CACHE,n),a=i.hash,o=i.sighashType;return Promise.resolve(t.sign(a)).then((function(n){var i=[{pubkey:t.publicKey,signature:h8.signature.encode(n,o)}];r.data.updateInput(e,{partialSig:i})}))}))}},{key:"toBuffer",value:function(){return u(this.__CACHE),this.data.toBuffer()}},{key:"toHex",value:function(){return u(this.__CACHE),this.data.toHex()}},{key:"toBase64",value:function(){return u(this.__CACHE),this.data.toBase64()}},{key:"updateGlobal",value:function(e){return this.data.updateGlobal(e),this}},{key:"updateInput",value:function(e,t){return t.witnessScript&&H(t.witnessScript),this.data.updateInput(e,t),t.nonWitnessUtxo&&j(this.__CACHE,this.data.inputs[e],e),this}},{key:"updateOutput",value:function(e,t){return this.data.updateOutput(e,t),this}},{key:"addUnknownKeyValToGlobal",value:function(e){return this.data.addUnknownKeyValToGlobal(e),this}},{key:"addUnknownKeyValToInput",value:function(e,t){return this.data.addUnknownKeyValToInput(e,t),this}},{key:"addUnknownKeyValToOutput",value:function(e,t){return this.data.addUnknownKeyValToOutput(e,t),this}},{key:"clearFinalizedInput",value:function(e){return this.data.clearFinalizedInput(e),this}}],[{key:"fromBase64",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=sF.from(e,"base64");return this.fromBuffer(r,t)}},{key:"fromHex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=sF.from(e,"hex");return this.fromBuffer(r,t)}},{key:"fromBuffer",value:function(t){var r,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=p9.Psbt.fromBuffer(t,i),s=new e(a,o);return r=s.__CACHE.__TX,n=s.__CACHE,r.ins.forEach((function(e){E(n,e)})),s}}]),e}();t.Psbt=n;var i=function(e){return new o(e)},o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:sF.from([2,0,0,0,0,0,0,0,0,0]);a(this,e),this.tx=V8.Transaction.fromBuffer(t),function(e){if(!e.ins.every((function(e){return e.script&&0===e.script.length&&e.witness&&0===e.witness.length})))throw new Error("Format Error: Transaction ScriptSigs are not empty")}(this.tx),Object.defineProperty(this,"tx",{enumerable:!1,writable:!0})}return s(e,[{key:"getInputOutputCounts",value:function(){return{inputCount:this.tx.ins.length,outputCount:this.tx.outs.length}}},{key:"addInput",value:function(e){if(void 0===e.hash||void 0===e.index||!qF(e.hash)&&"string"!=typeof e.hash||"number"!=typeof e.index)throw new Error("Error adding input.");var t="string"==typeof e.hash?q8.reverseBuffer(sF.from(e.hash,"hex")):e.hash;this.tx.addInput(t,e.index,e.sequence)}},{key:"addOutput",value:function(e){if(void 0===e.script||void 0===e.value||!qF(e.script)||"number"!=typeof e.value)throw new Error("Error adding output.");this.tx.addOutput(e.script,e.value)}},{key:"toBuffer",value:function(){return this.tx.toBuffer()}}]),e}();function u(e){if(!1!==e.__UNSAFE_SIGN_NONSEGWIT)throw new Error("Not BIP174 compliant, can not export")}function c(e,t,r){if(!t)return!1;var n;if(n=r?r.map((function(e){var r=B8.fromPublicKey(e,{compressed:!0}).publicKey;return t.find((function(e){return e.pubkey.equals(r)}))})).filter((function(e){return!!e})):t,n.length>e)throw new Error("Too many signatures");return n.length===e}function l(e){return!!e.finalScriptSig||!!e.finalScriptWitness}function f(e){return function(t){try{return e({output:t}),!0}catch(e){return!1}}}var d=f(L8.p2ms),h=f(L8.p2pk),p=f(L8.p2pkh),v=f(L8.p2wpkh),b=f(L8.p2wsh),g=f(L8.p2sh);function m(e){return function(t){return!!t.masterFingerprint.equals(e.fingerprint)&&!!e.derivePath(t.path).publicKey.equals(t.pubkey)}}function y(e){if("number"!=typeof e||e!==Math.floor(e)||e>4294967295||e<0)throw new Error("Invalid 32 bit integer")}function w(e,t){e.forEach((function(e){var r=!1,n=[];if(0===(e.partialSig||[]).length){if(!e.finalScriptSig&&!e.finalScriptWitness)return;n=function(e){var t=e.finalScriptSig&&h8.decompile(e.finalScriptSig)||[],r=e.finalScriptWitness&&h8.decompile(e.finalScriptWitness)||[];return t.concat(r).filter((function(e){return qF(e)&&h8.isCanonicalScriptSignature(e)})).map((function(e){return{signature:e}}))}(e)}else n=e.partialSig;if(n.forEach((function(e){var n=h8.signature.decode(e.signature).hashType,i=[];switch(n&V8.Transaction.SIGHASH_ANYONECANPAY&&i.push("addInput"),31&n){case V8.Transaction.SIGHASH_ALL:break;case V8.Transaction.SIGHASH_SINGLE:case V8.Transaction.SIGHASH_NONE:i.push("addOutput"),i.push("setInputSequence")}-1===i.indexOf(t)&&(r=!0)})),r)throw new Error("Can not modify transaction, signatures exist.")}))}function x(e){if(e.sighashType&&e.partialSig){var t=e.partialSig,r=e.sighashType;t.forEach((function(e){var t=h8.signature.decode(e.signature).hashType;if(r!==t)throw new Error("Signature sighash does not match input sighash type")}))}}function S(e,t,r){if(!q(e,t))throw new Error("Can not ".concat(r," for this input with the key ").concat(e.toString("hex")))}function E(e,t){var r=q8.reverseBuffer(sF.from(t.hash)).toString("hex")+":"+t.index;if(e.__TX_IN_CACHE[r])throw new Error("Duplicate input detected.");e.__TX_IN_CACHE[r]=1}function I(e,t){return function(r,n,i,a){var o=e({redeem:{output:i}}).output;if(!n.equals(o))throw new Error("".concat(t," for ").concat(a," #").concat(r," doesn't match the scriptPubKey in the prevout"))}}var A=I(L8.p2sh,"Redeem script"),P=I(L8.p2wsh,"Witness script");function O(e,t,r,n){if(!r.every(l))throw new Error("PSBT must be finalized to calculate ".concat(t));if("__FEE_RATE"===e&&n.__FEE_RATE)return n.__FEE_RATE;if("__FEE"===e&&n.__FEE)return n.__FEE;var i,a=!0;return n.__EXTRACTED_TX?(i=n.__EXTRACTED_TX,a=!1):i=n.__TX.clone(),D(r,i,n,a),"__FEE_RATE"===e?n.__FEE_RATE:"__FEE"===e?n.__FEE:void 0}function C(e,t,r,n,i,a){var o=V(r);if(!function(e,t,r){switch(r){case"pubkey":case"pubkeyhash":case"witnesspubkeyhash":return c(1,e.partialSig);case"multisig":var n=L8.p2ms({output:t});return c(n.m,e.partialSig,n.pubkeys);default:return!1}}(t,r,o))throw new Error("Can not finalize input #".concat(e));return function(e,t,r,n,i,a){var o,s,u=function(e,t,r){var n;switch(t){case"multisig":var i=function(e,t){return L8.p2ms({output:e}).pubkeys.map((function(e){return(t.filter((function(t){return t.pubkey.equals(e)}))[0]||{}).signature})).filter((function(e){return!!e}))}(e,r);n=L8.p2ms({output:e,signatures:i});break;case"pubkey":n=L8.p2pk({output:e,signature:r[0].signature});break;case"pubkeyhash":n=L8.p2pkh({output:e,pubkey:r[0].pubkey,signature:r[0].signature});break;case"witnesspubkeyhash":n=L8.p2wpkh({output:e,pubkey:r[0].pubkey,signature:r[0].signature})}return n}(e,t,r),c=a?L8.p2wsh({redeem:u}):null,l=i?L8.p2sh({redeem:c||u}):null;return n?(s=function(e){var t,r=sF.allocUnsafe(0);function n(e){var t=r.length,n=t9.encodingLength(e);r=sF.concat([r,sF.allocUnsafe(n)]),t9.encode(e,r,t)}function i(e){n(e.length),function(e){r=sF.concat([r,sF.from(e)])}(e)}return n((t=e).length),t.forEach(i),r}(c?c.witness:u.witness),l&&(o=l.input)):o=l?l.input:u.input,{finalScriptSig:o,finalScriptWitness:s}}(r,o,t.partialSig,n,i,a)}function M(e,t,r,n,i){var a=R(t,h9.checkForInput(e,t),n,!1,i),o=a.hash,s=a.sighashType;return S(r,a.script,"sign"),{hash:o,sighashType:s}}function R(e,t,r,n,i){var a,o,s=r.__TX,u=t.sighashType||V8.Transaction.SIGHASH_ALL;if(i&&i.indexOf(u)<0){var c=function(e){var t=e&V8.Transaction.SIGHASH_ANYONECANPAY?"SIGHASH_ANYONECANPAY | ":"";switch(31&e){case V8.Transaction.SIGHASH_ALL:t+="SIGHASH_ALL";break;case V8.Transaction.SIGHASH_SINGLE:t+="SIGHASH_SINGLE";break;case V8.Transaction.SIGHASH_NONE:t+="SIGHASH_NONE"}return t}(u);throw new Error("Sighash type is not allowed. Retry the sign method passing the sighashTypes array of whitelisted types. Sighash type: ".concat(c))}if(t.nonWitnessUtxo){var l=B(r,t,e),f=s.ins[e].hash,d=l.getHash();if(!f.equals(d))throw new Error("Non-witness UTXO hash for input #".concat(e," doesn't match the hash specified in the prevout"));var h=s.ins[e].index;o=l.outs[h]}else{if(!t.witnessUtxo)throw new Error("Need a Utxo input item for signing");o=t.witnessUtxo}var p=z(o.script,e,"input",t.redeemScript,t.witnessScript),b=p.meaningfulScript,g=p.type;if(["p2sh-p2wsh","p2wsh"].indexOf(g)>=0)a=s.hashForWitnessV0(e,b,o.value,u);else if(v(b)){var m=L8.p2pkh({hash:b.slice(2)}).output;a=s.hashForWitnessV0(e,m,o.value,u)}else{if(void 0===t.nonWitnessUtxo&&!1===r.__UNSAFE_SIGN_NONSEGWIT)throw new Error("Input #".concat(e," has witnessUtxo but non-segwit script: ").concat(b.toString("hex")));n||!1===r.__UNSAFE_SIGN_NONSEGWIT||console.warn("Warning: Signing non-segwit inputs without the full parent transaction means there is a chance that a miner could feed you incorrect information to trick you into paying large fees. This behavior is the same as the old TransactionBuilder class when signing non-segwit scripts. You are not able to export this Psbt with toBuffer|toBase64|toHex since it is not BIP174 compliant.\n*********************\nPROCEED WITH CAUTION!\n*********************"),a=s.hashForSignature(e,b,u)}return{script:b,sighashType:u,hash:a}}function N(e,t,r){var n=h9.checkForInput(t,e);if(!n.bip32Derivation||0===n.bip32Derivation.length)throw new Error("Need bip32Derivation to sign with HD");var i=n.bip32Derivation.map((function(e){return e.masterFingerprint.equals(r.fingerprint)?e:void 0})).filter((function(e){return!!e}));if(0===i.length)throw new Error("Need one bip32Derivation masterFingerprint to match the HDSigner fingerprint");return i.map((function(e){var t=r.derivePath(e.path);if(!e.pubkey.equals(t.publicKey))throw new Error("pubkey did not match bip32Derivation");return t}))}function L(e){var t=0;function r(){var r=t9.decode(e,t);return t+=t9.decode.bytes,r}function n(){return function(r){return t+=r,e.slice(t-r,t)}(r())}return function(){for(var e=r(),t=[],i=0;i<e;i++)t.push(n());return t}()}function j(e,t,r){e.__NON_WITNESS_UTXO_BUF_CACHE[r]=t.nonWitnessUtxo;var n=V8.Transaction.fromBuffer(t.nonWitnessUtxo);e.__NON_WITNESS_UTXO_TX_CACHE[r]=n;var i=e,a=r;delete t.nonWitnessUtxo,Object.defineProperty(t,"nonWitnessUtxo",{enumerable:!0,get:function(){var e=i.__NON_WITNESS_UTXO_BUF_CACHE[a],t=i.__NON_WITNESS_UTXO_TX_CACHE[a];if(void 0!==e)return e;var r=t.toBuffer();return i.__NON_WITNESS_UTXO_BUF_CACHE[a]=r,r},set:function(e){i.__NON_WITNESS_UTXO_BUF_CACHE[a]=e}})}function D(e,t,r,n){var i=0;e.forEach((function(e,a){if(n&&e.finalScriptSig&&(t.ins[a].script=e.finalScriptSig),n&&e.finalScriptWitness&&(t.ins[a].witness=L(e.finalScriptWitness)),e.witnessUtxo)i+=e.witnessUtxo.value;else if(e.nonWitnessUtxo){var o=B(r,e,a),s=t.ins[a].index,u=o.outs[s];i+=u.value}}));var a=t.outs.reduce((function(e,t){return e+t.value}),0),o=i-a;if(o<0)throw new Error("Outputs are spending more than Inputs");var s=t.virtualSize();r.__FEE=o,r.__EXTRACTED_TX=t,r.__FEE_RATE=Math.floor(o/s)}function B(e,t,r){var n=e.__NON_WITNESS_UTXO_TX_CACHE;return n[r]||j(e,t,r),n[r]}function U(e,t,r){if(void 0!==t.witnessUtxo)return t.witnessUtxo.script;if(void 0!==t.nonWitnessUtxo)return B(r,t,e).outs[r.__TX.ins[e].index].script;throw new Error("Can't find pubkey in input without Utxo data")}function F(e){return 33===e.length&&h8.isCanonicalPubKey(e)}function z(e,t,r,n,i){var a,o=g(e),s=o&&n&&b(n),u=b(e);if(o&&void 0===n)throw new Error("scriptPubkey is P2SH but redeemScript missing");if((u||s)&&void 0===i)throw new Error("scriptPubkey or redeemScript is P2WSH but witnessScript missing");return s?(a=i,A(t,e,n,r),P(t,n,i,r),H(a)):u?(a=i,P(t,e,i,r),H(a)):o?(a=n,A(t,e,n,r)):a=e,{meaningfulScript:a,type:s?"p2sh-p2wsh":o?"p2sh":u?"p2wsh":"raw"}}function H(e){if(v(e)||g(e))throw new Error("P2WPKH or P2SH can not be contained within P2WSH")}function q(e,t){var r=m8.hash160(e),n=h8.decompile(t);if(null===n)throw new Error("Unknown script error");return n.some((function(t){return"number"!=typeof t&&(t.equals(e)||t.equals(r))}))}function V(e){return v(e)?"witnesspubkeyhash":p(e)?"pubkeyhash":d(e)?"multisig":h(e)?"pubkey":"nonstandard"}function K(e){return k(Array(e).keys())}}));UU(v9),v9.Psbt;var b9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){return e===r.OPS.OP_0||h8.isCanonicalScriptSignature(e)}function i(e,t){var i=h8.decompile(e);return!(i.length<2)&&i[0]===r.OPS.OP_0&&(t?i.slice(1).every(n):i.slice(1).every(h8.isCanonicalScriptSignature))}t.check=i,i.toJSON=function(){return"multisig input"}}));UU(b9),b9.check;var g9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8,n=r.OPS.OP_RESERVED;function i(e,t){var i=h8.decompile(e);if(i.length<4)return!1;if(i[i.length-1]!==r.OPS.OP_CHECKMULTISIG)return!1;if(!t8.Number(i[0]))return!1;if(!t8.Number(i[i.length-2]))return!1;var a=i[0]-n,o=i[i.length-2]-n;return!(a<=0)&&(!(o>16)&&(!(a>o)&&(o===i.length-3&&(!!t||i.slice(1,-2).every(h8.isCanonicalPubKey)))))}t.check=i,i.toJSON=function(){return"multi-sig output"}}));UU(g9),g9.check;var m9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=b9,t.output=g9}));UU(m9),m9.input,m9.output;var y9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8.OPS;function n(e){var t=h8.compile(e);return t.length>1&&t[0]===r.OP_RETURN}t.check=n,n.toJSON=function(){return"null data output"};var i={check:n};t.output=i}));UU(y9),y9.check,y9.output;var w9=FU((function(e,t){function r(e){var t=h8.decompile(e);return 1===t.length&&h8.isCanonicalScriptSignature(t[0])}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"pubKey input"}}));UU(w9),w9.check;var _9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.decompile(e);return 2===t.length&&h8.isCanonicalPubKey(t[0])&&t[1]===r.OPS.OP_CHECKSIG}t.check=n,n.toJSON=function(){return"pubKey output"}}));UU(_9),_9.check;var x9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=w9,t.output=_9}));UU(x9),x9.input,x9.output;var k9=FU((function(e,t){function r(e){var t=h8.decompile(e);return 2===t.length&&h8.isCanonicalScriptSignature(t[0])&&h8.isCanonicalPubKey(t[1])}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"pubKeyHash input"}}));UU(k9),k9.check;var S9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 25===t.length&&t[0]===r.OPS.OP_DUP&&t[1]===r.OPS.OP_HASH160&&20===t[2]&&t[23]===r.OPS.OP_EQUALVERIFY&&t[24]===r.OPS.OP_CHECKSIG}t.check=n,n.toJSON=function(){return"pubKeyHash output"}}));UU(S9),S9.check;var E9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=k9,t.output=S9}));UU(E9),E9.input,E9.output;var I9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 22===t.length&&t[0]===r.OPS.OP_0&&20===t[1]}t.check=n,n.toJSON=function(){return"Witness pubKeyHash output"}}));UU(I9),I9.check;var A9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 34===t.length&&t[0]===r.OPS.OP_0&&32===t[1]}t.check=n,n.toJSON=function(){return"Witness scriptHash output"}}));UU(A9),A9.check;var P9=FU((function(e,t){function r(e,t){var r=h8.decompile(e);if(r.length<1)return!1;var n=r[r.length-1];if(!qF(n))return!1;var i=h8.decompile(h8.compile(r.slice(0,-1))),a=h8.decompile(n);return!!a&&!!h8.isPushOnly(i)&&(1===r.length?A9.check(a)||I9.check(a):!(!E9.input.check(i)||!E9.output.check(a))||!(!m9.input.check(i,t)||!m9.output.check(a))||!(!x9.input.check(i)||!x9.output.check(a)))}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"scriptHash input"}}));UU(P9),P9.check;var T9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8;function n(e){var t=h8.compile(e);return 23===t.length&&t[0]===r.OPS.OP_HASH160&&20===t[1]&&t[22]===r.OPS.OP_EQUAL}t.check=n,n.toJSON=function(){return"scriptHash output"}}));UU(T9),T9.check;var O9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=P9,t.output=T9}));UU(O9),O9.input,O9.output;var C9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=h8,n=sF.from("aa21a9ed","hex");function i(e){var t=h8.compile(e);return t.length>37&&t[0]===r.OPS.OP_RETURN&&36===t[1]&&t.slice(2,6).equals(n)}t.check=i,i.toJSON=function(){return"Witness commitment output"},t.encode=function(e){W5(t8.Hash256bit,e);var t=sF.allocUnsafe(36);return n.copy(t,0),e.copy(t,4),h8.compile([r.OPS.OP_RETURN,t])},t.decode=function(e){return W5(i,e),h8.decompile(e)[1].slice(4,36)}}));UU(C9),C9.check,C9.encode,C9.decode;var M9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.output=C9}));UU(M9),M9.output;var R9=FU((function(e,t){function r(e){var t,r=h8.decompile(e);return 2===r.length&&h8.isCanonicalScriptSignature(r[0])&&(t=r[1],h8.isCanonicalPubKey(t)&&33===t.length)}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"witnessPubKeyHash input"}}));UU(R9),R9.check;var N9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=R9,t.output=I9}));UU(N9),N9.input,N9.output;var L9=FU((function(e,t){function r(e,t){if(W5(W5.Array,e),e.length<1)return!1;var r=e[e.length-1];if(!qF(r))return!1;var n=h8.decompile(r);if(!n||0===n.length)return!1;var i=h8.compile(e.slice(0,-1));return!(!E9.input.check(i)||!E9.output.check(n))||!(!m9.input.check(i,t)||!m9.output.check(n))||!(!x9.input.check(i)||!x9.output.check(n))}Object.defineProperty(t,"__esModule",{value:!0}),t.check=r,r.toJSON=function(){return"witnessScriptHash input"}}));UU(L9),L9.check;var j9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.input=L9,t.output=A9}));UU(j9),j9.input,j9.output;var D9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={P2MS:"multisig",NONSTANDARD:"nonstandard",NULLDATA:"nulldata",P2PK:"pubkey",P2PKH:"pubkeyhash",P2SH:"scripthash",P2WPKH:"witnesspubkeyhash",P2WSH:"witnessscripthash",WITNESS_COMMITMENT:"witnesscommitment"};t.types=r,t.output=function(e){if(N9.output.check(e))return r.P2WPKH;if(j9.output.check(e))return r.P2WSH;if(E9.output.check(e))return r.P2PKH;if(O9.output.check(e))return r.P2SH;var t=h8.decompile(e);if(!t)throw new TypeError("Invalid script");return m9.output.check(t)?r.P2MS:x9.output.check(t)?r.P2PK:M9.output.check(t)?r.WITNESS_COMMITMENT:y9.output.check(t)?r.NULLDATA:r.NONSTANDARD},t.input=function(e,t){var n=h8.decompile(e);if(!n)throw new TypeError("Invalid script");return E9.input.check(n)?r.P2PKH:O9.input.check(n,t)?r.P2SH:m9.input.check(n,t)?r.P2MS:x9.input.check(n)?r.P2PK:r.NONSTANDARD},t.witness=function(e,t){var n=h8.decompile(e);if(!n)throw new TypeError("Invalid script");return N9.input.check(n)?r.P2WPKH:j9.input.check(n,t)?r.P2WSH:r.NONSTANDARD}}));UU(D9),D9.types,D9.output,D9.input,D9.witness;var B9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=h8,i=D9.types,o=new Set(["p2pkh","p2pk","p2wpkh","p2ms","p2sh-p2pkh","p2sh-p2pk","p2sh-p2wpkh","p2sh-p2ms","p2wsh-p2pkh","p2wsh-p2pk","p2wsh-p2ms","p2sh-p2wsh-p2pkh","p2sh-p2wsh-p2pk","p2sh-p2wsh-p2ms"]);function u(e,t,r){try{W5(e,t)}catch(e){throw new Error(r)}}var c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z5.bitcoin,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2500;a(this,e),this.network=t,this.maximumFeeRate=r,this.__PREV_TX_SET={},this.__INPUTS=[],this.__TX=new V8.Transaction,this.__TX.version=2,this.__USE_LOW_R=!1,console.warn("Deprecation Warning: TransactionBuilder will be removed in the future. (v6.x.x or later) Please use the Psbt class instead. Examples of usage are available in the transactions-psbt.js integration test file on our Github. A high level explanation is available in the psbt.ts and psbt.js files as well.")}return s(e,[{key:"setLowR",value:function(e){return W5(W5.maybe(W5.Boolean),e),void 0===e&&(e=!0),this.__USE_LOW_R=e,e}},{key:"setLockTime",value:function(e){if(W5(t8.UInt32,e),this.__INPUTS.some((function(e){return!!e.signatures&&e.signatures.some((function(e){return void 0!==e}))})))throw new Error("No, this would invalidate signatures");this.__TX.locktime=e}},{key:"setVersion",value:function(e){W5(t8.UInt32,e),this.__TX.version=e}},{key:"addInput",value:function(e,t,r,n){if(!this.__canModifyInputs())throw new Error("No, this would invalidate signatures");var i,a;if("string"==typeof(a=e)||a instanceof String)e=q8.reverseBuffer(sF.from(e,"hex"));else if(function(e){return e instanceof V8.Transaction}(e)){var o=e.outs[t];n=o.script,i=o.value,e=e.getHash(!1)}return this.__addInputUnsafe(e,t,{sequence:r,prevOutScript:n,value:i})}},{key:"addOutput",value:function(e,t){if(!this.__canModifyOutputs())throw new Error("No, this would invalidate signatures");return"string"==typeof e&&(e=j8.toOutputScript(e,this.network)),this.__TX.addOutput(e,t)}},{key:"build",value:function(){return this.__build(!1)}},{key:"buildIncomplete",value:function(){return this.__build(!0)}},{key:"sign",value:function(e,t,n,a,s,c){!function(e){var t,r=e.input,n=e.ourPubKey,i=e.keyPair,a=e.signatureHash,o=e.hashType,s=e.useLowR,u=!1,c=T(r.pubkeys.entries());try{for(c.s();!(t=c.n()).done;){var l=_(t.value,2),f=l[0],d=l[1];if(n.equals(d)){if(r.signatures[f])throw new Error("Signature already exists");if(33!==n.length&&r.hasWitness)throw new Error("BIP143 rejects uncompressed public keys in P2WPKH or P2WSH");var h=i.sign(a,s);r.signatures[f]=h8.signature.encode(h,o),u=!0}}}catch(e){c.e(e)}finally{c.f()}if(!u)throw new Error("Key pair cannot sign for this input")}(function(e,t,n,a,s,c,l,d,p,v,b){var g;if("number"==typeof s)console.warn("DEPRECATED: TransactionBuilder sign method arguments will change in v6, please use the TxbSignArg interface"),g=s;else{var m;if("object"!=r(s))throw new TypeError("TransactionBuilder sign first arg must be TxbSignArg or number");!function(e,t){if(!o.has(t.prevOutScriptType))throw new TypeError('Unknown prevOutScriptType "'.concat(t.prevOutScriptType,'"'));u(W5.Number,t.vin,"sign must include vin parameter as Number (input index)"),u(t8.Signer,t.keyPair,"sign must include keyPair parameter as Signer interface"),u(W5.maybe(W5.Number),t.hashType,"sign hashType parameter must be a number");var r=(e[t.vin]||[]).prevOutType,n=t.prevOutScriptType;switch(n){case"p2pkh":if(r&&"pubkeyhash"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2pkh: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2pk":if(r&&"pubkey"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2pk: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2wpkh":if(r&&"witnesspubkeyhash"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2wpkh: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessValue"));break;case"p2ms":if(r&&"multisig"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2ms: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2sh-p2wpkh":if(r&&"scripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type p2sh-p2wpkh: ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.Buffer,t.redeemScript,"".concat(n," requires redeemScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessValue"));break;case"p2sh-p2ms":case"p2sh-p2pk":case"p2sh-p2pkh":if(r&&"scripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type ").concat(n,": ").concat(r));u(W5.value(void 0),t.witnessScript,"".concat(n," requires NO witnessScript")),u(W5.Buffer,t.redeemScript,"".concat(n," requires redeemScript")),u(W5.value(void 0),t.witnessValue,"".concat(n," requires NO witnessValue"));break;case"p2wsh-p2ms":case"p2wsh-p2pk":case"p2wsh-p2pkh":if(r&&"witnessscripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type ").concat(n,": ").concat(r));u(W5.Buffer,t.witnessScript,"".concat(n," requires witnessScript")),u(W5.value(void 0),t.redeemScript,"".concat(n," requires NO redeemScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessValue"));break;case"p2sh-p2wsh-p2ms":case"p2sh-p2wsh-p2pk":case"p2sh-p2wsh-p2pkh":if(r&&"scripthash"!==r)throw new TypeError("input #".concat(t.vin," is not of type ").concat(n,": ").concat(r));u(W5.Buffer,t.witnessScript,"".concat(n," requires witnessScript")),u(W5.Buffer,t.redeemScript,"".concat(n," requires witnessScript")),u(t8.Satoshi,t.witnessValue,"".concat(n," requires witnessScript"))}}(t,s),g=(m=s).vin,c=m.keyPair,l=m.redeemScript,d=m.hashType,p=m.witnessValue,v=m.witnessScript}if(void 0===c)throw new Error("sign requires keypair");if(c.network&&c.network!==e)throw new TypeError("Inconsistent network");if(!t[g])throw new Error("No input at index: "+g);if(n(d=d||V8.Transaction.SIGHASH_ALL))throw new Error("Transaction needs outputs");var y=t[g];if(void 0!==y.redeemScript&&l&&!y.redeemScript.equals(l))throw new Error("Inconsistent redeemScript");var w=c.publicKey||c.getPublicKey&&c.getPublicKey();if(!h(y)){if(void 0!==p){if(void 0!==y.value&&y.value!==p)throw new Error("Input did not match witnessValue");W5(t8.Satoshi,p),y.value=p}if(!h(y)){var _=function(e,t,r,n){if(r&&n){var a=L8.p2wsh({redeem:{output:n}}),o=L8.p2wsh({output:r}),s=L8.p2sh({redeem:{output:r}}),u=L8.p2sh({redeem:a});if(!a.hash.equals(o.hash))throw new Error("Witness script inconsistent with prevOutScript");if(!s.hash.equals(u.hash))throw new Error("Redeem script inconsistent with prevOutScript");var c=f(a.redeem.output,t);if(!c.pubkeys)throw new Error(c.type+" not supported as witnessScript ("+h8.toASM(n)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(c.signatures=e.signatures);var l=n;if(c.type===i.P2WPKH)throw new Error("P2SH(P2WSH(P2WPKH)) is a consensus failure");return{redeemScript:r,redeemScriptType:i.P2WSH,witnessScript:n,witnessScriptType:c.type,prevOutType:i.P2SH,prevOutScript:s.output,hasWitness:!0,signScript:l,signType:c.type,pubkeys:c.pubkeys,signatures:c.signatures,maxSignatures:c.maxSignatures}}if(r){var d=L8.p2sh({redeem:{output:r}});if(e.prevOutScript){var h;try{h=L8.p2sh({output:e.prevOutScript})}catch(e){throw new Error("PrevOutScript must be P2SH")}if(!d.hash.equals(h.hash))throw new Error("Redeem script inconsistent with prevOutScript")}var p=f(d.redeem.output,t);if(!p.pubkeys)throw new Error(p.type+" not supported as redeemScript ("+h8.toASM(r)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(p.signatures=e.signatures);var v=r;return p.type===i.P2WPKH&&(v=L8.p2pkh({pubkey:p.pubkeys[0]}).output),{redeemScript:r,redeemScriptType:p.type,prevOutType:i.P2SH,prevOutScript:d.output,hasWitness:p.type===i.P2WPKH,signScript:v,signType:p.type,pubkeys:p.pubkeys,signatures:p.signatures,maxSignatures:p.maxSignatures}}if(n){var b=L8.p2wsh({redeem:{output:n}});if(e.prevOutScript){var g=L8.p2wsh({output:e.prevOutScript});if(!b.hash.equals(g.hash))throw new Error("Witness script inconsistent with prevOutScript")}var m=f(b.redeem.output,t);if(!m.pubkeys)throw new Error(m.type+" not supported as witnessScript ("+h8.toASM(n)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(m.signatures=e.signatures);var y=n;if(m.type===i.P2WPKH)throw new Error("P2WSH(P2WPKH) is a consensus failure");return{witnessScript:n,witnessScriptType:m.type,prevOutType:i.P2WSH,prevOutScript:b.output,hasWitness:!0,signScript:y,signType:m.type,pubkeys:m.pubkeys,signatures:m.signatures,maxSignatures:m.maxSignatures}}if(e.prevOutType&&e.prevOutScript){if(e.prevOutType===i.P2SH)throw new Error("PrevOutScript is "+e.prevOutType+", requires redeemScript");if(e.prevOutType===i.P2WSH)throw new Error("PrevOutScript is "+e.prevOutType+", requires witnessScript");if(!e.prevOutScript)throw new Error("PrevOutScript is missing");var w=f(e.prevOutScript,t);if(!w.pubkeys)throw new Error(w.type+" not supported ("+h8.toASM(e.prevOutScript)+")");e.signatures&&e.signatures.some((function(e){return void 0!==e}))&&(w.signatures=e.signatures);var _=e.prevOutScript;return w.type===i.P2WPKH&&(_=L8.p2pkh({pubkey:w.pubkeys[0]}).output),{prevOutType:w.type,prevOutScript:e.prevOutScript,hasWitness:w.type===i.P2WPKH,signScript:_,signType:w.type,pubkeys:w.pubkeys,signatures:w.signatures,maxSignatures:w.maxSignatures}}var x=L8.p2pkh({pubkey:t}).output;return{prevOutType:i.P2PKH,prevOutScript:x,hasWitness:!1,signScript:x,signType:i.P2PKH,pubkeys:[t],signatures:[void 0]}}(y,w,l,v);Object.assign(y,_)}if(!h(y))throw Error(y.prevOutType+" not supported")}return{input:y,ourPubKey:w,keyPair:c,signatureHash:y.hasWitness?a.hashForWitnessV0(g,y.signScript,y.value,d):a.hashForSignature(g,y.signScript,d),hashType:d,useLowR:!!b}}(this.network,this.__INPUTS,this.__needsOutputs.bind(this),this.__TX,e,t,n,a,s,c,this.__USE_LOW_R))}},{key:"__addInputUnsafe",value:function(e,t,r){if(V8.Transaction.isCoinbaseHash(e))throw new Error("coinbase inputs not supported");var n=e.toString("hex")+":"+t;if(void 0!==this.__PREV_TX_SET[n])throw new Error("Duplicate TxOut: "+n);var i={};if(void 0!==r.script&&(i=l(r.script,r.witness||[])),void 0!==r.value&&(i.value=r.value),!i.prevOutScript&&r.prevOutScript){var a;if(!i.pubkeys&&!i.signatures){var o=f(r.prevOutScript);o.pubkeys&&(i.pubkeys=o.pubkeys,i.signatures=o.signatures),a=o.type}i.prevOutScript=r.prevOutScript,i.prevOutType=a||D9.output(r.prevOutScript)}var s=this.__TX.addInput(e,t,r.sequence,r.scriptSig);return this.__INPUTS[s]=i,this.__PREV_TX_SET[n]=!0,s}},{key:"__build",value:function(e){if(!e){if(!this.__TX.ins.length)throw new Error("Transaction has no inputs");if(!this.__TX.outs.length)throw new Error("Transaction has no outputs")}var t=this.__TX.clone();if(this.__INPUTS.forEach((function(r,n){if(!r.prevOutType&&!e)throw new Error("Transaction is not complete");var a=d(r.prevOutType,r,e);if(a)t.setInputScript(n,a.input),t.setWitness(n,a.witness);else{if(!e&&r.prevOutType===i.NONSTANDARD)throw new Error("Unknown input type");if(!e)throw new Error("Not enough information")}})),!e&&this.__overMaximumFees(t.virtualSize()))throw new Error("Transaction has absurd fees");return t}},{key:"__canModifyInputs",value:function(){return this.__INPUTS.every((function(e){return!e.signatures||e.signatures.every((function(e){return!e||0!=(p(e)&V8.Transaction.SIGHASH_ANYONECANPAY)}))}))}},{key:"__needsOutputs",value:function(e){return e===V8.Transaction.SIGHASH_ALL?0===this.__TX.outs.length:0===this.__TX.outs.length&&this.__INPUTS.some((function(e){return!!e.signatures&&e.signatures.some((function(e){return!!e&&!(p(e)&V8.Transaction.SIGHASH_NONE)}))}))}},{key:"__canModifyOutputs",value:function(){var e=this.__TX.ins.length,t=this.__TX.outs.length;return this.__INPUTS.every((function(r){return void 0===r.signatures||r.signatures.every((function(r){if(!r)return!0;var n=31&p(r);return n===V8.Transaction.SIGHASH_NONE||n===V8.Transaction.SIGHASH_SINGLE&&e<=t}))}))}},{key:"__overMaximumFees",value:function(e){return(this.__INPUTS.reduce((function(e,t){return e+(t.value>>>0)}),0)-this.__TX.outs.reduce((function(e,t){return e+t.value}),0))/e>this.maximumFeeRate}}],[{key:"fromTransaction",value:function(t,r){var n=new e(r);return n.setVersion(t.version),n.setLockTime(t.locktime),t.outs.forEach((function(e){n.addOutput(e.script,e.value)})),t.ins.forEach((function(e){n.__addInputUnsafe(e.hash,e.index,{sequence:e.sequence,script:e.script,witness:e.witness})})),n.__INPUTS.forEach((function(e,r){!function(e,t,r){if(e.redeemScriptType===i.P2MS&&e.redeemScript&&e.pubkeys.length!==e.signatures.length){var n=e.signatures.concat();e.signatures=e.pubkeys.map((function(i){var a,o=B8.fromPublicKey(i);return n.some((function(i,s){if(!i)return!1;var u=h8.signature.decode(i),c=t.hashForSignature(r,e.redeemScript,u.hashType);return!!o.verify(c,u.signature)&&(n[s]=void 0,a=i,!0)})),a}))}}(e,t,r)})),n}}]),e}();function l(e,t,r,n){if(0===e.length&&0===t.length)return{};if(!r){var a=D9.input(e,!0),o=D9.witness(t,!0);a===i.NONSTANDARD&&(a=void 0),o===i.NONSTANDARD&&(o=void 0),r=a||o}switch(r){case i.P2WPKH:var s=L8.p2wpkh({witness:t}),u=s.output,c=s.pubkey,f=s.signature;return{prevOutScript:u,prevOutType:i.P2WPKH,pubkeys:[c],signatures:[f]};case i.P2PKH:var d=L8.p2pkh({input:e}),h=d.output,p=d.pubkey,v=d.signature;return{prevOutScript:h,prevOutType:i.P2PKH,pubkeys:[p],signatures:[v]};case i.P2PK:var b=L8.p2pk({input:e}).signature;return{prevOutType:i.P2PK,pubkeys:[void 0],signatures:[b]};case i.P2MS:var g=L8.p2ms({input:e,output:n},{allowIncomplete:!0}),m=g.m,y=g.pubkeys,w=g.signatures;return{prevOutType:i.P2MS,pubkeys:y,signatures:w,maxSignatures:m}}if(r===i.P2SH){var _=L8.p2sh({input:e,witness:t}),x=_.output,k=_.redeem,S=D9.output(k.output),E=l(k.input,k.witness,S,k.output);return E.prevOutType?{prevOutScript:x,prevOutType:i.P2SH,redeemScript:k.output,redeemScriptType:E.prevOutType,witnessScript:E.witnessScript,witnessScriptType:E.witnessScriptType,pubkeys:E.pubkeys,signatures:E.signatures}:{}}if(r===i.P2WSH){var I,A=L8.p2wsh({input:e,witness:t}),P=A.output,T=A.redeem,O=D9.output(T.output);return(I=O===i.P2WPKH?l(T.input,T.witness,O):l(h8.compile(T.witness),[],O,T.output)).prevOutType?{prevOutScript:P,prevOutType:i.P2WSH,witnessScript:T.output,witnessScriptType:I.prevOutType,pubkeys:I.pubkeys,signatures:I.signatures}:{}}return{prevOutType:i.NONSTANDARD,prevOutScript:e}}function f(e,t){W5(t8.Buffer,e);var r=D9.output(e);switch(r){case i.P2PKH:if(!t)return{type:r};var n=L8.p2pkh({output:e}).hash,a=m8.hash160(t);return n.equals(a)?{type:r,pubkeys:[t],signatures:[void 0]}:{type:r};case i.P2WPKH:if(!t)return{type:r};var o=L8.p2wpkh({output:e}).hash,s=m8.hash160(t);return o.equals(s)?{type:r,pubkeys:[t],signatures:[void 0]}:{type:r};case i.P2PK:return{type:r,pubkeys:[L8.p2pk({output:e}).pubkey],signatures:[void 0]};case i.P2MS:var u=L8.p2ms({output:e});return{type:r,pubkeys:u.pubkeys,signatures:u.pubkeys.map((function(){})),maxSignatures:u.m}}return{type:r}}function d(e,t,r){var a=t.pubkeys||[],o=t.signatures||[];switch(e){case i.P2PKH:if(0===a.length)break;if(0===o.length)break;return L8.p2pkh({pubkey:a[0],signature:o[0]});case i.P2WPKH:if(0===a.length)break;if(0===o.length)break;return L8.p2wpkh({pubkey:a[0],signature:o[0]});case i.P2PK:if(0===a.length)break;if(0===o.length)break;return L8.p2pk({signature:o[0]});case i.P2MS:var s=t.maxSignatures;o=r?o.map((function(e){return e||n.OPS.OP_0})):o.filter((function(e){return e}));var u=!r||s===o.length;return L8.p2ms({m:s,pubkeys:a,signatures:o},{allowIncomplete:r,validate:u});case i.P2SH:var c=d(t.redeemScriptType,t,r);if(!c)return;return L8.p2sh({redeem:{output:c.output||t.redeemScript,input:c.input,witness:c.witness}});case i.P2WSH:var l=d(t.witnessScriptType,t,r);if(!l)return;return L8.p2wsh({redeem:{output:t.witnessScript,input:l.input,witness:l.witness}})}}function h(e){return void 0!==e.signScript&&void 0!==e.signType&&void 0!==e.pubkeys&&void 0!==e.signatures&&e.signatures.length===e.pubkeys.length&&e.pubkeys.length>0&&(!1===e.hasWitness||void 0!==e.value)}function p(e){return e.readUInt8(e.length-1)}t.TransactionBuilder=c}));UU(B9),B9.TransactionBuilder;var U9=FU((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.bip32=Q5,t.address=j8,t.crypto=m8,t.ECPair=B8,t.networks=Z5,t.payments=L8,t.script=h8,t.Block=K8.Block,t.Psbt=v9.Psbt;var r=h8;t.opcodes=r.OPS,t.Transaction=V8.Transaction,t.TransactionBuilder=B9.TransactionBuilder}));function F9(e,t,r){var n="",i=function(e,t){var r=null;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&n.toLowerCase()===t.toLowerCase()&&(r=n);return e[r]}(e,t),a=OV(r);if(i?(i.created&&a<=i.created&&(n="invalidIssuingAddressCreationTime"),i.revoked&&a>=i.revoked&&(n="invalidIssuingAddressRevoked"),i.expires&&a>=i.expires&&(n="invalidIssuingAddressExpired")):n="invalidIssuingAddressUnknown",n)throw new jU("checkAuthenticity",OU("errors",n))}UU(U9),U9.bitcoin,U9.bip32,U9.address,U9.crypto,U9.ECPair,U9.networks,U9.payments,U9.script,U9.Block,U9.Psbt,U9.opcodes,U9.Transaction,U9.TransactionBuilder;var z9=Gq("Verifier"),H9=function(){function e(t){var r=t.certificateJson,n=t.chain,i=t.expires,o=t.id,s=t.issuer,u=t.receipt,c=t.revocationKey,l=t.transactionId,f=t.version,d=t.explorerAPIs;a(this,e),this.chain=n,this.expires=i,this.id=o,this.issuer=s,this.receipt=u,this.revocationKey=c,this.version=f,this.transactionId=l,this.explorerAPIs=d;var h=r.document;h||(h=this._retrieveDocumentBeforeIssuance(r)),this.documentToVerify=Object.assign({},h),this._stepsStatuses=[]}return s(e,[{key:"verify",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};return dU(this,void 0,void 0,Jt.mark((function t(){var r;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._stepCallback=e,this.version!==pU.V1_1){t.next=2;break}throw new jU("","Verification of 1.1 certificates is not supported by this component. See the python cert-verifier for legacy verification");case 2:if(!MV.chains.isMockChain(this.chain)){t.next=7;break}return t.next=5,this._verifyV2Mock();case 5:t.next=9;break;case 7:return t.next=9,this._verifyMain();case 9:return r=this._stepsStatuses.find((function(e){return"failure"===e.status})),t.abrupt("return",r?this._failed(r):this._succeed());case 11:case"end":return t.stop()}}),t,this)})))}},{key:"_getRevocationListUrl",value:function(e){var t;return(null===(t=this.issuer)||void 0===t?void 0:t.revocationList)?this.issuer.revocationList:e.revocationList}},{key:"_doAction",value:function(e,t){return dU(this,void 0,void 0,Jt.mark((function r(){var n,i;return Jt.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this._isFailing()){r.next=2;break}return r.abrupt("return");case 2:return e&&(n=MV.i18n.getText("subSteps","".concat(e,"LabelPending")),z9(n),this._updateStatusCallback(e,n,"starting")),r.prev=3,r.next=6,t();case 6:return i=r.sent,r.abrupt("return",(e&&(this._updateStatusCallback(e,n,"success"),this._stepsStatuses.push({step:e,label:n,status:"success"})),i));case 10:r.prev=10,r.t0=r.catch(3),e&&(this._updateStatusCallback(e,n,"failure",r.t0.message),this._stepsStatuses.push({code:e,label:n,status:"failure",errorMessage:r.t0.message}));case 13:case"end":return r.stop()}}),r,this,[[3,10]])})))}},{key:"_stepCallback",value:function(e){}},{key:"_verifyMain",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getTransactionId();case 2:return e.next=4,this.computeLocalHash();case 4:return e.next=6,this.fetchRemoteHash();case 6:return e.next=8,this.getIssuerProfile();case 8:return e.next=10,this.parseIssuerKeys();case 10:return e.next=12,this.compareHashes();case 12:return e.next=14,this.checkMerkleRoot();case 14:return e.next=16,this.checkReceipt();case 16:return e.next=18,this.checkRevokedStatus();case 18:return e.next=20,this.checkAuthenticity();case 20:return e.next=22,this.checkExpiresDate();case 22:case"end":return e.stop()}}),e,this)})))}},{key:"_verifyV2Mock",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.computeLocalHash();case 2:return e.next=4,this.compareHashes();case 4:return e.next=6,this.checkReceipt();case 6:return e.next=8,this.checkExpiresDate();case 8:case"end":return e.stop()}}),e,this)})))}},{key:"getTransactionId",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("getTransactionId",(function(){return function(e){if("string"==typeof e&&e.length>0)return e;throw new jU("getTransactionId",OU("errors","isTransactionIdValid"))}(t.transactionId)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"computeLocalHash",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("computeLocalHash",(function(){return dU(t,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sQ(this.documentToVerify,this.version);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 2:this.localHash=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"fetchRemoteHash",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("fetchRemoteHash",(function(){return dU(t,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,MV.verifier.lookForTx({transactionId:this.transactionId,chain:this.chain.code,explorerAPIs:this.explorerAPIs});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 2:this.txData=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getIssuerProfile",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("getIssuerProfile",(function(){return dU(t,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,MV.verifier.getIssuerProfile(this.issuer);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 2:this.issuer=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"parseIssuerKeys",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("parseIssuerKeys",(function(){return MV.verifier.parseIssuerKeys(t.issuer)}));case 2:this.issuerPublicKeyList=e.sent;case 3:case"end":return e.stop()}}),e,this)})))}},{key:"compareHashes",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("compareHashes",(function(){!function(e,t){if(e!==t)throw new jU("compareHashes",OU("errors","ensureHashesEqual"))}(t.localHash,t.receipt.targetHash)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkMerkleRoot",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkMerkleRoot",(function(){return function(e,t){if(e!==t)throw new jU("checkMerkleRoot",OU("errors","ensureMerkleRootEqual"));return!0}(t.receipt.merkleRoot,t.txData.remoteHash)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkReceipt",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkReceipt",(function(){return function(e){var t=e.targetHash,r=e.merkleRoot;try{var n=e.proof||e.path;if(n)for(var i in n){var a=n[i],o=void 0;if(void 0!==a.left)o=oQ("".concat(a.left).concat(t)),t=aQ(o);else{if(void 0===a.right)throw new jU("checkReceipt","Trigger catch error.");o=oQ("".concat(t).concat(a.right)),t=aQ(o)}}}catch(e){throw new jU("checkReceipt",OU("errors","ensureValidReceipt"))}if(t!==r)throw new jU("checkReceipt",OU("errors","invalidMerkleReceipt"))}(t.receipt)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkRevokedStatus",value:function(){var e;return dU(this,void 0,void 0,Jt.mark((function t(){var r,n,i=this;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.version!==pU.V1_2){t.next=4;break}n=(null===(e=this.txData)||void 0===e?void 0:e.revokedAddresses)||[],r=[MV.verifier.parseRevocationKey(this.issuer),this.revocationKey],t.next=8;break;case 4:return t.next=6,this._doAction(null,(function(){return dU(i,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,MV.verifier.getRevokedAssertions(this._getRevocationListUrl(this.issuer),this.id);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})))}));case 6:n=t.sent,r=this.id;case 8:return t.next=10,this._doAction("checkRevokedStatus",(function(){return function(e,t){if(e&&t){Array.isArray(t)||(t=[t]);var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.filter((function(e){return-1!==t.indexOf(e)})).filter((function(e,t,r){return r.indexOf(e)===t}))}(t=t.filter((function(e){return null!=e})),e.map((function(e){return e.id})));if(r.length>0){var n=e.findIndex((function(e){return e.id===r[0]}));if(n>-1)throw new jU("checkRevokedStatus",MV.certificates.generateRevocationReason(e[n].revocationReason))}}}(n,r)}));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"checkAuthenticity",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkAuthenticity",(function(){return F9(t.issuerPublicKeyList,t.txData.issuingAddress,t.txData.time)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"checkExpiresDate",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){var t=this;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._doAction("checkExpiresDate",(function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(e){var t=OV(e);if(new Date>=t)throw new jU("checkExpiresDate",OU("errors","ensureNotExpired"))}}(t.expires)}));case 2:case"end":return e.stop()}}),e,this)})))}},{key:"_failed",value:function(e){var t=e.errorMessage;return z9("failure:".concat(t)),this._setFinalStep({status:"failure",message:t})}},{key:"_isFailing",value:function(){return this._stepsStatuses.some((function(e){return"failure"===e.status}))}},{key:"_retrieveDocumentBeforeIssuance",value:function(e){var t=Object.assign({},e);return delete t.signature,t}},{key:"_succeed",value:function(){var e=MV.chains.isMockChain(this.chain)?MV.i18n.getText("success","mocknet"):MV.i18n.getText("success","blockchain");return z9(e),this._setFinalStep({status:"success",message:e})}},{key:"_setFinalStep",value:function(e){return{code:"final",status:e.status,message:e.message}}},{key:"_updateStatusCallback",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(null!=e){var i={code:e,label:t,status:r};n&&(i.errorMessage=n),this._stepCallback(i)}}}]),e}(),q9=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a(this,e),this.explorerAPIs=[],this._setOptions(n),"object"!=r(t))try{t=JSON.parse(t)}catch(t){throw new Error(MV.i18n.getText("errors","certificateNotValid"))}this.certificateJson=qU(t)}return s(e,[{key:"init",value:function(){return dU(this,void 0,void 0,Jt.mark((function e(){return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.parseJson(this.certificateJson);case 2:case"end":return e.stop()}}),e,this)})))}},{key:"parseJson",value:function(e){return dU(this,void 0,void 0,Jt.mark((function t(){var r;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,NV(e);case 2:if((r=t.sent).isFormatValid){t.next=5;break}throw new Error(r.error);case 5:this._setProperties(r);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"verify",value:function(e){return dU(this,void 0,void 0,Jt.mark((function t(){var r;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new H9({certificateJson:this.certificateJson,chain:this.chain,expires:this.expires,id:this.id,issuer:this.issuer,receipt:this.receipt,revocationKey:this.revocationKey,transactionId:this.transactionId,version:this.version,explorerAPIs:qU(this.explorerAPIs)}),t.next=3,r.verify(e);case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"_setOptions",value:function(e){this.options=Object.assign({},AU,e),this.locale=MV.i18n.ensureIsSupported("auto"===this.options.locale?MV.i18n.detectLocale():this.options.locale),this.explorerAPIs=this.options.explorerAPIs||[],TU.locale=this.locale}},{key:"_setProperties",value:function(e){var t=e.certificateImage,r=e.chain,n=e.description,i=e.expires,a=e.id,o=e.isFormatValid,s=e.issuedOn,u=e.issuer,c=e.metadataJson,l=e.name,f=e.publicKey,d=e.receipt,h=e.recipientFullName,p=e.recordLink,v=e.revocationKey,b=e.sealImage,g=e.signature,m=e.signatureImage,y=e.subtitle,w=e.version;this.isFormatValid=o,this.certificateImage=t,this.chain=r,this.description=n,this.expires=i,this.id=a,this.issuedOn=s,this.issuer=u,this.metadataJson=c,this.name=l,this.publicKey=f,this.receipt=d,this.recipientFullName=h,this.recordLink=p,this.revocationKey=v,this.sealImage=b,this.signature=g,this.signatureImage=m,this.subtitle=y,this.verificationSteps=MV.certificates.getVerificationMap(r),this.version=w,this._setTransactionDetails()}},{key:"_setTransactionDetails",value:function(){this.transactionId=MV.certificates.getTransactionId(this.receipt),this.rawTransactionLink=MV.certificates.getTransactionLink(this.transactionId,this.chain,!0),this.transactionLink=MV.certificates.getTransactionLink(this.transactionId,this.chain)}}]),e}();var V9=Object.freeze({__proto__:null,displayHtmlHasNoWidthConstraint:function(e){const t=(new DOMParser).parseFromString(e,"text/html");return t.body.childElementCount===t.body.querySelectorAll(Bt.map((e=>`section[class*="${e}"]`)).join(", ")).length},download:function(e){return e+Ut},initializeVerificationSteps:function(e){var r=JSON.parse(JSON.stringify(e.verificationSteps));return r.map((function(e,n){return t(t({},e),{},{isLast:n===r.length-1,status:XB.DEFAULT})}))},retrieve:function(e){return YB(e)||QB(e)?fetch(e+Ut).then((function(e){return e.text()})).then((function(e){try{return{certificateDefinition:JSON.parse(e)}}catch(e){return console.log(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcertsUrl"}}})).catch(ZB):(console.error("Invalid url to retrieve:",e),null)},read:function(e){return tU.apply(this,arguments)},parse:function(e,t={}){return aU(this,void 0,void 0,(function*(){t.locale||(t.locale="auto");try{let r;return r=1===jd(e["@context"])?new q9(e,t):new $B(e,t),yield r.init(),{certificateDefinition:r}}catch(e){return console.error(e),{certificateDefinition:null,errorMessage:"errors.invalidBlockcerts"}}}))},isPathToCertificateValidURI:function(e){return YB(e)||QB(e)}});var K9=Object.freeze({__proto__:null,dispatch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0;if(e&&"string"==typeof e&&n&&"object"===r(n)){var a=new CustomEvent(e,{detail:t({certificateDefinition:n},i)});window.dispatchEvent(a)}}}),W9=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!window.Proxy){var t=jt();return new t(e,Dt)}return new Proxy(e,Dt)}({certificates:V9,events:K9});function J9(e,t){return e(t={exports:{}},t.exports),t.exports}function G9(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var $9=/javascript\s*\:/gim;var X9={whiteList:G9(),getDefaultWhiteList:G9,onAttr:function(e,t,r){},onIgnoreAttr:function(e,t,r){},safeAttrValue:function(e,t){return $9.test(t)?"":t}},Y9=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},Q9=function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")};var Z9=function(e,t){";"!==(e=Q9(e))[e.length-1]&&(e+=";");var r=e.length,n=!1,i=0,a=0,o="";function s(){if(!n){var r=Y9(e.slice(i,a)),s=r.indexOf(":");if(-1!==s){var u=Y9(r.slice(0,s)),c=Y9(r.slice(s+1));if(u){var l=t(i,o.length,u,c,r);l&&(o+=l+"; ")}}}i=a+1}for(;a<r;a++){var u=e[a];if("/"===u&&"*"===e[a+1]){var c=e.indexOf("*/",a+2);if(-1===c)break;i=(a=c+1)+1,n=!1}else"("===u?n=!0:")"===u?n=!1:";"===u?n||s():"\n"===u&&s()}return Y9(o)};function e7(e){return null==e}function t7(e){e=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{}),e.whiteList=e.whiteList||X9.whiteList,e.onAttr=e.onAttr||X9.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||X9.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||X9.safeAttrValue,this.options=e}t7.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,r=t.whiteList,n=t.onAttr,i=t.onIgnoreAttr,a=t.safeAttrValue;return Z9(e,(function(e,t,o,s,u){var c=r[o],l=!1;if(!0===c?l=c:"function"==typeof c?l=c(s):c instanceof RegExp&&(l=c.test(s)),!0!==l&&(l=!1),s=a(o,s)){var f,d={position:t,sourcePosition:e,source:u,isWhite:l};return l?e7(f=n(o,s,d))?o+":"+s:f:e7(f=i(o,s,d))?void 0:f}}))};var r7=t7,n7=J9((function(e,t){for(var r in t=e.exports=function(e,t){return new r7(t).process(e)},t.FilterCSS=r7,X9)t[r]=X9[r];"undefined"!=typeof window&&(window.filterCSS=e.exports)}));n7.cssfilter,n7.FilterCSS;var i7=function(e,t){var r,n;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},a7=function(e,t,r){var n,i;if(Array.prototype.forEach)return e.forEach(t,r);for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},o7=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},s7=function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1},u7=n7.FilterCSS,c7=n7.getDefaultWhiteList;function l7(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var f7=new u7;function d7(e){return e.replace(h7,"<").replace(p7,">")}var h7=/</g,p7=/>/g,v7=/"/g,b7=/"/g,g7=/&#([a-zA-Z0-9]*);?/gim,m7=/:?/gim,y7=/&newline;?/gim,w7=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,_7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,x7=/u\s*r\s*l\s*\(.*/gi;function k7(e){return e.replace(v7,""")}function S7(e){return e.replace(b7,'"')}function E7(e){return e.replace(g7,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function I7(e){return e.replace(m7,":").replace(y7," ")}function A7(e){for(var t="",r=0,n=e.length;r<n;r++)t+=e.charCodeAt(r)<32?" ":e.charAt(r);return o7(t)}function P7(e){return e=A7(e=I7(e=E7(e=S7(e))))}function T7(e){return e=d7(e=k7(e))}var O7=/<!--[\s\S]*?-->/g;var C7=function(e,t,r,n){if(r=P7(r),"href"===t||"src"===t){if("#"===(r=o7(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===t){if(w7.lastIndex=0,w7.test(r))return""}else if("style"===t){if(_7.lastIndex=0,_7.test(r))return"";if(x7.lastIndex=0,x7.test(r)&&(w7.lastIndex=0,w7.test(r)))return"";!1!==n&&(r=(n=n||f7).process(r))}return r=T7(r)},M7=function(e,t){"function"!=typeof t&&(t=function(){});var r=!Array.isArray(e),n=[],i=!1;return{onIgnoreTag:function(a,o,s){if(function(t){return!!r||-1!==i7(e,t)}(a)){if(s.isClosing){var u="[/removed]",c=s.position+u.length;return n.push([!1!==i?i:s.position,c]),i=!1,u}return i||(i=s.position),"[removed]"}return t(a,o,s)},remove:function(e){var t="",r=0;return a7(n,(function(n){t+=e.slice(r,n[0]),r=n[1]})),t+=e.slice(r)}}},R7=function(e){return e.replace(O7,"")},N7=function(e){var t=e.split("");return t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})),t.join("")},L7={whiteList:{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},getDefaultWhiteList:l7,onTag:function(e,t,r){},onIgnoreTag:function(e,t,r){},onTagAttr:function(e,t,r){},onIgnoreTagAttr:function(e,t,r){},safeAttrValue:C7,escapeHtml:d7,escapeQuote:k7,unescapeQuote:S7,escapeHtmlEntities:E7,escapeDangerHtml5Entities:I7,clearNonPrintableCharacter:A7,friendlyAttrValue:P7,escapeAttrValue:T7,onIgnoreTagStripAll:function(){return""},StripTagBody:M7,stripCommentTag:R7,stripBlankChar:N7,cssFilter:f7,getDefaultCSSWhiteList:c7};function j7(e){var t=s7(e);if(-1===t)var r=e.slice(1,-1);else r=e.slice(1,t+1);return"/"===(r=o7(r).toLowerCase()).slice(0,1)&&(r=r.slice(1)),"/"===r.slice(-1)&&(r=r.slice(0,-1)),r}function D7(e){return"</"===e.slice(0,2)}var B7=/[^a-zA-Z0-9_:\.\-]/gim;function U7(e,t){for(;t<e.length;t++){var r=e[t];if(" "!==r)return"="===r?t:-1}}function F7(e,t){for(;t>0;t--){var r=e[t];if(" "!==r)return"="===r?t:-1}}function z7(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}var H7=function(e,t,r){var n="",i=0,a=!1,o=!1,s=0,u=e.length,c="",l="";e:for(s=0;s<u;s++){var f=e.charAt(s);if(!1===a){if("<"===f){a=s;continue}}else if(!1===o){if("<"===f){n+=r(e.slice(i,s)),a=s,i=s;continue}if(">"===f){n+=r(e.slice(i,a)),c=j7(l=e.slice(a,s+1)),n+=t(a,n.length,c,l,D7(l)),i=s+1,a=!1;continue}if('"'===f||"'"===f)for(var d=1,h=e.charAt(s-d);""===h.trim()||"="===h;){if("="===h){o=f;continue e}h=e.charAt(s-++d)}}else if(f===o){o=!1;continue}}return i<e.length&&(n+=r(e.substr(i))),n},q7=function(e,t){var r=0,n=[],i=!1,a=e.length;function o(e,r){if(!((e=(e=o7(e)).replace(B7,"").toLowerCase()).length<1)){var i=t(e,r||"");i&&n.push(i)}}for(var s=0;s<a;s++){var u,c=e.charAt(s);if(!1!==i||"="!==c)if(!1===i||s!==r||'"'!==c&&"'"!==c||"="!==e.charAt(s-1))if(/\s|\n|\t/.test(c)){if(e=e.replace(/\s|\n|\t/g," "),!1===i){if(-1===(u=U7(e,s))){o(o7(e.slice(r,s))),i=!1,r=s+1;continue}s=u-1;continue}if(-1===(u=F7(e,s-1))){o(i,z7(o7(e.slice(r,s)))),i=!1,r=s+1;continue}}else;else{if(-1===(u=e.indexOf(c,s+1)))break;o(i,o7(e.slice(r+1,u))),i=!1,r=(s=u)+1}else i=e.slice(r,s),r=s+1}return r<e.length&&(!1===i?o(e.slice(r)):o(i,z7(o7(e.slice(r))))),o7(n.join(" "))},V7={parseTag:H7,parseAttr:q7},K7=n7.FilterCSS,W7=V7.parseTag,J7=V7.parseAttr;function G7(e){return null==e}function $7(e){e=function(e){var t={};for(var r in e)t[r]=e[r];return t}(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=L7.onIgnoreTagStripAll),e.whiteList=e.whiteList||L7.whiteList,e.onTag=e.onTag||L7.onTag,e.onTagAttr=e.onTagAttr||L7.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||L7.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||L7.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||L7.safeAttrValue,e.escapeHtml=e.escapeHtml||L7.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new K7(e.css))}$7.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,r=t.whiteList,n=t.onTag,i=t.onIgnoreTag,a=t.onTagAttr,o=t.onIgnoreTagAttr,s=t.safeAttrValue,u=t.escapeHtml,c=this.cssFilter;t.stripBlankChar&&(e=L7.stripBlankChar(e)),t.allowCommentTag||(e=L7.stripCommentTag(e));var l=!1;if(t.stripIgnoreTagBody){l=L7.StripTagBody(t.stripIgnoreTagBody,i);i=l.onIgnoreTag}var f=W7(e,(function(e,t,l,f,d){var h,p={sourcePosition:e,position:t,isClosing:d,isWhite:r.hasOwnProperty(l)};if(!G7(h=n(l,f,p)))return h;if(p.isWhite){if(p.isClosing)return"</"+l+">";var v=function(e){var t=s7(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var r="/"===(e=o7(e.slice(t+1,-1)))[e.length-1];return r&&(e=o7(e.slice(0,-1))),{html:e,closing:r}}(f),b=r[l],g=J7(v.html,(function(e,t){var r,n=-1!==i7(b,e);return G7(r=a(l,e,t,n))?n?(t=s(l,e,t,c))?e+'="'+t+'"':e:G7(r=o(l,e,t,n))?void 0:r:r}));f="<"+l;return g&&(f+=" "+g),v.closing&&(f+=" /"),f+=">"}return G7(h=i(l,f,p))?u(f):h}),u);return l&&(f=l.remove(f)),f};var X7=$7,Y7=J9((function(e,t){function r(e,t){return new X7(t).process(e)}for(var n in(t=e.exports=r).filterXSS=r,t.FilterXSS=X7,L7)t[n]=L7[n];for(var n in V7)t[n]=V7[n];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)}));Y7.xss,Y7.filterXSS,Y7.FilterXSS;var Q7=t(t({},n7.getDefaultWhiteList()),{},{bottom:!0,left:!0,float:!0,overflow:!0,position:!0,right:!0,top:!0,transform:!0,opacity:!0,"transform-origin":!0,"flex-direction":!0,"flex-wrap":!0,"justify-content":!0,"align-items":!0,"white-space":!0,"line-height":!0});var Z7=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,eee=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,tee=/u\s*r\s*l\s*\(.*/gi,ree={whiteList:function(){var e=Y7.getDefaultWhiteList();return Object.keys(e).forEach((function(t){e[t].push("style"),e[t].push("class"),e[t].push("download")})),e}(),css:!1,stripIgnoreTagBody:!0,onTagAttr:function(e,t,r,n){if("style"===t)return"".concat(t,'="').concat(n7(r,{whiteList:Q7}).replace(/; /g,";"),'"');if("img"===e&&"src"===t&&function(e){return!!e.match(/^data:.+;base64,/)}(r)){var i=function(e){return e.split("base64,")[1]}(r);try{return atob(i),"".concat(t,'="').concat(r,'"')}catch(e){return t}}},safeAttrValue:function(e,t,r,n){if(r=Y7.friendlyAttrValue(r),"href"===t||"src"===t){if("#"===(r=function(e){if(String.prototype.trim)return e.trim();return e.replace(/(^\s*)|(\s*$)/g,"")}(r)))return"#";if(!function(e){return["http://","https://","mailto:","tel:","data:","#","/"].some((function(t){return e.substr(0,t.length)===t}))}(r))return""}else if("background"===t){if(Z7.lastIndex=0,Z7.test(r))return""}else if("style"===t){if(eee.lastIndex=0,eee.test(r))return"";if(tee.lastIndex=0,tee.test(r)&&(Z7.lastIndex=0,Z7.test(r)))return"";!1!==n&&(r=(n=n||Y7.getDefaultCSSWhiteList()).process(r))}return r=Y7.escapeAttrValue(r)}},nee=new Y7.FilterXSS(ree);function iee(e){return nee.process(e)}var aee="en";var oee={locale:aee},see={en:{errors:{errorLabel:"Error",invalidBlockcerts:"Not a valid Blockcerts credential. Please check with the issuer or recipient that has provided this credential.",invalidBlockcertsUrl:"Not a valid credential URL.",invalidFormatDragAndDrop:"Only JSON files are accepted",invalidUrl:"This does not seem to be a valid URL.",noDownloadLink:"No link provided for download!",noMetadata:"No metadata specified for this record",noShareUrl:"No URL to share!",noTransactionId:"No transaction ID"},text:{brandName:"Blockcerts",blockcertsHint:"Visit Blockcerts website",by:"by",certified:"Certified by",closeButton:"Click to close",downloadLink:"Download Record in JSON format",dragAndDropHint:"(you can also drag & drop your file).",fileUpload:"Choose JSON file",issued:"Issued on",issueDate:"Issue Date",issuerName:"Issuer",issuerPublicKey:"Issuer's public key",item:"Item",itemPlural:"Items",metadataButton:"View Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Recipient",share:"Share on",shareButton:"Share on Social Networks",signed:"Signed by",substepsListClose:"Hide",substepsListHint:"Toggle open list of substeps",transactionId:"Transaction ID",urlInput:"Enter the certificate URL",urlInputPlaceholder:"Certificate URL",verificationStepProgress:"Verifying step...",verify:"Verify",verifyAgain:"Verify again",verifyOther:"Verify another record",viewRecord:"View Record"},date:{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],pattern:"MM DD, YYYY"}},es:{errors:{errorLabel:"Error",invalidBlockcerts:"No es una credencial válida de Blockcerts. Verifique con el emisor o el destinatario que ha proporcionado esta credencial.",invalidBlockcertsUrl:"No es URL de certificado valido.",invalidFormatDragAndDrop:"Solo se aceptan archivos JSON",invalidUrl:"Esto no parece ser un URL válido.",noDownloadLink:"Enlace para descargar no proporcionado!",noMetadata:"No se han especificado metadatos para este registro",noShareUrl:"No hay URL para compartir!",noTransactionId:"No ID de transacción"},text:{brandName:"Blockcerts",blockcertsHint:"Visite el sitio web de Blockcerts",by:"por",certified:"Certificado por",closeButton:"Haz Click para cerrar",downloadLink:"Descarga el Registro en formato JSON",dragAndDropHint:"(también puedes arrastrar y soltar tu archivo).",fileUpload:"Escoge archivo JSON",issued:"Emitido el",issueDate:"Fecha de Emisión",issuerName:"Emisor",issuerPublicKey:"Llave publica del Emisor",item:"Elemento",itemPlural:"Elementos",metadataButton:"Ver Metadata",metadataTitle:"Metadata",motto:"Blockcerts, El Estándar Abierto para Credenciales Blockchain",recipient:"Recipiente",share:"Comparte en",shareButton:"Comparte en Redes Sociales",signed:"Firmado Por",substepsListClose:"Esconde",substepsListHint:"Pasa lista abierta de sub-pasos",transactionId:"ID de Transacción",urlInput:"Ingrese el URL del certificado",urlInputPlaceholder:"Certificado del URL",verificationStepProgress:"Paso de verificación...",verify:"Verifica",verifyAgain:"Verifica nuevamente",verifyOther:"Verifica otro registro",viewRecord:"Ver Registro"},date:{months:["enero","feb","marzo","abr","mayo","jun","jul","agosto","set","oct","nov","dic"],pattern:"MM DD, YYYY"}},fr:{errors:{errorLabel:"Erreur",invalidBlockcerts:"Ceci n'est pas un certificat Blockcerts valide. Veuillez s'il vous plaît contrôler avec l'organisme émetteur ou le récipiendaire de ce certificat.",invalidBlockcertsUrl:"Ceci n'est pas une URL de certificat valide.",invalidFormatDragAndDrop:"Seul le format JSON est accepté",invalidUrl:"URL invalide",noDownloadLink:"Aucun lien disponible pour le téléchargement!",noMetadata:"Ce certificat ne contient pas de métadata",noShareUrl:"Pas d'URL à partager!",noTransactionId:"Pas d'identifiant de transaction"},text:{brandName:"Blockcerts",blockcertsHint:"Visiter le site de Blockcerts",by:"par",certified:"Certifié par",closeButton:"Cliquer pour fermer",downloadLink:"Télécharger le certificat au format JSON",dragAndDropHint:"(vous pouvez aussi glisser et déposer votre fichier).",fileUpload:"Choisir un fichier JSON",issued:"Émis le",issueDate:"Date d'émission",issuerName:"Émetteur",issuerPublicKey:"Clé publique de l'émetteur",item:"point contrôlé",itemPlural:"points contrôlés",metadataButton:"Voir les métadata",metadataTitle:"Métadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titulaire",share:"Partager sur",shareButton:"Partager sur les réseaux sociaux",signed:"Signé par",substepsListClose:"Fermer",substepsListHint:"Afficher les sous-étapes",transactionId:"Identifiant de transaction",urlInput:"Entrez l'URL du certificat",urlInputPlaceholder:"URL du certificat",verificationStepProgress:"Vérification en cours...",verify:"Vérifier",verifyAgain:"Vérifier de nouveau",verifyOther:"Vérifier un autre certificat",viewRecord:"Voir le certificat"},date:{months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Aout","Sept","Oct","Nov","Déc"],pattern:"DD MM YYYY"}},it:{errors:{errorLabel:"Errore",invalidBlockcerts:"Non è una definizione valida di Blockcerts.",invalidBlockcertsUrl:"Non è un URL di certificato valido.",invalidFormatDragAndDrop:"Sono accettati solo file JSON",invalidUrl:"Questo non sembra essere un URL valido.",noDownloadLink:"Link per il download non fornito!",noMetadata:"Nessun Metadata specificato per questo record",noShareUrl:"Non c'è un URL da condividere!",noTransactionId:"Nessun ID transazione"},text:{brandName:"Blockcerts",blockcertsHint:"Visita il sito Web Blockcerts",by:"da",certified:"Certificato da",closeButton:"Fai clic per chiudere",downloadLink:"Scarica il Record in formato JSON",dragAndDropHint:"(puoi anche trascinare il file).",fileUpload:"Scegli il file JSON",issued:"Rilasciato il",issueDate:"Data",issuerName:"Organizzazione Issuer",issuerPublicKey:"Chiave pubblica del Issuer",item:"Elemento",itemPlural:"Elementi",metadataButton:"Visualizza Metadata",metadataTitle:"Metadata",motto:"Blockcerts, The Open Standard for Blockchain Credentials",recipient:"Titolare",share:"Condividi",shareButton:"Condividi sui Social Network",signed:"Firmato da",substepsListClose:"Nascondi",substepsListHint:"Mostra gli step secondari",transactionId:"ID transazione",urlInput:"Inserisci l'URL del certificato",urlInputPlaceholder:"URL del certificato",verificationStepProgress:"Step di verifica...",verify:"Verifica",verifyAgain:"Verifica di nuovo",verifyOther:"Verifica un altro record",viewRecord:"Visualizza il Record"},date:{months:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],pattern:"DD MM YYYY"}}};function uee(){return see}function cee(e,t,r,n){if(!e)return"";if(e.includes(".")){const r=e.split(".");e=r[0],t=r[1]}if(!t)return"";r&&n>1&&(t+="Plural");const i=uee();return i[oee.locale]?i[oee.locale][e]?i[oee.locale][e][t]?i[oee.locale][e][t]||"":"[missing locale item data]":"[missing locale group data]":"[missing locale data]"}function lee(e){var t=cee("date","pattern"),r=new Date(e),n=function(e,t){var r=cee("date","months");return e.replace("MM",r[t])}(t,r.getMonth());return n=function(e,t){return e.replace("DD",t)}(n,r.getDate()),n=function(e,t){return e.replace("YYYY",t)}(n,r.getFullYear()),n}function fee(e){return e.certificateDefinition}function dee(e){const t=fee(e);return t?t.issuedOn:""}function hee(e){return fee(e)?lee(dee(e)):""}function pee(e){const t=fee(e);return t?t.recipientFullName:""}function vee(e){const t=fee(e);return t?t.name:""}function bee(e){const t=fee(e);return t?t.issuer.name:""}function gee(e){const t=fee(e);return t?t.issuer.image:""}function mee(e){const t=fee(e);if(!t)return"";const{displayHtml:r,display:n}=t.certificateJson;if(r)return iee(r);if(n)switch(n.contentMediaType){case"text/html":return iee(n.content);case"image/png":case"image/jpeg":case"image/gif":case"image/bmp":return`<img src="data:${n.contentMediaType};${n.contentEncoding},${n.content}"/>`;case"application/pdf":return`<embed width="100%" height="100%" type="application/pdf" src="data:${n.contentMediaType};${n.contentEncoding},${n.content}"/>`;default:return""}return""}function yee(e){const t=fee(e);return t&&YB(t.recordLink)?t.recordLink:""}function wee(e){const t=yee(e);return t?W9.certificates.download(t):""}function _ee(e){const t=fee(e);if(t)try{return JSON.parse(t.metadataJson)}catch(e){return null}return null}function xee(e){const t=fee(e);return t?t.transactionLink:""}function kee(e){const t=fee(e);return t?t.transactionId:""}function See(e){const t=fee(e);if(t){const{chain:e}=t;return e.name}return""}function Eee(e){const t=See(e);return"Mocknet"===t||t.includes("Testnet")}function Iee(e){return e.verifiedSteps||[]}function Aee(e,t){return Iee(e).find((e=>e.code===t))}function Pee(e){return Iee(e).some((e=>e.status===XB.FAILURE))}function Tee(e){const t=fee(e);return t?t.certificateImage:""}function Oee(e){const t=fee(e);return t?t.subtitle:""}function Cee(e){const t=fee(e);return t?t.description:""}function Mee(e){const t=fee(e);return t?t.signatureImage:""}function Ree(e){const t=fee(e);return t?t.sealImage:""}function Nee(e){return e.finalStep}function Lee(e){const t=fee(e);return t?t.publicKey:""}function jee(e,r){switch(r.type){case Tt:return function(e,r){var n=r.payload.resetSteps;return t(t({},e),{},{verifiedSteps:n})}(e,r);case St:return function(e,r){return t(t({},e),r.payload.options)}(e,r);case Et:return function(e,r){return t(t(t({},e),r.payload),r.payload.certificateDefinition&&{verifiedSteps:W9.certificates.initializeVerificationSteps(r.payload.certificateDefinition)})}(e,r);case It:return function(e,r){return t(t({},e),{},{certificateDefinition:r.payload.definition})}(e,r);case At:return function(e,r){return t(t({},e),{},{input:t(t({},e.input),{},{certificateUrl:r.payload.url})})}(e,r);case Ct:return function(e,t){var r=t.payload,n=r.parentStepCode,i=r.status;return Aee(e,n).status=i,e}(e,r);case Pt:return function(e,r){return t(t({},e),{},{input:t(t({},e.input),{},{isValid:r.payload.isValid})})}(e,r);case Nt:return function(e,r){var n=r.payload.errorMessage;return t(t({},e),{},{errorMessage:n})}(e,r);case Lt:return function(e,r){return t(t({},e),{},{showVerificationModal:r.payload.showVerificationModal})}(e,r);case Ot:return function(e,t){var r,n,i,a=Aee(e,t.payload.parentStep);return r=a,n=t.payload,i=r.subSteps.findIndex((function(e){return e.code===n.code})),r.subSteps[i]=n,e}(e,r);case Mt:return function(e,r){return t(t({},e),{},{verificationStatus:r.payload.status})}(e,r);case Rt:return function(e,r){return t(t({},e),{},{finalStep:r.payload.finalStep})}(e,r);default:return e}}var Dee,Bee="card",Uee="full",Fee="bright",zee="dark";function Hee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t({input:{},verifiedSteps:[],finalStep:null,verificationStatus:XB.DEFAULT,showVerificationModal:!1,displayMode:Bee,theme:Fee},e)}var qee=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hee(),t=[at];return et(jee,e,nt.apply(void 0,t))}();function Vee(e,n){var i=n.mapDispatchToProps,o=void 0===i?{}:i,u=n.mapStateToProps,f=void 0===u?function(){}:u,d=n.ownProps,h=void 0===d?{}:d;return function(n){c(u,n);var i=m(u);function u(){return a(this,u),i.apply(this,arguments)}return s(u,[{key:"mapDispatchToProps",value:function(){return function(e,t){if("function"==typeof e)return tt(e,t);if("object"!==r(e)||null===e)throw new Error($e(16));var n={};for(var i in e){var a=e[i];"function"==typeof a&&(n[i]=tt(a,t))}return n}(o,qee.dispatch)}},{key:"mapStateToProps",value:function(){return f(qee.getState())}},{key:"_render",value:function(r){var n=t(t(t({},this.mapDispatchToProps()),this.mapStateToProps()),r);return Fe(Dee||(Dee=w(["",""])),e(n))}},{key:"_stateChanged",value:function(e){this._requestRender()}}],[{key:"properties",get:function(){return h}}]),u}(function(e){return function(t){return function(t){c(n,t);var r=m(n);function n(){return a(this,n),r.apply(this,arguments)}return s(n,[{key:"connectedCallback",value:function(){var t=this;this.__storeUnsubscribe=e.subscribe((function(){return t._stateChanged(e.getState())})),this._stateChanged(e.getState()),y(l(n.prototype),"connectedCallback",this)&&y(l(n.prototype),"connectedCallback",this).call(this)}},{key:"disconnectedCallback",value:function(){this.__storeUnsubscribe(),y(l(n.prototype),"disconnectedCallback",this)&&y(l(n.prototype),"disconnectedCallback",this).call(this)}},{key:"_stateChanged",value:function(e){throw new Error("_stateChanged() not implemented")}}]),n}(t)}}(qee)(Ke))}function Kee(e){return{type:Nt,payload:{errorMessage:e}}}function Wee(e){return function(t){t({type:Pt,payload:{isValid:e}}),t(Kee(e?null:"errors.invalidUrl"))}}function Jee(e){return function(t,r){if(null!=e){var n=Aee(r(),e),i=n.status;i===XB.DEFAULT&&function(e){return e.subSteps.some((function(e){return e.status===XB.SUCCESS}))}(n)&&(i=XB.STARTED),i!==XB.DEFAULT&&function(e){return e.subSteps.every((function(e){return e.status===XB.SUCCESS}))}(n)&&(i=XB.SUCCESS),function(e){return e.subSteps.some((function(e){return e.status===XB.FAILURE}))}(n)&&(i=XB.FAILURE),t({type:Ct,payload:{parentStepCode:e,status:i}})}}}var Gee=new(function(){function e(){a(this,e),this.queue=[],this.dispatchCb=null,this.isExecuting=!1,this.intervalId=null,this.dispatchNext=this.dispatchNext.bind(this)}return s(e,[{key:"registerCb",value:function(e){this.dispatchCb=e}},{key:"push",value:function(e){this.queue.push(e)}},{key:"dispatchNext",value:function(){var e=this.queue.shift();e?this.dispatchCb(e):this.intervalId&&(this.isExecuting=!1,clearInterval(this.intervalId))}},{key:"execute",value:function(){!this.isExecuting&&this.queue.length&&(this.isExecuting=!0,this.intervalId=setInterval(this.dispatchNext,200))}}]),e}());function $ee(e){return function(r,n){var i=n().verifiedSteps.find((function(t){return t.subSteps.some((function(t){return t.code===e.code}))})).code,a=t(t(t({},e),e.errorMessage&&{errorMessage:e.errorMessage}),{},{parentStep:i}),o=function(e){return function(t){e({type:Ot,payload:t}),e(Jee(t.parentStep))}}(r);Gee.dispatchCb||Gee.registerCb(o),Gee.push(a),Gee.execute()}}function Xee(){return function(e,t){var r=fee(t()),n=[];r&&(n=W9.certificates.initializeVerificationSteps(r)),e({type:Tt,payload:{resetSteps:n}})}}function Yee(e){return{type:Mt,payload:{status:e}}}function Qee(e){return e.disableVerify}function Zee(e){return e.allowDownload}function ete(e){return e.allowSocialShare}function tte(e){return e.showMetadata}function rte(e){return e.displayMode}function nte(e){return e.theme}function ite(e){return e.locale}function ate(e){return e.explorerAPIs}function ote(e){return e.clickableUrls}function ste(e){return e.didResolverUrl}function ute(e){return"string"==typeof e&&(e={label:e}),{type:Rt,payload:{finalStep:e}}}function cte(){return function(){var e=i(Jt.mark((function e(t,r){var n,i,a;return Jt.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Qee(n=r())){e.next=4;break}return console.warn("Verification is disabled"),e.abrupt("return");case 4:if(t({type:"VERIFY_CERTIFICATE"}),t(Yee(XB.STARTED)),t(Xee()),!(i=fee(n))){e.next=15;break}return W9.events.dispatch("certificate-verify",i),e.next=12,i.verify((function(e){t($ee(e))}));case 12:a=e.sent,t(ute(a.message)),t(Yee(a.status));case 15:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}function lte(e){return{type:Lt,payload:{showVerificationModal:e}}}function fte(e){return function(t,r){return aU(this,void 0,void 0,(function*(){const n=r(),i={locale:ite(n),explorerAPIs:ate(n),didResolverUrl:ste(n)},{certificateDefinition:a,errorMessage:o}=yield W9.certificates.parse(e,i);t(Kee(o)),t({type:Et,payload:{certificateDefinition:a}}),W9.events.dispatch("certificate-load",a),null!=a&&(yield t((function(e,t){return aU(this,void 0,void 0,(function*(){(function(e){return e.disableAutoVerify})(t())||(e({type:kt}),e(lte(!0))),yield e(cte())}))})))}))}}function dte(e){return function(){var t=i(Jt.mark((function t(r){var n,i;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=W9.certificates.isPathToCertificateValidURI(e),r(Wee(n)),n){t.next=4;break}return t.abrupt("return",null);case 4:return r({type:At,payload:{url:e}}),t.next=7,W9.certificates.retrieve(e);case 7:if(!(i=t.sent).certificateDefinition){t.next=13;break}return t.next=11,r(fte(i.certificateDefinition));case 11:t.next=14;break;case 13:r(Kee(i.errorMessage));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}var hte=/(-\w)/g,pte=function(e){return e[1].toUpperCase()};var vte,bte={src:String,"disable-auto-verify":Boolean,"disable-verify":Boolean,"allow-download":Boolean,"allow-social-share":Boolean,"display-mode":String,"show-metadata":Boolean,"clickable-urls":Boolean,theme:0,locale:String,explorerAPIs:{},"did-resolver-url":String},gte=Object.keys(bte).map((function(e){return e.replace(hte,pte)})).reduce((function(e,t){return e[t]=bte[t],e}),{});function mte(e){var t,r=Object.keys(see).map((function(e){return e.toLowerCase()}));if(!(t=r.indexOf(e.toLowerCase())>-1)){var n=e.substr(0,2).toLowerCase(),i=r.map((function(e){return e.split("-")[0]})).indexOf(n);(t=i>-1)&&(e=r[i])}return t||(e=aee),function(e){var t=e.split("-");return t.length>1?"".concat(t[0].toLowerCase(),"-").concat(t[1].toUpperCase()):t[0].toLowerCase()}(e)}function yte(e){"auto"!==e&&e||(e=navigator.language||navigator.userLanguage||navigator.browserLanguage||aee),oee.locale=mte(e)}var wte,_te=Fe(vte||(vte=w(["<style>.buv-c-input{font-size:15px;color:#031532;border-radius:2px 0 0 2px;padding:12px 15px;background-color:#f3f4f5;border:solid 1px rgba(3,21,50,0.13);box-sizing:border-box;width:100%}.buv-c-input.is-invalid{border:2px solid #f00}.buv-c-input::-moz-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-c-input::-webkit-input-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-c-input:-moz-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-c-input:-ms-input-placeholder{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:rgba(3,21,50,0.3);letter-spacing:-.25px}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"])));function xte(e){return void 0===e.input.isValid||e.input.isValid}var kte,Ste=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onInput,r=void 0===t?function(){}:t,n=e.isValid,i=void 0===n||n,a="buv-c-input ".concat(i?"":"is-invalid");return Fe(wte||(wte=w(["\n ","\n <label \n for='certificate-json-url'\n class='buv-u-visually-hidden'>","</label>\n <input \n type='text'\n id='certificate-json-url'\n placeholder='","'\n class$='","'\n on-input='","'\n />\n "])),_te,cee("text.urlInput"),cee("text.urlInputPlaceholder"),a,(function(e){r(e.target.value)}))}),{mapDispatchToProps:{onInput:dte},mapStateToProps:function(e){return{isValid:xte(e)}}});window.customElements.define("buv-input",Ste);var Ete,Ite=Fe(kte||(kte=w(["<style>.buv-c-verify-button{background-color:#2ab27b;border-radius:0 2px 2px 0;color:#fff;cursor:pointer;display:block;font-size:15px;font-weight:400;padding:12px 38px;border:1px solid #2ab27b;width:100%}.buv-c-verify-button__label{cursor:pointer}.buv-c-verify-button--hollow{background:#fff;color:#2ab27b;font-weight:100;text-transform:uppercase;padding:12px 30px;font-size:13px}.buv-c-verify-button--link{background:none;color:#031532;border:0;text-decoration:underline;padding:0;margin-top:5px;font-size:13px}.buv-c-verify-button.is-disabled{pointer-events:none}\n</style>"])));var Ate,Pte={onClick:function(){return function(e,t){e({type:"START_VERFICATION_PROCESS"}),e(lte(!0)),e(cte())}}},Tte=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isHollow,r=void 0!==t&&t,n=e.isDisabled,i=void 0!==n&&n,a=e.onClick,o=void 0===a?function(){}:a,s=e.type,u=void 0===s?"":s,c=["buv-c-verify-button",r?"buv-c-verify-button--hollow":"",i?"is-disabled":"","link"===u?"buv-c-verify-button--link":""].join(" ");return Fe(Ete||(Ete=w(["\n ","\n <button class$='","' on-click='","' disabled?='","'>\n <label class='buv-c-verify-button__label'><slot>","</slot></label>\n </button>\n "])),Ite,c,o,i,cee("text.verify"))}),{mapDispatchToProps:Pte,mapStateToProps:function(e){return{isDisabled:Qee(e)||!fee(e)}},ownProps:{isHollow:Boolean,type:String}});window.customElements.define("buv-verify-button",Tte);var Ote,Cte,Mte=Fe(Ate||(Ate=w(["<style>.buv-c-certificate-input{display:flex;width:100%;padding:40px 30px;background-color:rgba(255,255,255,0.1);border:1px solid rgba(0,0,0,0.1);box-sizing:border-box}@media only screen and (max-width: 600px){.buv-c-certificate-input{flex-direction:column;grid-row-gap:10px;height:162px;padding:30px;justify-content:space-between}}.buv-c-certificate-input__input{width:100%}\n</style>"]))),Rte=Vee((function(e){var t=e.showInput;return void 0===t||t?Fe(Ote||(Ote=w(["\n ",'\n <section class="buv-c-certificate-input buv-qa-certificate-input">\n <buv-input class="buv-c-certificate-input__input"></buv-input><buv-verify-button></buv-verify-button> \n </section>\n'])),Mte):null}),{mapStateToProps:function(e){return{showInput:!fee(e)}}});window.customElements.define("buv-certificate-input",Rte);var Nte,Lte=Fe(Cte||(Cte=w(['<style>.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:transparent}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-c-download-link{text-decoration:none;color:currentColor}.buv-c-download-link--icon{background-image:url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20id%3D%22Capa%5f1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20width%3D%22433.5px%22%20height%3D%22433.5px%22%20fill%3D%22%236e7e8e%22%20viewBox%3D%220%200%20433.5%20433.5%22%20style%3D%22enable-background%3Anew%200%200%20433.5%20433.5%3B%22%20xml%3Aspace%3D%22preserve%22%0A%09%3E%3Cg%3E%3Cg%20id%3D%22file-download%22%3E%3Cpath%20d%3D%22M395.25%2C153h-102V0h-153v153h-102l178.5%2C178.5L395.25%2C153z%20M38.25%2C382.5v51h357v-51H38.25z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");width:17px;height:17px;background-size:17px}.buv-c-download-link.is-disabled{pointer-events:none}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>'])));var jte=Vee((function(e){var t=e.downloadLink,r=e.display,n="plaintext"===(void 0===r?"":r),i=cee(t?"text.downloadLink":"errors.noDownloadLink"),a=["buv-c-download-link","buv-o-button-link",t?"":"is-disabled",n?"":"buv-c-download-link--icon"].join(" ");return Fe(Nte||(Nte=w(["\n ","\n <a class$='","' href='","' title$='","' aria-disabled?='","'>\n <span class$='","'>","</span>\n </a>"])),Lte,a,t,i,!t,n?"buv-o-button-link__label":"buv-u-visually-hidden",i)}),{mapStateToProps:function(e){return{downloadLink:wee(e)}},ownProps:{display:String}});window.customElements.define("buv-download-link",jte);var Dte;var Bte,Ute,Fte,zte,Hte,qte,Vte,Kte,Wte=Fe(Dte||(Dte=w(['<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:transparent}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-o-overlay{z-index:100;box-shadow:0 0 30px rgba(0,0,0,0.25);background-color:#fff}.buv-c-metadata-container{box-sizing:border-box;padding:47px;height:100%;width:400px;position:fixed;top:0;right:-400px;display:flex;flex-direction:column}.buv-c-metadata-container__close-button{top:52px;right:47px}.buv-c-metadata-container__title{border-bottom:solid 1px #e8e9eb;padding-bottom:38px;font-weight:300;margin:0 0 38px}.buv-c-metadata-link{padding:0}.buv-c-metadata-link--icon{background-image:url("data:image/svg+xml,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%0A%09%20width%3D%22512px%22%20fill%3D%22%236e7e8e%22%20height%3D%22512px%22%20viewBox%3D%220%200%20512%20512%22%20enable-background%3D%22new%200%200%20512%20512%22%20xml%3Aspace%3D%22preserve%22%3E%0A%0A%3Cpath%20id%3D%22info-2-icon%22%20d%3D%22M255.998%2C90.001c91.74%2C0%2C166.002%2C74.241%2C166.002%2C165.998c0%2C91.741-74.245%2C166-166.002%2C166%0A%0A%09c-91.74%2C0-165.998-74.243-165.998-166C90%2C164.259%2C164.243%2C90.001%2C255.998%2C90.001%20M255.998%2C50.001%0A%0A%09C142.229%2C50.001%2C50%2C142.229%2C50%2C255.999c0%2C113.771%2C92.229%2C206%2C205.998%2C206c113.771%2C0%2C206.002-92.229%2C206.002-206%0A%0A%09C462%2C142.229%2C369.77%2C50.001%2C255.998%2C50.001L255.998%2C50.001z%20M285.822%2C367.567h-57.646V230.6h57.646V367.567z%20M257%2C202.268%0A%09c-17.522%2C0-31.729-14.206-31.729-31.73c0-17.522%2C14.206-31.729%2C31.729-31.729c17.524%2C0%2C31.728%2C14.206%2C31.728%2C31.729%0A%09C288.728%2C188.062%2C274.524%2C202.268%2C257%2C202.268z%22%2F%3E%3C%2Fsvg%3E");width:22px;height:22px;background-size:22px}.buv-c-metadata-list{margin:0;overflow:auto;flex:1}.buv-c-metadata-list__title{color:#999;line-height:15px}.buv-c-metadata-list__detail{margin:0 0 20px}.buv-c-metadata-list__detail-text{white-space:pre-wrap;word-wrap:break-word;font:inherit;margin:0}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}.buv-u-slide-from-right{opacity:0;-webkit-transition:right ease .5s, opacity .2s;-moz-transition:right ease .5s, opacity .2s;-ms-transition:right ease .5s, opacity .2s;-o-transition:right ease .5s, opacity .2s;transition:right ease .5s, opacity .2s}.buv-u-slide-from-right.is-active{right:0;opacity:1}\n</style>']))),Jte=Fe(Bte||(Bte=w(["<style>.buv-c-close-button{display:inline-block;overflow:hidden;cursor:pointer;border:0;width:20px;height:20px;position:absolute;background-color:transparent}.buv-c-close-button::before,.buv-c-close-button::after{content:'';position:absolute;height:2px;width:100%;top:50%;left:0;margin-top:-1px;background:#000}.buv-c-close-button::before{transform:rotate(45deg)}.buv-c-close-button::after{transform:rotate(-45deg)}.buv-c-close-button--big{transform:scale(3)}.buv-c-close-button--hairline::before,.buv-c-close-button--hairline::after{height:1px}.buv-c-close-button--thick::before,.buv-c-close-button--thick::after{height:4px;margin-top:-2px}.buv-c-close-button--black::before,.buv-c-close-button--black::after{height:8px;margin-top:-4px}.buv-c-close-button--heavy::before,.buv-c-close-button--heavy::after{height:12px;margin-top:-6px}.buv-c-close-button--pointy::before,.buv-c-close-button--pointy::after{width:200%;left:-50%}.buv-c-close-button--rounded::before,.buv-c-close-button--rounded::after{border-radius:5px}.buv-c-close-button--blades::before,.buv-c-close-button--blades::after{border-radius:5px 0}.buv-c-close-button--warp::before,.buv-c-close-button--warp::after{border-radius:120% 0}.buv-c-close-button--fat::before,.buv-c-close-button--fat::after{border-radius:100%}.buv-c-close-button--position{position:relative}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),Gte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClick,r=void 0===t?function(){}:t,n=e.className,i=void 0===n?"":n,a="buv-c-close-button buv-c-close-button--hairline ".concat(i||"buv-c-close-button--position"," ");return Fe(Ute||(Ute=w(["\n ","\n <button onclick='","' class$='","'>\n <label class='buv-u-visually-hidden'>","</label>\n </button>\n "])),Jte,r,a,cee("text.closeButton"))};var $te=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.toggleOpen=e.toggleOpen.bind(b(e)),e}return s(r,[{key:"toggleOpen",value:function(){this.isOpen=!this.isOpen}},{key:"_render",value:function(e){var t=e.metadataList,r=e.display,n=["buv-o-overlay","buv-c-metadata-container","buv-u-slide-from-right",this.isOpen?"is-active":""].join(" "),i="";if(t){var a=function(e){return e.schema.properties.certificate.properties}(t);i=t.displayOrder.map((function(e){var r=e.split(".")[1],n=function(e,t){var r=t.split(".");return function e(t,r,n){var i=n.indexOf(r)+1,a=n[i];return a?Object.prototype.hasOwnProperty.call(t[r],a)?e(t[r],a,n):void 0:t[r]}(e,r[0],r)}(t,e);return function(e,t){var r=e.title,n=e.format,i=e.type;Array.isArray(i)&&(i=i[0]);var a=Fe(Fte||(Fte=w(["<dt class='buv-c-metadata-list__title'>","</dt>"])),r),o=!1,s="",u=t;if("string"===i)switch(n){case"uri":o=!0,s=t;break;case"email":s="mailto:".concat(t);break;case"phoneNumber":s="tel:".concat(t)}s&&(u=Fe(zte||(zte=w(['<a href="','" target="','" >',"</a>"])),s,o?"_blank":"",t));var c=Fe(Hte||(Hte=w(["<dd class='buv-c-metadata-list__detail'>\n <pre class='buv-c-metadata-list__detail-text'>","</pre></dd>"])),u);return Fe(qte||(qte=w(["","",""])),a,c)}(a[r],n)}))}var o="plaintext"===r,s=cee(t?"text.metadataButton":"errors.noMetadata"),u=["buv-c-metadata-link","buv-o-button-link",o?"":"buv-c-metadata-link--icon"].join(" ");return Fe(Vte||(Vte=w(["\n ","\n <button onclick='","' \n class$='","' \n disabled?='","' \n aria-disabled?='","'\n title$=",">\n <label class$='","'>","</label>\n </button>\n <section class$='","'>\n <h1 class='buv-c-metadata-container__title'>","</h1>\n ","\n <dl class='buv-c-metadata-list buv-o-text-12'>","</dl>\n </section>\n "])),Wte,this.toggleOpen,u,!t,!t,s,o?"buv-o-button-link__label":"buv-u-visually-hidden",s,n,cee("text.metadataTitle"),Gte({onClick:this.toggleOpen,className:"buv-c-metadata-container__close-button"}),i)}}],[{key:"properties",get:function(){return{isOpen:Boolean,metadataList:Object,display:String}}}]),r}(Ke);window.customElements.define("buv-metadata-raw",$te);var Xte,Yte=Vee((function(e){return Fe(Kte||(Kte=w(["\n <buv-metadata-raw\n metadataList='","'\n display='","'\n ></buv-metadata-raw>"])),e.metadataList,e.display)}),{mapStateToProps:function(e){return{metadataList:_ee(e)}},ownProps:{display:String}});window.customElements.define("buv-metadata",Yte);var Qte,Zte,ere,tre,rre,nre,ire=Fe(Xte||(Xte=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-button-link{display:block;cursor:pointer;border:0;background-color:transparent}.buv-o-button-link__label{display:block;font-size:13px;cursor:pointer}.buv-o-button-link.is-disabled,.buv-o-button-link:disabled{cursor:help;opacity:.6}.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-overlay{z-index:100;box-shadow:0 0 30px rgba(0,0,0,0.25);background-color:#fff}.buv-c-social-share-link{width:17px;height:17px;background-size:17px;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Capa_1' x='0px' y='0px' viewBox='0 0 473.932 473.932' style='enable-background:new 0 0 473.932 473.932;' xml:space='preserve' width='24px' height='24px'%3E%3Cg%3E%3Cg%3E%3Cpath d='M385.513,301.214c-27.438,0-51.64,13.072-67.452,33.09l-146.66-75.002 c1.92-7.161,3.3-14.56,3.3-22.347c0-8.477-1.639-16.458-3.926-24.224l146.013-74.656c15.725,20.924,40.553,34.6,68.746,34.6 c47.758,0,86.391-38.633,86.391-86.348C471.926,38.655,433.292,0,385.535,0c-47.65,0-86.326,38.655-86.326,86.326 c0,7.809,1.381,15.229,3.322,22.412L155.892,183.74c-15.833-20.039-40.079-33.154-67.56-33.154 c-47.715,0-86.326,38.676-86.326,86.369s38.612,86.348,86.326,86.348c28.236,0,53.043-13.719,68.832-34.664l145.948,74.656 c-2.287,7.744-3.947,15.79-3.947,24.289c0,47.693,38.676,86.348,86.326,86.348c47.758,0,86.391-38.655,86.391-86.348 C471.904,339.848,433.271,301.214,385.513,301.214z' fill='%236e7e8e'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E%0A\")}.buv-c-social-share-modal{position:absolute;padding:38px 34px 34px;width:120px}.buv-c-social-share-modal__close-button{top:10px;right:10px}.buv-c-social-share-modal__list{list-style-type:none;margin:0;padding:0}.buv-c-social-share-modal__list-item{margin-bottom:24px}.buv-c-social-share-modal__list-item--plaintext{margin-bottom:5px;font-size:13px}.buv-c-social-share-modal__list-item:last-child{margin-bottom:0}.buv-c-social-share-modal__link{text-decoration:none}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),are=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.toggleOpen=e.toggleOpen.bind(b(e)),e}return s(r,[{key:"toggleOpen",value:function(){this.isOpen=!this.isOpen}},{key:"sharingTemplate",value:function(e){var t=e.url,r=e.onShare,n=e.display;if(this.isOpen&&t){var i="plaintext"===n,a=[{name:"LinkedIn",shareUrl:"https://www.linkedin.com/shareArticle?url=".concat(t,"&mini=true")},{name:"Facebook",shareUrl:"https://www.facebook.com/sharer/sharer.php?u=".concat(t)},{name:"Twitter",shareUrl:"https://twitter.com/intent/tweet?url=".concat(t)}].map((function(e){return Fe(Qte||(Qte=w(["<li class$='buv-c-social-share-modal__list-item ","'>\n <a\n href='","'\n title='Share on ","'\n class='buv-o-link buv-c-social-share-modal__link'\n target='_blank'\n onclick='","'\n >\n <span>"," ","</span>\n </a>\n </li>"])),i?"buv-c-social-share-modal__list-item--plaintext":"",e.shareUrl,e.name,(function(){r(e.name)}),cee("text.share"),e.name)})),o=Fe(Zte||(Zte=w(["<ul class='buv-c-social-share-modal__list'>\n ","\n </ul>"])),a);return i?o:Fe(ere||(ere=w(["<div class='buv-c-social-share-modal buv-o-text-12 buv-o-overlay'>\n ","\n ","\n </div>"])),Gte({onClick:this.toggleOpen,className:"buv-c-social-share-modal__close-button"}),o)}}},{key:"sharingButton",value:function(e){var t=e.url;if("plaintext"!==e.display){var r=!!t,n=cee(r?"text.shareButton":"text.noShareUrl");return Fe(tre||(tre=w(["<button \n onclick='","'\n class='buv-c-social-share-link buv-o-button-link'\n disabled?='","'\n aria-disabled?='","'\n title$='","'\n >\n <label class='buv-u-visually-hidden'>","</label>\n </button>"])),this.toggleOpen,!r,!r,n,n)}this.isOpen=!0}},{key:"_render",value:function(e){return Fe(rre||(rre=w(["\n ","\n ","\n ","\n "])),ire,this.sharingButton(e),this.sharingTemplate(e))}}],[{key:"properties",get:function(){return{url:String,isOpen:String,onShare:Function,display:String}}}]),r}(Ke);window.customElements.define("buv-social-share-raw",are);var ore,sre={onShare:function(e){return function(t,r){var n=fee(r());W9.events.dispatch("certificate-share",n,{socialNetwork:e}),t({type:"SHARE_SOCIAL_NETWORK"})}}},ure=Vee((function(e){return Fe(nre||(nre=w(["\n <buv-social-share-raw\n url='","'\n onShare='","'\n display='","'\n ></buv-social-share-raw>"])),e.url,e.onShare,e.display)}),{mapDispatchToProps:sre,mapStateToProps:function(e){return{url:yee(e)}},ownProps:{display:String}});window.customElements.define("buv-social-share",ure);var cre,lre,fre,dre,hre,pre=Fe(ore||(ore=w(["<style>.buv-c-action-menu{display:flex;align-items:center;padding:0}.buv-c-action-menu-item{flex-basis:30px}\n</style>"]))),vre=Vee((function(e){var t=e.allowDownload,r=e.allowSocialShare,n=e.showMetadata,i=e.isVisible;return t||r||n||(i=!1),i?Fe(cre||(cre=w(["\n ","\n <menu class='buv-c-action-menu'>\n ","\n ","\n ","\n </menu>\n "])),pre,n?Fe(lre||(lre=w(["<menuitem class='buv-c-action-menu-item'><buv-metadata></buv-metadata></menuitem>"]))):"",t?Fe(fre||(fre=w(["<menuitem class='buv-c-action-menu-item'><buv-download-link></buv-download-link></menuitem>"]))):"",r?Fe(dre||(dre=w(["<menuitem class='buv-c-action-menu-item'><buv-social-share></buv-social-share></menuitem>"]))):""):null}),{mapStateToProps:function(e){return{allowDownload:Zee(e),allowSocialShare:ete(e),showMetadata:tte(e),isVisible:rte(e)===Uee&&!!fee(e)}}});window.customElements.define("buv-action-menu",vre);var bre,gre,mre,yre=Fe(hre||(hre=w(["<style>.buv-c-verification-modal__process{display:flex;justify-content:space-around}.buv-c-verification-modal__separator{margin-bottom:30px;background-color:rgba(3,21,50,0.05);height:1px;border:0 none}.buv-c-verification-modal__content{max-height:100vh;padding-bottom:43px;box-sizing:border-box;overflow:auto}@media only screen and (max-width: 600px){.buv-c-verification-modal__content{max-height:calc(100vh - 120px)}}\n</style>"]))),wre=Fe(bre||(bre=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),_re=!1,xre=!1;function kre(e){return function(){var t=i(Jt.mark((function t(r){var n;return Jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r({type:"UPLOAD_CERTIFICATE_DEFINITION"}),t.next=3,W9.certificates.read(e);case 3:n=t.sent,r(fte(JSON.parse(n)));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}var Sre,Ere=Vee((function(e){var t=e.onChange,r=void 0===t?function(){}:t,n=e.hideFileUpload;return void 0!==n&&n?null:Fe(gre||(gre=w(["\n ","\n <label for='buv-json-file-upload' class='buv-o-link buv-o-text-12'>\n <span class='buv-o-link__text--underline'>","</span>\n <input\n type='file'\n accept='application/json'\n id='buv-json-file-upload'\n class='buv-u-visually-hidden'\n onchange='","'\n />\n </label>\n ",""])),wre,cee("text.fileUpload"),(function(e){r(e.target.files[0])}),(_re?xre:(_re=!0,!("ontouchstart"in document.createElement("div"))&&(xre=!0)))?Fe(mre||(mre=w(['<span class="buv-o-text-12 qa-drag-and-drop-hint">',"</span>"])),cee("text.dragAndDropHint")):"")}),{mapDispatchToProps:{onChange:kre},mapStateToProps:function(e){return{hideFileUpload:fee(e)}}});function Ire(){return function(e){e(Xee()),e((function(e){e({type:"RESET_VERIFICATION_STATUS"}),e(Yee(XB.DEFAULT)),e(ute(null))})),e({type:It,payload:{definition:null}})}}window.customElements.define("buv-file-upload",Ere);var Are,Pre=Fe(Sre||(Sre=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-verify-other-certificate{display:block}\n</style>"])));var Tre,Ore=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClick,r=void 0===t?function(){}:t,n=e.isVisible,i=void 0!==n&&n;return i?Fe(Are||(Are=w(["\n ","\n <a onclick='","' class='buv-o-text-12 buv-o-link buv-c-verify-other-certificate buv-qa-verify-other-certificate'>\n <span class='buv-o-link__text--underline'>","</span>\n </a>\n "])),Pre,r,cee("text.verifyOther")):null}),{mapDispatchToProps:{onClick:Ire},mapStateToProps:function(e){return{isVisible:!!fee(e)}}});window.customElements.define("buv-verify-other-certificate",Ore);var Cre,Mre,Rre,Nre,Lre=Fe(Tre||(Tre=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-footer{width:100%;height:60px;background-color:rgba(0,0,0,0.1);color:#031532;fill:#111;display:flex;justify-content:space-between;align-items:center;padding:0 30px;box-sizing:border-box}.buv-c-footer a{line-height:1}.buv-c-footer--dark{color:#fff;fill:#fff}.buv-c-footer--forced{position:absolute;bottom:0;left:0;margin-top:0;justify-content:flex-end}\n</style>"]))),jre=Fe(Cre||(Cre=w(["<style>.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}.buv-c-logo{color:currentColor;text-decoration:none}.buv-c-logo--small{width:113px;height:16px}.buv-c-logo--medium{width:66%}.buv-c-logo__motto{font-size:12px}\n</style>"])));function Dre(){return Fe(Mre||(Mre=w(['\n <svg class=\'buv-qa-logo--simple buv-c-logo--small\' viewBox="0 0 113 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <defs></defs>\n <g id="Page-1" stroke="none" stroke-width="1" fill-rule="evenodd" fill-opacity="0.37">\n <g id="blockcerts-logo" transform="translate(0.000000, -2.000000)" fill-rule="nonzero" fill="inherit">\n <path d="M19.5,5.06256945 L22.9958467,5.06256945 C24.617584,5.06256945 25.789567,5.29884552 26.5118308,5.77140473 C27.2340946,6.24396395 27.5952211,6.99038151 27.5952211,8.01067982 C27.5952211,8.69803869 27.4180141,9.26993416 27.0635947,9.72638339 C26.7091752,10.1828327 26.1990337,10.4701229 25.5331548,10.5882627 L25.5331548,10.6688121 C26.3601335,10.8245419 26.9682758,11.1319693 27.3576002,11.5911035 C27.7469246,12.0502377 27.9415838,12.6718049 27.9415838,13.4558236 C27.9415838,14.5137118 27.5724025,15.3420205 26.8340287,15.9407745 C26.0956549,16.5395285 25.0686595,16.8389011 23.7530117,16.8389011 L19.5,16.8389011 L19.5,5.06256945 Z M21.4251322,9.92775706 L23.2777698,9.92775706 C24.0832685,9.92775706 24.6712737,9.80022169 25.0418031,9.54514712 C25.4123325,9.29007254 25.5975944,8.85645225 25.5975944,8.24427327 C25.5975944,7.69116419 25.3975653,7.29110585 24.9975009,7.04408626 C24.5974366,6.79706667 23.9624447,6.67355873 23.0925061,6.67355873 L21.4251322,6.67355873 L21.4251322,9.92775706 Z M21.4251322,11.4904167 L21.4251322,15.2198568 L23.4710886,15.2198568 C24.2765872,15.2198568 24.8847296,15.0654719 25.2955339,14.7566974 C25.7063383,14.4479229 25.9117373,13.9606036 25.9117373,13.2947247 C25.9117373,12.6825457 25.7023108,12.2287882 25.2834515,11.9334387 C24.8645922,11.6380892 24.2282578,11.4904167 23.3744292,11.4904167 L21.4251322,11.4904167 Z M29.8953916,16.8389011 L29.8953916,5.06256945 L31.8205237,5.06256945 L31.8205237,15.1876371 L36.8065356,15.1876371 L36.8065356,16.8389011 L29.8953916,16.8389011 Z M48.4665536,10.9346254 C48.4665536,12.8517122 47.9872891,14.3418624 47.0287457,15.4051206 C46.0702024,16.4683789 44.7129575,17 42.9569704,17 C41.1795033,17 39.8142036,16.4724063 38.8610302,15.417203 C37.9078567,14.3619998 37.4312772,12.8624522 37.4312772,10.9185155 C37.4312772,8.97457869 37.9105417,7.48174356 38.8690851,6.43996528 C39.8276285,5.39818701 41.1956132,4.87730568 42.9730803,4.87730568 C44.7236973,4.87730568 46.0769148,5.40624187 47.0327734,6.46413012 C47.9886317,7.52201836 48.4665536,9.01216855 48.4665536,10.9346254 Z M39.4772336,10.9346254 C39.4772336,12.384523 39.7698937,13.4840121 40.3552227,14.2331259 C40.9405517,14.9822397 41.8077923,15.3567909 42.9569704,15.3567909 C44.1007786,15.3567909 44.9639915,14.9862671 45.5466357,14.2452083 C46.1292796,13.5041496 46.4205973,12.4006329 46.4205973,10.9346254 C46.4205973,9.49009776 46.1319648,8.39463599 45.5546906,7.64820724 C44.9774165,6.90177847 44.1168884,6.52856969 42.9730803,6.52856969 C41.8185322,6.52856969 40.9472642,6.90177847 40.3592502,7.64820724 C39.7712361,8.39463599 39.4772336,9.49009776 39.4772336,10.9346254 Z M55.5110875,6.54467959 C54.4048694,6.54467959 53.5349439,6.93668306 52.9012851,7.72070175 C52.267626,8.50472046 51.9508013,9.58675743 51.9508013,10.9668451 C51.9508013,12.4113727 52.2555437,13.5041496 52.8650377,14.2452083 C53.4745317,14.9862671 54.3565394,15.3567909 55.5110875,15.3567909 C56.0104969,15.3567909 56.4937888,15.3071193 56.960978,15.2077744 C57.4281673,15.1084296 57.9141441,14.9808942 58.4189233,14.8251645 L58.4189233,16.4764285 C57.4952848,16.8254779 56.4481523,17 55.2774942,17 C53.5537269,17 52.230044,16.4777762 51.3064055,15.4333129 C50.3827671,14.3888497 49.9209548,12.894672 49.9209548,10.9507353 C49.9209548,9.72637727 50.1451485,8.65508014 50.5935427,7.73681166 C51.041937,6.81854317 51.6903538,6.11508489 52.5388124,5.6264157 C53.3872709,5.13774651 54.3833893,4.89341558 55.5271976,4.89341558 C56.7300756,4.89341558 57.841647,5.14580137 58.8619454,5.65058054 L58.1692199,7.25351487 C57.7718405,7.06556518 57.3516451,6.90044043 56.9086208,6.75813566 C56.4655966,6.6158309 55.9997568,6.54467959 55.5110875,6.54467959 Z M69.4506556,16.8389011 L67.2194355,16.8389011 L63.522215,11.5065265 L62.3864676,12.4328454 L62.3864676,16.8389011 L60.4613353,16.8389011 L60.4613353,5.06256945 L62.3864676,5.06256945 L62.3864676,10.684922 C62.9127266,10.0405231 63.4362929,9.42029843 63.9571822,8.82422942 L67.1388858,5.06256945 L69.3298314,5.06256945 C67.2731248,7.47906546 65.7990842,9.20012177 64.9076657,10.2257901 L69.4506556,16.8389011 Z M75.6494201,5.63447064 C74.1726725,5.63447064 73.0100869,6.10702277 72.1616284,7.05214121 C71.3131696,7.99725964 70.8889467,9.29140808 70.8889467,10.9346254 C70.8889467,12.6154326 71.2890051,13.9203209 72.0891337,14.8493293 C72.8892625,15.7783378 74.0330533,16.242835 75.5205409,16.242835 C76.5086192,16.242835 77.4161342,16.1166421 78.2431127,15.8642525 L78.2431127,16.5891977 C77.4644642,16.8630673 76.4925103,17 75.3272222,17 C73.673265,17 72.3710617,16.4656939 71.4205732,15.3970657 C70.4700848,14.3284374 69.9948476,12.8356023 69.9948476,10.9185155 C69.9948476,9.72100746 70.2217264,8.66582002 70.6754907,7.75292154 C71.129255,6.84002305 71.781699,6.13522229 72.6328427,5.63849812 C73.4839862,5.14177394 74.4733922,4.89341558 75.6010904,4.89341558 C76.7502684,4.89341558 77.7786064,5.108212 78.6861348,5.53781129 L78.355882,6.27886635 C77.4966834,5.84926707 76.5945384,5.63447064 75.6494201,5.63447064 Z M86.8100316,16.8389011 L80.3741293,16.8389011 L80.3741293,5.06256945 L86.8100316,5.06256945 L86.8100316,5.81973441 L81.1957339,5.81973441 L81.1957339,10.2741198 L86.4958886,10.2741198 L86.4958886,11.0312847 L81.1957339,11.0312847 L81.1957339,16.0817361 L86.8100316,16.0817361 L86.8100316,16.8389011 Z M89.8029274,11.7079002 L89.8029274,16.8389011 L88.9813228,16.8389011 L88.9813228,5.06256945 L91.7844442,5.06256945 C93.2450817,5.06256945 94.3244339,5.33240746 95.0225327,5.87209156 C95.7206316,6.41177567 96.0696758,7.22397464 96.0696758,8.30871284 C96.0696758,9.09810153 95.8615917,9.76397044 95.4454173,10.3063395 C95.0292429,10.8487086 94.396936,11.2380272 93.5484774,11.4743068 L96.7462912,16.8389011 L95.7635877,16.8389011 L92.726873,11.7079002 L89.8029274,11.7079002 Z M89.8029274,10.9990649 L92.0502574,10.9990649 C93.0437059,10.9990649 93.814288,10.7775561 94.3620271,10.3345318 C94.909766,9.8915076 95.1836315,9.23772099 95.1836315,8.37315242 C95.1836315,7.4763639 94.9151361,6.82391977 94.378137,6.41580044 C93.8411379,6.00768112 92.9658423,5.80362452 91.7522245,5.80362452 L89.8029274,5.80362452 L89.8029274,10.9990649 Z M101.358231,16.8389011 L100.528572,16.8389011 L100.528572,5.8358443 L96.7024723,5.8358443 L96.7024723,5.06256945 L105.184331,5.06256945 L105.184331,5.8358443 L101.358231,5.8358443 L101.358231,16.8389011 Z M112.9377,13.8021863 C112.9377,14.7848947 112.576573,15.5635317 111.85431,16.1381207 C111.132046,16.7127098 110.172174,17 108.974666,17 C107.535509,17 106.431992,16.8415876 105.664083,16.5247582 L105.664083,15.7031536 C106.512542,16.062943 107.594579,16.242835 108.910227,16.242835 C109.876825,16.242835 110.64338,16.0213262 111.209914,15.5783019 C111.776448,15.1352777 112.059711,14.5539849 112.059711,13.8344061 C112.059711,13.3886968 111.965737,13.0195154 111.777788,12.7268509 C111.589838,12.4341864 111.283753,12.1670334 110.859524,11.9253838 C110.435294,11.6837342 109.812385,11.4232935 108.990776,11.144054 C107.787898,10.7305647 106.956904,10.2835196 106.49777,9.80290539 C106.038636,9.32229119 105.809072,8.68192935 105.809072,7.88180069 C105.809072,7.00112214 106.154089,6.28289661 106.844133,5.72710253 C107.534177,5.17130845 108.421555,4.89341558 109.506293,4.89341558 C110.612511,4.89341558 111.651589,5.10284209 112.623557,5.52170139 L112.325524,6.23053668 C111.348186,5.82241735 110.413821,5.61836075 109.522403,5.61836075 C108.652464,5.61836075 107.959746,5.8197324 107.444226,6.22248173 C106.928707,6.62523106 106.670952,7.17296194 106.670952,7.86569079 C106.670952,8.30066007 106.750158,8.65775912 106.908573,8.93699866 C107.066987,9.2162382 107.326085,9.46728151 107.685875,9.69013615 C108.045664,9.91299077 108.663204,10.1801438 109.538513,10.4916033 C110.456781,10.8084328 111.146815,11.1158602 111.608634,11.4138947 C112.070453,11.7119292 112.407415,12.0502335 112.619529,12.4288179 C112.831644,12.8074023 112.9377,13.2651872 112.9377,13.8021863 Z" id="BLOCKCERTS"></path>\n <path d="M10.9580699,13.4113689 C10.9580699,13.8630088 10.5919434,14.2291353 10.1403035,14.2291353 L0.81776652,14.2291353 C0.366126608,14.2291353 1.20000012e-07,13.8630088 1.2000001e-07,13.4113689 C1.2000001e-07,12.959729 0.366126608,12.5936025 0.81776652,12.5936025 L10.1403035,12.5936025 C10.5919434,12.5936025 10.9580699,12.959729 10.9580699,13.4113689 Z"></path>\n <path d="M14.2291354,13.411369 C14.2291354,13.8630089 13.8630089,14.2291354 13.411369,14.2291354 C12.9597291,14.2291354 12.5936026,13.8630089 12.5936026,13.411369 C12.5936026,12.9597291 12.9597291,12.5936026 13.411369,12.5936026 C13.8630089,12.5936026 14.2291354,12.9597291 14.2291354,13.411369 Z"></path>\n <path d="M9.4860908,16.6824348 C9.4860908,17.1340748 9.11996431,17.5002012 8.6683244,17.5002012 C8.21668449,17.5002012 7.850558,17.1340748 7.850558,16.6824348 C7.850558,16.2307949 8.21668449,15.8646684 8.6683244,15.8646684 C9.11996431,15.8646684 9.4860908,16.2307949 9.4860908,16.6824348 Z"></path>\n <path d="M14.2291356,6.869238 C14.2291356,7.32087791 13.8630092,7.6870044 13.4113692,7.6870044 C12.9597293,7.6870044 12.5936028,7.32087791 12.5936028,6.869238 C12.5936028,6.41759809 12.9597293,6.0514716 13.4113692,6.0514716 C13.8630092,6.0514716 14.2291356,6.41759809 14.2291356,6.869238 Z"></path>\n <path d="M1.63553264,6.8692384 C1.63553264,7.32087831 1.26940615,7.6870048 0.81776624,7.6870048 C0.366126328,7.6870048 -1.60000013e-07,7.32087831 -1.60000013e-07,6.8692384 C-1.60000013e-07,6.41759849 0.366126328,6.051472 0.81776624,6.051472 C1.26940615,6.051472 1.63553264,6.41759849 1.63553264,6.8692384 Z"></path><rect transform="translate(7.196344, 3.598172) rotate(90.000000) translate(-7.196344, -3.598172) " x="6.37857744" y="2.78040592" width="1.6355328" height="1.6355328" rx="0.8177664"></rect>\n <path d="M6.37857804,10.1403025 C6.37857804,10.5919424 6.01245155,10.9580689 5.56081164,10.9580689 C5.10917173,10.9580689 4.74304524,10.5919424 4.74304524,10.1403025 C4.74304524,9.68866261 5.10917173,9.32253612 5.56081164,9.32253612 C6.01245155,9.32253612 6.37857804,9.68866261 6.37857804,10.1403025 Z"></path>\n <path d="M14.2291348,3.5981724 C14.2291348,4.04981231 13.8630083,4.4159388 13.4113684,4.4159388 L10.4674093,4.4159388 C10.0157694,4.4159388 9.64964292,4.04981231 9.64964292,3.5981724 C9.64964292,3.14653249 10.0157694,2.780406 10.4674093,2.780406 L13.4113684,2.780406 C13.8630083,2.780406 14.2291348,3.14653249 14.2291348,3.5981724 Z"></path><rect transform="translate(2.371523, 3.598172) rotate(90.000000) translate(-2.371523, -3.598172) " x="1.55375644" y="1.226649" width="1.6355328" height="4.74304512" rx="0.8177664"></rect>\n <path d="M14.229135,10.140303 C14.229135,10.5919429 13.8630085,10.9580694 13.4113686,10.9580694 L8.83187672,10.9580694 C8.38023681,10.9580694 8.01411032,10.5919429 8.01411032,10.140303 C8.01411032,9.68866309 8.38023681,9.3225366 8.83187672,9.3225366 L13.4113686,9.3225366 C13.8630085,9.3225366 14.229135,9.68866309 14.229135,10.140303 Z"></path>\n <path d="M3.1075118,10.1403032 C3.1075118,10.5919431 2.74138531,10.9580696 2.2897454,10.9580696 L0.81776588,10.9580696 C0.366125968,10.9580696 -5.20000015e-07,10.5919431 -5.20000015e-07,10.1403032 C-5.20000015e-07,9.68866325 0.366125968,9.32253676 0.81776588,9.32253676 L2.2897454,9.32253676 C2.74138531,9.32253676 3.1075118,9.68866325 3.1075118,10.1403032 Z"></path>\n <path d="M14.2291356,16.6824352 C14.2291356,17.1340751 13.8630091,17.5002016 13.4113692,17.5002016 L11.9393897,17.5002016 C11.4877498,17.5002016 11.1216233,17.1340751 11.1216233,16.6824352 C11.1216233,16.2307953 11.4877498,15.8646688 11.9393897,15.8646688 L13.4113692,15.8646688 C13.8630091,15.8646688 14.2291356,16.2307953 14.2291356,16.6824352 Z"></path>\n <path d="M6.2150248,16.6824353 C6.2150248,17.1340752 5.84889831,17.5002017 5.3972584,17.5002017 L0.81776656,17.5002017 C0.366126648,17.5002017 1.59999985e-07,17.1340752 1.59999985e-07,16.6824353 C1.59999985e-07,16.2307954 0.366126648,15.8646689 0.81776656,15.8646689 L5.3972584,15.8646689 C5.84889831,15.8646689 6.2150248,16.2307954 6.2150248,16.6824353 Z"></path>\n <path d="M10.9580703,6.86923768 C10.9580703,7.32087759 10.5919438,7.68700408 10.1403039,7.68700408 L4.08883256,7.68700408 C3.63719265,7.68700408 3.27106616,7.32087759 3.27106616,6.86923768 C3.27106616,6.41759777 3.63719265,6.05147128 4.08883256,6.05147128 L10.1403039,6.05147128 C10.5919438,6.05147128 10.9580703,6.41759777 10.9580703,6.86923768 Z">\n </path> \n </g>\n </g> \n </svg>\n <span class=\'buv-u-visually-hidden\'>',"</span>\n "])),cee("text.brandname"))}function Bre(){return Fe(Rre||(Rre=w(['\n <svg class=\'buv-qa-logo--branded buv-c-logo--medium\' version="1.1" viewBox="0 0 686 163" xmlns="http://www.w3.org/2000/svg">\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(-76 -70)">\n <g transform="translate(76 53)">\n <path d="m119.52 35.613h21.191c9.8308 0 16.935 1.4323 21.313 4.2969 4.3783 2.8646 6.5674 7.3893 6.5674 13.574 0 4.1667-1.0742 7.6334-3.2227 10.4-2.1484 2.7669-5.2409 4.5085-9.2773 5.2246v0.48828c5.013 0.94402 8.6995 2.8076 11.06 5.5908 2.36 2.7832 3.54 6.5511 3.54 11.304 0 6.4128-2.2379 11.434-6.7139 15.063-4.4759 3.6296-10.701 5.4443-18.677 5.4443h-25.781v-71.387zm11.67 29.492h11.23c4.8828 0 8.4473-0.7731 10.693-2.3193s3.3691-4.1748 3.3691-7.8857c0-3.3529-1.2126-5.778-3.6377-7.2754-2.4251-1.4974-6.2744-2.2461-11.548-2.2461h-10.107v19.727zm0 9.4727v22.607h12.402c4.8828 0 8.5693-0.93586 11.06-2.8076 2.4902-1.8718 3.7354-4.8258 3.7354-8.8623 0-3.711-1.2695-6.4616-3.8086-8.252-2.5391-1.7904-6.3965-2.6855-11.572-2.6855h-11.816zm51.346 32.422v-71.387h11.67v61.377h30.225v10.01h-41.895zm112.58-35.791c0 11.621-2.9052 20.654-8.7158 27.1-5.8106 6.4453-14.038 9.668-24.683 9.668-10.775 0-19.051-3.1982-24.829-9.5947-5.778-6.3965-8.667-15.487-8.667-27.271s2.9052-20.833 8.7158-27.148c5.8106-6.3151 14.103-9.4727 24.878-9.4727 10.612 0 18.815 3.2063 24.609 9.6191s8.6914 15.446 8.6914 27.1zm-54.492 0c0 8.7891 1.7741 15.454 5.3223 19.995 3.5482 4.541 8.8053 6.8115 15.771 6.8115 6.9336 0 12.166-2.2461 15.698-6.7383 3.5319-4.4922 5.2979-11.182 5.2979-20.068 0-8.7566-1.7497-15.397-5.249-19.922-3.4994-4.5248-8.7158-6.7871-15.649-6.7871-6.9987 0-12.28 2.2623-15.845 6.7871s-5.3467 11.165-5.3467 19.922zm97.195-26.611c-6.7058 0-11.979 2.3763-15.82 7.1289-3.8412 4.7526-5.7617 11.312-5.7617 19.678 0 8.7566 1.8473 15.381 5.542 19.873 3.6947 4.4922 9.0413 6.7383 16.04 6.7383 3.0274 0 5.957-0.3011 8.7891-0.90332 2.832-0.60222 5.778-1.3753 8.8379-2.3193v10.01c-5.599 2.1159-11.947 3.1738-19.043 3.1738-10.449 0-18.473-3.1657-24.072-9.4971-5.599-6.3314-8.3984-15.389-8.3984-27.173 0-7.4219 1.359-13.916 4.0771-19.482 2.7181-5.5664 6.6487-9.8307 11.792-12.793s11.182-4.4434 18.115-4.4434c7.2917 0 14.03 1.5299 20.215 4.5898l-4.1992 9.7168c-2.4089-1.1393-4.956-2.1403-7.6416-3.0029-2.6856-0.86263-5.5094-1.2939-8.4717-1.2939zm84.5 62.402h-13.525l-22.412-32.324-6.8848 5.6152v26.709h-11.67v-71.387h11.67v34.082c3.1901-3.9063 6.3639-7.666 9.5215-11.279l19.287-22.803h13.281c-12.468 14.649-21.403 25.081-26.807 31.299l27.539 40.088zm37.576-67.92c-8.9519 0-15.999 2.8646-21.143 8.5938s-7.7148 13.574-7.7148 23.535c0 10.189 2.4251 18.099 7.2754 23.73 4.8503 5.6315 11.784 8.4473 20.801 8.4473 5.9896 0 11.491-0.76497 16.504-2.2949v4.3945c-4.7201 1.6602-10.612 2.4902-17.676 2.4902-10.026 0-17.92-3.2389-23.682-9.7168-5.7617-6.4779-8.6426-15.527-8.6426-27.148 0-7.2592 1.3753-13.656 4.126-19.189 2.7507-5.5339 6.7057-9.8063 11.865-12.817s11.157-4.5166 17.993-4.5166c6.9662 0 13.2 1.3021 18.701 3.9062l-2.002 4.4922c-5.2084-2.6042-10.677-3.9062-16.406-3.9062zm67.654 67.92h-39.014v-71.387h39.014v4.5898h-34.033v27.002h32.129v4.5898h-32.129v30.615h34.033v4.5898zm18.143-31.104v31.104h-4.9805v-71.387h16.992c8.8542 0 15.397 1.6357 19.629 4.9072s6.3477 8.195 6.3477 14.771c0 4.7852-1.2614 8.8216-3.7842 12.109-2.5228 3.2878-6.3558 5.6478-11.499 7.0801l19.385 32.52h-5.957l-18.408-31.104h-17.725zm0-4.2969h13.623c6.0222 0 10.693-1.3428 14.014-4.0283s4.9805-6.6487 4.9805-11.89c0-5.4362-1.6276-9.3913-4.8828-11.865-3.2552-2.474-8.5612-3.7109-15.918-3.7109h-11.816v31.494zm70.047 35.4h-5.0293v-66.699h-23.193v-4.6875h51.416v4.6875h-23.193v66.699zm70.193-18.408c0 5.9571-2.1891 10.677-6.5674 14.16-4.3783 3.4831-10.197 5.2246-17.456 5.2246-8.724 0-15.413-0.96028-20.068-2.8809v-4.9805c5.1433 2.181 11.702 3.2715 19.678 3.2715 5.8594 0 10.506-1.3428 13.94-4.0283 3.4343-2.6856 5.1514-6.2093 5.1514-10.571 0-2.7018-0.56966-4.9398-1.709-6.7139-1.1393-1.7741-2.9948-3.3935-5.5664-4.8584-2.5716-1.4649-6.3476-3.0436-11.328-4.7363-7.2917-2.5065-12.329-5.2165-15.112-8.1299s-4.1748-6.7952-4.1748-11.646c0-5.3386 2.0914-9.6924 6.2744-13.062 4.183-3.3692 9.5621-5.0537 16.138-5.0537 6.7058 0 13.005 1.2695 18.896 3.8086l-1.8066 4.2969c-5.9245-2.474-11.589-3.7109-16.992-3.7109-5.2735 0-9.4726 1.2207-12.598 3.6621-3.125 2.4414-4.6875 5.7617-4.6875 9.9609 0 2.6367 0.48014 4.8014 1.4404 6.4941 0.96029 1.6927 2.5309 3.2145 4.7119 4.5654 2.181 1.3509 5.9245 2.9704 11.23 4.8584 5.5664 1.9206 9.7493 3.7842 12.549 5.5908 2.7995 1.8066 4.8421 3.8574 6.1279 6.1523 1.2858 2.2949 1.9287 5.07 1.9287 8.3252z" fill="#182650" fill-rule="nonzero"/>\n <rect transform="translate(33.5 82) rotate(90) translate(-33.5 -82)" x="28.5" y="48.5" width="10" height="67" rx="5" fill="#2AB27B"/>\n <rect transform="translate(82 82) rotate(90) translate(-82 -82)" x="77" y="77" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(53 102) rotate(90) translate(-53 -102)" x="48" y="97" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(82 42) rotate(90) translate(-82 -42)" x="77" y="37" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(5 42) rotate(90) translate(-5 -42)" y="37" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(44 22) rotate(90) translate(-44 -22)" x="39" y="17" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(34 62) rotate(90) translate(-34 -62)" x="29" y="57" width="10" height="10" rx="5" fill="#2AB27B"/>\n <rect transform="translate(73 22) rotate(90) translate(-73 -22)" x="68" y="8" width="10" height="28" rx="5" fill="#2AB27B"/>\n <rect transform="translate(14.5 22) rotate(90) translate(-14.5 -22)" x="9.5" y="7.5" width="10" height="29" rx="5" fill="#2AB27B"/>\n <rect transform="translate(68 62) rotate(90) translate(-68 -62)" x="63" y="43" width="10" height="38" rx="5" fill="#2AB27B"/>\n <rect transform="translate(9.5 62) rotate(90) translate(-9.5 -62)" x="4.5" y="52.5" width="10" height="19" rx="5" fill="#2AB27B"/>\n <rect transform="translate(77.5 102) rotate(90) translate(-77.5 -102)" x="72.5" y="92.5" width="10" height="19" rx="5" fill="#2AB27B"/>\n <rect transform="translate(19 102) rotate(90) translate(-19 -102)" x="14" y="83" width="10" height="38" rx="5" fill="#2AB27B"/>\n <rect transform="translate(43.5 42) rotate(90) translate(-43.5 -42)" x="38.5" y="18.5" width="10" height="47" rx="5" fill="#2AB27B"/>\n <path d="m10.013 172h-2.6147v-20.164h-7.1213v-2.3225h16.857v2.3225h-7.1213v20.164zm21.656 0v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762s-1.6047-1.0151-2.9377-1.0151c-1.7739 0-3.0685 0.48193-3.8837 1.4458s-1.2228 2.543-1.2228 4.7373v8.8132h-2.5532v-23.933h2.5532v7.2444c0 0.87159-0.041015 1.5945-0.12305 2.1687h0.15381c0.50244-0.81006 1.2176-1.4484 2.1456-1.9149 0.92798-0.46656 1.9867-0.69983 3.1761-0.69983 2.061 0 3.6068 0.48962 4.6373 1.4689 1.0305 0.97925 1.5458 2.5353 1.5458 4.6681v10.997h-2.5532zm14.919 0.30762c-2.4917 0-4.4579-0.75878-5.8986-2.2764-1.4407-1.5176-2.161-3.6247-2.161-6.3215 0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826s-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm39.329 3.7529c0 3.5991-0.91003 6.4292-2.7301 8.4902-1.8201 2.061-4.3502 3.0916-7.5905 3.0916-3.312 0-5.8678-1.0126-7.6674-3.0377-1.7996-2.0252-2.6993-4.8834-2.6993-8.5748 0-3.6607 0.90233-6.4984 2.707-8.5133 1.8047-2.0149 4.3681-3.0223 7.6904-3.0223 3.23 0 5.7524 1.0254 7.5674 3.0762 1.815 2.0508 2.7224 4.8808 2.7224 8.4902zm-17.919 0c0 3.0454 0.64855 5.3551 1.9457 6.9291 1.2971 1.574 3.1813 2.361 5.6525 2.361 2.4917 0 4.3733-0.78442 5.6448-2.3533 1.2715-1.5689 1.9072-3.8811 1.9072-6.9368 0-3.0249-0.63317-5.3192-1.8995-6.8829-1.2664-1.5637-3.1402-2.3456-5.6217-2.3456-2.4917 0-4.3861 0.78698-5.6832 2.361-1.2971 1.574-1.9457 3.8631-1.9457 6.8676zm30.393 11.582c-1.0972 0-2.0995-0.20251-3.007-0.60754-0.90748-0.40503-1.6688-1.028-2.2841-1.8688h-0.18457c0.12305 0.98438 0.18457 1.9175 0.18457 2.7993v6.9368h-2.5532v-24.425h2.0764l0.35376 2.3071h0.12305c0.65625-0.92286 1.4202-1.5894 2.2917-1.9995 0.87159-0.41016 1.8713-0.61523 2.9993-0.61523 2.2354 0 3.9606 0.76391 5.1757 2.2917s1.8226 3.6709 1.8226 6.4292c0 2.7686-0.61779 4.9193-1.8534 6.4523-1.2356 1.533-2.9506 2.2994-5.1449 2.2994zm-0.36914-15.304c-1.7227 0-2.9685 0.4768-3.7375 1.4304s-1.1638 2.4712-1.1843 4.5527v0.56909c0 2.3687 0.39477 4.0631 1.1843 5.0834s2.0559 1.5304 3.7991 1.5304c1.4561 0 2.5968-0.58959 3.4222-1.7688 0.82544-1.1792 1.2382-2.8044 1.2382-4.8757 0-2.1021-0.41272-3.7145-1.2382-4.8373-0.82544-1.1228-1.9867-1.6842-3.4838-1.6842zm18.949 15.304c-2.4917 0-4.4579-0.75878-5.8986-2.2764s-2.161-3.6247-2.161-6.3215c0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826-0.80494 0.16919-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm22.779 15.027v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762-0.62549-0.67676-1.6047-1.0151-2.9377-1.0151-1.7637 0-3.0557 0.4768-3.876 1.4304-0.82032 0.95362-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689 1.0254 0.97925 1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm29.054-5.9832c0 1.979-0.71777 3.5222-2.1533 4.6296-1.4356 1.1074-3.3838 1.6611-5.8447 1.6611-2.666 0-4.7168-0.3435-6.1523-1.0305v-2.5225c0.92286 0.38965 1.9277 0.69726 3.0146 0.92285 1.0869 0.22559 2.1636 0.33838 3.23 0.33838 1.7432 0 3.0557-0.33068 3.9375-0.99206 0.88184-0.66138 1.3228-1.5817 1.3228-2.7609 0-0.7793-0.15637-1.4176-0.46912-1.9149-0.31274-0.49732-0.83569-0.95617-1.5688-1.3766-0.73316-0.42041-1.8483-0.89722-3.3453-1.4304-2.0918-0.74854-3.5863-1.6355-4.4835-2.6609s-1.3458-2.3635-1.3458-4.0144c0-1.7329 0.65112-3.1121 1.9534-4.1375 1.3023-1.0254 3.0249-1.5381 5.168-1.5381 2.2354 0 4.2912 0.41015 6.1677 1.2305l-0.81518 2.2764c-1.856-0.7793-3.6606-1.1689-5.4141-1.1689-1.3843 0-2.4661 0.29736-3.2454 0.89209s-1.1689 1.4202-1.1689 2.4763c0 0.7793 0.14355 1.4176 0.43066 1.9149s0.7716 0.95361 1.4535 1.3689 1.7252 0.87414 3.13 1.3766c2.3584 0.84082 3.9811 1.7432 4.868 2.707s1.3304 2.2148 1.3304 3.7529zm9.6592 4.1836c0.45117 0 0.88696-0.033324 1.3074-0.099975s0.75366-0.13586 0.99976-0.20764v1.9534c-0.27686 0.1333-0.68445 0.24353-1.2228 0.33069-0.53833 0.087159-1.0228 0.13074-1.4535 0.13074-3.2608 0-4.8911-1.7175-4.8911-5.1526v-10.028h-2.4148v-1.2305l2.4148-1.0613 1.0767-3.5991h1.4766v3.9067h4.8911v1.9841h-4.8911v9.9207c0 1.0151 0.24096 1.7944 0.7229 2.3379s1.1433 0.81518 1.9841 0.81518zm16.042 1.7996l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613s1.9816-0.38452 2.9762-0.38452c2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072s1.3407 0.7229 2.3456 0.7229zm24.456 1.7996v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762s-1.6047-1.0151-2.9377-1.0151c-1.7637 0-3.0557 0.4768-3.876 1.4304-0.82032 0.95362-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689s1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm19.272-2.261h-0.13843c-1.1792 1.7124-2.9429 2.5686-5.291 2.5686-2.2046 0-3.9196-0.75365-5.1449-2.261-1.2253-1.5073-1.838-3.6504-1.838-6.4292 0-2.7788 0.61523-4.9372 1.8457-6.4753 1.2305-1.5381 2.9429-2.3071 5.1372-2.3071 2.2866 0 4.04 0.83056 5.2603 2.4917h0.19995l-0.10767-1.2151-0.061523-1.1843v-6.8599h2.5532v23.933h-2.0764l-0.33838-2.261zm-5.1064 0.43066c1.7432 0 3.007-0.47424 3.7914-1.4227s1.1766-2.4789 1.1766-4.5912v-0.53833c0-2.3892-0.39734-4.0939-1.192-5.1141s-2.0636-1.5304-3.8068-1.5304c-1.4971 0-2.6429 0.5819-3.4376 1.7457s-1.192 2.807-1.192 4.9296c0 2.1533 0.39477 3.7786 1.1843 4.8757 0.78955 1.0972 1.9482 1.6458 3.4761 1.6458zm23.302 1.8303l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613 0.98951-0.25635 1.9816-0.38452 2.9762-0.38452 2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072 0.55884 0.48194 1.3407 0.7229 2.3456 0.7229zm20.61-15.365c0.74854 0 1.4202 0.061523 2.0149 0.18457l-0.35376 2.3687c-0.69727-0.15381-1.3125-0.23071-1.8457-0.23071-1.3638 0-2.5301 0.5537-3.4991 1.6611-0.969 1.1074-1.4535 2.4866-1.4535 4.1375v9.0439h-2.5532v-16.857h2.1072l0.29224 3.1223h0.12305c0.62549-1.0972 1.3791-1.9431 2.261-2.5378 0.88184-0.59473 1.8508-0.89209 2.907-0.89209zm16.011 14.904h-0.13843c-1.1792 1.7124-2.9429 2.5686-5.291 2.5686-2.2046 0-3.9195-0.75365-5.1449-2.261s-1.838-3.6504-1.838-6.4292c0-2.7788 0.61523-4.9372 1.8457-6.4753 1.2305-1.5381 2.9429-2.3071 5.1372-2.3071 2.2866 0 4.04 0.83056 5.2603 2.4917h0.19995l-0.10767-1.2151-0.061524-1.1843v-6.8599h2.5532v23.933h-2.0764l-0.33838-2.261zm-5.1064 0.43066c1.7432 0 3.007-0.47424 3.7914-1.4227 0.78443-0.94849 1.1766-2.4789 1.1766-4.5912v-0.53833c0-2.3892-0.39734-4.0939-1.192-5.1141-0.79468-1.0203-2.0636-1.5304-3.8068-1.5304-1.4971 0-2.6429 0.5819-3.4376 1.7457-0.79468 1.1638-1.192 2.807-1.192 4.9296 0 2.1533 0.39477 3.7786 1.1843 4.8757 0.78956 1.0972 1.9482 1.6458 3.4761 1.6458zm24.117 1.8303h-2.6147v-22.487h12.535v2.3225h-9.9207v8.2288h9.3208v2.3225h-9.3208v9.613zm27.809-8.4441c0 2.7481-0.69213 4.8937-2.0764 6.4369-1.3843 1.5432-3.2966 2.3148-5.7371 2.3148-1.5073 0-2.8455-0.35376-4.0144-1.0613s-2.0713-1.7226-2.707-3.0454c-0.63575-1.3228-0.95361-2.8711-0.95361-4.645 0-2.7481 0.687-4.8885 2.061-6.4215 1.374-1.533 3.2812-2.2994 5.7217-2.2994 2.3584 0 4.2323 0.78442 5.6217 2.3533 1.3894 1.5689 2.0841 3.6914 2.0841 6.3677zm-12.843 0c0 2.1533 0.43066 3.7939 1.292 4.9219 0.86133 1.1279 2.1277 1.6919 3.7991 1.6919s2.9403-0.5614 3.8068-1.6842c0.86646-1.1228 1.2997-2.766 1.2997-4.9296 0-2.1431-0.43322-3.7709-1.2997-4.8834-0.86646-1.1126-2.1456-1.6688-3.8375-1.6688-1.6714 0-2.9326 0.54858-3.7837 1.6458-0.85108 1.0972-1.2766 2.7327-1.2766 4.9065zm25.009-8.7209c0.74854 0 1.4202 0.061523 2.0149 0.18457l-0.35376 2.3687c-0.69727-0.15381-1.3125-0.23071-1.8457-0.23071-1.3638 0-2.5301 0.5537-3.4991 1.6611-0.969 1.1074-1.4535 2.4866-1.4535 4.1375v9.0439h-2.5532v-16.857h2.1072l0.29224 3.1223h0.12305c0.62549-1.0972 1.3791-1.9431 2.261-2.5378 0.88184-0.59473 1.8508-0.89209 2.907-0.89209zm13.735-5.3218h6.3523c2.9839 0 5.1423 0.44604 6.4753 1.3381 1.333 0.8921 1.9995 2.302 1.9995 4.2297 0 1.333-0.3717 2.4327-1.1151 3.2992s-1.8278 1.4279-3.2531 1.6842v0.15381c3.4146 0.58448 5.1218 2.3789 5.1218 5.3833 0 2.0098-0.67931 3.5786-2.038 4.7065-1.3586 1.1279-3.2582 1.6919-5.6986 1.6919h-7.8442v-22.487zm2.6147 9.6284h4.3066c1.8457 0 3.1736-0.28967 3.9836-0.86902 0.81006-0.57935 1.2151-1.556 1.2151-2.9301 0-1.2612-0.45117-2.1713-1.3535-2.7301-0.90235-0.55884-2.3379-0.83826-4.3066-0.83826h-3.8452v7.3674zm0 2.2148v8.4133h4.6912c1.815 0 3.1813-0.35119 4.099-1.0536 0.91773-0.7024 1.3766-1.8021 1.3766-3.2992 0-1.3945-0.46911-2.4199-1.4073-3.0762-0.93824-0.65625-2.3661-0.98438-4.2836-0.98438h-4.4758zm19.964 10.644h-2.5532v-23.933h2.5532v23.933zm19.964-8.4441c0 2.7481-0.69213 4.8937-2.0764 6.4369-1.3843 1.5432-3.2966 2.3148-5.7371 2.3148-1.5073 0-2.8455-0.35376-4.0144-1.0613s-2.0713-1.7226-2.707-3.0454c-0.63575-1.3228-0.95361-2.8711-0.95361-4.645 0-2.7481 0.687-4.8885 2.061-6.4215 1.374-1.533 3.2812-2.2994 5.7217-2.2994 2.3584 0 4.2323 0.78442 5.6217 2.3533 1.3894 1.5689 2.0841 3.6914 2.0841 6.3677zm-12.843 0c0 2.1533 0.43066 3.7939 1.292 4.9219 0.86133 1.1279 2.1277 1.6919 3.7991 1.6919s2.9403-0.5614 3.8068-1.6842c0.86646-1.1228 1.2997-2.766 1.2997-4.9296 0-2.1431-0.43322-3.7709-1.2997-4.8834-0.86646-1.1126-2.1456-1.6688-3.8375-1.6688-1.6714 0-2.9326 0.54858-3.7837 1.6458-0.85108 1.0972-1.2766 2.7327-1.2766 4.9065zm24.056 8.7517c-2.4404 0-4.3297-0.75109-5.6678-2.2533-1.3381-1.5022-2.0072-3.6273-2.0072-6.3754 0-2.8198 0.67931-4.9988 2.038-6.5369 1.3586-1.5381 3.2941-2.3071 5.8063-2.3071 0.81006 0 1.6201 0.087157 2.4302 0.26148 0.81006 0.17432 1.4458 0.37939 1.9072 0.61523l-0.78442 2.1687c-0.56397-0.22559-1.1792-0.41272-1.8457-0.5614-0.66651-0.14868-1.2561-0.22302-1.7688-0.22302-3.4248 0-5.1372 2.1841-5.1372 6.5522 0 2.0713 0.41784 3.6606 1.2535 4.7681 0.8357 1.1074 2.0738 1.6611 3.7145 1.6611 1.4048 0 2.8455-0.30249 4.322-0.90747v2.261c-1.1279 0.58448-2.5481 0.87671-4.2605 0.87671zm10.782-8.9363c0.44092-0.62549 1.1125-1.4458 2.0149-2.4609l5.4448-5.7678h3.03l-6.8291 7.1829 7.3059 9.6746h-3.0916l-5.9524-7.9673-1.9226 1.6611v6.3062h-2.5225v-23.933h2.5225v12.689c0 0.56397-0.041015 1.4355-0.12305 2.6147h0.12305zm20.118 8.9363c-2.4404 0-4.3297-0.75109-5.6678-2.2533-1.3381-1.5022-2.0072-3.6273-2.0072-6.3754 0-2.8198 0.67932-4.9988 2.038-6.5369 1.3586-1.5381 3.2941-2.3071 5.8063-2.3071 0.81006 0 1.6201 0.087157 2.4302 0.26148 0.81006 0.17432 1.4458 0.37939 1.9072 0.61523l-0.78442 2.1687c-0.56397-0.22559-1.1792-0.41272-1.8457-0.5614-0.66651-0.14868-1.2561-0.22302-1.7688-0.22302-3.4248 0-5.1372 2.1841-5.1372 6.5522 0 2.0713 0.41784 3.6606 1.2535 4.7681 0.8357 1.1074 2.0738 1.6611 3.7145 1.6611 1.4048 0 2.8455-0.30249 4.322-0.90747v2.261c-1.1279 0.58448-2.5481 0.87671-4.2605 0.87671zm19.795-0.30762v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762-0.62549-0.67676-1.6047-1.0151-2.9377-1.0151-1.7739 0-3.0685 0.48193-3.8837 1.4458-0.81519 0.96387-1.2228 2.543-1.2228 4.7373v8.8132h-2.5532v-23.933h2.5532v7.2444c0 0.87159-0.041015 1.5945-0.12305 2.1687h0.15381c0.50244-0.81006 1.2176-1.4484 2.1456-1.9149s1.9867-0.69983 3.1761-0.69983c2.061 0 3.6068 0.48962 4.6373 1.4689s1.5458 2.5353 1.5458 4.6681v10.997h-2.5532zm18.165 0l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613 0.98951-0.25635 1.9816-0.38452 2.9762-0.38452 2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072 0.55884 0.48194 1.3407 0.7229 2.3456 0.7229zm15.473 1.7996h-2.5532v-16.857h2.5532v16.857zm-2.7686-21.426c0-0.58448 0.14355-1.0126 0.43066-1.2843 0.28711-0.27173 0.64599-0.40759 1.0767-0.40759 0.41016 0 0.76391 0.13843 1.0613 0.41528 0.29736 0.27686 0.44604 0.70239 0.44604 1.2766s-0.14868 1.0023-0.44604 1.2843c-0.29736 0.28198-0.65112 0.42297-1.0613 0.42297-0.43067 0-0.78955-0.14099-1.0767-0.42297-0.28711-0.28198-0.43066-0.71008-0.43066-1.2843zm19.718 21.426v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762-0.62549-0.67676-1.6047-1.0151-2.9377-1.0151-1.7637 0-3.0557 0.4768-3.876 1.4304s-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689s1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm25.994-20.472c-2.4712 0-4.422 0.82287-5.8524 2.4686-1.4304 1.6458-2.1456 3.899-2.1456 6.7599 0 2.9429 0.68957 5.2167 2.0687 6.8214s3.3453 2.4071 5.8986 2.4071c1.5689 0 3.3581-0.28198 5.3679-0.84595v2.2917c-1.5586 0.58448-3.4812 0.87671-5.7678 0.87671-3.312 0-5.8678-1.0049-7.6674-3.0146-1.7996-2.0098-2.6993-4.8655-2.6993-8.5671 0-2.3174 0.43322-4.3476 1.2997-6.0908 0.86646-1.7432 2.1174-3.0864 3.7529-4.0298 1.6355-0.94336 3.5607-1.415 5.7755-1.415 2.3584 0 4.4194 0.43066 6.1831 1.292l-1.1074 2.2456c-1.7022-0.79981-3.4043-1.1997-5.1064-1.1997zm17.55 3.3069c0.74854 0 1.4202 0.061523 2.0149 0.18457l-0.35376 2.3687c-0.69727-0.15381-1.3125-0.23071-1.8457-0.23071-1.3638 0-2.5301 0.5537-3.4991 1.6611-0.969 1.1074-1.4535 2.4866-1.4535 4.1375v9.0439h-2.5532v-16.857h2.1072l0.29224 3.1223h0.12305c0.62549-1.0972 1.3791-1.9431 2.261-2.5378 0.88184-0.59473 1.8508-0.89209 2.907-0.89209zm11.659 17.473c-2.4917 0-4.4579-0.75878-5.8986-2.2764s-2.161-3.6247-2.161-6.3215c0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826-0.80494 0.16919-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm22.718 12.766h-0.13843c-1.1792 1.7124-2.9429 2.5686-5.291 2.5686-2.2046 0-3.9196-0.75365-5.1449-2.261s-1.838-3.6504-1.838-6.4292c0-2.7788 0.61523-4.9372 1.8457-6.4753 1.2305-1.5381 2.9429-2.3071 5.1372-2.3071 2.2866 0 4.04 0.83056 5.2603 2.4917h0.19995l-0.10767-1.2151-0.061524-1.1843v-6.8599h2.5532v23.933h-2.0764l-0.33838-2.261zm-5.1064 0.43066c1.7432 0 3.007-0.47424 3.7914-1.4227 0.78443-0.94849 1.1766-2.4789 1.1766-4.5912v-0.53833c0-2.3892-0.39734-4.0939-1.192-5.1141-0.79468-1.0203-2.0636-1.5304-3.8068-1.5304-1.4971 0-2.6429 0.5819-3.4376 1.7457s-1.192 2.807-1.192 4.9296c0 2.1533 0.39477 3.7786 1.1843 4.8757 0.78955 1.0972 1.9482 1.6458 3.4761 1.6458zm20.057 2.1379c-2.4917 0-4.4579-0.75878-5.8986-2.2764s-2.161-3.6247-2.161-6.3215c0-2.7173 0.66906-4.8757 2.0072-6.4753 1.3381-1.5996 3.1351-2.3994 5.391-2.3994 2.1123 0 3.7837 0.6947 5.0142 2.0841 1.2305 1.3894 1.8457 3.2223 1.8457 5.4987v1.615h-11.613c0.05127 1.979 0.55114 3.4812 1.4996 4.5066 0.94849 1.0254 2.284 1.5381 4.0067 1.5381 1.815 0 3.6094-0.37939 5.3833-1.1382v2.2764c-0.90235 0.38965-1.756 0.66907-2.5609 0.83826-0.80494 0.16919-1.7765 0.25378-2.9147 0.25378zm-0.69214-15.335c-1.3535 0-2.4327 0.44091-3.2377 1.3228-0.80494 0.88184-1.2792 2.102-1.4227 3.6606h8.8132c0-1.6099-0.35888-2.8429-1.0767-3.6991-0.71778-0.8562-1.7432-1.2843-3.0762-1.2843zm22.779 15.027v-10.905c0-1.374-0.31274-2.3994-0.93823-3.0762s-1.6047-1.0151-2.9377-1.0151c-1.7637 0-3.0557 0.4768-3.876 1.4304-0.82032 0.95362-1.2305 2.5276-1.2305 4.7219v8.844h-2.5532v-16.857h2.0764l0.41528 2.3071h0.12305c0.52295-0.83057 1.2561-1.474 2.1995-1.9303s1.9944-0.68445 3.1531-0.68445c2.0303 0 3.5581 0.48962 4.5835 1.4689s1.5381 2.5455 1.5381 4.6989v10.997h-2.5532zm13.243-1.7996c0.45118 0 0.88696-0.033324 1.3074-0.099975 0.42041-0.066651 0.75366-0.13586 0.99976-0.20764v1.9534c-0.27686 0.1333-0.68444 0.24353-1.2228 0.33069s-1.0228 0.13074-1.4535 0.13074c-3.2608 0-4.8911-1.7175-4.8911-5.1526v-10.028h-2.4148v-1.2305l2.4148-1.0613 1.0767-3.5991h1.4766v3.9067h4.8911v1.9841h-4.8911v9.9207c0 1.0151 0.24096 1.7944 0.7229 2.3379s1.1433 0.81518 1.9841 0.81518zm8.2288 1.7996h-2.5532v-16.857h2.5532v16.857zm-2.7686-21.426c0-0.58448 0.14355-1.0126 0.43066-1.2843 0.28711-0.27173 0.64599-0.40759 1.0767-0.40759 0.41016 0 0.76391 0.13843 1.0613 0.41528 0.29736 0.27686 0.44604 0.70239 0.44604 1.2766s-0.14868 1.0023-0.44604 1.2843c-0.29736 0.28198-0.65112 0.42297-1.0613 0.42297-0.43067 0-0.78955-0.14099-1.0767-0.42297-0.28711-0.28198-0.43066-0.71008-0.43066-1.2843zm18.549 21.426l-0.50757-2.3994h-0.12305c-0.84082 1.0562-1.6791 1.7714-2.5148 2.1456-0.8357 0.37427-1.879 0.5614-3.13 0.5614-1.6714 0-2.9813-0.43066-3.9298-1.292s-1.4227-2.0867-1.4227-3.676c0-3.4043 2.7224-5.1885 8.1672-5.3525l2.8608-0.092286v-1.0459c0-1.3228-0.28454-2.2994-0.85364-2.9301-0.5691-0.63062-1.4791-0.94592-2.7301-0.94592-1.4048 0-2.9941 0.43066-4.7681 1.292l-0.78442-1.9534c0.83057-0.45117 1.7406-0.80493 2.7301-1.0613 0.98951-0.25635 1.9816-0.38452 2.9762-0.38452 2.0098 0 3.4991 0.44604 4.4681 1.3381 0.969 0.8921 1.4535 2.3225 1.4535 4.2913v11.505h-1.8918zm-5.7678-1.7996c1.5894 0 2.8378-0.43579 3.7452-1.3074 0.90748-0.87159 1.3612-2.0918 1.3612-3.6606v-1.5227l-2.5532 0.10767c-2.0303 0.071778-3.494 0.38708-4.3912 0.94592-0.89722 0.55884-1.3458 1.4278-1.3458 2.6071 0 0.92286 0.27942 1.6252 0.83826 2.1072 0.55884 0.48194 1.3407 0.7229 2.3456 0.7229zm15.473 1.7996h-2.5532v-23.933h2.5532v23.933zm16.288-4.5989c0 1.5689-0.58447 2.7788-1.7534 3.6299-1.169 0.85108-2.8096 1.2766-4.9219 1.2766-2.2354 0-3.9785-0.35376-5.2295-1.0613v-2.3687c0.81006 0.41016 1.6791 0.73315 2.6071 0.96899s1.8226 0.35376 2.684 0.35376c1.333 0 2.3584-0.21277 3.0762-0.6383s1.0767-1.0741 1.0767-1.9457c0-0.65625-0.28454-1.2176-0.85364-1.6842s-1.6791-1.0177-3.33-1.6534c-1.5689-0.58448-2.684-1.0946-3.3453-1.5304s-1.1536-0.93054-1.4766-1.4843c-0.323-0.55371-0.4845-1.2151-0.4845-1.9841 0-1.374 0.55883-2.4584 1.6765-3.2531 1.1177-0.79468 2.6506-1.192 4.5989-1.192 1.815 0 3.5889 0.36914 5.3218 1.1074l-0.90747 2.0764c-1.6919-0.69727-3.2248-1.0459-4.5989-1.0459-1.21 0-2.1226 0.1897-2.7378 0.56909-0.61524 0.3794-0.92285 0.90234-0.92285 1.5688 0 0.45117 0.11536 0.83569 0.34607 1.1536 0.23071 0.31787 0.60241 0.62036 1.1151 0.90747s1.4971 0.70239 2.9531 1.2458c1.9995 0.72803 3.3505 1.4612 4.0529 2.1995 0.7024 0.73828 1.0536 1.6663 1.0536 2.7839z" fill="#182650" fill-rule="nonzero"/>\n </g>\n </g>\n </g>\n </svg>\n <span class=\'buv-u-visually-hidden\'>',"</span>\n "])),cee("text.motto"))}var Ure,Fre,zre,Hre=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.className,r=e.showMotto,n=void 0!==r&&r;return Fe(Nre||(Nre=w(["\n ","\n <a href='https://www.blockcerts.org' title='","' class$='buv-c-logo ","'>\n ","\n </a>"])),jre,cee("text.blockcertsHint"),t,n?Bre():Dre())},qre=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.forceInPlace,r=void 0!==t&&t,n=e.interactive,i=void 0!==n&&n,a=e.theme,o=["buv-c-footer",r?"buv-c-footer--forced":"",a===zee?"buv-c-footer--dark":""].join(" ");return Fe(Ure||(Ure=w(["\n ","\n <footer class$='","'>\n ","\n ","\n </footer>"])),Lre,o,i?Fe(Fre||(Fre=w(["<section>\n <buv-file-upload></buv-file-upload>\n <buv-verify-other-certificate></buv-verify-other-certificate>\n </section>"]))):"",Hre())}),{mapStateToProps:function(e){return{theme:nte(e)}},ownProps:{forceInPlace:Boolean,interactive:Boolean}});window.customElements.define("buv-footer",qre);var Vre,Kre,Wre=Fe(zre||(zre=w(["<style>.buv-o-overlay{z-index:100;box-shadow:0 0 30px rgba(0,0,0,0.25);background-color:#fff}.buv-c-modal{position:fixed;width:100%;height:100%;background-color:rgba(3,21,50,0.7);top:0;left:0;z-index:1000}.buv-c-modal.is-hidden{display:none}.buv-c-modal__content{position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);width:100vw;min-width:300px;max-width:600px;min-height:calc(600px - 50px);padding:49px 38px 98px;box-sizing:border-box}@media only screen and (max-width: 600px){.buv-c-modal__content{height:100vh;min-height:100vh;top:0;left:0;transform:none}}.buv-c-modal__close-button{top:25px;right:25px}\n</style>"]))),Jre=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.handleClick=e.handleClick.bind(b(e)),e}return s(r,[{key:"close",value:function(){this.isOpen=!1}},{key:"handleClick",value:function(){this.close(),this._props.onClose()}},{key:"_propertiesChanged",value:function(e,t,n){this._props=e,y(l(r.prototype),"_propertiesChanged",this).call(this,e,t,n)}},{key:"_render",value:function(){var e=["buv-c-modal","buv-qa-modal",this.isOpen?"":"is-hidden"].join(" ");return Fe(Vre||(Vre=w(["\n ","\n <div class$='","' onclick='","'>\n <div class='buv-c-modal__content buv-o-overlay' onclick='","'>\n ","\n <slot></slot>\n </div> \n </div>\n "])),Wre,e,this.handleClick,(function(e){e.stopPropagation()}),Gte({className:"buv-c-modal__close-button",onClick:this.handleClick}))}}],[{key:"properties",get:function(){return{isOpen:Boolean,onClose:Function}}}]),r}(Ke);window.customElements.define("buv-modal",Jre);var Gre,$re,Xre,Yre,Qre,Zre,ene=Fe(Kre||(Kre=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}\n</style>"],["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}\n</style>"]))),tne=Fe(Gre||(Gre=w(["<style>.buv-c-error-message{background:rgba(208,2,27,0.1);border-radius:2px;letter-spacing:.05px;padding:10px}.buv-c-error-message--solid{background:#fff;border-radius:2px 2px 0 0;margin:0}.buv-c-error-message-title{color:#d0021b;font-weight:bold;display:block;margin-bottom:5px;font-size:15px}\n</style>"])));function rne(e){return function(e){return e.indexOf(".")>-1&&-1===e.indexOf(" ")}(e)?cee(e):e}function nne(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e)return null;var r=["buv-c-error-message","buv-qa-error-message",t?"buv-c-error-message--solid":""].join(" ");return Fe($re||($re=w(["\n ","\n <p class$='","'>\n <span class='buv-c-error-message-title'>","</span>\n ","\n </p>"])),tne,r,cee("errors.errorLabel"),rne(e))}function ine(e){var t=e.label;e.code;var r,n=e.status,i=e.errorMessage,a=e.isParent,o=e.isFirst,s=e.isTestChain,u=["buv-o-text-15","buv-c-verification-step","buv-c-badge",o?"is-first":"","is-".concat(n),s?"is-test":""].join(" ");return r=a?Fe(Xre||(Xre=w(["","<dt class$='","'>","</dt>"])),ene,u,t):Fe(Yre||(Yre=w(["","<dd class='buv-c-verification-step buv-c-verification-substep buv-o-text-12'>\n ","\n ","\n </dd>"])),ene,t,nne(i)),Fe(Qre||(Qre=w(["",""])),r)}var ane,one,sne,une=Fe(Zre||(Zre=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}.buv-c-final-verification-step{white-space:nowrap;opacity:0;position:relative;font-weight:600;font-size:15px;color:#031532;margin-top:15px}.buv-c-final-verification-step.is-success{font-size:21px;color:#2ab27b;line-height:19px}.buv-c-final-verification-step--standalone{margin-top:0}.buv-c-final-verification-step.is-test,.buv-c-final-verification-step--standalone.is-success{font-size:15px;color:#031532}.buv-c-final-verification-step.is-failure{font-size:13px;font-weight:400}.buv-c-verification-step__description{margin:0}.buv-c-final-verification-step.is-visible{opacity:1}.buv-c-final-verification-step.is-visible::after{opacity:1}.buv-c-final-verification-step::after{position:absolute;content:'';height:26px;width:23px;left:-37px;top:-3px;background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyM3B4IiB2aWV3Qm94PSIwIDAgMjAgMjMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZyBpZD0iVmVyaWZpY2F0aW9uIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI1NC4wMDAwMDAsIC00NzQuMDAwMDAwKSIgZmlsbD0iIzJBQjI3QiI+CiAgICAgICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQ4LjAwMDAwMCwgNDY5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2LDUgTDYsOS4xODE4MTgxOCBMNiwxNS40NTQ1NDU1IEM2LDIxLjI1NjgxODIgMTAuMjY2NjY2NywyNi42ODI3MjczIDE2LDI4IEMyMS43MzMzMzMzLDI2LjY4MjcyNzMgMjYsMjEuMjU2ODE4MiAyNiwxNS40NTQ1NDU1IEwyNiw5LjE4MTgxODE4IEwxNiw1IEwxNiw1IFogTTksMTcuNzUzNzE1NSBMMTAuNTI3NSwxNi4yNTY5MDAyIEwxMy4zMzMzMzMzLDE4Ljk5NTc1MzcgTDIwLjQ3MjUsMTIgTDIyLDEzLjUwNzQzMSBMMTMuMzMzMzMzMywyMiBMOSwxNy43NTM3MTU1IFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=\");background-repeat:no-repeat;background-position:center;background-size:contain;z-index:3}.buv-c-final-verification-step.is-test::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4IiBmaWxsPSIjRjVBNjIzIj48cGF0aCBkPSJNLjUgMTZoMTdMOSAxIC41IDE2em05LjUtMkg4di0yaDJ2MnptMC0zSDhWN2gydjR6Ii8+PC9zdmc+IA==\")}.buv-c-final-verification-step.is-failure::after{content:'\\274C';font-size:17px;top:-1px;color:#d0021b;background:none}.buv-c-final-verification-step--standalone-wrapper{padding:10px;box-sizing:border-box;border-left:3px solid}.buv-c-final-verification-step--standalone-wrapper.is-success{background-color:rgba(42,178,123,0.1);border-color:#2ab27b}.buv-c-final-verification-step--standalone-wrapper.is-failure{background-color:rgba(208,2,27,0.1);border-color:#d0021b}.buv-c-final-verification-step--standalone-wrapper.is-test{background-color:rgba(245,166,35,0.1);border-color:#f5a623}.buv-c-final-verification-step--standalone{margin:0 0 5px 30px;white-space:unset}.buv-c-final-verification-step--standalone.is-failure{margin-bottom:0}.buv-c-final-verification-step--standalone::after{left:-30px}.buv-c-verification-substep.is-final{display:none;line-height:1.35}.buv-c-verification-substep.is-final.is-visible{display:block}.buv-c-verification-substep::after{display:none}.buv-u-excluded-from-flow{position:absolute}.buv-u-full-width{width:100%}\n</style>"],["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-badge{position:relative}.buv-c-badge::before{content:'';position:absolute;left:-32px;top:0;width:12px;height:12px;background-color:#fff;border-radius:50%;-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out;z-index:2;box-sizing:content-box;box-shadow:0 2px 4px 0 rgba(22,40,55,0.21)}.buv-c-badge--medium::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-badge--large::before{width:38px;height:38px;left:-45px;top:-9px}.buv-c-verification-step{position:relative;margin:15px 0 5px;font-weight:600}.buv-c-verification-step.is-first{margin-top:0}.buv-c-verification-substep{margin:0;font-weight:400;color:rgba(3,21,50,0.7);padding:3px 0 0;line-height:1.71428571}.buv-c-verification-step.is-success::before,.buv-c-verification-step.is-failure::before{left:-38px;top:-4px;width:24px;height:24px}.buv-c-verification-substep::before{left:-28px;top:10px;width:4px;height:4px;background-color:rgba(255,255,255,0.8)}.buv-c-verification-step::after{content:'';position:absolute;z-index:3;-webkit-transition:opacity .3s ease-out .2s;-o-transition:opacity .3s ease-out .2s;transition:opacity .3s ease-out .2s;opacity:0}.buv-c-verification-step.is-success::after,.buv-c-verification-step.is-failure::after{opacity:1}.buv-c-verification-step.is-success::after{border:solid #2ab27b;border-width:0 2px 2px 0;left:-29px;width:5px;height:11px;transform:rotate(45deg)}.buv-c-verification-step.is-success.is-test::after{border-color:#031532}.buv-c-verification-step.is-failure::after{content:'\\\\274C';left:-32px;top:-1px;font-size:11px;color:#d0021b}@supports (-ms-ime-align: auto){.buv-c-verification-step.is-failure::after{left:-34px}}.buv-c-final-verification-step{white-space:nowrap;opacity:0;position:relative;font-weight:600;font-size:15px;color:#031532;margin-top:15px}.buv-c-final-verification-step.is-success{font-size:21px;color:#2ab27b;line-height:19px}.buv-c-final-verification-step--standalone{margin-top:0}.buv-c-final-verification-step.is-test,.buv-c-final-verification-step--standalone.is-success{font-size:15px;color:#031532}.buv-c-final-verification-step.is-failure{font-size:13px;font-weight:400}.buv-c-verification-step__description{margin:0}.buv-c-final-verification-step.is-visible{opacity:1}.buv-c-final-verification-step.is-visible::after{opacity:1}.buv-c-final-verification-step::after{position:absolute;content:'';height:26px;width:23px;left:-37px;top:-3px;background-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyM3B4IiB2aWV3Qm94PSIwIDAgMjAgMjMiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8ZyBpZD0iVmVyaWZpY2F0aW9uIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iMyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI1NC4wMDAwMDAsIC00NzQuMDAwMDAwKSIgZmlsbD0iIzJBQjI3QiI+CiAgICAgICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQ4LjAwMDAwMCwgNDY5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2LDUgTDYsOS4xODE4MTgxOCBMNiwxNS40NTQ1NDU1IEM2LDIxLjI1NjgxODIgMTAuMjY2NjY2NywyNi42ODI3MjczIDE2LDI4IEMyMS43MzMzMzMzLDI2LjY4MjcyNzMgMjYsMjEuMjU2ODE4MiAyNiwxNS40NTQ1NDU1IEwyNiw5LjE4MTgxODE4IEwxNiw1IEwxNiw1IFogTTksMTcuNzUzNzE1NSBMMTAuNTI3NSwxNi4yNTY5MDAyIEwxMy4zMzMzMzMzLDE4Ljk5NTc1MzcgTDIwLjQ3MjUsMTIgTDIyLDEzLjUwNzQzMSBMMTMuMzMzMzMzMywyMiBMOSwxNy43NTM3MTU1IFoiIGlkPSJTaGFwZSI+PC9wYXRoPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=\");background-repeat:no-repeat;background-position:center;background-size:contain;z-index:3}.buv-c-final-verification-step.is-test::after{background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4IiBmaWxsPSIjRjVBNjIzIj48cGF0aCBkPSJNLjUgMTZoMTdMOSAxIC41IDE2em05LjUtMkg4di0yaDJ2MnptMC0zSDhWN2gydjR6Ii8+PC9zdmc+IA==\")}.buv-c-final-verification-step.is-failure::after{content:'\\\\274C';font-size:17px;top:-1px;color:#d0021b;background:none}.buv-c-final-verification-step--standalone-wrapper{padding:10px;box-sizing:border-box;border-left:3px solid}.buv-c-final-verification-step--standalone-wrapper.is-success{background-color:rgba(42,178,123,0.1);border-color:#2ab27b}.buv-c-final-verification-step--standalone-wrapper.is-failure{background-color:rgba(208,2,27,0.1);border-color:#d0021b}.buv-c-final-verification-step--standalone-wrapper.is-test{background-color:rgba(245,166,35,0.1);border-color:#f5a623}.buv-c-final-verification-step--standalone{margin:0 0 5px 30px;white-space:unset}.buv-c-final-verification-step--standalone.is-failure{margin-bottom:0}.buv-c-final-verification-step--standalone::after{left:-30px}.buv-c-verification-substep.is-final{display:none;line-height:1.35}.buv-c-verification-substep.is-final.is-visible{display:block}.buv-c-verification-substep::after{display:none}.buv-u-excluded-from-flow{position:absolute}.buv-u-full-width{width:100%}\n</style>"])));function cne(e,t){return e.description?Fe(ane||(ane=w(["<p class='buv-c-verification-step__description buv-qa-final-step-description'>","</p>"])),e.description.replace("${chain}",t)):""}function lne(e){return e.verificationStatus}function fne(e){return e.showVerificationModal}var dne,hne=Vee((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.chain,r=void 0===t?"":t,n=e.transactionLink,i=void 0===n?"":n,a=e.isTestChain,o=e.isVisible,s=void 0!==o&&o,u=e.finalStep,c=void 0===u?null:u,l=e.hideLink,f=void 0!==l&&l,d=e.status,h=void 0!==d&&d,p=e.standalone,v=void 0!==p&&p;if(c){var b=[v?"buv-c-final-verification-step--standalone-wrapper":"","is-".concat(h),a?"is-test":""].join(" "),g=["buv-c-final-verification-step","buv-qa-final-verification-step",v?"buv-c-final-verification-step--standalone":"","buv-qa-verification-step",s?"is-visible":"",a?"is-test":"","is-".concat(h),h&&!v?"buv-c-badge buv-c-badge--large":""].join(" "),m=["buv-c-verification-substep",v?"":"buv-u-excluded-from-flow","buv-u-full-width","buv-o-text-12","is-final",s?"is-visible":""].join(" "),y=c.label,_=cne(c,r),x=!f&&c.linkText?Fe(one||(one=w(["<a class='buv-o-link' href='","' hidden?='","'>\n <span class='buv-o-link__text--underline buv-qa-transaction-link'>","</span>\n </a>"])),i,!i,c.linkText):"";return Fe(sne||(sne=w(["\n ","\n <div class$='","'>\n <dt class$='","'>","</dt>\n <dd class$='","'>\n ","\n ","\n </dd>\n <slot></slot>\n </div>\n "])),une,b,g,y,m,_,x)}}),{mapStateToProps:function(e){return{finalStep:Nee(e),chain:See(e),transactionLink:xee(e),isTestChain:Eee(e),status:lne(e)}},ownProps:{isVisible:Boolean,hideLink:Boolean,standalone:Boolean}});window.customElements.define("buv-final-verification-step",hne);var pne,vne,bne,gne=Fe(dne||(dne=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-c-substeps-list__link::after{content:'';width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid #768087;display:inline-block;vertical-align:2px;margin:0 6px;-webkit-transition:-webkit-transform .3s ease-in;-o-transition:transform .3s ease-in;transition:transform .3s ease-in}.buv-c-substeps-list__link.is-open::after{transform:rotate(180deg)}.buv-c-substeps-list__list{max-height:0;overflow:hidden;-webkit-transition:max-height .3s ease-in;-o-transition:max-height .3s ease-in;transition:max-height .3s ease-in;padding-left:50px;margin-left:-50px;padding-top:5px}.buv-c-substeps-list__list.is-open{height:auto}\n</style>"]))),mne=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isOpen=!1,e.wasForcedOpen=!1,e.resetOpen=!1,e.toggleOpen=e.toggleOpen.bind(b(e)),e.totalHeight=0,e.heightWasReset=!1,e}return s(r,[{key:"toggleOpen",value:function(){this.wasForcedOpen&&!this.resetOpen&&(this.isOpen=!0,this.resetOpen=!0),this.isOpen=!this.isOpen}},{key:"_didRender",value:function(){if(!this.totalHeight){var e=this.shadowRoot.querySelectorAll(".buv-js-substeps-list__list")[0],t=e?Array.from(e.childNodes):[];this.totalHeight=t.reduce((function(e,t){return t.getBoundingClientRect?e+t.getBoundingClientRect().height:e}),0),this.wasForcedOpen&&!this.heightWasReset&&(e.style.maxHeight=this.totalHeight+"px",this.heightWasReset=!0)}}},{key:"_render",value:function(e){var t=e.subSteps,r=e.hasError;if(!t)return null;var n=this.isOpen;!this.wasForcedOpen&&r&&(n=!0,this.wasForcedOpen=!0);var i=t.filter((function(e){return e.status})),a=i.length,o="".concat(a," ").concat(cee("text","item",!0,a)),s=n?this.totalHeight:1,u=["buv-o-text-12","buv-o-link","buv-c-substeps-list__link",n?"is-open":""].join(" "),c=["buv-c-substeps-list__list","buv-js-substeps-list__list",n?"is-open":""].join(" ");return Fe(pne||(pne=w(["\n ","\n <a title='","' onclick='","' class$='","'>\n <span class='buv-o-link__text--underline'>","</span>\n </a>\n <div class$='","' style$='max-height: ","px'>\n ","\n </div>\n "])),gne,cee("text.substepsListHint"),this.toggleOpen,u,n?cee("text.substepsListClose"):o,c,s,i.map((function(e){return Fe(vne||(vne=w(["",""])),ine(e))})))}}],[{key:"properties",get:function(){return{subSteps:[],isOpen:Boolean,hasError:Boolean}}}]),r}(Ke);window.customElements.define("buv-substeps-list",mne);var yne,wne,_ne,xne,kne,Sne,Ene=Fe(bne||(bne=w(["<style>.buv-c-verification-process{position:relative}.buv-c-verification-progress-bar{position:absolute;left:13px;top:0;width:14px;display:flex;flex-direction:column;height:100%}.buv-c-verification-progress-bar__tube{min-height:14px;transition:flex .4s ease-in-out, max-height .4s ease-in;background-color:#2ab27b;border-radius:7px;flex-grow:0;opacity:0}.buv-c-verification-progress-bar__tube.has-started{flex-grow:1;opacity:1}.buv-c-verification-progress-bar__tube.is-test{background-color:#d8d8d8}.buv-c-verification-progress-bar__tube.has-errored{background-color:#d0021b}.buv-c-verification-progress-bar.no-transition{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.buv-c-verification-process__step-list{padding-left:46px;margin-top:0}.buv-u-visually-hidden{position:absolute !important;clip:rect(1px 1px 1px 1px);clip:rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height:1px !important;width:1px !important;overflow:hidden}\n</style>"]))),Ine=function(e){c(n,e);var r=m(n);function n(){return a(this,n),r.apply(this,arguments)}return s(n,[{key:"verificationInProgressTemplate",value:function(){return Fe(yne||(yne=w(["\n <span class='buv-u-visually-hidden'>","</span>\n <svg width='20' height='7' viewBox='0 0 120 30' xmlns='http://www.w3.org/2000/svg'><circle cx='15' cy='15' r='15'><animate attributeName='r' from='15' to='15' begin='0s' dur='0.8s' values='15;9;15' calcMode='linear' repeatCount='indefinite'/><animate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='0.8s' values='1;.5;1' calcMode='linear' repeatCount='indefinite'/></circle><circle cx='60' cy='15' r='9' fill-opacity=''.9'><animate attributeName='r' from='9' to='9' begin='0s' dur='0.8s' values='9;15;9' calcMode='linear' repeatCount='indefinite'/><animate attributeName='fill-opacity' from=''.5' to='.5' begin='0s' dur='0.8s' values='.5;1;.5' calcMode='linear' repeatCount='indefinite'/></circle><circle cx='105' cy='15' r='15'><animate attributeName='r' from='15' to='15' begin='0s' dur='0.8s' values='15;9;15' calcMode='linear' repeatCount='indefinite'/><animate attributeName='fill-opacity' from='1' to='1' begin='0s' dur='0.8s' values='1;.5;1' calcMode='linear' repeatCount='indefinite'/></circle></svg>\n "])),cee("text.verificationStepProgress"))}},{key:"_didRender",value:function(){this.listElement||(this.listElement=this.shadowRoot.querySelectorAll(".buv-js-verification-process__step-list")[0])}},{key:"_render",value:function(e){var r=this,n=e.steps;e.transactionLink;var i=e.hasError,a=e.isTestChain,o=n.filter((function(e){return e.status!==XB.DEFAULT})).map((function(e,n){return Fe(wne||(wne=w(["\n ","\n ","\n "])),ine(t(t({},e),{},{isParent:!0,isFirst:0===n,isTestChain:a})),e.status===XB.STARTED?Fe(_ne||(_ne=w(["",""])),r.verificationInProgressTemplate()):Fe(xne||(xne=w(["<buv-substeps-list subSteps='","' hasError?='","'></buv-substeps-list>"])),e.subSteps,i))})),s=["buv-c-verification-progress-bar__tube","buv-qa-verification-progress-bar__tube",i?"has-errored":"",a?"is-test":"",o.length?"has-started":""].join(" "),u="".concat(this.listElement?this.listElement.getBoundingClientRect().height:0,"px"),c=n.every((function(e){return e.status===XB.SUCCESS}))||n.some((function(e){return e.status===XB.FAILURE}));return c&&(u="100%"),Fe(kne||(kne=w(["\n ","\n <section class='buv-c-verification-process'>\n <div class='buv-c-verification-progress-bar' >\n <div class$='","' style$='max-height: ","'></div>\n </div> \n <dl class='buv-c-verification-process__step-list buv-js-verification-process__step-list'>\n ","\n <buv-final-verification-step isVisible='","'></buv-final-verification-step>\n </dl>\n </section>\n "])),Ene,s,u,o,c&&!i)}}],[{key:"properties",get:function(){return{steps:[],transactionLink:String,hasError:Boolean,isTestChain:Boolean}}}]),n}(Ke);window.customElements.define("buv-verification-process-raw",Ine);var Ane,Pne=Vee((function(e){var t=e.steps;e.transactionLink;var r=e.hasError,n=e.isTestChain;return Fe(Sne||(Sne=w(["<buv-verification-process-raw\n steps='","'\n hasError?='","'\n isTestChain?='","'\n style='max-width: 100%;'\n ></buv-verification-process-raw>"])),t,r,n)}),{mapStateToProps:function(e){return{steps:JSON.parse(JSON.stringify(Iee(e))),isTestChain:Eee(e),hasError:Pee(e)}}});window.customElements.define("buv-verification-process",Pne);var Tne,One=Vee((function(e){var t=e.isOpen,r=e.onClose;return Fe(Ane||(Ane=w(["\n ","\n <buv-modal isOpen?='","' onClose='","'>\n <div class='buv-c-verification-modal__content'>\n <buv-card-certificate class='buv-c-verification-modal__certificate' hideRecordLink hideVerifyButton></buv-card-certificate>\n <hr class='buv-c-verification-modal__separator'/>\n <buv-verification-process class='buv-c-verification-modal__process'></buv-verification-process>\n </div>\n <buv-footer forceInPlace></buv-footer>\n </buv-modal>\n "])),yre,t,r)}),{mapDispatchToProps:{onClose:lte.bind(null,!1)},mapStateToProps:function(e){return{isOpen:fne(e)}}});window.customElements.define("buv-verification-modal",One);var Cne,Mne,Rne=Fe(Tne||(Tne=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-drag-and-drop__droparea{z-index:100;background-color:rgba(0,0,0,0.1);display:none;position:absolute;top:0;left:0;width:100%;height:100%}.buv-c-drag-and-drop__droparea.is-active{display:block}\n</style>"])));var Nne=function(e){c(r,e);var t=m(r);function r(){var e;return a(this,r),(e=t.call(this)).isDraggedOver=!1,e.denyDrop=!1,e.handleDragEnter=e.handleDragEnter.bind(b(e)),e.handleDragOver=e.handleDragOver.bind(b(e)),e.handleDragLeave=e.handleDragLeave.bind(b(e)),e.handleDrop=e.handleDrop.bind(b(e)),e}return s(r,[{key:"handleDragEnter",value:function(){this.isDraggedOver=!0}},{key:"handleDragOver",value:function(e){e.preventDefault()}},{key:"handleDragLeave",value:function(){this.isDraggedOver=!1}},{key:"handleDrop",value:function(e){e.preventDefault(),this.isDraggedOver=!1;var t=e.dataTransfer.files[0];this.denyDrop=!function(e){var t=e.name;return"json"===t.substr(t.length-4,4)}(t),this.denyDrop||this._props.onDrop(t)}},{key:"_propertiesChanged",value:function(e,t,n){this._props=e,y(l(r.prototype),"_propertiesChanged",this).call(this,e,t,n)}},{key:"_render",value:function(){var e=["buv-c-drag-and-drop__droparea",this.isDraggedOver?"is-active":""].join(" "),t=this.denyDrop?cee("errors.invalidFormatDragAndDrop"):"";return Fe(Cne||(Cne=w(["\n ","\n <div ondragenter='","'>\n <div class$='","'\n ondragover='","'\n ondragleave='","'\n ondrop='","'\n ></div>\n <span>","</span>\n <slot></slot>\n </div>"])),Rne,this.handleDragEnter,e,this.handleDragOver,this.handleDragLeave,this.handleDrop,t)}}],[{key:"properties",get:function(){return{isDraggedOver:Boolean,denyDrop:Boolean,onDrop:Function}}}]),r}(Ke);window.customElements.define("buv-drag-and-drop-raw",Nne);var Lne,jne=Vee((function(e){return Fe(Mne||(Mne=w(["\n <buv-drag-and-drop-raw\n onDrop='","'\n >\n <slot></slot>\n</buv-drag-and-drop-raw>"])),e.onDrop)}),{mapDispatchToProps:{onDrop:kre}});window.customElements.define("buv-drag-and-drop",jne);var Dne,Bne,Une,Fne,zne,Hne,qne=Fe(Lne||(Lne=w(["<style>.buv-c-verifier-main{font-family:'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;color:#031532;position:relative}.buv-c-verifier-layout{display:flex;flex-direction:column}.buv-c-verifier-body{background-color:#fff;flex-grow:1}.buv-c-verifier-body--padded{padding:20px}\n</style>"]))),Vne=Fe(Dne||(Dne=w(["<style>.buv-o-link{cursor:pointer;text-decoration:none;color:currentColor}.buv-o-link__text--underline{border-bottom:1px solid}.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-card{position:relative;display:flex;margin-bottom:20px}.buv-c-card__img-wrapper{margin-right:1.5vw;min-width:50px;width:20%}.buv-c-card__img{max-width:100%;max-height:100%}.buv-c-card__title-wrapper{display:flex;flex-direction:column;justify-content:center}.buv-c-card__title{font-size:calc(16px + 0.5vw);margin-top:0;margin-bottom:0;font-weight:400;padding-right:100px}.buv-c-card__title--no-padding{padding:0}.buv-c-card__recipient{font-weight:600;margin:6px 0 12px}.buv-c-card__record-link{position:absolute;top:0;right:0;line-height:30px}.buv-c-card__record-link::after{content:'';border:solid currentColor;border-width:0 2px 2px 0;width:5px;height:5px;transform:rotate(-45deg);font-weight:bold;display:inline-block;margin-left:5px}.buv-c-card__verify-button{float:right}@media only screen and (max-width: 600px){.buv-c-card__title{font-size:16px}.buv-c-card__recipient{margin:6px 0}.buv-c-card__img-wrapper{margin-right:18px}}\n</style>"])));var Kne=Vee((function(e){var t=e.hasCertificateDefinition,r=e.recipientName,n=e.certificateTitle,i=e.issuedOn,a=e.issueDate,o=e.issuerName,s=e.recordLink,u=e.hideVerifyButton,c=e.hideRecordLink;if(!t)return null;s||c||(c=!0);var l=["buv-c-card__title",c?"buv-c-card__title--no-padding":""].join(" ");return Fe(Fne||(Fne=w(["\n ","\n <section class='buv-c-card'>\n <div class='buv-c-card__img-wrapper'>\n ","\n </div>\n <div class='buv-c-card__title-wrapper'>\n <h1 class$=",">","</h1>\n <h2 class$='"," buv-c-card__recipient'>","</h2>\n <span class='buv-o-text-12'>"," <time datetime$='","'>","</time> "," ","</span>\n </div>\n ","\n </section>\n ","\n "])),Vne,function(e){return new Promise((function(t){var r=new Image;r.addEventListener("load",(function(){t(Fe(Bne||(Bne=w(["<img src='","' alt='","' class='buv-c-card__img'/>"])),e.issuerLogo,e.issuerName))})),r.addEventListener("error",(function(){t(Fe(Une||(Une=w(["<p class='buv-o-text-15'>","</p>"])),e.issuerName))})),r.src=e.issuerLogo}))}(e),l,n,l,r,cee("text.issued"),i,a,cee("text.by"),o,c?"":Fe(zne||(zne=w(["<a class='buv-o-text-12 buv-o-link buv-c-card__record-link qa-card-record-link' href='","' target='_blank'>\n <span class='buv-o-link__text--underline'>","</span>\n </a>"])),s,cee("text.viewRecord")),u?"":Fe(Hne||(Hne=w(["<buv-final-verification-step class='buv-c-fullscreen-certificate__verification-status' isVisible hideLink standalone>\n <buv-verify-button type='link'>","</buv-verify-button>\n </buv-final-verification-step>"])),cee("text.verifyAgain")))}),{mapStateToProps:function(e){return{hasCertificateDefinition:!!fee(e),recipientName:pee(e),certificateTitle:vee(e),issueDate:hee(e),issuedOn:dee(e),issuerName:bee(e),issuerLogo:gee(e),recordLink:yee(e)}},ownProps:{hideRecordLink:Boolean,hideVerifyButton:Boolean}});window.customElements.define("buv-card-certificate",Kne);
|
|
217
217
|
/**
|
|
218
218
|
* @license
|
|
219
219
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -249,7 +249,7 @@ var Wne,Jne,Gne=function(e){return function(e){return e.__litDirective=!0,e}((fu
|
|
|
249
249
|
<buv-verify-button type='link'>${cee("text.verifyAgain")}</buv-verify-button>
|
|
250
250
|
</buv-final-verification-step>
|
|
251
251
|
</div>
|
|
252
|
-
`:null}),{mapStateToProps:e=>({hasCertificateDefinition:!!fee(e),displayHTML:mee(e),clickableUrls:ote(e)})});var nae;window.customElements.define("buv-full-certificate",rae);var iae=Fe(nae||(nae=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-certificate--fixed-width{max-width:460px;min-width:0;margin:0 auto}.buv-c-fullscreen-certificate{z-index:200;position:fixed;top:0;left:0;background-color:#fff;width:100vw;height:100vh;overflow:auto;box-sizing:border-box}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate{padding-top:170px}}.buv-c-fullscreen-certificate-header{box-shadow:0 1px 5px rgba(0,0,0,0.15);width:100%;background-color:#fff}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate-header{position:fixed;top:0;z-index:10}}.buv-c-fullscreen-certificate-header__content{max-width:1440px;margin:0 auto;padding:20px;display:flex;align-items:center;position:relative;box-sizing:border-box}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate-header__content{flex-direction:column;justify-content:left;align-items:unset}}.buv-c-fullscreen-certificate__title{margin:0 30px 0 0}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__title{margin-bottom:10px}}.buv-c-fullscreen-certificate__close{right:20px}.buv-c-fullscreen-certificate__content{padding:20px;display:flex;max-width:1440px;margin:20px auto 0}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__content{flex-direction:column-reverse;margin-top:0}}.buv-c-fullscreen-certificate__details{display:flex;flex-grow:1;flex-direction:column;max-width:280px;min-width:220px;margin-right:20px}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__details{max-width:100vw;margin:20px 0 0}}.buv-c-fullscreen-certificate__verification-status{margin-bottom:15px}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__verification-status{position:absolute;top:90px;width:calc(100% - 40px);margin:0}}.buv-c-fullscreen-certificate__details-item{margin-top:5px}.buv-c-fullscreen-certificate__separator{margin-top:30px;padding-top:30px;border-top:1px solid #f1f2f3}.buv-c-fullscreen-certificate__certificate{box-shadow:0 1px 5px rgba(0,0,0,0.15);padding:20px;background-color:#fff;font-family:serif;text-align:center;color:#49555f;font-size:12px;word-wrap:break-word;min-height:calc(100vh - 145px);box-sizing:border-box;margin:0 auto;min-width:600px;line-height:initial}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__certificate{min-width:unset;width:100%;overflow:auto}}.buv-c-fullscreen-certificate__verify-other{margin-top:20px}\n</style>"])));const aae=Vee((function({clickableUrls:e,hasCertificateDefinition:t,recipientName:r,displayHTML:n,onClose:i}){if(!t)return null;const a=["buv-c-fullscreen-certificate__certificate","qa-fullscreen-certificate"];return n&&W9.certificates.displayHtmlHasNoWidthConstraint(n)&&a.push("buv-c-certificate--fixed-width"),Fe`
|
|
252
|
+
`:null}),{mapStateToProps:e=>({hasCertificateDefinition:!!fee(e),displayHTML:mee(e),clickableUrls:ote(e)})});var nae;window.customElements.define("buv-full-certificate",rae);var iae=Fe(nae||(nae=w(["<style>.buv-o-text-11{font-size:11px}.buv-o-text-12{font-size:12px}.buv-o-text-13{font-size:13px}.buv-o-text-15{font-size:15px;line-height:20px}.buv-c-certificate--fixed-width{max-width:460px;min-width:0;margin:0 auto}.buv-c-fullscreen-certificate{z-index:200;position:fixed;top:0;left:0;background-color:#fff;width:100vw;height:100vh;overflow:auto;box-sizing:border-box}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate{padding-top:170px}}.buv-c-fullscreen-certificate-header{box-shadow:0 1px 5px rgba(0,0,0,0.15);width:100%;background-color:#fff}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate-header{position:fixed;top:0;z-index:10}}.buv-c-fullscreen-certificate-header__content{max-width:1440px;margin:0 auto;padding:20px;display:flex;align-items:center;position:relative;box-sizing:border-box}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate-header__content{flex-direction:column;justify-content:left;align-items:unset}}.buv-c-fullscreen-certificate__title{margin:0 30px 0 0}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__title{margin-bottom:10px}}.buv-c-fullscreen-certificate__close{top:27px;right:20px}.buv-c-fullscreen-certificate__content{padding:20px;display:flex;max-width:1440px;margin:20px auto 0}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__content{flex-direction:column-reverse;margin-top:0}}.buv-c-fullscreen-certificate__details{display:flex;flex-grow:1;flex-direction:column;max-width:280px;min-width:220px;margin-right:20px}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__details{max-width:100vw;margin:20px 0 0}}.buv-c-fullscreen-certificate__verification-status{margin-bottom:15px}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__verification-status{position:absolute;top:90px;width:calc(100% - 40px);margin:0}}.buv-c-fullscreen-certificate__details-item{margin-top:5px}.buv-c-fullscreen-certificate__separator{margin-top:30px;padding-top:30px;border-top:1px solid #f1f2f3}.buv-c-fullscreen-certificate__certificate{box-shadow:0 1px 5px rgba(0,0,0,0.15);padding:20px;background-color:#fff;font-family:serif;text-align:center;color:#49555f;font-size:12px;word-wrap:break-word;min-height:calc(100vh - 145px);box-sizing:border-box;margin:0 auto;min-width:600px;line-height:initial}@media only screen and (max-width: 750px){.buv-c-fullscreen-certificate__certificate{min-width:unset;width:100%;overflow:auto}}.buv-c-fullscreen-certificate__verify-other{margin-top:20px}\n</style>"])));const aae=Vee((function({clickableUrls:e,hasCertificateDefinition:t,recipientName:r,displayHTML:n,onClose:i}){if(!t)return null;const a=["buv-c-fullscreen-certificate__certificate","qa-fullscreen-certificate"];return n&&W9.certificates.displayHtmlHasNoWidthConstraint(n)&&a.push("buv-c-certificate--fixed-width"),Fe`
|
|
253
253
|
${iae}
|
|
254
254
|
<section class='buv-c-fullscreen-certificate'>
|
|
255
255
|
<header class='buv-c-fullscreen-certificate-header'>
|