diff --git a/negotiator-237551cd4e104f4399c7.js b/negotiator-237551cd4e104f4399c7.js deleted file mode 100644 index 937fd13f..00000000 --- a/negotiator-237551cd4e104f4399c7.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see negotiator-237551cd4e104f4399c7.js.LICENSE.txt */ -(self.webpackChunknegotiator=self.webpackChunknegotiator||[]).push([[817],{2817:function(e,t,n){!function(e){"use strict";function t(e){if(Array.isArray(e))return e}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--r){var a=this.tryEntries[r],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var i=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(i&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;S(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(f);var p,d=f.exports(),h=d;try{regeneratorRuntime=d}catch(e){"object"===("undefined"==typeof globalThis?"undefined":c(globalThis))?globalThis.regeneratorRuntime=d:Function("r","regeneratorRuntime = r")(d)}function v(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e){return t(e)||v(e)||a(e)||o()}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,u=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw u}}}}var x="function"==typeof queueMicrotask?queueMicrotask:function(e){return(p||(p=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},k=function(){var e,t=[];return{deliver:function(n){return s(h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.push(n),e&&(e(t.shift()),e=void 0);case 2:case"end":return r.stop()}}),r)})))()},receive:function(){return new Promise((function(n){var r=t.shift();if(r)return n(r);e=n}))}}},E="INIT",I="SUBSCRIBE",S="UNSUBSCRIBE",A="UPDATED",R="SNAPSHOT",T="EXIT",_="object"===("undefined"==typeof self?"undefined":c(self))&&self.self===self&&self||"object"===(void 0===n.g?"undefined":c(n.g))&&n.g.global===n.g&&n.g||"object"===("undefined"==typeof window?"undefined":c(window))&&window.window===window&&window;_.FCL_REGISTRY=null==_.FCL_REGISTRY?{}:_.FCL_REGISTRY;var C,O=0,P=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(a,o){var u=r.expectReply||!1,i=null!=r.timeout?r.timeout:5e3;u&&i&&setTimeout((function(){return o(new Error("Timeout: ".concat(i,"ms passed without a response.")))}),i);var s={to:e,from:r.from,tag:t,data:n,timeout:i,reply:a,reject:o};try{_.FCL_REGISTRY[e]&&_.FCL_REGISTRY[e].mailbox.deliver(s),u||a(!0)}catch(t){console.error("FCL.Actor -- Could Not Deliver Message",s,_.FCL_REGISTRY[e],t)}}))},N=function(e){delete _.FCL_REGISTRY[e]},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var t=s(h.mark((function t(n){var r;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof e.INIT){t.next=3;break}return t.next=3,e.INIT(n);case 3:return t.next=6,n.receive();case 6:if(r=t.sent,t.prev=7,r.tag!==T){t.next=13;break}if("function"!=typeof e.TERMINATE){t.next=12;break}return t.next=12,e.TERMINATE(n,r,r.data||{});case 12:return t.abrupt("break",25);case 13:return t.next=15,e[r.tag](n,r,r.data||{});case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(7),console.error("".concat(n.self()," Error"),r,t.t0);case 20:return t.prev=20,t.abrupt("continue",3);case 23:t.next=3;break;case 25:case"end":return t.stop()}}),t,null,[[7,17,20,23]])})));return function(e){return t.apply(this,arguments)}}()},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t&&(t=++O),null!=_.FCL_REGISTRY[t])return t;_.FCL_REGISTRY[t]={addr:t,mailbox:k(),subs:new Set,kvs:{},error:null};var n={self:function(){return t},receive:function(){return _.FCL_REGISTRY[t].mailbox.receive()},send:function(e,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a.from=t,P(e,n,r,a)},sendSelf:function(e,n,r){_.FCL_REGISTRY[t]&&P(t,e,n,r)},broadcast:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.from=t;var a,o=w(_.FCL_REGISTRY[t].subs);try{for(o.s();!(a=o.n()).done;){var u=a.value;P(u,e,n,r)}}catch(e){o.e(e)}finally{o.f()}},subscribe:function(e){return null!=e&&_.FCL_REGISTRY[t].subs.add(e)},unsubscribe:function(e){return null!=e&&_.FCL_REGISTRY[t].subs.delete(e)},subscriberCount:function(){return _.FCL_REGISTRY[t].subs.size},hasSubs:function(){return!!_.FCL_REGISTRY[t].subs.size},put:function(e,n){null!=e&&(_.FCL_REGISTRY[t].kvs[e]=n)},get:function(e,n){var r=_.FCL_REGISTRY[t].kvs[e];return null==r?n:r},delete:function(e){delete _.FCL_REGISTRY[t].kvs[e]},update:function(e,n){null!=e&&(_.FCL_REGISTRY[t].kvs[e]=n(_.FCL_REGISTRY[t].kvs[e]))},keys:function(){return Object.keys(_.FCL_REGISTRY[t].kvs)},all:function(){return _.FCL_REGISTRY[t].kvs},where:function(e){return Object.keys(_.FCL_REGISTRY[t].kvs).reduce((function(n,r){return e.test(r)?b(b({},n),{},g({},r,_.FCL_REGISTRY[t].kvs[r])):n}),{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach((function(n){return _.FCL_REGISTRY[t].kvs[n]=e[n]}))},fatalError:function(e){_.FCL_REGISTRY[t].error=e;var n,r=w(_.FCL_REGISTRY[t].subs);try{for(r.s();!(n=r.n()).done;){var a=n.value;P(a,A)}}catch(e){r.e(e)}finally{r.f()}}};return"object"===c(e)&&(e=B(e)),x(s(h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(n);case 2:N(t);case 3:case"end":return r.stop()}}),r)})))),t};function U(e,t,n){t(e);var r="@EXIT",a=L(function(){var t=s(h.mark((function t(a){var o,u;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a.send(e,I);case 1:return t.next=4,a.receive();case 4:if(o=t.sent,u=_.FCL_REGISTRY[e].error,o.tag!==r){t.next=9;break}return a.send(e,S),t.abrupt("return");case 9:if(!u){t.next=13;break}return n(null,u),a.send(e,S),t.abrupt("return");case 13:n(o.data,null),t.next=1;break;case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());return function(){return P(a,r)}}function F(e,t){return t(e),P(e,R,null,{expectReply:!0,timeout:0})}var j="config",D="PUT_CONFIG",G="GET_CONFIG",M="GET_ALL_CONFIG",z="UPDATE_CONFIG",Y="DELETE_CONFIG",q="CLEAR_CONFIG",K="WHERE_CONFIG",H="CONFIG/UPDATED",W=function(e){return e},V=(g(C={},D,(function(e,t,n){var r=n.key,a=n.value;if(null==r)throw new Error("Missing 'key' for config/put.");e.put(r,a),e.broadcast(H,b({},e.all()))})),g(C,G,(function(e,t,n){var r=n.key,a=n.fallback;if(null==r)throw new Error("Missing 'key' for config/get");t.reply(e.get(r,a))})),g(C,M,(function(e,t){t.reply(b({},e.all()))})),g(C,z,(function(e,t,n){var r=n.key,a=n.fn;if(null==r)throw new Error("Missing 'key' for config/update");e.update(r,a||W),e.broadcast(H,b({},e.all()))})),g(C,Y,(function(e,t,n){var r=n.key;if(null==r)throw new Error("Missing 'key' for config/delete");e.delete(r),e.broadcast(H,b({},e.all()))})),g(C,q,(function(e,t){for(var n=0,r=Object.keys(e.all());n0&&void 0!==i[0]?i[0]:[],n=i.length>1?i[1]:void 0,t.length){e.next=4;break}return e.abrupt("return",n);case 4:return r=y(t),a=r[0],o=r.slice(1),e.next=7,X(a);case 7:if(null!=(u=e.sent)){e.next=10;break}return e.abrupt("return",Z(o,n));case 10:return e.abrupt("return",u);case 11:case"end":return e.stop()}}),e)}))),$.apply(this,arguments)}function Q(){return P(j,M,null,{expectReply:!0,timeout:10})}function ee(e){return P(j,z,{key:e,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:W}),oe()}function te(e){return P(j,Y,{key:e}),oe()}function ne(e){return P(j,K,{pattern:e},{expectReply:!0,timeout:10})}function re(e){return U(j,(function(){return L(V,j)}),e)}function ae(e){return P(j,q).then(oe(e))}function oe(e){return null!=e&&"object"===c(e)&&Object.keys(e).map((function(t){return J(t,e[t])})),{put:J,get:X,all:Q,first:Z,update:ee,delete:te,where:ne,subscribe:re,overload:ie}}L(V,j),oe.put=J,oe.get=X,oe.all=Q,oe.first=Z,oe.update=ee,oe.delete=te,oe.where=ne,oe.subscribe=re,oe.overload=ie;var ue=function(e){return e};function ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue;return new Promise(function(){var n=s(h.mark((function n(r,a){var o,u;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Q();case 2:return o=n.sent,n.prev=3,oe(e),n.t0=t,n.next=8,Q();case 8:return n.t1=n.sent,n.next=11,(0,n.t0)(n.t1);case 11:return u=n.sent,n.next=14,ae(o);case 14:r(u),n.next=22;break;case 17:return n.prev=17,n.t2=n.catch(3),n.next=21,ae(o);case 21:a(n.t2);case 22:case"end":return n.stop()}}),n,null,[[3,17]])})));return function(e,t){return n.apply(this,arguments)}}())}var se,ce,fe={can:!("undefined"==typeof window),get:(ce=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",JSON.parse(sessionStorage.getItem(t)));case 1:case"end":return e.stop()}}),e)}))),function(e){return ce.apply(this,arguments)}),put:(se=s(h.mark((function e(t,n){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sessionStorage.setItem(t,JSON.stringify(n)));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return se.apply(this,arguments)})};function le(e){return pe.apply(this,arguments)}function pe(){return(pe=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Object,e.t1=Object,e.next=4,oe().where(t);case 4:return e.t2=e.sent,e.t3=e.t1.entries.call(e.t1,e.t2).map((function(e){var n=u(e,2),r=n[0],a=n[1];return[r.replace(t,""),a]})),e.abrupt("return",e.t0.fromEntries.call(e.t0,e.t3));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}oe({"discovery.wallet.method.default":"IFRAME/RPC","fcl.storage.default":fe});var de="1.3.2";function he(e,t){if(!e){var n,r=new Error("INVARIANT ".concat(t));r.stack=r.stack.split("\n").filter((function(e){return!/at invariant/.test(e)})).join("\n");for(var a=arguments.length,o=new Array(a>2?a-2:0),u=2;u0?a-4:a;for(n=0;n>16&255,u[i++]=t>>8&255,u[i++]=255&t;return 2===o&&(t=Pe[e.charCodeAt(n)]<<2|Pe[e.charCodeAt(n+1)]>>4,u[i++]=255&t),1===o&&(t=Pe[e.charCodeAt(n)]<<10|Pe[e.charCodeAt(n+1)]<<4|Pe[e.charCodeAt(n+2)]>>2,u[i++]=t>>8&255,u[i++]=255&t),u},fromByteArray:function(e){for(var t,n=e.length,r=n%3,a=[],o=16383,u=0,i=n-r;ui?i:u+o));return 1===r?(t=e[n-1],a.push(Oe[t>>2]+Oe[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],a.push(Oe[t>>10]+Oe[t>>4&63]+Oe[t<<2&63]+"=")),a.join("")}},Oe=[],Pe=[],Ne="undefined"!=typeof Uint8Array?Uint8Array:Array,Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Le=0,Ue=Be.length;Le0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function je(e,t,n){for(var r,a,o=[],u=t;u>18&63]+Oe[a>>12&63]+Oe[a>>6&63]+Oe[63&a]);return o.join("")}Pe["-".charCodeAt(0)]=62,Pe["_".charCodeAt(0)]=63;var De={};function Ge(e){if(Array.isArray(e)){for(var t=[],n=0;n>1,f=-7,l=n?a-1:0,p=n?-1:1,d=e[t+l];for(l+=p,o=d&(1<<-f)-1,d>>=-f,f+=i;f>0;o=256*o+e[t+l],l+=p,f-=8);for(u=o&(1<<-f)-1,o>>=-f,f+=r;f>0;u=256*u+e[t+l],l+=p,f-=8);if(0===o)o=1-c;else{if(o===s)return u?NaN:1/0*(d?-1:1);u+=Math.pow(2,r),o-=c}return(d?-1:1)*u*Math.pow(2,o-r)},De.write=function(e,t,n,r,a,o){var u,i,s,c=8*o-a-1,f=(1<>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,u=f):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),(t+=u+l>=1?p/s:p*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=f?(i=0,u=f):u+l>=1?(i=(t*s-1)*Math.pow(2,a),u+=l):(i=t*Math.pow(2,l-1)*Math.pow(2,a),u=0));a>=8;e[n+d]=255&i,d+=h,i/=256,a-=8);for(u=u<0;e[n+d]=255&u,d+=h,u/=256,c-=8);e[n+d-h]|=128*v},function(e){var t=Ce,n=De,r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},e.INSPECT_MAX_BYTES=50;var a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|h(e,t),r=o(n),a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){var t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(e));if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);var a=function(e){if(u.isBuffer(e)){var t=0|d(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?o(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(e))}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return s(e),o(e<0?0:0|d(e))}function l(e){for(var t=e.length<0?0:0|d(e.length),n=o(t),r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function h(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(a)return r?-1:K(e).length;t=(""+t).toLowerCase(),a=!0}}function v(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,a){var o,u=1,i=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;u=2,i/=2,s/=2,n/=2}function c(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}if(a){var f=-1;for(o=n;oi&&(n=i-s),o=n;o>=0;o--){for(var l=!0,p=0;pa&&(r=a):r=a;var o,u=t.length;for(r>u/2&&(r=u/2),o=0;o>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function I(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:o>223?3:o>191?2:1;if(a+i<=n){var s=void 0,c=void 0,f=void 0,l=void 0;switch(i){case 1:o<128&&(u=o);break;case 2:128==(192&(s=e[a+1]))&&(l=(31&o)<<6|63&s)>127&&(u=l);break;case 3:s=e[a+1],c=e[a+2],128==(192&s)&&128==(192&c)&&(l=(15&o)<<12|(63&s)<<6|63&c)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=e[a+1],c=e[a+2],f=e[a+3],128==(192&s)&&128==(192&c)&&128==(192&f)&&(l=(15&o)<<18|(63&s)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,i=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),a+=i}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr.length?(u.isBuffer(o)||(o=u.from(o)),o.copy(r,a)):Uint8Array.prototype.set.call(r,o,a);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,a)}a+=o.length}return r},u.byteLength=h,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(t+=" ... "),""},r&&(u.prototype[r]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,a){if(V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(o,i),f=this.slice(r,a),l=e.slice(t,n),p=0;p>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function R(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,a,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r,a){M(t,r,a,e,n,7);var o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;var u=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=u,u>>=8,e[n++]=u,u>>=8,e[n++]=u,u>>=8,e[n++]=u,n}function B(e,t,n,r,a){M(t,r,a,e,n,7);var o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;var u=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=u,u>>=8,e[n+2]=u,u>>=8,e[n+1]=u,u>>=8,e[n]=u,n+8}function L(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,r,a,o){return t=+t,r>>>=0,o||L(e,0,r,4),n.write(e,t,r,a,23,4),r+4}function F(e,t,r,a,o){return t=+t,r>>>=0,o||L(e,0,r,8),n.write(e,t,r,a,52,8),r+8}u.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],a=1,o=0;++o>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e+--t],a=1;t>0&&(a*=256);)r+=this[e+--t]*a;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Z((function(e){z(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);var r=t+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,24),a=this[++e]+this[++e]*Math.pow(2,8)+this[++e]*Math.pow(2,16)+n*Math.pow(2,24);return BigInt(r)+(BigInt(a)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);var r=t*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e],a=this[++e]*Math.pow(2,24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+n;return(BigInt(r)<>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Z((function(e){z(e>>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);var r=this[e+4]+this[e+5]*Math.pow(2,8)+this[e+6]*Math.pow(2,16)+(n<<24);return(BigInt(r)<>>=0,"offset");var t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);var r=(t<<24)+this[++e]*Math.pow(2,16)+this[++e]*Math.pow(2,8)+this[++e];return(BigInt(r)<>>=0,t||O(e,4,this.length),n.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||P(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||P(this,e,t,n,Math.pow(2,8*n)-1,0);var a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Z((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var a=Math.pow(2,8*n-1);P(this,e,t,n,a-1,-a)}var o=0,u=1,i=0;for(this[t]=255&e;++o>0)-i&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var a=Math.pow(2,8*n-1);P(this,e,t,n,a-1,-a)}var o=n-1,u=1,i=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===i&&0!==this[t+o+1]&&(i=1),this[t+o]=(e/u>>0)-i&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Z((function(e){return N(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?">= 0".concat(i," and < 2").concat(i," ** ").concat(8*(o+1)).concat(i):">= -(2".concat(i," ** ").concat(8*(o+1)-1).concat(i,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(i):">= ".concat(t).concat(i," and <= ").concat(n).concat(i),new j.ERR_OUT_OF_RANGE("value",u,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Y(t,e.length-(n+1))}(r,a,o)}function z(e,t){if("number"!=typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(c(t))}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,n){var r='The value of "'.concat(e,'" is out of range.'),a=n;return Number.isInteger(n)&&Math.abs(n)>Math.pow(2,32)?a=G(String(n)):"bigint"==typeof n&&(a=String(n),(n>Math.pow(BigInt(2),BigInt(32))||n<-Math.pow(BigInt(2),BigInt(32)))&&(a=G(a)),a+="n"),r+" It must be ".concat(t,". Received ").concat(a)}),RangeError);var q=/[^+/0-9A-Za-z-_]/g;function K(e,t){var n;t=t||1/0;for(var r=e.length,a=null,o=[],u=0;u55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){var a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}var X=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,a=0;a<16;++a)t[r+a]=e[n]+e[a];return t}();function Z(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}}(_e);var He={exports:{}};!function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response}(He,He.exports);var We=He.exports;function Ve(e){return null==e?null:e.replace(/^0x/,"").replace(/^Fx/,"")}function Je(e){return null==e?null:"0x"+Ve(e)}var Xe=function(e){Ie(n,e);var t=Te(n);function n(e){var r,a=e.error,o=e.hostname,u=e.path,i=e.method,s=e.requestBody,c=e.responseBody,f=e.responseStatusText,l=e.statusCode;be(this,n);var p="\n HTTP Request Error: An error occurred when interacting with the Access API.\n ".concat(a?"error=".concat(a):"","\n ").concat(o?"hostname=".concat(o):"","\n ").concat(u?"path=".concat(u):"","\n ").concat(i?"method=".concat(i):"","\n ").concat(s?"requestBody=".concat(s):"","\n ").concat(c?"responseBody=".concat(c):"","\n ").concat(f?"responseStatusText=".concat(f):"","\n ").concat(l?"statusCode=".concat(l):"","\n ");return(r=t.call(this,p)).name="HTTP Request Error",r.statusCode=l,r.errorMessage=a,r}return xe(n)}(Ke(Error));function Ze(e){return $e.apply(this,arguments)}function $e(){return $e=s(h.mark((function e(t){var n,r,a,o,u,i,c,f,l,p,d,v,y;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y=function(){return y=s(h.mark((function e(){var t,n,r=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:0,e.prev=1,e.next=4,d();case 4:return n=e.sent,e.abrupt("return",n);case 8:if(e.prev=8,e.t0=e.catch(1),![408,429,500,502,503,504].includes(e.t0.statusCode)){e.next=17;break}return e.next=14,new Promise((function(n,r){t1&&void 0!==a[1]?a[1]:{},he((r=a.length>2&&void 0!==a[2]?a[2]:{}).node,"SDK Send Execute Script Error: opts.node must be defined."),he(n.response,"SDK Send Execute Script Error: context.response must be defined."),he(n.Buffer,"SDK Send Execute Script Error: context.Buffer must be defined."),e.next=7,t;case 7:if(!(t=e.sent).block.id){e.next=14;break}return e.next=11,et(t,n,r);case 11:case 17:case 22:return e.abrupt("return",e.sent);case 14:if(!t.block.height){e.next=20;break}return e.next=17,nt(t,n,r);case 20:return e.next=22,at(t,n,r);case 23:case"end":return e.stop()}}),e)}))),st.apply(this,arguments)}var ct={SHA2_256:1,SHA2_384:2,SHA3_256:3,SHA3_384:4,KMAC128_BLS_BLS12_381:5},ft={ECDSA_P256:1,ECDSA_secp256k1:2,BLS_BLS12_381:3};function lt(e,t,n){return pt.apply(this,arguments)}function pt(){return(pt=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/accounts/".concat(t.account.addr,"?block_height=").concat(t.block.height,"&expand=contracts,keys"),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",vt(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dt(e,t,n){return ht.apply(this,arguments)}function ht(){return(ht=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/accounts/".concat(t.account.addr,"?block_height=sealed&expand=contracts,keys"),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",vt(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vt(e,t,n){var r,a,o=t.response();return o.tag=e.tag,o.account={address:n.address,balance:Number(n.balance),code:"",contracts:function(e){var n={};if(!e)return n;for(var r=0,a=Object.keys(e);r1&&void 0!==a[1]?a[1]:{},he((r=a.length>2&&void 0!==a[2]?a[2]:{}).node,"SDK Send Get Account Error: opts.node must be defined."),he(n.response,"SDK Send Get Account Error: context.response must be defined."),he(n.Buffer,"SDK Send Get Account Error: context.Buffer must be defined."),e.next=7,t;case 7:if(null===(t=e.sent).block.height){e.next=14;break}return e.next=11,lt(t,n,r);case 11:case 16:return e.abrupt("return",e.sent);case 14:return e.next=16,dt(t,n,r);case 17:case"end":return e.stop()}}),e)}))),gt.apply(this,arguments)}function mt(e,t,n){return bt.apply(this,arguments)}function bt(){return(bt=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/blocks/".concat(t.block.id),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",It(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wt(e,t,n){return xt.apply(this,arguments)}function xt(){return(xt=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/blocks?height=".concat(t.block.height),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",It(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kt(e,t,n){return Et.apply(this,arguments)}function Et(){return(Et=s(h.mark((function e(t,n,r){var a,o,u,i;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.httpRequest||Ze,u=null!==(a=t.block)&&void 0!==a&&a.isSealed?"sealed":"finalized",e.next=4,o({hostname:r.node,path:"/v1/blocks?height=".concat(u),method:"GET",body:null});case 4:return i=e.sent,e.abrupt("return",It(t,n,i));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function It(e,t,n){var r=n.length?n[0]:null,a=t.response();return a.tag=e.tag,a.blockHeader={id:r.header.id,parentId:r.header.parent_id,height:Number(r.header.height),timestamp:r.header.timestamp},a}function St(e){return At.apply(this,arguments)}function At(){return At=s(h.mark((function e(t){var n,r,a,o,u=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},he((r=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Block Header Error: opts.node must be defined."),he(n.response,"SDK Send Get Block Header Error: context.response must be defined."),e.next=6,t;case 6:if(t=e.sent,a=null!==t.block.id,o=null!==t.block.height,!a){e.next=15;break}return e.next=12,mt(t,n,r);case 12:case 18:case 23:return e.abrupt("return",e.sent);case 15:if(!o){e.next=21;break}return e.next=18,wt(t,n,r);case 21:return e.next=23,kt(t,n,r);case 24:case"end":return e.stop()}}),e)}))),At.apply(this,arguments)}function Rt(e,t,n){return Tt.apply(this,arguments)}function Tt(){return(Tt=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/blocks/".concat(t.block.id,"?expand=payload"),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",Nt(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _t(e,t,n){return Ct.apply(this,arguments)}function Ct(){return(Ct=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/blocks?height=".concat(t.block.height,"&expand=payload"),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",Nt(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ot(e,t,n){return Pt.apply(this,arguments)}function Pt(){return(Pt=s(h.mark((function e(t,n,r){var a,o,u,i;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.httpRequest||Ze,u=null!==(a=t.block)&&void 0!==a&&a.isSealed?"sealed":"final",e.next=4,o({hostname:r.node,path:"/v1/blocks?height=".concat(u,"&expand=payload"),method:"GET",body:null});case 4:return i=e.sent,e.abrupt("return",Nt(t,n,i));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nt(e,t,n){var r=n.length?n[0]:null,a=t.response();return a.tag=e.tag,a.block={id:r.header.id,parentId:r.header.parent_id,height:Number(r.header.height),timestamp:r.header.timestamp,collectionGuarantees:r.payload.collection_guarantees.map((function(e){return{collectionId:e.collection_id,signerIds:e.signer_ids}})),blockSeals:r.payload.block_seals.map((function(e){return{blockId:e.block_id,executionReceiptId:e.result_id}}))},a}function Bt(e){return Lt.apply(this,arguments)}function Lt(){return Lt=s(h.mark((function e(t){var n,r,a,o,u=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},he((r=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Block Error: opts.node must be defined."),he(n.response,"SDK Send Get Block Error: context.response must be defined."),e.next=6,t;case 6:if(t=e.sent,a=null!==t.block.id,o=null!==t.block.height,!a){e.next=15;break}return e.next=12,Rt(t,n,r);case 12:case 18:case 23:return e.abrupt("return",e.sent);case 15:if(!o){e.next=21;break}return e.next=18,_t(t,n,r);case 21:return e.next=23,Ot(t,n,r);case 24:case"end":return e.stop()}}),e)}))),Lt.apply(this,arguments)}function Ut(e){return Ft.apply(this,arguments)}function Ft(){return Ft=s(h.mark((function e(t){var n,r,a,o,u,i=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},he((r=i.length>2&&void 0!==i[2]?i[2]:{}).node,"SDK Send Get Collection Error: opts.node must be defined."),he(n.response,"SDK Send Get Collection Error: context.response must be defined."),a=r.httpRequest||Ze,e.next=7,a({hostname:r.node,path:"/v1/collections/".concat(t.collection.id,"?expand=transactions"),method:"GET",body:null});case 7:return o=e.sent,(u=n.response()).tag=t.tag,u.collection={id:o.id,transactionIds:o.transactions.map((function(e){return e.id}))},e.abrupt("return",u);case 12:case"end":return e.stop()}}),e)}))),Ft.apply(this,arguments)}function jt(e,t,n){return Dt.apply(this,arguments)}function Dt(){return(Dt=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/events?type=".concat(t.events.eventType,"&start_height=").concat(t.events.start,"&end_height=").concat(t.events.end),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",zt(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(e,t,n){return Mt.apply(this,arguments)}function Mt(){return(Mt=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.httpRequest||Ze,e.next=3,a({hostname:r.node,path:"/v1/events?type=".concat(t.events.eventType,"&block_ids=").concat(t.events.blockIds.join(",")),method:"GET",body:null});case 3:return o=e.sent,e.abrupt("return",zt(t,n,o));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zt(e,t,n){var r=t.response();return r.tag=e.tag,r.events=[],n.forEach((function(e){return e.events?e.events.forEach((function(n){return r.events.push({blockId:e.block_id,blockHeight:Number(e.block_height),blockTimestamp:e.block_timestamp,type:n.type,transactionId:n.transaction_id,transactionIndex:Number(n.transaction_index),eventIndex:Number(n.event_index),payload:JSON.parse(t.Buffer.from(n.payload,"base64").toString())})})):null})),r}function Yt(e){return qt.apply(this,arguments)}function qt(){return qt=s(h.mark((function e(t){var n,r,a,o,u=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},he((r=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Events Error: opts.node must be defined."),he(n.response,"SDK Send Get Events Error: context.response must be defined."),he(n.Buffer,"SDK Send Get Events Error: context.Buffer must be defined."),e.next=7,t;case 7:if(t=e.sent,a=null!==t.events.start,o=Array.isArray(t.events.blockIds)&&t.events.blockIds.length>0,he(a||o,"SendGetEventsError: Unable to determine which get events request to send. Either a block height range, or block IDs must be specified."),!a){e.next=17;break}return e.next=14,jt(t,n,r);case 14:case 19:return e.abrupt("return",e.sent);case 17:return e.next=19,Gt(t,n,r);case 20:case"end":return e.stop()}}),e)}))),qt.apply(this,arguments)}function Kt(e){return Ht.apply(this,arguments)}function Ht(){return Ht=s(h.mark((function e(t){var n,r,a,o,u,i,s,c,f=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f.length>1&&void 0!==f[1]?f[1]:{},he((r=f.length>2&&void 0!==f[2]?f[2]:{}).node,"SDK Send Get Transaction Error: opts.node must be defined."),he(n.response,"SDK Send Get Transaction Error: context.response must be defined."),he(n.Buffer,"SDK Send Get Transaction Error: context.Buffer must be defined."),a=r.httpRequest||Ze,e.next=8,t;case 8:return t=e.sent,e.next=11,a({hostname:r.node,path:"/v1/transactions/".concat(t.transaction.id),method:"GET",body:null});case 11:return o=e.sent,u=function(e){return{address:e.address,keyId:Number(e.key_id),sequenceNumber:Number(e.sequence_number)}},i=function(e){return{address:e.address,keyId:Number(e.key_index),signature:e.signature}},s=function(e){return JSON.parse(n.Buffer.from(e,"base64").toString())},(c=n.response()).tag=t.tag,c.transaction={script:n.Buffer.from(o.script,"base64").toString(),args:ve(o.arguments.map(s)),referenceBlockId:o.reference_block_id,gasLimit:Number(o.gas_limit),payer:o.payer,proposalKey:o.proposal_key?u(o.proposal_key):o.proposal_key,authorizers:o.authorizers,payloadSignatures:ve(o.payload_signatures.map(i)),envelopeSignatures:ve(o.envelope_signatures.map(i))},e.abrupt("return",c);case 19:case"end":return e.stop()}}),e)}))),Ht.apply(this,arguments)}var Wt={UNKNOWN:0,PENDING:1,FINALIZED:2,EXECUTED:3,SEALED:4,EXPIRED:5};function Vt(e){return Jt.apply(this,arguments)}function Jt(){return Jt=s(h.mark((function e(t){var n,r,a,o,u,i=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:{},he((r=i.length>2&&void 0!==i[2]?i[2]:{}).node,"SDK Send Get Transaction Status Error: opts.node must be defined."),he(n.response,"SDK Send Get Transaction Status Error: context.response must be defined."),he(n.Buffer,"SDK Send Get Transaction Status Error: context.Buffer must be defined."),a=r.httpRequest||Ze,e.next=8,t;case 8:return t=e.sent,e.next=11,a({hostname:r.node,path:"/v1/transaction_results/".concat(t.transaction.id),method:"GET",body:null});case 11:return o=e.sent,(u=n.response()).tag=t.tag,u.transactionStatus={blockId:o.block_id,status:Wt[o.status.toUpperCase()]||"",statusString:o.status.toUpperCase(),statusCode:o.status_code,errorMessage:o.error_message,events:o.events.map((function(e){return{type:e.type,transactionId:e.transaction_id,transactionIndex:Number(e.transaction_index),eventIndex:Number(e.event_index),payload:JSON.parse(n.Buffer.from(e.payload,"base64").toString())}}))},e.abrupt("return",u);case 16:case"end":return e.stop()}}),e)}))),Jt.apply(this,arguments)}function Xt(e){return Zt.apply(this,arguments)}function Zt(){return Zt=s(h.mark((function e(t){var n,r,a,o,u=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},he((r=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Ping Error: opts.node must be defined."),he(n.response,"SDK Send Ping Error: context.response must be defined."),a=r.httpRequest||Ze,e.next=7,a({hostname:r.node,path:"/v1/blocks?height=sealed",method:"GET",body:null});case 7:return(o=n.response()).tag=t.tag,e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)}))),Zt.apply(this,arguments)}var $t=function(e){return"".concat(withPrefix(e.addr),"-").concat(e.keyId)};function Qt(e){return en.apply(this,arguments)}function en(){return en=s(h.mark((function e(t){var n,r,a,o,u,i,s,c,f,l,p,d,v,y,g,m,b=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=b.length>1&&void 0!==b[1]?b[1]:{},he((r=b.length>2&&void 0!==b[2]?b[2]:{}).node,"SDK Send Transaction Error: opts.node must be defined."),he(n.response,"SDK Send Transaction Error: context.response must be defined."),he(n.Buffer,"SDK Send Transaction Error: context.Buffer must be defined."),a=r.httpRequest||Ze,e.next=8,t;case 8:t=e.sent,o=[],u=0,i=Object.values(t.accounts);case 11:if(!(u1&&void 0!==a[1]?a[1]:{},he((r=a.length>2&&void 0!==a[2]?a[2]:{}).node,'SDK Send Error: Either opts.node or "accessNode.api" in config must be defined.'),he(n.ix,"SDK Send Error: context.ix must be defined."),e.next=6,t;case 6:t=e.sent,e.t0=!0,e.next=e.t0===n.ix.isTransaction(t)?10:e.t0===n.ix.isGetTransactionStatus(t)?11:e.t0===n.ix.isGetTransaction(t)?12:e.t0===n.ix.isScript(t)?13:e.t0===n.ix.isGetAccount(t)?14:e.t0===n.ix.isGetEvents(t)?15:e.t0===n.ix.isGetBlock(t)?16:e.t0===n.ix.isGetBlockHeader(t)?17:e.t0===n.ix.isGetCollection(t)?18:e.t0===n.ix.isPing(t)?19:20;break;case 10:return e.abrupt("return",r.sendTransaction?r.sendTransaction(t,n,r):Qt(t,n,r));case 11:return e.abrupt("return",r.sendGetTransactionStatus?r.sendGetTransactionStatus(t,n,r):Vt(t,n,r));case 12:return e.abrupt("return",r.sendGetTransaction?r.sendGetTransaction(t,n,r):Kt(t,n,r));case 13:return e.abrupt("return",r.sendExecuteScript?r.sendExecuteScript(t,n,r):it(t,n,r));case 14:return e.abrupt("return",r.sendGetAccount?r.sendGetAccount(t,n,r):yt(t,n,r));case 15:return e.abrupt("return",r.sendGetEvents?r.sendGetEvents(t,n,r):Yt(t,n,r));case 16:return e.abrupt("return",r.sendGetBlock?r.sendGetBlock(t,n,r):Bt(t,n,r));case 17:return e.abrupt("return",r.sendGetBlockHeader?r.sendGetBlockHeader(t,n,r):St(t,n,r));case 18:return e.abrupt("return",r.sendGetCollection?r.sendGetCollection(t,n,r):Ut(t,n,r));case 19:return e.abrupt("return",r.sendPing?r.sendPing(t,n,r):Xt(t,n,r));case 20:return e.abrupt("return",t);case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),nn={},rn={},an={},on={},un=function(e,t){return function(n,r){var a=2*r,o=2*t;n[a]=e[o],n[a+1]=e[o+1]}};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=(t=un)&&t.__esModule?t:{default:t},r=function(e){for(var t=e.A,r=e.C,a=0;a<25;a+=5){for(var o=0;o<5;o++)(0,n.default)(t,a+o)(r,o);for(var u=0;u<5;u++){var i=2*(a+u),s=(u+1)%5*2,c=(u+2)%5*2;t[i]^=~r[s]&r[c],t[i+1]^=~r[s+1]&r[c+1]}}};e.default=r}(on);var sn={},cn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);e.default=t}(cn),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=(t=cn)&&t.__esModule?t:{default:t},r=function(e){var t=e.A,r=2*e.roundIndex;t[0]^=n.default[r],t[1]^=n.default[r+1]};e.default=r}(sn);var fn={},ln={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];e.default=t}(ln);var pn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];e.default=t}(pn),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(ln),n=a(pn),r=a(un);function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){var a=e.A,o=e.C,u=e.W;(0,r.default)(a,1)(u,0);for(var i=0,s=0,c=0,f=32,l=0;l<24;l++){var p=t.default[l],d=n.default[l];(0,r.default)(a,p)(o,0),i=u[0],s=u[1],f=32-d,u[c=d<32?0:1]=i<>>f,u[(c+1)%2]=s<>>f,(0,r.default)(u,0)(a,p),(0,r.default)(o,0)(u,0)}};e.default=o}(fn);var dn={};function hn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e.length&&!t.length)return n;if(!e.length)return n;if(!t.length)return[].concat(ve(n),[e[0]]);var r=y(e),a=r[0],o=r.slice(1),u=y(t),i=u[0],s=u.slice(1);return void 0!==a&&n.push(a),void 0!==i&&n.push(i),hn(o,s,n)}function vn(e){return function(t){return"function"==typeof t?(me.deprecate({pkg:"FCL/SDK",subject:"Interopolation of functions into template literals",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params"}),vn(e)(t(e))):String(t)}}function yn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=(t=un)&&t.__esModule?t:{default:t},r=function(e){for(var t=e.A,r=e.C,a=e.D,o=e.W,u=0,i=0,s=0;s<5;s++){var c=2*s,f=2*(s+5),l=2*(s+10),p=2*(s+15),d=2*(s+20);r[c]=t[c]^t[f]^t[l]^t[p]^t[d],r[c+1]=t[c+1]^t[f+1]^t[l+1]^t[p+1]^t[d+1]}for(var h=0;h<5;h++){(0,n.default)(r,(h+1)%5)(o,0),u=o[0],i=o[1],o[0]=u<<1|i>>>31,o[1]=i<<1|u>>>31,a[2*h]=r[(h+4)%5*2]^o[0],a[2*h+1]=r[(h+4)%5*2+1]^o[1];for(var v=0;v<25;v+=5)t[2*(v+h)]^=a[2*h],t[2*(v+h)+1]^=a[2*h+1]}};e.default=r}(dn),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(on),n=o(sn),r=o(fn),a=o(dn);function o(e){return e&&e.__esModule?e:{default:e}}var u=function(){var e=new Uint32Array(10),o=new Uint32Array(10),u=new Uint32Array(2);return function(i){for(var s=0;s<24;s++)(0,a.default)({A:i,C:e,D:o,W:u}),(0,r.default)({A:i,C:e,W:u}),(0,t.default)({A:i,C:e}),(0,n.default)({A:i,roundIndex:s});e.fill(0),o.fill(0),u.fill(0)}};e.default=u}(an),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=_e,r=(t=an)&&t.__esModule?t:{default:t},a=function(e,t){for(var n=0;n>>8,t[n+2]=e[r+1]>>>16,t[n+3]=e[r+1]>>>24,t[n+4]=e[r],t[n+5]=e[r]>>>8,t[n+6]=e[r]>>>16,t[n+7]=e[r]>>>24}return t},u=function(e){var t=this,u=e.capacity,i=e.padding,s=(0,r.default)(),c=u/8,f=200-u/4,l=0,p=new Uint32Array(50),d=n.Buffer.allocUnsafe(f);return this.absorb=function(e){for(var n=0;n=f&&(a(d,p),s(p),l=0);return t},this.squeeze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={buffer:e.buffer||n.Buffer.allocUnsafe(c),padding:e.padding||i,queue:n.Buffer.allocUnsafe(d.length),state:new Uint32Array(p.length)};d.copy(t.queue);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:a;if(!this||this.constructor!==e)return new e(i);if(t&&!t.includes(i))throw new Error("Unsupported hash length");var s=new r.default({capacity:i});return this.update=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(n.Buffer.isBuffer(e))return s.absorb(e),u;if("string"==typeof e)return u.update(n.Buffer.from(e,t));throw new TypeError("Not a string or buffer")},this.digest=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",t="string"==typeof e?{format:e}:e,n=s.squeeze({buffer:t.buffer,padding:t.padding||o});return t.format&&"binary"!==t.format?n.toString(t.format):n},this.reset=function(){return s.reset(),u},this}},o=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});e.Keccak=o;var u=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});e.SHA3=u;var i=a({allowedSizes:[128,256],defaultSize:256,padding:31});e.SHAKE=i;var s=o;e.SHA3Hash=s,u.SHA3Hash=s;var c=u;e.default=c}(nn);var mn="UNKNOWN",bn="SCRIPT",wn="TRANSACTION",xn="GET_TRANSACTION_STATUS",kn="GET_ACCOUNT",En="GET_EVENTS",In="PING",Sn="GET_TRANSACTION",An="GET_BLOCK",Rn="GET_BLOCK_HEADER",Tn="GET_COLLECTION",_n="BAD",Cn="OK",On="ACCOUNT",Pn="PARAM",Nn="ARGUMENT",Bn="authorizer",Ln="payer",Un="proposer",Fn='{\n "kind":"'.concat(On,'",\n "tempId":null,\n "addr":null,\n "keyId":null,\n "sequenceNum":null,\n "signature":null,\n "signingFunction":null,\n "resolve":null,\n "role": {\n "proposer":false,\n "authorizer":false,\n "payer":false,\n "param":false\n }\n}'),jn='{\n "kind":"'.concat(Nn,'",\n "tempId":null,\n "value":null,\n "asArgument":null,\n "xform":null,\n "resolve": null,\n "resolveArgument": null\n}'),Dn='{\n "tag":"'.concat(mn,'",\n "assigns":{},\n "status":"').concat(Cn,'",\n "reason":null,\n "accounts":{},\n "params":{},\n "arguments":{},\n "message": {\n "cadence":null,\n "refBlock":null,\n "computeLimit":null,\n "proposer":null,\n "payer":null,\n "authorizations":[],\n "params":[],\n "arguments":[]\n },\n "proposer":null,\n "authorizations":[],\n "payer":[],\n "events": {\n "eventType":null,\n "start":null,\n "end":null,\n "blockIds":[]\n },\n "transaction": {\n "id":null\n },\n "block": {\n "id":null,\n "height":null,\n "isSealed":null\n },\n "account": {\n "addr":null\n },\n "collection": {\n "id":null\n }\n}'),Gn=new Set(Object.keys(JSON.parse(Dn))),Mn=function(){return JSON.parse(Dn)},zn="abcdefghijklmnopqrstuvwxyz0123456789".split(""),Yn=function(){return zn[~~(Math.random()*zn.length)]},qn=function(){return Array.from({length:10},Yn).join("")},Kn=function(e){return"number"==typeof e},Hn=function(e){return Array.isArray(e)},Wn=function(e){return null!==e&&"object"===c(e)},Vn=function(e){return null==e},Jn=function(e){return"function"==typeof e},Xn=function(e){if(!Wn(e)||Vn(e)||Kn(e))return!1;var t,n=w(Gn);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!e.hasOwnProperty(r))return!1}}catch(e){n.e(e)}finally{n.f()}return!0},Zn=function(e){return e.status=Cn,e},$n=function(e,t){return e.status=_n,e.reason=t,e},Qn=function(e){return function(t){return t.tag=e,Zn(t)}},er=function(e){return null==e.keyId?e:(he(!isNaN(parseInt(e.keyId)),"account.keyId must be an integer"),b(b({},e),{},{keyId:parseInt(e.keyId)}))},tr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){he("function"==typeof e||"object"===c(e),"prepAccount must be passed an authorization function or an account object"),he(null!=t.role,"Account must have a role");var r=JSON.parse(Fn),a=t.role,o=qn();e.authorization&&Jn(e.authorization)&&(e={resolve:e.authorization}),!e.authorization&&Jn(e)&&(e={resolve:e});var u=e.resolve;return u&&(e.resolve=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==i[1]?i[1]:[],e.prev=1,e.t0=_r,e.next=5,t;case 5:if(e.t1=e.sent,t=(0,e.t0)(e.t1),!Rr(t)){e.next=9;break}throw new Error("Interaction Error: ".concat(t.reason));case 9:if(n.length){e.next=11;break}return e.abrupt("return",t);case 11:return r=y(n),a=r[0],o=r.slice(1),e.next=14,a;case 14:if(u=e.sent,!Jn(u)){e.next=17;break}return e.abrupt("return",Cr(u(t),o));case 17:if(!Vn(u)&&u){e.next=19;break}return e.abrupt("return",Cr(t,o));case 19:if(!Xn(u)){e.next=21;break}return e.abrupt("return",Cr(u,o));case 21:throw new Error("Invalid Interaction Composition");case 24:throw e.prev=24,e.t2=e.catch(1),e.t2;case 27:case"end":return e.stop()}}),e,null,[[1,24]])})));return function(t){return e.apply(this,arguments)}}(),Or=function e(){for(var t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:Pr;return function(n){return n.assigns[e]=t(n.assigns[e],n),Zn(n)}},Ur=Object.freeze({__proto__:null,UNKNOWN:mn,SCRIPT:bn,TRANSACTION:wn,GET_TRANSACTION_STATUS:xn,GET_ACCOUNT:kn,GET_EVENTS:En,PING:In,GET_TRANSACTION:Sn,GET_BLOCK:An,GET_BLOCK_HEADER:Rn,GET_COLLECTION:Tn,BAD:_n,OK:Cn,ACCOUNT:On,PARAM:Pn,ARGUMENT:Nn,AUTHORIZER:Bn,PAYER:Ln,PROPOSER:Un,interaction:Mn,uuid:qn,isNumber:Kn,isArray:Hn,isObj:Wn,isNull:Vn,isFn:Jn,isInteraction:Xn,Ok:Zn,Bad:$n,prepAccount:tr,makeArgument:nr,makeUnknown:rr,makeScript:ar,makeTransaction:or,makeGetTransactionStatus:ur,makeGetTransaction:ir,makeGetAccount:sr,makeGetEvents:cr,makePing:fr,makeGetBlock:lr,makeGetBlockHeader:pr,makeGetCollection:dr,isUnknown:vr,isScript:yr,isTransaction:gr,isGetTransactionStatus:mr,isGetTransaction:br,isGetAccount:wr,isGetEvents:xr,isPing:kr,isGetBlock:Er,isGetBlockHeader:Ir,isGetCollection:Sr,isOk:Ar,isBad:Rr,why:Tr,isAccount:function(e){return e.kind===On},isParam:function(e){return e.kind===Pn},isArgument:function(e){return e.kind===Nn},pipe:Or,get:Nr,put:Br,update:Lr,destroy:function(e){return function(t){return delete t.assigns[e],Zn(t)}}});function Fr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Or(Mn(),e)}var jr=function(){return JSON.parse('{\n "tag":null,\n "transaction":null,\n "transactionStatus":null,\n "transactionId":null,\n "encodedData":null,\n "events":null,\n "account":null,\n "block":null,\n "blockHeader":null,\n "latestBlock":null,\n "collection":null\n}')};function Dr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Or([lr,function(t){return t.block.isSealed=e,Zn(t)}])}function Gr(e){return Or([sr,function(t){return t.account.addr=Ve(e),Zn(t)}])}var Mr=function(){me.deprecate({pkg:"@onflow/decode",subject:"Operating upon data of the latestBlock field of the response object",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field"})},zr=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Yr=function(){var e=s(h.mark((function e(){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qr=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.staticType);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Kr=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{domain:t.domain,identifier:t.identifier});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Hr=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{path:t.path,address:t.address,borrowType:t.borrowType});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Wr=function(){var e=s(h.mark((function e(t,n,r){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=6;break}return e.next=3,ea(t,n,r);case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=null;case 7:return e.abrupt("return",e.t0);case 8:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Vr=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{address:t.address,type:t.type});case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Jr=function(){var e=s(h.mark((function e(t,n,r){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return new Promise(function(){var t=s(h.mark((function t(a){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=a,t.next=3,ea(e,n,[].concat(ve(r),[e.type]));case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())})));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Xr=function(){var e=s(h.mark((function e(t,n,r){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.reduce(function(){var e=s(h.mark((function e(t,a){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,e.next=5,ea(a.key,n,[].concat(ve(r),[a.key]));case 5:return e.t0=e.sent,e.next=8,ea(a.value,n,[].concat(ve(r),[a.key]));case 8:return t[e.t0]=e.sent,e.abrupt("return",t);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve({}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Zr=function(){var e=s(h.mark((function e(t,n,r){var a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.fields.reduce(function(){var e=s(h.mark((function e(t,a){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return t=e.sent,e.next=5,ea(a.value,n,[].concat(ve(r),[a.name]));case 5:return t[a.name]=e.sent,e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve({}));case 2:if(a=e.sent,!(o=t.id&&Qr(n,t.id))){e.next=10;break}return e.next=7,o(a);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=a;case 11:return e.abrupt("return",e.t0);case 12:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),$r={UInt:zr,Int:zr,UInt8:zr,Int8:zr,UInt16:zr,Int16:zr,UInt32:zr,Int32:zr,UInt64:zr,Int64:zr,UInt128:zr,Int128:zr,UInt256:zr,Int256:zr,Word8:zr,Word16:zr,Word32:zr,Word64:zr,UFix64:zr,Fix64:zr,String:zr,Character:zr,Bool:zr,Address:zr,Void:Yr,Optional:Wr,Reference:Vr,Array:Jr,Dictionary:Xr,Event:Zr,Resource:Zr,Struct:Zr,Enum:Zr,Type:qr,Path:Kr,Capability:Hr},Qr=function(e,t){var n=Object.keys(e).find((function(e){return/^\/.*\/$/.test(e)?new RegExp(e.substring(1,e.length-1)).test(t):e===t}));return t&&n&&e[n]},ea=function(){var e=s(h.mark((function e(t,n,r){var a;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=Qr(n,t.type)){e.next=3;break}throw new Error("Undefined Decoder Error: ".concat(t.type,"@").concat(r.join(".")));case 3:return e.next=5,a(t.value,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),ta=function(){var e=s(h.mark((function e(t){var n,r,a,o,u=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2&&void 0!==u[2]?u[2]:[],a=Object.keys($r).filter((function(e){return!Object.keys(n).find((function(t){return new RegExp(t).test(e)}))})).reduce((function(e,t){return e[t]=$r[t],e}),n),o=b(b({},a),n),e.abrupt("return",ea(t,o,r));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),na=function(){var e=s(h.mark((function e(t){var n,r=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>1&&void 0!==r[1]?r[1]:{},!t.encodedData){e.next=5;break}return e.abrupt("return",ta(t.encodedData,n));case 5:if(!t.transactionStatus){e.next=16;break}return e.t0=b,e.t1=b({},t.transactionStatus),e.t2={},e.next=11,Promise.all(t.transactionStatus.events.map(function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.type,e.t1=t.transactionId,e.t2=t.transactionIndex,e.t3=t.eventIndex,e.next=6,ta(t.payload,n);case 6:return e.t4=e.sent,e.abrupt("return",{type:e.t0,transactionId:e.t1,transactionIndex:e.t2,eventIndex:e.t3,data:e.t4});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return e.t3=e.sent,e.t4={events:e.t3},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t4));case 16:if(!t.transaction){e.next=20;break}return e.abrupt("return",t.transaction);case 20:if(!t.events){e.next=26;break}return e.next=23,Promise.all(t.events.map(function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t.blockId,e.t1=t.blockHeight,e.t2=t.blockTimestamp,e.t3=t.type,e.t4=t.transactionId,e.t5=t.transactionIndex,e.t6=t.eventIndex,e.next=9,ta(t.payload,n);case 9:return e.t7=e.sent,e.abrupt("return",{blockId:e.t0,blockHeight:e.t1,blockTimestamp:e.t2,type:e.t3,transactionId:e.t4,transactionIndex:e.t5,eventIndex:e.t6,data:e.t7});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 23:return e.abrupt("return",e.sent);case 26:if(!t.account){e.next=30;break}return e.abrupt("return",t.account);case 30:if(!t.block){e.next=34;break}return e.abrupt("return",t.block);case 34:if(!t.blockHeader){e.next=38;break}return e.abrupt("return",t.blockHeader);case 38:if(!t.latestBlock){e.next=43;break}return Mr(),e.abrupt("return",t.latestBlock);case 43:if(!t.transactionId){e.next=47;break}return e.abrupt("return",t.transactionId);case 47:if(!t.collection){e.next=49;break}return e.abrupt("return",t.collection);case 49:return e.abrupt("return",null);case 50:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ra=function(e){return"function"==typeof e},aa=function(e){return"string"==typeof e};function oa(){return(oa=s(h.mark((function e(t){var n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!gr(t)&&!yr(t)){e.next=11;break}if(n=Nr(t,"ix.cadence"),he(ra(n)||aa(n),"Cadence needs to be a function or a string."),!ra(n)){e.next=7;break}return e.next=6,n({});case 6:n=e.sent;case 7:return he(aa(n),"Cadence needs to be a string at this point."),e.next=10,oe().where(/^0x/).then((function(e){return Object.entries(e).reduce((function(e,t){var n=u(t,2),r=n[0],a=n[1],o=new RegExp("(\\b"+r+"\\b)","g");return e.replace(o,a)}),n)}));case 10:t.message.cadence=e.sent;case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ua=function(e){return"function"==typeof e};function ia(e){return he(null!=c(e.xform),"No type specified for argument: ".concat(e.value)),ua(e.xform)?e.xform(e.value):ua(e.xform.asArgument)?e.xform.asArgument(e.value):void he(!1,"Invalid Argument",e)}function sa(e){return ca.apply(this,arguments)}function ca(){return ca=s(h.mark((function e(t){var n,r,a=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(he((n=a.length>1&&void 0!==a[1]?a[1]:3)>0,"Argument Resolve Recursion Limit Exceeded for Arg: ".concat(t.tempId)),!ua(t.resolveArgument)){e.next=9;break}return e.next=5,t.resolveArgument();case 5:return r=e.sent,e.abrupt("return",sa(r,n-1));case 9:return e.abrupt("return",t);case 10:case"end":return e.stop()}}),e)}))),ca.apply(this,arguments)}function fa(){return fa=s(h.mark((function e(t){var n,r,a,o,i,s;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!gr(t)&&!yr(t)){e.next=11;break}n=0,r=Object.entries(t.arguments);case 2:if(!(nt.signerIndex?1:e.signerIndext.keyId?1:e.keyIdt.signerIndex?1:e.signerIndext.keyId?1:e.keyId3&&void 0!==f[3]?f[3]:3,"Account Resolve Recursion Limit Exceeded",{ix:t,accounts:n}),o=[],u=w(n),e.prev=4,s=h.mark((function e(){var n,u,s,f;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.value,u=n.resolve,n.resolve=null,c=r||n,!Za(u)){e.next=8;break}return e.next=7,u(n,$a(n,t));case 7:n=e.sent;case 8:if(!Array.isArray(n)){e.next=13;break}return e.next=11,Qa(t,n,c,a-1);case 11:e.next=30;break;case 13:if(n.addr&&(n.addr=Ve(n.addr)),null!=n.addr&&null!=n.keyId&&(n.tempId=Xa(n)),t.accounts[n.tempId]=t.accounts[n.tempId]||n,t.accounts[n.tempId].role.proposer=t.accounts[n.tempId].role.proposer||n.role.proposer,t.accounts[n.tempId].role.payer=t.accounts[n.tempId].role.payer||n.role.payer,t.accounts[n.tempId].role.authorizer=t.accounts[n.tempId].role.authorizer||n.role.authorizer,t.accounts[n.tempId].role.proposer&&t.proposer===c.tempId&&(t.proposer=n.tempId),!t.accounts[n.tempId].role.payer){e.next=29;break}if(Array.isArray(t.payer)?t.payer=Array.from(new Set([].concat(ve(t.payer),[n.tempId]).map((function(e){return e===c.tempId?n.tempId:e})))):t.payer=Array.from(new Set([t.payer,n.tempId].map((function(e){return e===c.tempId?n.tempId:e})))),!(t.payer.length>1)){e.next=29;break}if(s=[],f=[],t.payer=t.payer.reduce((function(e,n){var r=t.accounts[n].addr,a=Xa(t.accounts[n]);return f.push(r),s.includes(a)?e:(s.push(a),[].concat(ve(e),[n]))}),[]),!(Array.from(new Set(f)).length>1)){e.next=29;break}throw new Error("Payer can not be different accounts");case 29:t.accounts[n.tempId].role.authorizer&&(r?o=Array.from(new Set([].concat(ve(o),[n.tempId]))):t.authorizations=t.authorizations.map((function(e){return e===c.tempId?n.tempId:e})));case 30:c.tempId!=n.tempId&&delete t.accounts[c.tempId];case 31:case"end":return e.stop()}}),e)})),u.s();case 7:if((i=u.n()).done){e.next=11;break}return e.delegateYield(s(),"t0",9);case 9:e.next=7;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e.catch(4),u.e(e.t1);case 16:return e.prev=16,u.f(),e.finish(16);case 19:r&&(t.authorizations=t.authorizations.map((function(e){return e===r.tempId?o:e})).reduce((function(e,t){return Array.isArray(t)?[].concat(ve(e),ve(t)):[].concat(ve(e),[t])}),[]));case 20:case"end":return e.stop()}}),e,null,[[4,13,16,19]])}))),eo.apply(this,arguments)}function to(){return(to=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!gr(t)){e.next=13;break}return Array.isArray(t.payer)||me.deprecate({pkg:"FCL",subject:'"ix.payer" must be an array. Support for ix.payer as a singular',message:"See changelog for more info."}),e.prev=2,e.next=5,Qa(t,Object.values(t.accounts));case 5:return e.next=7,Qa(t,Object.values(t.accounts));case 7:e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(2),console.error("=== SAD PANDA ===\n\n",e.t0,"\n\n=== SAD PANDA ==="),e.t0;case 13:return e.abrupt("return",t);case 14:case"end":return e.stop()}}),e,null,[[2,9]])})))).apply(this,arguments)}function no(){return(no=s(h.mark((function e(t){var n,r,a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!gr(t)){e.next=16;break}return e.prev=1,n=Wa(t),r=da(oo(t)),e.next=6,Promise.all(n.map(ro(t,r)));case 6:return a=Va(t),o=ha(b(b({},oo(t)),{},{payloadSigs:n.map((function(e){return{address:t.accounts[e].addr,keyId:t.accounts[e].keyId,sig:t.accounts[e].signature}}))})),e.next=10,Promise.all(a.map(ro(t,o)));case 10:e.next=16;break;case 12:throw e.prev=12,e.t0=e.catch(1),console.error("Signatures",e.t0,{ix:t}),e.t0;case 16:return e.abrupt("return",t);case 17:case"end":return e.stop()}}),e,null,[[1,12]])})))).apply(this,arguments)}function ro(e,t){return function(){var n=s(h.mark((function n(r){var a,o,u;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null==(a=e.accounts[r]).signature){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,a.signingFunction(ao(a,t,e));case 5:o=n.sent,u=o.signature,e.accounts[r].signature=u;case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}function ao(e,t,n){try{return{f_type:"Signable",f_vsn:"1.0.1",message:t,addr:Ve(e.addr),keyId:e.keyId,roles:e.role,cadence:n.message.cadence,args:n.message.arguments.map((function(e){return n.arguments[e].asArgument})),data:{},interaction:n,voucher:Ja(n)}}catch(e){throw console.error("buildSignable",e),e}}function oo(e){var t=Ve((Array.isArray(e.payer)?e.accounts[e.payer[0]]:e.accounts[e.payer]).addr);return{cadence:e.message.cadence,refBlock:e.message.refBlock||null,computeLimit:e.message.computeLimit,arguments:e.message.arguments.map((function(t){return e.arguments[t].asArgument})),proposalKey:{address:Ve(e.accounts[e.proposer].addr),keyId:e.accounts[e.proposer].keyId,sequenceNum:e.accounts[e.proposer].sequenceNum},payer:t,authorizers:e.authorizations.map((function(t){return Ve(e.accounts[t].addr)})).reduce((function(e,t){return e.find((function(e){return e===t}))?e:[].concat(ve(e),[t])}),[])}}function uo(){return(uo=s(h.mark((function e(t){var n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Nr(t,"ix.validators",[]),e.abrupt("return",Or(t,n.map((function(e){return function(t){return e(t,{Ok:Zn,Bad:$n})}}))));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function io(){return(io=s(h.mark((function e(t){var n,r,a;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=0,r=Object.keys(t.accounts);n1&&void 0!==arguments[1]?arguments[1]:fo;return function(){var n=s(h.mark((function n(r){var a,o;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=function(e){return["\nAccounts:",{proposer:e.proposer,authorizations:e.authorizations,payer:e.payer},"\n\nDetails:",e.accounts].filter(Boolean)},o=function(){for(var t,n=arguments.length,r=new Array(n),a=0;a1){var r=t[0],a=t[1];return yo((function(e,t){var n=t.Ok,o=t.Bad;return r?n(e):o(e,a)}))}var o=t[0];return function(e){return o(e,{Ok:Zn,Bad:$n})}}var go=function(){var e=s(h.mark((function e(){var t,n,r,a,o=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:[],n=o.length>1&&void 0!==o[1]?o[1]:{},e.next=4,oe.first(["sdk.transport","sdk.send"],n.send||tn);case 4:return yo(r=e.sent,"Required value for sdk.transport is not defined in config. See: ".concat("https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21")),e.next=8,oe.first(["sdk.resolve"],n.resolve||po);case 8:if(a=e.sent,e.t0=n.node,e.t0){e.next=14;break}return e.next=13,oe().get("accessNode.api");case 13:e.t0=e.sent;case 14:return n.node=e.t0,Array.isArray(t)&&(t=Or(Mn(),t)),e.t1=r,e.next=19,a(t);case 19:return e.t2=e.sent,e.t3={config:oe,response:jr,ix:Ur,Buffer:_e.Buffer},e.t4=n,e.abrupt("return",(0,e.t1)(e.t2,e.t3,e.t4));case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function mo(e){return bo.apply(this,arguments)}function bo(){return bo=s(h.mark((function e(t){var n,r;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe().where(/^decoder\./);case 2:return n=e.sent,r=Object.entries(n).map((function(e){var t=u(e,2),n=t[0],r=t[1];return[n="/".concat(n.replace(/^decoder\./,""),"$/"),r]})),e.abrupt("return",na(t,Object.fromEntries(r)));case 5:case"end":return e.stop()}}),e)}))),bo.apply(this,arguments)}var wo=function(e){Ie(n,e);var t=Te(n);function n(e){var r;be(this,n);var a="\n Encode Message From Signable Error: Unable to determine message encoding for signer addresss: ".concat(e,". \n Please ensure the address: ").concat(e," is intended to sign the given transaction as specified by the transaction signable.\n ").trim();return(r=t.call(this,a)).name="Unable To Determine Message Encoding For Signer Addresss",r}return xe(n)}(Ke(Error));function xo(e){return Lr("ix.validators",(function(t){return Array.isArray(t)?t.push(e):[e]}))}function ko(e){return Or([function(t){return t.block.height=e,t},xo((function(e){if("boolean"==typeof e.block.isSealed)throw new Error("Unable to specify both block height and isSealed.");if(e.block.id)throw new Error("Unable to specify both block height and block id.");return e}))])}function Eo(e){return Or([function(t){return t.block.id=e,Zn(t)},xo((function(e,t){var n=t.Ok,r=t.Bad;return wr(e)?r(e,"Unable to specify a block id with a Get Account interaction."):"boolean"==typeof e.block.isSealed?r(e,"Unable to specify both block id and isSealed."):e.block.height?r(e,"Unable to specify both block id and block height."):n(e)}))])}function Io(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.sealed,n=void 0!==t&&t,r=e.id,a=e.height,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return he(!(n&&r||n&&a),'Method: block -- Cannot pass "sealed" with "id" or "height"'),he(!(r&&a),'Method: block -- Cannot pass "id" and "height" simultaneously'),r?go([Dr(),Eo(r)],o).then(na):a?go([Dr(),ko(a)],o).then(na):go([Dr(n)],o).then(na)}function So(){return Or((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){return tr(e,{role:Bn})})))}function Ao(e,t,n){return Or([cr,function(r){return r.events.eventType=e,r.events.start=t,r.events.end=n,Zn(r)}])}function Ro(e){return Or([ur,function(t){return t.transaction.id=e,Zn(t)}])}function To(e){return function(t){return t.message.computeLimit=e,t}}function _o(){return Or((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(nr))}function Co(e,t){return{value:e,xform:t}}function Oo(e){return Po.apply(this,arguments)}function Po(){return Po=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",tr(t,{role:Un}));case 1:case"end":return e.stop()}}),e)}))),Po.apply(this,arguments)}function No(e){return Bo.apply(this,arguments)}function Bo(){return Bo=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",tr(t,{role:Ln}));case 1:case"end":return e.stop()}}),e)}))),Bo.apply(this,arguments)}function Lo(e){return Or([function(t){return t.message.refBlock=e,Zn(t)}])}function Uo(){return Or([ar,Br("ix.cadence",yn.apply(void 0,arguments))])}var Fo=[];function jo(){return Or([or,Br("ix.cadence",yn.apply(void 0,arguments)),function(e){return e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||Fo,Zn(e)}])}function Do(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return he(e.account,"mockAccountResponse(ix) -- ix.account is missing",e),he(e.account.addr,"mockAccountResponse(ix) -- ix.account.addr is missing",e),{account:{addr:e.account.addr,keys:Array.from({length:t},(function(e,t){return{index:t,sequenceNumber:42}}))}}}var Go=function(e){return e},Mo=["tempId"];function zo(e){return["SIGNATURE",e.addr,e.keyId].join(".")}function Yo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=b(b(b({},t),e),{},{signingFunction:e.signingFunction||t.signingFunction||function(e){return{addr:n.addr,keyId:n.keyId,signature:zo(n)}}});return n}}var qo,Ko={proposer:!1,authorizer:!1,payer:!1},Ho=Object.freeze({__proto__:null,mockSend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Go;return function(){var t=s(h.mark((function t(n){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n;case 2:n=t.sent,t.t0=!0,t.next=t.t0===wr(n)?6:t.t0===Er(n)?7:8;break;case 6:return t.abrupt("return",Do(n));case 7:return t.abrupt("return",{tag:"GET_BLOCK",block:{id:"32"}});case 8:return t.abrupt("return",e(n));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},authzFn:Yo,authzResolve:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.tempId,r=gn(e,Mo);return b(b({},t),{},{tempId:n||"WITH_RESOLVE",resolve:Yo(r)})}},authzResolveMany:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.tempId||"AUTHZ_RESOLVE_MANY";return b(b({},t),{},{tempId:n,resolve:function(){return[e.proposer&&Yo(e.proposer)({role:b(b({},Ko),{},{proposer:!0})})].concat(ve(e.authorizations.map(Yo).map((function(e){return e({role:b(b({},Ko),{},{authorizer:!0})})}))),[e.payer&&Yo(e.payer)({role:b(b({},Ko),{},{payer:!0})})]).filter(Boolean)}})}},sig:zo,idof:function(e){return"".concat(Je(e.addr),"-").concat(e.keyId)},run:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Fr([Lo("123")].concat(ve(e))).then(po)}}),Wo=function(e){return function(t){return c(t)===e}},Vo=function(e){return null!=e},Jo=Wo("object"),Xo=Wo("string"),Zo=Wo("function"),$o=Wo("number"),Qo="function"==typeof queueMicrotask?queueMicrotask:function(e){return(qo||(qo=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},eu=function(){var e,t=[];return{deliver:function(n){return s(h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:t.push(n),e&&(e(t.shift()),e=void 0);case 2:case"end":return r.stop()}}),r)})))()},receive:function(){return new Promise((function(n){var r=t.shift();if(r)return n(r);e=n}))}}},tu="SUBSCRIBE",nu="UNSUBSCRIBE",ru="UPDATED",au="EXIT",ou="object"===("undefined"==typeof self?"undefined":c(self))&&self.self===self&&self||"object"===(void 0===n.g?"undefined":c(n.g))&&n.g.global===n.g&&n.g||"object"===("undefined"==typeof window?"undefined":c(window))&&window.window===window&&window;ou.FCL_REGISTRY=null==ou.FCL_REGISTRY?{}:ou.FCL_REGISTRY;var uu,iu=0,su=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(a,o){var u=r.expectReply||!1,i=null!=r.timeout?r.timeout:5e3;u&&i&&setTimeout((function(){return o(new Error("Timeout: ".concat(i,"ms passed without a response.")))}),i);var s={to:e,from:r.from,tag:t,data:n,timeout:i,reply:a,reject:o};try{ou.FCL_REGISTRY[e]&&ou.FCL_REGISTRY[e].mailbox.deliver(s),u||a(!0)}catch(t){console.error("FCL.Actor -- Could Not Deliver Message",s,ou.FCL_REGISTRY[e],t)}}))},cu=function(e){delete ou.FCL_REGISTRY[e]},fu=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var t=s(h.mark((function t(n){var r;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof e.INIT){t.next=3;break}return t.next=3,e.INIT(n);case 3:return t.next=6,n.receive();case 6:if(r=t.sent,t.prev=7,r.tag!==au){t.next=13;break}if("function"!=typeof e.TERMINATE){t.next=12;break}return t.next=12,e.TERMINATE(n,r,r.data||{});case 12:return t.abrupt("break",25);case 13:return t.next=15,e[r.tag](n,r,r.data||{});case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(7),console.error("".concat(n.self()," Error"),r,t.t0);case 20:return t.prev=20,t.abrupt("continue",3);case 23:t.next=3;break;case 25:case"end":return t.stop()}}),t,null,[[7,17,20,23]])})));return function(e){return t.apply(this,arguments)}}()},lu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t&&(t=++iu),null!=ou.FCL_REGISTRY[t])return t;ou.FCL_REGISTRY[t]={addr:t,mailbox:eu(),subs:new Set,kvs:{},error:null};var n={self:function(){return t},receive:function(){return ou.FCL_REGISTRY[t].mailbox.receive()},send:function(e,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a.from=t,su(e,n,r,a)},sendSelf:function(e,n,r){ou.FCL_REGISTRY[t]&&su(t,e,n,r)},broadcast:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.from=t;var a,o=w(ou.FCL_REGISTRY[t].subs);try{for(o.s();!(a=o.n()).done;){var u=a.value;su(u,e,n,r)}}catch(e){o.e(e)}finally{o.f()}},subscribe:function(e){return null!=e&&ou.FCL_REGISTRY[t].subs.add(e)},unsubscribe:function(e){return null!=e&&ou.FCL_REGISTRY[t].subs.delete(e)},subscriberCount:function(){return ou.FCL_REGISTRY[t].subs.size},hasSubs:function(){return!!ou.FCL_REGISTRY[t].subs.size},put:function(e,n){null!=e&&(ou.FCL_REGISTRY[t].kvs[e]=n)},get:function(e,n){var r=ou.FCL_REGISTRY[t].kvs[e];return null==r?n:r},delete:function(e){delete ou.FCL_REGISTRY[t].kvs[e]},update:function(e,n){null!=e&&(ou.FCL_REGISTRY[t].kvs[e]=n(ou.FCL_REGISTRY[t].kvs[e]))},keys:function(){return Object.keys(ou.FCL_REGISTRY[t].kvs)},all:function(){return ou.FCL_REGISTRY[t].kvs},where:function(e){return Object.keys(ou.FCL_REGISTRY[t].kvs).reduce((function(n,r){return e.test(r)?b(b({},n),{},g({},r,ou.FCL_REGISTRY[t].kvs[r])):n}),{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach((function(n){return ou.FCL_REGISTRY[t].kvs[n]=e[n]}))},fatalError:function(e){ou.FCL_REGISTRY[t].error=e;var n,r=w(ou.FCL_REGISTRY[t].subs);try{for(r.s();!(n=r.n()).done;){var a=n.value;su(a,ru)}}catch(e){r.e(e)}finally{r.f()}}};return"object"===c(e)&&(e=fu(e)),Qo(s(h.mark((function r(){return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e(n);case 2:cu(t);case 3:case"end":return r.stop()}}),r)})))),t},pu="config",du="PUT_CONFIG",hu="GET_CONFIG",vu="GET_ALL_CONFIG",yu="UPDATE_CONFIG",gu="DELETE_CONFIG",mu="CLEAR_CONFIG",bu="WHERE_CONFIG",wu="CONFIG/UPDATED",xu=function(e){return e},ku=(g(uu={},du,(function(e,t,n){var r=n.key,a=n.value;if(null==r)throw new Error("Missing 'key' for config/put.");e.put(r,a),e.broadcast(wu,b({},e.all()))})),g(uu,hu,(function(e,t,n){var r=n.key,a=n.fallback;if(null==r)throw new Error("Missing 'key' for config/get");t.reply(e.get(r,a))})),g(uu,vu,(function(e,t){t.reply(b({},e.all()))})),g(uu,yu,(function(e,t,n){var r=n.key,a=n.fn;if(null==r)throw new Error("Missing 'key' for config/update");e.update(r,a||xu),e.broadcast(wu,b({},e.all()))})),g(uu,gu,(function(e,t,n){var r=n.key;if(null==r)throw new Error("Missing 'key' for config/delete");e.delete(r),e.broadcast(wu,b({},e.all()))})),g(uu,mu,(function(e,t){for(var n=0,r=Object.keys(e.all());n0&&void 0!==i[0]?i[0]:[],n=i.length>1?i[1]:void 0,t.length){e.next=4;break}return e.abrupt("return",n);case 4:return r=y(t),a=r[0],o=r.slice(1),e.next=7,Iu(a);case 7:if(null!=(u=e.sent)){e.next=10;break}return e.abrupt("return",Su(o,n));case 10:return e.abrupt("return",u);case 11:case"end":return e.stop()}}),e)}))),Au.apply(this,arguments)}function Ru(){return su(pu,vu,null,{expectReply:!0,timeout:10})}function Tu(e){return su(pu,yu,{key:e,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:xu}),Nu()}function _u(e){return su(pu,gu,{key:e}),Nu()}function Cu(e){return su(pu,bu,{pattern:e},{expectReply:!0,timeout:10})}function Ou(e){return function(e,t,n){t(e);var r="@EXIT",a=lu(function(){var t=s(h.mark((function t(a){var o,u;return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a.send(e,tu);case 1:return t.next=4,a.receive();case 4:if(o=t.sent,u=ou.FCL_REGISTRY[e].error,o.tag!==r){t.next=9;break}return a.send(e,nu),t.abrupt("return");case 9:if(!u){t.next=13;break}return n(null,u),a.send(e,nu),t.abrupt("return");case 13:n(o.data,null),t.next=1;break;case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());return function(){return su(a,r)}}(pu,(function(){return lu(ku,pu)}),e)}function Pu(e){return su(pu,mu).then(Nu(e))}function Nu(e){return null!=e&&"object"===c(e)&&Object.keys(e).map((function(t){return Eu(t,e[t])})),{put:Eu,get:Iu,all:Ru,first:Su,update:Tu,delete:_u,where:Cu,subscribe:Ou,overload:Lu}}lu(ku,pu),Nu.put=Eu,Nu.get=Iu,Nu.all=Ru,Nu.first=Su,Nu.update=Tu,Nu.delete=_u,Nu.where=Cu,Nu.subscribe=Ou,Nu.overload=Lu;var Bu=function(e){return e};function Lu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Bu;return new Promise(function(){var n=s(h.mark((function n(r,a){var o,u;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Ru();case 2:return o=n.sent,n.prev=3,Nu(e),n.t0=t,n.next=8,Ru();case 8:return n.t1=n.sent,n.next=11,(0,n.t0)(n.t1);case 11:return u=n.sent,n.next=14,Pu(o);case 14:r(u),n.next=22;break;case 17:return n.prev=17,n.t2=n.catch(3),n.next=21,Pu(o);case 21:a(n.t2);case 22:case"end":return n.stop()}}),n,null,[[3,17]])})));return function(e,t){return n.apply(this,arguments)}}())}var Uu=Object.freeze({debug:5,info:4,log:3,warn:2,error:1}),Fu=function(e){var t=e.title,n=e.message;return["\n %c".concat(t,"\n ============================\n\n ").concat(n,"\n\n ============================\n ").replace(/\n[^\S\r\n]+/g,"\n").trim(),,"font-weight:bold;font-family:monospace;"]},ju=function(){var e=s(h.mark((function e(t){var n,r,a,o,u,i,s,c,f,l,p,d;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.title,s=t.message,c=t.level,f=t.always,l=void 0!==f&&f,e.next=3,Nu.get("logger.level",Uu.warn);case 3:if(p=e.sent,l||!(p8)&&Hu("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(t[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),t[1]=t[1].padEnd(8,"0"),{type:"UFix64",value:e=t.join(".")}}if(Yu(e))return di(),{type:"UFix64",value:e.toString()};Hu("Expected String for UFix64")}),(function(e){return e})),vi=Du("Fix64",(function(e){if(Ku(e)){var t=e.split(".");return 2!==t.length&&Hu("Expected one decimal but found ".concat(t.length," in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),(0==t[1].length||t[1].length>8)&&Hu("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(t[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),t[1]=t[1].padEnd(8,"0"),{type:"Fix64",value:e=t.join(".")}}if(Yu(e))return di(),{type:"Fix64",value:e.toString()};Hu("Expected String for Fix64")}),(function(e){return e})),yi=Du("String",(function(e){if(Ku(e))return{type:"String",value:e};Hu("Expected String for type String")}),(function(e){return e})),gi=Du("Character",(function(e){if(Ku(e))return{type:"Character",value:e};Hu("Expected Character for type Character")}),(function(e){return e})),mi=Du("Bool",(function(e){if("boolean"==typeof e)return{type:"Bool",value:e};Hu("Expected Boolean for type Bool")}),(function(e){return e})),bi=Du("Address",(function(e){if(Ku(e))return{type:"Address",value:e};Hu("Expected Address for type Address")}),(function(e){return e})),wi=Du("Void",(function(e){if(!e||zu(e))return{type:"Void"};Hu("Expected Void for type Void")}),(function(e){return e})),xi=Du("Reference",(function(e){if(Mu(e))return{type:"Reference",value:e};Hu("Expected Object for type Reference")}),(function(e){return e})),ki=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Du("Array",(function(t){return{type:"Array",value:Gu(e)?e.map((function(e,n){return e.asArgument(t[n])})):t.map((function(t){return e.asArgument(t)}))}}),(function(e){return e}))},Ei=Du("Path",(function(e){if(Mu(e))return Ku(e.domain)||Hu("Expected a string for the Path domain but found ".concat(e.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),"storage"!==e.domain&&"private"!==e.domain&&"public"!==e.domain&&Hu('Expected either "storage", "private" or "public" as the Path domain but found '.concat(e.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),Ku(e.identifier)||Hu("Expected a string for the Path identifier but found ".concat(e.identifier,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),{type:"Path",value:{domain:e.domain,identifier:e.identifier}};Hu("Expected Object for type Path")}),(function(e){return e})),Ii=Object.freeze({__proto__:null,Address:bi,Array:ki,Bool:mi,Character:gi,Dictionary:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Du("Dictionary",(function(t){if(Mu(t))return{type:"Dictionary",value:Gu(e)?e.map((function(e,n){return{key:e.key.asArgument(t[n].key),value:e.value.asArgument(t[n].value)}})):Gu(t)?t.map((function(t){return{key:e.key.asArgument(t.key),value:e.value.asArgument(t.value)}})):[{key:e.key.asArgument(t.key),value:e.value.asArgument(t.value)}]};Hu("Expected Object for type Dictionary")}),(function(e){return e}))},Enum:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Du("Enum",(function(n){if(Mu(n))return{type:"Enum",value:{id:e,fields:Gu(t)?t.map((function(e,t){return{name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}})):n.fields.map((function(e){return{name:e.name,value:t.value.asArgument(e.value)}}))}};Hu("Expected Object for type Enum")}),(function(e){return e}))},Event:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Du("Event",(function(n){if(Mu(n))return{type:"Event",value:{id:e,fields:Gu(t)?t.map((function(e,t){return{name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}})):n.fields.map((function(e){return{name:e.name,value:t.value.asArgument(e.value)}}))}};Hu("Expected Object for type Event")}),(function(e){return e}))},Fix64:vi,Identity:Vu,Int:Xu,Int128:ui,Int16:ei,Int256:si,Int32:ni,Int64:ai,Int8:$u,Optional:function(e){return Du("Optional",(function(t){return{type:"Optional",value:zu(t)?null:e.asArgument(t)}}),(function(e){return e}))},Path:Ei,Reference:xi,Resource:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Du("Resource",(function(n){if(Mu(n))return{type:"Resource",value:{id:e,fields:Gu(t)?t.map((function(e,t){return{name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}})):n.fields.map((function(e){return{name:e.name,value:t.value.asArgument(e.value)}}))}};Hu("Expected Object for type Resource")}),(function(e){return e}))},String:yi,Struct:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Du("Struct",(function(n){if(Mu(n))return{type:"Struct",value:{id:e,fields:Gu(t)?t.map((function(e,t){return{name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}})):n.fields.map((function(e){return{name:e.name,value:t.value.asArgument(e.value)}}))}};Hu("Expected Object for type Struct")}),(function(e){return e}))},UFix64:hi,UInt:Ju,UInt128:oi,UInt16:Qu,UInt256:ii,UInt32:ti,UInt64:ri,UInt8:Zu,Void:wi,Word16:fi,Word32:li,Word64:pi,Word8:ci,_Array:ki});function Si(e){return Zo(e)?e(Co,Ii):[]}function Ai(e){return Ri.apply(this,arguments)}function Ri(){return(Ri=s(h.mark((function e(t){var n,r,a;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return he(void 0!==(n=t.url),"retrieve({ url }) -- url must be defined"),e.prev=2,e.next=5,We(n);case 5:r=e.sent,e.next=11;break;case 8:throw e.prev=8,e.t0=e.catch(2),new Error("httpDocumentResolver Error: Failed to retrieve document.");case 11:if(!r.ok){e.next=17;break}return e.next=14,r.json();case 14:e.t1=e.sent,e.next=18;break;case 17:e.t1=null;case 18:return a=e.t1,e.abrupt("return",a);case 20:case"end":return e.stop()}}),e,null,[[2,8]])})))).apply(this,arguments)}var Ti=new Map([["http",Ai],["https",Ai]]);function _i(e){return Ci.apply(this,arguments)}function Ci(){return(Ci=s(h.mark((function e(t){var n,r,a,o,u,i;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return he(void 0!==(n=t.url),"retrieve({ url }) -- url must be defined"),he("string"==typeof n,"retrieve({ url }) -- url must be a string"),e.next=5,oe().where(/^document\.resolver\./);case 5:return r=e.sent,Object.keys(r).map((function(e){var t=r[e],n=e.replace(/^document\.resolver\./,"");Ti.set(n,t)})),he(a=/^(.*):\/\/([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$/.exec(n),"Failed to parse URL"),o=a[1],he(a,"Failed to parse URL protocol"),he(u=Ti.get(o),"No resolver found for protcol=".concat(o)),e.next=15,u({url:n});case 15:return i=e.sent,e.abrupt("return",i);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oi(e){if(null==e)return null;if("1.0.0"===e.f_version)return e;throw new Error("normalizeInteractionTemplate Error: Invalid InteractionTemplate")}function Pi(e){var t,n,r=e.network,a=e.template;if(yo(null!=r,"deriveCadenceByNetwork({ network }) -- network must be defined"),yo("string"==typeof r,"deriveCadenceByNetwork({ network }) -- network must be a string"),yo(null!=a,"generateDependencyPin({ template }) -- template must be defined"),yo("object"===c(a),"generateDependencyPin({ template }) -- template must be an object"),yo("InteractionTemplate"===a.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),"1.0.0"===(a=Oi(a)).f_version)return Object.keys(null===(t=a)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.dependencies).map((function(e){var t,n,o,u=Object.values(null===(t=a)||void 0===t||null===(n=t.data)||void 0===n||null===(o=n.dependencies)||void 0===o?void 0:o[e]);yo(u,"deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ".concat(e)),yo(0===u.length,"deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ".concat(e));var i=u[0],s=null==i?void 0:i[r];return yo(s,"deriveCadenceByNetwork -- Could not find ".concat(r," network information for dependency: ").concat(e)),[e,s.address]})).reduce((function(e,t){var n=u(t,2),r=n[0],a=n[1],o=new RegExp("(\\b"+r+"\\b)","g");return e.replace(o,a)}),a.data.cadence);throw new Error("deriveCadenceByNetwork Error: Unsupported template version")}function Ni(e){return Bi.apply(this,arguments)}function Bi(){return Bi=s(h.mark((function e(t){var n,r,a,o,u,i,s,c,f,l,p,d,v;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.template,e.next=3,oe.get("flow.network");case 3:he(a=e.sent,"FCL configureDependencies Error: Missing configuration value for 'flow.network'"),o={},e.t0=r.f_version,e.next="1.0.0"===e.t0?9:12;break;case 9:for(u=Object.keys(null==r||null===(n=r.data)||void 0===n?void 0:n.dependencies),i=0,s=u;i0,"FCL configureDependencies Error: No contracts found in template for placeholder=".concat(f)),d=l[p[0]],he(v=d[a],"FCL configureDependencies Error: No dependency information for placeholder=".concat(f," contract=").concat(p[0]," network=").concat(a)),he(null==v?void 0:v.address,"FCL configureDependencies Error: No address information for placeholder=".concat(f," contract=").concat(p[0]," network=").concat(a)),o[f]=Je(null==v?void 0:v.address);return e.abrupt("return",o);case 12:throw new Error("FCL configureDependencies Error: Unsupported template version");case 13:case"end":return e.stop()}}),e)}))),Bi.apply(this,arguments)}function Li(e){return Ui.apply(this,arguments)}function Ui(){return(Ui=s(h.mark((function e(t){var n,r;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Xo(null==t?void 0:t.template)){e.next=4;break}return e.next=3,_i({url:null==t?void 0:t.template});case 3:t.template=e.sent;case 4:if(n={},null==t||!t.template){e.next=10;break}return t.template=Oi(null==t?void 0:t.template),e.next=9,Ni({template:t.template});case 9:n=e.sent;case 10:if(e.t0=t.cadence,e.t0){e.next=19;break}return e.t1=Pi,e.t2=t.template,e.next=16,oe().get("flow.network");case 16:e.t3=e.sent,e.t4={template:e.t2,network:e.t3},e.t0=(0,e.t1)(e.t4);case 19:return r=e.t0,t.cadence=r,t.dependencies=n,e.abrupt("return",t);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fi(e,t){return ji.apply(this,arguments)}function ji(){return ji=s(h.mark((function e(t,n){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(he(Vo(n),"".concat(t,"(opts) -- opts is required")),he(Jo(n),"".concat(t,"(opts) -- opts must be an object")),he(!(n.cadence&&n.template),"".concat(t,"({ template, cadence }) -- cannot pass both cadence and template")),he(Vo(n.cadence||(null==n?void 0:n.template)),"".concat(t,"({ cadence }) -- cadence is required")),he(Xo(n.cadence)||(null==n?void 0:n.template),"".concat(t,"({ cadence }) -- cadence must be a string")),e.t0=he,e.t1=n.cadence,e.t1){e.next=11;break}return e.next=10,oe().get("flow.network");case 10:e.t1=e.sent;case 11:return e.t2=e.t1,e.t3="".concat(t,'(opts) -- Required value for "flow.network" not defined in config. See: ',"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration"),(0,e.t0)(e.t2,e.t3),e.t4=he,e.next=17,oe().get("accessNode.api");case 17:e.t5=e.sent,e.t6="".concat(t,'(opts) -- Required value for "accessNode.api" not defined in config. See: ',"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration"),(0,e.t4)(e.t5,e.t6);case 20:case"end":return e.stop()}}),e)}))),ji.apply(this,arguments)}function Di(e){return Gi.apply(this,arguments)}function Gi(){return(Gi=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Fi("mutate",t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mi(e){return zi.apply(this,arguments)}function zi(){return(zi=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Fi("query",t));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Yi(){return qi.apply(this,arguments)}function qi(){return qi=s(h.mark((function e(){var t,n=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,Mi(t);case 3:return e.next=5,Li(t);case 5:return t=e.sent,e.abrupt("return",oe().overload(t.dependencies||{},s(h.mark((function e(){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",go([Uo(t.cadence),_o(Si(t.args||[])),t.limit&&"number"==typeof t.limit&&To(t.limit)]).then(mo));case 1:case"end":return e.stop()}}),e)})))));case 7:case"end":return e.stop()}}),e)}))),qi.apply(this,arguments)}function Ki(e,t){return Hi.apply(this,arguments)}function Hi(){return Hi=s(h.mark((function e(t,n){var r,a,o,u,i,s;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&null!=n){e.next=2;break}return e.abrupt("return",[]);case 2:return(r=new URL(t)).searchParams.append("code",n),e.next=6,fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(e){return e.json()}));case 6:if(a=e.sent,!Array.isArray(a)){e.next=9;break}return e.abrupt("return",a);case 9:if(o=[],Array.isArray(a.authorizations)){u=w(a.authorizations);try{for(u.s();!(i=u.n()).done;)s=i.value,o.push(b({type:"authz",keyId:a.keyId},s))}catch(e){u.e(e)}finally{u.f()}}return null!=a.provider&&o.push(b({type:"authn",id:"wallet-provider#authn"},a.provider)),e.abrupt("return",o);case 13:case"end":return e.stop()}}),e)}))),Hi.apply(this,arguments)}function Wi(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[].concat(ve(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),ve(e))}var Vi={f_type:"Service",f_vsn:"1.0.0"},Ji={f_type:"Identity",f_vsn:"1.0.0"},Xi={f_type:"USER",f_vsn:"1.0.0"},Zi={f_type:"PollingResponse",f_vsn:"1.0.0"},$i={f_type:"CompositeSignature",f_vsn:"1.0.0"};function Qi(e){return null==e?null:"1.0.0"===e.f_vsn?e:b(b({old:e},Vi),{},{type:"frame",endpoint:e.endpoint,params:e.params||{},data:e.data||{}})}function es(e){return null==e?null:"1.0.0"===e.f_vsn?e:b(b({},Vi),{},{type:"back-channel-rpc",endpoint:e.endpoint,method:e.method,params:e.params||{},data:e.data||{}})}function ts(e){return null==e?null:(null==e.method&&(e=b(b({},e),{},{type:"local-view",method:"VIEW/IFRAME"})),"1.0.0"===e.f_vsn?e:b(b({},Vi),{},{type:e.type||"local-view",method:e.method,endpoint:e.endpoint,data:e.data||{},params:e.params||{}}))}var ns={"back-channel-rpc":es,"pre-authz":function(e){return null==e?null:"1.0.0"===e.f_vsn?e:b(b({},Vi),{},{type:e.type,uid:e.id,endpoint:e.endpoint,method:e.method,identity:b(b({},Ji),{},{address:Je(e.addr),keyId:e.keyId}),params:e.params,data:e.data})},authz:function(e){return null==e?null:"1.0.0"===e.f_vsn?e:b(b({},Vi),{},{type:e.type,uid:e.id,endpoint:e.endpoint,method:e.method,identity:b(b({},Ji),{},{address:Je(e.addr),keyId:e.keyId}),params:e.params,data:e.data})},authn:function(e){return null==e?null:"1.0.0"===e.f_vsn?e:b(b({},Vi),{},{type:e.type,uid:e.id,endpoint:e.authn,id:e.pid,provider:{address:Je(e.addr),name:e.name,icon:e.icon}})},frame:Qi,"open-id":function(e){return null==e?null:"1.0.0"===e.f_vsn?e:null},"user-signature":function(e){if(null==e)return null;if("1.0.0"===e.f_vsn)return e;throw new Error("Invalid user-signature service")},"local-view":ts,"account-proof":function(e){if(null==e)return null;if("1.0.0"===e.f_vsn)return e;throw new Error("FCL Normalizer Error: Invalid account-proof service")},"authn-refresh":function(e){if(null==e)return null;if("1.0.0"===e.f_vsn)return e;throw new Error("Invalid authn-refresh service")}};function rs(e,t){try{return ns[e.type](e,t)}catch(t){return console.error("Unrecognized FCL Service Type [".concat(e.type,"]"),e,t),e}}function as(e){return Ge([e.provider.address||e.provider.name||"UNSPECIFIED",e.id]).toString("hex")}function os(e){return e.addr=e.addr?Je(e.addr):null,e.paddr=e.paddr?Je(e.paddr):null,e}function us(e,t){return t.find((function(t){return t.type===e}))}function is(e){return ss.apply(this,arguments)}function ss(){return ss=s(h.mark((function e(t){var n,r;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=os(t),e.t0=Wi,e.t1=t.services||[],e.next=5,Ki(t.hks,t.code);case 5:return e.t2=e.sent,n=(0,e.t0)(e.t1,e.t2).map((function(e){return rs(e,t)})),r=us("authn",n),e.abrupt("return",b(b({},Xi),{},{addr:Je(t.addr),cid:as(r),loggedIn:!0,services:n,expiresAt:t.expires}));case 9:case"end":return e.stop()}}),e)}))),ss.apply(this,arguments)}function cs(){var e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((function(t){return t.type===e}))}function fs(e){var t=new URL(e.endpoint);if(t.searchParams.append("l6n",window.location.origin),null!=e.params)for(var n=0,r=Object.entries(e.params||{});n1&&void 0!==arguments[1]?arguments[1]:{},n=t.method||"POST",r="GET"===n?void 0:JSON.stringify(t.data||e.data||{});return fetch(fs(e),{method:n,headers:b(b(b({},e.headers||{}),t.headers||{}),{},{"Content-Type":"application/json"}),body:r}).then((function(e){return e.json()}))}function ps(e){var t,n;return null==e?null:"1.0.0"===e.f_vsn?e:b(b({},Zi),{},{status:null!==(t=e.status)&&void 0!==t?t:"APPROVED",reason:null!==(n=e.reason)&&void 0!==n?n:null,data:e.compositeSignature||e.data||b({},e)||{},updates:es(e.authorizationUpdates),local:Qi((e.local||[])[0])})}var ds={"HTTP/GET":"GET","HTTP/POST":"POST"},hs=function(e){return he(ds[e.method],"Invalid Service Method for type back-channel-rpc",{service:e}),ds[e.method]};function vs(e){return ys.apply(this,arguments)}function ys(){return ys=s(h.mark((function e(t){var n,r,a=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:function(){return!0},he(t,"Missing Polling Service",{service:t}),n()){e.next=4;break}throw new Error("Externally Halted");case 4:return e.next=6,ls(t,{method:hs(t)}).then(ps);case 6:r=e.sent,e.t0=r.status,e.next="APPROVED"===e.t0?10:"DECLINED"===e.t0?11:12;break;case 10:return e.abrupt("return",r.data);case 11:throw new Error("Declined: ".concat(r.reason||"No reason supplied."));case 12:return e.next=14,new Promise((function(e){return setTimeout(e,500)}));case 14:return e.abrupt("return",vs(r.updates,n));case 15:case"end":return e.stop()}}),e)}))),ys.apply(this,arguments)}var gs="FCL_IFRAME";function ms(e){he(!document.getElementById(gs),"Attempt at triggering multiple Frames",{src:e});var t=document.createElement("iframe");return t.src=e,t.id=gs,t.allow="usb *; hid *",t.frameBorder="0",t.style.cssText="\n position:fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n height: 100%;\n width: 100vw;\n display:block;\n background:rgba(0,0,0,0.25);\n z-index: 2147483647;\n box-sizing: border-box;\n color-scheme: light;\n",document.body.append(t),[t.contentWindow,function(){document.getElementById(gs)&&document.getElementById(gs).remove()}]}var bs=null,ws=null;function xs(e){var t;return null==bs||null!==(t=bs)&&void 0!==t&&t.closed?bs=function(e,t,n,r,a){var o=n.top.outerHeight/2+n.top.screenY-a/2,u=n.top.outerWidth/2+n.top.screenX-r/2,i=n.open(e,t,"toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(r,", height=").concat(a,", top=").concat(o,", left=").concat(u));if(!i)throw new Error("Popup failed to open (was it blocked by a popup blocker?)");return i}(e,"FCL_POP",window,640,770):ws!==e?(bs.location.replace(e),bs.focus()):bs.focus(),ws=e,[bs,function(){bs&&!bs.closed&&bs.close(),bs=null}]}var ks=null,Es=null;function Is(e){var t;if(null==ks||null!==(t=ks)&&void 0!==t&&t.closed){if(!(ks=window.open(e,"_blank")))throw new Error("Tab failed to open (was it blocked by the browser?)")}else Es!==e?(ks.location.replace(e),ks.focus()):ks.focus();return Es=e,[ks,function(){ks&&!ks.closed&&ks.close(),ks=null}]}var Ss={"VIEW/IFRAME":ms,"VIEW/POP":xs,"VIEW/TAB":Is};function As(e){return Rs.apply(this,arguments)}function Rs(){return Rs=s(h.mark((function e(t){var n,r=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.prev=1,e.abrupt("return",Ss[t.method](fs(t),n));case 5:throw e.prev=5,e.t0=e.catch(1),console.error("execLocal({service, opts = {}})",e.t0,{service:t,opts:n}),e.t0;case 9:case"end":return e.stop()}}),e,null,[[1,5]])}))),Rs.apply(this,arguments)}function Ts(e){return _s.apply(this,arguments)}function _s(){return _s=s(h.mark((function e(t){var n,r,a,o,i,s,c,f,l;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.service,r=t.body,a=t.config,t.opts,e.next=3,ls(n,{data:b({fclVersion:de,service:{params:n.params,data:n.data,type:n.type},config:a},r)}).then(ps);case 3:if("APPROVED"!==(o=e.sent).status){e.next=8;break}return e.abrupt("return",o.data);case 8:if("DECLINED"!==o.status){e.next=12;break}throw new Error("Declined: ".concat(o.reason||"No reason supplied."));case 12:if("REDIRECT"!==o.status){e.next=16;break}return e.abrupt("return",o);case 16:if("PENDING"!==o.status){e.next=28;break}return i=!0,e.next=20,As(ts(o.local));case 20:return s=e.sent,(c=u(s,2))[0],f=c[1],l=function(){try{f(),i=!1}catch(e){console.error("Frame Close Error",e)}},e.abrupt("return",vs(o.updates,(function(){return i})).then((function(e){return l(),e})).catch((function(e){throw console.error(e),l(),e})));case 28:throw console.error("Auto Decline: Invalid Response",{service:n,resp:o}),new Error("Auto Decline: Invalid Response");case 30:case"end":return e.stop()}}),e)}))),_s.apply(this,arguments)}var Cs="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Os=Cs.length;function Ps(){for(var e="",t=32;t--;)e+=Cs[Math.random()*Os|0];return e}var Ns,Bs,Ls,Us,Fs="FCL:VIEW:CLOSE",js="FCL:VIEW:READY",Ds="FCL:VIEW:RESPONSE",Gs=function(e){return"string"==typeof e&&e.toLowerCase()},Ms=new Set(["monetizationstart","monetizationpending","monetizationprogress","monetizationstop"]),zs=function(e,t){return console.warn("DEPRECATION NOTICE","Received ".concat(e,", please use ").concat(t," for this and future versions of FCL"))},Ys=function(e){var t=e.close,n=e.send,r=e.onReady,a=e.onResponse,o=e.onMessage;return function(e){try{if("object"!==c(e.data))return;if(Ms.has(e.data.type))return;Gs(e.data.type)===Gs(Fs)&&t(),Gs(e.data.type)===Gs(js)&&r(e,{send:n,close:t}),Gs(e.data.type)===Gs(Ds)&&a(e,{send:n,close:t}),o(e,{send:n,close:t}),Gs(e.data.type)===Gs("FCL:FRAME:READY")&&(zs(e.data.type,js),r(e,{send:n,close:t})),Gs(e.data.type)===Gs("FCL:FRAME:RESPONSE")&&(zs(e.data.type,Ds),a(e,{send:n,close:t})),Gs(e.data.type)===Gs("FCL:FRAME:CLOSE")&&(zs(e.data.type,Fs),t()),Gs(e.data.type)===Gs("FCL::CHALLENGE::RESPONSE")&&(zs(e.data.type,Ds),a(e,{send:n,close:t})),Gs(e.data.type)===Gs("FCL::AUTHZ_READY")&&(zs(e.data.type,js),r(e,{send:n,close:t})),Gs(e.data.type)===Gs("FCL::CHALLENGE::CANCEL")&&(zs(e.data.type,Fs),t()),Gs(e.data.type)===Gs("FCL::CANCEL")&&(zs(e.data.type,Fs),t())}catch(e){console.error("Frame Callback Error",e),t()}}},qs=function(){},Ks=function(){},Hs=function(){},Ws=function(){},Vs={"HTTP/RPC":Ts,"HTTP/POST":Ts,"IFRAME/RPC":function(e){var t=e.service,n=e.body,r=e.config,a=e.opts;return new Promise((function(e,o){var i=Ps(),f=a.includeOlderJsonRpcCall;!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:qs,close:qs};var n=t.onClose||qs,r=t.onMessage||qs,a=t.onReady||qs,o=t.onResponse||qs,i=Ys({close:l,send:p,onReady:a,onResponse:o,onMessage:r});window.addEventListener("message",i);var s=u(ms(fs(e)),2),c=s[0],f=s[1];return{send:p,close:l};function l(){try{window.removeEventListener("message",i),f(),n()}catch(e){console.error("Frame Close Error",e)}}function p(e){try{c.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Frame Send Error",e,t)}}}(t,{onReady:function(e,a){return s(h.mark((function e(){var o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=a.send,e.prev=1,o({type:"FCL:VIEW:READY:RESPONSE",fclVersion:de,body:n,service:{params:t.params,data:t.data,type:t.type},config:r}),o({fclVersion:de,type:"FCL:FRAME:READY:RESPONSE",body:n,service:{params:t.params,data:t.data,type:t.type},config:r,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),f&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[n,t.params],deprecated:{message:"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0;case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))()},onResponse:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;var a=ps(t.data);switch(a.status){case"APPROVED":e(a.data),r();break;case"DECLINED":o("Declined: ".concat(a.reason||"No reason supplied")),r();break;case"REDIRECT":e(a),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execIframeRPC onResponse error",e),e}},onMessage:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;if("2.0"!==t.data.jsonrpc)return;if(t.data.id!==i)return;var a=ps(t.data.result);switch(a.status){case"APPROVED":e(a.data),r();break;case"DECLINED":o("Declined: ".concat(a.reason||"No reason supplied")),r();break;case"REDIRECT":e(a),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execIframeRPC onMessage error",e),e}},onClose:function(){o("Declined: Externally Halted")}})}))},"POP/RPC":function(e){var t=e.service,n=e.body,r=e.config,a=e.opts;return new Promise((function(e,o){var i=Ps(),f=a.redir,l=a.includeOlderJsonRpcCall;!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:Ks,close:Ks};var n=t.onClose||Ks,r=t.onMessage||Ks,a=t.onReady||Ks,o=t.onResponse||Ks,i=Ys({close:p,send:d,onReady:a,onResponse:o,onMessage:r});window.addEventListener("message",i);var s=u(xs(fs(e)),2),c=s[0],f=s[1],l=setInterval((function(){c&&c.closed&&p()}),500);return{send:d,close:p};function p(){try{window.removeEventListener("message",i),clearInterval(l),f(),n()}catch(e){console.error("Popup Close Error",e)}}function d(e){try{c.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Popup Send Error",e,t)}}}(t,{onReady:function(e,a){return s(h.mark((function e(){var o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=a.send,e.prev=1,o({fclVersion:de,type:"FCL:VIEW:READY:RESPONSE",body:n,service:{params:t.params,data:t.data,type:t.type},config:r}),o({fclVersion:de,type:"FCL:FRAME:READY:RESPONSE",body:n,service:{params:t.params,data:t.data,type:t.type},config:r,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),l&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[n,t.params]}),e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0;case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))()},onResponse:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;var a=ps(t.data);switch(a.status){case"APPROVED":e(a.data),!f&&r();break;case"DECLINED":o("Declined: ".concat(a.reason||"No reason supplied")),r();break;case"REDIRECT":e(a),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;if("2.0"!==t.data.jsonrpc)return;if(t.data.id!==i)return;var a=ps(t.data.result);switch(a.status){case"APPROVED":e(a.data),!f&&r();break;case"DECLINED":o("Declined: ".concat(a.reason||"No reason supplied")),r();break;case"REDIRECT":e(a),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose:function(){o("Declined: Externally Halted")}})}))},"TAB/RPC":function(e){var t=e.service,n=e.body,r=e.config,a=e.opts;return new Promise((function(e,o){var i=Ps(),f=a.redir,l=a.includeOlderJsonRpcCall;!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:Hs,close:Hs};var n=t.onClose||Hs,r=t.onMessage||Hs,a=t.onReady||Hs,o=t.onResponse||Hs,i=Ys({close:p,send:d,onReady:a,onResponse:o,onMessage:r});window.addEventListener("message",i);var s=u(Is(fs(e)),2),c=s[0],f=s[1],l=setInterval((function(){c&&c.closed&&p()}),500);return{send:d,close:p};function p(){try{window.removeEventListener("message",i),clearInterval(l),f(),n()}catch(e){console.error("Tab Close Error",e)}}function d(e){try{c.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Tab Send Error",e,t)}}}(t,{onReady:function(e,a){return s(h.mark((function e(){var o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=a.send,e.prev=1,o({fclVersion:de,type:"FCL:VIEW:READY:RESPONSE",body:n,service:{params:t.params,data:t.data,type:t.type},config:r}),o({fclVersion:de,type:"FCL:FRAME:READY:RESPONSE",body:n,service:{params:t.params,data:t.data,type:t.type},config:r,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),l&&o({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[n,t.params]}),e.next=10;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0;case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))()},onResponse:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;var a=ps(t.data);switch(a.status){case"APPROVED":e(a.data),!f&&r();break;case"DECLINED":o("Declined: ".concat(a.reason||"No reason supplied")),r();break;case"REDIRECT":e(a),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;if("2.0"!==t.data.jsonrpc)return;if(t.data.id!==i)return;var a=ps(t.data.result);switch(a.status){case"APPROVED":e(a.data),!f&&r();break;case"DECLINED":o("Declined: ".concat(a.reason||"No reason supplied")),r();break;case"REDIRECT":e(a),r();break;default:o("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose:function(){o("Declined: Externally Halted")}})}))},"EXT/RPC":function(e){var t=e.service,n=e.body,r=e.config;return e.opts,new Promise((function(e,a){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:Ws,close:Ws};var n=t.onClose||Ws,r=t.onMessage||Ws,a=t.onReady||Ws,o=t.onResponse||Ws,u=Ys({close:i,send:s,onReady:a,onResponse:o,onMessage:r});return window.addEventListener("message",u),s({service:e}),{send:s,close:i};function i(){try{window.removeEventListener("message",u),n()}catch(e){console.error("Ext Close Error",e)}}function s(e){try{window&&window.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Ext Send Error",e,t)}}}(t,{onReady:function(e,a){return s(h.mark((function e(){var o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=a.send,e.prev=1,o({fclVersion:de,type:"FCL:VIEW:READY:RESPONSE",body:n,service:{params:t.params,data:t.data,type:t.type},config:r}),e.next=8;break;case 5:throw e.prev=5,e.t0=e.catch(1),e.t0;case 8:case"end":return e.stop()}}),e,null,[[1,5]])})))()},onResponse:function(t,n){var r=n.close;try{if("object"!==c(t.data))return;var o=ps(t.data);switch(o.status){case"APPROVED":e(o.data),r();break;case"DECLINED":a("Declined: ".concat(o.reason||"No reason supplied")),r();break;case"REDIRECT":e(o),r();break;default:a("Declined: No reason supplied"),r()}}catch(e){throw console.error("execExtRPC onResponse error",e),e}},onClose:function(){a("Declined: Externally Halted")}})}))}},Js=["ServicePlugin"],Xs=["discovery-service"],Zs=(Ns=new Set,Bs=new Map(Object.entries(Vs)),Ls=function(e){return Ns=new Set(ve(e))},Object.freeze({add:function(e){if(he(Xs.includes(e.type),"Service Plugin type ".concat(e.type," is not supported")),"discovery-service"===e.type){var t=function(e){var t=e.services,n=e.serviceStrategy;he(Array.isArray(t)&&t.length,"Array of Discovery Services is required");var r,a=w(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;he(Vo(o.f_type)&&"Service"===o.f_type,"Service is required"),he(Vo(o.type)&&"authn"===o.type,"Service must be type authn. Received ".concat(o.type)),he(o.method in Vs||n.method===o.method,"Service method ".concat(o.method," is not supported"))}}catch(e){a.e(e)}finally{a.f()}return he(Vo(n),"Service strategy is required"),he(Vo(n.method)&&Xo(n.method),"Service strategy method is required"),he(Vo(n.exec)&&Zo(n.exec),"Service strategy exec function is required"),{discoveryServices:t,serviceStrategy:n}}(e),n=t.discoveryServices,r=t.serviceStrategy;Ls(n),Bs.has(r.method)?me({title:"Add Service Plugin",message:"Service strategy for ".concat(r.method," already exists"),level:ye.warn}):Bs.set(r.method,r.exec)}},getServices:function(){return ve(Ns)},getStrategy:function(e){return Bs.get(e)},getStrategies:function(){return ve(Bs.keys())}})),$s=(Us=new Map,Object.freeze({add:function(e){var t,n=function(e){var t;he(e,"No plugins supplied");var n,r=w(t=Array.isArray(e)?ve(e):[e]);try{for(r.s();!(n=r.n()).done;){var a=n.value;he(Vo(a.name),"Plugin name is required"),he(Vo(a.f_type),"Plugin f_type is required"),he(Js.includes(a.f_type),"Plugin type ".concat(a.f_type," is not supported"))}}catch(e){r.e(e)}finally{r.f()}return t}(e),r=w(n);try{for(r.s();!(t=r.n()).done;){var a=t.value;Us.set(a.name,a),"ServicePlugin"===a.f_type&&Zs.add(a)}}catch(e){r.e(e)}finally{r.f()}},getPlugins:function(){return Us}})),Qs=function(){var e=s(h.mark((function e(t){var n,r,a,o,u;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.service,r=t.body,a=t.config,o=t.opts,u=Zs.getStrategy(n.method),e.abrupt("return",u({service:n,body:r,config:a,opts:o}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ec(e){return tc.apply(this,arguments)}function tc(){return tc=s(h.mark((function e(t){var n,r,a,o,u,i,s,c,f,l,p,d;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.service,u=t.msg,i=void 0===u?{}:u,s=t.config,c=void 0===s?{}:s,f=t.opts,l=void 0===f?{}:f,i.data=o.data,e.next=4,le(/^service\./);case 4:return e.t0=e.sent,e.next=7,le(/^app\.detail\./);case 7:return e.t1=e.sent,e.t2=b(b({},c.client),{},{fclVersion:de,fclLibrary:"https://github.com/onflow/fcl-js",hostname:null!==(n=null===(r=window)||void 0===r||null===(a=r.location)||void 0===a?void 0:a.hostname)&&void 0!==n?n:null}),p={services:e.t0,app:e.t1,client:e.t2},e.prev=10,e.next=13,Qs({service:o,body:i,config:p,opts:l});case 13:if("REDIRECT"!==(d=e.sent).status){e.next=21;break}return he(o.type===d.data.type,"Cannot shift recursive service type in execService"),e.next=18,ec({service:d.data,msg:i,config:p,opts:l});case 18:return e.abrupt("return",e.sent);case 21:return e.abrupt("return",d);case 22:e.next=28;break;case 24:throw e.prev=24,e.t3=e.catch(10),me({title:"Error on execService ".concat(null==o?void 0:o.type),message:e.t3,level:ye.error}),e.t3;case 28:case"end":return e.stop()}}),e,null,[[10,24]])}))),tc.apply(this,arguments)}function nc(e){return null==e?null:"1.0.0"===e.f_vsn?e:b(b({},$i),{},{addr:Ve(e.addr||e.address),signature:e.signature||e.sig,keyId:e.keyId})}var rc,ac=function(){var e=s(h.mark((function e(){var t,n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(null===(t=window)||void 0===t?void 0:t.fcl_extensions)||[],e.abrupt("return",[].concat(ve(n),ve(Zs.getServices())));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function oc(e){return uc.apply(this,arguments)}function uc(){return(uc=s(h.mark((function e(t){var n,r,a,o,u;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe.get("discovery.authn.include",[]);case 2:return r=e.sent,e.next=5,oe.first(["discovery.wallet.method","discovery.wallet.method.default"]);case 5:if(a=e.sent,o=null!=t&&t.method?t.method:a,null===(n=null==t?void 0:t.endpoint)||void 0===n){e.next=11;break}e.t0=n,e.next=14;break;case 11:return e.next=13,oe.first(["discovery.wallet","challenge.handshake"]);case 13:e.t0=e.sent;case 14:return he(u=e.t0,'\n If no service is passed to "authenticate," then "discovery.wallet" must be defined in fcl config.\n See: "https://docs.onflow.org/fcl/reference/api/#setting-configuration-values"\n '),e.abrupt("return",b(b({},t),{},{type:"authn",endpoint:u,method:o,discoveryAuthnInclude:r}));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ic(e){return sc.apply(this,arguments)}function sc(){return sc=s(h.mark((function e(t){var n,r,a,o,u,i;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.types,e.next=3,oe.get("discovery.authn.endpoint");case 3:return o=e.sent,he(Boolean(o),'"discovery.authn.endpoint" in config must be defined.'),e.next=7,oe.get("discovery.authn.include",[]);case 7:return u=e.sent,i=new URL(o),e.t0=fetch,e.t1=i,e.t2={"Content-Type":"application/json"},e.t3=JSON,e.t4=a,e.t5=de,e.t6=u,e.next=18,ac();case 18:return e.t7=e.sent,e.t8=Zs.getStrategies(),e.t9=null===(n=window)||void 0===n||null===(r=n.navigator)||void 0===r?void 0:r.userAgent,e.t10={type:e.t4,fclVersion:e.t5,include:e.t6,clientServices:e.t7,supportedStrategies:e.t8,userAgent:e.t9},e.t11=e.t3.stringify.call(e.t3,e.t10),e.t12={method:"POST",headers:e.t2,body:e.t11},e.abrupt("return",(0,e.t0)(e.t1,e.t12).then((function(e){return e.json()})));case 25:case"end":return e.stop()}}),e)}))),sc.apply(this,arguments)}var cc,fc,lc,pc="authn",dc="SNAPSHOT",hc="UPDATED",vc="UPDATE_RESULTS",yc=function(){var e=s(h.mark((function e(){var t;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ic({types:[pc]});case 3:t=e.sent,P(pc,vc,{results:t}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),me({title:"".concat(e.t0.name," Error fetching Discovery API services."),message:e.t0.message,level:ye.error});case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(){return e.apply(this,arguments)}}(),gc=(g(rc={},E,(fc=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t='"fcl.discovery" is only available in the browser.',"undefined"==typeof window&&console.warn("\n %cFCL Warning\n ============================\n ".concat(t,"\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n "),"font-weight:bold;font-family:monospace;"),"complete"===document.readyState?yc():window.onload=s(h.mark((function e(){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:yc();case 1:case"end":return e.stop()}}),e)})));case 2:case"end":return e.stop()}var t}),e)}))),function(e){return fc.apply(this,arguments)})),g(rc,vc,(function(e,t,n){e.merge(n),e.broadcast(hc,b({},e.all()))})),g(rc,I,(function(e,t){e.subscribe(t.from),e.send(t.from,hc,b({},e.all()))})),g(rc,S,(function(e,t){return e.unsubscribe(t.from)})),g(rc,dc,(cc=s(h.mark((function e(t,n){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",n.reply(b({},t.all())));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return cc.apply(this,arguments)})),rc),mc=function(){return L(gc,pc)},bc={authn:{subscribe:function(e){return U(pc,mc,e)},snapshot:function(){return F(pc,mc)},update:function(){return yc()}}};function wc(){return"undefined"!=typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!=typeof navigator&&/iPad/.test(navigator.userAgent)}function xc(){return"undefined"!=typeof navigator&&/android/i.test(navigator.userAgent)||wc()}var kc,Ec,Ic=function(e){return"function"==typeof e},Sc="CURRENT_USER",Ac="CURRENT_USER/UPDATED",Rc="SNAPSHOT",Tc="SET_CURRENT_USER",_c="DEL_CURRENT_USER",Cc='{\n "f_type": "User",\n "f_vsn": "1.0.0",\n "addr":null,\n "cid":null,\n "loggedIn":null,\n "expiresAt":null,\n "services":[]\n}',Oc=function(){var e=s(h.mark((function e(t){var n,r;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=JSON.parse(Cc),e.next=3,t.get(Sc);case 3:if(null==(r=e.sent)||n.f_vsn===r.f_vsn){e.next=7;break}return t.removeItem(Sc),e.abrupt("return",n);case 7:return e.abrupt("return",r||n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Pc=(g(lc={},E,function(){var e=s(h.mark((function e(t){var n,r;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"undefined"==typeof window&&console.warn('\n %cFCL Warning\n ============================\n "currentUser" is only available in the browser.\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n ',"font-weight:bold;font-family:monospace;"),t.merge(JSON.parse(Cc)),e.next=4,oe.first(["fcl.storage","fcl.storage.default"]);case 4:if(!(n=e.sent).can){e.next=10;break}return e.next=8,Oc(n);case 8:Bc(r=e.sent)&&t.merge(r);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),g(lc,I,(function(e,t){e.subscribe(t.from),e.send(t.from,Ac,b({},e.all()))})),g(lc,S,(function(e,t){e.unsubscribe(t.from)})),g(lc,Rc,(Ec=s(h.mark((function e(t,n){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.reply(b({},t.all()));case 1:case"end":return e.stop()}}),e)}))),function(e,t){return Ec.apply(this,arguments)})),g(lc,Tc,function(){var e=s(h.mark((function e(t,n,r){var a;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.merge(r),e.next=3,oe.first(["fcl.storage","fcl.storage.default"]);case 3:(a=e.sent).can&&a.put(Sc,t.all()),t.broadcast(Ac,b({},t.all()));case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()),g(lc,_c,(kc=s(h.mark((function e(t,n){var r;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.merge(JSON.parse(Cc)),e.next=3,oe.first(["fcl.storage","fcl.storage.default"]);case 3:(r=e.sent).can&&r.put(Sc,t.all()),t.broadcast(Ac,b({},t.all()));case 6:case"end":return e.stop()}}),e)}))),function(e,t){return kc.apply(this,arguments)})),lc),Nc=function(){return L(Pc,Sc)};function Bc(e){return null==e.expiresAt||0===e.expiresAt||e.expiresAt>Date.now()}function Lc(){return Uc.apply(this,arguments)}function Uc(){return(Uc=s(h.mark((function e(){var t,n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,oe.get("fcl.accountProof.resolver");case 2:if(t=e.sent,Ic(t)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,t();case 7:if(null!=(n=e.sent)){e.next=10;break}return e.abrupt("return");case 10:return he("string"==typeof n.appIdentifier,"appIdentifier must be a string"),he(/^[0-9a-f]+$/i.test(n.nonce),"Nonce must be a hex string"),e.abrupt("return",n);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Fc=function(){var e=s(h.mark((function e(t){var n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.discoveryAuthnInclude,e.t0=n,e.next=4,ac();case 4:return e.t1=e.sent,e.t2=Zs.getStrategies(),e.t3={discoveryAuthnInclude:e.t0,clientServices:e.t1,supportedStrategies:e.t2},e.abrupt("return",{client:e.t3});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function jc(){return Dc.apply(this,arguments)}function Dc(){return Dc=s(h.mark((function e(){var t,n,r,a,o,u,i,c=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>0&&void 0!==c[0]?c[0]:{},a=r.service,o=r.redir,u=void 0!==o&&o,!a||null!=a&&null!==(t=a.provider)&&void 0!==t&&t.is_installed||null==a||null===(n=a.provider)||void 0===n||!n.requires_install){e.next=4;break}return window.location.href=null==a||null===(i=a.provider)||void 0===i?void 0:i.install_link,e.abrupt("return");case 4:return e.abrupt("return",new Promise(function(){var e=s(h.mark((function e(t,n){var r,o,i,s,c,f,l;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Nc(),r={redir:u},e.next=4,Kc();case 4:return o=e.sent,e.next=7,oc(a);case 7:return i=e.sent,s=cs(o.services,"authn-refresh"),e.prev=9,e.next=12,Lc();case 12:c=e.sent,e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(9),console.error("Error During Authentication: Could not resolve account proof data.\n ".concat(e.t0)),e.abrupt("return",n(e.t0));case 19:if(!o.loggedIn){e.next=47;break}if(!s){e.next=46;break}return e.prev=21,e.next=24,ec({service:s,msg:c,opts:r});case 24:return f=e.sent,e.t1=P,e.t2=Sc,e.t3=Tc,e.next=30,is(f);case 30:e.t4=e.sent,(0,e.t1)(e.t2,e.t3,e.t4),e.next=37;break;case 34:e.prev=34,e.t5=e.catch(21),console.error("Error: Could not refresh authentication.",e.t5);case 37:return e.prev=37,e.t6=t,e.next=41,Kc();case 41:return e.t7=e.sent,e.abrupt("return",(0,e.t6)(e.t7));case 44:e.next=47;break;case 46:return e.abrupt("return",t(o));case 47:return e.prev=47,e.t8=ec,e.t9=i,e.t10=c,e.next=53,Fc(i);case 53:return e.t11=e.sent,e.t12=r,e.t13={service:e.t9,msg:e.t10,config:e.t11,opts:e.t12},e.next=58,(0,e.t8)(e.t13);case 58:return l=e.sent,e.t14=P,e.t15=Sc,e.t16=Tc,e.next=64,is(l);case 64:e.t17=e.sent,(0,e.t14)(e.t15,e.t16,e.t17),e.next=71;break;case 68:e.prev=68,e.t18=e.catch(47),console.error("Error while authenticating",e.t18);case 71:return e.prev=71,e.t19=t,e.next=75,Kc();case 75:return e.t20=e.sent,(0,e.t19)(e.t20),e.finish(71);case 78:case"end":return e.stop()}}),e,null,[[9,15],[21,34,37,44],[47,68,71,78]])})));return function(t,n){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)}))),Dc.apply(this,arguments)}function Gc(){Nc(),P(Sc,_c)}function Mc(e){var t=function(e){return{f_type:"PreAuthzResponse",f_vsn:"1.0.0",proposer:(e||{}).proposer,payer:(e||{}).payer||[],authorization:(e||{}).authorization||[]}}(e),n=[];null!=t.proposer&&n.push(["PROPOSER",t.proposer]);var r,a=w(t.payer||[]);try{for(a.s();!(r=a.n()).done;){var o=r.value;n.push(["PAYER",o])}}catch(e){a.e(e)}finally{a.f()}var i,s=w(t.authorization||[]);try{for(s.s();!(i=s.n()).done;){var c=i.value;n.push(["AUTHORIZER",c])}}catch(e){s.e(e)}finally{s.f()}var f=n.map((function(e){var t=u(e,2),n=t[0],r=t[1];return{tempId:[r.identity.address,r.identity.keyId].join("|"),addr:r.identity.address,keyId:r.identity.keyId,signingFunction:function(e){return ec({service:r,msg:e})},role:{proposer:"PROPOSER"===n,payer:"PAYER"===n,authorizer:"AUTHORIZER"===n}}}));return f}function zc(e){return Yc.apply(this,arguments)}function Yc(){return Yc=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Nc(),e.abrupt("return",b(b({},t),{},{tempId:"CURRENT_USER",resolve:function(e,t){return s(h.mark((function n(){var r,a,o,u;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,jc({redir:!0});case 2:if(r=n.sent,a=cs(r.services,"authz"),!(o=cs(r.services,"pre-authz"))){n.next=11;break}return n.t0=Mc,n.next=9,ec({service:o,msg:t});case 9:return n.t1=n.sent,n.abrupt("return",(0,n.t0)(n.t1));case 11:if(!a){n.next=14;break}return xc()&&"WC/RPC"===a.method&&(u=window.open("","_blank")),n.abrupt("return",b(b({},e),{},{tempId:"CURRENT_USER",resolve:null,addr:Ve(a.identity.address),keyId:a.identity.keyId,sequenceNum:null,signature:null,signingFunction:function(e){return s(h.mark((function t(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=nc,t.next=3,ec({service:a,msg:e,opts:{includeOlderJsonRpcCall:!0,windowRef:u}});case 3:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 5:case"end":return t.stop()}}),t)})))()}}));case 14:throw new Error("No Authz or PreAuthz Service configured for CURRENT_USER");case 15:case"end":return n.stop()}}),n)})))()}}));case 2:case"end":return e.stop()}}),e)}))),Yc.apply(this,arguments)}function qc(e){Nc();var t="@EXIT",n=L(function(){var n=s(h.mark((function n(r){var a;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r.send(Sc,I);case 1:return n.next=4,r.receive();case 4:if((a=n.sent).tag!==t){n.next=8;break}return r.send(Sc,S),n.abrupt("return");case 8:e(a.data),n.next=1;break;case 11:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}());return function(){return P(n,t)}}function Kc(){return Nc(),P(Sc,Rc,null,{expectReply:!0,timeout:0})}function Hc(){return Wc.apply(this,arguments)}function Wc(){return(Wc=s(h.mark((function e(){var t,n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jc();case 2:return t=e.sent,n=t.addr,e.abrupt("return",Co(Je(n),bi));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Vc=function(e){return he(/^[0-9a-f]+$/i.test(e),"Message must be a hex string"),{message:e}};function Jc(e){return Xc.apply(this,arguments)}function Xc(){return Xc=s(h.mark((function e(t){var n,r,a;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Nc(),e.next=3,jc({redir:!0});case 3:return n=e.sent,he(r=cs(n.services,"user-signature"),"Current user must have authorized a signing service."),e.prev=6,e.next=9,ec({service:r,msg:Vc(t)});case 9:if(a=e.sent,!Array.isArray(a)){e.next=14;break}return e.abrupt("return",a.map((function(e){return nc(e)})));case 14:return e.abrupt("return",[nc(a)]);case 15:e.next=20;break;case 17:return e.prev=17,e.t0=e.catch(6),e.abrupt("return",e.t0);case 20:case"end":return e.stop()}}),e,null,[[6,17]])}))),Xc.apply(this,arguments)}var Zc=function(){return{authenticate:jc,unauthenticate:Gc,authorization:zc,signUserMessage:Jc,subscribe:qc,snapshot:Kc,resolveArgument:Hc}};function $c(){return $c=s(h.mark((function e(){var t,n,r,a=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.prev=1,e.next=4,Di(t);case 4:return e.next=6,Li(t);case 6:return t=e.sent,e.next=9,oe().get("fcl.authz",Zc().authorization);case 9:return r=e.sent,n=oe().overload(t.dependencies||{},s(h.mark((function e(){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",go([jo(t.cadence),_o(Si(t.args||[])),t.limit&&$o(t.limit)&&To(t.limit),Oo(t.proposer||t.authz||r),No(t.payer||t.authz||r),So(t.authorizations||[t.authz||r])]).then(mo));case 1:case"end":return e.stop()}}),e)})))),e.abrupt("return",n);case 14:throw e.prev=14,e.t0=e.catch(1),e.t0;case 17:case"end":return e.stop()}}),e,null,[[1,14]])}))),$c.apply(this,arguments)}Zc.authenticate=jc,Zc.unauthenticate=Gc,Zc.authorization=zc,Zc.signUserMessage=Jc,Zc.subscribe=qc,Zc.snapshot=Kc,Zc.resolveArgument=Hc;var Qc=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=function(e){var t;return e.deprecated&&console.warn("DEPRECATION NOTICE",e.deprecated.message),null==e||null===(t=e.body)||void 0===t||delete t.interaction,e},r=function(r){var a=r.data;"object"===c(a)&&null!=c(a)&&a.type===e&&t(n(a))};return window.addEventListener("message",r),function(){return window.removeEventListener("message",r)}},ef=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(window.location!==window.parent.location)window.parent.postMessage(b(b({},t),{},{type:e}),"*");else{if(!window.opener)throw new Error("Unable to communicate with parent FCL instance");window.opener.postMessage(b(b({},t),{},{type:e}),"*")}},tf=function(e,t){return _e.Buffer.from(e.padEnd(2*t,"0"),"hex")},nf=function(e){return function(e,t){return _e.Buffer.from(e.padStart(2*t,"0"),"hex")}(e,8)},rf=function(e){return _e.Buffer.from(e,"hex")},af=function(e){var t=e.address,n=e.nonce,r=e.appIdentifier,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];he(t,"Encode Message For Provable Authn Error: address must be defined"),he(n,"Encode Message For Provable Authn Error: nonce must be defined"),he(r,"Encode Message For Provable Authn Error: appIdentifier must be defined"),he(n.length>=64,"Encode Message For Provable Authn Error: nonce must be minimum of 32 bytes");var o=tf(_e.Buffer.from("FCL-ACCOUNT-PROOF-V0.0").toString("hex"),32);return a?_e.Buffer.concat([o,Ge([r,nf(Ve(t)),rf(n)])]).toString("hex"):Ge([r,nf(Ve(t)),rf(n)]).toString("hex")},of=Object.freeze({__proto__:null,sendMsgToFCL:ef,ready:function(e){Qc("FCL:VIEW:READY:RESPONSE",e),ef("FCL:VIEW:READY")},close:function(){ef("FCL:VIEW:CLOSE")},approve:function(e){ef("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"APPROVED",reason:null,data:e})},decline:function(e){ef("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"DECLINED",reason:e,data:null})},redirect:function(e){ef("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"REDIRECT",reason:null,data:e})},onMessageFromFCL:Qc,encodeMessageFromSignable:function(e,t){var n,r,a=(n=e.voucher,(r=new Set(n.authorizers)).add(n.proposalKey.address),r.delete(n.payer),Array.from(r).map(Je)),o=function(e){var t=new Set([e.payer]);return Array.from(t).map(Je)}(e.voucher),u=a.includes(Je(t)),i=o.includes(Je(t));if(!u&&!i)throw new wo(t);var s={cadence:e.voucher.cadence,refBlock:e.voucher.refBlock,computeLimit:e.voucher.computeLimit,arguments:e.voucher.arguments,proposalKey:b(b({},e.voucher.proposalKey),{},{address:Ve(e.voucher.proposalKey.address)}),payer:Ve(e.voucher.payer),authorizers:e.voucher.authorizers.map(Ve),payloadSigs:e.voucher.payloadSigs.map((function(e){return b(b({},e),{},{address:Ve(e.address)})}))};return u?da(s):ha(s)},CompositeSignature:function(e,t,n){this.f_type=$i.f_type,this.f_vsn=$i.f_vsn,this.addr=Je(e),this.keyId=Number(t),this.signature=n},encodeAccountProof:af,injectExtService:function(e){"authn"===e.type&&null!=e.endpoint?(Array.isArray(window.fcl_extensions)||(window.fcl_extensions=[]),window.fcl_extensions.push(e)):console.warn("Authn service is required")}}),uf="ACCOUNT_PROOF",sf="USER_SIGNATURE",cf=function(e){if(e.appIdentifier){var t=e.appIdentifier,n=e.address,r=e.nonce,a=e.signatures;return he(Xo(t),"verifyAccountProof({ appIdentifier }) -- appIdentifier must be a string"),he(Xo(n)&&16===Ve(n).length,"verifyAccountProof({ address }) -- address must be a valid address"),he(/^[0-9a-f]+$/i.test(r),"nonce must be a hex string"),he(Array.isArray(a)&&a.every((function(e,t,n){return"CompositeSignature"===e.f_type})),"Must include an Array of CompositeSignatures to verify"),he(a.map((function(e){return e.addr})).every((function(e,t,n){return e===n[0]})),"User signatures to be verified must be from a single account address"),!0}var o=e.message,u=e.address,i=e.compSigs;return he(/^[0-9a-f]+$/i.test(o),"Signed message must be a hex string"),he(Xo(u)&&16===Ve(u).length,"verifyUserSignatures({ address }) -- address must be a valid address"),he(Array.isArray(i)&&i.every((function(e,t,n){return"CompositeSignature"===e.f_type})),"Must include an Array of CompositeSignatures to verify"),he(i.map((function(e){return e.addr})).every((function(e,t,n){return e===n[0]})),"User signatures to be verified must be from a single account address"),!0},ff=function(){var e=s(h.mark((function e(t,n){var r,a,o;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="ACCOUNT_PROOF"===t?"verifyAccountProofSignatures":"verifyUserSignatures",e.next=3,oe.get("flow.network");case 3:if(a=e.sent){e.next=9;break}return e.next=7,oe.get("env");case 7:(a=e.sent)&&me.deprecate({pkg:"FCL",subject:'Using the "env" configuration key for specifying the flow network',message:'Please use "flow.network" instead.',transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0001-deprecate-env-config-key"});case 9:return he(n.fclCryptoContract||"testnet"===a||"mainnet"===a,"${verifyFunction}({ fclCryptoContract }) -- config.flow.network must be specified (testnet || mainnet) or contract address provided via opts.fclCryptoContract"),o=n.fclCryptoContract?n.fclCryptoContract:"testnet"===a?"0x74daa6f9c7ef24b1":"0xb4b82a1c9d21d284",e.abrupt("return","\n import FCLCrypto from ".concat(o,"\n\n pub fun main(\n address: Address, \n message: String, \n keyIndices: [Int], \n signatures: [String]\n ): Bool {\n return FCLCrypto.").concat(r,"(address: address, message: message, keyIndices: keyIndices, signatures: signatures)\n }\n "));case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function lf(){return lf=s(h.mark((function e(t,n){var r,a,o,u,i,s,c,f,l,p,d=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.address,a=n.nonce,o=n.signatures,u=d.length>2&&void 0!==d[2]?d[2]:{},cf({appIdentifier:t,address:r,nonce:a,signatures:o}),i=af({address:r,nonce:a,appIdentifier:t},!1),s=[],c=[],f=w(o);try{for(f.s();!(l=f.n()).done;)p=l.value,s.push(p.signature),c.push(p.keyId.toString())}catch(e){f.e(e)}finally{f.f()}return e.t0=Yi,e.next=11,ff(uf,u);case 11:return e.t1=e.sent,e.t2=function(e,t){return[e(Je(r),t.Address),e(i,t.String),e(c,t.Array(t.Int)),e(s,t.Array(t.String))]},e.t3={cadence:e.t1,args:e.t2},e.abrupt("return",(0,e.t0)(e.t3));case 15:case"end":return e.stop()}}),e)}))),lf.apply(this,arguments)}function pf(e,t){return df.apply(this,arguments)}function df(){return df=s(h.mark((function e(t,n){var r,a,o,u,i,s,c,f=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=f.length>2&&void 0!==f[2]?f[2]:{},a=Je(n[0].addr),cf({message:t,address:a,compSigs:n}),o=[],u=[],i=w(n);try{for(i.s();!(s=i.n()).done;)c=s.value,o.push(c.signature),u.push(c.keyId.toString())}catch(e){i.e(e)}finally{i.f()}return e.t0=Yi,e.next=10,ff(sf,r);case 10:return e.t1=e.sent,e.t2=function(e,n){return[e(a,n.Address),e(t,n.String),e(u,n.Array(n.Int)),e(o,n.Array(n.String))]},e.t3={cadence:e.t1,args:e.t2},e.abrupt("return",(0,e.t0)(e.t3));case 14:case"end":return e.stop()}}),e)}))),df.apply(this,arguments)}var hf,vf,yf=Object.freeze({__proto__:null,verifyAccountProof:function(e,t){return lf.apply(this,arguments)},verifyUserSignatures:pf}),gf=me.deprecate({pkg:"FCL",subject:"fcl.verifyUserSignatures()",message:"Please use fcl.AppUtils.verifyUserSignatures()",callback:function(e,t){return pf(e,t)}}),mf=function(){var e=s(h.mark((function e(){var t,n,r,a=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:[],n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=4,oe.first(["sdk.resolve"],n.resolve||po);case 4:if(r=e.sent,!Array.isArray(t)){e.next=9;break}return e.next=8,Or(Mn(),t);case 8:t=e.sent;case 9:return e.t0=JSON,e.t1=Ja,e.next=13,r(t);case 13:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.abrupt("return",e.t0.stringify.call(e.t0,e.t3,null,2));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),bf="POLL",wf=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",go([Ro(t)]).then(mo));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),xf=function(e){return e.status>=4},kf=function(e){return e.status>=3},Ef=function(e){return e.status>=2},If=(g(hf={},E,function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.sendSelf(bf);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),g(hf,I,(function(e,t){e.subscribe(t.from),e.send(t.from,A,e.all())})),g(hf,S,(function(e,t){e.unsubscribe(t.from)})),g(hf,R,function(){var e=s(h.mark((function e(t,n){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.reply(t.all());case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),g(hf,bf,function(){var e=s(h.mark((function e(t){var n;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,wf(t.self());case 3:n=e.sent,e.next=9;break;case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",t.fatalError(e.t0));case 9:xf(n)||setTimeout((function(){return t.sendSelf(bf)}),2500),r=t.all(),a=n,JSON.stringify(r)!==JSON.stringify(a)&&t.broadcast(A,n),t.merge(n);case 12:case"end":return e.stop()}var r,a}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}()),hf),Sf=function(e){if("object"===c(e)&&(e=e.transactionId),null==e)throw new Error("transactionId required");return e},Af=function(e){return L(If,Sf(e))};function Rf(e){function t(t){return U(Sf(e),Af,t)}function n(e){return function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).suppress||!1;return new Promise((function(r,a){var o=t((function(t,u){!u&&!t.statusCode||n?e(t)&&(r(t),o()):(a(u||t.errorMessage),o())}))}))}}return{snapshot:function(){return F(e,Af)},subscribe:t,onceFinalized:n(Ef),onceExecuted:n(kf),onceSealed:n(xf)}}Rf.isUnknown=function(e){return e.status>=0},Rf.isPending=function(e){return e.status>=1},Rf.isFinalized=Ef,Rf.isExecuted=kf,Rf.isSealed=xf,Rf.isExpired=function(e){return 5===e.status};var Tf="TICK",_f="hwm",Cf=function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=setTimeout,e.t1=function(){return t.sendSelf(Tf)},e.next=4,oe().get("fcl.eventPollRate",1e4);case 4:return e.t2=e.sent,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Of=(g(vf={},Tf,function(){var e=s(h.mark((function e(t){var n,r,a,o,u,i;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.hasSubs()){e.next=2;break}return e.abrupt("return");case 2:if(null!=(n=t.get(_f))){e.next=18;break}return e.t0=t,e.t1=_f,e.next=8,Io();case 8:return e.t2=e.sent,e.t0.put.call(e.t0,e.t1,e.t2),e.t3=t,e.t4=Tf,e.next=14,Cf(t);case 14:e.t5=e.sent,e.t3.put.call(e.t3,e.t4,e.t5),e.next=34;break;case 18:return e.next=20,Io();case 20:if(r=e.sent,t.put(_f,r),!(n.height1&&void 0!==f[1]?f[1]:{},yo(null!=n,"getInteractionTemplateAudits({ template }) -- template must be defined"),yo("InteractionTemplate"===(n=Oi(n)).f_type,"getInteractionTemplateAudits({ template }) -- template must be an InteractionTemplate"),e.next=7,Lf({template:n});case 7:if((o=e.sent)===n.id){e.next=11;break}throw me({title:"getInteractionTemplateAudits Debug Error",message:"Could not recompute and match template ID\n computed: ".concat(o,"\n template: ").concat(n.id,"\n "),level:ye.debug}),new Error("getInteractionTemplateAudits Error: Could not recompute and match template ID");case 11:e.t0=n.f_version,e.next="1.0.0"===e.t0?14:33;break;case 14:if(e.t1=r,e.t1){e.next=19;break}return e.next=18,oe().get("flow.auditors");case 18:e.t1=e.sent;case 19:if(yo(u=e.t1,"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not set"),yo(Array.isArray(u),"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not an array"),i=a.flowInteractionAuditContract){e.next=29;break}return e.next=26,oe().get("flow.network");case 26:yo("mainnet"===(s=e.sent)||"testnet"===s,"getInteractionTemplateAudits Error: Unable to determine address for FlowInteractionTemplateAudit contract. Set configuration for 'fcl.network' to 'mainnet' or 'testnet'"),i="mainnet"===s?"0xfd100e39d50a13e6":"0xf78bfc12d0a786dc";case 29:return e.next=31,Yi({cadence:"\n import FlowInteractionTemplateAudit from ".concat(i,"\n pub fun main(templateId: String, auditors: [Address]): {Address:Bool} {\n return FlowInteractionTemplateAudit.getHasTemplateBeenAuditedByAuditors(templateId: templateId, auditors: auditors)\n }\n "),args:function(e,t){return[e(o,t.String),e(u,t.Array(t.Address))]}});case 31:return c=e.sent,e.abrupt("return",c);case 33:throw new Error("getInteractionTemplateAudits Error: Unsupported template version");case 34:case"end":return e.stop()}}),e)}))),Ff.apply(this,arguments)}function jf(e){return{contractName:e.contractName,address:e.address,contract:""}}function Df(e){var t,n=[],r=w(e.match(/import ((\w|,| )+)* from 0x\w+/g)||[]);try{for(r.s();!(t=r.n()).done;){var a,o=t.value,u=/import ((\w+|, |)*) from (0x\w+)/g.exec(o),i=w(u[1].match(/((?:\w+)+),?/g)||[]);try{for(i.s();!(a=i.n()).done;){var s=a.value;n.push(jf({address:u[3],contractName:s.replace(/,/g,"")}))}}catch(e){i.e(e)}finally{i.f()}}}catch(e){r.e(e)}finally{r.f()}return n}function Gf(e){return Mf.apply(this,arguments)}function Mf(){return Mf=s(h.mark((function e(t){var n,r,a,o,u,i,s,c,f,l,p,d,v,y=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.address,r=t.contractName,a=t.blockHeight,o=y.length>1&&void 0!==y[1]?y[1]:{},yo(null!=n,"generateDependencyPin({ address }) -- address must be defined"),yo(null!=r,"generateDependencyPin({ contractName }) -- contractName must be defined"),yo(null!=a,"generateDependencyPin({ blockHeight }) -- blockHeight must be defined"),yo("string"==typeof n,"generateDependencyPin({ address }) -- address must be a string"),yo("string"==typeof r,"generateDependencyPin({ contractName }) -- contractName must be a string"),yo("number"==typeof a,"generateDependencyPin({ blockHeight }) -- blockHeight must be a number"),u=[jf({contractName:r,address:n})],i=0,s=u;case 10:if(!(i1&&void 0!==i[1]?i[1]:{},e.next=4,Io({sealed:!0},a);case 4:return o=e.sent,u=null==o?void 0:o.height,e.abrupt("return",Gf({address:n,contractName:r,blockHeight:u},a));case 7:case"end":return e.stop()}}),e)}))),zf.apply(this,arguments)}function Yf(e){if(null==e)return null;if("1.0.0"===e.f_version)return e;throw new Error("normalizeInteractionTemplateInterface Error: Invalid InteractionTemplateInterface")}function qf(){return qf=s(h.mark((function e(t){var n,r,a;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:yo(null!=(n=t.templateInterface),"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be defined"),yo("object"===c(n),"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be an object"),yo("InteractionTemplateInterface"==typeof n.f_type,"generateTemplateInterfaceId({ templateInterface }) -- templateInterface object must be an InteractionTemplate"),n=Yf(n),e.t0=n.f_version,e.next="1.0.0"===e.t0?8:25;break;case 8:return r=n.data,e.t1=Ge,e.next=12,Nf("InteractionTemplateInterface");case 12:return e.t2=e.sent,e.next=15,Nf("1.0.0");case 15:return e.t3=e.sent,e.next=18,Nf(r.flip);case 18:return e.t4=e.sent,e.next=21,Promise.all(Object.keys(r.arguments).map(function(){var e=s(h.mark((function e(t){return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nf(t);case 2:return e.t0=e.sent,e.next=5,Nf(String(r.arguments[t].index));case 5:return e.t1=e.sent,e.next=8,Nf(r.arguments[t].type);case 8:return e.t2=e.sent,e.abrupt("return",[e.t0,e.t1,e.t2]);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 21:return e.t5=e.sent,e.t6=[e.t2,e.t3,e.t4,e.t5],a=(0,e.t1)(e.t6).toString("hex"),e.abrupt("return",Nf(a));case 25:throw new Error("generateTemplateInterfaceId Error: Unsupported templateInterface version");case 26:case"end":return e.stop()}}),e)}))),qf.apply(this,arguments)}function Kf(e){return Hf.apply(this,arguments)}function Hf(){return Hf=s(h.mark((function e(t){var n,r,a,o,u,i,s,f,l,p,d,v,y,g,m,b,w=arguments;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.template,r=t.blockHeight,a=t.network,o=w.length>1&&void 0!==w[1]?w[1]:{},yo(null!=n,"generateDependencyPin({ template }) -- template must be defined"),yo("object"===c(n),"generateDependencyPin({ template }) -- template must be an object"),yo("InteractionTemplate"===n.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),n=Oi(n),yo(null!=a,"generateDependencyPin({ network }) network must be defined"),yo(null!=r,"generateDependencyPin({ blockHeight }) blockHeight must be defined"),yo("number"==typeof r,"generateDependencyPin({ blockHeight }) blockHeight must be a number"),e.t0=n.f_version,e.next="1.0.0"===e.t0?12:38;break;case 12:u=Object.keys(n.data.dependencies),i=0,s=u;case 14:if(!(i1&&void 0!==i[1]?i[1]:{},e.next=4,Io({sealed:!0});case 4:return o=e.sent,u=null==o?void 0:o.height,e.abrupt("return",Kf({template:n,network:r,blockHeight:u},a));case 7:case"end":return e.stop()}}),e)}))),Wf.apply(this,arguments)}var Vf=Object.freeze({__proto__:null,getInteractionTemplateAudits:function(e){return Ff.apply(this,arguments)},generateDependencyPin:Gf,generateDependencyPinAtLatestSealedBlock:function(e){return zf.apply(this,arguments)},generateTemplateId:Lf,generateTemplateInterfaceId:function(e){return qf.apply(this,arguments)},verifyDependencyPinsSame:Kf,verifyDependencyPinsSameAtLatestSealedBlock:function(e){return Wf.apply(this,arguments)},deriveCadenceByNetwork:Pi,getTemplateMessage:function(e){var t,n,r,a=e.localization,o=void 0===a?"en-US":a,u=e.messageKey,i=e.template;yo(u,"getMessage({ messageKey }) -- messageKey must be defined"),yo("stirng"==typeof u,"getMessage({ messageKey }) -- messageKey must be a string"),yo(o,"getMessage({ localization }) -- localization must be defined"),yo("stirng"==typeof o,"getMessage({ localization }) -- localization must be a string"),yo(null!=i,"generateTemplateId({ template }) -- template must be defined"),yo("object"===c(i),"generateTemplateId({ template }) -- template must be an object"),yo("InteractionTemplate"==typeof i.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate");var s=null==i||null===(t=i.data)||void 0===t?void 0:t.messages;return null==s||null===(n=s[u])||void 0===n||null===(r=n.i18n)||void 0===r?void 0:r[o]},getTemplateArgumentMessage:function(e){var t,n,r,a,o,u=e.localization,i=void 0===u?"en-US":u,s=e.argumentLabel,f=e.messageKey,l=e.template;yo(f,"getMessage({ messageKey }) -- messageKey must be defined"),yo("stirng"==typeof f,"getMessage({ messageKey }) -- messageKey must be a string"),yo(s,"getMessage({ argumentLabel }) -- argumentLabel must be defined"),yo("stirng"==typeof f,"getMessage({ argumentLabel }) -- argumentLabel must be a string"),yo(i,"getMessage({ localization }) -- localization must be defined"),yo("stirng"==typeof i,"getMessage({ localization }) -- localization must be a string"),yo(null!=l,"generateTemplateId({ template }) -- template must be defined"),yo("object"===c(l),"generateTemplateId({ template }) -- template must be an object"),yo("InteractionTemplate"==typeof l.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate");var p=null==l||null===(t=l.data)||void 0===t?void 0:t.arguments;return null==p||null===(n=p[s])||void 0===n||null===(r=n.messages)||void 0===r||null===(a=r[f])||void 0===a||null===(o=a.i18n)||void 0===o?void 0:o[i]}}),Jf=Zc().authorization,Xf=Ii;e.AppUtils=yf,e.InteractionTemplateUtils=Vf,e.TestUtils=Ho,e.VERSION=de,e.WalletUtils=of,e.account=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.height,r=t.id,a=arguments.length>2?arguments[2]:void 0;return he(!(r&&n),'Method: account -- Cannot pass "id" and "height" simultaneously'),r?go([Gr(e),Eo(r)],a).then(na):n?go([Gr(e),ko(n)],a).then(na):go([Gr(e)],a).then(na)},e.arg=Co,e.args=_o,e.atBlockHeight=ko,e.atBlockId=Eo,e.authenticate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Zc().authenticate(e)},e.authorization=function(e,t,n,r){return{addr:e,signingFunction:t,keyId:n,sequenceNum:r}},e.authorizations=So,e.authz=Jf,e.block=Io,e.build=Fr,e.cadence=yn,e.cdc=yn,e.config=oe,e.createSignableVoucher=Ja,e.currentUser=Zc,e.decode=mo,e.discovery=bc,e.display=function(e){return Je(e)},e.events=function(e){return{subscribe:function(t){return U(e,Pf,t)}}},e.getAccount=Gr,e.getBlock=Dr,e.getBlockHeader=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Or([pr,function(t){return t.block.isSealed=e,Zn(t)}])},e.getCollection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Or([dr,function(t){return t.collection.id=e,t}])},e.getEvents=function(e,t,n){return void 0===t&&void 0===n||me.deprecate({pkg:"FCL/SDK",subject:"Passing a start and end into getEvents",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder"}),Or([cr,function(r){return r.events.eventType=e,r.events.start=t,r.events.end=n,Zn(r)}])},e.getEventsAtBlockHeightRange=Ao,e.getEventsAtBlockIds=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Or([cr,function(n){return n.events.eventType=e,n.events.blockIds=t,Zn(n)}])},e.getTransaction=function(e){return Or([ir,function(t){return t.transaction.id=e,Zn(t)}])},e.getTransactionStatus=Ro,e.invariant=yo,e.isBad=Rr,e.isOk=Ar,e.limit=To,e.logIn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Zc().authenticate(e)},e.mutate=function(){return $c.apply(this,arguments)},e.param=function(e){return me.deprecate({pkg:"FCL/SDK",message:"The param builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:ye.error})},e.params=function(e){return me.deprecate({pkg:"FCL/SDK",message:"The params builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:ye.error})},e.payer=No,e.ping=function(){return fr},e.pipe=Or,e.pluginRegistry=$s,e.proposer=Oo,e.query=Yi,e.reauthenticate=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Zc().unauthenticate(),Zc().authenticate(e)},e.ref=Lo,e.sansPrefix=Ve,e.script=Uo,e.send=go,e.serialize=mf,e.signUp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Zc().authenticate(e)},e.t=Xf,e.transaction=jo,e.tx=Rf,e.unauthenticate=function(){return Zc().unauthenticate()},e.validator=xo,e.verifyUserSignatures=gf,e.voucherIntercept=function(e){return Br("ix.voucher-intercept",e)},e.voucherToTxId=function(e){return function(e){return Ia(Ea(_a(e)))}(e)},e.why=Tr,e.withPrefix=Je,Object.defineProperty(e,"__esModule",{value:!0})}(t)}}]); \ No newline at end of file diff --git a/negotiator-237551cd4e104f4399c7.js.LICENSE.txt b/negotiator-237551cd4e104f4399c7.js.LICENSE.txt deleted file mode 100644 index 0ecbf591..00000000 --- a/negotiator-237551cd4e104f4399c7.js.LICENSE.txt +++ /dev/null @@ -1,3 +0,0 @@ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ - -/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ diff --git a/negotiator-ea85034672840bab63bd.js b/negotiator-ea85034672840bab63bd.js new file mode 100644 index 00000000..ad66648c --- /dev/null +++ b/negotiator-ea85034672840bab63bd.js @@ -0,0 +1,2 @@ +/*! For license information please see negotiator-ea85034672840bab63bd.js.LICENSE.txt */ +(self.webpackChunknegotiator=self.webpackChunknegotiator||[]).push([[817],{2817:function(e,t,n){!function(e){"use strict";const t="1.6.0";let r=null;const o=Object.freeze({debug:5,info:4,log:3,warn:2,error:1}),a=async e=>{let{title:t,message:n,level:a,always:s=!1}=e;const i=await(r?.()?.get("logger.level"))??o.warn;if(!s&&i{let{title:t,message:n}=e;return[`\n %c${t}\n ============================\n\n ${n}\n\n ============================\n `.replace(/\n[^\S\r\n]+/g,"\n").trim(),,"font-weight:bold;font-family:monospace;"]})({title:t,message:n});switch(a){case o.debug:console.debug(...c);break;case o.info:console.info(...c);break;case o.warn:console.warn(...c);break;case o.error:console.error(...c);break;default:console.log(...c)}};function s(e,t){if(!e){const e=new Error(`INVARIANT ${t}`);e.stack=e.stack.split("\n").filter((e=>!/at invariant/.test(e))).join("\n");for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o{let{pkg:t,subject:n,transition:r,level:s=o.warn,message:i="",callback:c=null}=e;const u=()=>{return a({title:(t?t+" ":"")+"Deprecation Notice",message:`\n ${n?`${e=n,e.charAt(0).toUpperCase()+e.slice(1)} is deprecated and will cease to work in future releases${t?" of "+t:""}.`:""}${i?"\n"+i:""}${r?`\nYou can learn more (including a guide on common transition paths) here: ${r}`:""}\n `.trim(),level:s});var e};return"function"==typeof c?async function(){return await u(),await c(...arguments)}:u()};var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}let u;var l=c("function"==typeof queueMicrotask?queueMicrotask.bind("undefined"!=typeof window?window:i):e=>(u||(u=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0))));const d=()=>{const e=[];var t;return{async deliver(n){e.push(n),t&&(t(e.shift()),t=void 0)},receive:()=>new Promise((function(n){const r=e.shift();if(r)return n(r);t=n}))}},f="INIT",p="SUBSCRIBE",h="UNSUBSCRIBE",g="UPDATED",y="SNAPSHOT",m="TERMINATE",v="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g||"object"==typeof window&&window.window===window&&window;v.FCL_REGISTRY=null==v.FCL_REGISTRY?{}:v.FCL_REGISTRY;var w=0;const b=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(((o,a)=>{const s=r.expectReply||!1,i=null!=r.timeout?r.timeout:5e3;s&&i&&setTimeout((()=>a(new Error(`Timeout: ${i}ms passed without a response.`))),i);const c={to:e,from:r.from,tag:t,data:n,timeout:i,reply:o,reject:a};try{v.FCL_REGISTRY[e]&&v.FCL_REGISTRY[e].mailbox.deliver(c),s||o(!0)}catch(t){console.error("FCL.Actor -- Could Not Deliver Message",c,v.FCL_REGISTRY[e],t)}}))},E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t&&(t=++w),null!=v.FCL_REGISTRY[t])return t;v.FCL_REGISTRY[t]={addr:t,mailbox:d(),subs:new Set,kvs:{},error:null};const n={self:()=>t,receive:()=>v.FCL_REGISTRY[t].mailbox.receive(),send:function(e,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o.from=t,b(e,n,r,o)},sendSelf:(e,n,r)=>{v.FCL_REGISTRY[t]&&b(t,e,n,r)},broadcast:function(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.from=t;for(let o of v.FCL_REGISTRY[t].subs)b(o,e,n,r)},subscribe:e=>null!=e&&v.FCL_REGISTRY[t].subs.add(e),unsubscribe:e=>null!=e&&v.FCL_REGISTRY[t].subs.delete(e),subscriberCount:()=>v.FCL_REGISTRY[t].subs.size,hasSubs:()=>!!v.FCL_REGISTRY[t].subs.size,put:(e,n)=>{null!=e&&(v.FCL_REGISTRY[t].kvs[e]=n)},get:(e,n)=>{const r=v.FCL_REGISTRY[t].kvs[e];return null==r?n:r},delete:e=>{delete v.FCL_REGISTRY[t].kvs[e]},update:(e,n)=>{null!=e&&(v.FCL_REGISTRY[t].kvs[e]=n(v.FCL_REGISTRY[t].kvs[e]))},keys:()=>Object.keys(v.FCL_REGISTRY[t].kvs),all:()=>v.FCL_REGISTRY[t].kvs,where:e=>Object.keys(v.FCL_REGISTRY[t].kvs).reduce(((n,r)=>e.test(r)?{...n,[r]:v.FCL_REGISTRY[t].kvs[r]}:n),{}),merge:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach((n=>v.FCL_REGISTRY[t].kvs[n]=e[n]))},fatalError:e=>{v.FCL_REGISTRY[t].error=e;for(let e of v.FCL_REGISTRY[t].subs)b(e,g)}};return"object"==typeof e&&(e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async t=>{"function"==typeof e[f]&&await e[f](t);e:for(;;){const n=await t.receive();try{if("EXIT"===n.tag){"function"==typeof e[m]&&await e[m](t,n,n.data||{});break e}await e[n.tag](t,n,n.data||{})}catch(e){console.error(`${t.self()} Error`,n,e)}finally{continue e}}}}(e)),l((async()=>{await e(n),(e=>{delete v.FCL_REGISTRY[e]})(t)})),t};function I(e,t,n){t(e);const r="@EXIT",o=E((async t=>{for(t.send(e,p);;){const o=await t.receive(),a=v.FCL_REGISTRY[e].error;if(o.tag===r)return void t.send(e,h);if(a)return n(null,a),void t.send(e,h);n(o.data,null)}}));return()=>b(o,r)}function S(e,t){return t(e),b(e,y,null,{expectReply:!0,timeout:0})}const A=function(){for(var e=arguments.length,t=new Array(e),n=0;nt.reduce(((e,t)=>t(e)),e)},k=e=>e&&"object"==typeof e&&!Array.isArray(e),R=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rArray.isArray(e)?R({},...e):e,x=e=>e.contracts?e.contracts:{},P=(e,t)=>A(T,function(){for(var e=arguments.length,t=new Array(e),n=0;nt.reduce(((t,n)=>({...t,...n(e)})),{})}((e=>t=>{let{deployments:n={},accounts:r={}}=t;const o=n?.[e];return o?Object.entries(o).reduce(((e,t)=>{let[n,o]=t;const a=r[n]?.address;return a?o.reduce(((e,t)=>({...e,[t]:a})),{}):e}),{}):{}})(t),A(x,(e=>t=>Object.entries(t).reduce(((t,n)=>{let[r,o]=n;const a=o?.aliases?.[e];return a&&(t[r]=a),t}),{}))(t))))(e),_=e=>Object.entries(e?.accounts).reduce(((e,t)=>{let[n,r]=t;return!!e||r?.hasOwnProperty("key")&&(o=r?.key,"string"==typeof o&&/^[0-9A-Fa-f]+$/.test(o));var o}),!1),C=e=>k(e)?_(e):e.some(_),O=e=>"local"===e?.toLowerCase()?"emulator":e?.toLowerCase();r=ee;const B="config",N="PUT_CONFIG",U="GET_CONFIG",L="GET_ALL_CONFIG",D="UPDATE_CONFIG",F="DELETE_CONFIG",j="CLEAR_CONFIG",$="WHERE_CONFIG",G="CONFIG/UPDATED",M=e=>e,z={[N]:(e,t,n)=>{let{key:r,value:o}=n;if(null==r)throw new Error("Missing 'key' for config/put.");e.put(r,o),e.broadcast(G,{...e.all()})},[U]:(e,t,n)=>{let{key:r,fallback:o}=n;if(null==r)throw new Error("Missing 'key' for config/get");t.reply(e.get(r,o))},[L]:(e,t)=>{t.reply({...e.all()})},[D]:(e,t,n)=>{let{key:r,fn:o}=n;if(null==r)throw new Error("Missing 'key' for config/update");e.update(r,o||M),e.broadcast(G,{...e.all()})},[F]:(e,t,n)=>{let{key:r}=n;if(null==r)throw new Error("Missing 'key' for config/delete");e.delete(r),e.broadcast(G,{...e.all()})},[j]:(e,t)=>{let n=Object.keys(e.all());for(let t of n)e.delete(t);e.broadcast(G,{...e.all()})},[$]:(e,t,n)=>{let{pattern:r}=n;if(null==r)throw new Error("Missing 'pattern' for config/where");t.reply(e.where(r))},[p]:(e,t)=>{e.subscribe(t.from),e.send(t.from,G,{...e.all()})},[h]:(e,t)=>{e.unsubscribe(t.from)}};function q(e,t){return b(B,N,{key:e,value:t}),ee()}function H(e,t){return b(B,U,{key:e,fallback:t},{expectReply:!0,timeout:10})}async function K(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(!e.length)return t;const[n,...r]=e,o=await H(n);return null==o?K(r,t):o}function W(){return b(B,L,null,{expectReply:!0,timeout:10})}function V(e){return b(B,D,{key:e,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:M}),ee()}function Y(e){return b(B,F,{key:e}),ee()}function J(e){return b(B,$,{pattern:e},{expectReply:!0,timeout:10})}function X(e){return I(B,(()=>E(z,B)),e)}function Z(e){return b(B,j).then(ee(e))}async function Q(e){const t=await H("flow.network"),n=O(t),{flowJSON:r}=e;if(s(Boolean(r),"config.load -- 'flowJSON' must be defined"),s(n,'Flow Network Required -- In order for FCL to load your contracts please define "flow.network" to "emulator", "local", "testnet", or "mainnet" in your config. See more here: https://developers.flow.com/tools/fcl-js/reference/configure-fcl'),C(r)){const e="emulator"===n;a({title:"Private Keys Detected",message:"Private keys should be stored in a separate flow.json file for security. See more here: https://developers.flow.com/tools/flow-cli/security",level:e?o.warn:o.error}),s(e,"Private keys should be stored in a separate flow.json file for security. See more here: https://developers.flow.com/tools/flow-cli/security")}for(const[e,t]of Object.entries(P(r,n))){const n=`0x${e}`,r=await H(n);r&&r!==t?a({title:"Contract Placeholder Conflict Detected",message:"A generated contract placeholder from config.load conflicts with a placeholder you've set manually in config have the same name.",level:o.warn}):q(n,t);const s=`system.contracts.${e}`,i=await H(s);i&&i!==t?a({title:"Contract Placeholder Conflict Detected",message:"A generated contract placeholder from config.load conflicts with a placeholder you've set manually in config have the same name.",level:o.warn}):q(s,t)}}function ee(e){return null!=e&&"object"==typeof e&&Object.keys(e).map((t=>q(t,e[t]))),{put:q,get:H,all:W,first:K,update:V,delete:Y,where:J,subscribe:X,overload:ne,load:Q}}E(z,B),ee.put=q,ee.get=H,ee.all=W,ee.first=K,ee.update=V,ee.delete=Y,ee.where=J,ee.subscribe=X,ee.overload=ne,ee.load=Q;const te=e=>e;function ne(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:te;return new Promise((async(n,r)=>{const o=await W();try{ee(e);var a=await t(await W());await Z(o),n(a)}catch(e){await Z(o),r(e)}}))}for(var re={},oe={byteLength:function(e){var t=le(e),n=t[0],r=t[1];return 3*(n+r)/4-r},toByteArray:function(e){var t,n,r=le(e),o=r[0],a=r[1],s=new ie(function(e,t,n){return 3*(t+n)/4-n}(0,o,a)),i=0,c=a>0?o-4:o;for(n=0;n>16&255,s[i++]=t>>8&255,s[i++]=255&t;return 2===a&&(t=se[e.charCodeAt(n)]<<2|se[e.charCodeAt(n+1)]>>4,s[i++]=255&t),1===a&&(t=se[e.charCodeAt(n)]<<10|se[e.charCodeAt(n+1)]<<4|se[e.charCodeAt(n+2)]>>2,s[i++]=t>>8&255,s[i++]=255&t),s},fromByteArray:function(e){for(var t,n=e.length,r=n%3,o=[],a=16383,s=0,i=n-r;si?i:s+a));return 1===r?(t=e[n-1],o.push(ae[t>>2]+ae[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(ae[t>>10]+ae[t>>4&63]+ae[t<<2&63]+"=")),o.join("")}},ae=[],se=[],ie="undefined"!=typeof Uint8Array?Uint8Array:Array,ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=0;ue<64;++ue)ae[ue]=ce[ue],se[ce.charCodeAt(ue)]=ue;function le(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function de(e,t,n){for(var r,o,a=[],s=t;s>18&63]+ae[o>>12&63]+ae[o>>6&63]+ae[63&o]);return a.join("")}se["-".charCodeAt(0)]=62,se["_".charCodeAt(0)]=63;var fe={};function pe(e){if(Array.isArray(e)){for(var t=[],n=0;n>1,l=-7,d=n?o-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-l)-1,p>>=-l,l+=i;l>0;a=256*a+e[t+d],d+=f,l-=8);for(s=a&(1<<-l)-1,a>>=-l,l+=r;l>0;s=256*s+e[t+d],d+=f,l-=8);if(0===a)a=1-u;else{if(a===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),a-=u}return(p?-1:1)*s*Math.pow(2,a-r)},fe.write=function(e,t,n,r,o,a){var s,i,c,u=8*a-o-1,l=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=l?(i=0,s=l):s+d>=1?(i=(t*c-1)*Math.pow(2,o),s+=d):(i=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&i,p+=h,i/=256,o-=8);for(s=s<0;e[n+p]=255&s,p+=h,s/=256,u-=8);e[n+p-h]|=128*g},function(e){const t=oe,n=fe,r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|p(e,t);let r=a(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(W(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);const o=function(e){if(s.isBuffer(e)){const t=0|f(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),a(e<0?0:0|f(e))}function l(e){const t=e.length<0?0:0|f(e.length),n=a(t);for(let r=0;r=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(o)return r?-1:q(e).length;t=(""+t).toLowerCase(),o=!0}}function h(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),V(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){let a,s=1,i=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,i/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let r=-1;for(a=n;ai&&(n=i-c),a=n;a>=0;a--){let n=!0;for(let r=0;ro&&(r=o):r=o;const a=t.length;let s;for(r>a/2&&(r=a/2),s=0;s>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function S(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+s<=n){let n,r,i,c;switch(s){case 1:t<128&&(a=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(a=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[o+1],r=e[o+2],i=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&i)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&i,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(t+=" ... "),""},r&&(s.prototype[r]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,o){if(W(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0);const c=Math.min(a,i),u=this.slice(r,o),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function R(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,n,r,o,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function O(e,t,n,r,o){$(t,r,o,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function B(e,t,n,r,o){$(t,r,o,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function N(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,r,o,a){return t=+t,r>>>=0,a||N(e,0,r,4),n.write(e,t,r,o,23,4),r+4}function L(e,t,r,o,a){return t=+t,r>>>=0,a||N(e,0,r,8),n.write(e,t,r,o,52,8),r+8}s.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||_(e,t,this.length);let r=this[e],o=1,a=0;for(;++a>>=0,t>>>=0,n||_(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=J((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||M(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||M(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||_(e,t,this.length);let r=this[e],o=1,a=0;for(;++a=o&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||_(e,t,this.length);let r=t,o=1,a=this[e+--r];for(;r>0&&(o*=256);)a+=this[e+--r]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||_(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||_(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=J((function(e){G(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||M(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||M(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||_(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||_(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||_(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||_(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||C(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,r||C(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=J((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=J((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);C(this,e,t,n,r-1,-r)}let o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);C(this,e,t,n,r-1,-r)}let o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=J((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=J((function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function $(e,t,n,r,o,a){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||M(t,e.length-(n+1))}(r,o,a)}function G(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function M(e,t,n){if(Math.floor(e)!==e)throw G(e,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=j(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=j(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function q(e,t){let n;t=t||1/0;const r=e.length;let o=null;const a=[];for(let s=0;s55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function H(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function J(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}}(re);var me={exports:{}};!function(e,t){var n="undefined"!=typeof self?self:i,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,s="ArrayBuffer"in e;if(s)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function g(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(g)}),this.text=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=h(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},m.call(w.prototype),m.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var I=[301,302,303,307,308];E.redirect=function(e,t){if(-1===I.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function S(e,n){return new Promise((function(r,a){var s=new w(e,n);if(s.signal&&s.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var i=new XMLHttpRequest;function c(){i.abort()}i.onload=function(){var e,t,n={status:i.status,statusText:i.statusText,headers:(e=i.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL");var o="response"in i?i.response:i.responseText;r(new E(o,n))},i.onerror=function(){a(new TypeError("Network request failed"))},i.ontimeout=function(){a(new TypeError("Network request failed"))},i.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},i.open(s.method,s.url,!0),"include"===s.credentials?i.withCredentials=!0:"omit"===s.credentials&&(i.withCredentials=!1),"responseType"in i&&o&&(i.responseType="blob"),s.headers.forEach((function(e,t){i.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),i.onreadystatechange=function(){4===i.readyState&&s.signal.removeEventListener("abort",c)}),i.send(void 0===s._bodyInit?null:s._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=f,e.Request=w,e.Response=E),t.Headers=f,t.Request=w,t.Response=E,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(me,me.exports);var ve=c(me.exports);function we(e){return null==e?null:e.replace(/^0x/,"").replace(/^Fx/,"")}function be(e){return null==e?null:"0x"+we(e)}const Ee=globalThis.AbortController||n(28599);class Ie extends Error{constructor(e){let{error:t,hostname:n,path:r,method:o,requestBody:a,responseBody:s,responseStatusText:i,statusCode:c}=e;super(`\n HTTP Request Error: An error occurred when interacting with the Access API.\n ${t?`error=${t}`:""}\n ${n?`hostname=${n}`:""}\n ${r?`path=${r}`:""}\n ${o?`method=${o}`:""}\n ${a?`requestBody=${a}`:""}\n ${s?`responseBody=${s}`:""}\n ${i?`responseStatusText=${i}`:""}\n ${c?`statusCode=${c}`:""}\n `),this.name="HTTP Request Error",this.statusCode=c,this.errorMessage=t}}async function Se(e){let{hostname:t,path:n,method:r,body:s,headers:i,retryLimit:c=5,retryIntervalMs:u=1e3,timeoutLimit:l=3e4,enableRequestLogging:d=!0}=e;const f=s?JSON.stringify(s):null;function p(){const e=new Ee,s=setTimeout((()=>{e.abort()}),l);return ve(`${t}${n}`,{method:r,body:f,headers:i,signal:e.signal}).then((async e=>{if(e.ok)return e.json();const o=await e.text().catch((()=>null)),a=function(e){try{return JSON.parse(e)}catch{return null}}(o);throw new Ie({error:a?.message,hostname:t,path:n,method:r,requestBody:f,responseBody:o,responseStatusText:e.statusText,statusCode:e.status})})).catch((async e=>{if(e instanceof Ie)throw e;if("AbortError"===e.name)throw e;throw d&&await a({title:"Access Node Error",message:`The provided access node ${t} does not appear to be a valid REST/HTTP access node.\n Please verify that you are not unintentionally using a GRPC access node.\n See more here: https://docs.onflow.org/fcl/reference/sdk-guidelines/#connect`,level:o.error}),new Ie({error:e?.message,hostname:t,path:n,method:r,requestBody:f})})).finally((()=>{clearTimeout(s)}))}return await async function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;try{return await p()}catch(n){const r=[408,429,500,502,503,504];if("AbortError"===n.name||r.includes(n.statusCode))return await new Promise(((r,o)=>{t{r(e(t+1))}),u)):o(n)}));throw n}}()}function Ae(e,t,n){let r=t.response();return r.tag=e.tag,r.encodedData=JSON.parse(t.Buffer.from(n,"base64").toString()),r}async function ke(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s(n.node,"SDK Send Execute Script Error: opts.node must be defined."),s(t.response,"SDK Send Execute Script Error: context.response must be defined."),s(t.Buffer,"SDK Send Execute Script Error: context.Buffer must be defined."),(e=await e).block.id?await async function(e,t,n){const r=n.httpRequest||Se,o=await r({hostname:n.node,path:`/v1/scripts?block_id=${e.block.id}`,method:"POST",body:{script:t.Buffer.from(e.message.cadence).toString("base64"),arguments:e.message.arguments.map((n=>t.Buffer.from(JSON.stringify(e.arguments[n].asArgument)).toString("base64")))}});return Ae(e,t,o)}(e,t,n):e.block.height?await async function(e,t,n){const r=n.httpRequest||Se,o=await r({hostname:n.node,path:`/v1/scripts?block_height=${e.block.height}`,method:"POST",body:{script:t.Buffer.from(e.message.cadence).toString("base64"),arguments:e.message.arguments.map((n=>t.Buffer.from(JSON.stringify(e.arguments[n].asArgument)).toString("base64")))}});return Ae(e,t,o)}(e,t,n):await async function(e,t,n){const r=n.httpRequest||Se,o=await r({hostname:n.node,path:"/v1/scripts?block_height=sealed",method:"POST",body:{script:t.Buffer.from(e.message.cadence).toString("base64"),arguments:e.message.arguments.map((n=>t.Buffer.from(JSON.stringify(e.arguments[n].asArgument)).toString("base64")))}});return Ae(e,t,o)}(e,t,n)}const Re={SHA2_256:1,SHA2_384:2,SHA3_256:3,SHA3_384:4,KMAC128_BLS_BLS12_381:5},Te={ECDSA_P256:1,ECDSA_secp256k1:2,BLS_BLS12_381:3};function xe(e,t,n){let r=t.response();return r.tag=e.tag,r.account={address:n.address,balance:Number(n.balance),code:"",contracts:(e=>{const n={};if(!e)return n;for(let r of Object.keys(e))n[r]=t.Buffer.from(e[r],"base64").toString();return n})(n.contracts),keys:n.keys?.map((e=>({index:Number(e.index),publicKey:e.public_key.replace(/^0x/,""),signAlgo:Te[e.signing_algorithm],signAlgoString:e.signing_algorithm,hashAlgo:Re[e.hashing_algorithm],hashAlgoString:e.hashing_algorithm,sequenceNumber:Number(e.sequence_number),weight:Number(e.weight),revoked:e.revoked})))??[]},r}async function Pe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return s(n.node,"SDK Send Get Account Error: opts.node must be defined."),s(t.response,"SDK Send Get Account Error: context.response must be defined."),s(t.Buffer,"SDK Send Get Account Error: context.Buffer must be defined."),null!==(e=await e).block.height?await async function(e,t,n){const r=n.httpRequest||Se;return xe(e,t,await r({hostname:n.node,path:`/v1/accounts/${e.account.addr}?block_height=${e.block.height}&expand=contracts,keys`,method:"GET",body:null}))}(e,t,n):await async function(e,t,n){const r=n.httpRequest||Se;return xe(e,t,await r({hostname:n.node,path:`/v1/accounts/${e.account.addr}?block_height=sealed&expand=contracts,keys`,method:"GET",body:null}))}(e,t,n)}function _e(e,t,n){const r=n.length?n[0]:null,o=t.response();return o.tag=e.tag,o.blockHeader={id:r.header.id,parentId:r.header.parent_id,height:Number(r.header.height),timestamp:r.header.timestamp},o}async function Ce(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Block Header Error: opts.node must be defined."),s(t.response,"SDK Send Get Block Header Error: context.response must be defined.");const r=null!==(e=await e).block.id,o=null!==e.block.height;return r?await async function(e,t,n){const r=n.httpRequest||Se;return _e(e,t,await r({hostname:n.node,path:`/v1/blocks/${e.block.id}`,method:"GET",body:null}))}(e,t,n):o?await async function(e,t,n){const r=n.httpRequest||Se;return _e(e,t,await r({hostname:n.node,path:`/v1/blocks?height=${e.block.height}`,method:"GET",body:null}))}(e,t,n):await async function(e,t,n){const r=n.httpRequest||Se,o=e.block?.isSealed?"sealed":"final";return _e(e,t,await r({hostname:n.node,path:`/v1/blocks?height=${o}`,method:"GET",body:null}))}(e,t,n)}function Oe(e,t,n){const r=n.length?n[0]:null,o=t.response();return o.tag=e.tag,o.block={id:r.header.id,parentId:r.header.parent_id,height:Number(r.header.height),timestamp:r.header.timestamp,collectionGuarantees:r.payload.collection_guarantees.map((e=>({collectionId:e.collection_id,signerIds:e.signer_ids}))),blockSeals:r.payload.block_seals.map((e=>({blockId:e.block_id,executionReceiptId:e.result_id})))},o}async function Be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Block Error: opts.node must be defined."),s(t.response,"SDK Send Get Block Error: context.response must be defined.");const r=null!==(e=await e).block.id,o=null!==e.block.height;return r?await async function(e,t,n){const r=n.httpRequest||Se;return Oe(e,t,await r({hostname:n.node,path:`/v1/blocks/${e.block.id}?expand=payload`,method:"GET",body:null}))}(e,t,n):o?await async function(e,t,n){const r=n.httpRequest||Se;return Oe(e,t,await r({hostname:n.node,path:`/v1/blocks?height=${e.block.height}&expand=payload`,method:"GET",body:null}))}(e,t,n):await async function(e,t,n){const r=n.httpRequest||Se,o=e.block?.isSealed?"sealed":"final";return Oe(e,t,await r({hostname:n.node,path:`/v1/blocks?height=${o}&expand=payload`,method:"GET",body:null}))}(e,t,n)}function Ne(e,t,n){let r=t.response();return r.tag=e.tag,r.events=[],n.forEach((e=>e.events?e.events.forEach((n=>r.events.push({blockId:e.block_id,blockHeight:Number(e.block_height),blockTimestamp:e.block_timestamp,type:n.type,transactionId:n.transaction_id,transactionIndex:Number(n.transaction_index),eventIndex:Number(n.event_index),payload:JSON.parse(t.Buffer.from(n.payload,"base64").toString())}))):null)),r}async function Ue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Events Error: opts.node must be defined."),s(t.response,"SDK Send Get Events Error: context.response must be defined."),s(t.Buffer,"SDK Send Get Events Error: context.Buffer must be defined.");const r=null!==(e=await e).events.start,o=Array.isArray(e.events.blockIds)&&e.events.blockIds.length>0;return s(r||o,"SendGetEventsError: Unable to determine which get events request to send. Either a block height range, or block IDs must be specified."),r?await async function(e,t,n){const r=n.httpRequest||Se;return Ne(e,t,await r({hostname:n.node,path:`/v1/events?type=${e.events.eventType}&start_height=${e.events.start}&end_height=${e.events.end}`,method:"GET",body:null}))}(e,t,n):await async function(e,t,n){const r=n.httpRequest||Se,o=await r({hostname:n.node,path:`/v1/events?type=${e.events.eventType}&block_ids=${e.events.blockIds.join(",")}`,method:"GET",body:null});return Ne(e,t,o)}(e,t,n)}const Le={UNKNOWN:0,PENDING:1,FINALIZED:2,EXECUTED:3,SEALED:4,EXPIRED:5},De=e=>`${withPrefix(e.addr)}-${e.keyId}`,Fe=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};switch(s(n.node,'SDK Send Error: Either opts.node or "accessNode.api" in config must be defined.'),s(t.ix,"SDK Send Error: context.ix must be defined."),e=await e,!0){case t.ix.isTransaction(e):return n.sendTransaction?n.sendTransaction(e,t,n):async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Transaction Error: opts.node must be defined."),s(t.response,"SDK Send Transaction Error: context.response must be defined."),s(t.Buffer,"SDK Send Transaction Error: context.Buffer must be defined.");const r=n.httpRequest||Se;e=await e;let o=[];for(let n of Object.values(e.accounts))try{n.role.payer||null==n.signature||o.push({address:we(n.addr),key_index:String(n.keyId),signature:t.Buffer.from(n.signature,"hex").toString("base64")})}catch(t){throw console.error("SDK HTTP Send Error: Trouble applying payload signature",{acct:n,ix:e}),t}let a={};for(let n of Object.values(e.accounts))try{if(n.role.payer&&null!=n.signature){let e=n.tempId||De(n);a[e]=a[e]||{address:we(n.addr),key_index:String(n.keyId),signature:t.Buffer.from(n.signature,"hex").toString("base64")}}}catch(t){throw console.error("SDK HTTP Send Error: Trouble applying envelope signature",{acct:n,ix:e}),t}a=Object.values(a);var i=Date.now();const c=await r({hostname:n.node,path:"/v1/transactions",method:"POST",body:{script:t.Buffer.from(e.message.cadence).toString("base64"),arguments:[...e.message.arguments.map((n=>t.Buffer.from(JSON.stringify(e.arguments[n].asArgument)).toString("base64")))],reference_block_id:e.message.refBlock?e.message.refBlock:null,gas_limit:String(e.message.computeLimit),payer:we(e.accounts[Array.isArray(e.payer)?e.payer[0]:e.payer].addr),proposal_key:{address:we(e.accounts[e.proposer].addr),key_index:String(e.accounts[e.proposer].keyId),sequence_number:String(e.accounts[e.proposer].sequenceNum)},authorizers:e.authorizations.map((t=>e.accounts[t].addr)).reduce(((e,t)=>e.find((e=>e===t))?e:[...e,t]),[]).map(we),payload_signatures:o,envelope_signatures:a}});var u=Date.now();let l=t.response();return l.tag=e.tag,l.transactionId=c.id,"undefined"!=typeof window&&"undefined"!=typeof CustomEvent&&window.dispatchEvent(new CustomEvent("FLOW::TX",{detail:{txId:l.transactionId,delta:u-i}})),l}(e,t,n);case t.ix.isGetTransactionStatus(e):return n.sendGetTransactionStatus?n.sendGetTransactionStatus(e,t,n):async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Transaction Status Error: opts.node must be defined."),s(t.response,"SDK Send Get Transaction Status Error: context.response must be defined."),s(t.Buffer,"SDK Send Get Transaction Status Error: context.Buffer must be defined.");const r=n.httpRequest||Se;e=await e;const o=await r({hostname:n.node,path:`/v1/transaction_results/${e.transaction.id}`,method:"GET",body:null});let a=t.response();return a.tag=e.tag,a.transactionStatus={blockId:o.block_id,status:Le[o.status.toUpperCase()]||"",statusString:o.status.toUpperCase(),statusCode:o.status_code,errorMessage:o.error_message,events:o.events.map((e=>({type:e.type,transactionId:e.transaction_id,transactionIndex:Number(e.transaction_index),eventIndex:Number(e.event_index),payload:JSON.parse(t.Buffer.from(e.payload,"base64").toString())})))},a}(e,t,n);case t.ix.isGetTransaction(e):return n.sendGetTransaction?n.sendGetTransaction(e,t,n):async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Transaction Error: opts.node must be defined."),s(t.response,"SDK Send Get Transaction Error: context.response must be defined."),s(t.Buffer,"SDK Send Get Transaction Error: context.Buffer must be defined.");const r=n.httpRequest||Se;e=await e;const o=await r({hostname:n.node,path:`/v1/transactions/${e.transaction.id}`,method:"GET",body:null}),a=e=>({address:e.address,keyId:Number(e.key_index),signature:e.signature});let i=t.response();var c;return i.tag=e.tag,i.transaction={script:t.Buffer.from(o.script,"base64").toString(),args:[...o.arguments.map((e=>JSON.parse(t.Buffer.from(e,"base64").toString())))],referenceBlockId:o.reference_block_id,gasLimit:Number(o.gas_limit),payer:o.payer,proposalKey:o.proposal_key?(c=o.proposal_key,{address:c.address,keyId:Number(c.key_id),sequenceNumber:Number(c.sequence_number)}):o.proposal_key,authorizers:o.authorizers,payloadSignatures:[...o.payload_signatures.map(a)],envelopeSignatures:[...o.envelope_signatures.map(a)]},i}(e,t,n);case t.ix.isScript(e):return n.sendExecuteScript?n.sendExecuteScript(e,t,n):ke(e,t,n);case t.ix.isGetAccount(e):return n.sendGetAccount?n.sendGetAccount(e,t,n):Pe(e,t,n);case t.ix.isGetEvents(e):return n.sendGetEvents?n.sendGetEvents(e,t,n):Ue(e,t,n);case t.ix.isGetBlock(e):return n.sendGetBlock?n.sendGetBlock(e,t,n):Be(e,t,n);case t.ix.isGetBlockHeader(e):return n.sendGetBlockHeader?n.sendGetBlockHeader(e,t,n):Ce(e,t,n);case t.ix.isGetCollection(e):return n.sendGetCollection?n.sendGetCollection(e,t,n):async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Collection Error: opts.node must be defined."),s(t.response,"SDK Send Get Collection Error: context.response must be defined.");const r=n.httpRequest||Se,o=await r({hostname:n.node,path:`/v1/collections/${e.collection.id}?expand=transactions`,method:"GET",body:null}),a=t.response();return a.tag=e.tag,a.collection={id:o.id,transactionIds:o.transactions.map((e=>e.id))},a}(e,t,n);case t.ix.isPing(e):return n.sendPing?n.sendPing(e,t,n):async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Ping Error: opts.node must be defined."),s(t.response,"SDK Send Ping Error: context.response must be defined.");const r=n.httpRequest||Se;await r({hostname:n.node,path:"/v1/blocks?height=sealed",method:"GET",body:null});let o=t.response();return o.tag=e.tag,o}(e,t,n);case t.ix.isGetNetworkParameters(e):return n.sendGetNetworkParameters?n.sendGetNetworkParameters(e,t,n):async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};s(n.node,"SDK Send Get Network Parameters Error: opts.node must be defined."),s(t.response,"SDK Send Get Network Parameters Error: context.response must be defined.");const r=n.httpRequest||Se;e=await e;const o=await r({hostname:n.node,path:"/v1/network/parameters",method:"GET",body:null,enableRequestLogging:n.enableRequestLogging??!0});let a=t.response();return a.tag=e.tag,a.networkParameters={chainId:o.chain_id},a}(e,t,n);default:return e}};var je={},$e={},Ge={},Me={},ze=function(e,t){return function(n,r){var o=2*r,a=2*t;n[o]=e[a],n[o+1]=e[a+1]}};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=(t=ze)&&t.__esModule?t:{default:t},r=function(e){for(var t=e.A,r=e.C,o=0;o<25;o+=5){for(var a=0;a<5;a++)(0,n.default)(t,o+a)(r,a);for(var s=0;s<5;s++){var i=2*(o+s),c=(s+1)%5*2,u=(s+2)%5*2;t[i]^=~r[c]&r[u],t[i+1]^=~r[c+1]&r[u+1]}}};e.default=r}(Me);var qe={},He={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);e.default=t}(He),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=(t=He)&&t.__esModule?t:{default:t},r=function(e){var t=e.A,r=2*e.roundIndex;t[0]^=n.default[r],t[1]^=n.default[r+1]};e.default=r}(qe);var Ke={},We={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1];e.default=t}(We);var Ve={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44];e.default=t}(Ve),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=o(We),n=o(Ve),r=o(ze);function o(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var o=e.A,a=e.C,s=e.W;(0,r.default)(o,1)(s,0);for(var i=0,c=0,u=0,l=32,d=0;d<24;d++){var f=t.default[d],p=n.default[d];(0,r.default)(o,f)(a,0),i=s[0],c=s[1],l=32-p,s[u=p<32?0:1]=i<>>l,s[(u+1)%2]=c<>>l,(0,r.default)(s,0)(o,f),(0,r.default)(a,0)(s,0)}};e.default=a}(Ke);var Ye={};function Je(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e.length&&!t.length)return n;if(!e.length)return n;if(!t.length)return[...n,e[0]];const[r,...o]=e,[a,...s]=t;return void 0!==r&&n.push(r),void 0!==a&&n.push(a),Je(o,s,n)}function Xe(e){return function(t){return"function"==typeof t?(a.deprecate({pkg:"FCL/SDK",subject:"Interopolation of functions into template literals",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params"}),Xe(e)(t(e))):String(t)}}function Ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re:Array.isArray(e)?t=>Je(e,n.map(Xe(t))).join("").trim():e}!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=(t=ze)&&t.__esModule?t:{default:t},r=function(e){for(var t=e.A,r=e.C,o=e.D,a=e.W,s=0,i=0,c=0;c<5;c++){var u=2*c,l=2*(c+5),d=2*(c+10),f=2*(c+15),p=2*(c+20);r[u]=t[u]^t[l]^t[d]^t[f]^t[p],r[u+1]=t[u+1]^t[l+1]^t[d+1]^t[f+1]^t[p+1]}for(var h=0;h<5;h++){(0,n.default)(r,(h+1)%5)(a,0),s=a[0],i=a[1],a[0]=s<<1|i>>>31,a[1]=i<<1|s>>>31,o[2*h]=r[(h+4)%5*2]^a[0],o[2*h+1]=r[(h+4)%5*2+1]^a[1];for(var g=0;g<25;g+=5)t[2*(g+h)]^=o[2*h],t[2*(g+h)+1]^=o[2*h+1]}};e.default=r}(Ye),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=a(Me),n=a(qe),r=a(Ke),o=a(Ye);function a(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e=new Uint32Array(10),a=new Uint32Array(10),s=new Uint32Array(2);return function(i){for(var c=0;c<24;c++)(0,o.default)({A:i,C:e,D:a,W:s}),(0,r.default)({A:i,C:e,W:s}),(0,t.default)({A:i,C:e}),(0,n.default)({A:i,roundIndex:c});e.fill(0),a.fill(0),s.fill(0)}};e.default=s}(Ge),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t,n=re,r=(t=Ge)&&t.__esModule?t:{default:t},o=function(e,t){for(var n=0;n>>8,t[n+2]=e[r+1]>>>16,t[n+3]=e[r+1]>>>24,t[n+4]=e[r],t[n+5]=e[r]>>>8,t[n+6]=e[r]>>>16,t[n+7]=e[r]>>>24}return t},s=function(e){var t=this,s=e.capacity,i=e.padding,c=(0,r.default)(),u=s/8,l=200-s/4,d=0,f=new Uint32Array(50),p=n.Buffer.allocUnsafe(l);return this.absorb=function(e){for(var n=0;n=l&&(o(p,f),c(f),d=0);return t},this.squeeze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={buffer:e.buffer||n.Buffer.allocUnsafe(u),padding:e.padding||i,queue:n.Buffer.allocUnsafe(p.length),state:new Uint32Array(f.length)};p.copy(t.queue);for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:o;if(!this||this.constructor!==e)return new e(i);if(t&&!t.includes(i))throw new Error("Unsupported hash length");var c=new r.default({capacity:i});return this.update=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(n.Buffer.isBuffer(e))return c.absorb(e),s;if("string"==typeof e)return s.update(n.Buffer.from(e,t));throw new TypeError("Not a string or buffer")},this.digest=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",t="string"==typeof e?{format:e}:e,n=c.squeeze({buffer:t.buffer,padding:t.padding||a});return t.format&&"binary"!==t.format?n.toString(t.format):n},this.reset=function(){return c.reset(),s},this}},a=o({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});e.Keccak=a;var s=o({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});e.SHA3=s;var i=o({allowedSizes:[128,256],defaultSize:256,padding:31});e.SHAKE=i;var c=a;e.SHA3Hash=c,s.SHA3Hash=c;var u=s;e.default=u}(je);const Qe="UNKNOWN",et="SCRIPT",tt="TRANSACTION",nt="GET_TRANSACTION_STATUS",rt="GET_ACCOUNT",ot="GET_EVENTS",at="PING",st="GET_TRANSACTION",it="GET_BLOCK",ct="GET_BLOCK_HEADER",ut="GET_COLLECTION",lt="GET_NETWORK_PARAMETERS",dt="BAD",ft="OK",pt="ACCOUNT",ht="PARAM",gt="ARGUMENT",yt="authorizer",mt="payer",vt="proposer",wt=`{\n "kind":"${pt}",\n "tempId":null,\n "addr":null,\n "keyId":null,\n "sequenceNum":null,\n "signature":null,\n "signingFunction":null,\n "resolve":null,\n "role": {\n "proposer":false,\n "authorizer":false,\n "payer":false,\n "param":false\n }\n}`,bt=`{\n "kind":"${gt}",\n "tempId":null,\n "value":null,\n "asArgument":null,\n "xform":null,\n "resolve": null,\n "resolveArgument": null\n}`,Et=`{\n "tag":"${Qe}",\n "assigns":{},\n "status":"${ft}",\n "reason":null,\n "accounts":{},\n "params":{},\n "arguments":{},\n "message": {\n "cadence":null,\n "refBlock":null,\n "computeLimit":null,\n "proposer":null,\n "payer":null,\n "authorizations":[],\n "params":[],\n "arguments":[]\n },\n "proposer":null,\n "authorizations":[],\n "payer":[],\n "events": {\n "eventType":null,\n "start":null,\n "end":null,\n "blockIds":[]\n },\n "transaction": {\n "id":null\n },\n "block": {\n "id":null,\n "height":null,\n "isSealed":null\n },\n "account": {\n "addr":null\n },\n "collection": {\n "id":null\n }\n}`,It=new Set(Object.keys(JSON.parse(Et))),St=()=>JSON.parse(Et),At="abcdefghijklmnopqrstuvwxyz0123456789".split(""),kt=()=>At[~~(Math.random()*At.length)],Rt=()=>Array.from({length:10},kt).join(""),Tt=e=>"number"==typeof e,xt=e=>Array.isArray(e),Pt=e=>null!==e&&"object"==typeof e,_t=e=>null==e,Ct=e=>"function"==typeof e,Ot=e=>{if(!Pt(e)||_t(e)||Tt(e))return!1;for(let t of It)if(!e.hasOwnProperty(t))return!1;return!0},Bt=e=>(e.status=ft,e),Nt=(e,t)=>(e.status=dt,e.reason=t,e),Ut=e=>t=>(t.tag=e,Bt(t)),Lt=e=>null==e.keyId?e:(s(!isNaN(parseInt(e.keyId)),"account.keyId must be an integer"),{...e,keyId:parseInt(e.keyId)}),Dt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{s("function"==typeof e||"object"==typeof e,"prepAccount must be passed an authorization function or an account object"),s(null!=t.role,"Account must have a role");const r=JSON.parse(wt),o=t.role,a=Rt();e.authorization&&Ct(e.authorization)&&(e={resolve:e.authorization}),!e.authorization&&Ct(e)&&(e={resolve:e});const i=e.resolve;return i&&(e.resolve=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rt(await e,...n)),e)}),e=Lt(e),n.accounts[a]={...r,tempId:a,...e,role:{...r.role,..."object"==typeof e.role?e.role:{},[o]:!0}},o===yt?n.authorizations.push(a):o===mt?n.payer.push(a):n[o]=a,n}},Ft=e=>t=>{let n=Rt();return t.message.arguments.push(n),t.arguments[n]=JSON.parse(bt),t.arguments[n].tempId=n,t.arguments[n].value=e.value,t.arguments[n].asArgument=e.asArgument,t.arguments[n].xform=e.xform,t.arguments[n].resolve=e.resolve,t.arguments[n].resolveArgument=Ct(e.resolveArgument)?e.resolveArgument.bind(e):e.resolveArgument,Bt(t)},jt=Ut(Qe),$t=Ut(et),Gt=Ut(tt),Mt=Ut(nt),zt=Ut(st),qt=Ut(rt),Ht=Ut(ot),Kt=Ut(at),Wt=Ut(it),Vt=Ut(ct),Yt=Ut(ut),Jt=Ut(lt),Xt=e=>t=>t.tag===e,Zt=Xt(Qe),Qt=Xt(et),en=Xt(tt),tn=Xt(nt),nn=Xt(st),rn=Xt(rt),on=Xt(ot),an=Xt(at),sn=Xt(it),cn=Xt(ct),un=Xt(ut),ln=Xt(lt),dn=e=>e.status===ft,fn=e=>e.status===dt,pn=e=>e.reason,hn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{if(e=(e=>{for(let t of Object.keys(e))if(!It.has(t))throw new Error(`"${t}" is an invalid root level Interaction property.`);return e})(await e),fn(e))throw new Error(`Interaction Error: ${e.reason}`);if(!t.length)return e;const[n,...r]=t,o=await n;if(Ct(o))return hn(o(e),r);if(_t(o)||!o)return hn(e,r);if(Ot(o))return hn(o,r);throw new Error("Invalid Interaction Composition")}catch(e){throw e}},gn=function(){for(var e=arguments.length,t=new Array(e),n=0;ngn(e,r):hn(r,o)},yn=e=>e,mn=(e,t,n)=>null==e.assigns[t]?n:e.assigns[t],vn=(e,t)=>n=>(n.assigns[e]=t,Bt(n)),wn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yn;return n=>(n.assigns[e]=t(n.assigns[e],n),Bt(n))};var bn=Object.freeze({__proto__:null,UNKNOWN:Qe,SCRIPT:et,TRANSACTION:tt,GET_TRANSACTION_STATUS:nt,GET_ACCOUNT:rt,GET_EVENTS:ot,PING:at,GET_TRANSACTION:st,GET_BLOCK:it,GET_BLOCK_HEADER:ct,GET_COLLECTION:ut,GET_NETWORK_PARAMETERS:lt,BAD:dt,OK:ft,ACCOUNT:pt,PARAM:ht,ARGUMENT:gt,AUTHORIZER:yt,PAYER:mt,PROPOSER:vt,interaction:St,uuid:Rt,isNumber:Tt,isArray:xt,isObj:Pt,isNull:_t,isFn:Ct,isInteraction:Ot,Ok:Bt,Bad:Nt,prepAccount:Dt,makeArgument:Ft,makeUnknown:jt,makeScript:$t,makeTransaction:Gt,makeGetTransactionStatus:Mt,makeGetTransaction:zt,makeGetAccount:qt,makeGetEvents:Ht,makePing:Kt,makeGetBlock:Wt,makeGetBlockHeader:Vt,makeGetCollection:Yt,makeGetNetworkParameters:Jt,isUnknown:Zt,isScript:Qt,isTransaction:en,isGetTransactionStatus:tn,isGetTransaction:nn,isGetAccount:rn,isGetEvents:on,isPing:an,isGetBlock:sn,isGetBlockHeader:cn,isGetCollection:un,isGetNetworkParameters:ln,isOk:dn,isBad:fn,why:pn,isAccount:e=>e.kind===pt,isParam:e=>e.kind===ht,isArgument:e=>e.kind===gt,pipe:gn,get:mn,put:vn,update:wn,destroy:e=>t=>(delete t.assigns[e],Bt(t))});function En(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return gn(St(),e)}const In=()=>JSON.parse('{\n "tag":null,\n "transaction":null,\n "transactionStatus":null,\n "transactionId":null,\n "encodedData":null,\n "events":null,\n "account":null,\n "block":null,\n "blockHeader":null,\n "latestBlock":null,\n "collection":null,\n "networkParameters":null\n}');function Sn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return gn([Wt,t=>(t.block.isSealed=e,Bt(t))])}function An(e){return gn([qt,t=>(t.account.addr=we(e),Bt(t))])}const kn=async e=>e,Rn=async(e,t,n)=>{const r=await e.fields.reduce((async(e,r)=>((e=await e)[r.name]=await Pn(r.value,t,[...n,r.name]),e)),Promise.resolve({})),o=e.id&&xn(t,e.id);return o?await o(r):r},Tn={UInt:kn,Int:kn,UInt8:kn,Int8:kn,UInt16:kn,Int16:kn,UInt32:kn,Int32:kn,UInt64:kn,Int64:kn,UInt128:kn,Int128:kn,UInt256:kn,Int256:kn,Word8:kn,Word16:kn,Word32:kn,Word64:kn,UFix64:kn,Fix64:kn,String:kn,Character:kn,Bool:kn,Address:kn,Void:async()=>null,Optional:async(e,t,n)=>e?await Pn(e,t,n):null,Reference:async e=>({address:e.address,type:e.type}),Array:async(e,t,n)=>await Promise.all(e.map((e=>new Promise((async r=>r(await Pn(e,t,[...n,e.type]))))))),Dictionary:async(e,t,n)=>await e.reduce((async(e,r)=>((e=await e)[await Pn(r.key,t,[...n,r.key])]=await Pn(r.value,t,[...n,r.key]),e)),Promise.resolve({})),Event:Rn,Resource:Rn,Struct:Rn,Enum:Rn,Type:async e=>e.staticType,Path:async e=>({domain:e.domain,identifier:e.identifier}),Capability:async e=>({path:e.path,address:e.address,borrowType:e.borrowType})},xn=(e,t)=>{const n=Object.keys(e).find((e=>/^\/.*\/$/.test(e)?new RegExp(e.substring(1,e.length-1)).test(t):e===t));return t&&n&&e[n]},Pn=async(e,t,n)=>{let r=xn(t,e.type);if(!r)throw new Error(`Undefined Decoder Error: ${e.type}@${n.join(".")}`);return await r(e.value,t,n)},_n=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const r=Object.keys(Tn).filter((e=>!Object.keys(t).find((t=>new RegExp(t).test(e))))).reduce(((e,t)=>(e[t]=Tn[t],e)),t),o={...r,...t};return Pn(e,o,n)},Cn=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.encodedData?_n(e.encodedData,t):e.transactionStatus?{...e.transactionStatus,events:await Promise.all(e.transactionStatus.events.map((async function(e){return{type:e.type,transactionId:e.transactionId,transactionIndex:e.transactionIndex,eventIndex:e.eventIndex,data:await _n(e.payload,t)}})))}:e.transaction?e.transaction:e.events?await Promise.all(e.events.map((async function(e){return{blockId:e.blockId,blockHeight:e.blockHeight,blockTimestamp:e.blockTimestamp,type:e.type,transactionId:e.transactionId,transactionIndex:e.transactionIndex,eventIndex:e.eventIndex,data:await _n(e.payload,t)}}))):e.account?e.account:e.block?e.block:e.blockHeader?e.blockHeader:e.latestBlock?(a.deprecate({pkg:"@onflow/decode",subject:"Operating upon data of the latestBlock field of the response object",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field"}),e.latestBlock):e.transactionId?e.transactionId:e.collection?e.collection:e.networkParameters?{chainId:{"flow-testnet":"testnet","flow-mainnet":"mainnet","flow-emulator":"local"}[e.networkParameters.chainId]}:null},On=e=>"function"==typeof e,Bn=e=>"string"==typeof e,Nn=()=>/\b(0x\w+)\b/g;function Un(e){return Nn().test(e)}const Ln=()=>/import\s+"(\w+)"/g;function Dn(e){return Ln().test(e)}const Fn=e=>"function"==typeof e;function jn(e){return s(null!=typeof e.xform,`No type specified for argument: ${e.value}`),Fn(e.xform)?e.xform(e.value):Fn(e.xform.asArgument)?e.xform.asArgument(e.value):void s(!1,"Invalid Argument",e)}async function $n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return s(t>0,`Argument Resolve Recursion Limit Exceeded for Arg: ${e.tempId}`),Fn(e.resolveArgument)?$n(await e.resolveArgument(),t-1):e}const Gn=e=>Wn(Qn(tr(e))),Mn=e=>Wn(Qn(nr(e))),zn=(e,t)=>re.Buffer.from(e.padStart(2*t,0),"hex"),qn=(Hn=re.Buffer.from("FLOW-V0.0-transaction").toString("hex"),Kn=32,re.Buffer.from(Hn.padEnd(2*Kn,0),"hex")).toString("hex");var Hn,Kn;const Wn=e=>qn+e,Vn=e=>zn(e,8),Yn=e=>zn(e,32),Jn=e=>re.Buffer.from(JSON.stringify(e),"utf8"),Xn=e=>re.Buffer.from(e,"utf8"),Zn=e=>re.Buffer.from(e,"hex"),Qn=e=>pe(e).toString("hex"),er=e=>{const t=new je.SHA3(256);return t.update(re.Buffer.from(e,"hex")),t.digest().toString("hex")},tr=e=>(sr(e),[Xn(e.cadence),e.arguments.map(Jn),Yn(e.refBlock),e.computeLimit,Vn(we(e.proposalKey.address)),e.proposalKey.keyId,e.proposalKey.sequenceNum,Vn(we(e.payer)),e.authorizers.map((e=>Vn(we(e))))]),nr=e=>(ir(e),[tr(e),rr(e)]),rr=e=>{const t=or(e);return e.payloadSigs.map((e=>({signerIndex:t.get(e.address),keyId:e.keyId,sig:e.sig}))).sort(((e,t)=>e.signerIndex>t.signerIndex?1:e.signerIndext.keyId?1:e.keyId[e.signerIndex,e.keyId,Zn(e.sig)]))},or=e=>{const t=new Map;let n=0;const r=e=>{t.has(e)||(t.set(e,n),n++)};return r(e.proposalKey.address),r(e.payer),e.authorizers.forEach(r),t},ar=e=>{cr(e);const t=or(e),n=e=>e.map((e=>{let{address:n,keyId:r,sig:o}=e;return{signerIndex:t.get(n),keyId:r,sig:o}})).sort(((e,t)=>e.signerIndex>t.signerIndex?1:e.signerIndext.keyId?1:e.keyId[e.signerIndex,e.keyId,Zn(e.sig)]));return[[Xn(e.cadence),e.arguments.map(Jn),Yn(e.refBlock),e.computeLimit,Vn(we(e.proposalKey.address)),e.proposalKey.keyId,e.proposalKey.sequenceNum,Vn(we(e.payer)),e.authorizers.map((e=>Vn(we(e))))],n(e.payloadSigs),n(e.envelopeSigs)]},sr=e=>{pr.forEach((t=>wr(e,t))),hr.forEach((t=>wr(e.proposalKey,t,"proposalKey")))},ir=e=>{gr.forEach((t=>wr(e,t))),e.payloadSigs.forEach(((e,t)=>{yr.forEach((n=>wr(e,n,"payloadSigs",t)))}))},cr=e=>{pr.forEach((t=>wr(e,t))),hr.forEach((t=>wr(e.proposalKey,t,"proposalKey"))),gr.forEach((t=>wr(e,t))),e.payloadSigs.forEach(((e,t)=>{yr.forEach((n=>wr(e,n,"payloadSigs",t)))})),mr.forEach((t=>wr(e,t))),e.envelopeSigs.forEach(((e,t)=>{vr.forEach((n=>wr(e,n,"envelopeSigs",t)))}))},ur=e=>"number"==typeof e,lr=e=>"string"==typeof e,dr=e=>null!==e&&"object"==typeof e,fr=e=>dr(e)&&e instanceof Array,pr=[{name:"cadence",check:lr},{name:"arguments",check:fr},{name:"refBlock",check:lr,defaultVal:"0"},{name:"computeLimit",check:ur},{name:"proposalKey",check:dr},{name:"payer",check:lr},{name:"authorizers",check:fr}],hr=[{name:"address",check:lr},{name:"keyId",check:ur},{name:"sequenceNum",check:ur}],gr=[{name:"payloadSigs",check:fr}],yr=[{name:"address",check:lr},{name:"keyId",check:ur},{name:"sig",check:lr}],mr=[{name:"envelopeSigs",check:fr}],vr=[{name:"address",check:lr},{name:"keyId",check:ur},{name:"sig",check:lr}],wr=(e,t,n,r)=>{const{name:o,check:a,defaultVal:s}=t;if(null==e[o]&&null!=s&&(e[o]=s),null==e[o])throw Er(o,n,r);if(!a(e[o]))throw Ir(o,n,r)},br=(e,t,n)=>t?null==n?`${t}.${e}`:`${t}.${n}.${e}`:e,Er=(e,t,n)=>new Error(`Missing field ${br(e,t,n)}`),Ir=(e,t,n)=>new Error(`Invalid field ${br(e,t,n)}`);function Sr(e){let t=new Set(e.authorizations);return t.add(e.proposer),Array.isArray(e.payer)?e.payer.forEach((e=>t.delete(e))):t.delete(e.payer),Array.from(t)}function Ar(e){let t=new Set(Array.isArray(e.payer)?e.payer:[e.payer]);return Array.from(t)}const kr=e=>({cadence:e.message.cadence,refBlock:e.message.refBlock||null,computeLimit:e.message.computeLimit,arguments:e.message.arguments.map((t=>e.arguments[t].asArgument)),proposalKey:{address:be(e.accounts[e.proposer].addr),keyId:e.accounts[e.proposer].keyId,sequenceNum:e.accounts[e.proposer].sequenceNum},payer:be(e.accounts[Array.isArray(e.payer)?e.payer[0]:e.payer].addr),authorizers:(()=>{const t=e.authorizations.map((t=>be(e.accounts[t].addr))).reduce(((e,t)=>e.find((e=>e===t))?e:[...e,t]),[]);return t[0]?t:[]})(),payloadSigs:Sr(e).map((t=>({address:be(e.accounts[t].addr),keyId:e.accounts[t].keyId,sig:e.accounts[t].signature}))),envelopeSigs:Ar(e).map((t=>({address:be(e.accounts[t].addr),keyId:e.accounts[t].keyId,sig:e.accounts[t].signature})))}),Rr=e=>`${be(e.addr)}-${e.keyId}`,Tr=e=>"function"==typeof e;function xr(e,t){try{return{f_type:"PreSignable",f_vsn:"1.0.1",roles:e.role,cadence:t.message.cadence,args:t.message.arguments.map((e=>t.arguments[e].asArgument)),data:{},interaction:t,voucher:kr(t)}}catch(e){throw console.error("buildPreSignable",e),e}}async function Pr(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3;s(r,"Account Resolve Recursion Limit Exceeded",{ix:e,accounts:t});let o=[];for(let s of t){let t=s.resolve;s.resolve=null;var a=n||s;if(Tr(t)&&(s=await t(s,xr(s,e))),Array.isArray(s))await Pr(e,s,a,r-1);else{if(s.addr&&(s.addr=we(s.addr)),null!=s.addr&&null!=s.keyId&&(s.tempId=Rr(s)),e.accounts[s.tempId]=e.accounts[s.tempId]||s,e.accounts[s.tempId].role.proposer=e.accounts[s.tempId].role.proposer||s.role.proposer,e.accounts[s.tempId].role.payer=e.accounts[s.tempId].role.payer||s.role.payer,e.accounts[s.tempId].role.authorizer=e.accounts[s.tempId].role.authorizer||s.role.authorizer,e.accounts[s.tempId].role.proposer&&e.proposer===a.tempId&&(e.proposer=s.tempId),e.accounts[s.tempId].role.payer&&(Array.isArray(e.payer)?e.payer=Array.from(new Set([...e.payer,s.tempId].map((e=>e===a.tempId?s.tempId:e)))):e.payer=Array.from(new Set([e.payer,s.tempId].map((e=>e===a.tempId?s.tempId:e)))),e.payer.length>1)){const t=[],n=[];if(e.payer=e.payer.reduce(((r,o)=>{const{addr:a}=e.accounts[o],s=Rr(e.accounts[o]);return n.push(a),t.includes(s)?r:(t.push(s),[...r,o])}),[]),Array.from(new Set(n)).length>1)throw new Error("Payer can not be different accounts")}e.accounts[s.tempId].role.authorizer&&(n?o=Array.from(new Set([...o,s.tempId])):e.authorizations=e.authorizations.map((e=>e===a.tempId?s.tempId:e)))}a.tempId!=s.tempId&&delete e.accounts[a.tempId]}n&&(e.authorizations=e.authorizations.map((e=>e===n.tempId?o:e)).reduce(((e,t)=>Array.isArray(t)?[...e,...t]:[...e,t]),[]))}function _r(e,t){return async function(n){const r=e.accounts[n];if(null!=r.signature)return;const{signature:o}=await r.signingFunction(function(e,t,n){try{return{f_type:"Signable",f_vsn:"1.0.1",message:t,addr:we(e.addr),keyId:e.keyId,roles:e.role,cadence:n.message.cadence,args:n.message.arguments.map((e=>n.arguments[e].asArgument)),data:{},interaction:n,voucher:kr(n)}}catch(e){throw console.error("buildSignable",e),e}}(r,t,e));e.accounts[n].signature=o}}function Cr(e){const t=we((Array.isArray(e.payer)?e.accounts[e.payer[0]]:e.accounts[e.payer]).addr);return{cadence:e.message.cadence,refBlock:e.message.refBlock||null,computeLimit:e.message.computeLimit,arguments:e.message.arguments.map((t=>e.arguments[t].asArgument)),proposalKey:{address:we(e.accounts[e.proposer].addr),keyId:e.accounts[e.proposer].keyId,sequenceNum:e.accounts[e.proposer].sequenceNum},payer:t,authorizers:e.authorizations.map((t=>we(e.accounts[t].addr))).reduce(((e,t)=>e.find((e=>e===t))?e:[...e,t]),[])}}const Or=e=>e,Br=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Or;return async n=>(await ee.get(`debug.${e}`)&&await t(n,(function(){for(var t=arguments.length,n=new Array(t),r=0;r["\nAccounts:",{proposer:e.proposer,authorizations:e.authorizations,payer:e.payer},"\n\nDetails:",e.accounts].filter(Boolean))),n)},Nr=gn([async function(e){if(!en(e)&&!Qt(e))return e;var t=mn(e,"ix.cadence");if(s(On(t)||Bn(t),"Cadence needs to be a function or a string."),On(t)&&(t=await t({})),s(Bn(t),"Cadence needs to be a string at this point."),s(!Un(t)||!Dn(t),"Both account identifier and contract identifier syntax not simultaneously supported."),Un(t)&&(t=await ee().where(/^0x/).then((e=>Object.entries(e).reduce(((e,t)=>{let[n,r]=t;const o=new RegExp("(\\b"+n+"\\b)","g");return e.replace(o,r)}),t)))),Dn(t))for(const[e,n]of function(e){return e.matchAll(Ln())}(t)){const r=await ee().get(`system.contracts.${n}`);r?t=t.replace(e,`import ${n} from ${be(r)}`):a({title:"Contract Placeholder not found",message:`Cannot find a value for contract placeholder ${n}. Please add to your flow.json or explicitly add it to the config 'contracts.*' namespace.`,level:o.warn})}return e.message.cadence=t,e},Br("cadence",((e,t)=>t(e.message.cadence))),async function(e){return en(e)&&(e.message.computeLimit=e.message.computeLimit||await ee.get("fcl.limit"),e.message.computeLimit||(a.deprecate({pkg:"FCL/SDK",subject:"The built-in default compute limit (DEFAULT_COMPUTE_LIMIT=10)",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0009-deprecate-default-compute-limit"}),e.message.computeLimit=100)),e},Br("compute limit",((e,t)=>t(e.message.computeLimit))),async function(e){if(en(e)||Qt(e))for(let[t,n]of Object.entries(e.arguments)){const r=await $n(n);e.arguments[t].asArgument=jn(r)}return e},Br("arguments",((e,t)=>t(e.message.arguments,e.message))),async function(e){if(en(e)){Array.isArray(e.payer)||a.deprecate({pkg:"FCL",subject:'"ix.payer" must be an array. Support for ix.payer as a singular',message:"See changelog for more info."});try{await Pr(e,Object.values(e.accounts)),await Pr(e,Object.values(e.accounts))}catch(e){throw console.error("=== SAD PANDA ===\n\n",e,"\n\n=== SAD PANDA ==="),e}}return e},Br("accounts",((e,t,n)=>t(...n(e)))),async function(e){if(en(e)&&null==e.message.refBlock){const t=await ee().get("accessNode.api"),n=await ee.first(["sdk.transport","sdk.send"],Fe);s(n,"Required value for sdk.transport is not defined in config. See: https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21"),e.message.refBlock=(await n(En([Sn()]),{config:ee,response:In,Buffer:re.Buffer,ix:bn},{node:t}).then(Cn)).id}return e},async function(e){if(en(e)){var t=Object.values(e.accounts).find((e=>e.role.proposer));if(s(t,"Transactions require a proposer"),null==t.sequenceNum){const n=await ee().get("accessNode.api"),r=await ee.first(["sdk.transport","sdk.send"],Fe);s(r,"Required value for sdk.transport is not defined in config. See: https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21"),e.accounts[t.tempId].sequenceNum=await r(await En([An(t.addr)]),{config:ee,response:In,Buffer:re.Buffer,ix:bn},{node:n}).then(Cn).then((e=>e.keys)).then((e=>e.find((e=>e.index===t.keyId)))).then((e=>e.sequenceNumber))}}return e},async function(e){if(en(e))try{let t=Sr(e);const n=Gn(Cr(e));await Promise.all(t.map(_r(e,n)));let r=Ar(e);const o=Mn({...Cr(e),payloadSigs:t.map((t=>({address:e.accounts[t].addr,keyId:e.accounts[t].keyId,sig:e.accounts[t].signature})))});await Promise.all(r.map(_r(e,o)))}catch(t){throw console.error("Signatures",t,{ix:e}),t}return e},Br("signatures",((e,t,n)=>t(...n(e)))),async function(e){for(let t of Object.keys(e.accounts))e.accounts[t].addr=we(e.accounts[t].addr);return e},async function(e){const t=mn(e,"ix.validators",[]);return gn(e,t.map((e=>t=>e(t,{Ok:Bt,Bad:Nt}))))},async function(e){const t=mn(e,"ix.voucher-intercept");return Ct(t)&&await t(kr(e)),e},Br("resolved",((e,t)=>t(e)))]);function Ur(){for(var e=arguments.length,t=new Array(e),n=0;n1){const[e,n]=t;return Ur(((t,r)=>{let{Ok:o,Bad:a}=r;return e?o(t):a(t,n)}))}const[r]=t;return e=>r(e,{Ok:Bt,Bad:Nt})}const Lr=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await ee.first(["sdk.transport","sdk.send"],t.send||Fe);Ur(n,"Required value for sdk.transport is not defined in config. See: https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21");const r=await ee.first(["sdk.resolve"],t.resolve||Nr);return t.node=t.node||await ee().get("accessNode.api"),Array.isArray(e)&&(e=gn(St(),e)),n(await r(e),{config:ee,response:In,ix:bn,Buffer:re.Buffer},t)};async function Dr(e){const t=await ee().where(/^decoder\./),n=Object.entries(t).map((e=>{let[t,n]=e;return t=`/${t.replace(/^decoder\./,"")}$/`,[t,n]}));return Cn(e,Object.fromEntries(n))}class Fr extends Error{constructor(e){super(`\n Encode Message From Signable Error: Unable to determine message encoding for signer addresss: ${e}. \n Please ensure the address: ${e} is intended to sign the given transaction as specified by the transaction signable.\n `.trim()),this.name="Unable To Determine Message Encoding For Signer Addresss"}}function jr(e){return wn("ix.validators",(t=>Array.isArray(t)?t.push(e):[e]))}function $r(e){return gn([t=>(t.block.height=e,t),jr((e=>{if("boolean"==typeof e.block.isSealed)throw new Error("Unable to specify both block height and isSealed.");if(e.block.id)throw new Error("Unable to specify both block height and block id.");return e}))])}function Gr(e){return gn([t=>(t.block.id=e,Bt(t)),jr(((e,t)=>{let{Ok:n,Bad:r}=t;return rn(e)?r(e,"Unable to specify a block id with a Get Account interaction."):"boolean"==typeof e.block.isSealed?r(e,"Unable to specify both block id and isSealed."):e.block.height?r(e,"Unable to specify both block id and block height."):n(e)}))])}function Mr(){let{sealed:e=!1,id:t,height:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(!(e&&t||e&&n),'Method: block -- Cannot pass "sealed" with "id" or "height"'),s(!(t&&n),'Method: block -- Cannot pass "id" and "height" simultaneously'),t?Lr([Sn(),Gr(t)],r).then(Cn):n?Lr([Sn(),$r(n)],r).then(Cn):Lr([Sn(e)],r).then(Cn)}function zr(){return gn((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((e=>Dt(e,{role:yt}))))}function qr(e,t,n){return gn([Ht,r=>(r.events.eventType=e,r.events.start=t,r.events.end=n,Bt(r))])}function Hr(e){return gn([Mt,t=>(t.transaction.id=e,Bt(t))])}function Kr(){return gn([Jt,e=>Bt(e)])}function Wr(e){return t=>(t.message.computeLimit=e,t)}function Vr(){return gn((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(Ft))}function Yr(e,t){return{value:e,xform:t}}async function Jr(e){return Dt(e,{role:vt})}async function Xr(e){return Dt(e,{role:mt})}function Zr(e){return gn([t=>(t.message.refBlock=e,Bt(t))])}function Qr(){return gn([$t,vn("ix.cadence",Ze(...arguments))])}const eo=[];function to(){return gn([Gt,vn("ix.cadence",Ze(...arguments)),e=>(e.message.refBlock=e.message.refBlock||null,e.authorizations=e.authorizations||eo,Bt(e))])}const no=e=>e;function ro(e){return["SIGNATURE",e.addr,e.keyId].join(".")}function oo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){const n={...t,...e,signingFunction:e.signingFunction||t.signingFunction||function(e){return{addr:n.addr,keyId:n.keyId,signature:ro(n)}}};return n}}const ao={proposer:!1,authorizer:!1,payer:!1};var so=Object.freeze({__proto__:null,mockSend:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:no;return async function(t){switch(t=await t,!0){case rn(t):return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return s(e.account,"mockAccountResponse(ix) -- ix.account is missing",e),s(e.account.addr,"mockAccountResponse(ix) -- ix.account.addr is missing",e),{account:{addr:e.account.addr,keys:Array.from({length:t},((e,t)=>({index:t,sequenceNumber:42})))}}}(t);case sn(t):return{tag:"GET_BLOCK",block:{id:"32"}};default:return e(t)}}},authzFn:oo,authzResolve:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){const{tempId:n,...r}=e;return{...t,tempId:n||"WITH_RESOLVE",resolve:oo(r)}}},authzResolveMany:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return{...t,tempId:e.tempId||"AUTHZ_RESOLVE_MANY",resolve:()=>[e.proposer&&oo(e.proposer)({role:{...ao,proposer:!0}}),...e.authorizations.map(oo).map((e=>e({role:{...ao,authorizer:!0}}))),e.payer&&oo(e.payer)({role:{...ao,payer:!0}})].filter(Boolean)}}},sig:ro,idof:e=>`${be(e.addr)}-${e.keyId}`,run:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return En([Zr("123"),...e]).then(Nr)}});const io=e=>t=>typeof t===e,co=e=>null!=e,uo=io("object"),lo=io("string"),fo=io("function"),po=io("number"),ho=(e,t,n)=>({label:e,asArgument:t,asInjection:n}),go=e=>Array.isArray(e),yo=e=>"object"==typeof e,mo=e=>null==e,vo=e=>"number"==typeof e,wo=e=>Number.isInteger(e),bo=e=>"string"==typeof e,Eo=e=>{throw new Error("Type Error: "+e)},Io=e=>{a.deprecate({pkg:"@onflow/types",subject:`Passing in Number as value for ${e}`,message:`Going forward, use String as value for ${e}.`,transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/types/WARNINGS.md#0002-[U]Int*-and-Word*-as-Number"})},So=ho("Identity",(e=>e),(e=>e)),Ao=ho("UInt",(e=>vo(e)&&wo(e)?(Io("UInt"),{type:"UInt",value:e.toString()}):bo(e)?{type:"UInt",value:e}:void Eo("Expected Positive Integer for type Unsigned Int")),(e=>e)),ko=ho("Int",(e=>vo(e)&&wo(e)?(Io("Int"),{type:"Int",value:e.toString()}):bo(e)?{type:"Int",value:e}:void Eo("Expected Integer for type Int")),(e=>e)),Ro=ho("UInt8",(e=>vo(e)&&wo(e)?(Io("UInt8"),{type:"UInt8",value:e.toString()}):bo(e)?{type:"UInt8",value:e}:void Eo("Expected integer for UInt8")),(e=>e)),To=ho("Int8",(e=>vo(e)&&wo(e)?(Io("Int8"),{type:"Int8",value:e.toString()}):bo(e)?{type:"Int8",value:e}:void Eo("Expected positive integer for Int8")),(e=>e)),xo=ho("UInt16",(e=>vo(e)&&wo(e)?(Io("UInt16"),{type:"UInt16",value:e.toString()}):bo(e)?{type:"UInt16",value:e}:void Eo("Expected integer for UInt16")),(e=>e)),Po=ho("Int16",(e=>vo(e)&&wo(e)?(Io("Int16"),{type:"Int16",value:e.toString()}):bo(e)?{type:"Int16",value:e}:void Eo("Expected positive integer for Int16")),(e=>e)),_o=ho("UInt32",(e=>vo(e)&&wo(e)?(Io("UInt32"),{type:"UInt32",value:e.toString()}):bo(e)?{type:"UInt32",value:e}:void Eo("Expected integer for UInt32")),(e=>e)),Co=ho("Int32",(e=>vo(e)&&wo(e)?(Io("Int32"),{type:"Int32",value:e.toString()}):bo(e)?{type:"Int32",value:e}:void Eo("Expected positive integer for Int32")),(e=>e)),Oo=ho("UInt64",(e=>vo(e)&&wo(e)?(Io("UInt64"),{type:"UInt64",value:e.toString()}):bo(e)?{type:"UInt64",value:e}:void Eo("Expected integer for UInt64")),(e=>e)),Bo=ho("Int64",(e=>vo(e)&&wo(e)?(Io("Int64"),{type:"Int64",value:e.toString()}):bo(e)?{type:"Int64",value:e}:void Eo("Expected positive integer for Int64")),(e=>e)),No=ho("UInt128",(e=>vo(e)&&wo(e)?(Io("UInt128"),{type:"UInt128",value:e.toString()}):bo(e)?{type:"UInt128",value:e}:void Eo("Expected integer for UInt128")),(e=>e)),Uo=ho("Int128",(e=>vo(e)&&wo(e)?(Io("Int128"),{type:"Int128",value:e.toString()}):bo(e)?{type:"Int128",value:e}:void Eo("Expected positive integer for Int128")),(e=>e)),Lo=ho("UInt256",(e=>vo(e)&&wo(e)?(Io("UInt256"),{type:"UInt256",value:e.toString()}):bo(e)?{type:"UInt256",value:e}:void Eo("Expected integer for UInt256")),(e=>e)),Do=ho("Int256",(e=>vo(e)&&wo(e)?(Io("Int256"),{type:"Int256",value:e.toString()}):bo(e)?{type:"Int256",value:e}:void Eo("Expected integer for Int256")),(e=>e)),Fo=ho("Word8",(e=>vo(e)&&wo(e)?(Io("Word8"),{type:"Word8",value:e.toString()}):bo(e)?{type:"Word8",value:e}:void Eo("Expected positive number for Word8")),(e=>e)),jo=ho("Word16",(e=>vo(e)&&wo(e)?(Io("Word16"),{type:"Word16",value:e.toString()}):bo(e)?{type:"Word16",value:e}:void Eo("Expected positive number for Word16")),(e=>e)),$o=ho("Word32",(e=>vo(e)&&wo(e)?(Io("Word32"),{type:"Word32",value:e.toString()}):bo(e)?{type:"Word32",value:e}:void Eo("Expected positive number for Word32")),(e=>e)),Go=ho("Word64",(e=>vo(e)&&wo(e)?(Io("Word64"),{type:"Word64",value:e.toString()}):bo(e)?{type:"Word64",value:e}:void Eo("Expected positive number for Word64")),(e=>e)),Mo=()=>{a.deprecate({subject:"Passing in Numbers as values for Fix64 and UFix64 types",pkg:"@onflow/types",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/types/WARNINGS.md#0001-[U]Fix64-as-Number"})},zo=ho("UFix64",(e=>{if(bo(e)){const t=e.split(".");return 2!==t.length&&Eo(`Expected one decimal but found ${t.length} in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),(0==t[1].length||t[1].length>8)&&Eo(`Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ${t[1].length} digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),t[1]=t[1].padEnd(8,"0"),{type:"UFix64",value:e=t.join(".")}}if(vo(e))return Mo(),{type:"UFix64",value:e.toString()};Eo("Expected String for UFix64")}),(e=>e)),qo=ho("Fix64",(e=>{if(bo(e)){const t=e.split(".");return 2!==t.length&&Eo(`Expected one decimal but found ${t.length} in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),(0==t[1].length||t[1].length>8)&&Eo(`Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ${t[1].length} digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),t[1]=t[1].padEnd(8,"0"),{type:"Fix64",value:e=t.join(".")}}if(vo(e))return Mo(),{type:"Fix64",value:e.toString()};Eo("Expected String for Fix64")}),(e=>e)),Ho=ho("String",(e=>{if(bo(e))return{type:"String",value:e};Eo("Expected String for type String")}),(e=>e)),Ko=ho("Character",(e=>{if(bo(e))return{type:"Character",value:e};Eo("Expected Character for type Character")}),(e=>e)),Wo=ho("Bool",(e=>{if("boolean"==typeof e)return{type:"Bool",value:e};Eo("Expected Boolean for type Bool")}),(e=>e)),Vo=ho("Address",(e=>{if(bo(e))return{type:"Address",value:e};Eo("Expected Address for type Address")}),(e=>e)),Yo=ho("Void",(e=>{if(!e||mo(e))return{type:"Void"};Eo("Expected Void for type Void")}),(e=>e)),Jo=ho("Reference",(e=>{if(yo(e))return{type:"Reference",value:e};Eo("Expected Object for type Reference")}),(e=>e)),Xo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ho("Array",(t=>({type:"Array",value:go(e)?e.map(((e,n)=>e.asArgument(t[n]))):t.map((t=>e.asArgument(t)))})),(e=>e))},Zo=ho("Path",(e=>{if(yo(e))return bo(e.domain)||Eo(`Expected a string for the Path domain but found ${e.domain}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`),"storage"!==e.domain&&"private"!==e.domain&&"public"!==e.domain&&Eo(`Expected either "storage", "private" or "public" as the Path domain but found ${e.domain}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`),bo(e.identifier)||Eo(`Expected a string for the Path identifier but found ${e.identifier}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`),{type:"Path",value:{domain:e.domain,identifier:e.identifier}};Eo("Expected Object for type Path")}),(e=>e));var Qo=Object.freeze({__proto__:null,Address:Vo,Array:Xo,Bool:Wo,Character:Ko,Dictionary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ho("Dictionary",(t=>{if(yo(t))return{type:"Dictionary",value:go(e)?e.map(((e,n)=>({key:e.key.asArgument(t[n].key),value:e.value.asArgument(t[n].value)}))):go(t)?t.map((t=>({key:e.key.asArgument(t.key),value:e.value.asArgument(t.value)}))):[{key:e.key.asArgument(t.key),value:e.value.asArgument(t.value)}]};Eo("Expected Object for type Dictionary")}),(e=>e))},Enum:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return ho("Enum",(n=>{if(yo(n))return{type:"Enum",value:{id:e,fields:go(t)?t.map(((e,t)=>({name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}))):n.fields.map((e=>({name:e.name,value:t.value.asArgument(e.value)})))}};Eo("Expected Object for type Enum")}),(e=>e))},Event:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return ho("Event",(n=>{if(yo(n))return{type:"Event",value:{id:e,fields:go(t)?t.map(((e,t)=>({name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}))):n.fields.map((e=>({name:e.name,value:t.value.asArgument(e.value)})))}};Eo("Expected Object for type Event")}),(e=>e))},Fix64:qo,Identity:So,Int:ko,Int128:Uo,Int16:Po,Int256:Do,Int32:Co,Int64:Bo,Int8:To,Optional:e=>ho("Optional",(t=>({type:"Optional",value:mo(t)?null:e.asArgument(t)})),(e=>e)),Path:Zo,Reference:Jo,Resource:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return ho("Resource",(n=>{if(yo(n))return{type:"Resource",value:{id:e,fields:go(t)?t.map(((e,t)=>({name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}))):n.fields.map((e=>({name:e.name,value:t.value.asArgument(e.value)})))}};Eo("Expected Object for type Resource")}),(e=>e))},String:Ho,Struct:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return ho("Struct",(n=>{if(yo(n))return{type:"Struct",value:{id:e,fields:go(t)?t.map(((e,t)=>({name:n.fields[t].name,value:e.value.asArgument(n.fields[t].value)}))):n.fields.map((e=>({name:e.name,value:t.value.asArgument(e.value)})))}};Eo("Expected Object for type Struct")}),(e=>e))},UFix64:zo,UInt:Ao,UInt128:No,UInt16:xo,UInt256:Lo,UInt32:_o,UInt64:Oo,UInt8:Ro,Void:Yo,Word16:jo,Word32:$o,Word64:Go,Word8:Fo,_Array:Xo});function ea(e){return fo(e)?e(Yr,Qo):[]}async function ta(e){let t,{url:n}=e;s(void 0!==n,"retrieve({ url }) -- url must be defined");try{t=await ve(n)}catch(e){throw new Error("httpDocumentResolver Error: Failed to retrieve document.")}return t.ok?await t.json():null}const na=new Map([["http",ta],["https",ta]]);function ra(e){if(null==e)return null;if("1.0.0"===e.f_version)return e;throw new Error("normalizeInteractionTemplate Error: Invalid InteractionTemplate")}function oa(e){let{network:t,template:n}=e;if(Ur(null!=t,"deriveCadenceByNetwork({ network }) -- network must be defined"),Ur("string"==typeof t,"deriveCadenceByNetwork({ network }) -- network must be a string"),Ur(null!=n,"generateDependencyPin({ template }) -- template must be defined"),Ur("object"==typeof n,"generateDependencyPin({ template }) -- template must be an object"),Ur("InteractionTemplate"===n.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),n=ra(n),"1.0.0"===n.f_version)return Object.keys(n?.data?.dependencies).map((e=>{let r=Object.values(n?.data?.dependencies?.[e]);Ur(r,`deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ${e}`),Ur(0===r.length,`deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ${e}`);let o=r[0],a=o?.[t];return Ur(a,`deriveCadenceByNetwork -- Could not find ${t} network information for dependency: ${e}`),[e,a.address]})).reduce(((e,t)=>{let[n,r]=t;const o=new RegExp("(\\b"+n+"\\b)","g");return e.replace(o,r)}),n.data.cadence);throw new Error("deriveCadenceByNetwork Error: Unsupported template version")}let aa={},sa=!1;async function ia(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=await ee.get("flow.network"),n=await ee.get("env");n&&!sa&&(a.deprecate({pkg:"FCL",subject:'Using the "env" configuration key for specifying the flow network',message:"Configuring to specify flow network is no longer required",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0001-deprecate-env-config-key"}),sa=!0);const r=e.node||await ee.get("accessNode.api");if(!r){if(t)return t;if(n)return n;throw new Error('Either the "accessNode.api" config key or opts.node must be set')}if(aa[r])try{return await aa[r]}catch{}aa[r]||(aa[r]=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(await Lr([Kr()],e).then(Dr)).chainId}(e).catch((e=>{throw aa[r]=null,e})));try{return await aa[r]}catch(e){if(t)return t;if(n)return n;throw new Error(`Error getting chainId from access node - are you using the correct access node endpoint. If running locally, is your emulator up-to-date? ${e.message}`)}}function ca(){return"undefined"!=typeof navigator&&/iPhone|iPod/.test(navigator.userAgent)||"undefined"!=typeof navigator&&/iPad/.test(navigator.userAgent)}function ua(){return"undefined"!=typeof navigator&&/android/i.test(navigator.userAgent)||ca()}async function la(e){lo(e?.template)&&(e.template=await async function(e){let{url:t}=e;s(void 0!==t,"retrieve({ url }) -- url must be defined"),s("string"==typeof t,"retrieve({ url }) -- url must be a string");const n=await ee().where(/^document\.resolver\./);Object.keys(n).map((e=>{const t=n[e],r=e.replace(/^document\.resolver\./,"");na.set(r,t)}));const r=/^(.*):\/\/([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$/.exec(t);s(r,"Failed to parse URL");const o=r[1];s(r,"Failed to parse URL protocol");const a=na.get(o);return s(a,`No resolver found for protcol=${o}`),await a({url:t})}({url:e?.template}));let t={};e?.template&&(e.template=ra(e?.template),t=await async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.template,n=await ia(e),r={};if("1.0.0"===t.f_version){const e=Object.keys(t?.data?.dependencies);for(let o of e){let e=t?.data?.dependencies[o];const a=Object.keys(e);s(a.length>0,`FCL configureDependencies Error: No contracts found in template for placeholder=${o}`);const i=e[a[0]][n];s(i,`FCL configureDependencies Error: No dependency information for placeholder=${o} contract=${a[0]} network=${n}`),s(i?.address,`FCL configureDependencies Error: No address information for placeholder=${o} contract=${a[0]} network=${n}`),r[o]=be(i?.address)}return r}throw new Error("FCL configureDependencies Error: Unsupported template version")}({template:e.template}));const n=e.cadence||oa({template:e.template,network:await ia(e)});return e.cadence=n,e.dependencies=t,e}async function da(e,t){s(co(t),`${e}(opts) -- opts is required`),s(uo(t),`${e}(opts) -- opts must be an object`),s(!(t.cadence&&t.template),`${e}({ template, cadence }) -- cannot pass both cadence and template`),s(co(t.cadence||t?.template),`${e}({ cadence }) -- cadence is required`),s(lo(t.cadence)||t?.template,`${e}({ cadence }) -- cadence must be a string`),s(await ee().get("accessNode.api"),`${e}(opts) -- Required value for "accessNode.api" not defined in config. See: https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration`)}async function fa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await async function(e){return da("query",e)}(e),e=await la(e),ee().overload(e.dependencies||{},(async()=>Lr([Qr(e.cadence),Vr(ea(e.args||[])),e.limit&&"number"==typeof e.limit&&Wr(e.limit)]).then(Dr)))}const pa={"HTTP/RPC":"HTTP/RPC","HTTP/POST":"HTTP/POST","IFRAME/RPC":"IFRAME/RPC","POP/RPC":"POP/RPC","TAB/RPC":"TAB/RPC","EXT/RPC":"EXT/RPC","DEEPLINK/RPC":"DEEPLINK/RPC"},ha=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const n=n=>{const{data:r}=n;"object"==typeof r&&null!=typeof r&&r.type===e&&t((e=>(e.deprecated&&console.warn("DEPRECATION NOTICE",e.deprecated.message),delete e?.body?.interaction,e))(r))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},ga=globalThis.URL;class ya extends ga{constructor(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{};const n={...t,type:e},r=new URLSearchParams(window.location.search).get("fcl_redirect_url");if(r){const e=new ya(r);e.searchParams.append("fclResponseJson",JSON.stringify(n)),window.location.href=e.href}else if(window.location!==window.parent.location)window.parent.postMessage({...t,type:e},"*");else{if(!window.opener)throw new Error("Unable to communicate with parent FCL instance");window.opener.postMessage({...t,type:e},"*")}},va={f_type:"Service",f_vsn:"1.0.0"},wa={f_type:"Identity",f_vsn:"1.0.0"},ba={f_type:"USER",f_vsn:"1.0.0"},Ea={f_type:"PollingResponse",f_vsn:"1.0.0"},Ia={f_type:"CompositeSignature",f_vsn:"1.0.0"},Sa=e=>((e,t)=>re.Buffer.from(e.padStart(2*t,"0"),"hex"))(e,8),Aa=e=>re.Buffer.from(e,"hex"),ka=function(e){let{address:t,nonce:n,appIdentifier:r}=e,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];s(t,"Encode Message For Provable Authn Error: address must be defined"),s(n,"Encode Message For Provable Authn Error: nonce must be defined"),s(r,"Encode Message For Provable Authn Error: appIdentifier must be defined"),s(n.length>=64,"Encode Message For Provable Authn Error: nonce must be minimum of 32 bytes");const a=((e,t)=>re.Buffer.from(e.padEnd(2*t,"0"),"hex"))(re.Buffer.from("FCL-ACCOUNT-PROOF-V0.0").toString("hex"),32);return o?re.Buffer.concat([a,pe([r,Sa(we(t)),Aa(n)])]).toString("hex"):pe([r,Sa(we(t)),Aa(n)]).toString("hex")};var Ra=Object.freeze({__proto__:null,sendMsgToFCL:ma,ready:function(e){ha("FCL:VIEW:READY:RESPONSE",e),ma("FCL:VIEW:READY")},close:()=>{ma("FCL:VIEW:CLOSE")},approve:e=>{ma("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"APPROVED",reason:null,data:e})},decline:e=>{ma("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"DECLINED",reason:e,data:null})},redirect:e=>{ma("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"REDIRECT",reason:null,data:e})},onMessageFromFCL:ha,encodeMessageFromSignable:(e,t)=>{let n=(e=>{let t=new Set(e.authorizers);return t.add(e.proposalKey.address),t.delete(e.payer),Array.from(t).map(be)})(e.voucher),r=(e=>{let t=new Set([e.payer]);return Array.from(t).map(be)})(e.voucher);const o=n.includes(be(t)),a=r.includes(be(t));if(!o&&!a)throw new Fr(t);const s={cadence:e.voucher.cadence,refBlock:e.voucher.refBlock,computeLimit:e.voucher.computeLimit,arguments:e.voucher.arguments,proposalKey:{...e.voucher.proposalKey,address:we(e.voucher.proposalKey.address)},payer:we(e.voucher.payer),authorizers:e.voucher.authorizers.map(we),payloadSigs:e.voucher.payloadSigs.map((e=>({...e,address:we(e.address)})))};return o?Gn(s):Mn(s)},CompositeSignature:function(e,t,n){this.f_type=Ia.f_type,this.f_vsn=Ia.f_vsn,this.addr=be(e),this.keyId=Number(t),this.signature=n},encodeAccountProof:ka,injectExtService:function(e){"authn"===e.type&&null!=e.endpoint?(Array.isArray(window.fcl_extensions)||(window.fcl_extensions=[]),window.fcl_extensions.push(e)):console.warn("Authn service is required")}});const Ta=e=>{if(e.appIdentifier){const{appIdentifier:t,address:n,nonce:r,signatures:o}=e;return s(lo(t),"verifyAccountProof({ appIdentifier }) -- appIdentifier must be a string"),s(lo(n)&&16===we(n).length,"verifyAccountProof({ address }) -- address must be a valid address"),s(/^[0-9a-f]+$/i.test(r),"nonce must be a hex string"),s(Array.isArray(o)&&o.every(((e,t,n)=>"CompositeSignature"===e.f_type)),"Must include an Array of CompositeSignatures to verify"),s(o.map((e=>e.addr)).every(((e,t,n)=>e===n[0])),"User signatures to be verified must be from a single account address"),!0}{const{message:t,address:n,compSigs:r}=e;return s(/^[0-9a-f]+$/i.test(t),"Signed message must be a hex string"),s(lo(n)&&16===we(n).length,"verifyUserSignatures({ address }) -- address must be a valid address"),s(Array.isArray(r)&&r.every(((e,t,n)=>"CompositeSignature"===e.f_type)),"Must include an Array of CompositeSignatures to verify"),s(r.map((e=>e.addr)).every(((e,t,n)=>e===n[0])),"User signatures to be verified must be from a single account address"),!0}},xa=async(e,t)=>{const n="ACCOUNT_PROOF"===e?"verifyAccountProofSignatures":"verifyUserSignatures";let r,o=await ia(t);return s(t.fclCryptoContract||"testnet"===o||"mainnet"===o,"${verifyFunction}({ fclCryptoContract }) -- fclCrypto contract address must be set for non-mainnet/testnet networks"),r=t.fclCryptoContract?t.fclCryptoContract:"testnet"===o?"0x74daa6f9c7ef24b1":"0xb4b82a1c9d21d284",`\n import FCLCrypto from ${r}\n\n pub fun main(\n address: Address, \n message: String, \n keyIndices: [Int], \n signatures: [String]\n ): Bool {\n return FCLCrypto.${n}(address: address, message: message, keyIndices: keyIndices, signatures: signatures)\n }\n `};async function Pa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=be(t[0].addr);Ta({message:e,address:r,compSigs:t});let o=[],a=[];for(const e of t)o.push(e.signature),a.push(e.keyId.toString());return fa({cadence:await xa("USER_SIGNATURE",n),args:(t,n)=>[t(r,n.Address),t(e,n.String),t(a,n.Array(n.Int)),t(o,n.Array(n.String))]})}var _a=Object.freeze({__proto__:null,verifyAccountProof:async function(e,t){let{address:n,nonce:r,signatures:o}=t,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ta({appIdentifier:e,address:n,nonce:r,signatures:o});const s=ka({address:n,nonce:r,appIdentifier:e},!1);let i=[],c=[];for(const e of o)i.push(e.signature),c.push(e.keyId.toString());return fa({cadence:await xa("ACCOUNT_PROOF",a),args:(e,t)=>[e(be(n),t.Address),e(s,t.String),e(c,t.Array(t.Int)),e(i,t.Array(t.String))]})},verifyUserSignatures:Pa});const Ca=a.deprecate({pkg:"FCL",subject:"fcl.verifyUserSignatures()",message:"Please use fcl.AppUtils.verifyUserSignatures()",callback:function(e,t){return Pa(e,t)}});async function Oa(e){return Object.fromEntries(Object.entries(await ee().where(e)).map((t=>{let[n,r]=t;return[n.replace(e,""),r]})))}const Ba="POLL",Na=e=>e.status>=4,Ua=e=>e.status>=3,La=e=>e.status>=2,Da={[f]:async e=>{e.sendSelf(Ba)},[p]:(e,t)=>{e.subscribe(t.from),e.send(t.from,g,e.all())},[h]:(e,t)=>{e.unsubscribe(t.from)},[y]:async(e,t)=>{t.reply(e.all())},[Ba]:async e=>{let t;try{t=await(async e=>Lr([Hr(e)]).then(Dr))(e.self())}catch(t){return e.fatalError(t)}var n,r;Na(t)||setTimeout((()=>e.sendSelf(Ba)),2500),n=e.all(),r=t,JSON.stringify(n)!==JSON.stringify(r)&&e.broadcast(g,t),e.merge(t)}},Fa=e=>{if("object"==typeof e&&(e=e.transactionId),null==e)throw new Error("transactionId required");return e},ja=e=>E(Da,Fa(e));function $a(e){function t(t){return I(Fa(e),ja,t)}function n(e){return function(){const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).suppress||!1;return new Promise(((r,o)=>{const a=t(((t,s)=>{!s&&!t.statusCode||n?e(t)&&(r(t),a()):(o(s||t.errorMessage),a())}))}))}}return{snapshot:function(){return S(e,ja)},subscribe:t,onceFinalized:n(La),onceExecuted:n(Ua),onceSealed:n(Na)}}$a.isUnknown=e=>e.status>=0,$a.isPending=e=>e.status>=1,$a.isFinalized=La,$a.isExecuted=Ua,$a.isSealed=Na,$a.isExpired=e=>5===e.status;const Ga="TICK",Ma="hwm",za=async e=>setTimeout((()=>e.sendSelf(Ga)),await ee().get("fcl.eventPollRate",1e4)),qa={[Ga]:async e=>{if(!e.hasSubs())return;let t=e.get(Ma);if(null==t)e.put(Ma,await Mr()),e.put(Ga,await za(e));else{let n=await Mr();if(e.put(Ma,n),t.height{e.hasSubs()||e.put(Ga,await za(e)),e.subscribe(t.from)},[h]:(e,t)=>{e.unsubscribe(t.from),e.hasSubs()||(clearTimeout(e.get(Ga)),e.delete(Ga),e.delete(Ma))}},Ha=e=>E(qa,e),Ka=()=>{throw new Error("Platform specific Core Strategies are not initialized")},Wa={[pa["EXT/RPC"]]:Ka,[pa["HTTP/POST"]]:Ka,[pa["IFRAME/RPC"]]:Ka,[pa["POP/RPC"]]:Ka,[pa["TAB/RPC"]]:Ka,[pa["EXT/RPC"]]:Ka},Va=["ServicePlugin"],Ya=["discovery-service"],Ja=e=>{let{coreStrategies:t}=e,n=new Set,r=new Map(Object.entries(t));const i=e=>n=new Set([...e]);return Object.freeze({add:e=>{if(s(Ya.includes(e.type),`Service Plugin type ${e.type} is not supported`),"discovery-service"===e.type){const{discoveryServices:t,serviceStrategy:n}=(e=>{const{services:t,serviceStrategy:n}=e;s(Array.isArray(t)&&t.length,"Array of Discovery Services is required");for(const e of t)s(co(e.f_type)&&"Service"===e.f_type,"Service is required"),s(co(e.type)&&"authn"===e.type,`Service must be type authn. Received ${e.type}`),s(e.method in pa||n.method===e.method,`Service method ${e.method} is not supported`);return s(co(n),"Service strategy is required"),s(co(n.method)&&lo(n.method),"Service strategy method is required"),s(co(n.exec)&&fo(n.exec),"Service strategy exec function is required"),{discoveryServices:t,serviceStrategy:n}})(e);i(t),r.has(n.method)?a({title:"Add Service Plugin",message:`Service strategy for ${n.method} already exists`,level:o.warn}):r.set(n.method,n.exec)}},getServices:()=>[...n],getStrategy:e=>r.get(e),getStrategies:()=>[...r.keys()]})};let Xa;const Za=()=>void 0!==Xa,Qa=e=>{let{coreStrategies:t}=e;if(Za())return Xa;const n=Ja({coreStrategies:t});return Xa=n,n},es=()=>Za()?Xa:(console.warn("Registry is not initalized, it will be initialized with stub core strategies"),Qa({coreStrategies:Wa})),ts=(()=>{const e=new Map;return Object.freeze({add:t=>{const n=(e=>{let t;s(e,"No plugins supplied"),t=Array.isArray(e)?[...e]:[e];for(const e of t)s(co(e.name),"Plugin name is required"),s(co(e.f_type),"Plugin f_type is required"),s(Va.includes(e.f_type),`Plugin type ${e.f_type} is not supported`);return t})(t);for(const t of n)e.set(t.name,t),"ServicePlugin"===t.f_type&&Xa.add(t)},getPlugins:()=>e})})(),ns=async()=>[...window?.fcl_extensions||[],...es().getServices()],rs="authn",os="UPDATED",as="UPDATE_RESULTS",ss=async()=>{try{const e=await async function(e){let{types:n}=e;const r=await ee.get("discovery.authn.endpoint");s(Boolean(r),'"discovery.authn.endpoint" in config must be defined.');const o=await ee.get("discovery.authn.include",[]),a=new ya(r);return fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:n,fclVersion:t,include:o,clientServices:await ns(),supportedStrategies:es().getStrategies(),userAgent:window?.navigator?.userAgent,network:await ia()})}).then((e=>e.json()))}({types:[rs]});b(rs,as,{results:e})}catch(e){a({title:`${e.name} Error fetching Discovery API services.`,message:e.message,level:o.error})}},is={[f]:async e=>{var t;t='"fcl.discovery" is only available in the browser.',"undefined"==typeof window&&console.warn(`\n %cFCL Warning\n ============================\n ${t}\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n `,"font-weight:bold;font-family:monospace;"),"complete"===document.readyState?ss():window.onload=async()=>{ss()}},[as]:(e,t,n)=>{e.merge(n),e.broadcast(os,{...e.all()})},[p]:(e,t)=>{e.subscribe(t.from),e.send(t.from,os,{...e.all()})},[h]:(e,t)=>e.unsubscribe(t.from),SNAPSHOT:async(e,t)=>t.reply({...e.all()})},cs=()=>E(is,rs),us={authn:{subscribe:e=>I(rs,cs,e),snapshot:()=>S(rs,cs),update:()=>ss()}};async function ls(e){const t=new je.SHA3(256);return t.update(re.Buffer.from(e,"utf8")),t.digest("hex")}async function ds(e){let{template:t}=e;if(Ur(null!=t,"generateTemplateId({ template }) -- template must be defined"),Ur("object"==typeof t,"generateTemplateId({ template }) -- template must be an object"),Ur("InteractionTemplate"==typeof t.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate"),t=ra(t),"1.0.0"===t.f_version){const e=t.data,n=await Promise.all(Object.keys(e.messages).map((async t=>[await ls(t),await Promise.all(Object.keys(e.messages?.[t]?.i18n).map((async n=>[await ls(n),await ls(e.messages?.[t]?.i18n?.[n])])))]))),r=await Promise.all(Object.keys(e?.dependencies).map((async t=>[await ls(t),await Promise.all(Object.keys(e?.dependencies?.[t]).map((async n=>[await ls(n),await Promise.all(Object.keys(e?.dependencies?.[t]?.[n]).map((async r=>[await ls(r),[await ls(e?.dependencies?.[t]?.[n]?.[r].address),await ls(e?.dependencies?.[t]?.[n]?.[r].contract),await ls(e?.dependencies?.[t]?.[n]?.[r].fq_address),await ls(e?.dependencies?.[t]?.[n]?.[r].pin),await ls(String(e?.dependencies?.[t]?.[n]?.[r].pin_block_height))]])))])))]))),o=await Promise.all(Object.keys(e?.arguments).map((async t=>[await ls(t),[await ls(String(e?.arguments?.[t].index)),await ls(e?.arguments?.[t].type),await ls(e?.arguments?.[t].balance||""),await Promise.all(Object.keys(e?.arguments?.[t].messages).map((async n=>[await ls(n),await Promise.all(Object.keys(e?.arguments?.[t].messages?.[n].i18n).map((async r=>[await ls(r),await ls(e?.arguments?.[t].messages?.[n].i18n?.[r])])))])))]]))),a=pe([await ls("InteractionTemplate"),await ls("1.0.0"),await ls(e?.type),await ls(e?.interface),n,await ls(e?.cadence),r,o]).toString("hex");return ls(a)}throw new Error("generateTemplateId Error: Unsupported template version")}function fs(e){let{contractName:t,address:n}=e;return{contractName:t,address:n,contract:""}}function ps(e){let t=[],n=e.match(/import ((\w|,| )+)* from 0x\w+/g)||[];for(const e of n){const n=/import ((\w+|, |)*) from (0x\w+)/g.exec(e),r=/((?:\w+)+),?/g,o=n[1].match(r)||[];for(const e of o)t.push(fs({address:n[3],contractName:e.replace(/,/g,"")}))}return t}async function hs(e){let{address:t,contractName:n,blockHeight:r}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ur(null!=t,"generateDependencyPin({ address }) -- address must be defined"),Ur(null!=n,"generateDependencyPin({ contractName }) -- contractName must be defined"),Ur(null!=r,"generateDependencyPin({ blockHeight }) -- blockHeight must be defined"),Ur("string"==typeof t,"generateDependencyPin({ address }) -- address must be a string"),Ur("string"==typeof n,"generateDependencyPin({ contractName }) -- contractName must be a string"),Ur("number"==typeof r,"generateDependencyPin({ blockHeight }) -- blockHeight must be a number");let a=[fs({contractName:n,address:t})];for(const e of a){let t=await Lr([An(await ee().get(e.address,e.address)),$r(r)],o).then(Dr);if(e.contract=t.contracts?.[e.contractName],!e.contract)throw console.error("Did not find expected contract",e,t),new Error("Did not find expected contract");let n=ps(e.contract);a.push(...n)}let s=a.map((e=>ls(e.contract)));return ls(s.join(""))}async function gs(e){let{template:t,blockHeight:n,network:r}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ur(null!=t,"generateDependencyPin({ template }) -- template must be defined"),Ur("object"==typeof t,"generateDependencyPin({ template }) -- template must be an object"),Ur("InteractionTemplate"===t.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),t=ra(t),Ur(null!=r,"generateDependencyPin({ network }) network must be defined"),Ur(null!=n,"generateDependencyPin({ blockHeight }) blockHeight must be defined"),Ur("number"==typeof n,"generateDependencyPin({ blockHeight }) blockHeight must be a number"),"1.0.0"===t.f_version){let e=Object.keys(t.data.dependencies);for(let i of e){let e=t.data.dependencies[i],c=Object.keys(e);for(let e of c){let c=t.data.dependencies[i][e][r];if(void 0===c)continue;let u=await hs({address:c.address,contractName:c.contract,blockHeight:n},s);if(u!==c.pin)return a({title:"verifyDependencyPinsSame Debug Error",message:`Could not recompute and match dependency pin.\n address: ${c.address} | contract: ${c.contract}\n computed: ${u}\n template: ${c.pin}\n `,level:o.debug}),!1}}return!0}throw new Error("verifyDependencyPinsSame Error: Unsupported template version")}var ys=Object.freeze({__proto__:null,getInteractionTemplateAudits:async function(e){let{template:t,auditors:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ur(null!=t,"getInteractionTemplateAudits({ template }) -- template must be defined"),t=ra(t),Ur("InteractionTemplate"===t.f_type,"getInteractionTemplateAudits({ template }) -- template must be an InteractionTemplate");let s=await ds({template:t});if(s!==t.id)throw a({title:"getInteractionTemplateAudits Debug Error",message:`Could not recompute and match template ID\n computed: ${s}\n template: ${t.id}\n `,level:o.debug}),new Error("getInteractionTemplateAudits Error: Could not recompute and match template ID");if("1.0.0"===t.f_version){const e=n||await ee().get("flow.auditors");Ur(e,"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not set"),Ur(Array.isArray(e),"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not an array");let t=r.flowInteractionAuditContract;if(!t){const e=await ia(r);Ur("mainnet"===e||"testnet"===e,"getInteractionTemplateAudits Error: Unable to determine address for FlowInteractionTemplateAudit contract. Set configuration for 'fcl.network' to 'mainnet' or 'testnet'"),t="mainnet"===e?"0xfd100e39d50a13e6":"0xf78bfc12d0a786dc"}const o=await fa({cadence:`\n import FlowInteractionTemplateAudit from ${t}\n pub fun main(templateId: String, auditors: [Address]): {Address:Bool} {\n return FlowInteractionTemplateAudit.getHasTemplateBeenAuditedByAuditors(templateId: templateId, auditors: auditors)\n }\n `,args:(t,n)=>[t(s,n.String),t(e,n.Array(n.Address))]});return o}throw new Error("getInteractionTemplateAudits Error: Unsupported template version")},generateDependencyPin:hs,generateDependencyPinAtLatestSealedBlock:async function(e){let{address:t,contractName:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=await Mr({sealed:!0},r),a=o?.height;return hs({address:t,contractName:n,blockHeight:a},r)},generateTemplateId:ds,generateTemplateInterfaceId:async function(e){let{templateInterface:t}=e;if(Ur(null!=t,"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be defined"),Ur("object"==typeof t,"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be an object"),Ur("InteractionTemplateInterface"==typeof t.f_type,"generateTemplateInterfaceId({ templateInterface }) -- templateInterface object must be an InteractionTemplate"),t=function(e){if(null==e)return null;if("1.0.0"===e.f_version)return e;throw new Error("normalizeInteractionTemplateInterface Error: Invalid InteractionTemplateInterface")}(t),"1.0.0"===t.f_version){const e=t.data,n=pe([await ls("InteractionTemplateInterface"),await ls("1.0.0"),await ls(e.flip),await Promise.all(Object.keys(e.arguments).map((async t=>[await ls(t),await ls(String(e.arguments[t].index)),await ls(e.arguments[t].type)])))]).toString("hex");return ls(n)}throw new Error("generateTemplateInterfaceId Error: Unsupported templateInterface version")},verifyDependencyPinsSame:gs,verifyDependencyPinsSameAtLatestSealedBlock:async function(e){let{template:t,network:n}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=await Mr({sealed:!0}),a=o?.height;return gs({template:t,network:n,blockHeight:a},r)},deriveCadenceByNetwork:oa,getTemplateMessage:function(e){let{localization:t="en-US",messageKey:n,template:r}=e;Ur(n,"getTemplateMessage({ messageKey }) -- messageKey must be defined"),Ur("string"==typeof n,"getTemplateMessage({ messageKey }) -- messageKey must be a string"),Ur(t,"getTemplateMessage({ localization }) -- localization must be defined"),Ur("string"==typeof t,"getTemplateMessage({ localization }) -- localization must be a string"),Ur(null!=r,"getTemplateMessage({ template }) -- template must be defined"),Ur("object"==typeof r,"getTemplateMessage({ template }) -- template must be an object"),Ur("InteractionTemplate"==typeof r.f_type,"getTemplateMessage({ template }) -- template object must be an InteractionTemplate");const o=r?.data?.messages;return o?.[n]?.i18n?.[t]},getTemplateArgumentMessage:function(e){let{localization:t="en-US",argumentLabel:n,messageKey:r,template:o}=e;Ur(r,"getTemplateArgumentMessage({ messageKey }) -- messageKey must be defined"),Ur("string"==typeof r,"getTemplateArgumentMessage({ messageKey }) -- messageKey must be a string"),Ur(n,"getTemplateArgumentMessage({ argumentLabel }) -- argumentLabel must be defined"),Ur("string"==typeof r,"getTemplateArgumentMessage({ argumentLabel }) -- argumentLabel must be a string"),Ur(t,"getTemplateArgumentMessage({ localization }) -- localization must be defined"),Ur("string"==typeof t,"getTemplateArgumentMessage({ localization }) -- localization must be a string"),Ur(null!=o,"getTemplateArgumentMessage({ template }) -- template must be defined"),Ur("object"==typeof o,"getTemplateArgumentMessage({ template }) -- template must be an object"),Ur("InteractionTemplate"==typeof o.f_type,"getTemplateArgumentMessage({ template }) -- template object must be an InteractionTemplate");const a=o?.data?.arguments;return a?.[n]?.messages?.[r]?.i18n?.[t]}});const ms=Qo;function vs(e){return null==e?null:"1.0.0"===e.f_vsn?e:{old:e,...va,type:"frame",endpoint:e.endpoint,params:e.params||{},data:e.data||{}}}function ws(e){return null==e?null:"1.0.0"===e.f_vsn?e:{...va,type:"back-channel-rpc",endpoint:e.endpoint,method:e.method,params:e.params||{},data:e.data||{}}}function bs(e){return null==e?null:(null==e.method&&(e={...e,type:"local-view",method:"VIEW/IFRAME"}),"1.0.0"===e.f_vsn?e:{...va,type:e.type||"local-view",method:e.method,endpoint:e.endpoint,data:e.data||{},params:e.params||{}})}ee.subscribe((()=>{ia({enableRequestLogging:!1}).catch((()=>{}))}));const Es={"back-channel-rpc":ws,"pre-authz":function(e){return null==e?null:"1.0.0"===e.f_vsn?e:{...va,type:e.type,uid:e.id,endpoint:e.endpoint,method:e.method,identity:{...wa,address:be(e.addr),keyId:e.keyId},params:e.params,data:e.data}},authz:function(e){return null==e?null:"1.0.0"===e.f_vsn?e:{...va,type:e.type,uid:e.id,endpoint:e.endpoint,method:e.method,identity:{...wa,address:be(e.addr),keyId:e.keyId},params:e.params,data:e.data}},authn:function(e){return null==e?null:"1.0.0"===e.f_vsn?e:{...va,type:e.type,uid:e.id,endpoint:e.authn,id:e.pid,provider:{address:be(e.addr),name:e.name,icon:e.icon}}},frame:vs,"open-id":function(e){return null==e?null:"1.0.0"===e.f_vsn?e:null},"user-signature":function(e){if(null==e)return null;if("1.0.0"===e.f_vsn)return e;throw new Error("Invalid user-signature service")},"local-view":bs,"account-proof":function(e){if(null==e)return null;if("1.0.0"===e.f_vsn)return e;throw new Error("FCL Normalizer Error: Invalid account-proof service")},"authn-refresh":function(e){if(null==e)return null;if("1.0.0"===e.f_vsn)return e;throw new Error("Invalid authn-refresh service")}};function Is(e){return pe([e.provider.address||e.provider.name||"UNSPECIFIED",e.id]).toString("hex")}async function Ss(e){var t=function(){return[...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]]}((e=function(e){return e.addr=e.addr?be(e.addr):null,e.paddr=e.paddr?be(e.paddr):null,e}(e)).services||[],await async function(e,t){if(null==e||null==t)return[];const n=new ya(e);n.searchParams.append("code",t);const r=await fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}).then((e=>e.json()));if(Array.isArray(r))return r;const o=[];if(Array.isArray(r.authorizations))for(let e of r.authorizations)o.push({type:"authz",keyId:r.keyId,...e});return null!=r.provider&&o.push({type:"authn",id:"wallet-provider#authn",...r.provider}),o}(e.hks,e.code)).map((t=>function(e,t){try{return Es[e.type](e,t)}catch(t){return console.error(`Unrecognized FCL Service Type [${e.type}]`,e,t),e}}(t,e)));const n=function(e,t){return t.find((t=>t.type===e))}("authn",t);return{...ba,addr:be(e.addr),cid:Is(n),loggedIn:!0,services:t,expiresAt:e.expires}}function As(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((t=>t.type===e))}async function ks(e){let{service:n,msg:r={},config:i={},opts:c={},platform:u}=e;r.data=n.data;const l={services:await Oa(/^service\./),app:await Oa(/^app\.detail\./),client:{...i.client,platform:u,fclVersion:t,fclLibrary:"https://github.com/onflow/fcl-js",hostname:window?.location?.hostname??null,network:await ia(c)}};try{const e=await(async e=>{let{service:t,body:n,config:r,opts:o}=e;return es().getStrategy(t.method)({service:t,body:n,config:r,opts:o})})({service:n,body:r,config:l,opts:c});return"REDIRECT"===e.status?(s(n.type===e.data.type,"Cannot shift recursive service type in execService"),await ks({service:e.data,msg:r,config:l,opts:c})):e}catch(e){throw a({title:`Error on execService ${n?.type}`,message:e,level:o.error}),e}}function Rs(e){return null==e?null:"1.0.0"===e.f_vsn?e:{...Ia,addr:we(e.addr||e.address),signature:e.signature||e.sig,keyId:e.keyId}}const Ts="CURRENT_USER",xs="CURRENT_USER/UPDATED",Ps="SNAPSHOT",_s="SET_CURRENT_USER",Cs="DEL_CURRENT_USER",Os='{\n "f_type": "User",\n "f_vsn": "1.0.0",\n "addr":null,\n "cid":null,\n "loggedIn":null,\n "expiresAt":null,\n "services":[]\n}',Bs={[f]:async e=>{"undefined"==typeof window&&console.warn('\n %cFCL Warning\n ============================\n "currentUser" is only available in the browser.\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n ',"font-weight:bold;font-family:monospace;"),e.merge(JSON.parse(Os));const t=await ee.first(["fcl.storage","fcl.storage.default"]);if(t.can){const n=await(async e=>{const t=JSON.parse(Os),n=await e.get(Ts);return null!=n&&t.f_vsn!==n.f_vsn?(e.removeItem(Ts),t):n||t})(t);(function(e){return null==e.expiresAt||0===e.expiresAt||e.expiresAt>Date.now()})(n)&&e.merge(n)}},[p]:(e,t)=>{e.subscribe(t.from),e.send(t.from,xs,{...e.all()})},[h]:(e,t)=>{e.unsubscribe(t.from)},[Ps]:async(e,t)=>{t.reply({...e.all()})},[_s]:async(e,t,n)=>{e.merge(n);const r=await ee.first(["fcl.storage","fcl.storage.default"]);r.can&&r.put(Ts,e.all()),e.broadcast(xs,{...e.all()})},[Cs]:async(e,t)=>{e.merge(JSON.parse(Os));const n=await ee.first(["fcl.storage","fcl.storage.default"]);n.can&&n.put(Ts,e.all()),e.broadcast(xs,{...e.all()})}},Ns=()=>E(Bs,Ts),Us=async e=>{let{discoveryAuthnInclude:t}=e;return{client:{discoveryAuthnInclude:t,clientServices:await ns(),supportedStrategies:es().getStrategies()}}},Ls=e=>{let{platform:t}=e;return async function(){let{service:e,redir:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e||e?.provider?.is_installed||!e?.provider?.requires_install)return new Promise((async(r,i)=>{Ns();const c={redir:n},u=await $s(),l=await async function(e){const t=await ee.get("discovery.authn.include",[]),n=await ee.first(["discovery.wallet.method","discovery.wallet.method.default"]),r=e?.method?e.method:n,o=e?.endpoint??await ee.first(["discovery.wallet","challenge.handshake"]);return s(o,'\n If no service is passed to "authenticate," then "discovery.wallet" must be defined in fcl config.\n See: "https://docs.onflow.org/fcl/reference/api/#setting-configuration-values"\n '),{...e,type:"authn",endpoint:o,method:r,discoveryAuthnInclude:t}}(e),d=As(u.services,"authn-refresh");let f;if(u.loggedIn){if(!d)return r(u);try{const e=await ks({service:d,msg:f,opts:c,platform:t});b(Ts,_s,await Ss(e))}catch(e){a({title:`${e.name} Could not refresh wallet authentication.`,message:e.message,level:o.error})}finally{return r(await $s())}}try{f=await async function(){let e=await ee.get("fcl.accountProof.resolver");if(null==e)return;if("function"!=typeof e)return void a({title:"Account Proof Data Resolver must be a function",message:`Check fcl.accountProof.resolver configuration.\n Expected: fcl.accountProof.resolver: async () => { ... }\n Received: fcl.accountProof.resolver: ${typeof e}\n `,level:o.warn});const t=await e();return null!=t?(s("string"==typeof t.appIdentifier,"appIdentifier must be a string"),s(/^[0-9a-f]+$/i.test(t.nonce),"Nonce must be a hex string"),t):void 0}()}catch(e){return a({title:`${e.name} On Authentication: Could not resolve account proof data.`,message:e.message,level:o.error}),i(e)}try{const e=await ks({service:l,msg:f,config:await Us(l),opts:c,platform:t});b(Ts,_s,await Ss(e))}catch(e){a({title:`${e} On Authentication`,message:e,level:o.error})}finally{r(await $s())}}));window.location.href=e?.provider?.install_link}};function Ds(){Ns(),b(Ts,Cs)}const Fs=e=>{let{platform:t}=e;return async e=>(Ns(),{...e,tempId:"CURRENT_USER",async resolve(e,n){const r=await Ls({platform:t})({redir:!0}),o=As(r.services,"authz"),a=As(r.services,"pre-authz");if(a)return(e=>{let{platform:t}=e;return e=>{const n=(e=>({f_type:"PreAuthzResponse",f_vsn:"1.0.0",proposer:(e||{}).proposer,payer:(e||{}).payer||[],authorization:(e||{}).authorization||[]}))(e),r=[];null!=n.proposer&&r.push(["PROPOSER",n.proposer]);for(let e of n.payer||[])r.push(["PAYER",e]);for(let e of n.authorization||[])r.push(["AUTHORIZER",e]);return r.map((e=>{let[n,r]=e;return{tempId:[r.identity.address,r.identity.keyId].join("|"),addr:r.identity.address,keyId:r.identity.keyId,signingFunction:e=>ks({service:r,msg:e,platform:t}),role:{proposer:"PROPOSER"===n,payer:"PAYER"===n,authorizer:"AUTHORIZER"===n}}}))}})({platform:t})(await ks({service:a,msg:n,platform:t}));if(o){let n;return ua()&&"WC/RPC"===o.method&&(n=window.open("","_blank")),{...e,tempId:"CURRENT_USER",resolve:null,addr:we(o.identity.address),keyId:o.identity.keyId,sequenceNum:null,signature:null,signingFunction:async e=>Rs(await ks({service:o,msg:e,opts:{includeOlderJsonRpcCall:!0,windowRef:n},platform:t}))}}throw new Error("No Authz or PreAuthz Service configured for CURRENT_USER")}})};function js(e){Ns();const t="@EXIT",n=E((async n=>{for(n.send(Ts,p);;){const r=await n.receive();if(r.tag===t)return void n.send(Ts,h);e(r.data)}}));return()=>b(n,t)}function $s(){return Ns(),b(Ts,Ps,null,{expectReply:!0,timeout:0})}const Gs=e=>{let{platform:t}=e;return async()=>{const{addr:e}=await Ls({platform:t})();return Yr(be(e),Vo)}},Ms=e=>(s(/^[0-9a-f]+$/i.test(e),"Message must be a hex string"),{message:e}),zs=e=>{let{platform:t}=e;return async e=>{Ns();const n=As((await Ls({platform:t})({redir:!0})).services,"user-signature");s(n,"Current user must have authorized a signing service.");try{const r=await ks({service:n,msg:Ms(e),platform:t});return Array.isArray(r)?r.map((e=>Rs(e))):[Rs(r)]}catch(e){return e}}},qs=e=>{let{platform:t}=e,n=()=>({authenticate:Ls({platform:t}),unauthenticate:Ds,authorization:Fs({platform:t}),signUserMessage:zs({platform:t}),subscribe:js,snapshot:$s,resolveArgument:Gs({platform:t})});return n.authenticate=Ls({platform:t}),n.unauthenticate=Ds,n.authorization=Fs({platform:t}),n.signUserMessage=zs({platform:t}),n.subscribe=js,n.snapshot=$s,n.resolveArgument=Gs({platform:t}),n},Hs="FCL_IFRAME",Ks="\n position:fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n height: 100%;\n width: 100vw;\n display:block;\n background:rgba(0,0,0,0.25);\n z-index: 2147483647;\n box-sizing: border-box;\n color-scheme: light;\n";function Ws(e){s(!document.getElementById(Hs),"Attempt at triggering multiple Frames",{src:e});const t=document.createElement("iframe");return t.src=e,t.id=Hs,t.allow="usb *; hid *",t.frameBorder="0",t.style.cssText=Ks,document.body.append(t),[t.contentWindow,()=>{document.getElementById(Hs)&&document.getElementById(Hs).remove()}]}const Vs="FCL_POP";let Ys=null,Js=null;function Xs(e){return null==Ys||Ys?.closed?Ys=function(e,t,n,r,o){const a=n.top.outerHeight/2+n.top.screenY-o/2,s=n.top.outerWidth/2+n.top.screenX-r/2,i=n.open(e,t,`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${r}, height=${o}, top=${a}, left=${s}`);if(!i)throw new Error("Popup failed to open (was it blocked by a popup blocker?)");return i}(e,Vs,window,640,770):Js!==e?(Ys.location.replace(e),Ys.focus()):Ys.focus(),Js=e,[Ys,()=>{Ys&&!Ys.closed&&Ys.close(),Ys=null}]}let Zs=null,Qs=null;function ei(e){if(null==Zs||Zs?.closed){if(Zs=window.open(e,"_blank"),!Zs)throw new Error("Tab failed to open (was it blocked by the browser?)")}else Qs!==e?(Zs.location.replace(e),Zs.focus()):Zs.focus();return Qs=e,[Zs,()=>{Zs&&!Zs.closed&&Zs.close(),Zs=null}]}const ti=()=>{try{const e={can:!("undefined"==typeof window),get:async e=>JSON.parse(sessionStorage.getItem(e)),put:async(e,t)=>sessionStorage.setItem(e,JSON.stringify(t))};return e}catch(e){return null}};function ni(e){const t=new ya(e.endpoint);if(window?.location?.origin&&t.searchParams.append("l6n",window.location.origin),null!=e.params)for(let[n,r]of Object.entries(e.params||{}))t.searchParams.append(n,r);return t}function ri(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.method||"POST",r="GET"===n?void 0:JSON.stringify(t.data||e.data||{});return fetch(ni(e),{method:n,headers:{...e.headers||{},...t.headers||{},"Content-Type":"application/json"},body:r}).then((e=>e.json()))}function oi(e){return null==e?null:"1.0.0"===e.f_vsn?e:{...Ea,status:e.status??"APPROVED",reason:e.reason??null,data:e.compositeSignature||e.data||{...e}||{},updates:ws(e.authorizationUpdates),local:vs((e.local||[])[0])}}const ai={"HTTP/GET":"GET","HTTP/POST":"POST"},si=e=>(s(ai[e.method],"Invalid Service Method for type back-channel-rpc",{service:e}),ai[e.method]);async function ii(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;if(s(e,"Missing Polling Service",{service:e}),!n())throw new Error("Externally Halted");try{if("undefined"!=typeof document&&"hidden"===document.visibilityState)return await new Promise((e=>setTimeout(e,500))),ii(e,n);t=await ri(e,{method:si(e)}).then(oi)}catch(e){throw e}switch(t.status){case"APPROVED":return t.data;case"DECLINED":throw new Error(`Declined: ${t.reason||"No reason supplied."}`);default:return await new Promise((e=>setTimeout(e,500))),ii(t.updates,n)}}const ci=e=>async n=>{let{service:r,body:o,config:a,opts:s}=n;const i=await ri(r,{data:{fclVersion:t,service:{params:r.params,data:r.data,type:r.type},config:a,...o}}).then(oi);if("APPROVED"===i.status)return i.data;if("DECLINED"===i.status)throw new Error(`Declined: ${i.reason||"No reason supplied."}`);if("REDIRECT"===i.status)return i;if("PENDING"===i.status){var c=!0,u=!0;const[t,n]=await e(bs(i.local),{serviceEndpoint:ni,onClose:()=>u=!1}),r=()=>{try{n(),u=!1}catch(e){console.error("Frame Close Error",e)}},o=()=>{const e=c;return c=u,e};return ii(i.updates,o).then((e=>(r(),e))).catch((e=>{throw console.error(e),r(),e}))}throw console.error("Auto Decline: Invalid Response",{service:r,resp:i}),new Error("Auto Decline: Invalid Response")};var ui="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",li=ui.length;function di(){for(var e="",t=32;t--;)e+=ui[Math.random()*li|0];return e}const fi="FCL:VIEW:CLOSE",pi="FCL:VIEW:READY",hi="FCL:VIEW:RESPONSE",gi=e=>"string"==typeof e&&e.toLowerCase(),yi=new Set(["monetizationstart","monetizationpending","monetizationprogress","monetizationstop"]),mi=(e,t)=>console.warn("DEPRECATION NOTICE",`Received ${e}, please use ${t} for this and future versions of FCL`),vi=e=>{let{close:t,send:n,onReady:r,onResponse:o,onMessage:a}=e;return e=>{try{if("object"!=typeof e.data)return;if(yi.has(e.data.type))return;gi(e.data.type)===gi(fi)&&t(),gi(e.data.type)===gi(pi)&&r(e,{send:n,close:t}),gi(e.data.type)===gi(hi)&&o(e,{send:n,close:t}),a(e,{send:n,close:t}),gi(e.data.type)===gi("FCL:FRAME:READY")&&(mi(e.data.type,pi),r(e,{send:n,close:t})),gi(e.data.type)===gi("FCL:FRAME:RESPONSE")&&(mi(e.data.type,hi),o(e,{send:n,close:t})),gi(e.data.type)===gi("FCL:FRAME:CLOSE")&&(mi(e.data.type,fi),t()),gi(e.data.type)===gi("FCL::CHALLENGE::RESPONSE")&&(mi(e.data.type,hi),o(e,{send:n,close:t})),gi(e.data.type)===gi("FCL::AUTHZ_READY")&&(mi(e.data.type,pi),r(e,{send:n,close:t})),gi(e.data.type)===gi("FCL::CHALLENGE::CANCEL")&&(mi(e.data.type,fi),t()),gi(e.data.type)===gi("FCL::CANCEL")&&(mi(e.data.type,fi),t())}catch(e){console.error("Frame Callback Error",e),t()}}},wi=()=>{},bi=()=>{},Ei=()=>{},Ii=()=>{},Si=()=>{throw new Error("Strategy util has not been implemented on this platform")},Ai={"VIEW/IFRAME":Ws,"VIEW/POP":Xs,"VIEW/TAB":ei,"VIEW/MOBILE_BROWSER":Si,"VIEW/DEEPLINK":Si};async function ki(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{serviceEndpoint:()=>{}};const{serviceEndpoint:n}=t;try{return Ai[e.method](n(e),t)}catch(n){throw console.error("execLocal({service, opts = {}})",n,{service:e,opts:t}),n}}const Ri={[pa["HTTP/RPC"]]:ci(ki),[pa["HTTP/POST"]]:ci(ki),[pa["IFRAME/RPC"]]:function(e){let{service:n,body:r,config:o,opts:a}=e;return new Promise(((e,s)=>{const i=di(),c=a.includeOlderJsonRpcCall;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:wi,close:wi};const n=t.onClose||wi,r=t.onMessage||wi,o=t.onReady||wi,a=t.onResponse||wi,s=vi({close:u,send:l,onReady:o,onResponse:a,onMessage:r});window.addEventListener("message",s);const[i,c]=Ws(ni(e));return{send:l,close:u};function u(){try{window.removeEventListener("message",s),c(),n()}catch(e){console.error("Frame Close Error",e)}}function l(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Frame Send Error",e,t)}}}(n,{async onReady(e,a){let{send:s}=a;try{s({type:"FCL:VIEW:READY:RESPONSE",fclVersion:t,body:r,service:{params:n.params,data:n.data,type:n.type},config:o}),s({fclVersion:t,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),c&&s({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params],deprecated:{message:"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}})}catch(e){throw e}},onResponse(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;const n=oi(t.data);switch(n.status){case"APPROVED":e(n.data),r();break;case"DECLINED":s(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:s("Declined: No reason supplied"),r()}}catch(e){throw console.error("execIframeRPC onResponse error",e),e}},onMessage(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;if("2.0"!==t.data.jsonrpc)return;if(t.data.id!==i)return;const n=oi(t.data.result);switch(n.status){case"APPROVED":e(n.data),r();break;case"DECLINED":s(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:s("Declined: No reason supplied"),r()}}catch(e){throw console.error("execIframeRPC onMessage error",e),e}},onClose(){s("Declined: Externally Halted")}})}))},[pa["POP/RPC"]]:function(e){let{service:n,body:r,config:o,opts:a}=e;return new Promise(((e,s)=>{const i=di(),{redir:c,includeOlderJsonRpcCall:u}=a;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:bi,close:bi};const n=t.onClose||bi,r=t.onMessage||bi,o=t.onReady||bi,a=t.onResponse||bi,s=vi({close:l,send:d,onReady:o,onResponse:a,onMessage:r});window.addEventListener("message",s);const[i,c]=Xs(ni(e)),u=setInterval((function(){i&&i.closed&&l()}),500);return{send:d,close:l};function l(){try{window.removeEventListener("message",s),clearInterval(u),c(),n()}catch(e){console.error("Popup Close Error",e)}}function d(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Popup Send Error",e,t)}}}(n,{async onReady(e,a){let{send:s}=a;try{s({fclVersion:t,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o}),s({fclVersion:t,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&s({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]})}catch(e){throw e}},onResponse(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;const n=oi(t.data);switch(n.status){case"APPROVED":e(n.data),!c&&r();break;case"DECLINED":s(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:s("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;if("2.0"!==t.data.jsonrpc)return;if(t.data.id!==i)return;const n=oi(t.data.result);switch(n.status){case"APPROVED":e(n.data),!c&&r();break;case"DECLINED":s(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:s("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose(){s("Declined: Externally Halted")}})}))},[pa["TAB/RPC"]]:function(e){let{service:n,body:r,config:o,opts:a}=e;return new Promise(((e,s)=>{const i=di(),{redir:c,includeOlderJsonRpcCall:u}=a;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:Ei,close:Ei};const n=t.onClose||Ei,r=t.onMessage||Ei,o=t.onReady||Ei,a=t.onResponse||Ei,s=vi({close:l,send:d,onReady:o,onResponse:a,onMessage:r});window.addEventListener("message",s);const[i,c]=ei(ni(e)),u=setInterval((function(){i&&i.closed&&l()}),500);return{send:d,close:l};function l(){try{window.removeEventListener("message",s),clearInterval(u),c(),n()}catch(e){console.error("Tab Close Error",e)}}function d(e){try{i.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Tab Send Error",e,t)}}}(n,{async onReady(e,a){let{send:s}=a;try{s({fclVersion:t,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o}),s({fclVersion:t,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),u&&s({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]})}catch(e){throw e}},onResponse(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;const n=oi(t.data);switch(n.status){case"APPROVED":e(n.data),!c&&r();break;case"DECLINED":s(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:s("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onResponse error",e),e}},onMessage(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;if("2.0"!==t.data.jsonrpc)return;if(t.data.id!==i)return;const n=oi(t.data.result);switch(n.status){case"APPROVED":e(n.data),!c&&r();break;case"DECLINED":s(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:s("Declined: No reason supplied"),r()}}catch(e){throw console.error("execPopRPC onMessage error",e),e}},onClose(){s("Declined: Externally Halted")}})}))},[pa["EXT/RPC"]]:function(e){let{service:n,body:r,config:o,opts:a}=e;return new Promise(((e,a)=>{!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e)return{send:Ii,close:Ii};const n=t.onClose||Ii,r=t.onMessage||Ii,o=t.onReady||Ii,a=t.onResponse||Ii,s=vi({close:i,send:c,onReady:o,onResponse:a,onMessage:r});return window.addEventListener("message",s),c({service:e}),{send:c,close:i};function i(){try{window.removeEventListener("message",s),n()}catch(e){console.error("Ext Close Error",e)}}function c(e){try{window&&window.postMessage(JSON.parse(JSON.stringify(e||{})),"*")}catch(t){console.error("Ext Send Error",e,t)}}}(n,{async onReady(e,a){let{send:s}=a;try{s({fclVersion:t,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:o})}catch(e){throw e}},onResponse(t,n){let{close:r}=n;try{if("object"!=typeof t.data)return;const n=oi(t.data);switch(n.status){case"APPROVED":e(n.data),r();break;case"DECLINED":a(`Declined: ${n.reason||"No reason supplied"}`),r();break;case"REDIRECT":e(n),r();break;default:a("Declined: No reason supplied"),r()}}catch(e){throw console.error("execExtRPC onResponse error",e),e}},onClose(){a("Declined: Externally Halted")}})}))}},Ti=(e=>{let{platform:t}=e;return async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{await async function(e){return da("mutate",e)}(e),e=await la(e);const n=qs({platform:t}),r=await ee().get("fcl.authz",n().authorization);return ee().overload(e.dependencies||{},(async()=>Lr([to(e.cadence),Vr(ea(e.args||[])),e.limit&&po(e.limit)&&Wr(e.limit),Jr(e.proposer||e.authz||r),Xr(e.payer||e.authz||r),zr(e.authorizations||[e.authz||r])]).then(Dr)))}catch(e){throw e}}})({platform:"web"}),xi=qs({platform:"web"}),Pi=xi().authorization;ee({"discovery.wallet.method.default":"IFRAME/RPC","fcl.storage.default":ti()}),Qa({coreStrategies:Ri}),e.AppUtils=_a,e.InteractionTemplateUtils=ys,e.TestUtils=so,e.VERSION=t,e.WalletUtils=Ra,e.account=function(e){let{height:t,id:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return s(!(n&&t),'Method: account -- Cannot pass "id" and "height" simultaneously'),n?Lr([An(e),Gr(n)],r).then(Cn):t?Lr([An(e),$r(t)],r).then(Cn):Lr([An(e)],r).then(Cn)},e.arg=Yr,e.args=Vr,e.atBlockHeight=$r,e.atBlockId=Gr,e.authenticate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xi().authenticate(e)},e.authorization=function(e,t,n,r){return{addr:e,signingFunction:t,keyId:n,sequenceNum:r}},e.authorizations=zr,e.authz=Pi,e.block=Mr,e.build=En,e.cadence=Ze,e.cdc=Ze,e.config=ee,e.createSignableVoucher=kr,e.currentUser=xi,e.decode=Dr,e.discovery=us,e.display=function(e){return be(e)},e.events=function(e){return{subscribe:t=>I(e,Ha,t)}},e.getAccount=An,e.getBlock=Sn,e.getBlockHeader=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return gn([Vt,t=>(t.block.isSealed=e,Bt(t))])},e.getChainId=ia,e.getCollection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return gn([Yt,t=>(t.collection.id=e,t)])},e.getEvents=function(e,t,n){return void 0===t&&void 0===n||a.deprecate({pkg:"FCL/SDK",subject:"Passing a start and end into getEvents",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder"}),gn([Ht,r=>(r.events.eventType=e,r.events.start=t,r.events.end=n,Bt(r))])},e.getEventsAtBlockHeightRange=qr,e.getEventsAtBlockIds=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return gn([Ht,n=>(n.events.eventType=e,n.events.blockIds=t,Bt(n))])},e.getNetworkParameters=Kr,e.getTransaction=function(e){return gn([zt,t=>(t.transaction.id=e,Bt(t))])},e.getTransactionStatus=Hr,e.invariant=Ur,e.isBad=fn,e.isOk=dn,e.limit=Wr,e.logIn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xi().authenticate(e)},e.mutate=Ti,e.param=e=>a.deprecate({pkg:"FCL/SDK",message:"The param builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:o.error}),e.params=e=>a.deprecate({pkg:"FCL/SDK",message:"The params builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:o.error}),e.payer=Xr,e.ping=function(){return Kt},e.pipe=gn,e.pluginRegistry=ts,e.proposer=Jr,e.query=fa,e.reauthenticate=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xi().unauthenticate(),xi().authenticate(e)},e.ref=Zr,e.sansPrefix=we,e.script=Qr,e.send=Lr,e.serialize=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await ee.first(["sdk.resolve"],t.resolve||Nr);return Array.isArray(e)&&(e=await gn(St(),e)),JSON.stringify(kr(await n(e)),null,2)},e.signUp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xi().authenticate(e)},e.t=ms,e.transaction=to,e.tx=$a,e.unauthenticate=()=>xi().unauthenticate(),e.validator=jr,e.verifyUserSignatures=Ca,e.voucherIntercept=function(e){return vn("ix.voucher-intercept",e)},e.voucherToTxId=e=>(e=>er(Qn(ar(e))))(e),e.why=pn,e.withPrefix=be,Object.defineProperty(e,"__esModule",{value:!0})}(t)},28599:e=>{"use strict";const{AbortController:t,AbortSignal:n}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=n,e.exports.default=t}}]); \ No newline at end of file diff --git a/negotiator-ea85034672840bab63bd.js.LICENSE.txt b/negotiator-ea85034672840bab63bd.js.LICENSE.txt new file mode 100644 index 00000000..e87ebfc1 --- /dev/null +++ b/negotiator-ea85034672840bab63bd.js.LICENSE.txt @@ -0,0 +1,10 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ diff --git a/negotiator.js b/negotiator.js index 9138ac4f..ef0e9c78 100644 --- a/negotiator.js +++ b/negotiator.js @@ -1,2 +1,2 @@ /*! For license information please see negotiator.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.negotiator=t():e.negotiator=t()}(self,(()=>(()=>{var e,t,r,n,i={10536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ownable__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];t.Ownable__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},76950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ownable__factory=void 0;var n=r(10536);Object.defineProperty(t,"Ownable__factory",{enumerable:!0,get:function(){return n.Ownable__factory}})},75114:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.token=t.access=void 0,t.access=o(r(76950)),t.token=o(r(99377))},92657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERC20__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],o="0x6080604052346200031d5762001095803803806200001d8162000322565b9283398101906040818303126200031d5780516001600160401b03908181116200031d57836200004f91840162000348565b91602093848201518381116200031d576200006b920162000348565b82518281116200021d576003918254916001958684811c9416801562000312575b88851014620002fc578190601f94858111620002a6575b5088908583116001146200023f5760009262000233575b505060001982861b1c191690861b1783555b80519384116200021d5760049586548681811c9116801562000212575b82821014620001fd57838111620001b2575b508092851160011462000144575093839491849260009562000138575b50501b92600019911b1c19161790555b604051610cda9081620003bb8239f35b01519350388062000118565b92919084601f1981168860005285600020956000905b898383106200019757505050106200017c575b50505050811b01905562000128565b01519060f884600019921b161c19169055388080806200016d565b8587015189559097019694850194889350908101906200015a565b87600052816000208480880160051c820192848910620001f3575b0160051c019087905b828110620001e6575050620000fb565b60008155018790620001d6565b92508192620001cd565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000e9565b634e487b7160e01b600052604160045260246000fd5b015190503880620000ba565b90889350601f19831691876000528a6000209260005b8c8282106200028f575050841162000276575b505050811b018355620000cc565b015160001983881b60f8161c1916905538808062000268565b8385015186558c9790950194938401930162000255565b90915085600052886000208580850160051c8201928b8610620002f2575b918a91869594930160051c01915b828110620002e2575050620000a3565b600081558594508a9101620002d2565b92508192620002c4565b634e487b7160e01b600052602260045260246000fd5b93607f16936200008c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200021d57604052565b919080601f840112156200031d5782516001600160401b0381116200021d576020906200037e601f8201601f1916830162000322565b928184528282870101116200031d5760005b818110620003a657508260009394955001015290565b85810183015184820184015282016200039056fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461075657508163095ea7b31461070e57816318160ddd146106d157816323b872dd146105a3578163313ce5671461056957816339509351146104bf57816370a082311461045e57816395d89b4114610268578163a457c2d71461016257508063a9059cbb146101145763dd62ed3e1461009e57600080fd5b3461011057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011057806020926100d86108fe565b6100e0610926565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461011057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101105760209061015b6101516108fe565b6024359033610949565b5160018152f35b9050823461026557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102655761019b6108fe565b918360243592338152600160205281812073ffffffffffffffffffffffffffffffffffffffff861682526020522054908282106101e25760208561015b8585038733610b58565b60849060208651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b80fd5b83833461011057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011057805190828454600181811c90808316928315610454575b60209384841081146104285783885287959493929181156103cd5750600114610351575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff8411838510176103255750829182610321925282610898565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106103b757505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936102d3565b805488850187015287945092850192810161037c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06102d3565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916102af565b5050346101105760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110578060209273ffffffffffffffffffffffffffffffffffffffff6104b06108fe565b16815280845220549051908152f35b82843461026557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610265576104f76108fe565b338252600160205282822073ffffffffffffffffffffffffffffffffffffffff821683526020528282205491602435830180931161053d5760208461015b858533610b58565b806011867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b50503461011057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110576020905160128152f35b839150346101105760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110576105dd6108fe565b6105e5610926565b91846044359473ffffffffffffffffffffffffffffffffffffffff8416815260016020528181203382526020522054907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361064b575b60208661015b878787610949565b84821061067457509183916106696020969561015b95033383610b58565b91939481935061063d565b60649060208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b50503461011057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110576020906002549051908152f35b50503461011057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101105760209061015b61074c6108fe565b6024359033610b58565b8490843461089457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108945782600354600181811c9080831692831561088a575b60209384841081146104285783885287959493929181156103cd575060011461080d5750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff8411838510176103255750829182610321925282610898565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061087457505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936102d3565b8054888501870152879450928501928101610839565b91607f169161079c565b8280fd5b60208082528251818301819052939260005b8581106108ea575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8181018301518482016040015282016108aa565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361092157565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361092157565b73ffffffffffffffffffffffffffffffffffffffff809116918215610ad45716918215610a50576000828152806020526040812054918083106109cc57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215610c4a5716918215610bc65760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.ERC20__factory=f},28045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];t.IERC20__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},38518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Metadata__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];t.IERC20Metadata__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},17547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Permit__factory=void 0;const n=r(86623),i=[{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"}];t.IERC20Permit__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},79891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Permit__factory=void 0;var n=r(17547);Object.defineProperty(t,"IERC20Permit__factory",{enumerable:!0,get:function(){return n.IERC20Permit__factory}})},29115:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Metadata__factory=t.draftIerc20PermitSol=void 0,t.draftIerc20PermitSol=o(r(79891));var f=r(38518);Object.defineProperty(t,"IERC20Metadata__factory",{enumerable:!0,get:function(){return f.IERC20Metadata__factory}})},61701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20__factory=t.ERC20__factory=t.extensions=void 0,t.extensions=o(r(29115));var f=r(92657);Object.defineProperty(t,"ERC20__factory",{enumerable:!0,get:function(){return f.ERC20__factory}});var a=r(28045);Object.defineProperty(t,"IERC20__factory",{enumerable:!0,get:function(){return a.IERC20__factory}})},99377:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.erc20=void 0,t.erc20=o(r(61701))},27349:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.contracts=void 0,t.contracts=o(r(75114))},19530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAS__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract ISchemaRegistry",name:"registry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"AlreadyRevoked",type:"error"},{inputs:[],name:"AlreadyRevokedOffchain",type:"error"},{inputs:[],name:"AlreadyTimestamped",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidAttestation",type:"error"},{inputs:[],name:"InvalidAttestations",type:"error"},{inputs:[],name:"InvalidExpirationTime",type:"error"},{inputs:[],name:"InvalidLength",type:"error"},{inputs:[],name:"InvalidOffset",type:"error"},{inputs:[],name:"InvalidRegistry",type:"error"},{inputs:[],name:"InvalidRevocation",type:"error"},{inputs:[],name:"InvalidRevocations",type:"error"},{inputs:[],name:"InvalidSchema",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidVerifier",type:"error"},{inputs:[],name:"Irrevocable",type:"error"},{inputs:[],name:"NotFound",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"WrongSchema",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Attested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"revoker",type:"address"},{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"RevokedOffchain",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"Timestamped",type:"event"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"}],internalType:"struct AttestationRequest",name:"request",type:"tuple"}],name:"attest",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct DelegatedAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttestation",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"revoker",type:"address"},{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getSchemaRegistry",outputs:[{internalType:"contract ISchemaRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"isAttestationValid",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiAttestationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiAttest",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct MultiDelegatedAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiRevocationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiRevoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct MultiDelegatedRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"}],internalType:"struct RevocationRequest",name:"request",type:"tuple"}],name:"revoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct DelegatedRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"revokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"timestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"}],o="0x610160346200030457601f19906001600160401b0390601f62004c8938819003918201851683019184831184841017620003095780849260409485528339602093849181010312620003045751916001600160a01b0383168084036200030457818351966200006e886200031f565b60038852818801966245415360e81b885285516200008c816200031f565b6004958187809352019863302e323760e01b8a528a5190209820988860e05261010099808b524660a0528751858101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9b8c84528a83015260608201524660808201523060a082015260a0815260c0810181811085821117620002ef5789525190206080523060c0526101209889528051918211620002da576000938454916001928381811c91168015620002cf575b83821014620002bc57601f811162000271575b5081601f85116001146200020b5750839450908392918694620001ff575b50501b916000199060031b1c19161790555b15620001f15750610140918252519161494d93846200033c8539608051846143dc015260a05184614497015260c051846143ad015260e0518461442b01525183614451015251826144080152518181816102a901528181611e660152818161268e01528181612d9a01526130180152f35b90516311a1e69760e01b8152fd5b0151925038806200016e565b9294849081168780528488209488905b888383106200025657505050106200023c575b505050811b01905562000180565b015160001960f88460031b161c191690553880806200022e565b8587015188559096019594850194879350908101906200021b565b868052828720601f860160051c810191848710620002b1575b601f0160051c019084905b828110620002a557505062000150565b88815501849062000295565b90915081906200028a565b634e487b7160e01b875260228952602487fd5b90607f16906200013d565b604186634e487b7160e01b6000525260246000fd5b604189634e487b7160e01b6000525260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b03821117620003095760405256fe61016060406101405280610140515260048036101561001d57600080fd5b600091823560e01c90816312b11a171461118d5750806313893f611461110557806317d7de7c14610fe25780632d0335ab14610f7a57806344adc90e14610e715780634692626714610e125780634cb7e9e514610d095780634d00307014610cc0578063831e05a114610a71578063a3112a6414610a07578063b469318d14610987578063b83010d31461092c578063cf190f34146108e2578063d45c44351461088c578063e13458fc14610790578063e30bb56314610739578063e45d03f9146104b1578063e57a6b1b1461039b578063e71ff36514610310578063ed24911d146102cd578063f10b5cc81461025c578063f17325e7146101ae5763ffa1ad741461012857600080fd5b346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5761014051516101a6916101688261141f565b81527f302e3237000000000000000000000000000000000000000000000000000000006020820152610140515191829160208352602083019061123e565b0390f35b5080fd5b50907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020823601126102595782359267ffffffffffffffff84116101aa578301916101405190843603011261025957602061024e8161024786866102296102156114eb565b92610224602436920184611553565b6115d6565b61023283611586565b5261023c82611586565b503491339135611df1565b0151611586565b516101405151908152f35b80fd5b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610259576020610140515173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610259576020610306614396565b6101405151908152f35b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803567ffffffffffffffff918282116103975761035f913691016111e5565b90914216925b818110610379576020846101405151908152f35b806103918561038b6001948688611a39565b356141be565b01610365565b8380fd5b5060e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576101405151906103d58261139c565b358082526103e236611981565b602083015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3601126104ad57610140515161041f81611403565b60643560ff811681036104a9578152608435602082015260a435610140518201526101405183015260c43573ffffffffffffffffffffffffffffffffffffffff8116810361039757610479838260606104a596015261487a565b610481611932565b61048a36611981565b61049382611586565b5261049d81611586565b503492612d4d565b5080f35b8480fd5b8280fd5b506020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ad5767ffffffffffffffff82358181116104a95784926104ff8592369084016111e5565b91903493865b848110610510578780f35b6105208186859a9798999a61189e565b906080823603126107315761014051519761053a8961139c565b82358952858301358a811161073557830196601f973689820112156101aa5761056990369089813591016119c7565b94878b01958652610140518501358c81116104ad5785019836908a0112156101aa57883596610597886114d3565b996105a761014051519b8c611458565b888b52898b018a6060809b0283010191368311610731578b808c9201925b84841061071957505090506105e591508d6101405101978c8952016112a4565b96888d0197885251998a51801591821561070d575b50506106e257825b8a51811015610673578061066d8c8f8b8b8f926106448761063c60019a73ffffffffffffffffffffffffffffffffffffffff9451986115c2565b5193516115c2565b51925116926101405151946106588661139c565b8552840152610140518301528c82015261487a565b01610602565b5099986106d6949897506001955083906106d0939d97929c519073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8d018c1494511691612fca565b90611862565b91969195929301610505565b5061014051517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b51141590508e806105fa565b6107233685611698565b8152019101908b8b916105c5565b8580fd5b8780fd5b5090346102595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025957602061078483356000526002602052604060002054151590565b61014051519015158152f35b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc916020833601126102595767ffffffffffffffff9282358481116104ad5760c08185019282360301126104ad576101405151946107ee8661139c565b82359485875260248301948535928311610259575060209661086b6102479561085860a461024e9a9761082b8d9b986108849836918401016115d6565b8b87015261083c3660448301611698565b61014051870152019361084e856112a4565b60608201526144bd565b6102246108636114eb565b953692611553565b61087484611586565b5261087e83611586565b506116d6565b903492611df1565b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209167ffffffffffffffff913581526003835261014051902054166101405151908152f35b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209061030667ffffffffffffffff421680923533614264565b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025957602061014051517fa98d02348410c9c76735e0d0bb1396f4015ac2bb9615f9c2611d19d7a8a996508152f35b50346101aa57610140517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209167ffffffffffffffff9173ffffffffffffffffffffffffffffffffffffffff6109e3611281565b16825283526101405181206024358252835261014051902054166101405151908152f35b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576101a691610a5b91610a47611a49565b503581526002602052610140519020611ae7565b6101405151918291602083526020830190611300565b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803567ffffffffffffffff81116104ad57610abb8391369084016111e5565b9092610ac6826116f7565b9383346101205280935b808510610af2576101a6610ae48789614329565b6101405151918291826112c5565b9091929394610b0286838661189e565b610b0f602082018261179e565b80929192158015610ca6575b610c7b578560608301928035915b838110610bbb57505092602092610b829260019695610b7c8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8b011494610b7461012051956116d6565b9336916117f2565b9061261c565b610b90815161012051611862565b61012052018051610ba1898b6115c2565b52610bac888a6115c2565b50515101950193929190610ad0565b610bca8160051b870187611553565b610bd9610140518401846118de565b831015610c4f576001929173ffffffffffffffffffffffffffffffffffffffff610c4992610c37610c098b6116d6565b91610c26610140515195610c1c8761139c565b8b875236906115d6565b602086015236906060880201611698565b610140518401521660608201526144bd565b01610b29565b60248b60328f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8761014051517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b50610cb6610140518301836118de565b9050811415610b1b565b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209061030667ffffffffffffffff42168092356141be565b506020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ad57813567ffffffffffffffff928382116104a957610d54913691016111e5565b8493919290345b818610610d66578680f35b610d7186838761175e565b838101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215610e0e57810191823592868411610e0a578501928060061b36038413610e0a57600193826106d092610e0295610dfb8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8b011494339336916119c7565b9035612fca565b950194610d5b565b8980fd5b8880fd5b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576104a590610e49611932565b90610e5336611981565b610e5c83611586565b52610e6682611586565b503491339135612d4d565b50602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ad5780359067ffffffffffffffff821161039757610ebe9084923691016111e5565b90610ec8826116f7565b93833490937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101905b808610610f06576101a6610ae4888a614329565b90919293949560019085610f51610f488a8888610f24838a8f61175e565b610f41610f338883018361179e565b9390951494339336916117f2565b903561261c565b96875190611862565b95018051610f5f8a8c6115c2565b52610f6a898b6115c2565b5051510196019493929190610ef2565b82346102595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102595760209073ffffffffffffffffffffffffffffffffffffffff610fca611281565b16815260018252610140519020546101405151908152f35b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102595761014051519080805461102381611a94565b808552916001918083169081156110bd5750600114611063575b6101a68561104d81870382611458565b610140515191829160208352602083019061123e565b80809450527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106110a557505050810160200161104d826101a661103d565b8054602085870181019190915290930192810161108a565b8695506101a69693506020925061104d9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101929361103d565b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803567ffffffffffffffff9182821161039757611154913691016111e5565b90914216925b81811061116e576020846101405151908152f35b80611187856111806001948688611a39565b3533614264565b0161115a565b8390346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57807fdbfdf8dc2b135c26253e00d5b6cbe6f20457e003fd526d97cea183883570de6160209252f35b9181601f840112156112165782359167ffffffffffffffff8311611216576020808501948460051b01011161121657565b600080fd5b60005b83811061122e5750506000910152565b818101518382015260200161121e565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361127a8151809281875287808801910161121b565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361121657565b359073ffffffffffffffffffffffffffffffffffffffff8216820361121657565b6020908160408183019282815285518094520193019160005b8281106112ec575050505090565b8351855293810193928101926001016112de565b9061139991805182526020810151602083015267ffffffffffffffff806040830151166040840152806060830151166060840152608082015116608083015260a081015160a083015273ffffffffffffffffffffffffffffffffffffffff8060c08301511660c084015260e08201511660e08301526101008082015115159083015261012080910151916101408092820152019061123e565b90565b6080810190811067ffffffffffffffff8211176113b857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60c0810190811067ffffffffffffffff8211176113b857604052565b6060810190811067ffffffffffffffff8211176113b857604052565b6040810190811067ffffffffffffffff8211176113b857604052565b610140810190811067ffffffffffffffff8211176113b857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176113b857604052565b67ffffffffffffffff81116113b857601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b67ffffffffffffffff81116113b85760051b60200190565b6040908151916114fa8361141f565b60018352829160005b60208082101561154b5783516020929161151c826113e7565b6000825260008183015260008683015260606000818401526080830152600060a0830152828801015201611503565b505091925050565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181360301821215611216570190565b8051156115935760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156115935760209160051b010190565b91909160c08184031261121657604051906115f0826113e7565b81936115fb826112a4565b835260209167ffffffffffffffff8184013581811681036112165784860152604082013580151581036112165760408601526060820135606086015260808201359081116112165781019180601f840112156112165782359261165d84611499565b9161166b6040519384611458565b84835285858301011161121657848460a09695879660009401838601378301015260808501520135910152565b9190826060910312611216576040516116b081611403565b8092803560ff811681036112165760409182918452602081013560208501520135910152565b3573ffffffffffffffffffffffffffffffffffffffff811681036112165790565b90611701826114d3565b61170e6040519182611458565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061173c82946114d3565b019060005b82811061174d57505050565b806060602080938501015201611741565b91908110156115935760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc181360301821215611216570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611216570180359067ffffffffffffffff821161121657602001918160051b3603831361121657565b929190926117ff846114d3565b9161180d6040519384611458565b829480845260208094019060051b8301928284116112165780915b84831061183757505050505050565b823567ffffffffffffffff811161121657869161185786849386016115d6565b815201920191611828565b9190820391821161186f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91908110156115935760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181360301821215611216570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611216570180359067ffffffffffffffff82116112165760200191606082023603831361121657565b6040908151916119418361141f565b600183528291600091825b602080821015611978578251602092916119658261141f565b868252868183015282890101520161194c565b50505091925050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc604091011261121657604051906119b88261141f565b60243582526044356020830152565b9291926119d3826114d3565b6040926119e284519283611458565b819581835260208093019160061b84019381851161121657915b848310611a0b57505050505050565b8583830312611216578386918251611a228161141f565b8535815282860135838201528152019201916119fc565b91908110156115935760051b0190565b60405190611a568261143b565b606061012083600080825280602083015280604083015280848301528060808301528060a08301528060c08301528060e08301526101008201520152565b90600182811c92168015611add575b6020831014611aae57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611aa3565b9060405191611af58361143b565b828154815260016006818401549360209485850152600281015467ffffffffffffffff908181166040870152818160401c16606087015260801c166080850152600381015460a085015260ff73ffffffffffffffffffffffffffffffffffffffff8060048401541660c0870152600583015490811660e087015260a01c1615156101008501520190604051938492600092815491611b9283611a94565b80875292828116908115611c075750600114611bc1575b505050506101209291611bbd910384611458565b0152565b60009081528381209695945091905b818310611bef57509394509192509082010181611bbd61012038611ba9565b86548884018501529586019587945091830191611bd0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685880152505050151560051b830101905081611bbd61012038611ba9565b60405190611c548261141f565b6060602083600081520152565b90611c6b826114d3565b611c786040519182611458565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611ca682946114d3565b0190602036910137565b5190811515820361121657565b906020808383031261121657825167ffffffffffffffff938482116112165701926080848403126112165760405193611cf58561139c565b805185528281015173ffffffffffffffffffffffffffffffffffffffff811681036112165783860152611d2a60408201611cb0565b60408601526060810151918211611216570182601f8201121561121657805190611d5382611499565b93611d616040519586611458565b8285528383830101116112165782611d7c938501910161121b565b606082015290565b90611d8e826114d3565b611d9b6040519182611458565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611dc982946114d3565b019060005b828110611dda57505050565b602090611de5611a49565b82828501015201611dce565b9192608052611dfe611c47565b50805190611e0a611c47565b60a052611e1682611c61565b602060a05101526040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815283600482015260008160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa801561261057600060e0526125eb575b5060e05151156125c1579091611ead83611d84565b60c052611eb983611c61565b610100526000915b838310611eec575050505050611ee26080516101005160c05160e0516132ba565b60a0515260a05190565b611efc83829793949596976115c2565b519167ffffffffffffffff60208401511680151590816125ac575b5061258257604060e05101511580612575575b61254b5760608301519567ffffffffffffffff6020850151169673ffffffffffffffffffffffffffffffffffffffff85511660408601511515906080870151926040519a611f778c61143b565b60008c528960208d015267ffffffffffffffff421660408d015260608c0152600060808c015260a08b015260c08a015273ffffffffffffffffffffffffffffffffffffffff8a1660e08a015261010089015261012088015260005b602088015160c08901516120db609d60e08c015160408d01518d60608101519161010082015115159061012060a084015193015193604051988996602088019b8c527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000809260601b16604089015260601b1660548701527fffffffffffffffff000000000000000000000000000000000000000000000000809260c01b16606887015260c01b16607085015260f81b6078840152607983015280516120a0816099936020858701910161121b565b8201907fffffffff000000000000000000000000000000000000000000000000000000008860e01b169082015203607d810184520182611458565b51902080600052600260205260406000205415612101575060010163ffffffff16611fd2565b905097969293909495919780845280600052600260205260406000209184518355602085015160018401556121dd6002840167ffffffffffffffff6040880151168154907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff000000000000000060608b015160401b1692161717815567ffffffffffffffff6080880151167fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff77ffffffffffffffff0000000000000000000000000000000083549260801b169116179055565b60a085015160038401556004830173ffffffffffffffffffffffffffffffffffffffff60c0870151167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556005830173ffffffffffffffffffffffffffffffffffffffff60e0870151168154907fffffffffffffffffffffff00000000000000000000000000000000000000000074ff00000000000000000000000000000000000000006101008a0151151560a01b1692161717905561012085015192835167ffffffffffffffff81116113b85789946122bf6006840154611a94565b601f81116124f0575b50602090601f8311600114612423576006929160009183612418575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179101555b6060810151806123c8575b5073ffffffffffffffffffffffffffffffffffffffff906001956123488660c0516115c2565b526123558560c0516115c2565b5060a081015161236886610100516115c2565b528261237a86602060a05101516115c2565b5251166040519182527f8bf46bf4cfd674fa735a3d63ec1c9ad4153f033c290341f3a588b75685141b35602073ffffffffffffffffffffffffffffffffffffffff8b1693a401919290611ec1565b6123e19193506000526002602052604060002054151590565b156123ee57869138612322565b60046040517fc5723b51000000000000000000000000000000000000000000000000000000008152fd5b0151905038806122e4565b906006840160005260206000209160005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0851681106124d55750918391600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0600697161061249e575b505050811b01910155612317565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080612490565b8183015184558d985060019093019260209283019201612434565b90919293949550600684016000526020600020601f840160051c810160208510612544575b908c979695949392915b601f830160051c820181106125355750506122c8565b600081558d985060010161251f565b5080612515565b60046040517f157bd4c3000000000000000000000000000000000000000000000000000000008152fd5b5060408301511515611f2a565b60046040517f08e8b937000000000000000000000000000000000000000000000000000000008152fd5b905067ffffffffffffffff4216101538611f17565b60046040517fbf37b20e000000000000000000000000000000000000000000000000000000008152fd5b612607903d806000833e6125ff8183611458565b810190611cbd565b60e05238611e98565b6040513d6000823e3d90fd5b9290949391612629611c47565b50855193612635611c47565b9461263f81611c61565b6020870152604051907fa2ea7c6e00000000000000000000000000000000000000000000000000000000825282600483015260008260248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa91821561261057600092612d30575b508151156125c157929790916126d484611d84565b986126de85611c61565b946000935b818510612700575050505050956126fb94959661351e565b815290565b919593989496999092976127148a846115c2565b519a67ffffffffffffffff60208d0151168015159081612d1b575b506125825760408901511580612d0e575b61254b57899860608d01518d602081015167ffffffffffffffff1691815173ffffffffffffffffffffffffffffffffffffffff1690604083015115159260800151936040519e8f906127918261143b565b6000825260208201524267ffffffffffffffff166040820152606001528d608081016000905260a0015260c08d015273ffffffffffffffffffffffffffffffffffffffff8b1660e08d01526101008c01526101208b015260005b60208b01518b6128bc609d60c08301519260e08101519060408101519060608101519161010082015115159061012060a084015193015193604051988996602088019b8c527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000809260601b16604089015260601b1660548701527fffffffffffffffff000000000000000000000000000000000000000000000000809260c01b16606887015260c01b16607085015260f81b6078840152607983015280516120a0816099936020858701910161121b565b519020806000526002602052604060002054156128e2575060010163ffffffff166127eb565b90509d979b9199929a949d9c909698939c80845280600052600260205260406000209184518355602085015160018401556129c46002840167ffffffffffffffff6040880151168154907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff000000000000000060608b015160401b1692161717815567ffffffffffffffff6080880151167fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff77ffffffffffffffff0000000000000000000000000000000083549260801b169116179055565b60a085015160038401556004830173ffffffffffffffffffffffffffffffffffffffff60c0870151167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556005830173ffffffffffffffffffffffffffffffffffffffff60e0870151168154907fffffffffffffffffffffff00000000000000000000000000000000000000000074ff00000000000000000000000000000000000000006101008a0151151560a01b1692161717905561012085015192835167ffffffffffffffff81116113b8578894612aa66006840154611a94565b601f8111612cb3575b50602090601f8311600114612be6576006929160009183612bdb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179101555b8d8b8b606084015180612bae575b5086602073ffffffffffffffffffffffffffffffffffffffff95948794612b44848660019e612b3e83612b5c9a6115c2565b526115c2565b50612b548460a0890151926115c2565b5201516115c2565b5251166040519182527f8bf46bf4cfd674fa735a3d63ec1c9ad4153f033c290341f3a588b75685141b35602073ffffffffffffffffffffffffffffffffffffffff881693a4019290919293949a6126e3565b92505050612bcb9193506000526002602052604060002054151590565b156123ee5785918d8b8b38612b0c565b015190503880612acb565b906006840160005260206000209160005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085168110612c985750918391600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06006971610612c61575b505050811b01910155612afe565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080612c53565b8183015184558c985060019093019260209283019201612bf7565b90919293949550600684016000526020600020601f840160051c810160208510612d07575b908b979695949392915b601f830160051c82018110612cf8575050612aaf565b600081558c9850600101612ce2565b5080612cd8565b5060408c01511515612740565b905067ffffffffffffffff421610153861272f565b612d469192503d806000833e6125ff8183611458565b90386126bf565b939291936040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815281600482015260008160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561261057600091612faf575b508051156125c1578251612dde81611d84565b92612de882611c61565b9460005b838110612e0257505050506113999495506136ff565b612e0c81836115c2565b5190815160005260028060205260406000208054156123ee57856001820154036125c1578c73ffffffffffffffffffffffffffffffffffffffff6005830154911673ffffffffffffffffffffffffffffffffffffffff821603612f855760a01c60ff161561254b5767ffffffffffffffff8282015460801c16612f5b5790810180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff164260801b77ffffffffffffffff00000000000000000000000000000000161790556001928c9190612ee082611ae7565b612eea858c6115c2565b52612ef5848b6115c2565b506020810151612f05858d6115c2565b527ff930a6e2523c9cc298691873087a740550b8fc85a0680830414c148ed927f615602073ffffffffffffffffffffffffffffffffffffffff87816004870154169451950154956040519586521693a401612dec565b60046040517f905e7107000000000000000000000000000000000000000000000000000000008152fd5b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b612fc491503d806000833e6125ff8183611458565b38612dcb565b90949392916040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815282600482015260008160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115612610576000916131eb575b508051156125c157865161305c81611d84565b9261306682611c61565b9460005b83811061308057505050506113999596506138fe565b61308a818c6115c2565b519081516000526002918260205260406000208054156123ee57846001820154036125c157600581015473ffffffffffffffffffffffffffffffffffffffff871673ffffffffffffffffffffffffffffffffffffffff821603612f855760a01c60ff161561254b5767ffffffffffffffff8482015460801c16612f5b5792830180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff164260801b77ffffffffffffffff000000000000000000000000000000001617905560019261315b81611ae7565b613165848b6115c2565b52613170838a6115c2565b506020820151613180848c6115c2565b528373ffffffffffffffffffffffffffffffffffffffff6004830154169251910154916040519182527ff930a6e2523c9cc298691873087a740550b8fc85a0680830414c148ed927f615602073ffffffffffffffffffffffffffffffffffffffff891693a40161306a565b61320091503d806000833e6125ff8183611458565b38613049565b60408101906040815282518092526060810160608360051b830101926020809501916000905b82821061326f57505050508281830391015281808451928381520193019160005b82811061325b575050505090565b83518552938101939281019260010161324d565b909192959485806132aa837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa089600196030186528a51611300565b979801949391909101910161322c565b9092918351936001908186146134fd5773ffffffffffffffffffffffffffffffffffffffff602080950151169182156134cd579560009687915b8083106133bf575050509183929161333d9492876040518097819582947f91db0b7e00000000000000000000000000000000000000000000000000000000845260048401613206565b03925af19081156126105760009161338b575b50905015613361576113999061408f565b60046040517fe8bee839000000000000000000000000000000000000000000000000000000008152fd5b82813d83116133b8575b61339f8183611458565b8101031261025957506133b190611cb0565b8038613350565b503d613395565b909197966133cd89876115c2565b5180151580613447575b61341d578181116133f3578084920398019801909190916132f4565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c3575060009161348e575b50156133d7565b908982813d83116134bc575b6134a48183611458565b8101031261025957506134b690611cb0565b38613487565b503d61349a565b513d6000823e3d90fd5b9594505050905060005b8281106134e75750505050600090565b6134f181836115c2565b5161341d5783016134d7565b6113999550613517915061351090611586565b5191611586565b5191613ad6565b9093918451946001908187146136e25773ffffffffffffffffffffffffffffffffffffffff602080950151169182156136b1579660009788915b80831061360157505050918392916135a19492886040518097819582947f91db0b7e00000000000000000000000000000000000000000000000000000000845260048401613206565b03925af1908115612610576000916135cd575b50905015613361576135c4575090565b6113999061408f565b82813d83116135fa575b6135e18183611458565b8101031261025957506135f390611cb0565b80386135b4565b503d6135d7565b9091989761360f8a876115c2565b5180151580613635575b61341d578181116133f357808492039901990190919091613558565b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c3575060009161367c575b5015613619565b908982813d83116136aa575b6136928183611458565b8101031261025957506136a490611cb0565b38613675565b503d613688565b969550505091505060005b8281106136cc5750505050600090565b6136d681836115c2565b5161341d5783016136bc565b61139996506136f8915061351090959495611586565b5191613c5d565b9092918351936001908186146138e45773ffffffffffffffffffffffffffffffffffffffff602080950151169182156138b4579560009687915b80831061380457505050918392916137829492876040518097819582947f88e5b2d900000000000000000000000000000000000000000000000000000000845260048401613206565b03925af1908115612610576000916137d0575b509050156137a6576113999061408f565b60046040517fbf2f3a8b000000000000000000000000000000000000000000000000000000008152fd5b82813d83116137fd575b6137e48183611458565b8101031261025957506137f690611cb0565b8038613795565b503d6137da565b9091979661381289876115c2565b5180151580613838575b61341d578181116133f357808492039801980190919091613739565b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c3575060009161387f575b501561381c565b908982813d83116138ad575b6138958183611458565b8101031261025957506138a790611cb0565b38613878565b503d61388b565b9594505050905060005b8281106138ce5750505050600090565b6138d881836115c2565b5161341d5783016138be565b61139995506138f7915061351090611586565b5191613dc5565b909391845194600190818714613ab95773ffffffffffffffffffffffffffffffffffffffff60208095015116918215613a88579660009788915b8083106139d857505050918392916139819492886040518097819582947f88e5b2d900000000000000000000000000000000000000000000000000000000845260048401613206565b03925af1908115612610576000916139a4575b509050156137a6576135c4575090565b82813d83116139d1575b6139b88183611458565b8101031261025957506139ca90611cb0565b8038613994565b503d6139ae565b909198976139e68a876115c2565b5180151580613a0c575b61341d578181116133f357808492039901990190919091613938565b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c35750600091613a53575b50156139f0565b908982813d8311613a81575b613a698183611458565b810103126102595750613a7b90611cb0565b38613a4c565b503d613a5f565b969550505091505060005b828110613aa35750505050600090565b613aad81836115c2565b5161341d578301613a93565b6113999650613acf915061351090959495611586565b5191613f3f565b92919273ffffffffffffffffffffffffffffffffffffffff602080920151168015613c505784151580613bd6575b61341d578385116133f357613b52829186946040519586809481937fe60c35050000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613ba2575b50905015613b785781611399910361408f565b60046040517fbd8ba84d000000000000000000000000000000000000000000000000000000008152fd5b82813d8311613bcf575b613bb68183611458565b810103126102595750613bc890611cb0565b8038613b65565b503d613bac565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa90811561261057600091613c1b575b5015613b04565b908382813d8311613c49575b613c318183611458565b810103126102595750613c4390611cb0565b38613c14565b503d613c27565b5050505061341d57600090565b93919373ffffffffffffffffffffffffffffffffffffffff602080920151168015613db75785151580613d3d575b61341d578486116133f357613cd9829187946040519586809481937fe60c35050000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613d09575b50905015613b78578290613cff57505090565b611399910361408f565b82813d8311613d36575b613d1d8183611458565b810103126102595750613d2f90611cb0565b8038613cec565b503d613d13565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa90811561261057600091613d82575b5015613c8b565b908382813d8311613db0575b613d988183611458565b810103126102595750613daa90611cb0565b38613d7b565b503d613d8e565b505050505061341d57600090565b92919273ffffffffffffffffffffffffffffffffffffffff602080920151168015613c505784151580613ec5575b61341d578385116133f357613e41829186946040519586809481937fe49617e10000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613e91575b50905015613e675781611399910361408f565b60046040517fccf3bb27000000000000000000000000000000000000000000000000000000008152fd5b82813d8311613ebe575b613ea58183611458565b810103126102595750613eb790611cb0565b8038613e54565b503d613e9b565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa90811561261057600091613f0a575b5015613df3565b908382813d8311613f38575b613f208183611458565b810103126102595750613f3290611cb0565b38613f03565b503d613f16565b93919373ffffffffffffffffffffffffffffffffffffffff602080920151168015613db75785151580614015575b61341d578486116133f357613fbb829187946040519586809481937fe49617e10000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613fe1575b50905015613e67578290613cff57505090565b82813d831161400e575b613ff58183611458565b81010312610259575061400790611cb0565b8038613fce565b503d613feb565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa9081156126105760009161405a575b5015613f6d565b908382813d8311614088575b6140708183611458565b81010312610259575061408290611cb0565b38614053565b503d614066565b806140975750565b80471061416057600080808093335af13d1561415b573d6140b781611499565b906140c56040519283611458565b8152600060203d92013e5b156140d757565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152fd5b6140d0565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152fd5b6000818152600360205267ffffffffffffffff908160408220541661423a577f5aafceeb1c7ad58e4a84898bdee37c02c0fc46e7d24e6b60e8209449f183459f91838252600360205260408220941693847fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000082541617905580a3565b60046040517f2e267946000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff166000818152600460205260408120908381528160205267ffffffffffffffff806040832054166142ff577f92a1f7a41a7c585a8b09e25b195e225b1d43248daca46b0faf9e0792777a22299285835260205260408220951694857fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000082541617905580a4565b60046040517fec9d6eeb000000000000000000000000000000000000000000000000000000008152fd5b9061433390611c61565b60009283925b805184101561438e579361434d84866115c2565b519160005b835181101561437d5761436581856115c2565b5161437084876115c2565b5260019283019201614352565b509094600190940193909150614339565b509250905090565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016301480614494575b156143fe577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261448e816113e7565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000046146143d5565b6020908181015190604080938183015192606081019173ffffffffffffffffffffffffffffffffffffffff948584511660005260018252846000209283549360018501905551928688511667ffffffffffffffff988985820151168882015115159060806060840151930151878151910120938a5198888a019b7fdbfdf8dc2b135c26253e00d5b6cbe6f20457e003fd526d97cea183883570de618d528a01526060890152608088015260a087015260c086015260e085015261010090818501528352610120830196838810908811176113b8576145a886956145bc946145c4998b5251902061482e565b918860ff8351169183015192015192614792565b9490946145f9565b51169116036145d05750565b600490517f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b6005811015614763578061460a5750565b600181036146705760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b600281036146d65760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b6003146146df57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116148225791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa1561481557815173ffffffffffffffffffffffffffffffffffffffff81161561480f579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b614836614396565b906040519060208201927f19010000000000000000000000000000000000000000000000000000000000008452602283015260428201526042815261448e8161139c565b602081015160409182810151916060820173ffffffffffffffffffffffffffffffffffffffff9283825116600052600160205285600020908154916001830190555192519086519160208301947fa98d02348410c9c76735e0d0bb1396f4015ac2bb9615f9c2611d19d7a8a99650865288840152606083015260808201526080815260a081019481861067ffffffffffffffff8711176113b85761492b85946145bc936145c4988a5251902061482e565b9060ff8151168860208301519201519261479256fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.EAS__factory=f},81009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEAS__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Attested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"revoker",type:"address"},{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"RevokedOffchain",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"Timestamped",type:"event"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"}],internalType:"struct AttestationRequest",name:"request",type:"tuple"}],name:"attest",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct DelegatedAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttestation",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"revoker",type:"address"},{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSchemaRegistry",outputs:[{internalType:"contract ISchemaRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"isAttestationValid",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiAttestationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiAttest",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct MultiDelegatedAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiRevocationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiRevoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct MultiDelegatedRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"}],internalType:"struct RevocationRequest",name:"request",type:"tuple"}],name:"revoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct DelegatedRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"revokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"timestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"}];t.IEAS__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},41693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISchemaRegistry__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!1,internalType:"address",name:"registerer",type:"address"}],name:"Registered",type:"event"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getSchema",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"string",name:"schema",type:"string"}],internalType:"struct SchemaRecord",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"schema",type:"string"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"}],name:"register",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"}];t.ISchemaRegistry__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},19259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry__factory=void 0;const n=r(86623),i=[{inputs:[],name:"AlreadyExists",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!1,internalType:"address",name:"registerer",type:"address"}],name:"Registered",type:"event"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getSchema",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"string",name:"schema",type:"string"}],internalType:"struct SchemaRecord",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"schema",type:"string"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"}],name:"register",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"}],o="0x60808060405234610016576107b8908161001c8239f35b600080fdfe60806040908082526004918236101561001757600080fd5b600091823560e01c90816360d7a2781461029757508063a2ea7c6e146101045763ffa1ad741461004657600080fd5b3461010057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610100578051918183019083821067ffffffffffffffff8311176100d45750926100d093825282527f302e323700000000000000000000000000000000000000000000000000000000602083015251918291602083526020830190610689565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b5080fd5b503461010057602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610293576060808351610144816106cc565b85815285878201528585820152015235825281835280822090805191610169836106cc565b805483526001918282015491868501600273ffffffffffffffffffffffffffffffffffffffff92838616835260ff8589019660a01c16151586520188845196898354936101b585610758565b808b52948381169081156102505750600114610214575b50505050506101e1856100d097980386610717565b606087019485528251978897818952519088015251169085015251151560608401525160808084015260a0830190610689565b908094939b50528983205b82841061023d575050508501909601956101e1886100d087386101cc565b80548985018c0152928a0192810161021f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016858c01525050505090151560051b86010196506101e1886100d087386101cc565b8280fd5b92939050346106625760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106625780359067ffffffffffffffff80831161065e573660238401121561065e57828201359181831161065a57366024848601011161065a576024359673ffffffffffffffffffffffffffffffffffffffff9182891680990361010057604435978815158099036102935761033b816106cc565b8281526020998a8201908152888201998a52885197848c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe099818b601f83011601610386908d610717565b808c5280828d019460240185378b0101528b6060840199808b5283518d5115158d519384938185019687915180926103bd92610666565b84019260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169083015260f81b6034820152036015810182526035016104059082610717565b519020998a8552848c5289852054610632579082918b600294528b8652858d528a8620925183556001968784019251167fffffffffffffffffffffff00000000000000000000000000000000000000000074ff000000000000000000000000000000000000000084549351151560a01b1692161717905501955190815194851161060657506104948654610758565b601f81116105c0575b508891601f8511600114610545578495509084939492919361051a575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b817f7d917fcbc9a29a9705ff9936ffa599500e4fd902e4486bae317414fe967b307c848351338152a251908152f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff386104ba565b9294849081168785528a8520945b8b888383106105a95750505010610572575b505050811b0190556104eb565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610565565b868601518855909601959485019487935001610553565b868352898320601f860160051c8101918b87106105fc575b601f0160051c019084905b8281106105f157505061049d565b8481550184906105e3565b90915081906105d8565b8260416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b838a517f23369fa6000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8580fd5b8380fd5b60005b8381106106795750506000910152565b8181015183820152602001610669565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936106c581518092818752878088019101610666565b0116010190565b6080810190811067ffffffffffffffff8211176106e857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106e857604052565b90600182811c921680156107a1575b602083101461077257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161076756fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.SchemaRegistry__factory=f},13041:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Verifier__factory=void 0;const n=r(86623),i=[{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"}];t.EIP712Verifier__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},37444:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Verifier__factory=t.proxy=void 0,t.proxy=o(r(28457));var f=r(13041);Object.defineProperty(t,"EIP712Verifier__factory",{enumerable:!0,get:function(){return f.EIP712Verifier__factory}})},44726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Proxy__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"string",name:"name",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"DeadlineExpired",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"InvalidLength",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"NotFound",type:"error"},{inputs:[],name:"UsedSignature",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttester",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEAS",outputs:[{internalType:"contract IEAS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"}],o="0x61016060409080825234620003505762002239803803809162000023828562000355565b83398101918082840312620003505781516001600160a01b03811693909190848303620003505760208481015190946001600160401b03919082821162000350570194601f838188011215620003505786518381116200031657855197601f199562000096838501881686018b62000355565b828a528483830101116200035057839060005b8381106200033b575050600091890101528451858101908082108583111762000316578391875260038152019662302e3160e81b8852600381518483012098208860e05261010099818b524660a052875191858301907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9b8c83528a85015260608401524660808401523060a084015260a0835260c0830192808410888511176200031657838a525190206080523060c052610120998a52156200032c575061014096875280519384116200031657600054926001938481811c911680156200030b575b82821014620002f557838111620002aa575b50809285116001146200024057508394509083929160009462000234575b50501b916000199060031b1c1916176000555b5191611ebf93846200037a8539608051846113d7015260a051846114a3015260c051846113a8015260e051846114260152518361144c015251826114030152518181816102a5015281816104870152818161094f01528181610acb0152610e590152f35b015192503880620001bd565b9294849081166000805284600020946000905b888383106200028f575050501062000275575b505050811b01600055620001d0565b015160001960f88460031b161c1916905538808062000266565b85870151885590960195948501948793509081019062000253565b60008052816000208480880160051c820192848910620002eb575b0160051c019085905b828110620002de5750506200019f565b60008155018590620002ce565b92508192620002c5565b634e487b7160e01b600052602260045260246000fd5b90607f16906200018d565b634e487b7160e01b600052604160045260246000fd5b6341bc07ff60e11b8152600490fd5b8181018301518b8201840152859201620000a9565b600080fd5b601f909101601f19168101906001600160401b03821190821017620003165760405256fe6080604052600436101561001257600080fd5b6000803560e01c80630eabf66014610d9957806310d736d514610d3b57806312b11a1714610ce257806317d7de7c14610b815780633c0427151461097357806365c40b9c146109045780639541152514610369578063a6d4dbc7146101b2578063b83010d314610159578063ed24911d146101185763ffa1ad741461009657600080fd5b3461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576101116040516100d3816112e8565b600381527f302e310000000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061125a565b0390f35b80fd5b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576020610151611391565b604051908152f35b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155760206040517f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d8152f35b506101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576040516101ea8161129d565b6004358082526101f936611843565b602083015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3601126103645760405161023481611318565b60643560ff81168103610364578152608435602082015260a4356040820152604083015260c43573ffffffffffffffffffffffffffffffffffffffff90818116810361036457606084015260e43567ffffffffffffffff8116810361036457836102a391608087960152611c91565b7f00000000000000000000000000000000000000000000000000000000000000001690604051906102d3826112e8565b81526102de36611843565b60208201908152823b1561035f576064849260209460405195869485937f4692626700000000000000000000000000000000000000000000000000000000855251600485015251805160248501520151604483015234905af18015610354576103445750f35b61034d90611304565b6101155780f35b6040513d84823e3d90fd5b505050fd5b600080fd5b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155767ffffffffffffffff600435818111610900576103b5903690600401611206565b6103be816116e6565b906103cc6040519283611350565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06103f9826116e6565b01855b8181106108e9575050845b81811061070057506040517f44adc90e0000000000000000000000000000000000000000000000000000000081526024810190602060048201528351809252604481016005926020604482861b85010196019189905b82821061063b575050505086818073ffffffffffffffffffffffffffffffffffffffff96038134887f0000000000000000000000000000000000000000000000000000000000000000165af195861561063057879661059b575b5050508490855b81811061050b578587604051918291602083016020845282518091526020604085019301915b8181106104f2575050500390f35b82518452859450602093840193909201916001016104e4565b610516818387611718565b6105236020820182611787565b905060608992015b8982841061053f57505050506001016104be565b8192939661054e6040936116c5565b610558828d61182f565b518352896001948594856020522091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790550195019091909161052b565b90919295503d8088843e6105af8184611350565b82019160208184031261062857805191821161062857019181601f8401121561062c5782519260206105e0856116e6565b946105ee6040519687611350565b808652818601931b82010192831161062857602001905b82821061061857505050923880806104b7565b8151815260209182019101610605565b8780fd5b8680fd5b6040513d89823e3d90fd5b909192967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8582030182528a8851916020604082019380518352015192604060208301528351809152606091602083820193838c1b8301019501935b8281106106b757505050505060208060019299019201920190929161045d565b90919293946020806106f3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08760019603018952895161165b565b9701950193929101610697565b61070b818386611718565b6107186020820182611787565b90811580156108d1575b6108a7576080830135895b8381106107d057505060405192610743846112e8565b35835261074f826116e6565b9161075d6040519384611350565b80835260051b8101602083013682116107cc5782905b8282106107a35750505050602082015260019190610791828661182f565b5261079c818561182f565b5001610407565b81358b81116107c8576020916107bd8392369088016114ff565b815201910190610773565b8c80fd5b8a80fd5b6107df8160051b840184611628565b906107ed60408701876117db565b82939193101561087a57610803606088016116c5565b908c851685036108765773ffffffffffffffffffffffffffffffffffffffff610870926108586001966108476040519561083c8761129d565b8d35875236906114ff565b6020860152369060608802016115ea565b60408401521660608201528c85166080820152611889565b0161072d565b8d80fd5b60248d7f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b60046040517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b506108df60408401846117db565b9050821415610722565b6020906108f46116fe565b828287010152016103fc565b8280fd5b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b506020907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9082823601126101155760043567ffffffffffffffff8082116109005760e08260040194833603011261090057604051936109d28561129d565b80359485815260248401928335908111610b7d5791610a40610a5b9492610a02610a4595600436918a01016114ff565b8a820152610a1336604489016115ea565b6040820152610a3660c460a4890198610a2b8a6114c9565b6060850152016114ea565b6080820152611889565b611628565b60405194610a52866112e8565b855236906114ff565b92848101938452610aac6040519485927ff17325e70000000000000000000000000000000000000000000000000000000084528760048501525160248401525160406044840152606483019061165b565b0390848473ffffffffffffffffffffffffffffffffffffffff938134867f0000000000000000000000000000000000000000000000000000000000000000165af1938415610b72578394610b41575b50610b076040916116c5565b92848152600186522091167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055604051908152f35b9093508481813d8311610b6b575b610b598183611350565b81010312610900575192610b07610afb565b503d610b4f565b6040513d85823e3d90fd5b8580fd5b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576040519080805491600183811c92818516948515610cd8575b6020958686108114610cab57858852879493929187908215610c6a575050600114610c11575b5050610bfd92500383611350565b61011160405192828493845283019061125a565b908592508180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310610c52575050610bfd93508201013880610bef565b80548389018501528794508693909201918101610c3a565b91509350610bfd9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013880610bef565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b93607f1693610bc9565b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155760206040517f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78152f35b50346101155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155773ffffffffffffffffffffffffffffffffffffffff6040602092600435815260018452205416604051908152f35b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155760043567ffffffffffffffff811161120257610de4903690600401611206565b90610dee826116e6565b91610dfc6040519384611350565b8083527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610e29826116e6565b01845b8181106111eb57505090835b828110610f975750505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610900579082906040519283917f4cb7e9e5000000000000000000000000000000000000000000000000000000008352602483016020600485015281518091526044840190602060448260051b87010193019186905b828210610f005750505050828091039134905af1801561035457610ef4575080f35b610efd90611304565b80f35b9295847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc929593969850030182528451602060608160408501938051865201519360408382015284518094520192019089905b808210610f755750505060208060019296019201920192879593879593610ed2565b9091926020604060019282875180518352015183820152019401920190610f53565b610fa5818484959794611718565b9160a0833603126101155760405193610fbd8561129d565b83358552602084013567ffffffffffffffff8111610900578401601f943686830112156111b2578135610fef816116e6565b92610ffd6040519485611350565b81845260208085019260061b8201019036821161062c57602001915b8183106111ba5750505060208701918252604081013567ffffffffffffffff81116111b6578101953690870112156111b257853595611057876116e6565b966110656040519889611350565b80885260206060818a0192028301019136831161062c57602001905b8282106111985750505060806110ae918760408a01526110a3606082016114c9565b60608a0152016114ea565b608087015251938451801591821561118c575b50506108a757815b845181101561114f57806111496110e26001938861182f565b518851906110f48460408c015161182f565b5173ffffffffffffffffffffffffffffffffffffffff60608c0151169067ffffffffffffffff60808d015116926040519461112e8661129d565b85526020850152604084015260608301526080820152611c91565b016110c9565b5093516040519196936001939291611166836112e8565b82526020820152611177828761182f565b52611182818661182f565b5001919091610e38565b511415905038806110c1565b60206060916111a736856115ea565b815201910190611081565b8380fd5b8480fd5b60408336031261062c57602060409182516111d4816112e8565b853581528286013583820152815201920191611019565b6020906111f66116fe565b82828801015201610e2c565b5080fd5b9181601f840112156103645782359167ffffffffffffffff8311610364576020808501948460051b01011161036457565b60005b83811061124a5750506000910152565b818101518382015260200161123a565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361129681518092818752878088019101611237565b0116010190565b60a0810190811067ffffffffffffffff8211176112b957604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176112b957604052565b67ffffffffffffffff81116112b957604052565b6060810190811067ffffffffffffffff8211176112b957604052565b6080810190811067ffffffffffffffff8211176112b957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176112b957604052565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014806114a0575b156113f9577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176112b95760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000046146113d0565b359073ffffffffffffffffffffffffffffffffffffffff8216820361036457565b359067ffffffffffffffff8216820361036457565b919060c083820312610364576040519067ffffffffffffffff60c08301818111848210176112b9576040528294611535816114c9565b84526020926115458483016114ea565b848601526040820135801515810361036457604086015260608201356060860152608082013583811161036457820181601f820112156103645780359384116112b957604051916115bd867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8801160184611350565b84835285858301011161036457848460a09695879660009401838601378301015260808501520135910152565b91908260609103126103645760405161160281611318565b8092803560ff811681036103645760409182918452602081013560208501520135910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181360301821215610364570190565b9073ffffffffffffffffffffffffffffffffffffffff825116815267ffffffffffffffff60208301511660208201526040820151151560408201526060820151606082015260a0806116bc608085015160c0608086015260c085019061125a565b93015191015290565b3573ffffffffffffffffffffffffffffffffffffffff811681036103645790565b67ffffffffffffffff81116112b95760051b60200190565b6040519061170b826112e8565b6060602083600081520152565b91908110156117585760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6181360301821215610364570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610364570180359067ffffffffffffffff821161036457602001918160051b3603831361036457565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610364570180359067ffffffffffffffff82116103645760200191606082023603831361036457565b80518210156117585760209160051b010190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc6040910112610364576040519061187a826112e8565b60243582526044356020830152565b608081019067ffffffffffffffff8083511680151590816119fd575b506119d35760208201519060409384840151936118c185611dc2565b80519173ffffffffffffffffffffffffffffffffffffffff9485815116918560208301511691898101511515876080606084015193015160208151910120935116938b519560208701987f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78a528d8801526060870152608086015260a085015260c084015260e083015261010090818301528152610120810193818510908511176112b95761199d956119806060946119959388978b52519020611c3f565b9060ff81511689602083015192015192611ba3565b959095611a0a565b0151169116036119aa5750565b600490517f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1ab7da6b000000000000000000000000000000000000000000000000000000008152fd5b90508142161015386118a5565b6005811015611b745780611a1b5750565b60018103611a815760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b60028103611ae75760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b600314611af057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611c335791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611c2657815173ffffffffffffffffffffffffffffffffffffffff811615611c20579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b611c47611391565b906040519060208201927f190100000000000000000000000000000000000000000000000000000000000084526022830152604282015260428152611c8b81611334565b51902090565b608081019067ffffffffffffffff90818351168015159081611db5575b506119d3576020810151918251600052600160205273ffffffffffffffffffffffffffffffffffffffff92604094848660002054168015611d8c573303611d63579261199585949361198060609461199d98968a86015193611d0f85611dc2565b865192519151168b519160208301937f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d85528d84015288830152608082015260808152611d5b8161129d565b519020611c3f565b600486517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b600487517fc5723b51000000000000000000000000000000000000000000000000000000008152fd5b9050824216101538611cae565b80519060406020820151910151604051917fff00000000000000000000000000000000000000000000000000000000000000602084019460f81b1684526021830152604182015260418152611e1681611334565b60ff6040516020818451611e2b818389611237565b810160028152030190205416611e8857611e5391602091604051938492839251928391611237565b8101600281520301902060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b60046040517fcce9a824000000000000000000000000000000000000000000000000000000008152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.EIP712Proxy__factory=f},71871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionedEIP712Proxy__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"string",name:"name",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"DeadlineExpired",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"InvalidLength",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"NotFound",type:"error"},{inputs:[],name:"UsedSignature",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttester",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEAS",outputs:[{internalType:"contract IEAS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],o="0x6101606040908082523462000388576200255a80380380916200002382856200038d565b83398101908281830312620003885780519060018060a01b03928383169485840362000388576020838101516001600160401b039491939185821162000388570193601f93828587011215620003885785518281116200034e57845196601f199462000096838901871685018a6200038d565b8289528383830101116200038857829060005b8381106200037357505060009188010152835194848601868110848211176200034e57855281600396878152019662302e3160e81b88528681518483012098208860e0526101009b818d524660a052875191858301907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9b8c83528a85015260608401524660808401523060a084015260a0835260c0830192808410888511176200034e57838a525190206080523060c052610120998a521562000364575061014098895280519384116200034e57600054926001938481811c9116801562000343575b828210146200032d57838111620002e2575b5080928511600114620002795750839450908392916000946200026d575b50501b9160001990851b1c1916176000555b8154336001600160a01b031982168117909355905194167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36121a89384620003b28539608051846116e1015260a051846117ad015260c051846116b2015260e05184611730015251836117560152518261170d01525181818161040b015281816105f001528181610ba901528181610d2d01526110c30152f35b015192503880620001bd565b9294849081166000805284600020946000905b88838310620002c75750505010620002ae575b505050811b01600055620001cf565b015160001983871b60f8161c191690553880806200029f565b8587015188559096019594850194879350908101906200028c565b60008052816000208480880160051c82019284891062000323575b0160051c019085905b828110620003165750506200019f565b6000815501859062000306565b92508192620002fd565b634e487b7160e01b600052602260045260246000fd5b90607f16906200018d565b634e487b7160e01b600052604160045260246000fd5b6341bc07ff60e11b8152600490fd5b8181018301518a8201840152849201620000a9565b600080fd5b601f909101601f19168101906001600160401b038211908210176200034e5760405256fe6080604052600436101561001257600080fd5b6000803560e01c80630eabf66014610ffb57806310d736d514610f9d57806312b11a1714610f4457806317d7de7c14610de35780633c04271514610bcd57806365c40b9c14610b5e578063715018a614610abf5780638da5cb5b14610a6d57806395411525146104ca578063a6d4dbc714610310578063b83010d3146102b7578063ed24911d14610276578063f2fde38b146101395763ffa1ad74146100b757600080fd5b3461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610136576101326040516100f481611573565b600381527f302e31000000000000000000000000000000000000000000000000000000000060208201526040519182916020835260208301906114c4565b0390f35b80fd5b50346101365760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760043573ffffffffffffffffffffffffffffffffffffffff8082168092036102715761019361161c565b81156101ed57600354827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b600080fd5b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760206102af61169b565b604051908152f35b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760206040517f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d8152f35b506101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365761034461161c565b60405161035081611528565b60043580825261035f36612024565b602083015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3601126102715760405161039a816115a3565b60643560ff81168103610271578152608435602082015260a4356040820152604083015260c43573ffffffffffffffffffffffffffffffffffffffff90818116810361027157606084015260e43567ffffffffffffffff8116810361027157836104099160808796015261206a565b7f000000000000000000000000000000000000000000000000000000000000000016906040519061043982611573565b815261044436612024565b60208201908152823b156104c5576064849260209460405195869485937f4692626700000000000000000000000000000000000000000000000000000000855251600485015251805160248501520151604483015234905af180156104ba576104aa5750f35b6104b39061158f565b6101365780f35b6040513d84823e3d90fd5b505050fd5b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365767ffffffffffffffff600435818111610a6957610516903690600401611470565b61051e61161c565b61052781611ec7565b9061053560405192836115db565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061056282611ec7565b01855b818110610a52575050845b81811061086957506040517f44adc90e0000000000000000000000000000000000000000000000000000000081526024810190602060048201528351809252604481016005926020604482861b85010196019189905b8282106107a4575050505086818073ffffffffffffffffffffffffffffffffffffffff96038134887f0000000000000000000000000000000000000000000000000000000000000000165af1958615610799578796610704575b5050508490855b818110610674578587604051918291602083016020845282518091526020604085019301915b81811061065b575050500390f35b825184528594506020938401939092019160010161064d565b61067f818387611ef9565b61068c6020820182611f68565b905060608992015b898284106106a85750505050600101610627565b819293966106b76040936119ae565b6106c1828d612010565b518352896001948594856020522091167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905501950190919091610694565b90919295503d8088843e61071881846115db565b82019160208184031261079157805191821161079157019181601f8401121561079557825192602061074985611ec7565b9461075760405196876115db565b808652818601931b82010192831161079157602001905b8282106107815750505092388080610620565b815181526020918201910161076e565b8780fd5b8680fd5b6040513d89823e3d90fd5b909192967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8582030182528a8851916020604082019380518352015192604060208301528351809152606091602083820193838c1b8301019501935b8281106108205750505050506020806001929901920192019092916105c6565b909192939460208061085c837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087600196030189528951611944565b9701950193929101610800565b610874818386611ef9565b6108816020820182611f68565b9081158015610a3a575b610a10576080830135895b838110610939575050604051926108ac84611573565b3583526108b882611ec7565b916108c660405193846115db565b80835260051b8101602083013682116109355782905b82821061090c57505050506020820152600191906108fa8286612010565b526109058185612010565b5001610570565b81358b8111610931576020916109268392369088016117e8565b8152019101906108dc565b8c80fd5b8a80fd5b6109488160051b840184611911565b906109566040870187611fbc565b8293919310156109e35761096c606088016119ae565b908c851685036109df5773ffffffffffffffffffffffffffffffffffffffff6109d9926109c16001966109b0604051956109a587611528565b8d35875236906117e8565b6020860152369060608802016118d3565b60408401521660608201528c851660808201526119cf565b01610896565b8d80fd5b60248d7f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b60046040517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b50610a486040840184611fbc565b905082141561088b565b602090610a5d611edf565b82828701015201610565565b8280fd5b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013657602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013657610af661161c565b600073ffffffffffffffffffffffffffffffffffffffff6003547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b506020907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9082823601126101365760043567ffffffffffffffff808211610a695760e082600401948336030112610a6957610c2761161c565b60405193610c3485611528565b80359485815260248401928335908111610ddf5791610ca2610cbd9492610c64610ca795600436918a01016117e8565b8a820152610c7536604489016118d3565b6040820152610c9860c460a4890198610c8d8a611507565b6060850152016117d3565b60808201526119cf565b611911565b60405194610cb486611573565b855236906117e8565b92848101938452610d0e6040519485927ff17325e700000000000000000000000000000000000000000000000000000000845287600485015251602484015251604060448401526064830190611944565b0390848473ffffffffffffffffffffffffffffffffffffffff938134867f0000000000000000000000000000000000000000000000000000000000000000165af1938415610dd4578394610da3575b50610d696040916119ae565b92848152600186522091167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055604051908152f35b9093508481813d8311610dcd575b610dbb81836115db565b81010312610a69575192610d69610d5d565b503d610db1565b6040513d85823e3d90fd5b8580fd5b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610136576040519080805491600183811c92818516948515610f3a575b6020958686108114610f0d57858852879493929187908215610ecc575050600114610e73575b5050610e5f925003836115db565b6101326040519282849384528301906114c4565b908592508180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310610eb4575050610e5f93508201013880610e51565b80548389018501528794508693909201918101610e9c565b91509350610e5f9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013880610e51565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b93607f1693610e2b565b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760206040517f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78152f35b50346101365760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365773ffffffffffffffffffffffffffffffffffffffff6040602092600435815260018452205416604051908152f35b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760043567ffffffffffffffff811161146c57611046903690600401611470565b9061104f61161c565b61105882611ec7565b9161106660405193846115db565b8083527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061109382611ec7565b01845b81811061145557505090835b8281106112015750505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610a69579082906040519283917f4cb7e9e5000000000000000000000000000000000000000000000000000000008352602483016020600485015281518091526044840190602060448260051b87010193019186905b82821061116a5750505050828091039134905af180156104ba5761115e575080f35b6111679061158f565b80f35b9295847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc929593969850030182528451602060608160408501938051865201519360408382015284518094520192019089905b8082106111df575050506020806001929601920192019287959387959361113c565b90919260206040600192828751805183520151838201520194019201906111bd565b61120f818484959794611ef9565b9160a083360312610136576040519361122785611528565b83358552602084013567ffffffffffffffff8111610a69578401601f9436868301121561141c57813561125981611ec7565b9261126760405194856115db565b81845260208085019260061b8201019036821161079557602001915b8183106114245750505060208701918252604081013567ffffffffffffffff81116114205781019536908701121561141c578535956112c187611ec7565b966112cf60405198896115db565b80885260206060818a0192028301019136831161079557602001905b828210611402575050506080611318918760408a015261130d60608201611507565b60608a0152016117d3565b60808701525193845180159182156113f6575b5050610a1057815b84518110156113b957806113b361134c60019388612010565b5188519061135e8460408c0151612010565b5173ffffffffffffffffffffffffffffffffffffffff60608c0151169067ffffffffffffffff60808d015116926040519461139886611528565b8552602085015260408401526060830152608082015261206a565b01611333565b50935160405191969360019392916113d083611573565b825260208201526113e18287612010565b526113ec8186612010565b50019190916110a2565b5114159050388061132b565b602060609161141136856118d3565b8152019101906112eb565b8380fd5b8480fd5b604083360312610795576020604091825161143e81611573565b853581528286013583820152815201920191611283565b602090611460611edf565b82828801015201611096565b5080fd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020808501948460051b01011161027157565b60005b8381106114b45750506000910152565b81810151838201526020016114a4565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611500815180928187528780880191016114a1565b0116010190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361027157565b60a0810190811067ffffffffffffffff82111761154457604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761154457604052565b67ffffffffffffffff811161154457604052565b6060810190811067ffffffffffffffff82111761154457604052565b6080810190811067ffffffffffffffff82111761154457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761154457604052565b73ffffffffffffffffffffffffffffffffffffffff60035416330361163d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014806117aa575b15611703577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176115445760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000046146116da565b359067ffffffffffffffff8216820361027157565b919060c083820312610271576040519067ffffffffffffffff60c083018181118482101761154457604052829461181e81611507565b845260209261182e8483016117d3565b848601526040820135801515810361027157604086015260608201356060860152608082013583811161027157820181601f8201121561027157803593841161154457604051916118a6867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f88011601846115db565b84835285858301011161027157848460a09695879660009401838601378301015260808501520135910152565b9190826060910312610271576040516118eb816115a3565b8092803560ff811681036102715760409182918452602081013560208501520135910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181360301821215610271570190565b9073ffffffffffffffffffffffffffffffffffffffff825116815267ffffffffffffffff60208301511660208201526040820151151560408201526060820151606082015260a0806119a5608085015160c0608086015260c08501906114c4565b93015191015290565b3573ffffffffffffffffffffffffffffffffffffffff811681036102715790565b608081019067ffffffffffffffff808351168015159081611b43575b50611b19576020820151906040938484015193611a0785611dd7565b80519173ffffffffffffffffffffffffffffffffffffffff9485815116918560208301511691898101511515876080606084015193015160208151910120935116938b519560208701987f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78a528d8801526060870152608086015260a085015260c084015260e0830152610100908183015281526101208101938185109085111761154457611ae395611ac6606094611adb9388978b52519020611d85565b9060ff81511689602083015192015192611ce9565b959095611b50565b015116911603611af05750565b600490517f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1ab7da6b000000000000000000000000000000000000000000000000000000008152fd5b90508142161015386119eb565b6005811015611cba5780611b615750565b60018103611bc75760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b60028103611c2d5760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b600314611c3657565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611d795791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611d6c57815173ffffffffffffffffffffffffffffffffffffffff811615611d66579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b611d8d61169b565b906040519060208201927f190100000000000000000000000000000000000000000000000000000000000084526022830152604282015260428152611dd1816115bf565b51902090565b80519060406020820151910151604051917fff00000000000000000000000000000000000000000000000000000000000000602084019460f81b1684526021830152604182015260418152611e2b816115bf565b60ff6040516020818451611e408183896114a1565b810160028152030190205416611e9d57611e68916020916040519384928392519283916114a1565b8101600281520301902060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b60046040517fcce9a824000000000000000000000000000000000000000000000000000000008152fd5b67ffffffffffffffff81116115445760051b60200190565b60405190611eec82611573565b6060602083600081520152565b9190811015611f395760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6181360301821215610271570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610271570180359067ffffffffffffffff821161027157602001918160051b3603831361027157565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610271570180359067ffffffffffffffff82116102715760200191606082023603831361027157565b8051821015611f395760209160051b010190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc6040910112610271576040519061205b82611573565b60243582526044356020830152565b608081019067ffffffffffffffff9081835116801515908161218e575b50611b19576020810151918251600052600160205273ffffffffffffffffffffffffffffffffffffffff9260409484866000205416801561216557330361213c5792611adb859493611ac6606094611ae398968a860151936120e885611dd7565b865192519151168b519160208301937f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d85528d8401528883015260808201526080815261213481611528565b519020611d85565b600486517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b600487517fc5723b51000000000000000000000000000000000000000000000000000000008152fd5b905082421610153861208756fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.PermissionedEIP712Proxy__factory=f},41772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionedEIP712Proxy__factory=void 0;var n=r(71871);Object.defineProperty(t,"PermissionedEIP712Proxy__factory",{enumerable:!0,get:function(){return n.PermissionedEIP712Proxy__factory}})},28457:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Proxy__factory=t.examples=void 0,t.examples=o(r(41772));var f=r(44726);Object.defineProperty(t,"EIP712Proxy__factory",{enumerable:!0,get:function(){return f.EIP712Proxy__factory}})},82494:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry__factory=t.ISchemaRegistry__factory=t.IEAS__factory=t.EAS__factory=t.resolver=t.eip712=void 0,t.eip712=o(r(37444)),t.resolver=o(r(68892));var f=r(19530);Object.defineProperty(t,"EAS__factory",{enumerable:!0,get:function(){return f.EAS__factory}});var a=r(81009);Object.defineProperty(t,"IEAS__factory",{enumerable:!0,get:function(){return a.IEAS__factory}});var s=r(41693);Object.defineProperty(t,"ISchemaRegistry__factory",{enumerable:!0,get:function(){return s.ISchemaRegistry__factory}});var c=r(19259);Object.defineProperty(t,"SchemaRegistry__factory",{enumerable:!0,get:function(){return c.SchemaRegistry__factory}})},99227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISchemaResolver__factory=void 0;const n=r(86623),i=[{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"}];t.ISchemaResolver__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},73464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaResolver__factory=void 0;const n=r(86623),i=[{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];t.SchemaResolver__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},99786:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"OutOfBounds",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"start",type:"uint256"}],name:"toBytes32",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60a03461008957601f61088d38819003918201601f19168301916001600160401b0383118484101761008e5780849260209460405283398101031261008957516001600160a01b0381168082036100895715610077576080526040516107e890816100a5823960805181818161063401526107670152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001e575b361561001957600080fd5b6104a5565b60003560e01c806388e5b2d91461008e57806391db0b7e1461008957806399dd9bd714610084578063ce46e0461461007f578063e49617e11461007a578063e60c3505146100755763ffa1ad740361000e576103d6565b6103bb565b61039e565b610313565b61026b565b610156565b60206100ad61009c366100ed565b926100a892919261061d565b6105da565b6040519015158152f35b9181601f840112156100e85782359167ffffffffffffffff83116100e8576020808501948460051b0101116100e857565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126100e85767ffffffffffffffff916004358381116100e85782610138916004016100b7565b939093926024359182116100e857610152916004016100b7565b9091565b60206100ad610164366100ed565b9261017092919261061d565b610553565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176101c057604052565b610175565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176101c057604052565b92919267ffffffffffffffff82116101c0576040519161024e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846101c5565b8294818452818301116100e8578281602093846000960137010152565b346100e85760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e85760043567ffffffffffffffff81116100e857366023820112156100e8576102cb903690602481600401359101610206565b60243590805160208301116102e95701602090810151604051908152f35b60046040517fb4120f14000000000000000000000000000000000000000000000000000000008152fd5b346100e85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e857602060405160008152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126100e8576004359167ffffffffffffffff83116100e85782610140920301126100e85760040190565b6103a73661034d565b506103b061061d565b602060405160018152f35b60206100ad6103c93661034d565b6103d161061d565b6106aa565b346100e85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e8576040805190610413826101a4565b6004825260207f302e323700000000000000000000000000000000000000000000000000000000818401528151928184928352815191828285015260005b83811061048f575050600083830185015250601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518782018701528694508201610451565b60046040517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561050e5760051b0190565b6104cf565b919081101561050e5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156100e8570190565b909192349160009182935b8585106105715750505050505050600190565b61057c8583896104fe565b35908082116105b0576105936103d1878987610513565b156105a557906001910394019361055e565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b92600090345b8383106105f257505050505050600190565b6105fd8383876104fe565b358181116105b05760019161061385878a610513565b50039201916105e0565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361065c57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b908160209103126100e8575180151581036100e85790565b6040513d6000823e3d90fd5b610120810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156100e8570180359067ffffffffffffffff82116100e8576020019080360382136100e85761071661071161074e936020933691610206565b6107cb565b604051809381927fe30bb563000000000000000000000000000000000000000000000000000000008352600483019190602083019252565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c65760009161079b575090565b6107bc915060203d81116107bf575b6107b481836101c5565b810190610686565b90565b503d6107aa565b61069e565b60208151106102e957602001519056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.AttestationResolver__factory=f},25432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttesterResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"address",name:"targetAttester",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009e57601f61062738819003918201601f19168301916001600160401b038311848410176100a357808492604094855283398101031261009e5780516001600160a01b03918282169081830361009e5760200151928316830361009e571561008c5760805260a05260405161056d90816100ba8239608051816104c5015260a0518161053c0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610517565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b60e0013573ffffffffffffffffffffffffffffffffffffffff8082168092036102e9577f000000000000000000000000000000000000000000000000000000000000000016149056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.AttesterResolver__factory=f},1902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60a03461008257601f6106bc38819003918201601f19168301916001600160401b038311848410176100875780849260209460405283398101031261008257516001600160a01b03811680820361008257156100705760805260405161061e908161009e8239608051816104c50152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610568565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102e9570180359067ffffffffffffffff82116102e9576020019181360383136102e957565b610120810190600161057a8383610517565b905014918261058857505090565b9091506105958183610517565b919091156103b8577fff0000000000000000000000000000000000000000000000000000000000000080923516159283156105d1575b50505090565b6105dc929350610517565b919091156103b8577f0100000000000000000000000000000000000000000000000000000000000000913516143880806105cb56fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.DataResolver__factory=f},61583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpirationTimeResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"uint256",name:"validAfter",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009457601f61061038819003918201601f19168301916001600160401b038311848410176100995780849260409485528339810103126100945780516001600160a01b03811691828203610094576020015191156100825760805260a05260405161056090816100b08239608051816104c5015260a0518161052f0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610517565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b6060013567ffffffffffffffff81168091036102e9577f000000000000000000000000000000000000000000000000000000000000000011159056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.ExpirationTimeResolver__factory=f},71545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PayingResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"uint256",name:"incentive",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"InvalidValue",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009b57601f6108ab38819003918201601f19168301916001600160401b038311848410176100a057808492604094855283398101031261009b5780516001600160a01b0381169182820361009b576020015191156100895760805260a0526040516107f490816100b782396080518161049a015260a05181818161053b015261058b0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe604060808152600436101561001d575b50361561001b57600080fd5b005b600090813560e01c806388e5b2d91461021357806391db0b7e146101f3578063ce46e046146101ba578063e49617e11461019c578063e60c3505146101755763ffa1ad741461006c575061000f565b3461017157817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017157805181810181811067ffffffffffffffff821117610144578252600481526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061012e57505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016100f2565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b5080fd5b602082610193610184366102d2565b61018c610483565b349061050d565b90519015158152f35b6020826101936101ab366102d2565b6101b3610483565b3490610589565b503461017157817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610171576020905160018152f35b60208261019361020236610269565b9261020e929192610483565b6103a2565b60208261019361022236610269565b9261022e929192610483565b61042d565b9181601f840112156102645782359167ffffffffffffffff8311610264576020808501948460051b01011161026457565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102645767ffffffffffffffff9160043583811161026457826102b491600401610233565b93909392602435918211610264576102ce91600401610233565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc90602082820112610264576004359167ffffffffffffffff83116102645782610140920301126102645760040190565b91908110156103335760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103335760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec181360301821215610264570190565b91926000918291345b8285106103be5750505050505050600190565b6103c9858389610323565b3590808211610403576103e6826103e188878b610362565b61050d565b156103f85790600191039401936103ab565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b91926000918291345b8285106104495750505050505050600190565b610454858389610323565b3590808211610403576104718261046c88878b610362565b610589565b156103f8579060019103940193610436565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104c257565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036102645790565b90610583576000808073ffffffffffffffffffffffffffffffffffffffff61053860e08396016104ec565b167f00000000000000000000000000000000000000000000000000000000000000009082821561057a575bf11561056e57600190565b6040513d6000823e3d90fd5b506108fc610563565b50600090565b7f0000000000000000000000000000000000000000000000000000000000000000908183106107df578183116105c2575b505050600190565b6105e360e073ffffffffffffffffffffffffffffffffffffffff92016104ec565b169082039182116107b0578147106107525760008080809481945af1903d1561074c5767ffffffffffffffff903d82811161071f57604051927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f8501160116840190848210908211176106f257604052825260203d92013e5b1561066e573880806105ba565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b50610661565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50505060009056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.PayingResolver__factory=f},89796:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecipientResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"address",name:"targetRecipient",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009e57601f61062738819003918201601f19168301916001600160401b038311848410176100a357808492604094855283398101031261009e5780516001600160a01b03918282169081830361009e5760200151928316830361009e571561008c5760805260a05260405161056d90816100ba8239608051816104c5015260a0518161053c0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610517565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b60c0013573ffffffffffffffffffffffffffffffffffffffff8082168092036102e9577f000000000000000000000000000000000000000000000000000000000000000016149056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.RecipientResolver__factory=f},94381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RevocationResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"status",type:"bool"}],name:"setRevocation",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60a03461008257601f61064438819003918201601f19168301916001600160401b038311848410176100875780849260209460405283398101031261008257516001600160a01b0381168082036100825715610070576080526040516105a6908161009e8239608051816105470152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461030b57806391db0b7e14610289578063ce46e04614610250578063e49617e11461022d578063e60c350514610211578063f545cb66146101a35763ffa1ad741461009b5750610011565b913461019f57827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019f5781519082820182811067ffffffffffffffff82111761017357835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015d57505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610121565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b50823461020d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261020d573580151580910361020d5760ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00835416911617815580f35b5080fd5b60208361021d366103d3565b50610226610530565b5160018152f35b60208360ff8461023c366103d3565b50610245610530565b541690519015158152f35b50903461020d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261020d5751908152602090f35b50916102943661036a565b6102a396939296949194610530565b345b8785106102b6576020875160018152f35b6102c1858388610424565b35908082116102e357906001916102d9878b88610463565b50039401936102a5565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b60208361032b61031a3661036a565b92610326929192610530565b6104a3565b90519015158152f35b9181601f840112156103655782359167ffffffffffffffff8311610365576020808501948460051b01011161036557565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126103655767ffffffffffffffff9160043583811161036557826103b591600401610334565b93909392602435918211610365576103cf91600401610334565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc90602082820112610365576004359167ffffffffffffffff83116103655782610140920301126103655760040190565b91908110156104345760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156104345760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec181360301821215610365570190565b91929034600091829360ff84541615925b8286106104c8575050505050505050600190565b6104d386838a610424565b359080821161050657846104e888868b610463565b506104fa5790600191039501946104b4565b50505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361056f57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.RevocationResolver__factory=f},18353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"contract IERC20",name:"targetToken",type:"address"},{internalType:"uint256",name:"targetAmount",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60e0346100b357601f61096e38819003918201601f19168301916001600160401b038311848410176100b8578084926060946040528339810103126100b35780516001600160a01b03808216929091908382036100b357602081015192831683036100b3576040015192156100a15760805260a05260c05260405161089f90816100cf8239608051816104e9015260a051816105e3015260c0518161059b0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d9146101a957806391db0b7e14610189578063ce46e0461461014c578063e49617e114610130578063e60c35051461010b5763ffa1ad74146100905750610011565b91903461010757827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101075761010392508051916100d18361031b565b82527f302e32370000000000000000000000000000000000000000000000000000000060208301525191829182610366565b0390f35b8280fd5b60208361012761011a366102ca565b6101226104d2565b61053b565b90519015158152f35b60208361013c366102ca565b506101456104d2565b5160018152f35b50903461018557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101855751908152602090f35b5080fd5b60208361012761019836610261565b926101a49291926104d2565b61044b565b50916101b436610261565b6101c3969392969491946104d2565b345b8785106101d6576020875160018152f35b6101e18583886103cc565b359080821161020357906001916101f9878b8861040b565b50039401936101c5565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f8401121561025c5782359167ffffffffffffffff831161025c576020808501948460051b01011161025c57565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261025c5767ffffffffffffffff9160043583811161025c57826102ac9160040161022b565b9390939260243591821161025c576102c69160040161022b565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9060208282011261025c576004359167ffffffffffffffff831161025c57826101409203011261025c5760040190565b6040810190811067ffffffffffffffff82111761033757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60208082528251818301819052939260005b8581106103b8575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610378565b91908110156103dc5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103dc5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec18136030182121561025c570190565b909192349160009182935b8585106104695750505050505050600190565b6104748583896103cc565b35908082116104a85761048b61012287898761040b565b1561049d579060019103940193610456565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361051157565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b60e001359073ffffffffffffffffffffffffffffffffffffffff9182811680910361025c5760405190602091828101917f23b872dd00000000000000000000000000000000000000000000000000000000835260248201523060448201527f000000000000000000000000000000000000000000000000000000000000000060648201526064815260a081019067ffffffffffffffff958183108784111761033757826040527f0000000000000000000000000000000000000000000000000000000000000000169061060d8361031b565b8483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c0820152600080948192519082855af13d156107be573d9187831161079157604051927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f8401160116840198848a10908a1117610764576106a69596979860405283528286883d92013e6107ca565b8051806106b7575b50505050600190565b81849181010312610185578201519081159182150361076157506106dd578080806106ae565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b80fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6106a693949596506060915b9192901561084557508151156107de575090565b3b156107e75790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156108585750805190602001fd5b61088e906040519182917f08c379a000000000000000000000000000000000000000000000000000000000835260048301610366565b0390fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r,n){return super.deploy(e,t,r,n||{})}getDeployTransaction(e,t,r,n){return super.getDeployTransaction(e,t,r,n||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.TokenResolver__factory=f},2109:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"uint256",name:"targetValue",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009b57601f6105fd38819003918201601f19168301916001600160401b038311848410176100a057808492604094855283398101031261009b5780516001600160a01b0381169182820361009b576020015191156100895760805260a05260405161054690816100b78239608051816104e7015260a05181818161018e01526104310152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610020575b5050361561001e57600080fd5b005b600091823560e01c806388e5b2d91461023657806391db0b7e1461020d578063ce46e046146101cf578063e49617e1146101b3578063e60c3505146101765763ffa1ad741461006f5750610011565b3461017257827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101725781519082820182811067ffffffffffffffff82111761014657835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061013057505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016100f4565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b60208361018236610356565b5061018b6104d0565b517f000000000000000000000000000000000000000000000000000000000000000034148152f35b6020836101bf36610356565b506101c86104d0565b5160018152f35b50503461020957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610209576020905160018152f35b5080fd5b60208361022d61021c366102ed565b926102289291926104d0565b610426565b90519015158152f35b50610240366102ed565b61024f969392969491946104d0565b345b878510610262576020875160018152f35b61026d8583886103a7565b359080821161028f5790600191610285878b886103e6565b5003940193610251565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e85782359167ffffffffffffffff83116102e8576020808501948460051b0101116102e857565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e85767ffffffffffffffff916004358381116102e85782610338916004016102b7565b939093926024359182116102e857610352916004016102b7565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e8576004359167ffffffffffffffff83116102e85782610140920301126102e85760040190565b91908110156103b75760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b75760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e8570190565b9192903460009182937f0000000000000000000000000000000000000000000000000000000000000000925b828610610466575050505050505050600190565b61047186838a6103a7565b35908082116104a65761048587858a6103e6565b5084820361049a579060019103950194610452565b50505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361050f57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.ValueResolver__factory=f},64158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueResolver__factory=t.TokenResolver__factory=t.RevocationResolver__factory=t.RecipientResolver__factory=t.PayingResolver__factory=t.ExpirationTimeResolver__factory=t.DataResolver__factory=t.AttesterResolver__factory=t.AttestationResolver__factory=void 0;var n=r(99786);Object.defineProperty(t,"AttestationResolver__factory",{enumerable:!0,get:function(){return n.AttestationResolver__factory}});var i=r(25432);Object.defineProperty(t,"AttesterResolver__factory",{enumerable:!0,get:function(){return i.AttesterResolver__factory}});var o=r(1902);Object.defineProperty(t,"DataResolver__factory",{enumerable:!0,get:function(){return o.DataResolver__factory}});var f=r(61583);Object.defineProperty(t,"ExpirationTimeResolver__factory",{enumerable:!0,get:function(){return f.ExpirationTimeResolver__factory}});var a=r(71545);Object.defineProperty(t,"PayingResolver__factory",{enumerable:!0,get:function(){return a.PayingResolver__factory}});var s=r(89796);Object.defineProperty(t,"RecipientResolver__factory",{enumerable:!0,get:function(){return s.RecipientResolver__factory}});var c=r(94381);Object.defineProperty(t,"RevocationResolver__factory",{enumerable:!0,get:function(){return c.RevocationResolver__factory}});var u=r(18353);Object.defineProperty(t,"TokenResolver__factory",{enumerable:!0,get:function(){return u.TokenResolver__factory}});var l=r(2109);Object.defineProperty(t,"ValueResolver__factory",{enumerable:!0,get:function(){return l.ValueResolver__factory}})},68892:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaResolver__factory=t.ISchemaResolver__factory=t.examples=void 0,t.examples=o(r(64158));var f=r(99227);Object.defineProperty(t,"ISchemaResolver__factory",{enumerable:!0,get:function(){return f.ISchemaResolver__factory}});var a=r(73464);Object.defineProperty(t,"SchemaResolver__factory",{enumerable:!0,get:function(){return a.SchemaResolver__factory}})},15148:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.contracts=t.openzeppelin=void 0,t.openzeppelin=o(r(27349)),t.contracts=o(r(82494))},23788:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry__factory=t.SchemaResolver__factory=t.ISchemaResolver__factory=t.ValueResolver__factory=t.TokenResolver__factory=t.RevocationResolver__factory=t.RecipientResolver__factory=t.PayingResolver__factory=t.ExpirationTimeResolver__factory=t.DataResolver__factory=t.AttesterResolver__factory=t.AttestationResolver__factory=t.ISchemaRegistry__factory=t.IEAS__factory=t.PermissionedEIP712Proxy__factory=t.EIP712Proxy__factory=t.EIP712Verifier__factory=t.EAS__factory=t.IERC20__factory=t.IERC20Metadata__factory=t.IERC20Permit__factory=t.ERC20__factory=t.Ownable__factory=t.factories=void 0,t.factories=o(r(15148));var f=r(10536);Object.defineProperty(t,"Ownable__factory",{enumerable:!0,get:function(){return f.Ownable__factory}});var a=r(92657);Object.defineProperty(t,"ERC20__factory",{enumerable:!0,get:function(){return a.ERC20__factory}});var s=r(17547);Object.defineProperty(t,"IERC20Permit__factory",{enumerable:!0,get:function(){return s.IERC20Permit__factory}});var c=r(38518);Object.defineProperty(t,"IERC20Metadata__factory",{enumerable:!0,get:function(){return c.IERC20Metadata__factory}});var u=r(28045);Object.defineProperty(t,"IERC20__factory",{enumerable:!0,get:function(){return u.IERC20__factory}});var l=r(19530);Object.defineProperty(t,"EAS__factory",{enumerable:!0,get:function(){return l.EAS__factory}});var d=r(13041);Object.defineProperty(t,"EIP712Verifier__factory",{enumerable:!0,get:function(){return d.EIP712Verifier__factory}});var h=r(44726);Object.defineProperty(t,"EIP712Proxy__factory",{enumerable:!0,get:function(){return h.EIP712Proxy__factory}});var p=r(71871);Object.defineProperty(t,"PermissionedEIP712Proxy__factory",{enumerable:!0,get:function(){return p.PermissionedEIP712Proxy__factory}});var y=r(81009);Object.defineProperty(t,"IEAS__factory",{enumerable:!0,get:function(){return y.IEAS__factory}});var b=r(41693);Object.defineProperty(t,"ISchemaRegistry__factory",{enumerable:!0,get:function(){return b.ISchemaRegistry__factory}});var g=r(99786);Object.defineProperty(t,"AttestationResolver__factory",{enumerable:!0,get:function(){return g.AttestationResolver__factory}});var m=r(25432);Object.defineProperty(t,"AttesterResolver__factory",{enumerable:!0,get:function(){return m.AttesterResolver__factory}});var v=r(1902);Object.defineProperty(t,"DataResolver__factory",{enumerable:!0,get:function(){return v.DataResolver__factory}});var w=r(61583);Object.defineProperty(t,"ExpirationTimeResolver__factory",{enumerable:!0,get:function(){return w.ExpirationTimeResolver__factory}});var A=r(71545);Object.defineProperty(t,"PayingResolver__factory",{enumerable:!0,get:function(){return A.PayingResolver__factory}});var E=r(89796);Object.defineProperty(t,"RecipientResolver__factory",{enumerable:!0,get:function(){return E.RecipientResolver__factory}});var _=r(94381);Object.defineProperty(t,"RevocationResolver__factory",{enumerable:!0,get:function(){return _.RevocationResolver__factory}});var k=r(18353);Object.defineProperty(t,"TokenResolver__factory",{enumerable:!0,get:function(){return k.TokenResolver__factory}});var T=r(2109);Object.defineProperty(t,"ValueResolver__factory",{enumerable:!0,get:function(){return T.ValueResolver__factory}});var S=r(99227);Object.defineProperty(t,"ISchemaResolver__factory",{enumerable:!0,get:function(){return S.ISchemaResolver__factory}});var x=r(73464);Object.defineProperty(t,"SchemaResolver__factory",{enumerable:!0,get:function(){return x.SchemaResolver__factory}});var P=r(19259);Object.defineProperty(t,"SchemaRegistry__factory",{enumerable:!0,get:function(){return P.SchemaRegistry__factory}})},58601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAS=void 0;const n=r(70655),i=r(7188),o=r(93580),f=r(20891),a=r(47340),s=r(23788),c=r(86623);n.__exportStar(r(93580),t);class u extends f.Base{proxy;delegated;offchain;constructor(e,t){const{signerOrProvider:r,proxy:n}=t||{};super(new s.EAS__factory,e,r),n&&(this.proxy=n)}connect(e){return delete this.delegated,delete this.offchain,super.connect(e),this}getVersion(){return this.contract.VERSION()}getAttestation(e){return this.contract.getAttestation(e)}isAttestationValid(e){return this.contract.isAttestationValid(e)}async isAttestationRevoked(e){const t=await this.contract.getAttestation(e);if(t.uid===a.ZERO_BYTES32)throw new Error("Invalid attestation");return!t.revocationTime.isZero()}getTimestamp(e){return this.contract.getTimestamp(e)}getRevocationOffchain(e,t){return this.contract.getRevokeOffchain(e,t)}getEIP712Proxy(){return this.proxy}getDelegated(){return this.delegated?this.delegated:this.setDelegated()}getOffchain(){return this.offchain?this.offchain:this.setOffchain()}async attest({schema:e,data:{recipient:t,data:r,expirationTime:n=o.NO_EXPIRATION,revocable:i=!0,refUID:s=a.ZERO_BYTES32,value:c=0}},u){const l=await this.contract.attest({schema:e,data:{recipient:t,expirationTime:n,revocable:i,refUID:s,data:r,value:c}},{value:c,...u});return new f.Transaction(l,(async e=>(await(0,a.getUIDsFromAttestEvents)(e.events))[0]))}async attestByDelegation({schema:e,data:{recipient:t,data:r,expirationTime:n=o.NO_EXPIRATION,revocable:i=!0,refUID:s=a.ZERO_BYTES32,value:c=0},attester:u,signature:l},d){const h=await this.contract.attestByDelegation({schema:e,data:{recipient:t,expirationTime:n,revocable:i,refUID:s,data:r,value:c},signature:l,attester:u},{value:c,...d});return new f.Transaction(h,(async e=>(await(0,a.getUIDsFromAttestEvents)(e.events))[0]))}async multiAttest(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({recipient:e.recipient,expirationTime:e.expirationTime??o.NO_EXPIRATION,revocable:e.revocable??!0,refUID:e.refUID??a.ZERO_BYTES32,data:e.data??a.ZERO_BYTES32,value:e.value??0})))}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiAttest(r,{value:n,...t});return new f.Transaction(i,(async e=>(0,a.getUIDsFromAttestEvents)(e.events)))}async multiAttestByDelegation(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({recipient:e.recipient,expirationTime:e.expirationTime??o.NO_EXPIRATION,revocable:e.revocable??!0,refUID:e.refUID??a.ZERO_BYTES32,data:e.data??a.ZERO_BYTES32,value:e.value??0}))),signatures:e.signatures,attester:e.attester}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiAttestByDelegation(r,{value:n,...t});return new f.Transaction(i,(async e=>(0,a.getUIDsFromAttestEvents)(e.events)))}async revoke({schema:e,data:{uid:t,value:r=0}},n){const i=await this.contract.revoke({schema:e,data:{uid:t,value:r}},{value:r,...n});return new f.Transaction(i,(async()=>{}))}async revokeByDelegation({schema:e,data:{uid:t,value:r=0},signature:n,revoker:i},o){const a=await this.contract.revokeByDelegation({schema:e,data:{uid:t,value:r},signature:n,revoker:i},{value:r,...o});return new f.Transaction(a,(async()=>{}))}async multiRevoke(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({uid:e.uid,value:e.value??0})))}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiRevoke(r,{value:n,...t});return new f.Transaction(i,(async()=>{}))}async multiRevokeByDelegation(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({uid:e.uid,value:e.value??0}))),signatures:e.signatures,revoker:e.revoker}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiRevokeByDelegation(r,{value:n,...t});return new f.Transaction(i,(async()=>{}))}attestByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.attestByDelegationProxy(e,t)}multiAttestByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.multiAttestByDelegationProxy(e,t)}revokeByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.revokeByDelegationProxy(e,t)}multiRevokeByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.multiRevokeByDelegationProxy(e,t)}async timestamp(e,t){const r=await this.contract.timestamp(e,t??{});return new f.Transaction(r,(async e=>(await(0,a.getTimestampFromTimestampEvents)(e.events))[0]))}async multiTimestamp(e,t){const r=await this.contract.multiTimestamp(e,t??{});return new f.Transaction(r,(async e=>(0,a.getTimestampFromTimestampEvents)(e.events)))}async revokeOffchain(e,t){const r=await this.contract.revokeOffchain(e,t??{});return new f.Transaction(r,(async e=>(await(0,a.getTimestampFromOffchainRevocationEvents)(e.events))[0]))}async multiRevokeOffchain(e,t){const r=await this.contract.multiRevokeOffchain(e,t??{});return new f.Transaction(r,(async e=>(0,a.getTimestampFromOffchainRevocationEvents)(e.events)))}getDomainSeparator(){return this.contract.getDomainSeparator()}getNonce(e){return this.contract.getNonce(e)}getAttestTypeHash(){return this.contract.getAttestTypeHash()}getRevokeTypeHash(){return this.contract.getRevokeTypeHash()}async setDelegated(){return this.delegated=new i.Delegated({address:this.contract.address,version:await this.getVersion(),chainId:await this.getChainId()}),this.delegated}async setOffchain(){return this.offchain=new i.Offchain({address:this.contract.address,version:await this.getVersion(),chainId:await this.getChainId()}),this.offchain}}t.EAS=u},30986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(58601),t),n.__exportStar(r(7188),t),n.__exportStar(r(93580),t),n.__exportStar(r(14095),t),n.__exportStar(r(9336),t),n.__exportStar(r(47340),t)},39634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelegatedProxy=t.REVOKE_PROXY_TYPE=t.ATTEST_PROXY_TYPE=t.REVOKE_PROXY_PRIMARY_TYPE=t.ATTEST_PROXY_PRIMARY_TYPE=t.REVOKE_PROXY_TYPED_SIGNATURE=t.ATTEST_PROXY_TYPED_SIGNATURE=void 0;const n=r(76664);t.ATTEST_PROXY_TYPED_SIGNATURE="Attest(bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint64 deadline)",t.REVOKE_PROXY_TYPED_SIGNATURE="Revoke(bytes32 schema,bytes32 uid,uint64 deadline)",t.ATTEST_PROXY_PRIMARY_TYPE="Attest",t.REVOKE_PROXY_PRIMARY_TYPE="Revoke",t.ATTEST_PROXY_TYPE=[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"},{name:"deadline",type:"uint64"}],t.REVOKE_PROXY_TYPE=[{name:"schema",type:"bytes32"},{name:"uid",type:"bytes32"},{name:"deadline",type:"uint64"}];class i extends n.TypedDataHandler{constructor(e){super(e)}signDelegatedProxyAttestation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.ATTEST_PROXY_PRIMARY_TYPE,message:e,types:{Attest:t.ATTEST_PROXY_TYPE}},r)}verifyDelegatedProxyAttestationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}signDelegatedProxyRevocation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.REVOKE_PROXY_PRIMARY_TYPE,message:e,types:{Revoke:t.REVOKE_PROXY_TYPE}},r)}verifyDelegatedProxyRevocationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}}t.DelegatedProxy=i},78161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delegated=t.REVOKE_TYPE=t.ATTEST_TYPE=t.REVOKE_PRIMARY_TYPE=t.ATTEST_PRIMARY_TYPE=t.REVOKE_TYPED_SIGNATURE=t.ATTEST_TYPED_SIGNATURE=t.EIP712_NAME=void 0;const n=r(76664);t.EIP712_NAME="EAS",t.ATTEST_TYPED_SIGNATURE="Attest(bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint256 nonce)",t.REVOKE_TYPED_SIGNATURE="Revoke(bytes32 schema,bytes32 uid,uint256 nonce)",t.ATTEST_PRIMARY_TYPE="Attest",t.REVOKE_PRIMARY_TYPE="Revoke",t.ATTEST_TYPE=[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"},{name:"nonce",type:"uint256"}],t.REVOKE_TYPE=[{name:"schema",type:"bytes32"},{name:"uid",type:"bytes32"},{name:"nonce",type:"uint256"}];class i extends n.TypedDataHandler{constructor(e){super({...e,name:t.EIP712_NAME})}signDelegatedAttestation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.ATTEST_PRIMARY_TYPE,message:e,types:{Attest:t.ATTEST_TYPE}},r)}verifyDelegatedAttestationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}signDelegatedRevocation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.REVOKE_PRIMARY_TYPE,message:e,types:{Revoke:t.REVOKE_TYPE}},r)}verifyDelegatedRevocationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}}t.Delegated=i},7188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(78161),t),n.__exportStar(r(39634),t),n.__exportStar(r(85214),t)},85214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Offchain=t.DOMAIN_NAME=t.ATTESTATION_TYPE=t.ATTESTATION_PRIMARY_TYPE=void 0;const n=r(47340),i=r(78161),o=r(76664),f=r(86623),{keccak256:a,toUtf8Bytes:s,defaultAbiCoder:c}=f.utils;t.ATTESTATION_PRIMARY_TYPE="Attestation",t.ATTESTATION_TYPE=[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"time",type:"uint64"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"}],t.DOMAIN_NAME="EAS Attestation";class u extends o.TypedDataHandler{constructor(e){super({...e,name:i.EIP712_NAME})}getDomainSeparator(){return a(c.encode(["bytes32","bytes32","uint256","address"],[a(s(t.DOMAIN_NAME)),a(s(this.config.version)),this.config.chainId,this.config.address]))}getDomainTypedData(){return{name:t.DOMAIN_NAME,version:this.config.version,chainId:this.config.chainId,verifyingContract:this.config.address}}async signOffchainAttestation(e,r){const n=u.getOffchainUID(e);return{...await this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.ATTESTATION_PRIMARY_TYPE,message:e,types:{Attest:t.ATTESTATION_TYPE}},r),uid:n}}verifyOffchainAttestationSignature(e,t){return t.uid===u.getOffchainUID(t.message)&&this.verifyTypedDataRequestSignature(e,t)}static getOffchainUID(e){return(0,n.getOffchainUID)(e.schema,e.recipient,e.time,e.expirationTime,e.revocable,e.refUID,e.data)}}t.Offchain=u},76664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataHandler=t.EIP712_DOMAIN=void 0;const n=r(47340),i=r(86623),{getAddress:o,verifyTypedData:f,hexlify:a,joinSignature:s,splitSignature:c,keccak256:u,toUtf8Bytes:l,defaultAbiCoder:d}=i.utils;t.EIP712_DOMAIN="EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)";t.TypedDataHandler=class{config;constructor(e){this.config=e}getDomainSeparator(){return u(d.encode(["bytes32","bytes32","bytes32","uint256","address"],[u(l(t.EIP712_DOMAIN)),u(l(this.config.name)),u(l(this.config.version)),this.config.chainId,this.config.address]))}getDomainTypedData(){return{name:this.config.name,version:this.config.version,chainId:this.config.chainId,verifyingContract:this.config.address}}async signTypedDataRequest(e,t,r){const n=await r._signTypedData(t.domain,t.types,e),i=c(n);return{...t,signature:{v:i.v,r:i.r,s:i.s}}}verifyTypedDataRequestSignature(e,t){if(e===n.ZERO_ADDRESS)throw new Error("Invalid address");const{signature:r}=t,i=s({v:r.v,r:a(r.r),s:a(r.s)}),c=f(t.domain,t.types,t.message,i);return o(e)===o(c)}}},93580:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NO_EXPIRATION=void 0,t.NO_EXPIRATION=0},14095:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaEncoder=void 0;const i=r(47340),o=r(86623),f=r(63039),{FunctionFragment:a,defaultAbiCoder:s,isBytesLike:c,formatBytes32String:u}=o.utils;class l{schema;constructor(e){this.schema=[];const t=e.replace(/ipfsHash/g,"bytes32"),r=a.from(`func(${t})`);s.getDefaultValue(r.inputs);for(const e of r.inputs){const{name:t,components:r}=e;let{type:n}=e,i=t?`${n} ${t}`:n;const o=t?` ${t}`:"";let f=n;const a=`(${(r||[]).map((e=>e.type)).join(",")})`,s=`(${(r||[]).map((e=>e.name?`${e.type} ${e.name}`:e.type)).join(",")})`;"tuple"===n?(n=a,i=`${s}${o}`):"tuple[]"===n?(n=`${a}[]`,i=`${s}[]${o}`):n.includes("[]")&&(f=f.replace("[]",""));const c=l.getDefaultValueForTypeName(f);this.schema.push({name:t,type:n,signature:i,value:n.includes("[]")?[]:c})}}encodeData(e){if(e.length!==this.schema.length)throw new Error("Invalid number or values");const t=[];for(const[r,n]of this.schema.entries()){const{type:i,name:o,value:f}=e[r],a=i.replace(/\s/g,"");if(a!==n.type&&a!==n.signature&&("ipfsHash"!==a||"bytes32"!==n.type))throw new Error(`Incompatible param type: ${a}`);if(o!==n.name)throw new Error(`Incompatible param name: ${o}`);t.push("bytes32"===n.type&&"ipfsHash"===n.name?l.decodeIpfsValue(f):"bytes32"!==n.type||"string"!=typeof f||c(f)?f:u(f))}return s.encode(this.signatures(),t)}decodeData(e){const t=s.decode(this.signatures(),e);return this.schema.map(((e,r)=>{const n=a.from(`func(${e.signature})`);if(1!==n.inputs.length)throw new Error(`Unexpected inputs: ${n.inputs}`);let i=t[r];const o=n.inputs[0],{components:f}=o;if(i.length>0&&f)if(Array.isArray(i[0])){const t=[];for(const e of i){const r=[],n=e.filter((e=>"object"!=typeof e));for(const[e,t]of n.entries()){const n=f[e];r.push({name:n.name,type:n.type,value:t})}t.push(r)}i={name:e.name,type:e.type,value:t}}else{const t=[],r=i.filter((e=>"object"!=typeof e));for(const[e,n]of r.entries()){const r=f[e];t.push({name:r.name,type:r.type,value:n})}i={name:e.name,type:e.type,value:t}}else i={name:e.name,type:e.type,value:i};return{name:e.name,type:e.type,signature:e.signature,value:i}}))}isEncodedDataValid(e){try{return this.decodeData(e),!0}catch(e){return!1}}static isCID(e){try{return f.CID.parse(e),!0}catch{return!1}}static encodeQmHash(e){const t=f.CID.parse(e);return s.encode(["bytes32"],[t.multihash.digest])}static decodeQmHash(e){const t=Uint8Array.from(n.from(e.slice(2),"hex")),r={digest:t,code:18,size:32,bytes:Uint8Array.from([18,32,...t])};return f.CID.createV0(r).toString()}static getDefaultValueForTypeName(e){return"bool"!==e&&(e.includes("uint")?"0":"address"===e?i.ZERO_ADDRESS:"")}static decodeIpfsValue(e){if(c(e))return l.encodeBytes32Value(e);try{const t=f.CID.parse(e);return s.encode(["bytes32"],[t.multihash.digest])}catch{return l.encodeBytes32Value(e)}}static encodeBytes32Value(e){try{return s.encode(["bytes32"],[e]),e}catch(t){return u(e)}}signatures(){return this.schema.map((e=>e.signature))}}t.SchemaEncoder=l},9336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry=void 0;const n=r(20891),i=r(47340),o=r(23788);class f extends n.Base{constructor(e,t){const{signerOrProvider:r}=t||{};super(new o.SchemaRegistry__factory,e,r)}getVersion(){return this.contract.VERSION()}async register({schema:e,resolverAddress:t=i.ZERO_ADDRESS,revocable:r=!0}){const o=await this.contract.register(e,t,r);return new n.Transaction(o,(async n=>(0,i.getSchemaUID)(e,t,r)))}async getSchema({uid:e}){const t=await this.contract.getSchema(e);if(t.uid===i.ZERO_BYTES32)throw new Error("Schema not found");return t}}t.SchemaRegistry=f},20891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=t.Transaction=void 0;t.Transaction=class{tx;waitCallback;constructor(e,t){this.tx=e,this.waitCallback=t}async wait(e){const t=await this.tx.wait(e);return this.waitCallback(t)}};t.Base=class{contract;constructor(e,t,r){this.contract=e.attach(t),r&&this.connect(r)}connect(e){return this.contract=this.contract.connect(e),this}async getChainId(){return(await this.contract.provider.getNetwork()).chainId}}},47340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimestampFromOffchainRevocationEvents=t.getTimestampFromTimestampEvents=t.getUIDsFromAttestEvents=t.getUIDFromDelegatedProxyAttestReceipt=t.getUIDFromDelegatedProxyAttestTx=t.getUIDFromMultiDelegatedProxyAttestReceipt=t.getUIDFromMultiDelegatedProxyAttestTx=t.getUIDFromAttestTx=t.getUIDsFromMultiAttestTx=t.getOffchainUID=t.getUID=t.getSchemaUID=t.ZERO_BYTES32=t.ZERO_BYTES=t.ZERO_ADDRESS=void 0;const n=r(23788),i=r(83893),o=r(86623),{solidityKeccak256:f,hexlify:a,toUtf8Bytes:s}=o.utils,{AddressZero:c}=o.constants;t.ZERO_ADDRESS=c,t.ZERO_BYTES="0x",t.ZERO_BYTES32="0x0000000000000000000000000000000000000000000000000000000000000000";t.getSchemaUID=(e,t,r)=>f(["string","address","bool"],[e,t,r]);t.getUID=(e,t,r,n,i,o,c,u,l)=>f(["bytes","address","address","uint64","uint64","bool","bytes32","bytes","uint32"],[a(s(e)),t,r,n,i,o,c,u,l]);t.getOffchainUID=(e,r,n,i,o,c,u)=>f(["bytes","address","address","uint64","uint64","bool","bytes32","bytes","uint32"],[a(s(e)),r,t.ZERO_ADDRESS,n,i,o,c,u,0]);t.getUIDsFromMultiAttestTx=async e=>{const r=await(await e).wait();return(0,t.getUIDsFromAttestEvents)(r.events)};t.getUIDFromAttestTx=async e=>(await(0,t.getUIDsFromMultiAttestTx)(e))[0];t.getUIDFromMultiDelegatedProxyAttestTx=async e=>(0,t.getUIDFromMultiDelegatedProxyAttestReceipt)((await e).wait());t.getUIDFromMultiDelegatedProxyAttestReceipt=async e=>{const r=await e,o=new i.Interface(n.EAS__factory.abi),f=[];for(const e of r.events||[])f.push({event:"Attested",args:await o.decodeEventLog("Attested",e.data,e.topics)});return(0,t.getUIDsFromAttestEvents)(f)};t.getUIDFromDelegatedProxyAttestTx=async e=>(await(0,t.getUIDFromMultiDelegatedProxyAttestTx)(e))[0];t.getUIDFromDelegatedProxyAttestReceipt=async e=>(await(0,t.getUIDFromMultiDelegatedProxyAttestReceipt)(e))[0];t.getUIDsFromAttestEvents=e=>{if(!e)return[];const t=e.filter((e=>"Attested"===e.event));if(0===t.length)throw new Error("Unable to process attestation events");return t.map((e=>e.args?.uid))};t.getTimestampFromTimestampEvents=e=>{if(!e)return[];const t=e.filter((e=>"Timestamped"===e.event));if(0===t.length)throw new Error("Unable to process attestation events");return t.map((e=>e.args?.timestamp))};t.getTimestampFromOffchainRevocationEvents=e=>{if(!e)return[];const t=e.filter((e=>"RevokedOffchain"===e.event));if(0===t.length)throw new Error("Unable to process offchain revocation events");return t.map((e=>e.args?.timestamp))}},95851:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="abi/5.7.0"},72734:(e,t,r)=>{"use strict";r.d(t,{R:()=>M,$:()=>O});var n=r(93286),i=r(53587),o=r(80711),f=r(95851),a=r(61184),s=r(64594);class c extends a.XI{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,s.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,s.getAddress)((0,n.hexZeroPad)(e.readValue().toHexString(),20))}}class u extends a.XI{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const l=new o.Logger(f.i);function d(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||l.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&l.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else l.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&l.throwArgumentError("types/value length mismatch","tuple",r);let i=new a.QV(e.wordSize),f=new a.QV(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=f.length;e.encode(f,r);let n=i.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(i,r)})),s.forEach((e=>{e(i.length)}));let c=e.appendWriter(i);return c+=e.appendWriter(f),c}function h(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),f=n.subReader(r.toNumber());try{i=t.decode(f)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let e=0;e{throw t}})}return Object.freeze(r)}class p extends a.XI{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&l.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return d(e,this.coders,t)}decode(e){return e.coerce(this.name,h(e,this.coders))}}var S=r(11388);const x=new o.Logger(f.i),P=new RegExp(/^bytes([0-9]*)$/),I=new RegExp(/^(u?int)([0-9]*)$/);class M{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new c(e.name);case"bool":return new y(e.name);case"string":return new k(e.name);case"bytes":return new g(e.name);case"array":return new p(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new T((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new v(e.name)}let t=e.type.match(I);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&x.throwArgumentError("invalid "+t[1]+" bit length","param",e),new E(r/8,"int"===t[1],e.name)}if(t=e.type.match(P),t){let r=parseInt(t[1]);return(0===r||r>32)&&x.throwArgumentError("invalid bytes length","param",e),new m(r,e.name)}return x.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new a.Ej(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new a.QV(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(S._R.from(e))));return new T(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&x.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(S._R.from(e)))),n=new T(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const i=e.map((e=>this._getCoder(S._R.from(e))));return new T(i,"_").decode(this._getReader((0,n.arrayify)(t),r))}}const O=new M},61184:(e,t,r)=>{"use strict";r.d(t,{BR:()=>c,Ej:()=>d,QV:()=>l,XI:()=>u});var n=r(93286),i=r(2593),o=r(53587),f=r(80711),a=r(95851);const s=new f.Logger(a.i);function c(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class u{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){s.throwArgumentError(e,this.localName,t)}}class l{constructor(e){(0,o.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.concat)(e._data))}writeBytes(e){let t=(0,n.arrayify)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.arrayify)(i.O$.from(e));return t.length>this.wordSize&&s.throwError("value out-of-bounds",f.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.concat)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class d{constructor(e,t,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(e)),(0,o.defineReadOnly)(this,"wordSize",t||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):d.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:s.throwError("data out-of-bounds",f.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new d(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},11388:(e,t,r)=>{"use strict";r.d(t,{HY:()=>g,IC:()=>T,QV:()=>m,Xg:()=>E,YW:()=>_,_R:()=>y,pc:()=>h});var n=r(2593),i=r(53587),o=r(80711),f=r(95851);const a=new o.Logger(f.i),s={};let c={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function l(e,t){if("bytes"===e||"string"===e){if(c[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(c[t]||"payable"===t)&&a.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class y{constructor(e,t){e!==s&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(p);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:y.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?y.fromString(e,t):y.fromObject(e)}static fromObject(e){return y.isParamType(e)?e:new y(s,{name:e.name||null,type:S(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(y.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){a.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},f=o;for(let r=0;ry.fromString(e,t)))}class g{constructor(e,t){e!==s&&a.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return g.isFragment(e)?e:"string"==typeof e?g.fromString(e):g.fromObject(e)}static fromObject(e){if(g.isFragment(e))return e;switch(e.type){case"function":return _.fromObject(e);case"event":return m.fromObject(e);case"constructor":return E.fromObject(e);case"error":return T.fromObject(e);case"fallback":case"receive":return null}return a.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?m.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?_.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?E.fromString(e.trim()):"error"===e.split(" ")[0]?T.fromString(e.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class m extends g{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?m.fromString(e):m.fromObject(e)}static fromObject(e){if(m.isEventFragment(e))return e;"event"!==e.type&&a.throwArgumentError("invalid event object","value",e);const t={name:P(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(y.fromObject):[],type:"event"};return new m(s,t)}static fromString(e){let t=e.match(I);t||a.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:a.warn("unknown modifier: "+e)}})),m.fromObject({name:t[1].trim(),anonymous:r,inputs:b(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function v(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&a.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||a.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.O$.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function A(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&a.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&a.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||a.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&a.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&a.throwArgumentError("unable to determine stateMutability","value",e),t}class E extends g{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===h.sighash&&a.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?E.fromString(e):E.fromObject(e)}static fromObject(e){if(E.isConstructorFragment(e))return e;"constructor"!==e.type&&a.throwArgumentError("invalid constructor object","value",e);let t=A(e);t.constant&&a.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new E(s,r)}static fromString(e){let t={type:"constructor"},r=(e=v(e,t)).match(I);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",e),t.inputs=b(r[2].trim(),!1),w(r[3].trim(),t),E.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class _ extends E{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isFunctionFragment(e))return e;"function"!==e.type&&a.throwArgumentError("invalid function object","value",e);let t=A(e);const r={type:e.type,name:P(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(y.fromObject):[],outputs:e.outputs?e.outputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new _(s,r)}static fromString(e){let t={type:"function"},r=(e=v(e,t)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",e);let n=r[0].match(I);if(n||a.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&P(t.name),t.inputs=b(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(I);""==n[1].trim()&&""==n[3].trim()||a.throwArgumentError("unexpected tokens","value",e),t.outputs=b(n[2],!1)}else t.outputs=[];return _.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function k(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||a.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class T extends g{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?T.fromString(e):T.fromObject(e)}static fromObject(e){if(T.isErrorFragment(e))return e;"error"!==e.type&&a.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:P(e.name),inputs:e.inputs?e.inputs.map(y.fromObject):[]};return k(new T(s,t))}static fromString(e){let t={type:"error"},r=e.match(I);return r||a.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&P(t.name),t.inputs=b(r[2],!1),k(T.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function S(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const x=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function P(e){return e&&e.match(x)||a.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const I=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},83893:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>i.R,ConstructorFragment:()=>n.Xg,ErrorFragment:()=>n.IC,EventFragment:()=>n.QV,FormatTypes:()=>n.pc,Fragment:()=>n.HY,FunctionFragment:()=>n.YW,Indexed:()=>o.Hk,Interface:()=>o.vU,LogDescription:()=>o.CC,ParamType:()=>n._R,TransactionDescription:()=>o.vk,checkResultErrors:()=>f.BR,defaultAbiCoder:()=>i.$});var n=r(11388),i=r(72734),o=r(8198),f=r(61184)},8198:(e,t,r)=>{"use strict";r.d(t,{CC:()=>p,Hk:()=>g,vU:()=>w,vk:()=>y});var n=r(64594),i=r(2593),o=r(93286),f=r(32046),a=r(38197),s=r(53587),c=r(72734),u=r(11388),l=r(80711),d=r(95851);const h=new l.Logger(d.i);class p extends s.Description{}class y extends s.Description{}class b extends s.Description{}class g extends s.Description{static isIndexed(e){return!(!e||!e._isIndexed)}}const m={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function v(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class w{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,s.defineReadOnly)(this,"fragments",t.map((e=>u.HY.from(e))).filter((e=>null!=e))),(0,s.defineReadOnly)(this,"_abiCoder",(0,s.getStatic)(new.target,"getAbiCoder")()),(0,s.defineReadOnly)(this,"functions",{}),(0,s.defineReadOnly)(this,"errors",{}),(0,s.defineReadOnly)(this,"events",{}),(0,s.defineReadOnly)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void h.warn("duplicate definition - constructor"):void(0,s.defineReadOnly)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?h.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,s.defineReadOnly)(this,"deploy",u.Xg.from({payable:!1,type:"constructor"})),(0,s.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=u.pc.full),e===u.pc.sighash&&h.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===u.pc.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return c.$}static getAddress(e){return(0,n.getAddress)(e)}static getSighash(e){return(0,o.hexDataSlice)((0,f.id)(e.format()),0,4)}static getEventTopic(e){return(0,f.id)(e.format())}getFunction(e){if((0,o.isHexString)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];h.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching function","name",t):r.length>1&&h.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];h.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching event","name",t):r.length>1&&h.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[u.QV.fromString(e).format()];return t||h.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.isHexString)(e)){const t=(0,s.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}h.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching error","name",t):r.length>1&&h.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,s.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,s.getStatic)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,o.arrayify)(t),n=null,i="",f=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=(0,o.hexlify)(r.slice(0,4)),t=m[e];if(t)f=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.signature,t.reason&&(n=f[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(f[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${f[0]}`);else try{const t=this.getError(e);f=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.format()}catch(e){}break}}return h.throwError("call revert exception"+i,l.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.hexlify)(t),errorArgs:f,errorName:a,errorSignature:s,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&h.throwError("too many arguments for "+e.format(),l.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,f.id)(t):"bytes"===e.type?(0,a.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.hexZeroPad)((0,o.hexlify)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?h.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&h.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&h.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const s=t[o];if(e.indexed)if("string"===e.type)r.push((0,f.id)(s));else if("bytes"===e.type)r.push((0,a.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),i.push(s)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t||h.throwError("fragment/topic mismatch",l.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],f=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u._R.fromObject({type:"bytes32",name:e.name})),f.push(!0)):(n.push(e),f.push(!1)):(i.push(e),f.push(!1))}));let a=null!=r?this._abiCoder.decode(n,(0,o.concat)(r)):null,s=this._abiCoder.decode(i,t,!0),c=[],d=0,p=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)c[t]=new g({_isIndexed:!0,hash:null});else if(f[t])c[t]=new g({_isIndexed:!0,hash:a[p++]});else try{c[t]=a[p++]}catch(e){c[t]=e}else try{c[t]=s[d++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){const r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw v(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}}));for(let e=0;e{throw v(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new y({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new p({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,o.hexlify)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new b({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},64353:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>s,zt:()=>c});var n=r(2593),i=r(53587),o=r(80711);var f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const a=new o.Logger("abstract-provider/5.7.0");class s extends i.Description{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class c{constructor(){a.checkAbstract(new.target,c),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return f(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,f=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,f=n.O$.from("1500000000"),o=e.baseFeePerGas.mul(2).add(f)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:f,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},48171:(e,t,r)=>{"use strict";r.d(t,{E:()=>c,b:()=>u});var n=r(53587),i=r(80711);var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const f=new i.Logger("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],s=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){f.checkAbstract(new.target,c),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===a.indexOf(t)&&f.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=(0,n.shallowCopy)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&f.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.resolveProperties)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&f.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||f.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):f.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&f.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):f.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(s.indexOf(e.code)>=0)throw e;return f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&f.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.resolveProperties)(t)}))}_checkProvider(e){this.provider||f.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class u extends c{constructor(e,t){super(),(0,n.defineReadOnly)(this,"address",e),(0,n.defineReadOnly)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{f.throwError(e,i.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new u(this.address,e)}}},64594:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAddress:()=>h,getContractAddress:()=>b,getCreate2Address:()=>g,getIcapAddress:()=>y,isAddress:()=>p});var n=r(93286),i=r(2593),o=r(38197),f=r(61843);const a=new(r(80711).Logger)("address/5.7.0");function s(e){(0,n.isHexString)(e,20)||a.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);const u=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));var l;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=u;){let e=t.substring(0,u);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function h(e){let t=null;if("string"!=typeof e&&a.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=s(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&a.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==d(e)&&a.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=s("0x"+t)}else a.throwArgumentError("invalid address","address",e);return t}function p(e){try{return h(e),!0}catch(e){}return!1}function y(e){let t=(0,i.t2)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function b(e){let t=null;try{t=h(e.from)}catch(t){a.throwArgumentError("missing from address","transaction",e)}const r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(e.nonce).toHexString()));return h((0,n.hexDataSlice)((0,o.keccak256)((0,f.encode)([t,r])),12))}function g(e,t,r){return 32!==(0,n.hexDataLength)(t)&&a.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),h((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",h(e),t,r])),12))}},59567:(e,t,r)=>{"use strict";r.d(t,{J:()=>i,c:()=>o});var n=r(93286);function i(e){e=atob(e);const t=[];for(let r=0;r{"use strict";r.r(t),r.d(t,{decode:()=>n.J,encode:()=>n.c});var n=r(59567)},57727:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Base32:()=>f,Base58:()=>a,BaseX:()=>o});var n=r(93286),i=r(53587);class o{constructor(e){(0,i.defineReadOnly)(this,"alphabet",e),(0,i.defineReadOnly)(this,"base",e.length),(0,i.defineReadOnly)(this,"_alphabetMap",{}),(0,i.defineReadOnly)(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(n%this.base),n=n/this.base|0}let i="";for(let e=0;0===t[e]&&e=0;--e)i+=this.alphabet[r[e]];return i}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r{"use strict";r.d(t,{i:()=>n});const n="bignumber/5.7.0"},2593:(e,t,r)=>{"use strict";r.d(t,{O$:()=>p,Zm:()=>d,g$:()=>v,t2:()=>w});var n=r(13550),i=r.n(n),o=r(93286),f=r(80711),a=r(48794),s=i().BN;const c=new f.Logger(a.i),u={},l=9007199254740991;function d(e){return null!=e&&(p.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||"bigint"==typeof e||(0,o.isBytes)(e))}let h=!1;class p{constructor(e,t){e!==u&&c.throwError("cannot call constructor directly; use BigNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return b(g(this).fromTwos(e))}toTwos(e){return b(g(this).toTwos(e))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(e){return b(g(this).add(g(e)))}sub(e){return b(g(this).sub(g(e)))}div(e){return p.from(e).isZero()&&m("division-by-zero","div"),b(g(this).div(g(e)))}mul(e){return b(g(this).mul(g(e)))}mod(e){const t=g(e);return t.isNeg()&&m("division-by-zero","mod"),b(g(this).umod(t))}pow(e){const t=g(e);return t.isNeg()&&m("negative-power","pow"),b(g(this).pow(t))}and(e){const t=g(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","and"),b(g(this).and(t))}or(e){const t=g(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","or"),b(g(this).or(t))}xor(e){const t=g(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","xor"),b(g(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&m("negative-width","mask"),b(g(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&m("negative-width","shl"),b(g(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&m("negative-width","shr"),b(g(this).shrn(e))}eq(e){return g(this).eq(g(e))}lt(e){return g(this).lt(g(e))}lte(e){return g(this).lte(g(e))}gt(e){return g(this).gt(g(e))}gte(e){return g(this).gte(g(e))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(e){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",f.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Logger.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",f.Logger.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof p)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new p(u,y(e)):e.match(/^-?[0-9]+$/)?new p(u,y(new s(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&m("underflow","BigNumber.from",e),(e>=l||e<=-l)&&m("overflow","BigNumber.from",e),p.from(String(e));const t=e;if("bigint"==typeof t)return p.from(t.toString());if((0,o.isBytes)(t))return p.from((0,o.hexlify)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return p.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,o.isHexString)(e)||"-"===e[0]&&(0,o.isHexString)(e.substring(1))))return p.from(e)}return c.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function y(e){if("string"!=typeof e)return y(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&c.throwArgumentError("invalid hex","value",e),"0x00"===(e=y(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function b(e){return p.from(y(e))}function g(e){const t=p.from(e).toHexString();return"-"===t[0]?new s("-"+t.substring(3),16):new s(t.substring(2),16)}function m(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,f.Logger.errors.NUMERIC_FAULT,n)}function v(e){return new s(e,36).toString(16)}function w(e){return new s(e,16).toString(36)}},20335:(e,t,r)=>{"use strict";r.d(t,{Ox:()=>y,S5:()=>p,xs:()=>g});var n=r(93286),i=r(80711),o=r(48794),f=r(2593);const a=new i.Logger(o.i),s={},c=f.O$.from(0),u=f.O$.from(-1);function l(e,t,r,n){const o={fault:t,operation:r};return void 0!==n&&(o.value=n),a.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}let d="0";for(;d.length<256;)d+=d;function h(e){if("number"!=typeof e)try{e=f.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+d.substring(0,e):a.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);const r=h(t),n=(e=f.O$.from(e)).lt(c);n&&(e=e.mul(u));let i=e.mod(r).toString();for(;i.length2&&a.throwArgumentError("too many decimal points","value",e);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");"0"===s[s.length-1];)s=s.substring(0,s.length-1);for(s.length>r.length-1&&l("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.lengthnull==e[t]?n:(typeof e[t]!==r&&a.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new b(s,t,r,n)}}class g{constructor(e,t,r,n){e!==s&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=g.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(m.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=g.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(m.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&a.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=g.from("1"+d.substring(0,e),this.format),n=v.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&a.throwArgumentError("invalid byte width","width",e);const t=f.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.hexZeroPad)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return g.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,f.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),g.fromString(p(e,t),b.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=b.from(t),i=y(e,r.decimals);!r.signed&&i.lt(c)&&l("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const f=p(i,r.decimals);return new g(s,o,f,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=b.from(t);if((0,n.arrayify)(e).length>r.width/8)throw new Error("overflow");let i=f.O$.from(e);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new g(s,o,a,r)}static from(e,t){if("string"==typeof e)return g.fromString(e,t);if((0,n.isBytes)(e))return g.fromBytes(e,t);try{return g.fromValue(e,0,t)}catch(e){if(e.code!==i.Logger.errors.INVALID_ARGUMENT)throw e}return a.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const m=g.from(1),v=g.from("0.5")},93286:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayify:()=>c,concat:()=>u,hexConcat:()=>m,hexDataLength:()=>b,hexDataSlice:()=>g,hexStripZeros:()=>w,hexValue:()=>v,hexZeroPad:()=>A,hexlify:()=>y,isBytes:()=>s,isBytesLike:()=>f,isHexString:()=>h,joinSignature:()=>_,splitSignature:()=>E,stripZeros:()=>l,zeroPad:()=>d});const n=new(r(80711).Logger)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function f(e){return h(e)&&!(e.length%2)||s(e)}function a(e){return"number"==typeof e&&e==e&&e%1==0}function s(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!a(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;ec(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function l(e){let t=c(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const p="0123456789abcdef";function y(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=p[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){let t="0x";for(let r=0;r>4]+p[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function b(e){if("string"!=typeof e)e=y(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,r){return"string"!=typeof e?e=y(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function m(e){let t="0x";return e.forEach((e=>{t+=y(e).substring(2)})),t}function v(e){const t=w(y(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!=typeof e&&(e=y(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function E(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=y(r.slice(0,32)),t.s=y(r.slice(32,64))):65===r.length?(t.r=y(r.slice(0,32)),t.s=y(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=y(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=d(c(t._vs),32);t._vs=y(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=y(r);null==t.s?t.s=o:t.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=A(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=A(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=c(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=y(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function _(e){return y(u([(e=E(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},9279:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});const n="0x0000000000000000000000000000000000000000"},21046:(e,t,r)=>{"use strict";r.d(t,{$B:()=>u,Bz:()=>c,Ce:()=>s,PS:()=>l,Py:()=>a,_Y:()=>o,fh:()=>f,tL:()=>i});var n=r(2593);const i=n.O$.from(-1),o=n.O$.from(0),f=n.O$.from(1),a=n.O$.from(2),s=n.O$.from("1000000000000000000"),c=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),u=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),l=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},57218:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},44328:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AddressZero:()=>n.d,EtherSymbol:()=>f,HashZero:()=>o.R,MaxInt256:()=>i.PS,MaxUint256:()=>i.Bz,MinInt256:()=>i.$B,NegativeOne:()=>i.tL,One:()=>i.fh,Two:()=>i.Py,WeiPerEther:()=>i.Ce,Zero:()=>i._Y});var n=r(9279),i=r(21046),o=r(57218);const f="Ξ"},96519:(e,t,r)=>{"use strict";r.d(t,{VZ:()=>x,CH:()=>P,lV:()=>I});var n=r(61184),i=r(8198),o=r(64353),f=r(48171),a=r(64594),s=r(2593),c=r(93286),u=r(53587),l=r(13479),d=r(80711);var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const p=new d.Logger("contracts/5.7.0"),y={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function b(e,t){return h(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&p.throwArgumentError("invalid address or ENS name","name",r);try{return(0,a.getAddress)(r)}catch(e){}e||p.throwError("a provider or signer is needed to resolve ENS names",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&p.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function g(e,t,r){return h(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>g(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield b(e,t):"tuple"===r.type?yield g(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>g(e,t,r.arrayChildren)))):Promise.reject(p.makeError("invalid value for array",d.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function m(e,t,r){return h(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=(0,u.shallowCopy)(r.pop())),p.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=(0,u.resolveProperties)({override:b(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>h(this,void 0,void 0,(function*(){return(0,a.getAddress)(e.signer)!==e.override&&p.throwError("Contract with a Signer cannot override from",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=b(e.provider,n.from));const i=yield(0,u.resolveProperties)({args:g(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,u.resolveProperties)(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),f={data:o,to:i.address},y=i.overrides;if(null!=y.nonce&&(f.nonce=s.O$.from(y.nonce).toNumber()),null!=y.gasLimit&&(f.gasLimit=s.O$.from(y.gasLimit)),null!=y.gasPrice&&(f.gasPrice=s.O$.from(y.gasPrice)),null!=y.maxFeePerGas&&(f.maxFeePerGas=s.O$.from(y.maxFeePerGas)),null!=y.maxPriorityFeePerGas&&(f.maxPriorityFeePerGas=s.O$.from(y.maxPriorityFeePerGas)),null!=y.from&&(f.from=y.from),null!=y.type&&(f.type=y.type),null!=y.accessList&&(f.accessList=(0,l.accessListify)(y.accessList)),null==f.gasLimit&&null!=t.gas){let e=21e3;const r=(0,c.arrayify)(o);for(let t=0;tnull!=n[e]));return m.length&&p.throwError(`cannot override ${m.map((e=>JSON.stringify(e))).join(",")}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:m}),f}))}function v(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=(0,u.deepCopy)(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function w(e,t,r){const n=e.signer||e.provider;return function(...i){return h(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=(0,u.shallowCopy)(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const f=yield m(e,t,i),a=yield n.call(f,o);try{let n=e.interface.decodeFunctionResult(t,a);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===d.Logger.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=f),t}}))}}function A(e,t,r){return t.constant?w(e,t,r):function(e,t){return function(...r){return h(this,void 0,void 0,(function*(){e.signer||p.throwError("sending a transaction requires a signer",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield m(e,t,r),i=yield e.signer.sendTransaction(n);return v(e,i),i}))}}(e,t)}function E(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class _{constructor(e,t){(0,u.defineReadOnly)(this,"tag",e),(0,u.defineReadOnly)(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e)||(t=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class k extends _{constructor(){super("error",null)}}class T extends _{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&p.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(E(i),i),(0,u.defineReadOnly)(this,"address",e),(0,u.defineReadOnly)(this,"interface",t),(0,u.defineReadOnly)(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=(0,n.BR)(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class S extends _{constructor(e,t){super("*",{address:e}),(0,u.defineReadOnly)(this,"address",e),(0,u.defineReadOnly)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class x{constructor(e,t,r){(0,u.defineReadOnly)(this,"interface",(0,u.getStatic)(new.target,"getInterface")(t)),null==r?((0,u.defineReadOnly)(this,"provider",null),(0,u.defineReadOnly)(this,"signer",null)):f.E.isSigner(r)?((0,u.defineReadOnly)(this,"provider",r.provider||null),(0,u.defineReadOnly)(this,"signer",r)):o.zt.isProvider(r)?((0,u.defineReadOnly)(this,"provider",r),(0,u.defineReadOnly)(this,"signer",null)):p.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,u.defineReadOnly)(this,"callStatic",{}),(0,u.defineReadOnly)(this,"estimateGas",{}),(0,u.defineReadOnly)(this,"functions",{}),(0,u.defineReadOnly)(this,"populateTransaction",{}),(0,u.defineReadOnly)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];(0,u.defineReadOnly)(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?(0,u.defineReadOnly)(this.filters,t,this.filters[r[0]]):p.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if((0,u.defineReadOnly)(this,"_runningEvents",{}),(0,u.defineReadOnly)(this,"_wrappedEmits",{}),null==e&&p.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,u.defineReadOnly)(this,"address",e),this.provider)(0,u.defineReadOnly)(this,"resolvedAddress",b(this.provider,e));else try{(0,u.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,a.getAddress)(e)))}catch(e){p.throwError("provider is required to use ENS name as contract address",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])p.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&(0,u.defineReadOnly)(this,e,A(this,t,!0)),null==this.functions[e]&&(0,u.defineReadOnly)(this.functions,e,A(this,t,!1)),null==this.callStatic[e]&&(0,u.defineReadOnly)(this.callStatic,e,w(this,t,!0)),null==this.populateTransaction[e]&&(0,u.defineReadOnly)(this.populateTransaction,e,function(e,t){return function(...r){return m(e,t,r)}}(this,t)),null==this.estimateGas[e]&&(0,u.defineReadOnly)(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return h(this,void 0,void 0,(function*(){r||p.throwError("estimate require a provider or signer",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield m(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&(0,u.defineReadOnly)(this,e,this[r])}catch(e){}null==this.functions[e]&&(0,u.defineReadOnly)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,u.defineReadOnly)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,u.defineReadOnly)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,u.defineReadOnly)(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return(0,a.getContractAddress)(e)}static getInterface(e){return i.vU.isInterface(e)?e:new i.vU(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&p.throwError("contract not deployed",d.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||p.throwError("sending a transactions require a signer",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=(0,u.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=t[e]&&p.throwError("cannot override "+e,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new f.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,u.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return i.Hk.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new k);if("event"===e)return this._normalizeRunningEvent(new _("event",null));if("*"===e)return this._normalizeRunningEvent(new S(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new T(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new T(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new _(E(t),t))}return this._normalizeRunningEvent(new S(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=(0,u.deepCopy)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||p.throwError("events require a provider or a signer with a provider",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=(0,u.shallowCopy)(n.filter);return"string"==typeof t&&(0,c.isHexString)(t,32)?(null!=r&&p.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class P extends x{}class I{constructor(e,t,r){let n=null;n="string"==typeof t?t:(0,c.isBytes)(t)?(0,c.hexlify)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!(0,c.isHexString)(n)||n.length%2)&&p.throwArgumentError("invalid bytecode","bytecode",t),r&&!f.E.isSigner(r)&&p.throwArgumentError("invalid signer","signer",r),(0,u.defineReadOnly)(this,"bytecode",n),(0,u.defineReadOnly)(this,"interface",(0,u.getStatic)(new.target,"getInterface")(e)),(0,u.defineReadOnly)(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=(0,u.shallowCopy)(e.pop());for(const e in t)if(!y[e])throw new Error("unknown transaction override "+e)}if(["data","from","to"].forEach((e=>{null!=t[e]&&p.throwError("cannot override "+e,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){s.O$.from(t.value).isZero()||this.interface.deploy.payable||p.throwError("non-payable constructor cannot override value",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return p.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,c.hexlify)((0,c.concat)([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return h(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),p.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield g(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=(0,u.getStatic)(this.constructor,"getContractAddress")(i),f=(0,u.getStatic)(this.constructor,"getContract")(o,this.interface,this.signer);return v(f,i),(0,u.defineReadOnly)(f,"deployTransaction",i),f}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&p.throwError("missing compiler output",d.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return P.getInterface(e)}static getContractAddress(e){return(0,a.getContractAddress)(e)}static getContract(e,t,r){return new P(e,t,r)}}},35644:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="hash/5.7.0"},32046:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(38197),i=r(44242);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},75931:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_TypedDataEncoder:()=>f.E,dnsEncode:()=>i.Kn,ensNormalize:()=>i.w3,hashMessage:()=>o.r,id:()=>n.id,isValidName:()=>i.r1,messagePrefix:()=>o.B,namehash:()=>i.VM});var n=r(32046),i=r(78339),o=r(93684),f=r(67827)},93684:(e,t,r)=>{"use strict";r.d(t,{B:()=>f,r:()=>a});var n=r(93286),i=r(38197),o=r(44242);const f="Ethereum Signed Message:\n";function a(e){return"string"==typeof e&&(e=(0,o.Y0)(e)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(f),(0,o.Y0)(String(e.length)),e]))}},78339:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>N,w3:()=>B,r1:()=>R,VM:()=>D});var n=r(93286),i=r(44242),o=r(38197),f=r(80711),a=r(35644);function s(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function c(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--s&1}const l=Math.pow(2,31),d=l>>>1,h=d>>1,p=l-1;let y=0;for(let e=0;e<31;e++)y=y<<1|u();let b=[],g=0,m=l;for(;;){let e=Math.floor(((y-g+1)*i-1)/m),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|u(),f=f<<1^d,a=(a^d)<<1|d|1;g=f,m=1+a-f}let v=n-4;return b.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(e))}function u(e){return 1&e?~e>>1:e>>1}function l(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function p(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function y(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return s(p(i.length,1+e,t).map(((e,t)=>{const o=e[0],f=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,f.map((e=>e+i))]}))})))}function b(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const g=c((0,r(59567).J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),m=new Set(h(g)),v=new Set(h(g)),w=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(y(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(b(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let i=h(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let f=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:f,save:1==i,check:2==i}}()}(g),E=45,_=95;function k(e){return(0,i.XL)(e)}function T(e){return e.filter((e=>65039!=e))}function S(e){for(let t of e.split(".")){let e=k(t);try{for(let t=e.lastIndexOf(_)-1;t>=0;t--)if(e[t]!==_)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===E&&e[3]===E)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function x(e){return S(function(e,t){let r=k(e).reverse(),n=[];for(;r.length;){let e=P(r);if(e){n.push(...t(e));continue}let i=r.pop();if(m.has(i)){n.push(i);continue}if(v.has(i))continue;let o=w[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return S((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,T))}function P(e,t){var r;let n,i,o=A,f=[],a=e.length;for(t&&(t.length=0);a;){let s=e[--a];if(o=null===(r=o.branches.find((e=>e.set.has(s))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=s;else if(o.check&&s===i)break;f.push(s),o.fe0f&&(f.push(65039),a>0&&65039==e[a-1]&&a--),o.valid&&(n=f.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const I=new f.Logger(a.i),M=new Uint8Array(32);function O(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function C(e){const t=(0,i.Y0)(x(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e=t.length)throw new Error("invalid ENS name; empty component");return r.push(O(t.slice(n))),r}function B(e){return C(e).map((e=>(0,i.ZN)(e))).join(".")}function R(e){try{return 0!==C(e).length}catch(e){}return!1}function D(e){"string"!=typeof e&&I.throwArgumentError("invalid ENS name; not a string","name",e);let t=M;const r=C(e);for(;r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function N(e){return(0,n.hexlify)((0,n.concat)(C(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}M.fill(0)},67827:(e,t,r)=>{"use strict";r.d(t,{E:()=>S});var n=r(64594),i=r(2593),o=r(93286),f=r(38197),a=r(53587),s=r(80711),c=r(35644),u=r(32046),l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const d=new s.Logger(c.i),h=new Uint8Array(32);h.fill(0);const p=i.O$.from(-1),y=i.O$.from(0),b=i.O$.from(1),g=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const m=(0,o.hexZeroPad)(b.toHexString(),32),v=(0,o.hexZeroPad)(y.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},A=["name","version","chainId","verifyingContract","salt"];function E(e){return function(t){return"string"!=typeof t&&d.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const _={name:E("name"),version:E("version"),chainId:function(e){try{return i.O$.from(e).toString()}catch(e){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,o.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,o.hexlify)(t)}catch(e){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function k(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&d.throwArgumentError("invalid numeric width","type",e);const f=g.mask(r?n-1:n),a=r?f.add(b).mul(p):y;return function(t){const r=i.O$.from(t);return(r.lt(a)||r.gt(f))&&d.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&d.throwArgumentError("invalid bytes width","type",e),function(t){return(0,o.arrayify)(t).length!==r&&d.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,o.arrayify)(e),r=t.length%32;return r?(0,o.hexConcat)([t,h.slice(r)]):(0,o.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,o.hexZeroPad)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?m:v};case"bytes":return function(e){return(0,f.keccak256)(e)};case"string":return function(e){return(0,u.id)(e)}}return null}function T(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class S{constructor(e){(0,a.defineReadOnly)(this,"types",Object.freeze((0,a.deepCopy)(e))),(0,a.defineReadOnly)(this,"_encoderCache",{}),(0,a.defineReadOnly)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&d.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const f=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===n&&d.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e);k(f)||(r[f]||d.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),r[f].push(n),t[n][f]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?d.throwArgumentError("missing primary type","types",e):i.length>1&&d.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,a.defineReadOnly)(this,"primaryType",i[0]),function i(o,f){f[o]&&d.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),f[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,f),Object.keys(f).forEach((t=>{n[t][e]=!0})))})),delete f[o]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=T(t,e[t])+r.map((t=>T(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=k(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(f.keccak256)),(0,f.keccak256)((0,o.hexConcat)(i))}}const r=this.types[e];if(r){const t=(0,u.id)(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?(0,f.keccak256)(n):n}));return n.unshift(t),(0,o.hexConcat)(n)}}return d.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||d.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,f.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(k(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):d.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new S(e)}static getPrimaryType(e){return S.from(e).primaryType}static hashStruct(e,t,r){return S.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=w[r];n||d.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>A.indexOf(e.name)-A.indexOf(t.name))),S.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",S.hashDomain(e),S.from(t).hash(r)])}static hash(e,t,r){return(0,f.keccak256)(S.encode(e,t,r))}static resolveNames(e,t,r,n){return l(this,void 0,void 0,(function*(){e=(0,a.shallowCopy)(e);const i={};e.verifyingContract&&!(0,o.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const f=S.from(t);f.visit(r,((e,t)=>("address"!==e||(0,o.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=f.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){S.hashDomain(e);const n={},f=[];A.forEach((t=>{const r=e[t];null!=r&&(n[t]=_[t](r),f.push({name:t,type:w[t]}))}));const s=S.from(t),c=(0,a.shallowCopy)(t);return c.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):c.EIP712Domain=f,s.encode(r),{types:c,domain:n,primaryType:s.primaryType,message:s.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(t));if(e.match(/^u?int/))return i.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&d.throwArgumentError("invalid string","value",t),t}return d.throwArgumentError("unsupported type","type",e)}))}}}},36274:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HDNode:()=>k,defaultPath:()=>_,entropyToMnemonic:()=>x,getAccountPath:()=>I,isValidMnemonic:()=>P,mnemonicToEntropy:()=>S,mnemonicToSeed:()=>T});var n=r(57727),i=r(93286),o=r(2593),f=r(44242),a=r(85306),s=r(53587),c=r(62768),u=r(77158),l=r(21261),d=r(13479),h=r(9855);const p=new(r(80711).Logger)("hdnode/5.7.0"),y=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=(0,f.Y0)("Bitcoin seed"),g=2147483648;function m(e){return(1<=256)throw new Error("Depth too large!");return w((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new k(E,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~g));const r=new Uint8Array(37);if(e&g){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),t&&(t+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=(0,i.arrayify)((0,u.Gy)(l.p.sha512,this.chainCode,r)),f=n.slice(0,32),a=n.slice(32);let s=null,d=null;if(this.privateKey)s=v(o.O$.from(f).add(this.privateKey).mod(y));else{d=new c.SigningKey((0,i.hexlify)(f))._addPoint(this.publicKey)}let h=t;const p=this.mnemonic;return p&&(h=Object.freeze({phrase:p.phrase,path:t,locale:p.locale||"en"})),new k(E,s,d,this.fingerprint,v(a),e,this.depth+1,h)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e=g)throw new Error("invalid path index - "+n);r=r._derive(g+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=g)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=(0,i.arrayify)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,u.Gy)(l.p.sha512,b,r));return new k(E,v(n.slice(0,32)),null,"0x00000000",v(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=x(S(e,r=A(r)),r),k._fromSeed(T(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return k._fromSeed(e,null)}static fromExtendedKey(e){const t=n.Base58.decode(e);82===t.length&&w(t.slice(0,78))===e||p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],o=(0,i.hexlify)(t.slice(5,9)),f=parseInt((0,i.hexlify)(t.slice(9,13)).substring(2),16),a=(0,i.hexlify)(t.slice(13,45)),s=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(E,null,(0,i.hexlify)(s),o,a,f,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new k(E,(0,i.hexlify)(s.slice(1)),null,o,a,f,r,null)}return p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function T(e,t){t||(t="");const r=(0,f.Y0)("mnemonic"+t,f.Uj.NFKD);return(0,a.n)((0,f.Y0)(e,f.Uj.NFKD),r,2048,64,"sha512")}function S(e,t){t=A(t),p.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let e=0;e>3]|=1<<7-o%8),o++}const f=32*r.length/3,a=m(r.length/3);if(((0,i.arrayify)((0,u.JQ)(n.slice(0,f/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,f/8))}function x(e,t){if(t=A(t),(e=(0,i.arrayify)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const o=e.length/4,f=(0,i.arrayify)((0,u.JQ)(e))[0]&m(o);return r[r.length-1]<<=o,r[r.length-1]|=f>>8-o,t.join(r.map((e=>t.getWord(e))))}function P(e,t){try{return S(e,t),!0}catch(e){}return!1}function I(e){return("number"!=typeof e||e<0||e>=g||e%1)&&p.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}},29816:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="json-wallets/5.7.0"},19380:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptCrowdsale:()=>b,decryptJsonWallet:()=>v,decryptJsonWalletSync:()=>w,decryptKeystore:()=>m.pe,decryptKeystoreSync:()=>m.hb,encryptKeystore:()=>m.HI,getJsonWalletAddress:()=>g.Rb,isCrowdsaleWallet:()=>g.LW,isKeystoreWallet:()=>g.aO});var n=r(48709),i=r.n(n),o=r(64594),f=r(93286),a=r(38197),s=r(85306),c=r(44242),u=r(53587),l=r(80711),d=r(29816),h=r(97013);const p=new l.Logger(d.i);class y extends u.Description{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function b(e,t){const r=JSON.parse(e);t=(0,h.Ij)(t);const n=(0,o.getAddress)((0,h.gx)(r,"ethaddr")),u=(0,h.p3)((0,h.gx)(r,"encseed"));u&&u.length%16==0||p.throwArgumentError("invalid encseed","json",e);const l=(0,f.arrayify)((0,s.n)(t,t,2e3,32,"sha256")).slice(0,16),d=u.slice(0,16),b=u.slice(16),g=new(i().ModeOfOperation.cbc)(l,d),m=i().padding.pkcs7.strip((0,f.arrayify)(g.decrypt(b)));let v="";for(let e=0;e{"use strict";r.d(t,{LW:()=>i,Rb:()=>f,aO:()=>o});var n=r(64594);function i(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function o(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function f(e){if(i(e))try{return(0,n.getAddress)(JSON.parse(e).ethaddr)}catch(e){return null}if(o(e))try{return(0,n.getAddress)(JSON.parse(e).address)}catch(e){return null}return null}},81964:(e,t,r)=>{"use strict";r.d(t,{HI:()=>P,hb:()=>S,pe:()=>x});var n=r(48709),i=r.n(n),o=r(17635),f=r.n(o),a=r(64594),s=r(93286),c=r(36274),u=r(38197),l=r(85306),d=r(44478),h=r(53587),p=r(13479),y=r(97013),b=r(80711),g=r(29816),m=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const v=new b.Logger(g.i);function w(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class A extends h.Description{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function E(e,t){const r=(0,y.p3)((0,y.gx)(e,"crypto/ciphertext"));if((0,s.hexlify)((0,u.keccak256)((0,s.concat)([t.slice(16,32),r]))).substring(2)!==(0,y.gx)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===(0,y.gx)(e,"crypto/cipher")){const n=(0,y.p3)((0,y.gx)(e,"crypto/cipherparams/iv")),o=new(i().Counter)(n),f=new(i().ModeOfOperation.ctr)(t,o);return(0,s.arrayify)(f.decrypt(r))}return null}(e,t.slice(0,16),r);n||v.throwError("unsupported cipher",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=t.slice(32,64),f=(0,p.computeAddress)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,a.getAddress)(t)!==f)throw new Error("address mismatch")}const l={_isKeystoreAccount:!0,address:f,privateKey:(0,s.hexlify)(n)};if("0.1"===(0,y.gx)(e,"x-ethers/version")){const t=(0,y.p3)((0,y.gx)(e,"x-ethers/mnemonicCiphertext")),r=(0,y.p3)((0,y.gx)(e,"x-ethers/mnemonicCounter")),n=new(i().Counter)(r),f=new(i().ModeOfOperation.ctr)(o,n),a=(0,y.gx)(e,"x-ethers/path")||c.defaultPath,u=(0,y.gx)(e,"x-ethers/locale")||"en",d=(0,s.arrayify)(f.decrypt(t));try{const e=(0,c.entropyToMnemonic)(d,u),t=c.HDNode.fromMnemonic(e,null,u).derivePath(a);if(t.privateKey!=l.privateKey)throw new Error("mnemonic mismatch");l.mnemonic=t.mnemonic}catch(e){if(e.code!==b.Logger.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e}}return new A(l)}function _(e,t,r,n,i){return(0,s.arrayify)((0,l.n)(e,t,r,n,i))}function k(e,t,r,n,i){return Promise.resolve(_(e,t,r,n,i))}function T(e,t,r,n,i){const o=(0,y.Ij)(t),f=(0,y.gx)(e,"crypto/kdf");if(f&&"string"==typeof f){const t=function(e,t){return v.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===f.toLowerCase()){const r=(0,y.p3)((0,y.gx)(e,"crypto/kdfparams/salt")),a=parseInt((0,y.gx)(e,"crypto/kdfparams/n")),s=parseInt((0,y.gx)(e,"crypto/kdfparams/r")),c=parseInt((0,y.gx)(e,"crypto/kdfparams/p"));a&&s&&c||t("kdf",f),0!=(a&a-1)&&t("N",a);const u=parseInt((0,y.gx)(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),n(o,r,a,s,c,64,i)}if("pbkdf2"===f.toLowerCase()){const n=(0,y.p3)((0,y.gx)(e,"crypto/kdfparams/salt"));let i=null;const f=(0,y.gx)(e,"crypto/kdfparams/prf");"hmac-sha256"===f?i="sha256":"hmac-sha512"===f?i="sha512":t("prf",f);const a=parseInt((0,y.gx)(e,"crypto/kdfparams/c")),s=parseInt((0,y.gx)(e,"crypto/kdfparams/dklen"));return 32!==s&&t("dklen",s),r(o,n,a,s,i)}}return v.throwArgumentError("unsupported key-derivation function","kdf",f)}function S(e,t){const r=JSON.parse(e);return E(r,T(r,t,_,f().syncScrypt))}function x(e,t,r){return m(this,void 0,void 0,(function*(){const n=JSON.parse(e);return E(n,yield T(n,t,k,f().scrypt,r))}))}function P(e,t,r,n){try{if((0,a.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw new Error("address/privateKey mismatch");if(w(e)){const t=e.mnemonic;if(c.HDNode.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||c.defaultPath).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const o=(0,s.arrayify)(e.privateKey),l=(0,y.Ij)(t);let h=null,b=null,g=null;if(w(e)){const t=e.mnemonic;h=(0,s.arrayify)((0,c.mnemonicToEntropy)(t.phrase,t.locale||"en")),b=t.path||c.defaultPath,g=t.locale||"en"}let m=r.client;m||(m="ethers.js");let v=null;v=r.salt?(0,s.arrayify)(r.salt):(0,d.O)(32);let A=null;if(r.iv){if(A=(0,s.arrayify)(r.iv),16!==A.length)throw new Error("invalid iv")}else A=(0,d.O)(16);let E=null;if(r.uuid){if(E=(0,s.arrayify)(r.uuid),16!==E.length)throw new Error("invalid uuid")}else E=(0,d.O)(16);let _=1<<17,k=8,T=1;return r.scrypt&&(r.scrypt.N&&(_=r.scrypt.N),r.scrypt.r&&(k=r.scrypt.r),r.scrypt.p&&(T=r.scrypt.p)),f().scrypt(l,v,_,k,T,64,n).then((t=>{const r=(t=(0,s.arrayify)(t)).slice(0,16),n=t.slice(16,32),f=t.slice(32,64),a=new(i().Counter)(A),c=new(i().ModeOfOperation.ctr)(r,a),l=(0,s.arrayify)(c.encrypt(o)),p=(0,u.keccak256)((0,s.concat)([n,l])),w={address:e.address.substring(2).toLowerCase(),id:(0,y.EH)(E),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,s.hexlify)(A).substring(2)},ciphertext:(0,s.hexlify)(l).substring(2),kdf:"scrypt",kdfparams:{salt:(0,s.hexlify)(v).substring(2),n:_,dklen:32,p:T,r:k},mac:p.substring(2)}};if(h){const e=(0,d.O)(16),t=new(i().Counter)(e),r=new(i().ModeOfOperation.ctr)(f,t),n=(0,s.arrayify)(r.encrypt(h)),o=new Date,a=o.getUTCFullYear()+"-"+(0,y.VP)(o.getUTCMonth()+1,2)+"-"+(0,y.VP)(o.getUTCDate(),2)+"T"+(0,y.VP)(o.getUTCHours(),2)+"-"+(0,y.VP)(o.getUTCMinutes(),2)+"-"+(0,y.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:m,gethFilename:"UTC--"+a+"--"+w.address,mnemonicCounter:(0,s.hexlify)(e).substring(2),mnemonicCiphertext:(0,s.hexlify)(n).substring(2),path:b,locale:g,version:"0.1"}}return JSON.stringify(w)}))}},97013:(e,t,r)=>{"use strict";r.d(t,{EH:()=>c,Ij:()=>a,VP:()=>f,gx:()=>s,p3:()=>o});var n=r(93286),i=r(44242);function o(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.arrayify)(e)}function f(e,t){for(e=String(e);e.length255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function f(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a,s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+a[15&n])}return t.join("")}}),u={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],b=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],m=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],T=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var f,a=0,s=i;s>16&255]<<24^d[f>>8&255]<<16^d[255&f]<<8^d[f>>24&255]^l[a]<<24,a+=1,8!=i)for(t=1;t>8&255]<<8^d[f>>16&255]<<16^d[f>>24&255]<<24;for(t=i/2+1;t>2,h=s%4,this._Ke[c][h]=o[t],this._Kd[e-c][h]=o[t++],s++}for(var c=1;c>24&255]^_[f>>16&255]^k[f>>8&255]^T[255&f]},x.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var f=1;f>24&255]^y[n[(i+1)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[f][i];n=r.slice()}var a,s=o(16);for(i=0;i<4;i++)a=this._Ke[t][i],s[4*i]=255&(d[n[i]>>24&255]^a>>24),s[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^a>>16),s[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^a>>8),s[4*i+3]=255&(d[255&n[(i+3)%4]]^a);return s},x.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var f=1;f>24&255]^v[n[(i+3)%4]>>16&255]^w[n[(i+2)%4]>>8&255]^A[255&n[(i+1)%4]]^this._Kd[f][i];n=r.slice()}var a,s=o(16);for(i=0;i<4;i++)a=this._Kd[t][i],s[4*i]=255&(h[n[i]>>24&255]^a>>24),s[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^a>>16),s[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^a>>8),s[4*i+3]=255&(h[255&n[(i+1)%4]]^a);return s};var P=function(e){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(e)};P.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n=0;--t)this._counter[t]=e%256,e>>=8},C.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},C.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var B=function(e,t){if(!(this instanceof B))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof C||(t=new C(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(e)};B.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n{"use strict";r.r(t),r.d(t,{keccak256:()=>f});var n=r(91094),i=r.n(n),o=r(93286);function f(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},80711:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>u,LogLevel:()=>c,Logger:()=>d});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let f=o.default,a=null;const s=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var c,u;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(c||(c={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(u||(u={}));const l="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),f>o[r]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=l[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let f="";switch(t){case u.NUMERIC_FAULT:{f="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":f+="-"+t;break;case"negative-power":case"negative-width":f+="-unsupported";break;case"unbound-bitwise-result":f+="-unbound-result"}break}case u.CALL_EXCEPTION:case u.INSUFFICIENT_FUNDS:case u.MISSING_NEW:case u.NONCE_EXPIRED:case u.REPLACEMENT_UNDERPRICED:case u.TRANSACTION_REPLACED:case u.UNPREDICTABLE_GAS_LIMIT:f=t}f&&(e+=" [ See: https://links.ethers.org/v5-errors-"+f+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),s&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:s})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new d("logger/5.7.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?f=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=u,d.levels=c},79861:(e,t,r)=>{"use strict";r.d(t,{H:()=>u});const n=new(r(80711).Logger)("networks/5.7.1");function i(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return i(e)},t}function o(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return o(e,t)},r}const f={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},a={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},s={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},c={unspecified:{chainId:0,name:"unspecified"},homestead:f,mainnet:f,morden:{chainId:2,name:"morden"},ropsten:a,testnet:a,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:s,classicTestnet:s,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function u(e){if(null==e)return null;if("number"==typeof e){for(const t in c){const r=c[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=c[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=c[e.name];if(!t)return"number"!=typeof e.chainId&&n.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&n.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var i;return null==r&&t._defaultProvider&&(r=(i=t._defaultProvider)&&"function"==typeof i.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}},85306:(e,t,r)=>{"use strict";r.d(t,{n:()=>o});var n=r(93286),i=r(77158);function o(e,t,r,o,f){let a;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let s=1;const c=new Uint8Array(o),u=new Uint8Array(t.length+4);let l,d;u.set(t);for(let h=1;h<=s;h++){u[t.length]=h>>24&255,u[t.length+1]=h>>16&255,u[t.length+2]=h>>8&255,u[t.length+3]=255&h;let p=(0,n.arrayify)((0,i.Gy)(f,e,u));a||(a=p.length,d=new Uint8Array(a),s=Math.ceil(o/a),l=o-(s-1)*a),d.set(p);for(let t=1;t{"use strict";r.r(t),r.d(t,{Description:()=>y,checkProperties:()=>c,deepCopy:()=>p,defineReadOnly:()=>f,getStatic:()=>a,resolveProperties:()=>s,shallowCopy:()=>u});var n=r(80711);var i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const o=new n.Logger("properties/5.7.0");function f(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function a(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function s(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function c(e,t){e&&"object"==typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function u(e){const t={};for(const r in e)t[r]=e[r];return t}const l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(null==e||l[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rp(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&f(t,r,p(n))}return t}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function p(e){return h(e)}class y{constructor(e){for(const t in e)this[t]=p(e[t])}}},34216:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="providers/5.7.2"},75361:(e,t,r)=>{"use strict";r.d(t,{H2:()=>j,Zk:()=>H});var n=r(64353),i=r(59567),o=r(57727),f=r(2593),a=r(93286),s=r(57218),c=r(78339),u=r(79861),l=r(53587),d=r(77158),h=r(44242),p=r(58341),y=r(92882),b=r.n(y),g=r(80711),m=r(34216),v=r(30032),w=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const A=new g.Logger(m.i);function E(e){return null==e?"null":(32!==(0,a.hexDataLength)(e)&&A.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function _(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[E(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return E(e)})).join("&")}function k(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,a.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+_(e);if(n.Sg.isForkEvent(e))throw A.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+_(e.topics||[])}throw new Error("invalid event - "+e)}function T(){return(new Date).getTime()}function S(e){return new Promise((t=>{setTimeout(t,e)}))}const x=["block","network","pending","poll"];class P{constructor(e,t,r){(0,l.defineReadOnly)(this,"tag",e),(0,l.defineReadOnly)(this,"listener",t),(0,l.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||x.indexOf(this.tag)>=0}}const I={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function M(e){return(0,a.hexZeroPad)(f.O$.from(e).toHexString(),32)}function O(e){return o.Base58.encode((0,a.concat)([e,(0,a.hexDataSlice)((0,d.JQ)((0,d.JQ)(e)),0,4)]))}const C=new RegExp("^(ipfs)://(.*)$","i"),B=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),C,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function R(e,t){try{return(0,h.ZN)(D(e,t))}catch(e){}return null}function D(e,t){if("0x"===e)return null;const r=f.O$.from((0,a.hexDataSlice)(e,t,t+32)).toNumber(),n=f.O$.from((0,a.hexDataSlice)(e,r,r+32)).toNumber();return(0,a.hexDataSlice)(e,r+32,r+32+n)}function N(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):A.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function U(e){const t=(0,a.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function L(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function F(e){const t=[];let r=0;for(let n=0;nf.O$.from(e).eq(1))).catch((e=>{if(e.code===g.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return w(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,a.hexConcat)([e,(0,c.VM)(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,a.hexConcat)(["0x9061b923",F([(0,c.Kn)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,a.arrayify)(e).length%32==4&&A.throwError("resolver threw error",g.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=D(e,0)),e}catch(e){if(e.code===g.Logger.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return w(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?D(r,0):null}))}_getAddress(e,t){const r=I[String(e)];if(null==r&&A.throwError(`unsupported coin type: ${e}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,a.arrayify)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return O((0,a.concat)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return O((0,a.concat)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=b().toWords(n.slice(2));return e.unshift(t),b().encode(r.prefix,e)}}return null}getAddress(e){return w(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===s.R?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===g.Logger.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",M(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&A.throwError("invalid or unsupported coin data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return w(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;re[t]))}return A.throwError("invalid or unsupported content hash data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return w(this,void 0,void 0,(function*(){let t=(0,h.Y0)(e);t=(0,a.concat)([M(64),M(t.length),t]),t.length%32!=0&&(t=(0,a.concat)([t,(0,a.hexZeroPad)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,a.hexlify)(t));return null==r||"0x"===r?null:(0,h.ZN)(r)}))}}let z=null,V=1;class H extends n.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,l.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,l.getStatic)(new.target,"getNetwork")(e);t?((0,l.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):A.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return w(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||A.throwError("no network detected",g.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,l.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return(0,p.poll)((()=>this._ready().then((e=>e),(e=>{if(e.code!==g.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==z&&(z=new v.Mb),z}static getNetwork(e){return(0,u.H)(null==e?"homestead":e)}ccipReadFetch(e,t,r){return w(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e=0?null:JSON.stringify({data:i,sender:n}),s=yield(0,p.fetchJson)({url:f,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(s.data)return s.data;const c=s.message||"unknown error";if(s.status>=400&&s.status<500)return A.throwError(`response not found during CCIP fetch: ${c}`,g.Logger.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return A.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,g.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return w(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(T()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=T(),r=(0,l.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=T();return(e=f.O$.from(e).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return w(this,void 0,void 0,(function*(){const e=V++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)A.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",A.makeError("network block skew detected",g.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return w(this,void 0,void 0,(function*(){return A.throwError("provider does not support network detection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return w(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield S(0),this._network;const r=A.makeError("underlying network changed",g.Logger.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=T();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return w(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return w(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const f=[];let a=!1;const s=function(){return!!a||(a=!0,f.forEach((e=>{e()})),!1)},c=e=>{e.confirmations{this.removeListener(e,c)})),n){let r=n.startBlock,i=null;const c=f=>w(this,void 0,void 0,(function*(){a||(yield S(1e3),this.getTransactionCount(n.from).then((u=>w(this,void 0,void 0,(function*(){if(!a){if(u<=n.nonce)r=f;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i{a||this.once("block",c)})))}));if(a)return;this.once("block",c),f.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{s()||o(A.makeError("timeout exceeded",g.Logger.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),f.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return w(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return f.O$.from(e)}catch(t){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,l.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return f.O$.from(n)}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,l.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return f.O$.from(n).toNumber()}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,l.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,a.hexlify)(n)}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,l.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,a.hexValue)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,a.hexlify)(i)}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,a.hexDataLength)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&A.throwError("Transaction hash mismatch from Provider.sendTransaction.",g.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>w(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&A.throwError("transaction failed",g.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,a.hexlify)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return w(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?f.O$.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,a.hexlify)(e):null)))})),this.formatter.transactionRequest(yield(0,l.resolveProperties)(r))}))}_getFilter(e){return w(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,l.resolveProperties)(t))}))}_call(e,t,r){return w(this,void 0,void 0,(function*(){r>=10&&A.throwError("CCIP read exceeded maximum redirections",g.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,a.hexDataLength)(i)%32==4)try{const o=(0,a.hexDataSlice)(i,4),s=(0,a.hexDataSlice)(o,0,32);f.O$.from(s).eq(n)||A.throwError("CCIP Read sender did not match",g.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const c=[],u=f.O$.from((0,a.hexDataSlice)(o,32,64)).toNumber(),l=f.O$.from((0,a.hexDataSlice)(o,u,u+32)).toNumber(),d=(0,a.hexDataSlice)(o,u+32);for(let t=0;tw(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;rthis._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,l.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),v.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return w(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return w(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&A.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return w(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new j(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return w(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||A.throwError("network does not support ENS",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,c.VM)(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return w(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,a.isHexString)(e))throw t}"string"!=typeof e&&A.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return w(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=R(yield this.call({to:r,data:"0x691f3431"+(0,c.VM)(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return w(this,void 0,void 0,(function*(){let t=null;if((0,a.isHexString)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new j(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==g.Logger.errors.CALL_EXCEPTION)throw e}try{const e=R(yield this.call({to:n,data:"0x691f3431"+(0,c.VM)(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==g.Logger.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return A.throwError(e+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new P(k(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=k(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=k(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=k(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=k(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=k(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}},30032:(e,t,r)=>{"use strict";r.d(t,{Ed:()=>h,Gp:()=>p,Mb:()=>d,vh:()=>b});var n=r(64594),i=r(2593),o=r(93286),f=r(9279),a=r(53587),s=r(13479),c=r(80711),u=r(34216);const l=new c.Logger(u.i);class d{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),f=this.hex.bind(this),s=this.number.bind(this),c=this.type.bind(this);return e.transaction={hash:o,type:c,accessList:d.allowNull(this.accessList.bind(this),null),blockHash:d.allowNull(o,null),blockNumber:d.allowNull(s,null),transactionIndex:d.allowNull(s,null),confirmations:d.allowNull(s,null),from:t,gasPrice:d.allowNull(r),maxPriorityFeePerGas:d.allowNull(r),maxFeePerGas:d.allowNull(r),gasLimit:r,to:d.allowNull(t,null),value:r,nonce:s,data:i,r:d.allowNull(this.uint256),s:d.allowNull(this.uint256),v:d.allowNull(s),creates:d.allowNull(t,null),raw:d.allowNull(i)},e.transactionRequest={from:d.allowNull(t),nonce:d.allowNull(s),gasLimit:d.allowNull(r),gasPrice:d.allowNull(r),maxPriorityFeePerGas:d.allowNull(r),maxFeePerGas:d.allowNull(r),to:d.allowNull(t),value:d.allowNull(r),data:d.allowNull((e=>this.data(e,!0))),type:d.allowNull(s),accessList:d.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:o,address:t,topics:d.arrayOf(o),data:i,logIndex:s,blockHash:o},e.receipt={to:d.allowNull(this.address,null),from:d.allowNull(this.address,null),contractAddress:d.allowNull(t,null),transactionIndex:s,root:d.allowNull(f),gasUsed:r,logsBloom:d.allowNull(i),blockHash:o,transactionHash:o,logs:d.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:d.allowNull(s,null),cumulativeGasUsed:r,effectiveGasPrice:d.allowNull(r),status:d.allowNull(s),type:c},e.block={hash:d.allowNull(o),parentHash:o,number:s,timestamp:s,nonce:d.allowNull(f),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:d.allowNull(t),extraData:i,transactions:d.allowNull(d.arrayOf(o)),baseFeePerGas:d.allowNull(r)},e.blockWithTransactions=(0,a.shallowCopy)(e.block),e.blockWithTransactions.transactions=d.allowNull(d.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:d.allowNull(n,void 0),toBlock:d.allowNull(n,void 0),blockHash:d.allowNull(o,void 0),address:d.allowNull(t,void 0),topics:d.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:d.allowNull(s),blockHash:d.allowNull(o),transactionIndex:s,removed:d.allowNull(this.boolean.bind(this)),address:t,data:d.allowFalsish(i,"0x"),topics:d.arrayOf(o),transactionHash:o,logIndex:s},e}accessList(e){return(0,s.accessListify)(e||[])}number(e){return"0x"===e?0:i.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:i.O$.from(e).toNumber()}bigNumber(e){return i.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,o.isHexString)(e))?e.toLowerCase():l.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,n.getAddress)(e)}callAddress(e){if(!(0,o.isHexString)(e,32))return null;const t=(0,n.getAddress)((0,o.hexDataSlice)(e,12));return t===f.d?null:t}contractAddress(e){return(0,n.getContractAddress)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,o.isHexString)(e))return(0,o.hexValue)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,o.hexDataLength)(r)?l.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=i.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,o.isHexString)(e))throw new Error("invalid uint256");return(0,o.hexZeroPad)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=d.check(t,e);return n._difficulty=null==r?null:i.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return d.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&i.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=d.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,s.parse)(e)}receiptLog(e){return d.check(this.formats.receiptLog,e)}receipt(e){const t=d.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=i.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&l.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):l.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&l.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return d.check(this.formats.filter,e)}filterLog(e){return d.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function h(e){return e&&"function"==typeof e.isCommunityResource}function p(e){return h(e)&&e.isCommunityResource()}let y=!1;function b(){y||(y=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},55538:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AlchemyProvider:()=>k,AlchemyWebSocketProvider:()=>_,AnkrProvider:()=>P,BaseProvider:()=>o.Zk,CloudflareProvider:()=>O,EtherscanProvider:()=>V,FallbackProvider:()=>ie,Formatter:()=>a.Mb,InfuraProvider:()=>ce,InfuraWebSocketProvider:()=>se,IpcProvider:()=>oe,JsonRpcBatchProvider:()=>ue,JsonRpcProvider:()=>c.r,JsonRpcSigner:()=>c.C,NodesmithProvider:()=>de,PocketProvider:()=>ye,Provider:()=>n.zt,Resolver:()=>o.H2,StaticJsonRpcProvider:()=>v,UrlJsonRpcProvider:()=>w,Web3Provider:()=>be.Q,WebSocketProvider:()=>b,getDefaultProvider:()=>me,getNetwork:()=>i.H,isCommunityResourcable:()=>a.Ed,isCommunityResource:()=>a.Gp,showThrottleMessage:()=>a.vh});var n=r(64353),i=r(79861),o=r(75361),f=r(53587),a=r(30032),s=r(2593),c=r(82169),u=r(80711),l=r(34216);let d=null;try{if(d=WebSocket,null==d)throw new Error("inject please")}catch(e){const t=new u.Logger(l.i);d=function(){t.throwError("WebSockets not supported in this environment",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const p=new u.Logger(l.i);let y=1;class b extends c.r{constructor(e,t){"any"===t&&p.throwError("WebSocketProvider does not support 'any' network yet",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"==typeof e?(0,f.defineReadOnly)(this,"_websocket",new d(this.connection.url)):(0,f.defineReadOnly)(this,"_websocket",e),(0,f.defineReadOnly)(this,"_requests",{}),(0,f.defineReadOnly)(this,"_subs",{}),(0,f.defineReadOnly)(this,"_subIds",{}),(0,f.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),(0,f.defineReadOnly)(e,"code",r.error.code||null),(0,f.defineReadOnly)(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){p.throwError("cannot reset events block on WebSocketProvider",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){p.throwError("cannot set polling interval on WebSocketProvider",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return h(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&p.throwError("cannot set polling on WebSocketProvider",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=y++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return h(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=s.O$.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return h(this,void 0,void 0,(function*(){this.websocket.readyState===d.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var g=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const m=new u.Logger(l.i);class v extends c.r{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return g(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||m.throwError("no network detected",u.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,f.defineReadOnly)(this,"_network",t),this.emit("network",t,null))),t}))}}class w extends v{constructor(e,t){m.checkAbstract(new.target,w),e=(0,f.getStatic)(new.target,"getNetwork")(e),t=(0,f.getStatic)(new.target,"getApiKey")(t);super((0,f.getStatic)(new.target,"getUrl")(e,t),e),"string"==typeof t?(0,f.defineReadOnly)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,f.defineReadOnly)(this,e,t[e])}))}_startPending(){m.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return m.throwError("API provider does not support signing",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return m.throwError("not implemented; sub-classes must override getUrl",u.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const A=new u.Logger(l.i),E="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class _ extends b{constructor(e,t){const r=new k(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,f.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===E}}class k extends w{static getWebSocketProvider(e,t){return new _(e,t)}static getApiKey(e){return null==e?E:(e&&"string"!=typeof e&&A.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:A.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===E&&(0,a.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===E}}const T=new u.Logger(l.i),S="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function x(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return T.throwArgumentError("unsupported network","name",e)}class P extends w{isCommunityResource(){return this.apiKey===S}static getApiKey(e){return null==e?S:e}static getUrl(e,t){null==t&&(t=S);const r={allowGzip:!0,url:"https://"+x(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===S&&(0,a.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const M=new u.Logger(l.i);class O extends w{static getApiKey(e){return null!=e&&M.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else M.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return I(this,void 0,void 0,(function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,e,t)}))}}var C=r(93286),B=r(13479),R=r(58341),D=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const N=new u.Logger(l.i);function U(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,C.hexValue)((0,C.hexlify)(n)):"accessList"===r?"["+(0,B.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,C.hexlify)(n),t[r]=n)}return t}function L(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function F(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function j(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function z(e,t,r){if("call"===e&&t.code===u.Logger.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,C.isHexString)(r))return r;N.throwError("missing revert data in call exception",u.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===u.Logger.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&N.throwError("insufficient funds for intrinsic transaction cost",u.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&N.throwError("nonce has already been used",u.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&N.throwError("replacement fee too low",u.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&N.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",u.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class V extends o.Zk{constructor(e,t){super(e),(0,f.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,f.defineReadOnly)(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return N.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return D(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?F:L;this.emit("debug",{action:"request",request:n,provider:this});const s={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&(0,a.vh)(),Promise.resolve(!0))};let c=null;i&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},c=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const u=yield(0,R.fetchJson)(s,c,o||F);return this.emit("debug",{action:"response",request:n,response:(0,f.deepCopy)(u),provider:this}),u}))}detectNetwork(){return D(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return D(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>z("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=U(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return z("call",e,t.transaction)}}case"estimateGas":{const e=U(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return z("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=j(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=j(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&N.throwError("unsupported topic count",u.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||N.throwError("unsupported topic format",u.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}var H=r(52472),K=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const G=new u.Logger(l.i);function q(){return(new Date).getTime()}function W(e){let t=null;for(let r=0;rt?null:(n+i)/2}function J(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(s.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>J(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"==typeof r?"[function]":J(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Y=1;function Z(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const X=[u.Logger.errors.CALL_EXCEPTION,u.Logger.errors.INSUFFICIENT_FUNDS,u.Logger.errors.NONCE_EXPIRED,u.Logger.errors.REPLACEMENT_UNDERPRICED,u.Logger.errors.UNPREDICTABLE_GAS_LIMIT],$=["address","args","errorArgs","errorSignature","method","transaction"];function ee(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function te(e,t,r){let n=J;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Q(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Q(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=(0,f.shallowCopy)(e)).confirmations=-1,J(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,f.shallowCopy)(e)).transactions=e.transactions.map((e=>((e=(0,f.shallowCopy)(e)).confirmations=-1,e))),J(e))}:function(e){return null==e?null:J(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e=t)return r.result}}}(n,e.quorum)}function re(e,t){return K(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:(0,R.poll)((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function ne(e,t,r,n){return K(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,C.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,C.isHexString)(n.blockTag)&&(i=yield re(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,C.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,C.isHexString)(n.blockTag)&&(i=yield re(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,C.isHexString)(r.fromBlock)||r.toBlock&&(0,C.isHexString)(r.toBlock))&&(i=yield re(e,t)),i.getLogs(r)}}return G.throwError("unknown method error",u.Logger.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class ie extends o.Zk{constructor(e,t){0===e.length&&G.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(n.zt.isProvider(e)){const t=(0,a.Gp)(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,f.shallowCopy)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=(0,a.Gp)(e)?2e3:750),null==r.weight&&(r.weight=1);const i=r.weight;return(i%1||i>512||i<1)&&G.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,i),Object.freeze(r)})),i=r.reduce(((e,t)=>e+t.weight),0);null==t?t=i/2:t>i&&G.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let o=W(r.map((e=>e.provider.network)));null==o&&(o=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(o),(0,f.defineReadOnly)(this,"providerConfigs",Object.freeze(r)),(0,f.defineReadOnly)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return K(this,void 0,void 0,(function*(){return W(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return K(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;te.priority-t.priority));const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const s=q();let c=n.filter((e=>e.runner&&s-e.starte+t.weight),0);for(;c{r.staller=null})),r.runner=ne(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:ee(r,q()),request:{method:e,params:(0,f.deepCopy)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:ee(r,q()),request:{method:e,params:(0,f.deepCopy)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:ee(r,null),request:{method:e,params:(0,f.deepCopy)(t)},provider:this}),c+=r.weight}const u=[];n.forEach((e=>{!e.done&&e.runner&&(u.push(e.runner),e.staller&&u.push(e.staller.getPromise()))})),u.length&&(yield Promise.race(u));const l=n.filter((e=>e.done&&null==e.error));if(l.length>=this.quorum){const e=r(l);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;a||(yield Z(100).getPromise()),a=!1}const d=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return X.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(d).forEach((e=>{const t=d[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};$.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),G.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),G.throwError("failed to meet quorum",u.Logger.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>ee(e))),provider:this})}))}}const oe=null,fe=new u.Logger(l.i),ae="84842078b09946638c03157f83405213";class se extends b{constructor(e,t){const r=new ce(e,t),n=r.connection;n.password&&fe.throwError("INFURA WebSocket project secrets unsupported",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,f.defineReadOnly)(this,"apiKey",r.projectId),(0,f.defineReadOnly)(this,"projectId",r.projectId),(0,f.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===ae}}class ce extends w{static getWebSocketProvider(e,t){return new se(e,t)}static getApiKey(e){const t={apiKey:ae,projectId:ae,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(fe.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),fe.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:fe.throwError("unsupported network",u.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===ae&&(0,a.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===ae}}class ue extends c.r{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:(0,f.deepCopy)(t),provider:this}),(0,R.fetchJson)(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const le=new u.Logger(l.i);class de extends w{static getApiKey(e){return e&&"string"!=typeof e&&le.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){le.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:le.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const he=new u.Logger(l.i),pe="62e1ad51b37b8e00394bda3b";class ye extends w{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=pe:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:he.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:he.throwError("unsupported network",u.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===pe}}var be=r(241);const ge=new u.Logger(l.i);function me(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new c.r(e);case"ws":case"wss":return new b(e);default:ge.throwArgumentError("unsupported URL scheme","network",e)}}const r=(0,i.H)(e);return r&&r._defaultProvider||ge.throwError("unsupported getDefaultProvider network",u.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ie,AlchemyProvider:k,AnkrProvider:P,CloudflareProvider:O,EtherscanProvider:V,InfuraProvider:ce,JsonRpcProvider:c.r,NodesmithProvider:de,PocketProvider:ye,Web3Provider:be.Q,IpcProvider:oe},t)}},82169:(e,t,r)=>{"use strict";r.d(t,{C:()=>_,r:()=>S});var n=r(48171),i=r(2593),o=r(93286),f=r(67827),a=r(53587),s=r(44242),c=r(13479),u=r(58341),l=r(80711),d=r(34216),h=r(75361),p=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const y=new l.Logger(d.i),b=["call","estimateGas"];function g(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=(0,o.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=g(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return g(JSON.parse(e),t)}catch(e){}return null}function m(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=g(t,!0);if(e)return e.data;y.throwError("missing revert data in call exception; Transaction reverted without a reason string",l.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=g(t.body,!1);null==r&&(r=g(t,!1)),r&&y.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===l.Logger.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&y.throwError("insufficient funds for intrinsic transaction cost",l.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&y.throwError("nonce has already been used",l.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&y.throwError("replacement fee too low",l.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&y.throwError("legacy pre-eip-155 transactions not supported",l.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),b.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&y.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function v(e){return new Promise((function(t){setTimeout(t,e)}))}function w(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function A(e){return e?e.toLowerCase():e}const E={};class _ extends n.E{constructor(e,t,r){if(super(),e!==E)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,a.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,a.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,a.defineReadOnly)(this,"_index",null)):"number"==typeof r?((0,a.defineReadOnly)(this,"_index",r),(0,a.defineReadOnly)(this,"_address",null)):y.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return y.throwError("cannot alter JSON-RPC Signer connection",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new k(E,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&y.throwError("unknown account #"+this._index,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,a.shallowCopy)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,a.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>p(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&y.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,a.resolveProperties)({tx:(0,a.resolveProperties)(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&y.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&y.throwError("user rejected transaction",l.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),m("sendTransaction",e,n))))}))}signTransaction(e){return y.throwError("signing transactions is unsupported",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return p(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield(0,u.poll)((()=>p(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return p(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,s.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&y.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return p(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,s.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&y.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return p(this,void 0,void 0,(function*(){const n=yield f.E.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(f.E.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&y.throwError("user rejected signing",l.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return p(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class k extends _{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const T={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class S extends h.Zk{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,a.getStatic)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,a.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,a.defineReadOnly)(this,"connection",Object.freeze((0,a.shallowCopy)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return p(this,void 0,void 0,(function*(){yield v(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=(0,a.getStatic)(this.constructor,"getNetwork");try{return t(i.O$.from(e).toNumber())}catch(t){return y.throwError("could not detect network",l.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return y.throwError("could not detect network",l.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new _(E,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,a.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=(0,u.fetchJson)(this.connection,JSON.stringify(r),w).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[A(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[A(t.address),t.blockTag]];case"getCode":return["eth_getCode",[A(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[A(t.address),(0,o.hexZeroPad)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=A(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return p(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&i.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,a.shallowCopy)(t)).transaction=(0,a.shallowCopy)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&y.throwError(e+" not implemented",l.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return m(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return v(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,a.shallowCopy)(T);if(t)for(const e in t)t[e]&&(r[e]=!0);(0,a.checkProperties)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,o.hexValue)(i.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,o.hexlify)(e[t]))})),e.accessList&&(n.accessList=(0,c.accessListify)(e.accessList)),n}}},241:(e,t,r)=>{"use strict";r.d(t,{Q:()=>u});var n=r(53587),i=r(80711),o=r(34216),f=r(82169);const a=new i.Logger(o.i);let s=1;function c(e,t){const r="Web3LegacyFetcher";return function(e,i){const o={method:e,params:i,id:s++,jsonrpc:"2.0"};return new Promise(((e,i)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,n.deepCopy)(o),provider:this}),t(o,((t,n)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:o,provider:this}),i(t);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:n,provider:this}),n.error){const e=new Error(n.error.message);return e.code=n.error.code,e.data=n.error.data,i(e)}e(n.result)}))}))}}class u extends f.r{constructor(e,t){null==e&&a.throwArgumentError("missing provider","provider",e);let r=null,i=null,o=null;"function"==typeof e?(r="unknown:",i=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),o=e,e.request?(""===r&&(r="eip-1193:"),i=function(e){return function(t,r){null==r&&(r=[]);const i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,n.deepCopy)(i),provider:this}),e.request(i).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:this}),e}))}}(e)):e.sendAsync?i=c(0,e.sendAsync.bind(e)):e.send?i=c(0,e.send.bind(e)):a.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,n.defineReadOnly)(this,"jsonRpcFetchFunc",i),(0,n.defineReadOnly)(this,"provider",o)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}},22118:(e,t,r)=>{"use strict";r.r(t),r.d(t,{randomBytes:()=>n.O,shuffled:()=>i.y});var n=r(44478),i=r(52472)},44478:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(93286),i=r(80711);const o=new i.Logger("random/5.7.0");const f=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let a=f.crypto||f.msCrypto;function s(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return a.getRandomValues(t),(0,n.arrayify)(t)}a&&a.getRandomValues||(o.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(e){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},52472:(e,t,r)=>{"use strict";function n(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}r.d(t,{y:()=>n})},61843:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>c});var n=r(93286),i=r(80711);const o=new i.Logger("rlp/5.7.0");function f(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function a(e,t,r){let n=0;for(let i=0;it+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:f}}function l(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=a(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const f=a(e,t+1,r);t+1+r+f>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+f,result:(0,n.hexlify)(e.slice(t+1+r,t+1+r+f))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}function d(e){const t=(0,n.arrayify)(e),r=l(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},91278:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SupportedAlgorithm:()=>i.p,computeHmac:()=>n.Gy,ripemd160:()=>n.bP,sha256:()=>n.JQ,sha512:()=>n.o});var n=r(77158),i=r(21261)},77158:(e,t,r)=>{"use strict";r.d(t,{Gy:()=>d,bP:()=>c,JQ:()=>u,o:()=>l});var n=r(33715),i=r.n(n),o=r(93286),f=r(21261),a=r(80711);const s=new a.Logger("sha2/5.7.0");function c(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function u(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function l(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function d(e,t,r){return f.p[e]||s.throwError("unsupported algorithm "+e,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.arrayify)(t)).update((0,o.arrayify)(r)).digest("hex")}},21261:(e,t,r)=>{"use strict";var n;r.d(t,{p:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},62768:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SigningKey:()=>Q,computePublicKey:()=>Y,recoverPublicKey:()=>J});var n=r(13550),i=r.n(n),o=r(33715),f=r.n(o);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;function a(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var s=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=a((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>8,f=255&i;o?r.push(o,f):r.push(f)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=a((function(e,t){var r=t;r.assert=s,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-s:s,o.isubn(a)):a=0,n[f]=a,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var f,a,s=e.andln(3)+i&3,c=t.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),f=0==(1&s)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?s:-s,r[0].push(f),a=0==(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==s?c:-c,r[1].push(a),2*i===f+1&&(i=1-i),2*o===a+1&&(o=1-o),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(i())(e,"hex","le")}})),d=l.getNAF,h=l.getJSF,p=l.assert;function y(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(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 b=y;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<=o;s--)f=(f<<1)+n[s];a.push(f)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o=0;a--){for(var s=0;a>=0&&0===o[a];a--)s++;if(a>=0&&s++,f=f.dblp(s),a<0)break;var c=o[a];p(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},y.prototype._wnafMulAdd=function(e,t,r,n,i){var o,f,a,s=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0;for(o=0;o=1;o-=2){var y=o-1,b=o;if(1===s[y]&&1===s[b]){var g=[t[y],null,null,t[b]];0===t[y].y.cmp(t[b].y)?(g[1]=t[y].add(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg())):0===t[y].y.cmp(t[b].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].add(t[b].neg())):(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[y],r[b]);for(l=Math.max(v[0].length,l),u[y]=new Array(l),u[b]=new Array(l),f=0;f=0;o--){for(var k=0;o>=0;){var T=!0;for(f=0;f=0&&k++,E=E.dblp(k),o<0)break;for(f=0;f0?a=c[f][S-1>>1]:S<0&&(a=c[f][-S-1>>1].neg()),E="affine"===a.type?E.mixedAdd(a):E.add(a))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(f=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),f.negative&&(f=f.neg(),a=a.neg()),[{a:n,b:o},{a:f,b:a}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),f=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(f).sub(a),k2:s.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new(i())(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 o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.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)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},E.prototype.isInfinity=function(){return this.inf},E.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)},E.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),o=i.redSqr().redISub(this.x.redAdd(this.x)),f=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,f)},E.prototype.getX=function(){return this.x.fromRed()},E.prototype.getY=function(){return this.y.fromRed()},E.prototype.mul=function(e){return e=new(i())(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)},E.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)},E.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)},E.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))},E.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},E.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},m(_,b.BasePoint),w.prototype.jpoint=function(e,t,r){return new _(this,e,t,r)},_.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)},_.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},_.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),o=this.y.redMul(t.redMul(e.z)),f=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),s=o.redSub(f);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=n.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),h=s.redMul(l.redISub(d)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,p)},_.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,o=e.y.redMul(t).redMul(this.z),f=r.redSub(n),a=i.redSub(o);if(0===f.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=f.redSqr(),c=s.redMul(f),u=r.redMul(s),l=a.redSqr().redIAdd(c).redISub(u).redISub(u),d=a.redMul(u.redISub(l)).redISub(i.redMul(c)),h=this.z.redMul(f);return this.curve.jpoint(l,d,h)},_.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=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},_.prototype.inspect=function(){return this.isInfinity()?"":""},_.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var k=a((function(e,t){var r=t;r.base=b,r.short=A,r.mont=null,r.edwards=null})),T=a((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new k.short(e):"edwards"===e.type?this.curve=new k.edwards(e):this.curve=new k.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 a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:f().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:f().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:f().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:f().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"]}),a("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:f().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f().sha256,gRed:!1,g:["9"]}),a("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:f().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("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:f().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(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=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var x=S;S.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.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.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=u.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var O=l.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(O(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var B=C;function R(){this.place=0}function D(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,o=0,f=t.place;o>>=0;return!(i<=127)&&(t.place=f,i)}function N(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new R;if(48!==e[r.place++])return!1;var n=D(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=D(e,r);if(!1===o)return!1;var f=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var a=D(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(i())(f),this.s=new(i())(s),this.recoveryParam=null,!0},C.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=N(t),r=N(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];U(n,t.length),(n=n.concat(t)).push(2),U(n,r.length);var i=n.concat(r),o=[48];return U(o,i.length),o=o.concat(i),l.encode(o,e)};var L=function(){throw new Error("unsupported")},F=l.assert;function j(e){if(!(this instanceof j))return new j(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(T,e),"Unknown curve "+e),e=T[e]),e instanceof T.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 z=j;j.prototype.keyPair=function(e){return new M(this,e)},j.prototype.keyFromPrivate=function(e,t){return M.fromPrivate(this,e,t)},j.prototype.keyFromPublic=function(e,t){return M.fromPublic(this,e,t)},j.prototype.genKeyPair=function(e){e||(e={});for(var t=new x({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||L(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},j.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},j.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(i())(e,16));for(var o=this.n.byteLength(),f=t.getPrivate().toArray("be",o),a=e.toArray("be",o),s=new x({hash:this.hash,entropy:f,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new(i())(1)),u=0;;u++){var l=n.k?n.k(u):new(i())(s.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var y=l.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new B({r:p,s:y,recoveryParam:b})}}}}}},j.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o=(t=new B(t,"hex")).r,f=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var a,s=f.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},j.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new B(t,n);var o=this.n,f=new(i())(e),a=t.r,s=t.s,c=1&r,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var l=t.r.invm(o),d=o.sub(f).mul(l).umod(o),h=s.mul(l).umod(o);return this.g.mulAdd(d,a,h)},j.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new B(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var V=a((function(e,t){var r=t;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=k,r.curves=T,r.ec=z,r.eddsa=null})).ec,H=r(93286),K=r(53587);const G=new(r(80711).Logger)("signing-key/5.7.0");let q=null;function W(){return q||(q=new V("secp256k1")),q}class Q{constructor(e){(0,K.defineReadOnly)(this,"curve","secp256k1"),(0,K.defineReadOnly)(this,"privateKey",(0,H.hexlify)(e)),32!==(0,H.hexDataLength)(this.privateKey)&&G.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=W().keyFromPrivate((0,H.arrayify)(this.privateKey));(0,K.defineReadOnly)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,K.defineReadOnly)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,K.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(e){const t=W().keyFromPublic((0,H.arrayify)(this.publicKey)),r=W().keyFromPublic((0,H.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=(0,H.arrayify)(e);32!==r.length&&G.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,H.splitSignature)({recoveryParam:n.recoveryParam,r:(0,H.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,H.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=W().keyFromPublic((0,H.arrayify)(Y(e)));return(0,H.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function J(e,t){const r=(0,H.splitSignature)(t),n={r:(0,H.arrayify)(r.r),s:(0,H.arrayify)(r.s)};return"0x"+W().recoverPubKey((0,H.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function Y(e,t){const r=(0,H.arrayify)(e);if(32===r.length){const e=new Q(r);return t?"0x"+W().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,H.hexlify)(r):"0x"+W().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+W().keyFromPublic(r).getPublic(!0,"hex"):(0,H.hexlify)(r):G.throwArgumentError("invalid public or private key","key","[REDACTED]")}},33777:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>b,pack:()=>y,sha256:()=>g});var n=r(2593),i=r(93286),o=r(38197),f=r(77158),a=r(44242),s=r(80711);const c=new RegExp("^bytes([0-9]+)$"),u=new RegExp("^(u?int)([0-9]*)$"),l=new RegExp("^(.*)\\[([0-9]*)\\]$"),d="0000000000000000000000000000000000000000000000000000000000000000",h=new s.Logger("solidity/5.7.0");function p(e,t,r){switch(e){case"address":return r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t);case"string":return(0,a.Y0)(t);case"bytes":return(0,i.arrayify)(t);case"bool":return t=t?"0x01":"0x00",r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t)}let o=e.match(u);if(o){let f=parseInt(o[2]||"256");return(o[2]&&String(f)!==o[2]||f%8!=0||0===f||f>256)&&h.throwArgumentError("invalid number type","type",e),r&&(f=256),t=n.O$.from(t).toTwos(f),(0,i.zeroPad)(t,f/8)}if(o=e.match(c),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&h.throwArgumentError("invalid bytes type","type",e),(0,i.arrayify)(t).byteLength!==n&&h.throwArgumentError(`invalid value for ${e}`,"value",t),r?(0,i.arrayify)((t+d).substring(0,66)):t}if(o=e.match(l),o&&Array.isArray(t)){const r=o[1];parseInt(o[2]||String(t.length))!=t.length&&h.throwArgumentError(`invalid array length for ${e}`,"value",t);const n=[];return t.forEach((function(e){n.push(p(r,e,!0))})),(0,i.concat)(n)}return h.throwArgumentError("invalid type","type",e)}function y(e,t){e.length!=t.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(p(e,t[n]))})),(0,i.hexlify)((0,i.concat)(r))}function b(e,t){return(0,o.keccak256)(y(e,t))}function g(e,t){return(0,f.JQ)(y(e,t))}},86237:(e,t,r)=>{"use strict";r.d(t,{F:()=>a,s:()=>f});var n=r(57218),i=r(93286),o=r(44242);function f(e){const t=(0,o.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.R]).slice(0,32))}function a(e){const t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,o.ZN)(t.slice(0,r))}},35637:(e,t,r)=>{"use strict";r.d(t,{Ll:()=>p});var n=r(44242);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function f(e,t){let r=0;for(let n=0;n=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const a=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),s="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),c=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],u=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),l=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r{if(s.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=f(e,c);if(t)return[e+t.s];let r=u[e];if(r)return r;let n=l[e];return n?[e+n[0]]:d[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,n.XL)((0,n.uu)(t),n.Uj.NFKC),t.forEach((e=>{if(f(e,h))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(f(e,a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let i=(0,n.uu)(t);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i}},62741:(e,t,r)=>{"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:()=>o.Uj,Utf8ErrorFuncs:()=>o.te,Utf8ErrorReason:()=>o.Uw,_toEscapedUtf8String:()=>o.U$,formatBytes32String:()=>n.s,nameprep:()=>i.Ll,parseBytes32String:()=>n.F,toUtf8Bytes:()=>o.Y0,toUtf8CodePoints:()=>o.XL,toUtf8String:()=>o.ZN});var n=r(86237),i=r(35637),o=r(44242)},44242:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>s,Uw:()=>f,U$:()=>d,uu:()=>h,Y0:()=>u,XL:()=>y,ZN:()=>p});var n=r(93286);const i=new(r(80711).Logger)("strings/5.7.0");var o,f;function a(e,t,r,n,i){if(e===f.BAD_PREFIX||e===f.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===f.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(f||(f={}));const s=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:a,replace:function(e,t,r,n,i){return e===f.OVERLONG?(n.push(i),0):(n.push(65533),a(e,t,r))}});function c(e,t){null==t&&(t=s.error),e=(0,n.arrayify)(e);const r=[];let i=0;for(;i>7==0){r.push(n);continue}let o=null,a=null;if(192==(224&n))o=1,a=127;else if(224==(240&n))o=2,a=2047;else{if(240!=(248&n)){i+=t(128==(192&n)?f.UNEXPECTED_CONTINUE:f.BAD_PREFIX,i-1,e,r);continue}o=3,a=65535}if(i-1+o>=e.length){i+=t(f.OVERRUN,i-1,e,r);continue}let s=n&(1<<8-o-1)-1;for(let n=0;n1114111?i+=t(f.OUT_OF_RANGE,i-1-o,e,r,s):s>=55296&&s<=57343?i+=t(f.UTF16_SURROGATE,i-1-o,e,r,s):s<=a?i+=t(f.OVERLONG,i-1-o,e,r,s):r.push(s))}return r}function u(e,t=o.current){t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.arrayify)(r)}function l(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+c(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?l(e):l(55296+((e-=65536)>>10&1023))+l(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function p(e,t){return h(c(e,t))}function y(e,t=o.current){return c(u(e,t))}},13479:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionTypes:()=>h,accessListify:()=>E,computeAddress:()=>m,parse:()=>P,recoverAddress:()=>v,serialize:()=>S});var n=r(64594),i=r(2593),o=r(93286),f=r(21046),a=r(38197),s=r(53587),c=r(61843),u=r(62768),l=r(80711);const d=new l.Logger("transactions/5.7.0");var h;function p(e){return"0x"===e?null:(0,n.getAddress)(e)}function y(e){return"0x"===e?f._Y:i.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(h||(h={}));const b=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],g={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function m(e){const t=(0,u.computePublicKey)(e);return(0,n.getAddress)((0,o.hexDataSlice)((0,a.keccak256)((0,o.hexDataSlice)(t,1)),12))}function v(e,t){return m((0,u.recoverPublicKey)((0,o.arrayify)(e),t))}function w(e,t){const r=(0,o.stripZeros)(i.O$.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,n.getAddress)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.hexDataLength)(t)&&d.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function E(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),A(e[0],e[1])):A(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return A(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function _(e){return E(e).map((e=>[e.address,e.storageKeys]))}function k(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x02",c.encode(r)])}function T(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x01",c.encode(r)])}function S(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,s.checkProperties)(e,g);const r=[];b.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.stripZeros)(n),n.length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&d.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return c.encode(r);const i=(0,o.splitSignature)(t);let f=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),f+=2*n+8,i.v>28&&i.v!==f&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==f&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.hexlify)(f)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return T(e,t);case 2:return k(e,t)}return d.throwError(`unsupported transaction type: ${e.type}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function x(e,t,r){try{const r=y(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.hexZeroPad)(t[1],32),e.s=(0,o.hexZeroPad)(t[2],32);try{const t=(0,a.keccak256)(r(e));e.from=v(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function P(e){const t=(0,o.arrayify)(e);if(t[0]>127)return function(e){const t=c.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:y(t[0]).toNumber(),gasPrice:y(t[1]),gasLimit:y(t[2]),to:p(t[3]),value:y(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.O$.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,o.hexZeroPad)(t[7],32),r.s=(0,o.hexZeroPad)(t[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push((0,o.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const f=(0,a.keccak256)(c.encode(i));try{r.from=v(f,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,a.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(e));const r={type:1,chainId:y(t[0]).toNumber(),nonce:y(t[1]).toNumber(),gasPrice:y(t[2]),gasLimit:y(t[3]),to:p(t[4]),value:y(t[5]),data:t[6],accessList:E(t[7])};return 8===t.length||(r.hash=(0,a.keccak256)(e),x(r,t.slice(8),T)),r}(t);case 2:return function(e){const t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(e));const r=y(t[2]),n=y(t[3]),i={type:2,chainId:y(t[0]).toNumber(),nonce:y(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:y(t[4]),to:p(t[5]),value:y(t[6]),data:t[7],accessList:E(t[8])};return 9===t.length||(i.hash=(0,a.keccak256)(e),x(i,t.slice(9),k)),i}(t)}return d.throwError(`unsupported transaction type: ${t[0]}`,l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},46441:(e,t,r)=>{"use strict";r.r(t),r.d(t,{commify:()=>f,formatEther:()=>c,formatUnits:()=>a,parseEther:()=>u,parseUnits:()=>s});var n=r(20335);const i=new(r(80711).Logger)("units/5.7.0"),o=["wei","kwei","mwei","gwei","szabo","finney","ether"];function f(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&i.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);const f=[];for(;r.length;){if(r.length<=3){f.unshift(r);break}{const e=r.length-3;f.unshift(r.substring(e)),r=r.substring(0,e)}}return n+f.join(",")+o}function a(e,t){if("string"==typeof t){const e=o.indexOf(t);-1!==e&&(t=3*e)}return(0,n.S5)(e,null!=t?t:18)}function s(e,t){if("string"!=typeof e&&i.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=o.indexOf(t);-1!==e&&(t=3*e)}return(0,n.Ox)(e,null!=t?t:18)}function c(e){return a(e,18)}function u(e){return s(e,18)}},44958:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Wallet:()=>w,verifyMessage:()=>A,verifyTypedData:()=>E});var n=r(64594),i=r(64353),o=r(48171),f=r(93286),a=r(93684),s=r(67827),c=r(36274),u=r(38197),l=r(53587),d=r(44478),h=r(62768),p=r(81964),y=r(19380),b=r(13479),g=r(80711);var m=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const v=new g.Logger("wallet/5.7.0");class w extends o.E{constructor(e,t){if(super(),null!=(r=e)&&(0,f.isHexString)(r.privateKey,32)&&null!=r.address){const t=new h.SigningKey(e.privateKey);if((0,l.defineReadOnly)(this,"_signingKey",(()=>t)),(0,l.defineReadOnly)(this,"address",(0,b.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(e.address)&&v.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,l.defineReadOnly)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||c.defaultPath,locale:t.locale||"en"})));const r=this.mnemonic,n=c.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,b.computeAddress)(n.privateKey)!==this.address&&v.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,l.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(h.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&v.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,l.defineReadOnly)(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new h.SigningKey(e);(0,l.defineReadOnly)(this,"_signingKey",(()=>t))}(0,l.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,l.defineReadOnly)(this,"address",(0,b.computeAddress)(this.publicKey))}var r;t&&!i.zt.isProvider(t)&&v.throwArgumentError("invalid provider","provider",t),(0,l.defineReadOnly)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new w(this,e)}signTransaction(e){return(0,l.resolveProperties)(e).then((t=>{null!=t.from&&((0,n.getAddress)(t.from)!==this.address&&v.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,u.keccak256)((0,b.serialize)(t)));return(0,b.serialize)(t,r)}))}signMessage(e){return m(this,void 0,void 0,(function*(){return(0,f.joinSignature)(this._signingKey().signDigest((0,a.r)(e)))}))}_signTypedData(e,t,r){return m(this,void 0,void 0,(function*(){const n=yield s.E.resolveNames(e,t,r,(e=>(null==this.provider&&v.throwError("cannot resolve ENS names without a provider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,f.joinSignature)(this._signingKey().signDigest(s.E.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),(0,p.HI)(this,e,t,r)}static createRandom(e){let t=(0,d.O)(16);e||(e={}),e.extraEntropy&&(t=(0,f.arrayify)((0,f.hexDataSlice)((0,u.keccak256)((0,f.concat)([t,e.extraEntropy])),0,16)));const r=(0,c.entropyToMnemonic)(t,e.locale);return w.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,y.decryptJsonWallet)(e,t,r).then((e=>new w(e)))}static fromEncryptedJsonSync(e,t){return new w((0,y.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=c.defaultPath),new w(c.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function A(e,t){return(0,b.recoverAddress)((0,a.r)(e),t)}function E(e,t,r,n){return(0,b.recoverAddress)(s.E.hash(e,t,r),n)}},58341:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_fetchData:()=>p,fetchJson:()=>y,poll:()=>b});var n=r(59567),i=r(93286),o=r(53587),f=r(44242),a=r(80711);var s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};function c(e,t){return s(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),f={};return n.headers.forEach?n.headers.forEach(((e,t)=>{f[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{f[e.toLowerCase()]=n.headers.get(e)})),{headers:f,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const l=new a.Logger("web/5.7.1");function d(e){return new Promise((t=>{setTimeout(t,e)}))}function h(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,f.ZN)(e)}catch(e){}return(0,i.hexlify)(e)}return e}function p(e,t,r){const i="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;l.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const s="object"==typeof e?e.throttleCallback:null,p="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;l.assertArgument(p>0&&p%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const y="object"==typeof e&&!!e.errorPassThrough,b={};let g=null;const m={method:"GET"};let v=!1,w=12e4;if("string"==typeof e)g=e;else if("object"==typeof e){if(null!=e&&null!=e.url||l.throwArgumentError("missing URL","connection.url",e),g=e.url,"number"==typeof e.timeout&&e.timeout>0&&(w=e.timeout),e.headers)for(const t in e.headers)b[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(v=!0);if(m.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==g.substring(0,6)&&!0!==e.allowInsecureAuthentication&&l.throwError("basic authentication requires a secure https url",a.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:g,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;b.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,f.Y0)(t))}}null!=e.skipFetchSetup&&(m.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(m.fetchOptions=(0,o.shallowCopy)(e.fetchOptions))}const A=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=g?g.match(A):null;if(E)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?(0,n.J)(E[3]):(_=E[3],(0,f.Y0)(_.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){l.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:h(E[1],E[2]),error:e,requestBody:null,requestMethod:"GET",url:g})}var _;t&&(m.method="POST",m.body=t,null==b["content-type"]&&(b["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==b["content-length"]&&(b["content-length"]={key:"Content-Length",value:String(t.length)}));const k={};Object.keys(b).forEach((e=>{const t=b[e];k[t.key]=t.value})),m.headers=k;const T=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(l.makeError("timeout",a.Logger.errors.TIMEOUT,{requestBody:h(m.body,k["content-type"]),requestMethod:m.method,timeout:w,url:g})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),S=function(){return u(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(T.cancel(),l.throwError("bad response",a.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:h(n,t.headers?t.headers["content-type"]:null),requestBody:h(m.body,k["content-type"]),requestMethod:m.method,url:g})),r)try{const e=yield r(n,t);return T.cancel(),e}catch(r){if(r.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return p(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,f.ZN)(e))}catch(t){l.throwError("invalid JSON",a.Logger.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function b(e,t){return t||(t={}),null==(t=(0,o.shallowCopy)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const f=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{f()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let s=0;!function i(){return e().then((function(e){if(void 0!==e)f()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(s++,s>a)return void(f()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,s)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){f()&&n(e)}))}()}))}},48659:(e,t,r)=>{"use strict";r.d(t,{D:()=>a});var n=r(32046),i=r(53587),o=r(80711);const f=new o.Logger("wordlists/5.7.0");class a{constructor(e){f.checkAbstract(new.target,a),(0,i.defineReadOnly)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,n.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}},9855:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(48659);let i=null;function o(e){if(null==i&&(i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(e)))throw i=null,new Error("BIP39 Wordlist for en (English) FAILED")}class f extends n.D{constructor(){super("en")}getWord(e){return o(this),i[e]}getWordIndex(e){return o(this),i.indexOf(e)}}const a=new f;n.D.register(a);const s={en:a}},39980:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AsnAnyConverter:()=>Mt,AsnArray:()=>yr,AsnBitStringConverter:()=>Dt,AsnBmpStringConverter:()=>Vt,AsnBooleanConverter:()=>Ut,AsnCharacterStringConverter:()=>Xt,AsnChoiceType:()=>sr,AsnConstructedOctetStringConverter:()=>Ft,AsnConvert:()=>br,AsnEnumeratedConverter:()=>Ct,AsnGeneralStringConverter:()=>Zt,AsnGeneralizedTimeConverter:()=>er,AsnGraphicStringConverter:()=>Jt,AsnIA5StringConverter:()=>Qt,AsnIntegerArrayBufferConverter:()=>Bt,AsnIntegerBigIntConverter:()=>Rt,AsnIntegerConverter:()=>Ot,AsnNullConverter:()=>tr,AsnNumericStringConverter:()=>Kt,AsnObjectIdentifierConverter:()=>Nt,AsnOctetStringConverter:()=>Lt,AsnParser:()=>hr,AsnPrintableStringConverter:()=>Gt,AsnProp:()=>lr,AsnPropTypes:()=>Ee,AsnSchemaValidationError:()=>dr,AsnSequenceType:()=>ur,AsnSerializer:()=>pr,AsnSetType:()=>cr,AsnTeletexStringConverter:()=>qt,AsnType:()=>ar,AsnTypeTypes:()=>Ae,AsnUTCTimeConverter:()=>$t,AsnUniversalStringConverter:()=>Ht,AsnUtf8StringConverter:()=>zt,AsnVideotexStringConverter:()=>Wt,AsnVisibleStringConverter:()=>Yt,BitString:()=>Pt,OctetString:()=>It,defaultConverter:()=>rr});var n={};r.r(n),r.d(n,{Any:()=>Et,BaseBlock:()=>L,BaseStringBlock:()=>j,BitString:()=>Ne,BmpString:()=>nt,Boolean:()=>Ce,CharacterString:()=>pt,Choice:()=>_t,Constructed:()=>xe,DATE:()=>gt,DateTime:()=>vt,Duration:()=>wt,EndOfContent:()=>Ie,Enumerated:()=>Ve,GeneralString:()=>ht,GeneralizedTime:()=>bt,GraphicString:()=>lt,HexBlock:()=>C,IA5String:()=>ut,Integer:()=>ze,Null:()=>Me,NumericString:()=>ft,ObjectIdentifier:()=>Ge,OctetString:()=>Re,Primitive:()=>_e,PrintableString:()=>at,RawData:()=>Tt,RelativeObjectIdentifier:()=>Qe,Repeated:()=>kt,Sequence:()=>Je,Set:()=>Ye,TIME:()=>At,TeletexString:()=>st,TimeOfDay:()=>mt,UTCTime:()=>yt,UniversalString:()=>ot,Utf8String:()=>tt,ValueBlock:()=>R,VideotexString:()=>ct,ViewWriter:()=>h,VisibleString:()=>dt,compareSchema:()=>St,fromBER:()=>Te,verifySchema:()=>xt});var i=r(72043);function o(e,t){let r=0;if(1===e.length)return e[0];for(let n=e.length-1;n>=0;n--)r+=e[e.length-1-n]*Math.pow(2,t*n);return r}function f(e,t,r=-1){const n=r;let i=e,o=0,f=Math.pow(2,t);for(let r=1;r<8;r++){if(e=0;e--){const r=Math.pow(2,e*t);f[o-e-1]=Math.floor(i/r),i-=f[o-e-1]*r}return e}f*=Math.pow(2,t)}return new ArrayBuffer(0)}function a(...e){let t=0,r=0;for(const r of e)t+=r.length;const n=new ArrayBuffer(t),i=new Uint8Array(n);for(const t of e)i.set(t,r),r+=t.length;return i}function s(){const e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){const t=255===e[0]&&128&e[1],r=0===e[0]&&0==(128&e[1]);(t||r)&&this.warnings.push("Needlessly long format")}const t=new ArrayBuffer(this.valueHex.byteLength),r=new Uint8Array(t);for(let e=0;e=f.length)return this.error="End of input reached before message was fully decoded",-1;if(e===r){r+=255;const e=new Uint8Array(r);for(let r=0;r8)return this.error="Too big integer",-1;if(a+1>f.length)return this.error="End of input reached before message was fully decoded",-1;const s=t+1,c=n.subarray(s,s+a);return 0===c[a-1]&&this.warnings.push("Needlessly long encoded length"),this.length=o(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,t+this.blockLength}toBER(e=!1){let t,r;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return t=new ArrayBuffer(1),!1===e&&(r=new Uint8Array(t),r[0]=128),t;if(this.longFormUsed){const n=f(this.length,8);if(n.byteLength>127)return this.error="Too big length",x;if(t=new ArrayBuffer(n.byteLength+1),e)return t;const i=new Uint8Array(n);r=new Uint8Array(t),r[0]=128|n.byteLength;for(let e=0;e=37&&!1===i.idBlock.isHexOnly)return i.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:i};switch(i.idBlock.tagNumber){case 0:if(i.idBlock.isConstructed&&i.lenBlock.length>0)return i.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:i};a=U.EndOfContent;break;case 1:a=U.Boolean;break;case 2:a=U.Integer;break;case 3:a=U.BitString;break;case 4:a=U.OctetString;break;case 5:a=U.Null;break;case 6:a=U.ObjectIdentifier;break;case 10:a=U.Enumerated;break;case 12:a=U.Utf8String;break;case 13:a=U.RelativeObjectIdentifier;break;case 14:a=U.TIME;break;case 15:return i.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:i};case 16:a=U.Sequence;break;case 17:a=U.Set;break;case 18:a=U.NumericString;break;case 19:a=U.PrintableString;break;case 20:a=U.TeletexString;break;case 21:a=U.VideotexString;break;case 22:a=U.IA5String;break;case 23:a=U.UTCTime;break;case 24:a=U.GeneralizedTime;break;case 25:a=U.GraphicString;break;case 26:a=U.VisibleString;break;case 27:a=U.GeneralString;break;case 28:a=U.UniversalString;break;case 29:a=U.CharacterString;break;case 30:a=U.BmpString;break;case 31:a=U.DATE;break;case 32:a=U.TimeOfDay;break;case 33:a=U.DateTime;break;case 34:a=U.Duration;break;default:{const e=i.idBlock.isConstructed?new U.Constructed:new U.Primitive;e.idBlock=i.idBlock,e.lenBlock=i.lenBlock,e.warnings=i.warnings,i=e}}}else a=i.idBlock.isConstructed?U.Constructed:U.Primitive;return i=function(e,t){if(e instanceof t)return e;const r=new t;return r.idBlock=e.idBlock,r.lenBlock=e.lenBlock,r.warnings=e.warnings,r.valueBeforeDecodeView=e.valueBeforeDecodeView,r}(i,a),f=i.fromBER(e,t,i.lenBlock.isIndefiniteForm?r:i.lenBlock.length),i.valueBeforeDecodeView=e.subarray(n,n+i.blockLength),{offset:f,result:i}}function Te(e){if(!e.byteLength){const e=new L({},R);return e.error="Input buffer has zero length",{offset:-1,result:e}}return ke(i.vJ.toUint8Array(e).slice(),0,e.byteLength)}V=_e,U.Primitive=V,_e.NAME="PRIMITIVE";class Se extends R{constructor({value:e=[],isIndefiniteForm:t=!1,...r}={}){super(r),this.value=e,this.isIndefiniteForm=t}fromBER(e,t,r){const n=i.vJ.toUint8Array(e);if(!d(this,n,t,r))return-1;if(this.valueBeforeDecodeView=n.subarray(t,t+r),0===this.valueBeforeDecodeView.length)return this.warnings.push("Zero buffer length"),t;let o=t;for(;f=this.isIndefiniteForm,a=r,(f?1:a)>0;){const e=ke(n,o,r);if(-1===e.offset)return this.error=e.result.error,this.warnings.concat(e.result.warnings),-1;if(o=e.offset,this.blockLength+=e.result.blockLength,r-=e.result.blockLength,this.value.push(e.result),this.isIndefiniteForm&&e.result.constructor.NAME===I)break}var f,a;return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===I?this.value.pop():this.warnings.push("No EndOfContent block encoded")),o}toBER(e,t){const r=t||new h;for(let t=0;t` ${e}`)).join("\n"));const t=3===this.idBlock.tagClass?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :\n${e.join("\n")}`:`${t} :`}}H=xe,U.Constructed=H,xe.NAME="CONSTRUCTED";class Pe extends R{fromBER(e,t,r){return t}toBER(e){return x}}Pe.override="EndOfContentValueBlock";class Ie extends L{constructor(e={}){super(e,Pe),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}K=Ie,U.EndOfContent=K,Ie.NAME=I;class Me extends L{constructor(e={}){super(e,R),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(e,t,r){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=r,t+r>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):t+r}toBER(e,t){const r=new ArrayBuffer(2);if(!e){const e=new Uint8Array(r);e[0]=5,e[1]=0}return t&&t.write(r),r}onAsciiEncoding(){return`${this.constructor.NAME}`}}G=Me,U.Null=G,Me.NAME="NULL";class Oe extends(C(R)){constructor({value:e,...t}={}){super(t),t.valueHex?this.valueHexView=i.vJ.toUint8Array(t.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}get value(){for(const e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}fromBER(e,t,r){const n=i.vJ.toUint8Array(e);return d(this,n,t,r)?(this.valueHexView=n.subarray(t,t+r),r>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,s.call(this),this.blockLength=r,t+r):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}Oe.NAME="BooleanValueBlock";class Ce extends L{constructor(e={}){super(e,Oe),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}}q=Ce,U.Boolean=q,Ce.NAME="BOOLEAN";class Be extends(C(Se)){constructor({isConstructed:e=!1,...t}={}){super(t),this.isConstructed=e}fromBER(e,t,r){let n=0;if(this.isConstructed){if(this.isHexOnly=!1,n=Se.prototype.fromBER.call(this,e,t,r),-1===n)return n;for(let e=0;e0&&r.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=r.unusedBits}return n}const o=i.vJ.toUint8Array(e);if(!d(this,o,t,r))return-1;const f=o.subarray(t,t+r);if(this.unusedBits=f[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){const e=f.subarray(1);try{if(e.byteLength){const t=ke(e,0,e.byteLength);-1!==t.offset&&t.offset===r-1&&(this.value=[t.result])}}catch(e){}}return this.valueHexView=f.subarray(1),this.blockLength=f.length,t+r}toBER(e,t){if(this.isConstructed)return Se.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return x;const r=new Uint8Array(this.valueHexView.length+1);return r[0]=this.unusedBits,r.set(this.valueHexView,1),r.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}}De.NAME="BitStringValueBlock";class Ne extends L{constructor({idBlock:e={},lenBlock:t={},...r}={}){var n,i;null!==(n=r.isConstructed)&&void 0!==n||(r.isConstructed=!!(null===(i=r.value)||void 0===i?void 0:i.length)),super({idBlock:{isConstructed:r.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!r.isIndefiniteForm},...r},De),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(e,t,r){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(e,t,r)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return xe.prototype.onAsciiEncoding.call(this);{const e=[],t=this.valueBlock.valueHexView;for(const r of t)e.push(r.toString(2).padStart(8,"0"));const r=e.join("");return`${this.constructor.NAME} : ${r.substring(0,r.length-this.valueBlock.unusedBits)}`}}}function Ue(e,t){const r=new Uint8Array([0]),n=new Uint8Array(e),i=new Uint8Array(t);let o=n.slice(0);const f=o.length-1,s=i.slice(0),c=s.length-1;let u=0;let l=0;for(let e=c=0;e--,l++){if(!0==l=o.length)o=a(new Uint8Array([u%10]),o);else o[f-l]=u%10}return r[0]>0&&(o=a(r,o)),o}function Le(e){if(e>=p.length)for(let t=p.length;t<=e;t++){const e=new Uint8Array([0]);let r=p[t-1].slice(0);for(let t=r.length-1;t>=0;t--){const n=new Uint8Array([(r[t]<<1)+e[0]]);e[0]=n[0]/10,r[t]=n[0]%10}e[0]>0&&(r=a(e,r)),p.push(r)}return p[e]}function Fe(e,t){let r=0;const n=new Uint8Array(e),i=new Uint8Array(t),o=n.slice(0),f=o.length-1,a=i.slice(0),s=a.length-1;let c,u=0;for(let e=s;e>=0;e--,u++)if(c=o[f-u]-a[s-u]-r,!0==c<0)r=1,o[f-u]=c+10;else r=0,o[f-u]=c;if(r>0)for(let e=f-s+1;e>=0;e--,u++){if(c=o[f-u]-r,!(c<0)){r=0,o[f-u]=c;break}r=1,o[f-u]=c+10}return o.slice()}Q=Ne,U.BitString=Q,Ne.NAME=O;class je extends(C(R)){constructor({value:e,...t}={}){super(t),this._valueDec=0,t.valueHex&&this.setValueHex(),void 0!==e&&(this.valueDec=e)}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=s.call(this)))}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(function(e){const t=e<0?-1*e:e;let r=128;for(let n=1;n<8;n++){if(t<=r){if(e<0){const e=f(r-t,8,n);return new Uint8Array(e)[0]|=128,e}let i=f(t,8,n),o=new Uint8Array(i);if(128&o[0]){const e=i.slice(0),t=new Uint8Array(e);i=new ArrayBuffer(i.byteLength+1),o=new Uint8Array(i);for(let r=0;r1&&(n=o.length+1),this.valueHexView=o.subarray(n-o.length)),i}toDER(e=!1){const t=this.valueHexView;switch(!0){case 0!=(128&t[0]):{const e=new Uint8Array(this.valueHexView.length+1);e[0]=0,e.set(t,1),this.valueHexView=e}break;case 0===t[0]&&0==(128&t[1]):this.valueHexView=this.valueHexView.subarray(1)}return this.toBER(e)}fromBER(e,t,r){const n=super.fromBER(e,t,r);return-1===n||this.setValueHex(),n}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){const e=8*this.valueHexView.length-1;let t,r=new Uint8Array(8*this.valueHexView.length/3),n=0;const i=this.valueHexView;let o="",f=!1;for(let f=i.byteLength-1;f>=0;f--){t=i[f];for(let i=0;i<8;i++){if(1==(1&t))if(n===e)r=Fe(Le(n),r),o="-";else r=Ue(r,Le(n));n++,t>>=1}}for(let e=0;e0;){const t=new He;if(n=t.fromBER(e,n,r),-1===n)return this.blockLength=0,this.error=t.error,n;0===this.value.length&&(t.isFirstSid=!0),this.blockLength+=t.blockLength,r-=t.blockLength,this.value.push(t)}return n}toBER(e){const t=[];for(let r=0;rNumber.MAX_SAFE_INTEGER){u();const t=BigInt(n);e.valueBigInt=t}else if(e.valueDec=parseInt(n,10),isNaN(e.valueDec))return;this.value.length||(e.isFirstSid=!0,i=!0),this.value.push(e)}}while(-1!==r)}toString(){let e="",t=!1;for(let r=0;r0;){const t=new qe;if(n=t.fromBER(e,n,r),-1===n)return this.blockLength=0,this.error=t.error,n;this.blockLength+=t.blockLength,r-=t.blockLength,this.value.push(t)}return n}toBER(e,t){const r=[];for(let t=0;t4)continue;const o=4-i.length;for(let e=i.length-1;e>=0;e--)r[4*n+e+o]=i[e]}this.valueBlock.value=e}}it.NAME="UniversalStringValueBlock";class ot extends it{constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}ie=ot,U.UniversalString=ie,ot.NAME="UniversalString";class ft extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}oe=ft,U.NumericString=oe,ft.NAME="NumericString";class at extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}fe=at,U.PrintableString=fe,at.NAME="PrintableString";class st extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}ae=st,U.TeletexString=ae,st.NAME="TeletexString";class ct extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}se=ct,U.VideotexString=se,ct.NAME="VideotexString";class ut extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}ce=ut,U.IA5String=ce,ut.NAME="IA5String";class lt extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}ue=lt,U.GraphicString=ue,lt.NAME="GraphicString";class dt extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}le=dt,U.VisibleString=le,dt.NAME="VisibleString";class ht extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}de=ht,U.GeneralString=de,ht.NAME="GeneralString";class pt extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}he=pt,U.CharacterString=he,pt.NAME="CharacterString";class yt extends dt{constructor({value:e,valueDate:t,...r}={}){if(super(r),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,e){this.fromString(e),this.valueBlock.valueHexView=new Uint8Array(e.length);for(let t=0;t=50?1900+r:2e3+r,this.month=parseInt(t[2],10),this.day=parseInt(t[3],10),this.hour=parseInt(t[4],10),this.minute=parseInt(t[5],10),this.second=parseInt(t[6],10)}toString(e="iso"){if("iso"===e){const e=new Array(7);return e[0]=c(this.year<2e3?this.year-1900:this.year-2e3,2),e[1]=c(this.month,2),e[2]=c(this.day,2),e[3]=c(this.hour,2),e[4]=c(this.minute,2),e[5]=c(this.second,2),e[6]="Z",e.join("")}return super.toString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}}pe=yt,U.UTCTime=pe,yt.NAME="UTCTime";class bt extends yt{constructor(e={}){var t;super(e),null!==(t=this.millisecond)&&void 0!==t||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(e){let t,r=!1,n="",i="",o=0,f=0,a=0;if("Z"===e[e.length-1])n=e.substring(0,e.length-1),r=!0;else{const t=new Number(e[e.length-1]);if(isNaN(t.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(r){if(-1!==n.indexOf("+"))throw new Error("Wrong input string for conversion");if(-1!==n.indexOf("-"))throw new Error("Wrong input string for conversion")}else{let e=1,t=n.indexOf("+"),r="";if(-1===t&&(t=n.indexOf("-"),e=-1),-1!==t){if(r=n.substring(t+1),n=n.substring(0,t),2!==r.length&&4!==r.length)throw new Error("Wrong input string for conversion");let i=parseInt(r.substring(0,2),10);if(isNaN(i.valueOf()))throw new Error("Wrong input string for conversion");if(f=e*i,4===r.length){if(i=parseInt(r.substring(2,4),10),isNaN(i.valueOf()))throw new Error("Wrong input string for conversion");a=e*i}}}let s=n.indexOf(".");if(-1===s&&(s=n.indexOf(",")),-1!==s){const e=new Number(`0${n.substring(s)}`);if(isNaN(e.valueOf()))throw new Error("Wrong input string for conversion");o=e.valueOf(),i=n.substring(0,s)}else i=n;switch(!0){case 8===i.length:if(t=/(\d{4})(\d{2})(\d{2})/gi,-1!==s)throw new Error("Wrong input string for conversion");break;case 10===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})/gi,-1!==s){let e=60*o;this.minute=Math.floor(e),e=60*(e-this.minute),this.second=Math.floor(e),e=1e3*(e-this.second),this.millisecond=Math.floor(e)}break;case 12===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==s){let e=60*o;this.second=Math.floor(e),e=1e3*(e-this.second),this.millisecond=Math.floor(e)}break;case 14===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==s){const e=1e3*o;this.millisecond=Math.floor(e)}break;default:throw new Error("Wrong input string for conversion")}const c=t.exec(i);if(null===c)throw new Error("Wrong input string for conversion");for(let e=1;e0&&r.valueBlock.value[0]instanceof kt&&(o=t.valueBlock.value.length),0===o)return{verified:!0,result:e};if(0===t.valueBlock.value.length&&0!==r.valueBlock.value.length){let t=!0;for(let e=0;e=t.valueBlock.value.length){if(!1===r.valueBlock.value[f].optional){const t={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&(delete e[r.name],t.name=r.name)),t}}else if(r.valueBlock.value[0]instanceof kt){if(i=St(e,t.valueBlock.value[f],r.valueBlock.value[0].value),!1===i.verified){if(!r.valueBlock.value[0].optional)return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&delete e[r.name]),i;n++}if(b in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){let n={};n=T in r.valueBlock.value[0]&&r.valueBlock.value[0].local?t:e,void 0===n[r.valueBlock.value[0].name]&&(n[r.valueBlock.value[0].name]=[]),n[r.valueBlock.value[0].name].push(t.valueBlock.value[f])}}else if(i=St(e,t.valueBlock.value[f-n],r.valueBlock.value[f]),!1===i.verified){if(!r.valueBlock.value[f].optional)return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&delete e[r.name]),i;n++}if(!1===i.verified){const t={verified:!1,result:e};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&(delete e[r.name],t.name=r.name)),t}return{verified:!0,result:e}}if(r.primitiveSchema&&g in t.valueBlock){const n=ke(t.valueBlock.valueHexView);if(-1===n.offset){const t={verified:!1,result:n.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&(delete e[r.name],t.name=r.name)),t}return St(e,n.result,r.primitiveSchema)}return{verified:!0,result:e}}function xt(e,t){if(t instanceof Object==!1)return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};const r=ke(i.vJ.toUint8Array(e));return-1===r.offset?{verified:!1,result:r.result}:St(r.result,r.result,t)}!function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"}(Ae||(Ae={})),function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"}(Ee||(Ee={}));class Pt{constructor(e,t=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),e)if("number"==typeof e)this.fromNumber(e);else{if(!i.vJ.isBufferSource(e))throw TypeError("Unsupported type of 'params' argument for BitString");this.unusedBits=t,this.value=i.vJ.toArrayBuffer(e)}}fromASN(e){if(!(e instanceof Ne))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=e.valueBlock.unusedBits,this.value=e.valueBlock.valueHex,this}toASN(){return new Ne({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(e){return new Ne({name:e})}toNumber(){let e="";const t=new Uint8Array(this.value);for(const r of t)e+=r.toString(2).padStart(8,"0");return e=e.split("").reverse().join(""),this.unusedBits&&(e=e.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(e,2)}fromNumber(e){let t=e.toString(2);const r=t.length+7>>3;this.unusedBits=(r<<3)-t.length;const n=new Uint8Array(r);t=t.padStart(r<<3,"0").split("").reverse().join("");let i=0;for(;ie instanceof Me?null:e.valueBeforeDecodeView,toASN:e=>{if(null===e)return new Me;const t=Te(e);if(t.result.error)throw new Error(t.result.error);return t.result}},Ot={fromASN:e=>e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec,toASN:e=>new ze({value:+e})},Ct={fromASN:e=>e.valueBlock.valueDec,toASN:e=>new Ve({value:e})},Bt={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new ze({valueHex:e})},Rt={fromASN:e=>e.toBigInt(),toASN:e=>ze.fromBigInt(e)},Dt={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new Ne({valueHex:e})},Nt={fromASN:e=>e.valueBlock.toString(),toASN:e=>new Ge({value:e})},Ut={fromASN:e=>e.valueBlock.value,toASN:e=>new Ce({value:e})},Lt={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new Re({valueHex:e})},Ft={fromASN:e=>new It(e.getValue()),toASN:e=>e.toASN()};function jt(e){return{fromASN:e=>e.valueBlock.value,toASN:t=>new e({value:t})}}const zt=jt(tt),Vt=jt(nt),Ht=jt(ot),Kt=jt(ft),Gt=jt(at),qt=jt(st),Wt=jt(ct),Qt=jt(ut),Jt=jt(lt),Yt=jt(dt),Zt=jt(ht),Xt=jt(pt),$t={fromASN:e=>e.toDate(),toASN:e=>new yt({valueDate:e})},er={fromASN:e=>e.toDate(),toASN:e=>new bt({valueDate:e})},tr={fromASN:()=>null,toASN:()=>new Me};function rr(e){switch(e){case Ee.Any:return Mt;case Ee.BitString:return Dt;case Ee.BmpString:return Vt;case Ee.Boolean:return Ut;case Ee.CharacterString:return Xt;case Ee.Enumerated:return Ct;case Ee.GeneralString:return Zt;case Ee.GeneralizedTime:return er;case Ee.GraphicString:return Jt;case Ee.IA5String:return Qt;case Ee.Integer:return Ot;case Ee.Null:return tr;case Ee.NumericString:return Kt;case Ee.ObjectIdentifier:return Nt;case Ee.OctetString:return Lt;case Ee.PrintableString:return Gt;case Ee.TeletexString:return qt;case Ee.UTCTime:return $t;case Ee.UniversalString:return Ht;case Ee.Utf8String:return zt;case Ee.VideotexString:return Wt;case Ee.VisibleString:return Yt;default:return null}}function nr(e){return"function"==typeof e&&e.prototype?!(!e.prototype.toASN||!e.prototype.fromASN)||nr(e.prototype):!!(e&&"object"==typeof e&&"toASN"in e&&"fromASN"in e)}function ir(e){var t;if(e){const r=Object.getPrototypeOf(e);return(null===(t=null==r?void 0:r.prototype)||void 0===t?void 0:t.constructor)===Array||ir(r)}return!1}function or(e,t){if(!e||!t)return!1;if(e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),n=new Uint8Array(t);for(let t=0;tt=>{let r;fr.has(t)?r=fr.get(t):(r=fr.createDefault(t),fr.set(t,r)),Object.assign(r,e)},sr=()=>ar({type:Ae.Choice}),cr=e=>ar({type:Ae.Set,...e}),ur=e=>ar({type:Ae.Sequence,...e}),lr=e=>(t,r)=>{let n;fr.has(t.constructor)?n=fr.get(t.constructor):(n=fr.createDefault(t.constructor),fr.set(t.constructor,n));const i=Object.assign({},e);if("number"==typeof i.type&&!i.converter){const n=rr(e.type);if(!n)throw new Error(`Cannot get default converter for property '${r}' of ${t.constructor.name}`);i.converter=n}n.items[r]=i};class dr extends Error{constructor(){super(...arguments),this.schemas=[]}}class hr{static parse(e,t){const r=Te(e);if(r.result.error)throw new Error(r.result.error);return this.fromASN(r.result,t)}static fromASN(e,t){var r;try{if(nr(t)){return(new t).fromASN(e)}const i=fr.get(t);fr.cache(t);let o=i.schema;if(e.constructor===xe&&i.type!==Ae.Choice){o=new xe({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:i.schema.valueBlock.value});for(const t in i.items)delete e[t]}const f=St({},e,o);if(!f.verified)throw new dr(`Data does not match to ${t.name} ASN1 schema. ${f.result.error}`);const a=new t;if(ir(t)){if(!("value"in e.valueBlock)||!Array.isArray(e.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const r=i.itemType;if("number"==typeof r){const n=rr(r);if(!n)throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);return t.from(e.valueBlock.value,(e=>n.fromASN(e)))}return t.from(e.valueBlock.value,(e=>this.fromASN(e,r)))}for(const e in i.items){const t=f.result[e];if(!t)continue;const o=i.items[e],s=o.type;if("number"==typeof s||nr(s)){const i=null!==(r=o.converter)&&void 0!==r?r:nr(s)?new s:null;if(!i)throw new Error("Converter is empty");if(o.repeated)if(o.implicit){const r=new("sequence"===o.repeated?Je:Ye);r.valueBlock=t.valueBlock;const n=Te(r.toBER(!1));if(-1===n.offset)throw new Error(`Cannot parse the child item. ${n.result.error}`);if(!("value"in n.result.valueBlock)||!Array.isArray(n.result.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const f=n.result.valueBlock.value;a[e]=Array.from(f,(e=>i.fromASN(e)))}else a[e]=Array.from(t,(e=>i.fromASN(e)));else{let r=t;if(o.implicit){let e;if(nr(s))e=(new s).toSchema("");else{const t=Ee[s],r=n[t];if(!r)throw new Error(`Cannot get '${t}' class from asn1js module`);e=new r}e.valueBlock=r.valueBlock,r=Te(e.toBER(!1)).result}a[e]=i.fromASN(r)}}else if(o.repeated){if(!Array.isArray(t))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");a[e]=Array.from(t,(e=>this.fromASN(e,s)))}else a[e]=this.fromASN(t,s)}return a}catch(e){throw e instanceof dr&&e.schemas.push(t.name),e}}}class pr{static serialize(e){return e instanceof L?e.toBER(!1):this.toASN(e).toBER(!1)}static toASN(e){if(e&&"object"==typeof e&&nr(e))return e.toASN();if(!e||"object"!=typeof e)throw new TypeError("Parameter 1 should be type of Object.");const t=e.constructor,r=fr.get(t);fr.cache(t);let n,i=[];if(r.itemType){if(!Array.isArray(e))throw new TypeError("Parameter 1 should be type of Array.");if("number"==typeof r.itemType){const n=rr(r.itemType);if(!n)throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);i=e.map((e=>n.toASN(e)))}else i=e.map((e=>this.toAsnItem({type:r.itemType},"[]",t,e)))}else for(const n in r.items){const o=r.items[n],f=e[n];if(void 0===f||o.defaultValue===f||"object"==typeof o.defaultValue&&"object"==typeof f&&or(this.serialize(o.defaultValue),this.serialize(f)))continue;const a=pr.toAsnItem(o,n,t,f);if("number"==typeof o.context)if(o.implicit)if(o.repeated||"number"!=typeof o.type&&!nr(o.type))i.push(new xe({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},value:a.valueBlock.value}));else{const e={};e.valueHex=a instanceof Me?a.valueBeforeDecodeView:a.valueBlock.toBER(),i.push(new _e({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},...e}))}else i.push(new xe({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},value:[a]}));else o.repeated?i=i.concat(a):i.push(a)}switch(r.type){case Ae.Sequence:n=new Je({value:i});break;case Ae.Set:n=new Ye({value:i});break;case Ae.Choice:if(!i[0])throw new Error(`Schema '${t.name}' has wrong data. Choice cannot be empty.`);n=i[0]}return n}static toAsnItem(e,t,r,n){let i;if("number"==typeof e.type){const o=e.converter;if(!o)throw new Error(`Property '${t}' doesn't have converter for type ${Ee[e.type]} in schema '${r.name}'`);if(e.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");const t=Array.from(n,(e=>o.toASN(e)));i=new("sequence"===e.repeated?Je:Ye)({value:t})}else i=o.toASN(n)}else if(e.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");const t=Array.from(n,(e=>this.toASN(e)));i=new("sequence"===e.repeated?Je:Ye)({value:t})}else i=this.toASN(n);return i}}class yr extends Array{constructor(e=[]){if("number"==typeof e)super(e);else{super();for(const t of e)this.push(t)}}}class br{static serialize(e){return pr.serialize(e)}static parse(e,t){return hr.parse(e,t)}static toString(e){const t=Te(i.vJ.isBufferSource(e)?i.vJ.toArrayBuffer(e):br.serialize(e));if(-1===t.offset)throw new Error(`Cannot decode ASN.1 data. ${t.result.error}`);return t.result.toString()}}},79742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),f=o[0],a=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,f,a)),u=0,l=a>0?f-4:f;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],f=16383,a=0,s=n-i;as?s:a+f));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,a=o.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,f=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return f.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},92882:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>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 f(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var a=(e=n).lastIndexOf("1");if(-1===a)return"No separator character for "+e;if(0===a)return"Missing prefix for "+e;var s=e.slice(0,a),c=e.slice(a+1);if(c.length<6)return"Data too short";var u=f(s);if("string"==typeof u)return u;for(var l=[],d=0;d=c.length||l.push(p)}return 1!==u?"Invalid checksum for "+e:{prefix:s,words:l}}function s(e,t,r,n){for(var i=0,o=0,f=(1<=r;)o-=r,a.push(i>>o&f);if(n)o>0&&a.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=f(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var a=e+"1",s=0;s>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,a+=t.charAt(c)}for(s=0;s<6;++s)i=o(i);for(i^=1,s=0;s<6;++s){a+=t.charAt(i>>5*(5-s)&31)}return a},toWordsUnsafe:function(e){var t=s(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=s(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=s(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=s(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},13550:function(e,t,r){!function(e,t){"use strict";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 o(e,t,r){if(o.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 f;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,f=0,a=Math.min(e.length,r),s=t;s=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&f0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.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=t;n-=2)i=s(e,t,n)<=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this._strip()},o.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 o=e.length-r,f=o%n,a=Math.min(o,o-f)+r,s=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f>>24-i&16777215,(i+=2)>=26&&(i-=26,f--),r=0!==o||f!==this.length-1?d[6-s.length]+s+r:s+r}for(0!==o&&(r=o.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=h[e],u=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var y=l.modrn(u).toString(e);r=(l=l.idivn(u)).isZero()?y+r:d[c-y.length]+y+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")},o.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},o.prototype.toJSON=function(){return this.toString(16,2)},f&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(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],o=0|t.words[0],f=i*o,a=67108863&f,s=f/67108864|0;r.words[0]=a;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;u+=(f=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&f}r.words[c]=0|l,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,i),f},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r=0&&(e[r--]=f>>8&255),r>=0&&(e[r--]=f>>16&255),6===o?(r>=0&&(e[r--]=f>>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.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;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.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<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 o=0,f=0;f>26,this.words[f]=67108863&t;for(;0!==o&&f>26,this.words[f]=67108863&t;if(0===o&&f>>13,h=0|f[1],p=8191&h,y=h>>>13,b=0|f[2],g=8191&b,m=b>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],_=8191&E,k=E>>>13,T=0|f[5],S=8191&T,x=T>>>13,P=0|f[6],I=8191&P,M=P>>>13,O=0|f[7],C=8191&O,B=O>>>13,R=0|f[8],D=8191&R,N=R>>>13,U=0|f[9],L=8191&U,F=U>>>13,j=0|a[0],z=8191&j,V=j>>>13,H=0|a[1],K=8191&H,G=H>>>13,q=0|a[2],W=8191&q,Q=q>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,fe=ie>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,ue=0|a[8],le=8191&ue,de=ue>>>13,he=0|a[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,V))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(y,z)|0,o=Math.imul(y,V);var ge=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,V))+Math.imul(m,z)|0,o=Math.imul(m,V),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0;var me=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,V))+Math.imul(A,z)|0,o=Math.imul(A,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var ve=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,V))+Math.imul(k,z)|0,o=Math.imul(k,V),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(x,z)|0,o=Math.imul(x,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(M,z)|0,o=Math.imul(M,V),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ee=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,V))+Math.imul(B,z)|0,o=Math.imul(B,V),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,fe)|0;var _e=(c+(n=n+Math.imul(l,se)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(d,se)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,V))+Math.imul(N,z)|0,o=Math.imul(N,V),n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,V))+Math.imul(F,z)|0,o=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,se)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var Te=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(F,W)|0,o=Math.imul(F,Q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,Z))+Math.imul(F,Y)|0,o=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,se)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Ie=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(B,se)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,fe))+Math.imul(F,oe)|0,o=Math.imul(F,fe),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(F,le)|0,o=Math.imul(F,de);var Be=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,s[0]=be,s[1]=ge,s[2]=me,s[3]=ve,s[4]=we,s[5]=Ae,s[6]=Ee,s[7]=_e,s[8]=ke,s[9]=Te,s[10]=Se,s[11]=xe,s[12]=Pe,s[13]=Ie,s[14]=Me,s[15]=Oe,s[16]=Ce,s[17]=Be,s[18]=Re,0!==c&&(s[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,f&=67108863}r.words[o]=a,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f>>=1)i++;return 1<>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f>=26,r+=o/67108864|0,r+=f>>>26,this.words[i]=67108863&f}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<f)for(this.length-=f,c=0;c=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=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<=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},o.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>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!==(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==t){(a=new o(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:a.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,f,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.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 o(1),f=new o(0),a=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),l=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()||f.isOdd())&&(i.iadd(u),f.isub(l)),i.iushrn(1),f.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(l)),a.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),f.isub(s)):(r.isub(t),a.isub(i),s.isub(f))}return{a,b:s,gcd:r.iushln(c)}},o.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,f=new o(1),a=new o(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)f.isOdd()&&f.iadd(s),f.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(a)):(r.isub(t),a.isub(f))}return(i=0===t.cmpn(1)?f:a).cmpn(0)<0&&i.iadd(e),i},o.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 o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[f]=a}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._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 x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.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=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(E,A),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.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")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.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 o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=f;0!==h.cmp(a);){for(var y=h,b=0;0!==y.cmp(a);b++)y=y.redSqr();n(b=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var l=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==f?(f<<=1,f|=l,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[f]),a=0,f=0)):a=0}s=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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),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)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(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),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},29931:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{"use strict";const n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=s,t.h2=50;const f=2147483647;function a(e){if(e>f)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);const i=function(e){if(s.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?a(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return u(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function b(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,f=1,a=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;f=2,a/=2,s/=2,r/=2}function c(e,t){return 1===f?e[t]:e.readUInt16BE(t*f)}if(i){let n=-1;for(o=r;oa&&(r=a-s),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let f;for(n>o/2&&(n=o/2),f=0;f>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+f<=r){let r,n,a,s;switch(f){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(s=(31&t)<<6|63&r,s>127&&(o=s));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(s=(15&t)<<12|(63&r)<<6|63&n,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(s=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=f}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),f=(r>>>=0)-(t>>>=0);const a=Math.min(o,f),c=this.slice(n,i),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let f=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=f,f>>=8,e[r++]=f,f>>=8,e[r++]=f,f>>=8,e[r++]=f,r}function D(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let f=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=f,f>>=8,e[r+2]=f,f>>=8,e[r+1]=f,f>>=8,e[r]=f,r+8}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){B(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){B(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=X((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,e,t,r,n-1,-n)}let i=0,o=1,f=0;for(this[t]=255&e;++i>0)-f&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,e,t,r,n-1,-n)}let i=r-1,o=1,f=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===f&&0!==this[t+i+1]&&(f=1),this[t+i]=(e/o>>0)-f&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=X((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let f=0;f55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(f+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},21924:(e,t,r)=>{"use strict";var n=r(40210),i=r(55559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},55559:(e,t,r)=>{"use strict";var n=r(58612),i=r(40210),o=i("%Function.prototype.apply%"),f=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(f,o),s=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,f,arguments);s&&c&&(s(t,"length").configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))}));return t};var l=function(){return a(n,o,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l},4289:(e,t,r)=>{"use strict";var n=r(82215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,f=Array.prototype.concat,a=Object.defineProperty,s=r(31044)(),c=a&&s,u=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(c?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=f.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(80953),n.rand=r(29931),n.curve=r(88254),n.curves=r(45427),n.ec=r(57954),n.eddsa=r(65980)},4918:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953),o=i.getNAF,f=i.getJSF,a=i.assert;function s(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=f;u--)s=(s<<1)+n[u];c.push(s)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(f=0;f=0;c--){for(var u=0;c>=0&&0===f[c];c--)u++;if(c>=0&&u++,s=s.dblp(u),c<0)break;var l=f[c];a(0!==l),s="affine"===e.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,t,r,n,i){var a,s,c,u=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a=1;a-=2){var y=a-1,b=a;if(1===u[y]&&1===u[b]){var g=[t[y],null,null,t[b]];0===t[y].y.cmp(t[b].y)?(g[1]=t[y].add(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg())):0===t[y].y.cmp(t[b].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].add(t[b].neg())):(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=f(r[y],r[b]);for(h=Math.max(v[0].length,h),d[y]=new Array(h),d[b]=new Array(h),s=0;s=0;a--){for(var k=0;a>=0;){var T=!0;for(s=0;s=0&&k++,E=E.dblp(k),a<0)break;for(s=0;s0?c=l[s][S-1>>1]:S<0&&(c=l[s][-S-1>>1].neg()),E="affine"===c.type?E.mixedAdd(c):E.add(c))}}for(a=0;a=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(80953),i=r(73785),o=r(35717),f=r(4918),a=n.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,f.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){f.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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(s,f),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},s.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),f=n.redMul(o.redInvm()),a=f.redSqrt();if(0!==a.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},s.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),f=n.redMul(o.redInvm());if(0===f.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=f.redSqrt();if(0!==a.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},s.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)},o(c,f.BasePoint),s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},s.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.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),o=n.redAdd(t),f=o.redSub(r),a=n.redSub(t),s=i.redMul(f),c=o.redMul(a),u=i.redMul(a),l=f.redMul(o);return this.curve.point(s,c,l,u)},c.prototype._projDbl=function(){var e,t,r,n,i,o,f=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(s);this.zOne?(e=f.redSub(a).redSub(s).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(s)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=f.redSub(a).redISub(s).redMul(o),t=c.redMul(n.redSub(s)),r=c.redMul(o))}else n=a.redAdd(s),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(f.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(s)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.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)),o=r.redSub(t),f=i.redSub(n),a=i.redAdd(n),s=r.redAdd(t),c=o.redMul(f),u=a.redMul(s),l=o.redMul(s),d=f.redMul(a);return this.curve.point(c,u,d,l)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),f=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(f),s=i.redSub(a),c=i.redAdd(a),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(f),l=n.redMul(s).redMul(u);return this.curve.twisted?(t=n.redMul(c).redMul(f.redSub(this.curve._mulA(o))),r=s.redMul(c)):(t=n.redMul(c).redMul(f.redSub(o)),r=this.curve._mulC(s).redMul(c)),this.curve.point(l,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.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}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},88254:(e,t,r)=>{"use strict";var n=t;n.base=r(4918),n.short=r(6673),n.mont=r(22881),n.edwards=r(31138)},22881:(e,t,r)=>{"use strict";var n=r(73785),i=r(35717),o=r(4918),f=r(80953);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.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)},i(s,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},a.prototype.point=function(e,t){return new s(this,e,t)},a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.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)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),f=i.redMul(n),a=t.z.redMul(o.redAdd(f).redSqr()),s=t.x.redMul(o.redISub(f).redSqr());return this.curve.point(a,s)},s.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 o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,t,r)=>{"use strict";var n=r(80953),i=r(73785),o=r(35717),f=r(4918),a=n.assert;function s(e){f.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(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)}function c(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(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 u(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(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}o(s,f),e.exports=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(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 i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(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 i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},s.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t,r,n,o,f,a,s,c,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),y=new i(0),b=new i(0),g=new i(1),m=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),u=b.sub(v.mul(p));var w=g.sub(v.mul(y));if(!n&&c.cmp(l)<0)t=s.neg(),r=p,n=c.neg(),o=u;else if(n&&2==++m)break;s=c,h=d,d=c,b=p,p=u,g=y,y=w}f=c.neg(),a=u;var A=n.sqr().add(o.sqr());return f.sqr().add(a.sqr()).cmp(A)>=0&&(f=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),f.negative&&(f=f.neg(),a=a.neg()),[{a:n,b:o},{a:f,b:a}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),f=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(f).sub(a),k2:s.add(c).neg()}},s.prototype.pointFromX=function(e,t){(e=new i(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 o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},s.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)},s.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.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)},c.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),o=i.redSqr().redISub(this.x.redAdd(this.x)),f=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,f)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(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)},c.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)},c.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)},c.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))},c.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},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,f.BasePoint),s.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.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)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.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),o=this.y.redMul(t.redMul(e.z)),f=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),s=o.redSub(f);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=n.redMul(c),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),h=s.redMul(l.redISub(d)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,p)},u.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,o=e.y.redMul(t).redMul(this.z),f=r.redSub(n),a=i.redSub(o);if(0===f.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=f.redSqr(),c=s.redMul(f),u=r.redMul(s),l=a.redSqr().redIAdd(c).redISub(u).redISub(u),d=a.redMul(u.redISub(l)).redISub(i.redMul(c)),h=this.z.redMul(f);return this.curve.jpoint(l,d,h)},u.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=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},45427:(e,t,r)=>{"use strict";var n,i=t,o=r(33715),f=r(88254),a=r(80953).assert;function s(e){"short"===e.type?this.curve=new f.short(e):"edwards"===e.type?this.curve=new f.edwards(e):this.curve=new f.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,c("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:o.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"]}),c("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:o.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(91037)}catch(e){n=void 0}c("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},57954:(e,t,r)=>{"use strict";var n=r(73785),i=r(2156),o=r(80953),f=r(45427),a=r(29931),s=o.assert,c=r(31251),u=r(90611);function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(f,e),"Unknown curve "+e),e=f[e]),e instanceof f.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}e.exports=l,l.prototype.keyPair=function(e){return new c(this,e)},l.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var f=new n(t.generate(r));if(!(f.cmp(o)>0))return f.iaddn(1),this.keyFromPrivate(f)}},l.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},l.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var f=this.n.byteLength(),a=t.getPrivate().toArray("be",f),s=e.toArray("be",f),c=new i({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(l)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var y=p.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var g=h.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),m^=1),new u({r:b,s:g,recoveryParam:m})}}}}}},l.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,f=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var a,s=f.invm(this.n),c=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(e,t,r,i){s((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,f=new n(e),a=t.r,c=t.s,l=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var h=t.r.invm(o),p=o.sub(f).mul(h).umod(o),y=c.mul(h).umod(o);return this.g.mulAdd(p,a,y)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},31251:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953).assert;function o(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)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.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"}},o.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},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(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)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},90611:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953),o=i.assert;function f(e,t){if(e instanceof f)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function s(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,o=0,f=t.place;o>>=0;return!(i<=127)&&(t.place=f,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=f,f.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=s(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var f=s(e,r);if(!1===f)return!1;var c=e.slice(r.place,f+r.place);if(r.place+=f,2!==e[r.place++])return!1;var u=s(e,r);if(!1===u)return!1;if(e.length!==u+r.place)return!1;var l=e.slice(r.place,u+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},f.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=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),f=[48];return u(f,o.length),f=f.concat(o),i.encode(f,e)}},65980:(e,t,r)=>{"use strict";var n=r(33715),i=r(45427),o=r(80953),f=o.assert,a=o.parseBytes,s=r(79087),c=r(23622);function u(e){if(f("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[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=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),f=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(f).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},u.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(80953),i=n.assert,o=n.parseBytes,f=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},f(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),f(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),f(a,"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})),f(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),f(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),f(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},23622:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953),o=i.assert,f=i.cachedProperty,a=i.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}f(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),f(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),f(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),f(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},91037:e=>{e.exports={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"]]}}},80953:(e,t,r)=>{"use strict";var n=t,i=r(73785),o=r(79746),f=r(34504);n.assert=o,n.toArray=f.toArray,n.zero2=f.zero2,n.toHex=f.toHex,n.encode=f.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-s:s,o.isubn(a)):a=0,n[f]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var f,a,s=e.andln(3)+i&3,c=t.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),f=0==(1&s)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?s:-s,r[0].push(f),a=0==(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==s?c:-c,r[1].push(a),2*i===f+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},73785:function(e,t,r){!function(e,t){"use strict";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 o(e,t,r){if(o.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 f;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(85568).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),f=t;f=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.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=t;n-=2)i=s(e,t,n)<=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this.strip()},o.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 o=e.length-r,f=o%n,a=Math.min(o,o-f)+r,s=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var u=["","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"],l=[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],o=0|t.words[0],f=i*o,a=67108863&f,s=f/67108864|0;r.words[0]=a;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;u+=(f=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&f}r.words[c]=0|l,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f>>24-i&16777215)||f!==this.length-1?u[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,f--)}for(0!==o&&(r=o.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=l[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var y=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?y+r:u[c-y.length]+y+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")},o.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},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==f),this.toArrayLike(f,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var f,a,s="le"===t,c=new e(o),u=this.clone();if(s){for(a=0;!u.isZero();a++)f=u.andln(255),u.iushrn(8),c[a]=f;for(;a=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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.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;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.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<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 o=0,f=0;f>26,this.words[f]=67108863&t;for(;0!==o&&f>26,this.words[f]=67108863&t;if(0===o&&f>>13,h=0|f[1],p=8191&h,y=h>>>13,b=0|f[2],g=8191&b,m=b>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],_=8191&E,k=E>>>13,T=0|f[5],S=8191&T,x=T>>>13,P=0|f[6],I=8191&P,M=P>>>13,O=0|f[7],C=8191&O,B=O>>>13,R=0|f[8],D=8191&R,N=R>>>13,U=0|f[9],L=8191&U,F=U>>>13,j=0|a[0],z=8191&j,V=j>>>13,H=0|a[1],K=8191&H,G=H>>>13,q=0|a[2],W=8191&q,Q=q>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,fe=ie>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,ue=0|a[8],le=8191&ue,de=ue>>>13,he=0|a[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,V))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(y,z)|0,o=Math.imul(y,V);var ge=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,V))+Math.imul(m,z)|0,o=Math.imul(m,V),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0;var me=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,V))+Math.imul(A,z)|0,o=Math.imul(A,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var ve=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,V))+Math.imul(k,z)|0,o=Math.imul(k,V),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(x,z)|0,o=Math.imul(x,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(M,z)|0,o=Math.imul(M,V),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ee=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,V))+Math.imul(B,z)|0,o=Math.imul(B,V),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,fe)|0;var _e=(c+(n=n+Math.imul(l,se)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(d,se)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,V))+Math.imul(N,z)|0,o=Math.imul(N,V),n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,V))+Math.imul(F,z)|0,o=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,se)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var Te=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(F,W)|0,o=Math.imul(F,Q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,Z))+Math.imul(F,Y)|0,o=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,se)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Ie=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(B,se)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,fe))+Math.imul(F,oe)|0,o=Math.imul(F,fe),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(F,le)|0,o=Math.imul(F,de);var Be=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,s[0]=be,s[1]=ge,s[2]=me,s[3]=ve,s[4]=we,s[5]=Ae,s[6]=Ee,s[7]=_e,s[8]=ke,s[9]=Te,s[10]=Se,s[11]=xe,s[12]=Pe,s[13]=Ie,s[14]=Me,s[15]=Oe,s[16]=Ce,s[17]=Be,s[18]=Re,0!==c&&(s[19]=c,r.length++),r};function y(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,f&=67108863}r.words[o]=a,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):y(this,e,t),r},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f>>=1)i++;return 1<>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<f)for(this.length-=f,c=0;c=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=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<=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},o.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>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!==(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==t){(a=new o(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:a.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,f,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.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},o.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()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.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 o(1),f=new o(0),a=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),l=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()||f.isOdd())&&(i.iadd(u),f.isub(l)),i.iushrn(1),f.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(l)),a.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),f.isub(s)):(r.isub(t),a.isub(i),s.isub(f))}return{a,b:s,gcd:r.iushln(c)}},o.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,f=new o(1),a=new o(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)f.isOdd()&&f.iadd(s),f.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(a)):(r.isub(t),a.isub(f))}return(i=0===t.cmpn(1)?f:a).cmpn(0)<0&&i.iadd(e),i},o.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 o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[f]=a}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.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 o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){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 A(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._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 k(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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 o(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=t0?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(v,m),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.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")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.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)},_.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},_.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)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.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 o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=f;0!==h.cmp(a);){for(var y=h,b=0;0!==y.cmp(a);b++)y=y.redSqr();n(b=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var l=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==f?(f<<=1,f|=l,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[f]),a=0,f=0)):a=0}s=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,_),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.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),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)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(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),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},39265:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.PrivateKey=void 0;var i=r(722),o=r(78125),f=function(){function e(e,t){this.key=e,this.ec=t}return e.fromElliptic=function(t,r,i){return i||(i=o.constructElliptic(r)),new e({type:r,data:t.getPrivate().toArrayLike(n,"be",32)},i)},e.fromString=function(t,r){var n=i.stringToPrivateKey(t);return r||(r=o.constructElliptic(n.type)),new e(n,r)},e.prototype.toElliptic=function(){return this.ec.keyFromPrivate(this.key.data)},e.prototype.toLegacyString=function(){return i.privateKeyToLegacyString(this.key)},e.prototype.toString=function(){return i.privateKeyToString(this.key)},e.prototype.getType=function(){return this.key.type},e.prototype.getPublicKey=function(){var e=this.toElliptic();return o.PublicKey.fromElliptic(e,this.getType(),this.ec)},e.prototype.sign=function(e,t,r){var f=this;void 0===t&&(t=!0),void 0===r&&(r="utf8"),t&&("string"==typeof e&&(e=n.from(e,r)),e=this.ec.hash().update(e).digest());var a,s,c=0,u=function(t){var r=f.toElliptic().sign(e,t);return o.Signature.fromElliptic(r,f.getType(),f.ec)};if(this.key.type===i.KeyType.k1)do{a=u({canonical:!0,pers:[++c]})}while(128&(s=a.toBinary())[1]||0===s[1]&&!(128&s[2])||128&s[33]||!(0!==s[33]||128&s[34]));else a=u({canonical:!0});return a},e.prototype.isValid=function(){try{return this.toElliptic().validate().result}catch(e){return!1}},e}();t.PrivateKey=f},62680:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=void 0;var i=r(722),o=r(78125),f=function(){function e(e,t){this.key=e,this.ec=t}return e.fromString=function(t,r){var n=i.stringToPublicKey(t);return r||(r=o.constructElliptic(n.type)),new e(n,r)},e.fromElliptic=function(t,r,n){var i=t.getPublic().getX().toArray("be",32),f=t.getPublic().getY().toArray("be",32);return n||(n=o.constructElliptic(r)),new e({type:r,data:new Uint8Array([1&f[31]?3:2].concat(i))},n)},e.prototype.toString=function(){return i.publicKeyToString(this.key)},e.prototype.toLegacyString=function(){return i.publicKeyToLegacyString(this.key)},e.prototype.toElliptic=function(){return this.ec.keyPair({pub:n.from(this.key.data)})},e.prototype.getType=function(){return this.key.type},e.prototype.isValid=function(){try{return this.toElliptic().validate().result}catch(e){return!1}},e}();t.PublicKey=f},70578:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;var i=r(71539),o=r(722),f=r(78125),a=function(){function e(e,t){this.signature=e,this.ec=t}return e.fromString=function(t,r){var n=o.stringToSignature(t);return r||(r=f.constructElliptic(n.type)),new e(n,r)},e.fromElliptic=function(t,r,n){var i,a=t.r.toArray("be",32),s=t.s.toArray("be",32);r===o.KeyType.k1||r===o.KeyType.r1?(i=t.recoveryParam+27,t.recoveryParam<=3&&(i+=4)):r===o.KeyType.wa&&(i=t.recoveryParam);var c=new Uint8Array([i].concat(a,s));return n||(n=f.constructElliptic(r)),new e({type:r,data:c},n)},e.prototype.toElliptic=function(){var e,t=new i(this.signature.data.slice(1,33)),r=new i(this.signature.data.slice(33,65));return this.signature.type===o.KeyType.k1||this.signature.type===o.KeyType.r1?(e=this.signature.data[0]-27)>3&&(e-=4):this.signature.type===o.KeyType.wa&&(e=this.signature.data[0]),{r:t,s:r,recoveryParam:3&e}},e.prototype.toString=function(){return o.signatureToString(this.signature)},e.prototype.toBinary=function(){return this.signature.data},e.prototype.getType=function(){return this.signature.type},e.prototype.verify=function(e,t,r,i){void 0===r&&(r=!0),void 0===i&&(i="utf8"),r&&("string"==typeof e&&(e=n.from(e,i)),e=this.ec.hash().update(e).digest());var o=this.toElliptic(),f=t.toElliptic();return this.ec.verify(e,o,f,i)},e.prototype.recover=function(e,t,r){void 0===t&&(t=!0),void 0===r&&(r="utf8"),t&&("string"==typeof e&&(e=n.from(e,r)),e=this.ec.hash().update(e).digest());var i=this.toElliptic(),o=this.ec.recoverPubKey(e,i,i.recoveryParam,r),a=this.ec.keyFromPublic(o);return f.PublicKey.fromElliptic(a,this.getType(),this.ec)},e}();t.Signature=a},93220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},58982:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){f=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},a=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBuilder=t.TransactionBuilder=t.Api=void 0;var c=r(6154),u=r(68888),l=function(){function e(e){this.contracts=new Map,this.cachedAbis=new Map,this.transactionExtensions=[{id:1,type:"resource_payer",keys:["payer","max_net_bytes","max_cpu_us","max_memory_bytes"]}],this.rpc=e.rpc,this.authorityProvider=e.authorityProvider||e.rpc,this.abiProvider=e.abiProvider||e.rpc,this.signatureProvider=e.signatureProvider,this.chainId=e.chainId,this.textEncoder=e.textEncoder,this.textDecoder=e.textDecoder,this.abiTypes=u.getTypesFromAbi(u.createAbiTypes()),this.transactionTypes=u.getTypesFromAbi(u.createTransactionTypes())}return e.prototype.rawAbiToJson=function(e){var t=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder,array:e});if(!u.supportedAbiVersion(t.getString()))throw new Error("Unsupported abi version");return t.restartRead(),this.abiTypes.get("abi_def").deserialize(t)},e.prototype.jsonToRawAbi=function(e){var t=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});if(this.abiTypes.get("abi_def").serialize(t,e),!u.supportedAbiVersion(t.getString()))throw new Error("Unsupported abi version");return t.asUint8Array()},e.prototype.getCachedAbi=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){var r,n,i,f;return o(this,(function(o){switch(o.label){case 0:if(!t&&this.cachedAbis.get(e))return[2,this.cachedAbis.get(e)];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.abiProvider.getRawAbi(e)];case 2:return n=o.sent().abi,i=this.rawAbiToJson(n),r={rawAbi:n,abi:i},[3,4];case 3:throw(f=o.sent()).message="fetching abi for "+e+": "+f.message,f;case 4:if(!r)throw new Error("Missing abi for "+e);return this.cachedAbis.set(e,r),[2,r]}}))}))},e.prototype.getAbi=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.getCachedAbi(e,t)];case 1:return[2,r.sent().abi]}}))}))},e.prototype.getTransactionAbis=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){var r,n,s,c,u=this;return o(this,(function(l){return r=(e.context_free_actions||[]).concat(e.actions),n=r.map((function(e){return e.account})),s=new Set(n),c=a([],f(s)).map((function(e){return i(u,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return r={accountName:e},[4,this.getCachedAbi(e,t)];case 1:return[2,(r.abi=n.sent().rawAbi,r)]}}))}))})),[2,Promise.all(c)]}))}))},e.prototype.getContract=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){var r,n,i,f,a,c,l,d,h,p,y;return o(this,(function(o){switch(o.label){case 0:return!t&&this.contracts.get(e)?[2,this.contracts.get(e)]:[4,this.getAbi(e,t)];case 1:r=o.sent(),n=u.getTypesFromAbi(u.createInitialTypes(),r),i=new Map;try{for(f=s(r.actions),a=f.next();!a.done;a=f.next())c=a.value,l=c.name,d=c.type,i.set(l,u.getType(n,d))}catch(e){p={error:e}}finally{try{a&&!a.done&&(y=f.return)&&y.call(f)}finally{if(p)throw p.error}}return h={types:n,actions:i},this.contracts.set(e,h),[2,h]}}))}))},e.prototype.serialize=function(e,t,r){this.transactionTypes.get(t).serialize(e,r)},e.prototype.deserialize=function(e,t){return this.transactionTypes.get(t).deserialize(e)},e.prototype.serializeTransaction=function(e){var t=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});return this.serialize(t,"transaction",n({max_net_usage_words:0,max_cpu_usage_ms:0,delay_sec:0,context_free_actions:[],actions:[],transaction_extensions:[]},e)),t.asUint8Array()},e.prototype.serializeContextFreeData=function(e){var t,r;if(!e||!e.length)return null;var n=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});n.pushVaruint32(e.length);try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var f=o.value;n.pushBytes(f)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.asUint8Array()},e.prototype.deserializeTransaction=function(e){var t=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});return t.pushArray(e),this.deserialize(t,"transaction")},e.prototype.serializeTransactionExtensions=function(e){var t=[];if(e.resource_payer){var r=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});u.getTypesFromAbi(u.createTransactionExtensionTypes()).get("resource_payer").serialize(r,e.resource_payer),t=a(a([],f(t)),[[1,u.arrayToHex(r.asUint8Array())]])}return t},e.prototype.deserializeTransactionExtensions=function(e){var t=this,r={};return e.forEach((function(e){var n=t.transactionExtensions.find((function(t){return t.id===e[0]}));if(void 0===n)throw new Error("Transaction Extension could not be determined: "+e);var i=u.getTypesFromAbi(u.createTransactionExtensionTypes()),o=new u.SerialBuffer({textEncoder:t.textEncoder,textDecoder:t.textDecoder});o.pushArray(u.hexToUint8Array(e[1]));var f=i.get(n.type).deserialize(o);1===e[0]&&(f.max_net_bytes=Number(f.max_net_bytes),f.max_cpu_us=Number(f.max_cpu_us),f.max_memory_bytes=Number(f.max_memory_bytes),r.resource_payer=f)})),r},e.prototype.deleteTransactionExtensionObjects=function(e){return delete e.resource_payer,e},e.prototype.serializeActions=function(e){return i(this,void 0,void 0,(function(){var t=this;return o(this,(function(r){switch(r.label){case 0:return[4,Promise.all(e.map((function(e){return i(t,void 0,void 0,(function(){var t,r,n,i,f;return o(this,(function(o){switch(o.label){case 0:return t=e.account,r=e.name,n=e.authorization,i=e.data,[4,this.getContract(t)];case 1:return f=o.sent(),"object"!=typeof i?[2,e]:[2,u.serializeAction(f,t,r,n,i,this.textEncoder,this.textDecoder)]}}))}))})))];case 1:return[2,r.sent()]}}))}))},e.prototype.deserializeActions=function(e){return i(this,void 0,void 0,(function(){var t=this;return o(this,(function(r){switch(r.label){case 0:return[4,Promise.all(e.map((function(e){var r=e.account,n=e.name,f=e.authorization,a=e.data;return i(t,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,this.getContract(r)];case 1:return e=t.sent(),[2,u.deserializeAction(e,r,n,f,a,this.textEncoder,this.textDecoder)]}}))}))})))];case 1:return[2,r.sent()]}}))}))},e.prototype.deserializeTransactionWithActions=function(e){return i(this,void 0,void 0,(function(){var t,r,i;return o(this,(function(o){switch(o.label){case 0:return"string"==typeof e&&(e=u.hexToUint8Array(e)),t=this.deserializeTransaction(e),[4,this.deserializeActions(t.context_free_actions)];case 1:return r=o.sent(),[4,this.deserializeActions(t.actions)];case 2:return i=o.sent(),[2,n(n({},t),{context_free_actions:r,actions:i})]}}))}))},e.prototype.deflateSerializedArray=function(e){return c.deflate(e,{level:9})},e.prototype.inflateSerializedArray=function(e){return c.inflate(e)},e.prototype.transact=function(e,t){var r=void 0===t?{}:t,f=r.broadcast,a=void 0===f||f,s=r.sign,c=void 0===s||s,u=r.readOnlyTrx,l=r.returnFailureTraces,d=r.requiredKeys,h=r.compression,p=r.blocksBehind,y=r.useLastIrreversible,b=r.expireSeconds;return i(this,void 0,void 0,(function(){var t,r,i,f,s,g,m,v;return o(this,(function(o){switch(o.label){case 0:if("number"==typeof p&&y)throw new Error("Use either blocksBehind or useLastIrreversible");return this.chainId?[3,2]:[4,this.rpc.get_info()];case 1:t=o.sent(),this.chainId=t.chain_id,o.label=2;case 2:return"number"!=typeof p&&!y||!b?[3,4]:[4,this.generateTapos(t,e,p,y,b)];case 3:e=o.sent(),o.label=4;case 4:if(!this.hasRequiredTaposFields(e))throw new Error("Required configuration or TAPOS fields are not present");return[4,this.getTransactionAbis(e)];case 5:return r=o.sent(),i=[n({},e)],v={},[4,this.serializeTransactionExtensions(e)];case 6:return v.transaction_extensions=o.sent(),[4,this.serializeActions(e.context_free_actions||[])];case 7:return v.context_free_actions=o.sent(),[4,this.serializeActions(e.actions)];case 8:return e=n.apply(void 0,i.concat([(v.actions=o.sent(),v)])),e=this.deleteTransactionExtensionObjects(e),f=this.serializeTransaction(e),s=this.serializeContextFreeData(e.context_free_data),g={serializedTransaction:f,serializedContextFreeData:s,signatures:[]},c?d?[3,11]:[4,this.signatureProvider.getAvailableKeys()]:[3,13];case 9:return m=o.sent(),[4,this.authorityProvider.getRequiredKeys({transaction:e,availableKeys:m})];case 10:d=o.sent(),o.label=11;case 11:return[4,this.signatureProvider.sign({chainId:this.chainId,requiredKeys:d,serializedTransaction:f,serializedContextFreeData:s,abis:r})];case 12:g=o.sent(),o.label=13;case 13:return a?h?[2,this.pushCompressedSignedTransaction(g,u,l)]:[2,this.pushSignedTransaction(g,u,l)]:[2,g]}}))}))},e.prototype.query=function(e,t,r,f){var a=f.sign,s=f.requiredKeys,c=f.authorization,l=void 0===c?[]:c;return i(this,void 0,void 0,(function(){var i,f,c,d,h,p,y,b,g,m,v;return o(this,(function(o){switch(o.label){case 0:return[4,this.rpc.get_info()];case 1:return i=o.sent(),[4,this.tryRefBlockFromGetInfo(i)];case 2:return f=o.sent(),c=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder}),u.serializeQuery(c,r),d=n(n({},u.transactionHeader(f,1800)),{context_free_actions:[],actions:[{account:e,name:"queryit",authorization:l,data:u.arrayToHex(c.asUint8Array())}]}),h=this.serializeTransaction(d),p=[],a?[4,this.getTransactionAbis(d)]:[3,8];case 3:return y=o.sent(),s?[3,6]:[4,this.signatureProvider.getAvailableKeys()];case 4:return b=o.sent(),[4,this.authorityProvider.getRequiredKeys({transaction:d,availableKeys:b})];case 5:s=o.sent(),o.label=6;case 6:return[4,this.signatureProvider.sign({chainId:this.chainId,requiredKeys:s,serializedTransaction:h,serializedContextFreeData:null,abis:y})];case 7:g=o.sent(),p=g.signatures,o.label=8;case 8:return[4,this.rpc.send_transaction({signatures:p,compression:0,serializedTransaction:h})];case 9:return m=o.sent(),v=new u.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder,array:u.hexToUint8Array(m.processed.action_traces[0][1].return_value)}),t?[2,u.deserializeAnyvarShort(v)]:[2,u.deserializeAnyvar(v)]}}))}))},e.prototype.pushSignedTransaction=function(e,t,r){var n=e.signatures,f=e.serializedTransaction,a=e.serializedContextFreeData;return void 0===t&&(t=!1),void 0===r&&(r=!1),i(this,void 0,void 0,(function(){return o(this,(function(e){return t?[2,this.rpc.push_ro_transaction({signatures:n,serializedTransaction:f,serializedContextFreeData:a},r)]:[2,this.rpc.push_transaction({signatures:n,serializedTransaction:f,serializedContextFreeData:a})]}))}))},e.prototype.pushCompressedSignedTransaction=function(e,t,r){var n=e.signatures,f=e.serializedTransaction,a=e.serializedContextFreeData;return void 0===t&&(t=!1),void 0===r&&(r=!1),i(this,void 0,void 0,(function(){var e,i;return o(this,(function(o){return e=this.deflateSerializedArray(f),i=this.deflateSerializedArray(a||new Uint8Array(0)),t?[2,this.rpc.push_ro_transaction({signatures:n,compression:1,serializedTransaction:e,serializedContextFreeData:i},r)]:[2,this.rpc.push_transaction({signatures:n,compression:1,serializedTransaction:e,serializedContextFreeData:i})]}))}))},e.prototype.generateTapos=function(e,t,r,f,a){return i(this,void 0,void 0,(function(){var i,s,c,l;return o(this,(function(o){switch(o.label){case 0:return e?[3,2]:[4,this.rpc.get_info()];case 1:e=o.sent(),o.label=2;case 2:return f?[4,this.tryRefBlockFromGetInfo(e)]:[3,4];case 3:return i=o.sent(),[2,n(n({},u.transactionHeader(i,a)),t)];case 4:return(s=e.head_block_num-r)<=e.last_irreversible_block_num?[4,this.tryGetBlockInfo(s)]:[3,6];case 5:return l=o.sent(),[3,8];case 6:return[4,this.tryGetBlockHeaderState(s)];case 7:l=o.sent(),o.label=8;case 8:return c=l,[2,n(n({},u.transactionHeader(c,a)),t)]}}))}))},e.prototype.hasRequiredTaposFields=function(e){var t=e.expiration,r=e.ref_block_num,n=e.ref_block_prefix;return!(!t||"number"!=typeof r||"number"!=typeof n)},e.prototype.tryGetBlockHeaderState=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,this.rpc.get_block_header_state(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,this.tryGetBlockInfo(e)];case 4:return[2]}}))}))},e.prototype.tryGetBlockInfo=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,this.rpc.get_block_info(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,this.rpc.get_block(e)];case 4:return[2]}}))}))},e.prototype.tryRefBlockFromGetInfo=function(e){return i(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return e.hasOwnProperty("last_irreversible_block_id")&&e.hasOwnProperty("last_irreversible_block_num")&&e.hasOwnProperty("last_irreversible_block_time")?[2,{block_num:e.last_irreversible_block_num,id:e.last_irreversible_block_id,timestamp:e.last_irreversible_block_time}]:[3,1];case 1:return[4,this.tryGetBlockInfo(e.last_irreversible_block_num)];case 2:return[2,{block_num:(t=r.sent()).block_num,id:t.id,timestamp:t.timestamp}]}}))}))},e.prototype.with=function(e){return new h(this,e)},e.prototype.buildTransaction=function(e){var t=new d(this);return e?e(t):t},e}();t.Api=l;var d=function(){function e(e){this.actions=[],this.contextFreeGroups=[],this.api=e}return e.prototype.with=function(e){var t=new h(this.api,e);return this.actions.push(t),t},e.prototype.associateContextFree=function(e){return this.contextFreeGroups.push(e),this},e.prototype.send=function(e){return i(this,void 0,void 0,(function(){var t,r,n,f=this;return o(this,(function(a){switch(a.label){case 0:return t=[],r=[],n=this.actions.map((function(e){return e.serializedData})),[4,Promise.all(this.contextFreeGroups.map((function(e){return i(f,void 0,void 0,(function(){var i,f,a,s;return o(this,(function(o){return i=e({cfd:t.length,cfa:r.length}),f=i.action,a=i.contextFreeAction,s=i.contextFreeData,f&&n.push(f),a&&r.push(a),s&&t.push(s),[2]}))}))})))];case 1:return a.sent(),this.contextFreeGroups=[],this.actions=[],[4,this.api.transact({context_free_data:t,context_free_actions:r,actions:n},e)];case 2:return[2,a.sent()]}}))}))},e}();t.TransactionBuilder=d;var h=function(){function e(e,t){this.api=e,this.accountName=t}return e.prototype.as=function(e){void 0===e&&(e=[]);var t=[];return t=e&&"string"==typeof e?[{actor:e,permission:"active"}]:e,new p(this,this.api,this.accountName,t)},e}();t.ActionBuilder=h;var p=function(e,t,r,n){var i,o,f=this,a=t.cachedAbis.get(r);if(!a)throw new Error("ABI must be cached before using ActionBuilder, run api.getAbi()");var c=u.getTypesFromAbi(u.createInitialTypes(),a.abi),l=new Map;try{for(var d=s(a.abi.actions),h=d.next();!h.done;h=d.next()){var p=h.value,y=p.name,b=p.type;l.set(y,u.getType(c,b))}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}l.forEach((function(i,o){var a;Object.assign(f,((a={})[o]=function(){for(var f=[],a=0;a{"use strict";t.b=void 0;var n=r(58722),i=r(78125),o=r(722);t.b={initialize:function(){return console.error("Method deprecated")},unsafeRandomKey:function(){return console.error("Method deprecated")},randomKey:function(e,t){void 0===t&&(t={}),void 0!==e&&console.warn("Argument `cpuEntropyBits` is deprecated, use the options argument instead");var r=i.generateKeyPair(o.KeyType.k1,t).privateKey;return Promise.resolve(r.toLegacyString())},seedPrivate:function(){return console.error("Method deprecated")},privateToPublic:function(e,t){return void 0!==t&&console.warn("Argument `pubkey_prefix` is deprecated, keys prefixed with PUB_K1_/PUB_R1_/PUB_WA_ going forward"),n.PrivateKey.fromString(e).getPublicKey().toLegacyString()},isValidPublic:function(e,t){void 0!==t&&console.warn("Argument `pubkey_prefix` is deprecated, keys prefixed with PUB_K1_/PUB_R1_/PUB_WA_ going forward");try{return n.PublicKey.fromString(e).isValid()}catch(e){return!1}},isValidPrivate:function(e){try{return n.PrivateKey.fromString(e).isValid()}catch(e){return!1}},sign:function(e,t,r){return void 0===r&&(r="utf8"),("string"==typeof t?n.PrivateKey.fromString(t):t).sign(e,!0,r).toString()},signHash:function(e,t,r){return void 0===r&&(r="hex"),("string"==typeof t?n.PrivateKey.fromString(t):t).sign(e,!1,r).toString()},verify:function(e,t,r,i,o){void 0===i&&(i="utf8"),void 0===o&&(o=!0);var f="string"==typeof r?n.PublicKey.fromString(r):r;return n.Signature.fromString(e).verify(t,f,o,i)},recover:function(e,t,r){return void 0===r&&(r="utf8"),n.Signature.fromString(e).recover(t,!0,r).toLegacyString()},recoverHash:function(e,t,r){return void 0===r&&(r="hex"),n.Signature.fromString(e).recover(t,!1,r).toLegacyString()},sha256:function(e,t,n){return void 0!==n&&console.warn("Argument `encoding` is deprecated"),void 0!==t&&console.warn("Argument `resultEncoding` is deprecated"),r(78125).sha256(e)}}},77556:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;f;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return f.label++,{value:o[1],done:!1};case 5:f.label++,n=o[1],o=[0];continue;case 7:o=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){f=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpc=void 0;var f=r(722),a=r(22485),s=function(e){var t,r,n="";try{for(var i=o(e),f=i.next();!f.done;f=i.next()){n+=("00"+f.value.toString(16)).slice(-2)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},c=function(){function e(e,t){void 0===t&&(t={}),this.endpoint=e.replace(/\/$/,""),t.fetch?this.fetchBuiltin=t.fetch:this.fetchBuiltin=r.g.fetch}return e.prototype.fetch=function(e,t){return n(this,void 0,void 0,(function(){var r,n,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,(0,this.fetchBuiltin)(this.endpoint+e,{body:JSON.stringify(t),method:"POST"})];case 1:return[4,(r=i.sent()).json()];case 2:if((n=i.sent()).processed&&n.processed.except)throw new a.RpcError(n);if(n.result&&n.result.except)throw new a.RpcError(n);return[3,4];case 3:throw(o=i.sent()).isFetchError=!0,o;case 4:if(!r.ok)throw new a.RpcError(n);return[2,n]}}))}))},e.prototype.abi_bin_to_json=function(e,t,r){return n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/abi_bin_to_json",{code:e,action:t,binargs:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.abi_json_to_bin=function(e,t,r){return n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/abi_json_to_bin",{code:e,action:t,args:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_abi=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_abi",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_account=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_account",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_accounts_by_authorizers=function(e,t){return n(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.fetch("/v1/chain/get_accounts_by_authorizers",{accounts:e,keys:t})];case 1:return[2,r.sent()]}}))}))},e.prototype.get_activated_protocol_features=function(e){var t=e.limit,r=void 0===t?10:t,o=e.search_by_block_num,f=void 0!==o&&o,a=e.reverse,s=void 0!==a&&a,c=e.lower_bound,u=void 0===c?null:c,l=e.upper_bound,d=void 0===l?null:l;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_activated_protocol_features",{lower_bound:u,upper_bound:d,limit:r,search_by_block_num:f,reverse:s})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_block_header_state=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_block_header_state",{block_num_or_id:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_block_info=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_block_info",{block_num:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_block=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_block",{block_num_or_id:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_code=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_code",{account_name:e,code_as_wasm:!0})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_code_hash=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_code_hash",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_currency_balance=function(e,t,r){return void 0===r&&(r=null),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/get_currency_balance",{code:e,account:t,symbol:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_currency_stats=function(e,t){return n(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.fetch("/v1/chain/get_currency_stats",{code:e,symbol:t})];case 1:return[2,r.sent()]}}))}))},e.prototype.get_info=function(){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_info",{})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_producer_schedule=function(){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_producer_schedule",{})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_producers=function(e,t,r){return void 0===e&&(e=!0),void 0===t&&(t=""),void 0===r&&(r=50),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/get_producers",{json:e,lower_bound:t,limit:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_raw_code_and_abi=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_raw_code_and_abi",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.getRawAbi=function(e){return n(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return[4,this.get_raw_abi(e)];case 1:return t=n.sent(),r=f.base64ToBinary(t.abi),[2,{accountName:t.account_name,abi:r}]}}))}))},e.prototype.get_raw_abi=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_raw_abi",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_scheduled_transactions=function(e,t,r){return void 0===e&&(e=!0),void 0===t&&(t=""),void 0===r&&(r=50),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/get_scheduled_transactions",{json:e,lower_bound:t,limit:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_table_rows=function(e){var t=e.json,r=void 0===t||t,o=e.code,f=e.scope,a=e.table,s=e.lower_bound,c=void 0===s?"":s,u=e.upper_bound,l=void 0===u?"":u,d=e.index_position,h=void 0===d?1:d,p=e.key_type,y=void 0===p?"":p,b=e.limit,g=void 0===b?10:b,m=e.reverse,v=void 0!==m&&m,w=e.show_payer,A=void 0!==w&&w;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_table_rows",{json:r,code:o,scope:f,table:a,lower_bound:c,upper_bound:l,index_position:h,key_type:y,limit:g,reverse:v,show_payer:A})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_kv_table_rows=function(e){var t=e.json,r=void 0===t||t,o=e.code,f=e.table,a=e.index_name,s=e.encode_type,c=void 0===s?"bytes":s,u=e.index_value,l=e.lower_bound,d=e.upper_bound,h=e.limit,p=void 0===h?10:h,y=e.reverse,b=void 0!==y&&y,g=e.show_payer,m=void 0!==g&&g;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_kv_table_rows",{json:r,code:o,table:f,index_name:a,encode_type:c,index_value:u,lower_bound:l,upper_bound:d,limit:p,reverse:b,show_payer:m})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_table_by_scope=function(e){var t=e.code,r=e.table,o=e.lower_bound,f=void 0===o?"":o,a=e.upper_bound,s=void 0===a?"":a,c=e.limit,u=void 0===c?10:c;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_table_by_scope",{code:t,table:r,lower_bound:f,upper_bound:s,limit:u})];case 1:return[2,e.sent()]}}))}))},e.prototype.getRequiredKeys=function(e){return n(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=f.convertLegacyPublicKeys,[4,this.fetch("/v1/chain/get_required_keys",{transaction:e.transaction,available_keys:e.availableKeys})];case 1:return[2,t.apply(void 0,[r.sent().required_keys])]}}))}))},e.prototype.push_transaction=function(e){var t=e.signatures,r=e.compression,o=void 0===r?0:r,f=e.serializedTransaction,a=e.serializedContextFreeData;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/push_transaction",{signatures:t,compression:o,packed_context_free_data:s(a||new Uint8Array(0)),packed_trx:s(f)})];case 1:return[2,e.sent()]}}))}))},e.prototype.push_ro_transaction=function(e,t){var r=e.signatures,o=e.compression,f=void 0===o?0:o,a=e.serializedTransaction;return void 0===t&&(t=!1),n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/push_ro_transaction",{transaction:{signatures:r,compression:f,packed_context_free_data:s(new Uint8Array(0)),packed_trx:s(a)},return_failure_traces:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.push_transactions=function(e){return n(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=e.map((function(e){var t=e.signatures,r=e.compression,n=void 0===r?0:r,i=e.serializedTransaction,o=e.serializedContextFreeData;return{signatures:t,compression:n,packed_context_free_data:s(o||new Uint8Array(0)),packed_trx:s(i)}})),[4,this.fetch("/v1/chain/push_transactions",t)];case 1:return[2,r.sent()]}}))}))},e.prototype.send_transaction=function(e){var t=e.signatures,r=e.compression,o=void 0===r?0:r,f=e.serializedTransaction,a=e.serializedContextFreeData;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/send_transaction",{signatures:t,compression:o,packed_context_free_data:s(a||new Uint8Array(0)),packed_trx:s(f)})];case 1:return[2,e.sent()]}}))}))},e.prototype.db_size_get=function(){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/db_size/get",{})];case 1:return[2,e.sent()]}}))}))},e.prototype.trace_get_block=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/trace_api/get_block",{block_num:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.history_get_actions=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/history/get_actions",{account_name:e,pos:t,offset:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.history_get_transaction=function(e,t){return void 0===t&&(t=null),n(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.fetch("/v1/history/get_transaction",{id:e,block_num_hint:t})];case 1:return[2,r.sent()]}}))}))},e.prototype.history_get_key_accounts=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/history/get_key_accounts",{public_key:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.history_get_controlled_accounts=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/history/get_controlled_accounts",{controlling_account:e})];case 1:return[2,t.sent()]}}))}))},e}();t.JsonRpc=c},58722:function(e,t,r){"use strict";var n=r(48764).lW,i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;f;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return f.label++,{value:o[1],done:!1};case 5:f.label++,n=o[1],o=[0];continue;case 7:o=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){f=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.JsSignatureProvider=t.digestFromSerializedData=t.Signature=t.PublicKey=t.PrivateKey=void 0;var a=r(86266),s=r(78125);Object.defineProperty(t,"PrivateKey",{enumerable:!0,get:function(){return s.PrivateKey}}),Object.defineProperty(t,"PublicKey",{enumerable:!0,get:function(){return s.PublicKey}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return s.Signature}});var c=r(722),u=new a.ec("secp256k1"),l=function(e,t,r,i){void 0===i&&(i=u);var o=n.concat([n.from(e,"hex"),n.from(t),n.from(r?new Uint8Array(i.hash().update(r).digest()):new Uint8Array(32))]);return i.hash().update(o).digest()};t.digestFromSerializedData=l;var d=function(){function e(e){var t,r;this.keys=new Map,this.availableKeys=[];try{for(var n=f(e),i=n.next();!i.done;i=n.next()){var o=i.value,a=s.PrivateKey.fromString(o),c=a.toElliptic(),u=a.getPublicKey().toString();this.keys.set(u,c),this.availableKeys.push(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}}return e.prototype.getAvailableKeys=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.availableKeys]}))}))},e.prototype.sign=function(e){var t=e.chainId,r=e.requiredKeys,n=e.serializedTransaction,a=e.serializedContextFreeData;return i(this,void 0,void 0,(function(){var e,i,d,h,p,y,b,g,m,v,w;return o(this,(function(o){e=l(t,n,a,u),i=[];try{for(d=f(r),h=d.next();!h.done;h=d.next())p=h.value,y=s.PublicKey.fromString(p),b=this.keys.get(c.convertLegacyPublicKey(p)),g=s.PrivateKey.fromElliptic(b,y.getType()),m=g.sign(e,!1),i.push(m.toString())}catch(e){v={error:e}}finally{try{h&&!h.done&&(w=d.return)&&w.call(d)}finally{if(v)throw v.error}}return[2,{signatures:i,serializedTransaction:n,serializedContextFreeData:a}]}))}))},e}();t.JsSignatureProvider=d},78125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=t.generateKeyPair=t.constructElliptic=t.Signature=t.PublicKey=t.PrivateKey=void 0;var n=r(86266),i=r(33715),o=r(722),f=r(62680),a=r(39265),s=r(39265);Object.defineProperty(t,"PrivateKey",{enumerable:!0,get:function(){return s.PrivateKey}});var c=r(62680);Object.defineProperty(t,"PublicKey",{enumerable:!0,get:function(){return c.PublicKey}});var u=r(70578);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return u.Signature}});t.constructElliptic=function(e){return e===o.KeyType.k1?new n.ec("secp256k1"):new n.ec("p256")};t.generateKeyPair=function(e,t){if(void 0===t&&(t={}),!t.secureEnv)throw new Error("Key generation is completely INSECURE in production environments in the browser. If you are absolutely certain this does NOT describe your environment, set `secureEnv` in your options to `true`. If this does describe your environment and you set `secureEnv` to `true`, YOU DO SO AT YOUR OWN RISK AND THE RISK OF YOUR USERS.");var r,i=(r=e===o.KeyType.k1?new n.ec("secp256k1"):new n.ec("p256")).genKeyPair(t.ecOptions);return{publicKey:f.PublicKey.fromElliptic(i,e,r),privateKey:a.PrivateKey.fromElliptic(i,e,r)}};t.sha256=function(e){return i.sha256().update(e).digest()}},722:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToString=t.stringToSignature=t.privateKeyToString=t.privateKeyToLegacyString=t.stringToPrivateKey=t.convertLegacyPublicKeys=t.convertLegacyPublicKey=t.publicKeyToString=t.publicKeyToLegacyString=t.stringToPublicKey=t.signatureDataSize=t.privateKeyDataSize=t.publicKeyDataSize=t.KeyType=t.base64ToBinary=t.binaryToBase58=t.base58ToBinary=t.signedBinaryToDecimal=t.binaryToDecimal=t.signedDecimalToBinary=t.decimalToBinary=t.negate=t.isNegative=void 0;var f=r(33715),a=r(12057).RIPEMD160.hash,s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(){for(var e=Array(256).fill(-1),t=0;t"9".charCodeAt(0))throw new Error("invalid number");for(var o=i-"0".charCodeAt(0),f=0;f>8}if(o)throw new Error("number is out of range")}return r};t.signedDecimalToBinary=function(e,r){var n="-"===r[0];n&&(r=r.substr(1));var i=t.decimalToBinary(e,r);if(n){if(t.negate(i),!t.isNegative(i))throw new Error("number is out of range")}else if(t.isNegative(i))throw new Error("number is out of range");return i};t.binaryToDecimal=function(e,t){void 0===t&&(t=1);for(var r=Array(t).fill("0".charCodeAt(0)),o=e.length-1;o>=0;--o){for(var f=e[o],a=0;a>8}f&&n.push(f)}try{for(var c=o(e),l=c.next();!l.done&&"1"===l.value;l=c.next())n.push(0)}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.reverse(),new Uint8Array(n)}(t);for(var r=new Uint8Array(e),n=0;n>8}if(i)throw new Error("base-58 value is out of range")}return r.reverse(),r};t.binaryToBase58=function(e,t){var r,f,a,c;void 0===t&&(t=1);var l=[];try{for(var d=o(e),h=d.next();!h.done;h=d.next()){for(var p=h.value,y=0;y>2,n=3*r;t>0&&"="===e[t-1]&&("="===e[t-2]?n-=2:n-=1);for(var i=new Uint8Array(n),o=0;o>4,3*o+1>2),3*o+2{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22485:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=void 0;var i=function(e){function t(r){var n=this;return r.error&&r.error.details&&r.error.details.length&&r.error.details[0].message?(n=e.call(this,r.error.details[0].message)||this).details=r.error.details:r.processed&&r.processed.except&&r.processed.except.message?(n=e.call(this,r.processed.except.message)||this).details=r.processed.except:r.result&&r.result.except&&r.result.except.message?(n=e.call(this,r.result.except.message)||this).details=r.result.except:n=e.call(this,r.message)||this,Object.setPrototypeOf(n,t.prototype),n.json=r,n}return n(t,e),t}(Error);t.RpcError=i},68888:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.serializeQuery=t.deserializeAnyArray=t.serializeAnyArray=t.deserializeAnyObject=t.serializeAnyObject=t.deserializeAnyvarShort=t.deserializeAnyvar=t.serializeAnyvar=t.deserializeAction=t.deserializeActionData=t.serializeAction=t.serializeActionData=t.transactionHeader=t.getTypesFromAbi=t.getType=t.createTransactionTypes=t.createTransactionExtensionTypes=t.createAbiTypes=t.createInitialTypes=t.hexToUint8Array=t.arrayToHex=t.symbolToString=t.stringToSymbol=t.blockTimestampToDate=t.dateToBlockTimestamp=t.timePointSecToDate=t.dateToTimePointSec=t.timePointToDate=t.dateToTimePoint=t.supportedAbiVersion=t.SerialBuffer=t.SerializerState=void 0;var a=r(722),s=function(e){void 0===e&&(e={}),this.skippedBinaryExtension=!1,this.options=e};t.SerializerState=s;var c=function(){function e(e){var t=void 0===e?{}:e,r=t.textEncoder,n=t.textDecoder,i=t.array;this.readPos=0,this.array=i||new Uint8Array(1024),this.length=i?i.length:0,this.textEncoder=r||new TextEncoder,this.textDecoder=n||new TextDecoder("utf-8",{fatal:!0})}return e.prototype.reserve=function(e){if(!(this.length+e<=this.array.length)){for(var t=this.array.length;this.length+e>t;)t=Math.ceil(1.5*t);var r=new Uint8Array(t);r.set(this.array),this.array=r}},e.prototype.haveReadData=function(){return this.readPosthis.length)throw new Error("Read past end of buffer");var t=new Uint8Array(this.array.buffer,this.array.byteOffset+this.readPos,e);return this.readPos+=e,t},e.prototype.skip=function(e){if(this.readPos+e>this.length)throw new Error("Read past end of buffer");this.readPos+=e},e.prototype.pushUint16=function(e){this.push(e>>0&255,e>>8&255)},e.prototype.getUint16=function(){var e=0;return e|=this.get()<<0,e|=this.get()<<8},e.prototype.pushUint32=function(e){this.push(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},e.prototype.getUint32=function(){var e=0;return e|=this.get()<<0,e|=this.get()<<8,e|=this.get()<<16,(e|=this.get()<<24)>>>0},e.prototype.pushNumberAsUint64=function(e){this.pushUint32(e>>>0),this.pushUint32(Math.floor(e/4294967296)>>>0)},e.prototype.getUint64AsNumber=function(){var e=this.getUint32();return 4294967296*(this.getUint32()>>>0)+(e>>>0)},e.prototype.pushVaruint32=function(e){for(;;){if(!(e>>>7)){this.push(e);break}this.push(128|127&e),e>>>=7}},e.prototype.getVaruint32=function(){for(var e=0,t=0;;){var r=this.get();if(e|=(127&r)<>>0},e.prototype.pushVarint32=function(e){this.pushVaruint32(e<<1^e>>31)},e.prototype.getVarint32=function(){var e=this.getVaruint32();return 1&e?~e>>1|2147483648:e>>>1},e.prototype.pushFloat32=function(e){this.pushArray(new Uint8Array(new Float32Array([e]).buffer))},e.prototype.getFloat32=function(){return new Float32Array(this.getUint8Array(4).slice().buffer)[0]},e.prototype.pushFloat64=function(e){this.pushArray(new Uint8Array(new Float64Array([e]).buffer))},e.prototype.getFloat64=function(){return new Float64Array(this.getUint8Array(8).slice().buffer)[0]},e.prototype.pushName=function(e){if("string"!=typeof e)throw new Error("Expected string containing name");if(!new RegExp(/^[.1-5a-z]{0,12}[.1-5a-j]?$/).test(e))throw new Error("Name should be less than 13 characters, or less than 14 if last character is between 1-5 or a-j, and only contain the following symbols .12345abcdefghijklmnopqrstuvwxyz");for(var t=function(e){return e>="a".charCodeAt(0)&&e<="z".charCodeAt(0)?e-"a".charCodeAt(0)+6:e>="1".charCodeAt(0)&&e<="5".charCodeAt(0)?e-"1".charCodeAt(0)+1:0},r=new Uint8Array(8),n=63,i=0;i=0;--f)n>=0&&(r[Math.floor(n/8)]|=(o>>f&1)<=0;){for(var n=0,i=0;i<5;++i)r>=0&&(n=n<<1|e[Math.floor(r/8)]>>r%8&1,--r);t+=n>=6?String.fromCharCode(n+"a".charCodeAt(0)-6):n>=1?String.fromCharCode(n+"1".charCodeAt(0)-1):"."}for(;t.endsWith(".");)t=t.substr(0,t.length-1);return t},e.prototype.pushBytes=function(e){this.pushVaruint32(e.length),this.pushArray(e)},e.prototype.getBytes=function(){return this.getUint8Array(this.getVaruint32())},e.prototype.pushString=function(e){this.pushBytes(this.textEncoder.encode(e))},e.prototype.getString=function(){return this.textDecoder.decode(this.getBytes())},e.prototype.pushSymbolCode=function(e){if("string"!=typeof e)throw new Error("Expected string containing symbol_code");var t=[];for(t.push.apply(t,o([],i(this.textEncoder.encode(e))));t.length<8;)t.push(0);this.pushArray(t.slice(0,8))},e.prototype.getSymbolCode=function(){var e,t=this.getUint8Array(8);for(e=0;e="0".charCodeAt(0)&&e.charCodeAt(t)<="9".charCodeAt(0);)i=!0,r+=e[t],++t;if(!i)throw new Error("Asset must begin with a number");if("."===e[t])for(++t;t="0".charCodeAt(0)&&e.charCodeAt(t)<="9".charCodeAt(0);)r+=e[t],++n,++t;var o=e.substr(t).trim();this.pushArray(a.signedDecimalToBinary(8,r)),this.pushSymbol({name:o,precision:n})},e.prototype.getAsset=function(){var e=this.getUint8Array(8),t=this.getSymbol(),r=t.name,n=t.precision,i=a.signedBinaryToDecimal(e,n+1);return n&&(i=i.substr(0,i.length-n)+"."+i.substr(i.length-n)),i+" "+r},e.prototype.pushPublicKey=function(e){var t=a.stringToPublicKey(e);this.push(t.type),this.pushArray(t.data)},e.prototype.getPublicKey=function(){var e,t=this.get();if(t===a.KeyType.wa){var r=this.readPos;this.skip(34),this.skip(this.getVaruint32()),e=new Uint8Array(this.array.buffer,this.array.byteOffset+r,this.readPos-r)}else e=this.getUint8Array(a.publicKeyDataSize);return a.publicKeyToString({type:t,data:e})},e.prototype.pushPrivateKey=function(e){var t=a.stringToPrivateKey(e);this.push(t.type),this.pushArray(t.data)},e.prototype.getPrivateKey=function(){var e=this.get(),t=this.getUint8Array(a.privateKeyDataSize);return a.privateKeyToString({type:e,data:t})},e.prototype.pushSignature=function(e){var t=a.stringToSignature(e);this.push(t.type),this.pushArray(t.data)},e.prototype.getSignature=function(){var e,t=this.get();if(t===a.KeyType.wa){var r=this.readPos;this.skip(65),this.skip(this.getVaruint32()),this.skip(this.getVaruint32()),e=new Uint8Array(this.array.buffer,this.array.byteOffset+r,this.readPos-r)}else e=this.getUint8Array(a.signatureDataSize);return a.signatureToString({type:t,data:e})},e}();t.SerialBuffer=c;t.supportedAbiVersion=function(e){return e.startsWith("eosio::abi/1.")};var u=function(e){var t=Date.parse(e);if(Number.isNaN(t))throw new Error("Invalid time format");return t};t.dateToTimePoint=function(e){return Math.round(1e3*u(e+"Z"))};t.timePointToDate=function(e){var t=new Date(e/1e3).toISOString();return t.substr(0,t.length-1)};t.dateToTimePointSec=function(e){return Math.round(u(e+"Z")/1e3)};t.timePointSecToDate=function(e){var t=new Date(1e3*e).toISOString();return t.substr(0,t.length-1)};t.dateToBlockTimestamp=function(e){return Math.round((u(e+"Z")-9466848e5)/500)};t.blockTimestampToDate=function(e){var t=new Date(500*e+9466848e5).toISOString();return t.substr(0,t.length-1)};t.stringToSymbol=function(e){if("string"!=typeof e)throw new Error("Expected string containing symbol");var t=e.match(/^([0-9]+),([A-Z]+)$/);if(!t)throw new Error("Invalid symbol");return{name:t[2],precision:+t[1]}};t.symbolToString=function(e){var t=e.name;return e.precision+","+t};t.arrayToHex=function(e){var t,r,n="";try{for(var i=f(e),o=i.next();!o.done;o=i.next()){n+=("00"+o.value.toString(16)).slice(-2)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.toUpperCase()};function l(e,t){throw new Error("Don't know how to serialize "+this.name)}function d(e){throw new Error("Don't know how to deserialize "+this.name)}function h(e,t,r,n){var i,o;if(void 0===r&&(r=new s),void 0===n&&(n=!0),"object"!=typeof t)throw new Error("expected object containing data: "+JSON.stringify(t));this.base&&this.base.serialize(e,t,r,n);try{for(var a=f(this.fields),c=a.next();!c.done;c=a.next()){var u=c.value;if(u.name in t){if(r.skippedBinaryExtension)throw new Error("unexpected "+this.name+"."+u.name);u.type.serialize(e,t[u.name],r,n&&u===this.fields[this.fields.length-1])}else{if(!n||!u.type.extensionOf)throw new Error("missing "+this.name+"."+u.name+" (type="+u.type.name+")");r.skippedBinaryExtension=!0}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}function p(e,t,r){var n,i,o;void 0===t&&(t=new s),void 0===r&&(r=!0),o=this.base?this.base.deserialize(e,t,r):{};try{for(var a=f(this.fields),c=a.next();!c.done;c=a.next()){var u=c.value;r&&u.type.extensionOf&&!e.haveReadData()?t.skippedBinaryExtension=!0:o[u.name]=u.type.deserialize(e,t,r)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}function y(e,t,r,n){if(!Array.isArray(t)||2!==t.length||"string"!=typeof t[0])throw new Error('expected variant: ["type", value]');var i=this.fields.findIndex((function(e){return e.name===t[0]}));if(i<0)throw new Error('type "'+t[0]+'" is not valid for variant');e.pushVaruint32(i),this.fields[i].type.serialize(e,t[1],r,n)}function b(e,t,r){var n=e.getVaruint32();if(n>=this.fields.length)throw new Error("type index "+n+" is not valid for variant");var i=this.fields[n];return[i.name,i.type.deserialize(e,t,r)]}function g(e,t,r,n){var i,o;e.pushVaruint32(t.length);try{for(var a=f(t),s=a.next();!s.done;s=a.next()){var c=s.value;this.arrayOf.serialize(e,c,r,!1)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}function m(e,t,r){for(var n=e.getVaruint32(),i=[],o=0;o",aliasOfName:"",arrayOf:null,optionalOf:null,extensionOf:null,baseName:"",base:null,fields:[],serialize:l,deserialize:d},e)},P=function(e,t){if(Number.isNaN(+e)||Number.isNaN(+t)||"number"!=typeof e&&"string"!=typeof e)throw new Error("Expected number");if(+e!=+t)throw new Error("Number is out of range");return+e};t.createInitialTypes=function(){var e=new Map(Object.entries({bool:x({name:"bool",serialize:function(e,t){if("boolean"!=typeof t&&("number"!=typeof t||1!==t&&0!==t))throw new Error("Expected boolean or number equal to 1 or 0");e.push(t?1:0)},deserialize:function(e){return!!e.get()}}),uint8:x({name:"uint8",serialize:function(e,t){e.push(P(t,255&t))},deserialize:function(e){return e.get()}}),int8:x({name:"int8",serialize:function(e,t){e.push(P(t,t<<24>>24))},deserialize:function(e){return e.get()<<24>>24}}),uint16:x({name:"uint16",serialize:function(e,t){e.pushUint16(P(t,65535&t))},deserialize:function(e){return e.getUint16()}}),int16:x({name:"int16",serialize:function(e,t){e.pushUint16(P(t,t<<16>>16))},deserialize:function(e){return e.getUint16()<<16>>16}}),uint32:x({name:"uint32",serialize:function(e,t){e.pushUint32(P(t,t>>>0))},deserialize:function(e){return e.getUint32()}}),uint64:x({name:"uint64",serialize:function(e,t){e.pushArray(a.decimalToBinary(8,""+t))},deserialize:function(e){return a.binaryToDecimal(e.getUint8Array(8))}}),int64:x({name:"int64",serialize:function(e,t){e.pushArray(a.signedDecimalToBinary(8,""+t))},deserialize:function(e){return a.signedBinaryToDecimal(e.getUint8Array(8))}}),int32:x({name:"int32",serialize:function(e,t){e.pushUint32(P(t,0|t))},deserialize:function(e){return 0|e.getUint32()}}),varuint32:x({name:"varuint32",serialize:function(e,t){e.pushVaruint32(P(t,t>>>0))},deserialize:function(e){return e.getVaruint32()}}),varint32:x({name:"varint32",serialize:function(e,t){e.pushVarint32(P(t,0|t))},deserialize:function(e){return e.getVarint32()}}),uint128:x({name:"uint128",serialize:function(e,t){e.pushArray(a.decimalToBinary(16,""+t))},deserialize:function(e){return a.binaryToDecimal(e.getUint8Array(16))}}),int128:x({name:"int128",serialize:function(e,t){e.pushArray(a.signedDecimalToBinary(16,""+t))},deserialize:function(e){return a.signedBinaryToDecimal(e.getUint8Array(16))}}),float32:x({name:"float32",serialize:function(e,t){e.pushFloat32(t)},deserialize:function(e){return e.getFloat32()}}),float64:x({name:"float64",serialize:function(e,t){e.pushFloat64(t)},deserialize:function(e){return e.getFloat64()}}),float128:x({name:"float128",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),16)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(16))}}),bytes:x({name:"bytes",serialize:function(e,r){r instanceof Uint8Array||Array.isArray(r)?e.pushBytes(r):e.pushBytes(t.hexToUint8Array(r))},deserialize:function(e,r){return r&&r.options.bytesAsUint8Array?e.getBytes():t.arrayToHex(e.getBytes())}}),string:x({name:"string",serialize:function(e,t){e.pushString(t)},deserialize:function(e){return e.getString()}}),name:x({name:"name",serialize:function(e,t){e.pushName(t)},deserialize:function(e){return e.getName()}}),time_point:x({name:"time_point",serialize:function(e,r){e.pushNumberAsUint64(t.dateToTimePoint(r))},deserialize:function(e){return t.timePointToDate(e.getUint64AsNumber())}}),time_point_sec:x({name:"time_point_sec",serialize:function(e,r){e.pushUint32(t.dateToTimePointSec(r))},deserialize:function(e){return t.timePointSecToDate(e.getUint32())}}),block_timestamp_type:x({name:"block_timestamp_type",serialize:function(e,r){e.pushUint32(t.dateToBlockTimestamp(r))},deserialize:function(e){return t.blockTimestampToDate(e.getUint32())}}),symbol_code:x({name:"symbol_code",serialize:function(e,t){e.pushSymbolCode(t)},deserialize:function(e){return e.getSymbolCode()}}),symbol:x({name:"symbol",serialize:function(e,r){e.pushSymbol(t.stringToSymbol(r))},deserialize:function(e){return t.symbolToString(e.getSymbol())}}),asset:x({name:"asset",serialize:function(e,t){e.pushAsset(t)},deserialize:function(e){return e.getAsset()}}),checksum160:x({name:"checksum160",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),20)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(20))}}),checksum256:x({name:"checksum256",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),32)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(32))}}),checksum512:x({name:"checksum512",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),64)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(64))}}),public_key:x({name:"public_key",serialize:function(e,t){e.pushPublicKey(t)},deserialize:function(e){return e.getPublicKey()}}),private_key:x({name:"private_key",serialize:function(e,t){e.pushPrivateKey(t)},deserialize:function(e){return e.getPrivateKey()}}),signature:x({name:"signature",serialize:function(e,t){e.pushSignature(t)},deserialize:function(e){return e.getSignature()}})}));return e.set("extended_asset",x({name:"extended_asset",baseName:"",fields:[{name:"quantity",typeName:"asset",type:e.get("asset")},{name:"contract",typeName:"name",type:e.get("name")}],serialize:h,deserialize:p})),e};t.createAbiTypes=function(){var e=t.createInitialTypes();return e.set("extensions_entry",x({name:"extensions_entry",baseName:"",fields:[{name:"tag",typeName:"uint16",type:null},{name:"value",typeName:"bytes",type:null}],serialize:h,deserialize:p})),e.set("type_def",x({name:"type_def",baseName:"",fields:[{name:"new_type_name",typeName:"string",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("field_def",x({name:"field_def",baseName:"",fields:[{name:"name",typeName:"string",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("struct_def",x({name:"struct_def",baseName:"",fields:[{name:"name",typeName:"string",type:null},{name:"base",typeName:"string",type:null},{name:"fields",typeName:"field_def[]",type:null}],serialize:h,deserialize:p})),e.set("action_def",x({name:"action_def",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"type",typeName:"string",type:null},{name:"ricardian_contract",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("table_def",x({name:"table_def",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"index_type",typeName:"string",type:null},{name:"key_names",typeName:"string[]",type:null},{name:"key_types",typeName:"string[]",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("clause_pair",x({name:"clause_pair",baseName:"",fields:[{name:"id",typeName:"string",type:null},{name:"body",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("error_message",x({name:"error_message",baseName:"",fields:[{name:"error_code",typeName:"uint64",type:null},{name:"error_msg",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("variant_def",x({name:"variant_def",baseName:"",fields:[{name:"name",typeName:"string",type:null},{name:"types",typeName:"string[]",type:null}],serialize:h,deserialize:p})),e.set("action_result",x({name:"action_result",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"result_type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("primary_key_index_def",x({name:"primary_key_index_def",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("secondary_index_def",x({name:"secondary_index_def",baseName:"",fields:[{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("secondary_indices",x({name:"secondary_indices",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"secondary_index_def",typeName:"secondary_index_def",type:null}],serialize:_,deserialize:k})),e.set("kv_table_entry_def",x({name:"kv_table_entry_def",baseName:"",fields:[{name:"type",typeName:"string",type:null},{name:"primary_index",typeName:"primary_key_index_def",type:null},{name:"secondary_indices",typeName:"secondary_indices",type:null}],serialize:h,deserialize:p})),e.set("kv_table",x({name:"kv_table",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"kv_table_entry_def",typeName:"kv_table_entry_def",type:null}],serialize:_,deserialize:k})),e.set("abi_def",x({name:"abi_def",baseName:"",fields:[{name:"version",typeName:"string",type:null},{name:"types",typeName:"type_def[]",type:null},{name:"structs",typeName:"struct_def[]",type:null},{name:"actions",typeName:"action_def[]",type:null},{name:"tables",typeName:"table_def[]",type:null},{name:"ricardian_clauses",typeName:"clause_pair[]",type:null},{name:"error_messages",typeName:"error_message[]",type:null},{name:"abi_extensions",typeName:"extensions_entry[]",type:null},{name:"variants",typeName:"variant_def[]$",type:null},{name:"action_results",typeName:"action_result[]$",type:null},{name:"kv_tables",typeName:"kv_table$",type:null}],serialize:h,deserialize:p})),e};t.createTransactionExtensionTypes=function(){var e=t.createInitialTypes();return e.set("resource_payer",x({name:"resource_payer",baseName:"",fields:[{name:"payer",typeName:"name",type:null},{name:"max_net_bytes",typeName:"uint64",type:null},{name:"max_cpu_us",typeName:"uint64",type:null},{name:"max_memory_bytes",typeName:"uint64",type:null}],serialize:h,deserialize:p})),e};t.createTransactionTypes=function(){var e=t.createInitialTypes();return e.set("permission_level",x({name:"permission_level",baseName:"",fields:[{name:"actor",typeName:"name",type:null},{name:"permission",typeName:"name",type:null}],serialize:h,deserialize:p})),e.set("action",x({name:"action",baseName:"",fields:[{name:"account",typeName:"name",type:null},{name:"name",typeName:"name",type:null},{name:"authorization",typeName:"permission_level[]",type:null},{name:"data",typeName:"bytes",type:null}],serialize:h,deserialize:p})),e.set("extension",x({name:"extension",baseName:"",fields:[{name:"type",typeName:"uint16",type:null},{name:"data",typeName:"bytes",type:null}],serialize:T,deserialize:S})),e.set("transaction_header",x({name:"transaction_header",baseName:"",fields:[{name:"expiration",typeName:"time_point_sec",type:null},{name:"ref_block_num",typeName:"uint16",type:null},{name:"ref_block_prefix",typeName:"uint32",type:null},{name:"max_net_usage_words",typeName:"varuint32",type:null},{name:"max_cpu_usage_ms",typeName:"uint8",type:null},{name:"delay_sec",typeName:"varuint32",type:null}],serialize:h,deserialize:p})),e.set("transaction",x({name:"transaction",baseName:"transaction_header",fields:[{name:"context_free_actions",typeName:"action[]",type:null},{name:"actions",typeName:"action[]",type:null},{name:"transaction_extensions",typeName:"extension",type:null}],serialize:h,deserialize:p})),e};t.getType=function(e,r){var n=e.get(r);if(n&&n.aliasOfName)return t.getType(e,n.aliasOfName);if(n)return n;if(r.endsWith("[]"))return x({name:r,arrayOf:t.getType(e,r.substr(0,r.length-2)),serialize:g,deserialize:m});if(r.endsWith("?"))return x({name:r,optionalOf:t.getType(e,r.substr(0,r.length-1)),serialize:v,deserialize:w});if(r.endsWith("$"))return x({name:r,extensionOf:t.getType(e,r.substr(0,r.length-1)),serialize:A,deserialize:E});throw new Error("Unknown type: "+r)};t.getTypesFromAbi=function(e,r){var n,o,a,s,c,u,l,d,g,m,v=new Map(e);if(r&&r.types)try{for(var w=f(r.types),A=w.next();!A.done;A=w.next()){var E=A.value,_=E.new_type_name,k=E.type;v.set(_,x({name:_,aliasOfName:k}))}}catch(e){n={error:e}}finally{try{A&&!A.done&&(o=w.return)&&o.call(w)}finally{if(n)throw n.error}}if(r&&r.structs)try{for(var T=f(r.structs),S=T.next();!S.done;S=T.next()){var P=S.value,I=P.name,M=P.base,O=P.fields;v.set(I,x({name:I,baseName:M,fields:O.map((function(e){return{name:e.name,typeName:e.type,type:null}})),serialize:h,deserialize:p}))}}catch(e){a={error:e}}finally{try{S&&!S.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}if(r&&r.variants)try{for(var C=f(r.variants),B=C.next();!B.done;B=C.next()){var R=B.value,D=R.name,N=R.types;v.set(D,x({name:D,fields:N.map((function(e){return{name:e,typeName:e,type:null}})),serialize:y,deserialize:b}))}}catch(e){c={error:e}}finally{try{B&&!B.done&&(u=C.return)&&u.call(C)}finally{if(c)throw c.error}}try{for(var U=f(v),L=U.next();!L.done;L=U.next()){var F=i(L.value,2);F[0];(k=F[1]).baseName&&(k.base=t.getType(v,k.baseName));try{for(var j=(g=void 0,f(k.fields)),z=j.next();!z.done;z=j.next()){var V=z.value;V.type=t.getType(v,V.typeName)}}catch(e){g={error:e}}finally{try{z&&!z.done&&(m=j.return)&&m.call(j)}finally{if(g)throw g.error}}}}catch(e){l={error:e}}finally{try{L&&!L.done&&(d=U.return)&&d.call(U)}finally{if(l)throw l.error}}return v};t.transactionHeader=function(e,r){var n,i=e.header?e.header.timestamp:e.timestamp,o=parseInt((n=e.id.substr(16,8)).substr(6,2)+n.substr(4,2)+n.substr(2,2)+n.substr(0,2),16);return{expiration:t.timePointSecToDate(t.dateToTimePointSec(i)+r),ref_block_num:65535&e.block_num,ref_block_prefix:o}};t.serializeActionData=function(e,r,n,i,o,f){var a=e.actions.get(n);if(!a)throw new Error("Unknown action "+n+" in contract "+r);var s=new c({textEncoder:o,textDecoder:f});return a.serialize(s,i),t.arrayToHex(s.asUint8Array())};t.serializeAction=function(e,r,n,i,o,f,a){return{account:r,name:n,authorization:i,data:t.serializeActionData(e,r,n,o,f,a)}};t.deserializeActionData=function(e,r,n,i,o,f){var a=e.actions.get(n);if("string"==typeof i&&(i=t.hexToUint8Array(i)),!a)throw new Error("Unknown action "+n+" in contract "+r);var s=new c({textDecoder:f,textEncoder:o});return s.pushArray(i),a.deserialize(s)};t.deserializeAction=function(e,r,n,i,o,f,a){return{account:r,name:n,authorization:i,data:t.deserializeActionData(e,r,n,o,f,a)}};t.serializeAnyvar=function(e,t){var r,n,o,f,a,s,c,u,l;null===t?(u=(r=i([O.null_t,t],2))[0],l=r[1]):"string"==typeof t?(u=(n=i([O.string,t],2))[0],l=n[1]):"number"==typeof t?(u=(o=i([O.int32,t],2))[0],l=o[1]):t instanceof Uint8Array?(u=(f=i([O.bytes,t],2))[0],l=f[1]):Array.isArray(t)?(u=(a=i([O.any_array,t],2))[0],l=a[1]):2===Object.keys(t).length&&t.hasOwnProperty("type")&&t.hasOwnProperty("value")?(u=(s=i([O[t.type],t.value],2))[0],l=s[1]):(u=(c=i([O.any_object,t],2))[0],l=c[1]),e.pushVaruint32(u.index),u.type.serialize(e,l)};t.deserializeAnyvar=function(e,t){var r=e.getVaruint32();if(r>=C.length)throw new Error("Tried to deserialize unknown anyvar type");var n=C[r],i=n.type.deserialize(e,t);return t&&t.options.useShortForm||n.useShortForm?i:{type:n.type.name,value:i}};t.deserializeAnyvarShort=function(e){return t.deserializeAnyvar(e,new s({useShortForm:!0}))};t.serializeAnyObject=function(e,r){var n,o,a=Object.entries(r);e.pushVaruint32(a.length);try{for(var s=f(a),c=s.next();!c.done;c=s.next()){var u=i(c.value,2),l=u[0],d=u[1];e.pushString(l),t.serializeAnyvar(e,d)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}};t.deserializeAnyObject=function(e,r){for(var n=e.getVaruint32(),i={},o=0;o{"use strict";t.pc=void 0;var n=r(58982);r(93220);var i=r(77556);Object.defineProperty(t,"pc",{enumerable:!0,get:function(){return i.JsonRpc}}),r(722),r(20787);var o=r(22485);r(68888)},12057:e=>{"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var f,a=e[Symbol.iterator]();!(n=(f=a.next()).done)&&(r.push(f.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var r=0;r>>32-t}},{key:"hash",value:function(t){for(var r=e.pad(t),n=[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],i=[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],o=[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],f=[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],a=r.byteLength/64,s=new Array(a).fill(void 0).map((function(e,t){return function(e){return new DataView(r,64*t,64).getUint32(4*e,!0)}})),c=[1732584193,4023233417,2562383102,271733878,3285377520],u=0;u=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,f=0,a=Math.min(e.length,r),s=t;s=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&f0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.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=t;n-=2)i=s(e,t,n)<=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this._strip()},o.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 o=e.length-r,f=o%n,a=Math.min(o,o-f)+r,s=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f>>24-i&16777215)||f!==this.length-1?d[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,f--)}for(0!==o&&(r=o.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=h[e],u=p[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var y=l.modrn(u).toString(e);r=(l=l.idivn(u)).isZero()?y+r:d[c-y.length]+y+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")},o.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},o.prototype.toJSON=function(){return this.toString(16,2)},f&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(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],o=0|t.words[0],f=i*o,a=67108863&f,s=f/67108864|0;r.words[0]=a;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;u+=(f=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&f}r.words[c]=0|l,s=0|u}return 0!==s?r.words[c]=0|s:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,i),f},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r=0&&(e[r--]=f>>8&255),r>=0&&(e[r--]=f>>16&255),6===o?(r>=0&&(e[r--]=f>>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.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;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.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<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 o=0,f=0;f>26,this.words[f]=67108863&t;for(;0!==o&&f>26,this.words[f]=67108863&t;if(0===o&&f>>13,h=0|f[1],p=8191&h,y=h>>>13,b=0|f[2],g=8191&b,m=b>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],_=8191&E,k=E>>>13,T=0|f[5],S=8191&T,x=T>>>13,P=0|f[6],I=8191&P,M=P>>>13,O=0|f[7],C=8191&O,B=O>>>13,R=0|f[8],D=8191&R,N=R>>>13,U=0|f[9],L=8191&U,F=U>>>13,j=0|a[0],z=8191&j,V=j>>>13,H=0|a[1],K=8191&H,G=H>>>13,q=0|a[2],W=8191&q,Q=q>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,fe=ie>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,ue=0|a[8],le=8191&ue,de=ue>>>13,he=0|a[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(l,z))|0)+((8191&(i=(i=Math.imul(l,V))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(y,z)|0,o=Math.imul(y,V);var ge=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,V))+Math.imul(m,z)|0,o=Math.imul(m,V),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0;var me=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,V))+Math.imul(A,z)|0,o=Math.imul(A,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var ve=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,V))+Math.imul(k,z)|0,o=Math.imul(k,V),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0;var we=(c+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(x,z)|0,o=Math.imul(x,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(M,z)|0,o=Math.imul(M,V),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ee=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(C,z),i=(i=Math.imul(C,V))+Math.imul(B,z)|0,o=Math.imul(B,V),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,fe)|0;var _e=(c+(n=n+Math.imul(l,se)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(d,se)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,V))+Math.imul(N,z)|0,o=Math.imul(N,V),n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,V))+Math.imul(F,z)|0,o=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,se)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var Te=(c+(n=n+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,le)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(F,W)|0,o=Math.imul(F,Q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,Z))+Math.imul(F,Y)|0,o=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,se)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,le)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Ie=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(B,se)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(I,le)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,fe))+Math.imul(F,oe)|0,o=Math.imul(F,fe),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(B,le)|0,o=o+Math.imul(B,de)|0;var Oe=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),n=n+Math.imul(D,le)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,de)|0;var Ce=(c+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ye)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,le),i=(i=Math.imul(L,de))+Math.imul(F,le)|0,o=Math.imul(F,de);var Be=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,s[0]=be,s[1]=ge,s[2]=me,s[3]=ve,s[4]=we,s[5]=Ae,s[6]=Ee,s[7]=_e,s[8]=ke,s[9]=Te,s[10]=Se,s[11]=xe,s[12]=Pe,s[13]=Ie,s[14]=Me,s[15]=Oe,s[16]=Ce,s[17]=Be,s[18]=Re,0!==c&&(s[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,f&=67108863}r.words[o]=a,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f>>=1)i++;return 1<>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f>=26,r+=o/67108864|0,r+=f>>>26,this.words[i]=67108863&f}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<f)for(this.length-=f,c=0;c=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=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<=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},o.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>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!==(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==t){(a=new o(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:a.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,f,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.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 o(1),f=new o(0),a=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),l=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()||f.isOdd())&&(i.iadd(u),f.isub(l)),i.iushrn(1),f.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(u),s.isub(l)),a.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),f.isub(s)):(r.isub(t),a.isub(i),s.isub(f))}return{a,b:s,gcd:r.iushln(c)}},o.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,f=new o(1),a=new o(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)f.isOdd()&&f.iadd(s),f.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(a)):(r.isub(t),a.isub(f))}return(i=0===t.cmpn(1)?f:a).cmpn(0)<0&&i.iadd(e),i},o.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 o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[f]=a}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._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 x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.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=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(E,A),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.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")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.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 o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(s);)u.redIAdd(s);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=f;0!==h.cmp(a);){for(var y=h,b=0;0!==y.cmp(a);b++)y=y.redSqr();n(b=0;n--){for(var c=t.words[n],u=s-1;u>=0;u--){var l=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==f?(f<<=1,f|=l,(4===++a||0===n&&0===u)&&(i=this.mul(i,r[f]),a=0,f=0)):a=0}s=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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),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)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(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),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6154:(e,t,r)=>{"use strict";const{Deflate:n,deflate:i,deflateRaw:o,gzip:f}=r(13247),{Inflate:a,inflate:s,inflateRaw:c,ungzip:u}=r(40021),l=r(66165);e.exports.Deflate=n,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=f,e.exports.Inflate=a,e.exports.inflate=s,e.exports.inflateRaw=c,e.exports.ungzip=u,e.exports.constants=l},13247:(e,t,r)=>{"use strict";const n=r(50211),i=r(95298),o=r(69112),f=r(32044),a=r(78781),s=Object.prototype.toString,{Z_NO_FLUSH:c,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:l,Z_FINISH:d,Z_OK:h,Z_STREAM_END:p,Z_DEFAULT_COMPRESSION:y,Z_DEFAULT_STRATEGY:b,Z_DEFLATED:g}=r(66165);function m(e){this.options=i.assign({level:y,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:b},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(f[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===s.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=n.deflateSetDictionary(this.strm,e),r!==h)throw new Error(f[r]);this._dict_set=!0}}function v(e,t){const r=new m(t);if(r.push(e,!0),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize;let f,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?d:c,"string"==typeof e?r.input=o.string2buf(e):"[object ArrayBuffer]"===s.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(a===u||a===l)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(f=n.deflate(r,a),f===p)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),f=n.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===h;if(0!==r.avail_out){if(a>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===h&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=m,e.exports.deflate=v,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,v(e,t)},e.exports.constants=r(66165)},40021:(e,t,r)=>{"use strict";const n=r(49648),i=r(95298),o=r(69112),f=r(32044),a=r(78781),s=r(63507),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:l,Z_OK:d,Z_STREAM_END:h,Z_NEED_DICT:p,Z_STREAM_ERROR:y,Z_DATA_ERROR:b,Z_MEM_ERROR:g}=r(66165);function m(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==d)throw new Error(f[r]);if(this.header=new s,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==d)))throw new Error(f[r])}function v(e,t){const r=new m(t);if(r.push(e),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize,f=this.options.dictionary;let a,s,m;if(this.ended)return!1;for(s=t===~~t?t:!0===t?l:u,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),a=n.inflate(r,s),a===p&&f&&(a=n.inflateSetDictionary(r,f),a===d?a=n.inflate(r,s):a===b&&(a=p));r.avail_in>0&&a===h&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),a=n.inflate(r,s);switch(a){case y:case b:case p:case g:return this.onEnd(a),this.ended=!0,!1}if(m=r.avail_out,r.next_out&&(0===r.avail_out||a===h))if("string"===this.options.to){let e=o.utf8border(r.output,r.next_out),t=r.next_out-e,n=o.buf2string(r.output,e);r.next_out=t,r.avail_out=i-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==d||0!==m){if(a===h)return a=n.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=m,e.exports.inflate=v,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.ungzip=v,e.exports.constants=r(66165)},95298:e=>{"use strict";const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r{"use strict";let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{let t,r,n,i,o,f=e.length,a=0;for(i=0;i>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{let i,o;const f=n||e.length,a=new Array(2*f);for(o=0,i=0;i4)a[o++]=65533,i+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&i1?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},73124:e=>{"use strict";e.exports=(e,t,r,n)=>{let i=65535&e|0,o=e>>>16&65535|0,f=0;for(;0!==r;){f=r>2e3?2e3:r,r-=f;do{i=i+t[n++]|0,o=o+i|0}while(--f);i%=65521,o%=65521}return i|o<<16|0}},66165:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},35632:e=>{"use strict";const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,i)=>{const o=t,f=i+n;e^=-1;for(let t=i;t>>8^o[255&(e^r[t])];return-1^e}},50211:(e,t,r)=>{"use strict";const{_tr_init:n,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:f,_tr_align:a}=r(79027),s=r(73124),c=r(35632),u=r(32044),{Z_NO_FLUSH:l,Z_PARTIAL_FLUSH:d,Z_FULL_FLUSH:h,Z_FINISH:p,Z_BLOCK:y,Z_OK:b,Z_STREAM_END:g,Z_STREAM_ERROR:m,Z_DATA_ERROR:v,Z_BUF_ERROR:w,Z_DEFAULT_COMPRESSION:A,Z_FILTERED:E,Z_HUFFMAN_ONLY:_,Z_RLE:k,Z_FIXED:T,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:x,Z_DEFLATED:P}=r(66165),I=258,M=262,O=103,C=113,B=666,R=(e,t)=>(e.msg=u[t],t),D=e=>(e<<1)-(e>4?9:0),N=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let U=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},F=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,L(e.strm)},j=(e,t)=>{e.pending_buf[e.pending++]=t},z=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},V=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=s(e.adler,t,i,r):2===e.state.wrap&&(e.adler=c(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},H=(e,t)=>{let r,n,i=e.max_chain_length,o=e.strstart,f=e.prev_length,a=e.nice_match;const s=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,c=e.window,u=e.w_mask,l=e.prev,d=e.strstart+I;let h=c[o+f-1],p=c[o+f];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,c[r+f]===p&&c[r+f-1]===h&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&of){if(e.match_start=t,f=n,n>=a)break;h=c[o+f-1],p=c[o+f]}}}while((t=l[t&u])>s&&0!=--i);return f<=e.lookahead?f:e.lookahead},K=e=>{const t=e.w_size;let r,n,i,o,f;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-M)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do{i=e.head[--r],e.head[r]=i>=t?i-t:0}while(--n);n=t,r=n;do{i=e.prev[--r],e.prev[r]=i>=t?i-t:0}while(--n);o+=t}if(0===e.strm.avail_in)break;if(n=V(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=3)for(f=e.strstart-e.insert,e.ins_h=e.window[f],e.ins_h=U(e,e.ins_h,e.window[f+1]);e.insert&&(e.ins_h=U(e,e.ins_h,e.window[f+3-1]),e.prev[f&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=f,f++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-M&&(e.match_length=H(e,r)),e.match_length>=3)if(n=f(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=U(e,e.ins_h,e.window[e.strstart+1]);else n=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2},q=(e,t)=>{let r,n,i;for(;;){if(e.lookahead=3&&(e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=f(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(F(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=f(e,0,e.window[e.strstart-1]),n&&F(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=f(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2};function W(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const Q=[new W(0,0,0,0,((e,t)=>{let r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(K(e),0===e.lookahead&&t===l)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,F(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-M&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(F(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(F(e,!1),e.strm.avail_out),1)})),new W(4,4,8,4,G),new W(4,5,16,8,G),new W(4,6,32,32,G),new W(4,4,16,16,q),new W(8,16,32,32,q),new W(8,16,128,128,q),new W(8,32,128,256,q),new W(32,128,258,1024,q),new W(32,258,258,4096,q)];function J(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=P,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),N(this.dyn_ltree),N(this.dyn_dtree),N(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),N(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),N(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Y=e=>{if(!e||!e.state)return R(e,m);e.total_in=e.total_out=0,e.data_type=x;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:C,e.adler=2===t.wrap?0:1,t.last_flush=l,n(t),b},Z=e=>{const t=Y(e);var r;return t===b&&((r=e.state).window_size=2*r.w_size,N(r.head),r.max_lazy_match=Q[r.level].max_lazy,r.good_match=Q[r.level].good_length,r.nice_match=Q[r.level].nice_length,r.max_chain_length=Q[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},X=(e,t,r,n,i,o)=>{if(!e)return m;let f=1;if(t===A&&(t=6),n<0?(f=0,n=-n):n>15&&(f=2,n-=16),i<1||i>9||r!==P||n<8||n>15||t<0||t>9||o<0||o>T)return R(e,m);8===n&&(n=9);const a=new J;return e.state=a,a.strm=e,a.wrap=f,a.gzhead=null,a.w_bits=n,a.w_size=1<X(e,t,P,15,8,S),e.exports.deflateInit2=X,e.exports.deflateReset=Z,e.exports.deflateResetKeep=Y,e.exports.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,b):m,e.exports.deflate=(e,t)=>{let r,n;if(!e||!e.state||t>y||t<0)return e?R(e,m):m;const o=e.state;if(!e.output||!e.input&&0!==e.avail_in||o.status===B&&t!==p)return R(e,0===e.avail_out?w:m);o.strm=e;const s=o.last_flush;if(o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,j(o,31),j(o,139),j(o,8),o.gzhead?(j(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),j(o,255&o.gzhead.time),j(o,o.gzhead.time>>8&255),j(o,o.gzhead.time>>16&255),j(o,o.gzhead.time>>24&255),j(o,9===o.level?2:o.strategy>=_||o.level<2?4:0),j(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(j(o,255&o.gzhead.extra.length),j(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=c(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(j(o,0),j(o,0),j(o,0),j(o,0),j(o,0),j(o,9===o.level?2:o.strategy>=_||o.level<2?4:0),j(o,3),o.status=C);else{let t=P+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=_||o.level<2?0:o.level<6?1:6===o.level?2:3,t|=r<<6,0!==o.strstart&&(t|=32),t+=31-t%31,o.status=C,z(o,t),0!==o.strstart&&(z(o,e.adler>>>16),z(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),L(e),r=o.pending,o.pending!==o.pending_buf_size));)j(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),L(e),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindexr&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),L(e),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindexr&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=O)}else o.status=O;if(o.status===O&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&L(e),o.pending+2<=o.pending_buf_size&&(j(o,255&e.adler),j(o,e.adler>>8&255),e.adler=0,o.status=C)):o.status=C),0!==o.pending){if(L(e),0===e.avail_out)return o.last_flush=-1,b}else if(0===e.avail_in&&D(t)<=D(s)&&t!==p)return R(e,w);if(o.status===B&&0!==e.avail_in)return R(e,w);if(0!==e.avail_in||0!==o.lookahead||t!==l&&o.status!==B){let r=o.strategy===_?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(K(e),0===e.lookahead)){if(t===l)return 1;break}if(e.match_length=0,r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2})(o,t):o.strategy===k?((e,t)=>{let r,n,i,o;const a=e.window;for(;;){if(e.lookahead<=I){if(K(e),e.lookahead<=I&&t===l)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+I;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=f(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2})(o,t):Q[o.level].func(o,t);if(3!==r&&4!==r||(o.status=B),1===r||3===r)return 0===e.avail_out&&(o.last_flush=-1),b;if(2===r&&(t===d?a(o):t!==y&&(i(o,0,0,!1),t===h&&(N(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),L(e),0===e.avail_out))return o.last_flush=-1,b}return t!==p?b:o.wrap<=0?g:(2===o.wrap?(j(o,255&e.adler),j(o,e.adler>>8&255),j(o,e.adler>>16&255),j(o,e.adler>>24&255),j(o,255&e.total_in),j(o,e.total_in>>8&255),j(o,e.total_in>>16&255),j(o,e.total_in>>24&255)):(z(o,e.adler>>>16),z(o,65535&e.adler)),L(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?b:g)},e.exports.deflateEnd=e=>{if(!e||!e.state)return m;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==O&&t!==C&&t!==B?R(e,m):(e.state=null,t===C?R(e,v):b)},e.exports.deflateSetDictionary=(e,t)=>{let r=t.length;if(!e||!e.state)return m;const n=e.state,i=n.wrap;if(2===i||1===i&&42!==n.status||n.lookahead)return m;if(1===i&&(e.adler=s(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(N(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const o=e.avail_in,f=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,K(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=U(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,K(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=f,e.input=a,e.avail_in=o,n.wrap=i,b},e.exports.deflateInfo="pako deflate (from Nodeca project)"},63507:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},68559:e=>{"use strict";e.exports=function(e,t){let r,n,i,o,f,a,s,c,u,l,d,h,p,y,b,g,m,v,w,A,E,_,k,T;const S=e.state;r=e.next_in,k=e.input,n=r+(e.avail_in-5),i=e.next_out,T=e.output,o=i-(t-e.avail_out),f=i+(e.avail_out-257),a=S.dmax,s=S.wsize,c=S.whave,u=S.wnext,l=S.window,d=S.hold,h=S.bits,p=S.lencode,y=S.distcode,b=(1<>>24,d>>>=v,h-=v,v=m>>>16&255,0===v)T[i++]=65535&m;else{if(!(16&v)){if(0==(64&v)){m=p[(65535&m)+(d&(1<>>=v,h-=v),h<15&&(d+=k[r++]<>>24,d>>>=v,h-=v,v=m>>>16&255,!(16&v)){if(0==(64&v)){m=y[(65535&m)+(d&(1<a){e.msg="invalid distance too far back",S.mode=30;break e}if(d>>>=v,h-=v,v=i-o,A>v){if(v=A-v,v>c&&S.sane){e.msg="invalid distance too far back",S.mode=30;break e}if(E=0,_=l,0===u){if(E+=s-v,v2;)T[i++]=_[E++],T[i++]=_[E++],T[i++]=_[E++],w-=3;w&&(T[i++]=_[E++],w>1&&(T[i++]=_[E++]))}else{E=i-A;do{T[i++]=T[E++],T[i++]=T[E++],T[i++]=T[E++],w-=3}while(w>2);w&&(T[i++]=T[E++],w>1&&(T[i++]=T[E++]))}break}}break}}while(r>3,r-=w,h-=w<<3,d&=(1<{"use strict";const n=r(73124),i=r(35632),o=r(68559),f=r(5473),{Z_FINISH:a,Z_BLOCK:s,Z_TREES:c,Z_OK:u,Z_STREAM_END:l,Z_NEED_DICT:d,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:y,Z_BUF_ERROR:b,Z_DEFLATED:g}=r(66165),m=12,v=30,w=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const E=e=>{if(!e||!e.state)return h;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},_=e=>{if(!e||!e.state)return h;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,E(e)},k=(e,t)=>{let r;if(!e||!e.state)return h;const n=e.state;return t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?h:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,_(e))},T=(e,t)=>{if(!e)return h;const r=new A;e.state=r,r.window=null;const n=k(e,t);return n!==u&&(e.state=null),n};let S,x,P=!0;const I=e=>{if(P){S=new Int32Array(512),x=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(f(1,e.lens,0,288,S,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;f(2,e.lens,0,32,x,0,e.work,{bits:5}),P=!1}e.lencode=S,e.lenbits=9,e.distcode=x,e.distbits=5},M=(e,t,r,n)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaveT(e,15),e.exports.inflateInit2=T,e.exports.inflate=(e,t)=>{let r,A,E,_,k,T,S,x,P,O,C,B,R,D,N,U,L,F,j,z,V,H,K=0;const G=new Uint8Array(4);let q,W;const Q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return h;r=e.state,r.mode===m&&(r.mode=13),k=e.next_out,E=e.output,S=e.avail_out,_=e.next_in,A=e.input,T=e.avail_in,x=r.hold,P=r.bits,O=T,C=S,H=u;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;P<16;){if(0===T)break e;T--,x+=A[_++]<>>8&255,r.check=i(r.check,G,2,0),x=0,P=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&x)<<8)+(x>>8))%31){e.msg="incorrect header check",r.mode=v;break}if((15&x)!==g){e.msg="unknown compression method",r.mode=v;break}if(x>>>=4,P-=4,V=8+(15&x),0===r.wbits)r.wbits=V;else if(V>r.wbits){e.msg="invalid window size",r.mode=v;break}r.dmax=1<>8&1),512&r.flags&&(G[0]=255&x,G[1]=x>>>8&255,r.check=i(r.check,G,2,0)),x=0,P=0,r.mode=3;case 3:for(;P<32;){if(0===T)break e;T--,x+=A[_++]<>>8&255,G[2]=x>>>16&255,G[3]=x>>>24&255,r.check=i(r.check,G,4,0)),x=0,P=0,r.mode=4;case 4:for(;P<16;){if(0===T)break e;T--,x+=A[_++]<>8),512&r.flags&&(G[0]=255&x,G[1]=x>>>8&255,r.check=i(r.check,G,2,0)),x=0,P=0,r.mode=5;case 5:if(1024&r.flags){for(;P<16;){if(0===T)break e;T--,x+=A[_++]<>>8&255,r.check=i(r.check,G,2,0)),x=0,P=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(B=r.length,B>T&&(B=T),B&&(r.head&&(V=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(A.subarray(_,_+B),V)),512&r.flags&&(r.check=i(r.check,A,B,_)),T-=B,_+=B,r.length-=B),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===T)break e;B=0;do{V=A[_+B++],r.head&&V&&r.length<65536&&(r.head.name+=String.fromCharCode(V))}while(V&&B>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=m;break;case 10:for(;P<32;){if(0===T)break e;T--,x+=A[_++]<>>=7&P,P-=7&P,r.mode=27;break}for(;P<3;){if(0===T)break e;T--,x+=A[_++]<>>=1,P-=1,3&x){case 0:r.mode=14;break;case 1:if(I(r),r.mode=20,t===c){x>>>=2,P-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=v}x>>>=2,P-=2;break;case 14:for(x>>>=7&P,P-=7&P;P<32;){if(0===T)break e;T--,x+=A[_++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=v;break}if(r.length=65535&x,x=0,P=0,r.mode=15,t===c)break e;case 15:r.mode=16;case 16:if(B=r.length,B){if(B>T&&(B=T),B>S&&(B=S),0===B)break e;E.set(A.subarray(_,_+B),k),T-=B,_+=B,S-=B,k+=B,r.length-=B;break}r.mode=m;break;case 17:for(;P<14;){if(0===T)break e;T--,x+=A[_++]<>>=5,P-=5,r.ndist=1+(31&x),x>>>=5,P-=5,r.ncode=4+(15&x),x>>>=4,P-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=v;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,P-=3}for(;r.have<19;)r.lens[Q[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,q={bits:r.lenbits},H=f(0,r.lens,0,19,r.lencode,0,r.work,q),r.lenbits=q.bits,H){e.msg="invalid code lengths set",r.mode=v;break}r.have=0,r.mode=19;case 19:for(;r.have>>24,U=K>>>16&255,L=65535&K,!(N<=P);){if(0===T)break e;T--,x+=A[_++]<>>=N,P-=N,r.lens[r.have++]=L;else{if(16===L){for(W=N+2;P>>=N,P-=N,0===r.have){e.msg="invalid bit length repeat",r.mode=v;break}V=r.lens[r.have-1],B=3+(3&x),x>>>=2,P-=2}else if(17===L){for(W=N+3;P>>=N,P-=N,V=0,B=3+(7&x),x>>>=3,P-=3}else{for(W=N+7;P>>=N,P-=N,V=0,B=11+(127&x),x>>>=7,P-=7}if(r.have+B>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=v;break}for(;B--;)r.lens[r.have++]=V}}if(r.mode===v)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=v;break}if(r.lenbits=9,q={bits:r.lenbits},H=f(1,r.lens,0,r.nlen,r.lencode,0,r.work,q),r.lenbits=q.bits,H){e.msg="invalid literal/lengths set",r.mode=v;break}if(r.distbits=6,r.distcode=r.distdyn,q={bits:r.distbits},H=f(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,q),r.distbits=q.bits,H){e.msg="invalid distances set",r.mode=v;break}if(r.mode=20,t===c)break e;case 20:r.mode=21;case 21:if(T>=6&&S>=258){e.next_out=k,e.avail_out=S,e.next_in=_,e.avail_in=T,r.hold=x,r.bits=P,o(e,C),k=e.next_out,E=e.output,S=e.avail_out,_=e.next_in,A=e.input,T=e.avail_in,x=r.hold,P=r.bits,r.mode===m&&(r.back=-1);break}for(r.back=0;K=r.lencode[x&(1<>>24,U=K>>>16&255,L=65535&K,!(N<=P);){if(0===T)break e;T--,x+=A[_++]<>F)],N=K>>>24,U=K>>>16&255,L=65535&K,!(F+N<=P);){if(0===T)break e;T--,x+=A[_++]<>>=F,P-=F,r.back+=F}if(x>>>=N,P-=N,r.back+=N,r.length=L,0===U){r.mode=26;break}if(32&U){r.back=-1,r.mode=m;break}if(64&U){e.msg="invalid literal/length code",r.mode=v;break}r.extra=15&U,r.mode=22;case 22:if(r.extra){for(W=r.extra;P>>=r.extra,P-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;K=r.distcode[x&(1<>>24,U=K>>>16&255,L=65535&K,!(N<=P);){if(0===T)break e;T--,x+=A[_++]<>F)],N=K>>>24,U=K>>>16&255,L=65535&K,!(F+N<=P);){if(0===T)break e;T--,x+=A[_++]<>>=F,P-=F,r.back+=F}if(x>>>=N,P-=N,r.back+=N,64&U){e.msg="invalid distance code",r.mode=v;break}r.offset=L,r.extra=15&U,r.mode=24;case 24:if(r.extra){for(W=r.extra;P>>=r.extra,P-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=v;break}r.mode=25;case 25:if(0===S)break e;if(B=C-S,r.offset>B){if(B=r.offset-B,B>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=v;break}B>r.wnext?(B-=r.wnext,R=r.wsize-B):R=r.wnext-B,B>r.length&&(B=r.length),D=r.window}else D=E,R=k-r.offset,B=r.length;B>S&&(B=S),S-=B,r.length-=B;do{E[k++]=D[R++]}while(--B);0===r.length&&(r.mode=21);break;case 26:if(0===S)break e;E[k++]=r.length,S--,r.mode=21;break;case 27:if(r.wrap){for(;P<32;){if(0===T)break e;T--,x|=A[_++]<{if(!e||!e.state)return h;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(!e||!e.state)return h;const r=e.state;return 0==(2&r.wrap)?h:(r.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let i,o,f;return e&&e.state?(i=e.state,0!==i.wrap&&11!==i.mode?h:11===i.mode&&(o=1,o=n(o,t,r,0),o!==i.check)?p:(f=M(e,t,r,r),f?(i.mode=31,y):(i.havedict=1,u))):h},e.exports.inflateInfo="pako inflate (from Nodeca project)"},5473:e=>{"use strict";const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),i=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),o=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,f,a,s,c,u,l,d)=>{const h=d.bits;let p,y,b,g,m,v,w=0,A=0,E=0,_=0,k=0,T=0,S=0,x=0,P=0,I=0,M=null,O=0;const C=new Uint16Array(16),B=new Uint16Array(16);let R,D,N,U=null,L=0;for(w=0;w<=t;w++)C[w]=0;for(A=0;A=1&&0===C[_];_--);if(k>_&&(k=_),0===_)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(E=1;E<_&&0===C[E];E++);for(k0&&(0===e||1!==_))return-1;for(B[1]=0,w=1;w852||2===e&&P>592)return 1;for(;;){R=w-S,l[A]v?(D=U[L+l[A]],N=M[O+l[A]]):(D=96,N=0),p=1<>S)+y]=R<<24|D<<16|N|0}while(0!==y);for(p=1<>=1;if(0!==p?(I&=p-1,I+=p):I=0,A++,0==--C[w]){if(w===_)break;w=f[a+l[A]]}if(w>k&&(I&g)!==b){for(0===S&&(S=k),m+=E,T=w-S,x=1<852||2===e&&P>592)return 1;b=I&g,c[b]=k<<24|T<<16|m-u|0}}return 0!==I&&(c[m+I]=w-S<<24|64<<16|0),d.bits=k,0}},32044:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},79027:e=>{"use strict";function t(e){let t=e.length;for(;--t>=0;)e[t]=0}const r=256,n=286,i=30,o=15,f=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);t(u);const l=new Array(60);t(l);const d=new Array(512);t(d);const h=new Array(256);t(h);const p=new Array(29);t(p);const y=new Array(i);function b(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let g,m,v;function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(y);const A=e=>e<256?d[e]:d[256+(e>>>7)],E=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},_=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{_(e,r[2*t],r[2*t+1])},T=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},S=(e,t,r)=>{const n=new Array(16);let i,f,a=0;for(i=1;i<=o;i++)n[i]=a=a+r[i-1]<<1;for(f=0;f<=t;f++){let t=e[2*f+1];0!==t&&(e[2*f]=T(n[t]++,t))}},x=e=>{let t;for(t=0;t{e.bi_valid>8?E(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},I=(e,t,r,n)=>{const i=2*t,o=2*r;return e[i]{const n=e.heap[r];let i=r<<1;for(;i<=e.heap_len&&(i{let i,o,s,c,u=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],o=e.pending_buf[e.l_buf+u],u++,0===i?k(e,o,t):(s=h[o],k(e,s+r+1,t),c=f[s],0!==c&&(o-=p[s],_(e,o,c)),i--,s=A(i),k(e,s,n),c=a[s],0!==c&&(i-=y[s],_(e,i,c)))}while(u{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,f=t.stat_desc.elems;let a,s,c,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)M(e,r,a);c=f;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[2*c]=r[2*a]+r[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[2*a+1]=r[2*s+1]=c,e.heap[1]=c++,M(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,f=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,l,d,h,p,y,b=0;for(h=0;h<=o;h++)e.bl_count[h]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)l=e.heap[u],h=r[2*r[2*l+1]+1]+1,h>c&&(h=c,b++),r[2*l+1]=h,l>n||(e.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),y=r[2*l],e.opt_len+=y*(h+p),f&&(e.static_len+=y*(i[2*l+1]+p)));if(0!==b){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,b-=2}while(b>0);for(h=c;0!==h;h--)for(l=e.bl_count[h];0!==l;)d=e.heap[--u],d>n||(r[2*d+1]!==h&&(e.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(e,t),S(r,u,e.bl_count)},B=(e,t,r)=>{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=f,f=t[2*(n+1)+1],++a{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),n=0;n<=r;n++)if(i=f,f=t[2*(n+1)+1],!(++a{_(e,0+(n?1:0),3),((e,t,r,n)=>{P(e),n&&(E(e,r),E(e,~r)),e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r})(e,t,r,!0)};e.exports._tr_init=e=>{D||((()=>{let e,t,r,c,w;const A=new Array(16);for(r=0,c=0;c<28;c++)for(p[c]=r,e=0;e<1<>=7;c{let o,f,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t{let t;for(B(e,e.dyn_ltree,e.l_desc.max_code),B(e,e.dyn_dtree,e.d_desc.max_code),C(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=o&&(o=f)):o=f=n+5,n+4<=o&&-1!==t?N(e,t,n,i):4===e.strategy||f===o?(_(e,2+(i?1:0),3),O(e,u,l)):(_(e,4+(i?1:0),3),((e,t,r,n)=>{let i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(h[n]+r+1)]++,e.dyn_dtree[2*A(t)]++),e.last_lit===e.lit_bufsize-1),e.exports._tr_align=e=>{_(e,2,3),k(e,256,u),(e=>{16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},78781:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},44105:(e,t,r)=>{"use strict";var n=r(40210)("%Object.defineProperty%",!0),i=r(96410)(),o=r(17642),f=i?Symbol.toStringTag:null;e.exports=function(e,t){var r=arguments.length>2&&arguments[2]&&arguments[2].force;!f||!r&&o(e,f)||(n?n(e,f,{configurable:!0,enumerable:!1,value:t,writable:!1}):e[f]=t)}},41503:(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=r(34149),o=r(95320),f=r(18923),a=r(12636);e.exports=function(e){if(i(e))return e;var t,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?t=function(e,t){var r=e[t];if(null!=r){if(!o(r))throw new TypeError(r+" returned for property "+t+" of object "+e+" is not a function");return r}}(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var s=t.call(e,r);if(i(s))return s;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(f(e)||a(e))&&(r="string"),function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var r,n,f,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(f=0;f{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},62863:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="ethers/5.7.2"},91023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>n.VZ,BigNumber:()=>i.O$,Contract:()=>n.CH,ContractFactory:()=>n.lV,FixedNumber:()=>o.xs,Signer:()=>f.E,VoidSigner:()=>f.b,Wallet:()=>a.Wallet,Wordlist:()=>l.D,constants:()=>s,errors:()=>h.ErrorCode,getDefaultProvider:()=>c.getDefaultProvider,logger:()=>y,providers:()=>c,utils:()=>d,version:()=>p.i,wordlists:()=>u.E});var n=r(96519),i=r(2593),o=r(20335),f=r(48171),a=r(44958),s=r(44328),c=r(55538),u=r(9855),l=r(48659),d=r(86494),h=r(80711),p=r(62863);const y=new h.Logger(p.i)},86623:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>a.VZ,BigNumber:()=>s.O$,Contract:()=>a.CH,ContractFactory:()=>a.lV,FixedNumber:()=>c.xs,Signer:()=>i.E,VoidSigner:()=>i.b,Wallet:()=>o.Wallet,Wordlist:()=>y.D,constants:()=>u,errors:()=>l.ErrorCode,ethers:()=>n,getDefaultProvider:()=>f.getDefaultProvider,logger:()=>n.logger,providers:()=>f,utils:()=>d,version:()=>p.i,wordlists:()=>h.E});var n=r(91023),i=r(48171),o=r(44958),f=r(55538),a=r(96519),s=r(2593),c=r(20335),u=r(44328),l=r(80711),d=r(86494),h=r(9855),p=r(62863),y=r(48659);try{const e=window;null==e._ethers&&(e._ethers=n)}catch(e){}},86494:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>n.R,ConstructorFragment:()=>i.Xg,ErrorFragment:()=>i.IC,EventFragment:()=>i.QV,FormatTypes:()=>i.pc,Fragment:()=>i.HY,FunctionFragment:()=>i.YW,HDNode:()=>y.HDNode,Indexed:()=>f.Hk,Interface:()=>f.vU,LogDescription:()=>f.CC,Logger:()=>m.Logger,ParamType:()=>i._R,RLP:()=>k,SigningKey:()=>T.SigningKey,SupportedAlgorithm:()=>B.p,TransactionDescription:()=>f.vk,TransactionTypes:()=>I.TransactionTypes,UnicodeNormalizationForm:()=>x.Uj,Utf8ErrorFuncs:()=>x.te,Utf8ErrorReason:()=>x.Uw,_TypedDataEncoder:()=>p.E,_fetchData:()=>C._fetchData,_toEscapedUtf8String:()=>x.U$,accessListify:()=>I.accessListify,arrayify:()=>u.arrayify,base58:()=>c.Base58,base64:()=>s,checkProperties:()=>_.checkProperties,checkResultErrors:()=>o.BR,commify:()=>M.commify,computeAddress:()=>I.computeAddress,computeHmac:()=>v.Gy,computePublicKey:()=>T.computePublicKey,concat:()=>u.concat,deepCopy:()=>_.deepCopy,defaultAbiCoder:()=>n.$,defaultPath:()=>y.defaultPath,defineReadOnly:()=>_.defineReadOnly,dnsEncode:()=>l.Kn,entropyToMnemonic:()=>y.entropyToMnemonic,fetchJson:()=>C.fetchJson,formatBytes32String:()=>P.s,formatEther:()=>M.formatEther,formatUnits:()=>M.formatUnits,getAccountPath:()=>y.getAccountPath,getAddress:()=>a.getAddress,getContractAddress:()=>a.getContractAddress,getCreate2Address:()=>a.getCreate2Address,getIcapAddress:()=>a.getIcapAddress,getJsonWalletAddress:()=>b.Rb,getStatic:()=>_.getStatic,hashMessage:()=>d.r,hexConcat:()=>u.hexConcat,hexDataLength:()=>u.hexDataLength,hexDataSlice:()=>u.hexDataSlice,hexStripZeros:()=>u.hexStripZeros,hexValue:()=>u.hexValue,hexZeroPad:()=>u.hexZeroPad,hexlify:()=>u.hexlify,id:()=>h.id,isAddress:()=>a.isAddress,isBytes:()=>u.isBytes,isBytesLike:()=>u.isBytesLike,isHexString:()=>u.isHexString,isValidMnemonic:()=>y.isValidMnemonic,isValidName:()=>l.r1,joinSignature:()=>u.joinSignature,keccak256:()=>g.keccak256,mnemonicToEntropy:()=>y.mnemonicToEntropy,mnemonicToSeed:()=>y.mnemonicToSeed,namehash:()=>l.VM,nameprep:()=>S.Ll,parseBytes32String:()=>P.F,parseEther:()=>M.parseEther,parseTransaction:()=>I.parse,parseUnits:()=>M.parseUnits,poll:()=>C.poll,randomBytes:()=>A.O,recoverAddress:()=>I.recoverAddress,recoverPublicKey:()=>T.recoverPublicKey,resolveProperties:()=>_.resolveProperties,ripemd160:()=>v.bP,serializeTransaction:()=>I.serialize,sha256:()=>v.JQ,sha512:()=>v.o,shallowCopy:()=>_.shallowCopy,shuffled:()=>E.y,solidityKeccak256:()=>w.keccak256,solidityPack:()=>w.pack,soliditySha256:()=>w.sha256,splitSignature:()=>u.splitSignature,stripZeros:()=>u.stripZeros,toUtf8Bytes:()=>x.Y0,toUtf8CodePoints:()=>x.XL,toUtf8String:()=>x.ZN,verifyMessage:()=>O.verifyMessage,verifyTypedData:()=>O.verifyTypedData,zeroPad:()=>u.zeroPad});var n=r(72734),i=r(11388),o=r(61184),f=r(8198),a=r(64594),s=r(4089),c=r(57727),u=r(93286),l=r(78339),d=r(93684),h=r(32046),p=r(67827),y=r(36274),b=r(67949),g=r(38197),m=r(80711),v=r(77158),w=r(33777),A=r(44478),E=r(52472),_=r(53587),k=r(61843),T=r(62768),S=r(35637),x=r(44242),P=r(86237),I=r(13479),M=r(46441),O=r(44958),C=r(58341),B=r(21261)},56371:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var f=r(83893);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return f.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return f.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return f.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return f.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return f.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return f.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return f.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return f.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return f.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return f.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return f.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return f.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return f.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return f.TransactionDescription}});var a=r(64594);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var s=o(r(4089));t.base64=s;var c=r(57727);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return c.Base58}});var u=r(93286);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return u.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return u.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return u.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return u.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return u.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return u.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return u.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return u.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return u.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return u.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return u.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return u.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return u.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return u.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return u.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return u.stripZeros}});var l=r(75931);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return l._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return l.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return l.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return l.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return l.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return l.namehash}});var d=r(36274);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return d.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return d.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return d.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return d.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return d.mnemonicToSeed}});var h=r(19380);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return h.getJsonWalletAddress}});var p=r(38197);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var y=r(80711);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return y.Logger}});var b=r(91278);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return b.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return b.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return b.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return b.sha512}});var g=r(33777);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return g.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return g.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return g.sha256}});var m=r(22118);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return m.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return m.shuffled}});var v=r(53587);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return v.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return v.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return v.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return v.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return v.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return v.shallowCopy}});var w=o(r(61843));t.RLP=w;var A=r(62768);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return A.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return A.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return A.SigningKey}});var E=r(62741);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return E.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return E.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return E.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return E._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return E.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return E.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return E.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return E.Utf8ErrorFuncs}});var _=r(13479);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return _.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return _.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return _.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return _.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return _.TransactionTypes}});var k=r(46441);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return k.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return k.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return k.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return k.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return k.parseUnits}});var T=r(44958);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return T.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return T.verifyTypedData}});var S=r(58341);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return S._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return S.poll}});var x=r(91278);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return x.SupportedAlgorithm}});var P=r(62741);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return P.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return P.Utf8ErrorReason}})},17648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=t.call(arguments,1),f=Math.max(0,n.length-o.length),a=[],s=0;s{"use strict";var n=r(17648);e.exports=Function.prototype.bind||n},25972:e=>{"use strict";var t=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(e){r=null}t.functionsHaveConfigurableNames=function(){if(!t()||!r)return!1;var e=r((function(){}),"name");return!!e&&!!e.configurable};var n=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"==typeof n&&""!==function(){}.bind().name},e.exports=t},40210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,f=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var c=function(){throw new f},u=s?function(){try{return c}catch(e){try{return s(arguments,"callee").get}catch(e){return c}}}():c,l=r(41405)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:d(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":l?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?d(""[Symbol.iterator]()):n,"%Symbol%":l?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},b=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=d(i.prototype))}return y[t]=r,r},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=r(58612),v=r(17642),w=m.call(Function.call,Array.prototype.concat),A=m.call(Function.apply,Array.prototype.splice),E=m.call(Function.call,String.prototype.replace),_=m.call(Function.call,String.prototype.slice),k=m.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,x=function(e,t){var r,n=e;if(v(g,n)&&(n="%"+(r=g[n])[0]+"%"),v(y,n)){var o=y[n];if(o===h&&(o=b(n)),void 0===o&&!t)throw new f("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,T,(function(e,t,r,i){n[n.length]=r?E(i,S,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),a=o.name,c=o.value,u=!1,l=o.alias;l&&(n=l[0],A(r,w([0,1],l)));for(var d=1,h=!0;d=r.length){var m=s(c,p);c=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else h=v(c,p),c=c[p];h&&!u&&(y[a]=c)}}return c}},31044:(e,t,r)=>{"use strict";var n=r(40210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},28185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},41405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(55419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},55419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},96410:(e,t,r)=>{"use strict";var n=r(55419);e.exports=function(){return n()&&!!Symbol.toStringTag}},17642:(e,t,r)=>{"use strict";var n=r(58612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},33715:(e,t,r)=>{var n=t;n.utils=r(26436),n.common=r(95772),n.sha=r(89041),n.ripemd=r(12949),n.hmac=r(52344),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},95772:(e,t,r)=>{"use strict";var n=r(26436),i=r(79746);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.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=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>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,o=8;o{"use strict";var n=r(26436),i=r(79746);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(26436),i=r(95772),o=n.rotl32,f=n.sum32,a=n.sum32_3,s=n.sum32_4,c=i.BlockHash;function u(){if(!(this instanceof u))return new u;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(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 d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,c),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],u=this.h[4],m=r,v=n,w=i,A=c,E=u,_=0;_<80;_++){var k=f(o(s(r,l(_,n,i,c),e[p[_]+t],d(_)),b[_]),u);r=u,u=c,c=o(i,10),i=n,n=k,k=f(o(s(m,l(79-_,v,w,A),e[y[_]+t],h(_)),g[_]),E),m=E,E=A,A=o(w,10),w=v,v=k}k=a(this.h[1],i,A),this.h[1]=a(this.h[2],c,E),this.h[2]=a(this.h[3],u,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=k},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],y=[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],b=[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],g=[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]},89041:(e,t,r)=>{"use strict";t.sha1=r(84761),t.sha224=r(10799),t.sha256=r(89344),t.sha384=r(80772),t.sha512=r(45900)},84761:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(37038),f=n.rotl32,a=n.sum32,s=n.sum32_5,c=o.ft_1,u=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(26436),i=r(89344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},89344:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(37038),f=r(79746),a=n.sum32,s=n.sum32_4,c=n.sum32_5,u=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,y=o.g1_256,b=i.BlockHash,g=[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 m(){if(!(this instanceof m))return new m;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(m,b),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(26436),i=r(45900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},45900:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(79746),f=n.rotr64_hi,a=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,u=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,b=n.sum64_5_lo,g=i.BlockHash,m=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var f=t&n^~t&o;return f<0&&(f+=4294967296),f}function E(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var f=t&n^t&o^n&o;return f<0&&(f+=4294967296),f}function k(e,t){var r=f(e,t,28)^f(t,e,2)^f(t,e,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=f(e,t,14)^f(e,t,18)^f(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=f(e,t,1)^f(e,t,8)^s(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=f(e,t,19)^f(t,e,29)^s(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(26436).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function f(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?f(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=f,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},26436:(e,t,r)=>{"use strict";var n=r(79746),i=r(35717);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function f(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(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}t.inherits=i,t.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>6|192,r[n++]=63&f|128):o(e,i)?(f=65536+((1023&f)<<10)+(1023&e.charCodeAt(++i)),r[n++]=f>>18|240,r[n++]=f>>12&63|128,r[n++]=f>>6&63|128,r[n++]=63&f|128):(r[n++]=f>>12|224,r[n++]=f>>6&63|128,r[n++]=63&f|128)}else for(i=0;i>>0}return f},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,f=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,f,a){var s=0,c=t;return s+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,f,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,f,a,s,c){var u=0,l=t;return u+=(l=l+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,f,a,s,c){return t+n+o+a+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2156:(e,t,r)=>{"use strict";var n=r(33715),i=r(34504),o=r(79746);function f(e){if(!(this instanceof f))return new f(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=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=f,f.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.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},f.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=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{t.read=function(e,t,r,n,i){var o,f,a=8*i-n-1,s=(1<>1,u=-7,l=r?i-1:0,d=r?-1:1,h=e[t+l];for(l+=d,o=h&(1<<-u)-1,h>>=-u,u+=a;u>0;o=256*o+e[t+l],l+=d,u-=8);for(f=o&(1<<-u)-1,o>>=-u,u+=n;u>0;f=256*f+e[t+l],l+=d,u-=8);if(0===o)o=1-c;else{if(o===s)return f?NaN:1/0*(h?-1:1);f+=Math.pow(2,n),o-=c}return(h?-1:1)*f*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var f,a,s,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,f=u):(f=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-f))<1&&(f--,s*=2),(t+=f+l>=1?d/s:d*Math.pow(2,1-l))*s>=2&&(f++,s/=2),f+l>=u?(a=0,f=u):f+l>=1?(a=(t*s-1)*Math.pow(2,i),f+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),f=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(f=f<0;e[r+h]=255&f,h+=p,f/=256,c-=8);e[r+h-p]|=128*y}},35717: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}}},9496:(e,t,r)=>{"use strict";var n=r(40210),i=r(17642),o=r(37478)(),f=n("%TypeError%"),a={assert:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");if(o.assert(e),!a.has(e,t))throw new f("`slot` is not present on `O`")},get:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");var r=o.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");var r=o.get(e);return!!r&&i(r,"$"+t)},set:function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");var n=o.get(e);n||(n={},o.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(a),e.exports=a},95320:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,f=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!f(e)&&(n.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(l=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!f(e)&&a(e)}:function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(f(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},18923:(e,t,r)=>{"use strict";var n=Date.prototype.getDay,i=Object.prototype.toString,o=r(96410)();e.exports=function(e){return"object"==typeof e&&null!==e&&(o?function(e){try{return n.call(e),!0}catch(e){return!1}}(e):"[object Date]"===i.call(e))}},98420:(e,t,r)=>{"use strict";var n,i,o,f,a=r(21924),s=r(96410)();if(s){n=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var c=function(){throw o};f={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=c)}var u=a("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=l(e,"lastIndex");if(!(t&&n(t,"value")))return!1;try{i(e,f)}catch(e){return e===o}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},12636:(e,t,r)=>{"use strict";var n=Object.prototype.toString;if(r(41405)()){var i=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==n.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&o.test(i.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},91094:(e,t,r)=>{var n,i=r(34155);!function(){"use strict";var o="input is invalid type",f="object"==typeof window,a=f?window:{};a.JS_SHA3_NO_WINDOW&&(f=!1);var s=!f&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?a=r.g:s&&(a=self);var c=!a.JS_SHA3_NO_COMMON_JS&&e.exports,u=r.amdO,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],g=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},A=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return x["cshake"+e].update(t,n,i,o)[r]()}},_=function(e,t,r){return function(t,n,i,o){return x["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,f=this.blocks,a=this.byteCount,s=e.length,c=this.blockCount,u=0,d=this.s;u>2]|=e[u]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(f[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=f[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var f=0;f=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++f)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];f%t==0&&(U(r),o=0)}return i&&(e=r[o],a+=d[e>>4&15]+d[15&e],i>1&&(a+=d[e>>12&15]+d[e>>8&15]),i>2&&(a+=d[e>>20&15]+d[e>>16&15])),a},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,f=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var s=new Uint32Array(e);f>8&255,s[e+2]=t>>16&255,s[e+3]=t>>24&255;a%r==0&&U(n)}return o&&(e=a<<2,t=n[f],s[e]=255&t,o>1&&(s[e+1]=t>>8&255),o>2&&(s[e+2]=t>>16&255)),s},N.prototype=new D,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,f,a,s,c,u,l,d,h,p,b,g,m,v,w,A,E,_,k,T,S,x,P,I,M,O,C,B,R,D,N,U,L,F,j,z,V,H,K,G,q,W,Q,J,Y,Z,X,$,ee,te,re,ne,ie,oe,fe,ae,se,ce,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],f=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(f<<1|a>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|f>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(s<<1|c>>>31),r=o^(c<<1|s>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=f^(u<<1|l>>>31),r=a^(l<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=s^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,se=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,q=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,P=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,fe=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=b^~m&w,e[10]=T^~x&I,e[11]=S^~P&M,e[20]=D^~U&F,e[21]=N^~L&j,e[30]=G^~W&J,e[31]=q^~Q&Y,e[40]=te^~ne&oe,e[41]=re^~ie&fe,e[2]=g^~v&A,e[3]=m^~w&E,e[12]=x^~I&O,e[13]=P^~M&C,e[22]=U^~F&z,e[23]=L^~j&V,e[32]=W^~J&Z,e[33]=Q^~Y&X,e[42]=ne^~oe&ae,e[43]=ie^~fe&se,e[4]=v^~A&_,e[5]=w^~E&k,e[14]=I^~O&B,e[15]=M^~C&R,e[24]=F^~z&H,e[25]=j^~V&K,e[34]=J^~Z&$,e[35]=Y^~X&ee,e[44]=oe^~ae&ce,e[45]=fe^~se&ue,e[6]=A^~_&p,e[7]=E^~k&b,e[16]=O^~B&T,e[17]=C^~R&S,e[26]=z^~H&D,e[27]=V^~K&N,e[36]=Z^~$&G,e[37]=X^~ee&q,e[46]=ae^~ce&te,e[47]=se^~ue&re,e[8]=_^~p&g,e[9]=k^~b&m,e[18]=B^~T&x,e[19]=R^~S&P,e[28]=H^~D&U,e[29]=K^~N&L,e[38]=$^~G&W,e[39]=ee^~q&Q,e[48]=ce^~te&ne,e[49]=ue^~re&ie,e[0]^=y[n],e[1]^=y[n+1]};if(c)e.exports=x;else{for(I=0;I{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},34504:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,f=255&i;o?r.push(o,f):r.push(f)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},70631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,f=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,u=a&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,b=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,A=String.prototype.toLowerCase,E=RegExp.prototype.test,_=Array.prototype.concat,k=Array.prototype.join,T=Array.prototype.slice,S=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,O="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||"symbol")?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,B=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var i=String(n),o=m.call(t,i.length+1);return v.call(i,r,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var D=r(24654),N=D.custom,U=V(N)?N:null;function L(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return v.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==G(e)||O&&"object"==typeof e&&O in e)}function z(e){return!("[object RegExp]"!==G(e)||O&&"object"==typeof e&&O in e)}function V(e){if(M)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,i){var a=r||{};if(K(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!K(a,"customInspect")||a.customInspect;if("boolean"!=typeof s&&"symbol"!==s)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return W(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return y?R(t,w):w}if("bigint"==typeof t){var E=String(t)+"n";return y?R(t,E):E}var S=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=S&&S>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var P=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=k.call(Array(e.indent+1)," ")}return{base:r,prev:k.call(Array(t+1),r)}}(a,n);if(void 0===i)i=[];else if(q(i,t)>=0)return"[Circular]";function N(t,r,o){if(r&&(i=T.call(i)).push(r),o){var f={depth:a.depth};return K(a,"quoteStyle")&&(f.quoteStyle=a.quoteStyle),e(t,f,n+1,i)}return e(t,a,n+1,i)}if("function"==typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=g.call(b.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=$(t,N);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(V(t)){var ee=M?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(t);return"object"!=typeof t||M?ee:J(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+A.call(String(t.nodeName)),re=t.attributes||[],ne=0;ne"}if(j(t)){if(0===t.length)return"[]";var ie=$(t,N);return P&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+X(ie,P)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==G(e)||O&&"object"==typeof e&&O in e)}(t)){var oe=$(t,N);return"cause"in Error.prototype||!("cause"in t)||C.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(_.call("[cause]: "+N(t.cause),oe),", ")+" }"}if("object"==typeof t&&s){if(U&&"function"==typeof t[U]&&D)return D(t,{depth:S-n});if("symbol"!==s&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var fe=[];return f.call(t,(function(e,r){fe.push(N(r,t,!0)+" => "+N(e,t))})),Z("Map",o.call(t),fe,P)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ae=[];return u.call(t,(function(e){ae.push(N(e,t))})),Z("Set",c.call(t),ae,P)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e,l);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{l.call(e,l)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==G(e)||O&&"object"==typeof e&&O in e)}(t))return J(N(Number(t)));if(function(e){if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}(t))return J(N(x.call(t)));if(function(e){return!("[object Boolean]"!==G(e)||O&&"object"==typeof e&&O in e)}(t))return J(p.call(t));if(function(e){return!("[object String]"!==G(e)||O&&"object"==typeof e&&O in e)}(t))return J(N(String(t)));if(!function(e){return!("[object Date]"!==G(e)||O&&"object"==typeof e&&O in e)}(t)&&!z(t)){var se=$(t,N),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",le=!ce&&O&&Object(t)===t&&O in t?m.call(G(t),8,-1):ue?"Object":"",de=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||ue?"["+k.call(_.call([],le||[],ue||[]),": ")+"] ":"");return 0===se.length?de+"{}":P?de+"{"+X(se,P)+"}":de+"{ "+k.call(se,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return H.call(e,t)}function G(e){return y.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return W(m.call(e,0,t.maxStringLength),t)+n}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Z(e,t,r,n){return e+" ("+t+") {"+(n?X(r,n):k.call(r,", "))+"}"}function X(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+k.call(e,","+r)+"\n"+t.prev}function $(e,t){var r=j(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,f=r(21414),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{l(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=f(e),a=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(a&&e.length>0&&!i.call(e,0))for(var y=0;y0)for(var b=0;b{"use strict";var n=Array.prototype.slice,i=r(21414),o=Object.keys,f=o?function(e){return o(e)}:r(18987),a=Object.keys;f.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)})}else Object.keys=f;return Object.keys||f},e.exports=f},21414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},99591:(e,t,r)=>{"use strict";const{Deflate:n,deflate:i,deflateRaw:o,gzip:f}=r(24555),{Inflate:a,inflate:s,inflateRaw:c,ungzip:u}=r(78843),l=r(71619);e.exports.Deflate=n,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=f,e.exports.Inflate=a,e.exports.inflate=s,e.exports.inflateRaw=c,e.exports.ungzip=u,e.exports.constants=l},24555:(e,t,r)=>{"use strict";const n=r(30405),i=r(24236),o=r(29373),f=r(48898),a=r(62292),s=Object.prototype.toString,{Z_NO_FLUSH:c,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:l,Z_FINISH:d,Z_OK:h,Z_STREAM_END:p,Z_DEFAULT_COMPRESSION:y,Z_DEFAULT_STRATEGY:b,Z_DEFLATED:g}=r(71619);function m(e){this.options=i.assign({level:y,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:b},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(f[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===s.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=n.deflateSetDictionary(this.strm,e),r!==h)throw new Error(f[r]);this._dict_set=!0}}function v(e,t){const r=new m(t);if(r.push(e,!0),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize;let f,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?d:c,"string"==typeof e?r.input=o.string2buf(e):"[object ArrayBuffer]"===s.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(a===u||a===l)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(f=n.deflate(r,a),f===p)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),f=n.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===h;if(0!==r.avail_out){if(a>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===h&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=m,e.exports.deflate=v,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,v(e,t)},e.exports.constants=r(71619)},78843:(e,t,r)=>{"use strict";const n=r(27948),i=r(24236),o=r(29373),f=r(48898),a=r(62292),s=r(42401),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:l,Z_OK:d,Z_STREAM_END:h,Z_NEED_DICT:p,Z_STREAM_ERROR:y,Z_DATA_ERROR:b,Z_MEM_ERROR:g}=r(71619);function m(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==d)throw new Error(f[r]);if(this.header=new s,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==d)))throw new Error(f[r])}function v(e,t){const r=new m(t);if(r.push(e),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize,f=this.options.dictionary;let a,s,m;if(this.ended)return!1;for(s=t===~~t?t:!0===t?l:u,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),a=n.inflate(r,s),a===p&&f&&(a=n.inflateSetDictionary(r,f),a===d?a=n.inflate(r,s):a===b&&(a=p));r.avail_in>0&&a===h&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),a=n.inflate(r,s);switch(a){case y:case b:case p:case g:return this.onEnd(a),this.ended=!0,!1}if(m=r.avail_out,r.next_out&&(0===r.avail_out||a===h))if("string"===this.options.to){let e=o.utf8border(r.output,r.next_out),t=r.next_out-e,n=o.buf2string(r.output,e);r.next_out=t,r.avail_out=i-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==d||0!==m){if(a===h)return a=n.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=m,e.exports.inflate=v,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.ungzip=v,e.exports.constants=r(71619)},24236:e=>{"use strict";const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r{"use strict";let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,i,o,f=e.length,a=0;for(i=0;i>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{const i=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let o,f;const a=new Array(2*i);for(f=0,o=0;o4)a[f++]=65533,o+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&o1?a[f++]=65533:t<65536?a[f++]=t:(t-=65536,a[f++]=55296|t>>10&1023,a[f++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},66069:e=>{"use strict";e.exports=(e,t,r,n)=>{let i=65535&e|0,o=e>>>16&65535|0,f=0;for(;0!==r;){f=r>2e3?2e3:r,r-=f;do{i=i+t[n++]|0,o=o+i|0}while(--f);i%=65521,o%=65521}return i|o<<16|0}},71619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,i)=>{const o=t,f=i+n;e^=-1;for(let t=i;t>>8^o[255&(e^r[t])];return-1^e}},30405:(e,t,r)=>{"use strict";const{_tr_init:n,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:f,_tr_align:a}=r(10342),s=r(66069),c=r(2869),u=r(48898),{Z_NO_FLUSH:l,Z_PARTIAL_FLUSH:d,Z_FULL_FLUSH:h,Z_FINISH:p,Z_BLOCK:y,Z_OK:b,Z_STREAM_END:g,Z_STREAM_ERROR:m,Z_DATA_ERROR:v,Z_BUF_ERROR:w,Z_DEFAULT_COMPRESSION:A,Z_FILTERED:E,Z_HUFFMAN_ONLY:_,Z_RLE:k,Z_FIXED:T,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:x,Z_DEFLATED:P}=r(71619),I=258,M=262,O=42,C=113,B=666,R=(e,t)=>(e.msg=u[t],t),D=e=>2*e-(e>4?9:0),N=e=>{let t=e.length;for(;--t>=0;)e[t]=0},U=e=>{let t,r,n,i=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=i?r-i:0}while(--t);t=i,n=t;do{r=e.prev[--n],e.prev[n]=r>=i?r-i:0}while(--t)};let L=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},j=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)},z=(e,t)=>{e.pending_buf[e.pending++]=t},V=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},H=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=s(e.adler,t,i,r):2===e.state.wrap&&(e.adler=c(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},K=(e,t)=>{let r,n,i=e.max_chain_length,o=e.strstart,f=e.prev_length,a=e.nice_match;const s=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,c=e.window,u=e.w_mask,l=e.prev,d=e.strstart+I;let h=c[o+f-1],p=c[o+f];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,c[r+f]===p&&c[r+f-1]===h&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&of){if(e.match_start=t,f=n,n>=a)break;h=c[o+f-1],p=c[o+f]}}}while((t=l[t&u])>s&&0!=--i);return f<=e.lookahead?f:e.lookahead},G=e=>{const t=e.w_size;let r,n,i;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-M)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),U(e),n+=t),0===e.strm.avail_in)break;if(r=H(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=L(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=L(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n,o,f=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,F(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(H(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===a);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(H(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,f=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=f||(n||t===p)&&t!==l&&0===e.strm.avail_in&&n<=o)&&(r=n>o?o:n,a=t===p&&0===e.strm.avail_in&&r===n?1:0,i(e,e.block_start,r,a),e.block_start+=r,F(e.strm)),a?3:1)},W=(e,t)=>{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-M&&(e.match_length=K(e,r)),e.match_length>=3)if(n=f(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=L(e,e.ins_h,e.window[e.strstart+1]);else n=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(j(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2},Q=(e,t)=>{let r,n,i;for(;;){if(e.lookahead=3&&(e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=f(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(j(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=f(e,0,e.window[e.strstart-1]),n&&j(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=f(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2};function J(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const Y=[new J(0,0,0,0,q),new J(4,4,8,4,W),new J(4,5,16,8,W),new J(4,6,32,32,W),new J(4,4,16,16,Q),new J(8,16,32,32,Q),new J(8,16,128,128,Q),new J(8,32,128,256,Q),new J(32,128,258,1024,Q),new J(32,258,258,4096,Q)];function Z(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=P,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),N(this.dyn_ltree),N(this.dyn_dtree),N(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),N(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),N(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const X=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==O&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==C&&t.status!==B?1:0},$=e=>{if(X(e))return R(e,m);e.total_in=e.total_out=0,e.data_type=x;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?O:C,e.adler=2===t.wrap?0:1,t.last_flush=-2,n(t),b},ee=e=>{const t=$(e);var r;return t===b&&((r=e.state).window_size=2*r.w_size,N(r.head),r.max_lazy_match=Y[r.level].max_lazy,r.good_match=Y[r.level].good_length,r.nice_match=Y[r.level].nice_length,r.max_chain_length=Y[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},te=(e,t,r,n,i,o)=>{if(!e)return m;let f=1;if(t===A&&(t=6),n<0?(f=0,n=-n):n>15&&(f=2,n-=16),i<1||i>9||r!==P||n<8||n>15||t<0||t>9||o<0||o>T||8===n&&1!==f)return R(e,m);8===n&&(n=9);const a=new Z;return e.state=a,a.strm=e,a.status=O,a.wrap=f,a.gzhead=null,a.w_bits=n,a.w_size=1<te(e,t,P,15,8,S),e.exports.deflateInit2=te,e.exports.deflateReset=ee,e.exports.deflateResetKeep=$,e.exports.deflateSetHeader=(e,t)=>X(e)||2!==e.state.wrap?m:(e.state.gzhead=t,b),e.exports.deflate=(e,t)=>{if(X(e)||t>y||t<0)return e?R(e,m):m;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===B&&t!==p)return R(e,0===e.avail_out?w:m);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(F(e),0===e.avail_out)return r.last_flush=-1,b}else if(0===e.avail_in&&D(t)<=D(n)&&t!==p)return R(e,w);if(r.status===B&&0!==e.avail_in)return R(e,w);if(r.status===O&&0===r.wrap&&(r.status=C),r.status===O){let t=P+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=_||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,V(r,t),0!==r.strstart&&(V(r,e.adler>>>16),V(r,65535&e.adler)),e.adler=1,r.status=C,F(e),0!==r.pending)return r.last_flush=-1,b}if(57===r.status)if(e.adler=0,z(r,31),z(r,139),z(r,8),r.gzhead)z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),z(r,255&r.gzhead.time),z(r,r.gzhead.time>>8&255),z(r,r.gzhead.time>>16&255),z(r,r.gzhead.time>>24&255),z(r,9===r.level?2:r.strategy>=_||r.level<2?4:0),z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(z(r,255&r.gzhead.extra.length),z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=c(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(z(r,0),z(r,0),z(r,0),z(r,0),z(r,0),z(r,9===r.level?2:r.strategy>=_||r.level<2?4:0),z(r,3),r.status=C,F(e),0!==r.pending)return r.last_flush=-1,b;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=c(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=i,F(e),0!==r.pending)return r.last_flush=-1,b;t=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=c(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n)),F(e),0!==r.pending)return r.last_flush=-1,b;n=0}t=r.gzindexn&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n)),F(e),0!==r.pending)return r.last_flush=-1,b;n=0}t=r.gzindexn&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(F(e),0!==r.pending))return r.last_flush=-1,b;z(r,255&e.adler),z(r,e.adler>>8&255),e.adler=0}if(r.status=C,F(e),0!==r.pending)return r.last_flush=-1,b}if(0!==e.avail_in||0!==r.lookahead||t!==l&&r.status!==B){let n=0===r.level?q(r,t):r.strategy===_?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(G(e),0===e.lookahead)){if(t===l)return 1;break}if(e.match_length=0,r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(j(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===k?((e,t)=>{let r,n,i,o;const a=e.window;for(;;){if(e.lookahead<=I){if(G(e),e.lookahead<=I&&t===l)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+I;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=f(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(j(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2})(r,t):Y[r.level].func(r,t);if(3!==n&&4!==n||(r.status=B),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),b;if(2===n&&(t===d?a(r):t!==y&&(i(r,0,0,!1),t===h&&(N(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),F(e),0===e.avail_out))return r.last_flush=-1,b}return t!==p?b:r.wrap<=0?g:(2===r.wrap?(z(r,255&e.adler),z(r,e.adler>>8&255),z(r,e.adler>>16&255),z(r,e.adler>>24&255),z(r,255&e.total_in),z(r,e.total_in>>8&255),z(r,e.total_in>>16&255),z(r,e.total_in>>24&255)):(V(r,e.adler>>>16),V(r,65535&e.adler)),F(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?b:g)},e.exports.deflateEnd=e=>{if(X(e))return m;const t=e.state.status;return e.state=null,t===C?R(e,v):b},e.exports.deflateSetDictionary=(e,t)=>{let r=t.length;if(X(e))return m;const n=e.state,i=n.wrap;if(2===i||1===i&&n.status!==O||n.lookahead)return m;if(1===i&&(e.adler=s(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(N(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const o=e.avail_in,f=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,G(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=L(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,G(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=f,e.input=a,e.avail_in=o,n.wrap=i,b},e.exports.deflateInfo="pako deflate (from Nodeca project)"},42401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},94264:e=>{"use strict";const t=16209;e.exports=function(e,r){let n,i,o,f,a,s,c,u,l,d,h,p,y,b,g,m,v,w,A,E,_,k,T,S;const x=e.state;n=e.next_in,T=e.input,i=n+(e.avail_in-5),o=e.next_out,S=e.output,f=o-(r-e.avail_out),a=o+(e.avail_out-257),s=x.dmax,c=x.wsize,u=x.whave,l=x.wnext,d=x.window,h=x.hold,p=x.bits,y=x.lencode,b=x.distcode,g=(1<>>24,h>>>=w,p-=w,w=v>>>16&255,0===w)S[o++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=y[(65535&v)+(h&(1<>>=w,p-=w),p<15&&(h+=T[n++]<>>24,h>>>=w,p-=w,w=v>>>16&255,!(16&w)){if(0==(64&w)){v=b[(65535&v)+(h&(1<s){e.msg="invalid distance too far back",x.mode=t;break e}if(h>>>=w,p-=w,w=o-f,E>w){if(w=E-w,w>u&&x.sane){e.msg="invalid distance too far back",x.mode=t;break e}if(_=0,k=d,0===l){if(_+=c-w,w2;)S[o++]=k[_++],S[o++]=k[_++],S[o++]=k[_++],A-=3;A&&(S[o++]=k[_++],A>1&&(S[o++]=k[_++]))}else{_=o-E;do{S[o++]=S[_++],S[o++]=S[_++],S[o++]=S[_++],A-=3}while(A>2);A&&(S[o++]=S[_++],A>1&&(S[o++]=S[_++]))}break}}break}}while(n>3,n-=A,p-=A<<3,h&=(1<{"use strict";const n=r(66069),i=r(2869),o=r(94264),f=r(9241),{Z_FINISH:a,Z_BLOCK:s,Z_TREES:c,Z_OK:u,Z_STREAM_END:l,Z_NEED_DICT:d,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:y,Z_BUF_ERROR:b,Z_DEFLATED:g}=r(71619),m=16180,v=16190,w=16191,A=16192,E=16194,_=16199,k=16200,T=16206,S=16209,x=16210,P=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function I(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const M=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},O=e=>{if(M(e))return h;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=m,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},C=e=>{if(M(e))return h;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,O(e)},B=(e,t)=>{let r;if(M(e))return h;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?h:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,C(e))},R=(e,t)=>{if(!e)return h;const r=new I;e.state=r,r.strm=e,r.window=null,r.mode=m;const n=B(e,t);return n!==u&&(e.state=null),n};let D,N,U=!0;const L=e=>{if(U){D=new Int32Array(512),N=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(f(1,e.lens,0,288,D,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;f(2,e.lens,0,32,N,0,e.work,{bits:5}),U=!1}e.lencode=D,e.lenbits=9,e.distcode=N,e.distbits=5},F=(e,t,r,n)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaveR(e,15),e.exports.inflateInit2=R,e.exports.inflate=(e,t)=>{let r,I,O,C,B,R,D,N,U,j,z,V,H,K,G,q,W,Q,J,Y,Z,X,$=0;const ee=new Uint8Array(4);let te,re;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(M(e)||!e.output||!e.input&&0!==e.avail_in)return h;r=e.state,r.mode===w&&(r.mode=A),B=e.next_out,O=e.output,D=e.avail_out,C=e.next_in,I=e.input,R=e.avail_in,N=r.hold,U=r.bits,j=R,z=D,X=u;e:for(;;)switch(r.mode){case m:if(0===r.wrap){r.mode=A;break}for(;U<16;){if(0===R)break e;R--,N+=I[C++]<>>8&255,r.check=i(r.check,ee,2,0),N=0,U=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&N)<<8)+(N>>8))%31){e.msg="incorrect header check",r.mode=S;break}if((15&N)!==g){e.msg="unknown compression method",r.mode=S;break}if(N>>>=4,U-=4,Z=8+(15&N),0===r.wbits&&(r.wbits=Z),Z>15||Z>r.wbits){e.msg="invalid window size",r.mode=S;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,r.check=i(r.check,ee,2,0)),N=0,U=0,r.mode=16182;case 16182:for(;U<32;){if(0===R)break e;R--,N+=I[C++]<>>8&255,ee[2]=N>>>16&255,ee[3]=N>>>24&255,r.check=i(r.check,ee,4,0)),N=0,U=0,r.mode=16183;case 16183:for(;U<16;){if(0===R)break e;R--,N+=I[C++]<>8),512&r.flags&&4&r.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,r.check=i(r.check,ee,2,0)),N=0,U=0,r.mode=16184;case 16184:if(1024&r.flags){for(;U<16;){if(0===R)break e;R--,N+=I[C++]<>>8&255,r.check=i(r.check,ee,2,0)),N=0,U=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(V=r.length,V>R&&(V=R),V&&(r.head&&(Z=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(I.subarray(C,C+V),Z)),512&r.flags&&4&r.wrap&&(r.check=i(r.check,I,V,C)),R-=V,C+=V,r.length-=V),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===R)break e;V=0;do{Z=I[C+V++],r.head&&Z&&r.length<65536&&(r.head.name+=String.fromCharCode(Z))}while(Z&&V>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=w;break;case 16189:for(;U<32;){if(0===R)break e;R--,N+=I[C++]<>>=7&U,U-=7&U,r.mode=T;break}for(;U<3;){if(0===R)break e;R--,N+=I[C++]<>>=1,U-=1,3&N){case 0:r.mode=16193;break;case 1:if(L(r),r.mode=_,t===c){N>>>=2,U-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=S}N>>>=2,U-=2;break;case 16193:for(N>>>=7&U,U-=7&U;U<32;){if(0===R)break e;R--,N+=I[C++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=S;break}if(r.length=65535&N,N=0,U=0,r.mode=E,t===c)break e;case E:r.mode=16195;case 16195:if(V=r.length,V){if(V>R&&(V=R),V>D&&(V=D),0===V)break e;O.set(I.subarray(C,C+V),B),R-=V,C+=V,D-=V,B+=V,r.length-=V;break}r.mode=w;break;case 16196:for(;U<14;){if(0===R)break e;R--,N+=I[C++]<>>=5,U-=5,r.ndist=1+(31&N),N>>>=5,U-=5,r.ncode=4+(15&N),N>>>=4,U-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=S;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,U-=3}for(;r.have<19;)r.lens[ne[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,te={bits:r.lenbits},X=f(0,r.lens,0,19,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid code lengths set",r.mode=S;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,q=$>>>16&255,W=65535&$,!(G<=U);){if(0===R)break e;R--,N+=I[C++]<>>=G,U-=G,r.lens[r.have++]=W;else{if(16===W){for(re=G+2;U>>=G,U-=G,0===r.have){e.msg="invalid bit length repeat",r.mode=S;break}Z=r.lens[r.have-1],V=3+(3&N),N>>>=2,U-=2}else if(17===W){for(re=G+3;U>>=G,U-=G,Z=0,V=3+(7&N),N>>>=3,U-=3}else{for(re=G+7;U>>=G,U-=G,Z=0,V=11+(127&N),N>>>=7,U-=7}if(r.have+V>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=S;break}for(;V--;)r.lens[r.have++]=Z}}if(r.mode===S)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=S;break}if(r.lenbits=9,te={bits:r.lenbits},X=f(1,r.lens,0,r.nlen,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid literal/lengths set",r.mode=S;break}if(r.distbits=6,r.distcode=r.distdyn,te={bits:r.distbits},X=f(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,te),r.distbits=te.bits,X){e.msg="invalid distances set",r.mode=S;break}if(r.mode=_,t===c)break e;case _:r.mode=k;case k:if(R>=6&&D>=258){e.next_out=B,e.avail_out=D,e.next_in=C,e.avail_in=R,r.hold=N,r.bits=U,o(e,z),B=e.next_out,O=e.output,D=e.avail_out,C=e.next_in,I=e.input,R=e.avail_in,N=r.hold,U=r.bits,r.mode===w&&(r.back=-1);break}for(r.back=0;$=r.lencode[N&(1<>>24,q=$>>>16&255,W=65535&$,!(G<=U);){if(0===R)break e;R--,N+=I[C++]<>Q)],G=$>>>24,q=$>>>16&255,W=65535&$,!(Q+G<=U);){if(0===R)break e;R--,N+=I[C++]<>>=Q,U-=Q,r.back+=Q}if(N>>>=G,U-=G,r.back+=G,r.length=W,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=w;break}if(64&q){e.msg="invalid literal/length code",r.mode=S;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(re=r.extra;U>>=r.extra,U-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;$=r.distcode[N&(1<>>24,q=$>>>16&255,W=65535&$,!(G<=U);){if(0===R)break e;R--,N+=I[C++]<>Q)],G=$>>>24,q=$>>>16&255,W=65535&$,!(Q+G<=U);){if(0===R)break e;R--,N+=I[C++]<>>=Q,U-=Q,r.back+=Q}if(N>>>=G,U-=G,r.back+=G,64&q){e.msg="invalid distance code",r.mode=S;break}r.offset=W,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(re=r.extra;U>>=r.extra,U-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=S;break}r.mode=16204;case 16204:if(0===D)break e;if(V=z-D,r.offset>V){if(V=r.offset-V,V>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=S;break}V>r.wnext?(V-=r.wnext,H=r.wsize-V):H=r.wnext-V,V>r.length&&(V=r.length),K=r.window}else K=O,H=B-r.offset,V=r.length;V>D&&(V=D),D-=V,r.length-=V;do{O[B++]=K[H++]}while(--V);0===r.length&&(r.mode=k);break;case 16205:if(0===D)break e;O[B++]=r.length,D--,r.mode=k;break;case T:if(r.wrap){for(;U<32;){if(0===R)break e;R--,N|=I[C++]<{if(M(e))return h;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(M(e))return h;const r=e.state;return 0==(2&r.wrap)?h:(r.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let i,o,f;return M(e)?h:(i=e.state,0!==i.wrap&&i.mode!==v?h:i.mode===v&&(o=1,o=n(o,t,r,0),o!==i.check)?p:(f=F(e,t,r,r),f?(i.mode=x,y):(i.havedict=1,u)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},9241:e=>{"use strict";const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),i=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),o=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,f,a,s,c,u,l,d)=>{const h=d.bits;let p,y,b,g,m,v,w=0,A=0,E=0,_=0,k=0,T=0,S=0,x=0,P=0,I=0,M=null;const O=new Uint16Array(16),C=new Uint16Array(16);let B,R,D,N=null;for(w=0;w<=t;w++)O[w]=0;for(A=0;A=1&&0===O[_];_--);if(k>_&&(k=_),0===_)return c[u++]=20971520,c[u++]=20971520,d.bits=1,0;for(E=1;E<_&&0===O[E];E++);for(k0&&(0===e||1!==_))return-1;for(C[1]=0,w=1;w852||2===e&&P>592)return 1;for(;;){B=w-S,l[A]+1=v?(R=N[l[A]-v],D=M[l[A]-v]):(R=96,D=0),p=1<>S)+y]=B<<24|R<<16|D|0}while(0!==y);for(p=1<>=1;if(0!==p?(I&=p-1,I+=p):I=0,A++,0==--O[w]){if(w===_)break;w=f[a+l[A]]}if(w>k&&(I&g)!==b){for(0===S&&(S=k),m+=E,T=w-S,x=1<852||2===e&&P>592)return 1;b=I&g,c[b]=k<<24|T<<16|m-u|0}}return 0!==I&&(c[m+I]=w-S<<24|64<<16|0),d.bits=k,0}},48898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},10342:e=>{"use strict";function t(e){let t=e.length;for(;--t>=0;)e[t]=0}const r=256,n=286,i=30,o=15,f=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=new Array(576);t(u);const l=new Array(60);t(l);const d=new Array(512);t(d);const h=new Array(256);t(h);const p=new Array(29);t(p);const y=new Array(i);function b(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let g,m,v;function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(y);const A=e=>e<256?d[e]:d[256+(e>>>7)],E=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},_=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{_(e,r[2*t],r[2*t+1])},T=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},S=(e,t,r)=>{const n=new Array(16);let i,f,a=0;for(i=1;i<=o;i++)a=a+r[i-1]<<1,n[i]=a;for(f=0;f<=t;f++){let t=e[2*f+1];0!==t&&(e[2*f]=T(n[t]++,t))}},x=e=>{let t;for(t=0;t{e.bi_valid>8?E(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},I=(e,t,r,n)=>{const i=2*t,o=2*r;return e[i]{const n=e.heap[r];let i=r<<1;for(;i<=e.heap_len&&(i{let i,o,s,c,u=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+u++],i+=(255&e.pending_buf[e.sym_buf+u++])<<8,o=e.pending_buf[e.sym_buf+u++],0===i?k(e,o,t):(s=h[o],k(e,s+r+1,t),c=f[s],0!==c&&(o-=p[s],_(e,o,c)),i--,s=A(i),k(e,s,n),c=a[s],0!==c&&(i-=y[s],_(e,i,c)))}while(u{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,f=t.stat_desc.elems;let a,s,c,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)M(e,r,a);c=f;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[2*c]=r[2*a]+r[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[2*a+1]=r[2*s+1]=c,e.heap[1]=c++,M(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,f=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let u,l,d,h,p,y,b=0;for(h=0;h<=o;h++)e.bl_count[h]=0;for(r[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)l=e.heap[u],h=r[2*r[2*l+1]+1]+1,h>c&&(h=c,b++),r[2*l+1]=h,l>n||(e.bl_count[h]++,p=0,l>=s&&(p=a[l-s]),y=r[2*l],e.opt_len+=y*(h+p),f&&(e.static_len+=y*(i[2*l+1]+p)));if(0!==b){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,b-=2}while(b>0);for(h=c;0!==h;h--)for(l=e.bl_count[h];0!==l;)d=e.heap[--u],d>n||(r[2*d+1]!==h&&(e.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),l--)}})(e,t),S(r,u,e.bl_count)},B=(e,t,r)=>{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=f,f=t[2*(n+1)+1],++a{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),n=0;n<=r;n++)if(i=f,f=t[2*(n+1)+1],!(++a{_(e,0+(n?1:0),3),P(e),E(e,r),E(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};e.exports._tr_init=e=>{D||((()=>{let e,t,r,c,w;const A=new Array(16);for(r=0,c=0;c<28;c++)for(p[c]=r,e=0;e<1<>=7;c{let o,f,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t{let t;for(B(e,e.dyn_ltree,e.l_desc.max_code),B(e,e.dyn_dtree,e.d_desc.max_code),C(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=o&&(o=f)):o=f=n+5,n+4<=o&&-1!==t?N(e,t,n,i):4===e.strategy||f===o?(_(e,2+(i?1:0),3),O(e,u,l)):(_(e,4+(i?1:0),3),((e,t,r,n)=>{let i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(h[n]+r+1)]++,e.dyn_dtree[2*A(t)]++),e.sym_next===e.sym_end),e.exports._tr_align=e=>{_(e,2,3),k(e,256,u),(e=>{16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},62292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},34155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function f(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,s=[],c=!1,u=-1;function l(){c&&a&&(c=!1,a.length?s=a.concat(s):u=-1,s.length&&d())}function d(){if(!c){var e=f(l);c=!0;for(var t=s.length;t;){for(a=s,s=[];++u1)for(var r=1;r{"use strict";var n=r(48764).lW;class i{static isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e).slice().buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){const r=i.toUint8Array(e),n=i.toUint8Array(t);if(r.length!==n.byteLength)return!1;for(let e=0;e{"use strict";var n=r(25972).functionsHaveConfigurableNames(),i=Object,o=TypeError;e.exports=function(){if(null!=this&&this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e},n&&Object.defineProperty&&Object.defineProperty(e.exports,"name",{value:"get flags"})},2847:(e,t,r)=>{"use strict";var n=r(4289),i=r(55559),o=r(53697),f=r(71721),a=r(32753),s=i(f());n(s,{getPolyfill:f,implementation:o,shim:a}),e.exports=s},71721:(e,t,r)=>{"use strict";var n=r(53697),i=r(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;e.exports=function(){if(i&&"gim"===/a/gim.flags){var e=o(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(r,"sticky",{get:function(){t+="y"}}),"dy"===t)return e.get}}return n}},32753:(e,t,r)=>{"use strict";var n=r(4289).supportsDescriptors,i=r(71721),o=Object.getOwnPropertyDescriptor,f=Object.defineProperty,a=TypeError,s=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!n||!s)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=s(c),r=o(t,"flags");return r&&r.get===e||f(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},79246:(e,t,r)=>{"use strict";var n=r(21924),i=r(40210),o=r(98420),f=n("RegExp.prototype.exec"),a=i("%TypeError%");e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==f(e,t)}}},17635:function(e){"use strict";!function(t){const r=2147483647;function n(e){const t=new Uint32Array([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]);let r=1779033703,n=3144134277,i=1013904242,o=2773480762,f=1359893119,a=2600822924,s=528734635,c=1541459225;const u=new Uint32Array(64);function l(e){let l=0,d=e.length;for(;d>=64;){let h,p,y,b,g,m=r,v=n,w=i,A=o,E=f,_=a,k=s,T=c;for(p=0;p<16;p++)y=l+4*p,u[p]=(255&e[y])<<24|(255&e[y+1])<<16|(255&e[y+2])<<8|255&e[y+3];for(p=16;p<64;p++)h=u[p-2],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=u[p-15],g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,u[p]=(b+u[p-7]|0)+(g+u[p-16]|0)|0;for(p=0;p<64;p++)b=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&_^~E&k)|0)+(T+(t[p]+u[p]|0)|0)|0,g=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&v^m&w^v&w)|0,T=k,k=_,_=E,E=A+b|0,A=w,w=v,v=m,m=b+g|0;r=r+m|0,n=n+v|0,i=i+w|0,o=o+A|0,f=f+E|0,a=a+_|0,s=s+k|0,c=c+T|0,l+=64,d-=64}}l(e);let d,h=e.length%64,p=e.length/536870912|0,y=e.length<<3,b=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),d=h+1;d>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),l(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);const i=64+t.length+4,o=new Array(i),f=new Array(64);let a,s=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)c(),s=s.concat(n(f.concat(n(o)))),r-=32;return r>0&&(c(),s=s.concat(n(f.concat(n(o))).slice(0,r))),s}function o(e,t,r,n,i){let o;for(c(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),c(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){c(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=f(t[0]+t[12],7),t[8]^=f(t[4]+t[0],9),t[12]^=f(t[8]+t[4],13),t[0]^=f(t[12]+t[8],18),t[9]^=f(t[5]+t[1],7),t[13]^=f(t[9]+t[5],9),t[1]^=f(t[13]+t[9],13),t[5]^=f(t[1]+t[13],18),t[14]^=f(t[10]+t[6],7),t[2]^=f(t[14]+t[10],9),t[6]^=f(t[2]+t[14],13),t[10]^=f(t[6]+t[2],18),t[3]^=f(t[15]+t[11],7),t[7]^=f(t[3]+t[15],9),t[11]^=f(t[7]+t[3],13),t[15]^=f(t[11]+t[7],18),t[1]^=f(t[0]+t[3],7),t[2]^=f(t[1]+t[0],9),t[3]^=f(t[2]+t[1],13),t[0]^=f(t[3]+t[2],18),t[6]^=f(t[5]+t[4],7),t[7]^=f(t[6]+t[5],9),t[4]^=f(t[7]+t[6],13),t[5]^=f(t[4]+t[7],18),t[11]^=f(t[10]+t[9],7),t[8]^=f(t[11]+t[10],9),t[9]^=f(t[8]+t[11],13),t[10]^=f(t[9]+t[8],18),t[12]^=f(t[15]+t[14],7),t[13]^=f(t[12]+t[15],9),t[14]^=f(t[13]+t[12],13),t[15]^=f(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function s(e,t,r,n){for(let i=0;i=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,t,n,f,a,d,h){if(n=l(n,"N"),f=l(f,"r"),a=l(a,"p"),d=l(d,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>r/128/f)throw new Error("N too large");if(f>r/128/a)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let p=i(e,t,128*a*f);const y=new Uint32Array(32*a*f);for(let e=0;eI&&(t=I);for(let e=0;eI&&(t=I);for(let e=0;e>0&255),p.push(y[e]>>8&255),p.push(y[e]>>16&255),p.push(y[e]>>24&255);const r=i(e,p,d);return h&&h(null,1,r),r}h&&M(O)};if(!h)for(;;){const e=O();if(null!=e)return e}O()}const h={scrypt:function(e,t,r,n,i,o,f){return new Promise((function(a,s){let c=0;f&&f(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)s(e);else if(r)f&&1!==c&&f(1),a(new Uint8Array(r));else if(f&&t!==c)return c=t,f(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=h}()},37478:(e,t,r)=>{"use strict";var n=r(40210),i=r(21924),o=r(70631),f=n("%TypeError%"),a=n("%WeakMap%",!0),s=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),l=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new f("Side channel does not contain "+o(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(s){if(t)return d(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return l(e,n)}else if(s){if(t)return p(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,i){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),u(e,n,i)):s?(t||(t=new s),h(t,n,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,i))}};return n}},19505:(e,t,r)=>{"use strict";var n=r(13832),i=r(65537),o=r(23555),f=r(15728),a=r(70294),s=r(11897),c=r(21924),u=r(41405)(),l=r(2847),d=c("String.prototype.indexOf"),h=r(46966),p=function(e){var t=h();if(u&&"symbol"==typeof Symbol.matchAll){var r=o(e,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==t?t:r}if(f(e))return t};e.exports=function(e){var t=s(this);if(null!=e){if(f(e)){var r="flags"in e?i(e,"flags"):l(e);if(s(r),d(a(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(e);if(void 0!==o)return n(o,e,[t])}var c=a(t),u=new RegExp(e,"g");return n(p(u),u,[c])}},94956:(e,t,r)=>{"use strict";var n=r(55559),i=r(4289),o=r(19505),f=r(83447),a=r(42376),s=n(o);i(s,{getPolyfill:f,implementation:o,shim:a}),e.exports=s},46966:(e,t,r)=>{"use strict";var n=r(41405)(),i=r(27201);e.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:i}},83447:(e,t,r)=>{"use strict";var n=r(19505);e.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(e){return String.prototype.matchAll}return n}},27201:(e,t,r)=>{"use strict";var n=r(57257),i=r(65537),o=r(40892),f=r(53582),a=r(82313),s=r(70294),c=r(37858),u=r(2847),l=r(21924)("String.prototype.indexOf"),d=RegExp,h="flags"in RegExp.prototype,p=function(e){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var r=s(e),p=function(e,t){var r="flags"in t?i(t,"flags"):s(u(t));return{flags:r,matcher:new e(h&&"string"==typeof r?t:e===d?t.source:t,r)}}(f(t,d),t),y=p.flags,b=p.matcher,g=a(i(t,"lastIndex"));o(b,"lastIndex",g,!0);var m=l(y,"g")>-1,v=l(y,"u")>-1;return n(b,r,m,v)},y=Object.defineProperty,b=Object.getOwnPropertyDescriptor;if(y&&b){var g=b(p,"name");g&&g.configurable&&y(p,"name",{value:"[Symbol.matchAll]"})}e.exports=p},42376:(e,t,r)=>{"use strict";var n=r(4289),i=r(41405)(),o=r(83447),f=r(46966),a=Object.defineProperty,s=Object.getOwnPropertyDescriptor;e.exports=function(){var e=o();if(n(String.prototype,{matchAll:e},{matchAll:function(){return String.prototype.matchAll!==e}}),i){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),a&&s){var r=s(Symbol,t);r&&!r.configurable||a(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=f(),u={};u[t]=c;var l={};l[t]=function(){return RegExp.prototype[t]!==c},n(RegExp.prototype,u,l)}return e}},40337:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});var n=function(){function e(e){this.client=e}return e.prototype.saveProof=function(t,r){var n=this.getProofs();r?(n[this.getFullKey(t)]=r,localStorage.setItem(e.STORAGE_KEY,JSON.stringify(n))):this.deleteProof(t)},e.prototype.getSavedProof=function(e){var t=this.getProofs(),r=this.getFullKey(e);return t[r]?t[r]:null},e.prototype.deleteProof=function(t){var r=this.getProofs(),n=this.getFullKey(t);r[n]&&delete r[n],localStorage.setItem(e.STORAGE_KEY,JSON.stringify(r))},e.prototype.getFullKey=function(e){return this.TYPE+"-"+e.toLowerCase()},e.prototype.getProofs=function(){var t=localStorage.getItem(e.STORAGE_KEY);return t&&t.length?JSON.parse(t):{}},e.STORAGE_KEY="tn-proof",e}()},39678:(e,t,r)=>{"use strict";r.d(t,{KU:()=>Bt,XF:()=>It,ct:()=>Mt,kS:()=>Pt});var n=r(43803),i=r(30838),o=r(39896),f=r(37982),a=r(67890),s=r(82707),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},h=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i-1){s=(null==i?void 0:i.viewTransition)+"-tn",u=this.viewContainer;var l=document.createElement("div");this.transitionContainer.classList.add(s),l.classList.add("view-content-tn"),"slide-in-left-tn"===s||"slide-in-top-tn"===s?this.transitionContainer.prepend(l):this.transitionContainer.appendChild(l),this.viewContainer=l}i.componentIsFactory?this.currentView=e(this.client,this,this.viewContainer,{options:this.options,viewOptions:i,data:t}):this.currentView=new e(this.client,this,this.viewContainer,{options:this.options,viewOptions:i,data:t}),this.currentView.render(),s&&(setTimeout((function(){u.remove(),n.transitionContainer.classList.remove("slide-in",s)}),300),this.transitionContainer.classList.add("slide-in")),this.client.eventSender("view-changed",{viewName:f,data:t})}else(0,o.kg)(3,"Element .view-content-tn not found: popup not initialized")},e.prototype.viewIsNotStart=function(){return!this.isStartView},e.prototype.getCustomUserError=function(e){var t=e;return e&&e.contains&&e.contains("Failed to read the 'localStorage'")&&(t="Please enable cookies in your browser to use this feature or try a different browser."),t},e.prototype.showError=function(e,t){var r=this;if(void 0===t&&(t=!0),this.cancelDelayedLoader(),"string"!=typeof e){if(e.name===It.USER_ABORT)return this.dismissLoader();e=e.message?e.message:e.toString()}else if(e===It.USER_ABORT)return this.dismissLoader();this.loadContainer.querySelector(".loader-tn").style.display="none",this.retryButton.style.display="block";var n=this.getCustomUserError(e);(this.loadContainer.querySelector(".loader-msg-tn").innerHTML='

'.concat(n,"

"),this.loadContainer.style.display="flex",t)||(this.loadContainer.querySelector(".dismiss-error-tn").style.display="none");setTimeout((function(){r.setForceToOpen(!1)}),0)},e.prototype.setErrorRetryCallback=function(e){this.retryCallback=e,this.retryButton.innerText="Retry"},e.prototype.showLoaderDelayed=function(e,t,r){var n=this;void 0===r&&(r=!1),this.loadTimer&&clearTimeout(this.loadTimer),this.loadTimer=setTimeout((function(){n.showLoader.apply(n,h([],d(e),!1)),r&&n.openOverlay()}),t)},e.prototype.cancelDelayedLoader=function(){this.loadTimer&&(clearTimeout(this.loadTimer),this.loadTimer=null)},e.prototype.showLoader=function(){for(var e=[],t=0;t\n\t\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t',e.FAB_BUTTON_HTML='\n\t\t\n\t',e}(),y=r(94043),b=["evm","polygon","optimism","bsc","avalanche","fantom","goerli","mumbai","arbitrum"],g=function(e){if(""===e){return(0,o.Po)("You did not specify 'blockchain', the default value is evm. Check our github to see supported values.","warning",null,null),"evm"}if("solana"===e)return"solana";if("evm"===e)return"evm";if("flow"===e)return"flow";if("ultra"===e)return"ultra";if(b.includes(e.toLowerCase()))return(0,o.Po)("We recommend you to set `blockchain` as 'evm'.","warning",null,null),"evm";return(0,o.Po)("You set unsupported `blockchain` in the constructor. Check our github to see supported values.","error",null,null),e},m=r(28316),v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},w=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,f=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return f=e.done,e},e:function(e){a=!0,o=e},f:function(){try{f||null==r.return||r.return()}finally{if(a)throw o}}}}var X="function"==typeof queueMicrotask?queueMicrotask:function(e){return(H||(H=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},$="INIT",ee="SUBSCRIBE",te="UNSUBSCRIBE",re="TERMINATE",ne="object"===("undefined"==typeof self?"undefined":N(self))&&self.self===self&&self||"object"===(void 0===r.g?"undefined":N(r.g))&&r.g.global===r.g&&r.g||"object"===("undefined"==typeof window?"undefined":N(window))&&window.window===window&&window;ne.FCL_REGISTRY=null==ne.FCL_REGISTRY?{}:ne.FCL_REGISTRY;var ie,oe=0,fe=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(i,o){var f=n.expectReply||!1,a=null!=n.timeout?n.timeout:5e3;f&&a&&setTimeout((function(){return o(new Error("Timeout: ".concat(a,"ms passed without a response.")))}),a);var s={to:e,from:n.from,tag:t,data:r,timeout:a,reply:i,reject:o};try{ne.FCL_REGISTRY[e]&&ne.FCL_REGISTRY[e].mailbox.deliver(s),f||i(!0)}catch(t){console.error("FCL.Actor -- Could Not Deliver Message",s,ne.FCL_REGISTRY[e],t)}}))},ae=function(e){delete ne.FCL_REGISTRY[e]},se=function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==n&&(n=++oe),null!=ne.FCL_REGISTRY[n])return n;ne.FCL_REGISTRY[n]={addr:n,mailbox:(r=[],{deliver:function(e){return V(G().mark((function n(){return G().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r.push(e),t&&(t(r.shift()),t=void 0);case 2:case"end":return n.stop()}}),n)})))()},receive:function(){return new Promise((function(e){var n=r.shift();if(n)return e(n);t=e}))}}),subs:new Set,kvs:{},error:null};var i={self:function(){return n},receive:function(){return ne.FCL_REGISTRY[n].mailbox.receive()},send:function(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i.from=n,fe(e,t,r,i)},sendSelf:function(e,t,r){ne.FCL_REGISTRY[n]&&fe(n,e,t,r)},broadcast:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.from=n;var i,o=Z(ne.FCL_REGISTRY[n].subs);try{for(o.s();!(i=o.n()).done;){var f=i.value;fe(f,e,t,r)}}catch(e){o.e(e)}finally{o.f()}},subscribe:function(e){return null!=e&&ne.FCL_REGISTRY[n].subs.add(e)},unsubscribe:function(e){return null!=e&&ne.FCL_REGISTRY[n].subs.delete(e)},subscriberCount:function(){return ne.FCL_REGISTRY[n].subs.size},hasSubs:function(){return!!ne.FCL_REGISTRY[n].subs.size},put:function(e,t){null!=e&&(ne.FCL_REGISTRY[n].kvs[e]=t)},get:function(e,t){var r=ne.FCL_REGISTRY[n].kvs[e];return null==r?t:r},delete:function(e){delete ne.FCL_REGISTRY[n].kvs[e]},update:function(e,t){null!=e&&(ne.FCL_REGISTRY[n].kvs[e]=t(ne.FCL_REGISTRY[n].kvs[e]))},keys:function(){return Object.keys(ne.FCL_REGISTRY[n].kvs)},all:function(){return ne.FCL_REGISTRY[n].kvs},where:function(e){return Object.keys(ne.FCL_REGISTRY[n].kvs).reduce((function(t,r){return e.test(r)?Y(Y({},t),{},Q({},r,ne.FCL_REGISTRY[n].kvs[r])):t}),{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach((function(t){return ne.FCL_REGISTRY[n].kvs[t]=e[t]}))},fatalError:function(e){ne.FCL_REGISTRY[n].error=e;var t,r=Z(ne.FCL_REGISTRY[n].subs);try{for(r.s();!(t=r.n()).done;){var i=t.value;fe(i,"UPDATED")}}catch(e){r.e(e)}finally{r.f()}}};return"object"===N(e)&&(e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var t=V(G().mark((function t(r){var n;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof e[$]){t.next=3;break}return t.next=3,e[$](r);case 3:return t.next=6,r.receive();case 6:if(n=t.sent,t.prev=7,"EXIT"!==n.tag){t.next=13;break}if("function"!=typeof e[re]){t.next=12;break}return t.next=12,e[re](r,n,n.data||{});case 12:return t.abrupt("break",25);case 13:return t.next=15,e[n.tag](r,n,n.data||{});case 15:t.next=20;break;case 17:t.prev=17,t.t0=t.catch(7),console.error("".concat(r.self()," Error"),n,t.t0);case 20:return t.prev=20,t.abrupt("continue",3);case 23:t.next=3;break;case 25:case"end":return t.stop()}}),t,null,[[7,17,20,23]])})));return function(e){return t.apply(this,arguments)}}()}(e)),X(V(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(i);case 2:ae(n);case 3:case"end":return t.stop()}}),t)})))),n};var ce="config",ue="PUT_CONFIG",le="GET_CONFIG",de="GET_ALL_CONFIG",he="UPDATE_CONFIG",pe="DELETE_CONFIG",ye="CLEAR_CONFIG",be="WHERE_CONFIG",ge="CONFIG/UPDATED",me=function(e){return e},ve=(Q(ie={},ue,(function(e,t,r){var n=r.key,i=r.value;if(null==n)throw new Error("Missing 'key' for config/put.");e.put(n,i),e.broadcast(ge,Y({},e.all()))})),Q(ie,le,(function(e,t,r){var n=r.key,i=r.fallback;if(null==n)throw new Error("Missing 'key' for config/get");t.reply(e.get(n,i))})),Q(ie,de,(function(e,t){t.reply(Y({},e.all()))})),Q(ie,he,(function(e,t,r){var n=r.key,i=r.fn;if(null==n)throw new Error("Missing 'key' for config/update");e.update(n,i||me),e.broadcast(ge,Y({},e.all()))})),Q(ie,pe,(function(e,t,r){var n=r.key;if(null==n)throw new Error("Missing 'key' for config/delete");e.delete(n),e.broadcast(ge,Y({},e.all()))})),Q(ie,ye,(function(e,t){for(var r=0,n=Object.keys(e.all());r1?a[1]:void 0,(t=a.length>0&&void 0!==a[0]?a[0]:[]).length){e.next=4;break}return e.abrupt("return",r);case 4:return n=q(t),i=n[0],o=n.slice(1),e.next=7,Ae(i);case 7:if(null!=(f=e.sent)){e.next=10;break}return e.abrupt("return",Ee(o,r));case 10:return e.abrupt("return",f);case 11:case"end":return e.stop()}}),e)}))),_e.apply(this,arguments)}function ke(){return fe(ce,de,null,{expectReply:!0,timeout:10})}function Te(e){return fe(ce,he,{key:e,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:me}),Me()}function Se(e){return fe(ce,pe,{key:e}),Me()}function xe(e){return fe(ce,be,{pattern:e},{expectReply:!0,timeout:10})}function Pe(e){return function(e,t,r){t(e);var n="@EXIT",i=se(function(){var t=V(G().mark((function t(i){var o,f;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.send(e,ee);case 1:return t.next=4,i.receive();case 4:if(o=t.sent,f=ne.FCL_REGISTRY[e].error,o.tag!==n){t.next=9;break}return i.send(e,te),t.abrupt("return");case 9:if(!f){t.next=13;break}return r(null,f),i.send(e,te),t.abrupt("return");case 13:r(o.data,null),t.next=1;break;case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());return function(){return fe(i,n)}}(ce,(function(){return se(ve,ce)}),e)}function Ie(e){return fe(ce,ye).then(Me(e))}function Me(e){return null!=e&&"object"===N(e)&&Object.keys(e).map((function(t){return we(t,e[t])})),{put:we,get:Ae,all:ke,first:Ee,update:Te,delete:Se,where:xe,subscribe:Pe,overload:Ce}}se(ve,ce),Me.put=we,Me.get=Ae,Me.all=ke,Me.first=Ee,Me.update=Te,Me.delete=Se,Me.where=xe,Me.subscribe=Pe,Me.overload=Ce;var Oe=function(e){return e};function Ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe;return new Promise(function(){var r=V(G().mark((function r(n,i){var o,f;return G().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ke();case 2:return o=r.sent,r.prev=3,Me(e),r.t0=t,r.next=8,ke();case 8:return r.t1=r.sent,r.next=11,(0,r.t0)(r.t1);case 11:return f=r.sent,r.next=14,Ie(o);case 14:n(f),r.next=22;break;case 17:return r.prev=17,r.t2=r.catch(3),r.next=21,Ie(o);case 21:i(r.t2);case 22:case"end":return r.stop()}}),r,null,[[3,17]])})));return function(e,t){return r.apply(this,arguments)}}())}var Be=Object.freeze({debug:5,info:4,log:3,warn:2,error:1}),Re=function(e){var t=e.title,r=e.message;return["\n %c".concat(t,"\n ============================\n\n ").concat(r,"\n\n ============================\n ").replace(/\n[^\S\r\n]+/g,"\n").trim(),,"font-weight:bold;font-family:monospace;"]},De=function(){var e=V(G().mark((function e(t){var r,n,i,o,f,a,s,c,u,l,d,h;return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.title,s=t.message,c=t.level,u=t.always,l=void 0!==u&&u,e.next=3,Me.get("logger.level",Be.warn);case 3:if(d=e.sent,l||!(d8)&&Ke("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(t[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),t[1]=t[1].padEnd(8,"0"),{type:"UFix64",value:e=t.join(".")}}if(ze(e))return qe(),{type:"UFix64",value:e.toString()};Ke("Expected String for UFix64")}),(function(e){return e})),Le("Fix64",(function(e){if(He(e)){var t=e.split(".");return 2!==t.length&&Ke("Expected one decimal but found ".concat(t.length," in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),(0==t[1].length||t[1].length>8)&&Ke("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(t[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),t[1]=t[1].padEnd(8,"0"),{type:"Fix64",value:e=t.join(".")}}if(ze(e))return qe(),{type:"Fix64",value:e.toString()};Ke("Expected String for Fix64")}),(function(e){return e})),Le("String",(function(e){if(He(e))return{type:"String",value:e};Ke("Expected String for type String")}),(function(e){return e}))),Qe=(Le("Character",(function(e){if(He(e))return{type:"Character",value:e};Ke("Expected Character for type Character")}),(function(e){return e})),Le("Bool",(function(e){if("boolean"==typeof e)return{type:"Bool",value:e};Ke("Expected Boolean for type Bool")}),(function(e){return e})),Le("Address",(function(e){if(He(e))return{type:"Address",value:e};Ke("Expected Address for type Address")}),(function(e){return e}))),Je=(Le("Void",(function(e){if(!e||je(e))return{type:"Void"};Ke("Expected Void for type Void")}),(function(e){return e})),Le("Reference",(function(e){if(Fe(e))return{type:"Reference",value:e};Ke("Expected Object for type Reference")}),(function(e){return e})),Le("Path",(function(e){if(Fe(e))return He(e.domain)||Ke("Expected a string for the Path domain but found ".concat(e.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),"storage"!==e.domain&&"private"!==e.domain&&"public"!==e.domain&&Ke('Expected either "storage", "private" or "public" as the Path domain but found '.concat(e.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),He(e.identifier)||Ke("Expected a string for the Path identifier but found ".concat(e.identifier,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),{type:"Path",value:{domain:e.domain,identifier:e.identifier}};Ke("Expected Object for type Path")}),(function(e){return e})),r(97688)),Ye=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Ze=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},Xe=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1] 0 {\n let accountKey = account.keys.get(keyIndex: Int(keyNumber - 1)) ?? panic("This keyIndex does not exist in this account")\n let key = accountKey.publicKey\n if key.verify(\n signature: sig, \n signedData: msg, \n domainSeparationTag: "FLOW-V0.0-user", \n hashAlgorithm: HashAlgorithm.SHA3_256\n ) {\n res = true\n break\n }\n keyNumber = keyNumber - 1\n }\n return res\n }\n '],['\n pub fun main(address: Address, sig: String, msg: String): Bool {\n let account = getAccount(address)\n let sig = sig.decodeHex()\n let msg = msg.decodeHex()\n let isValid = false\n var keyNumber = account.keys.count\n var res: Bool = false\n while keyNumber > 0 {\n let accountKey = account.keys.get(keyIndex: Int(keyNumber - 1)) ?? panic("This keyIndex does not exist in this account")\n let key = accountKey.publicKey\n if key.verify(\n signature: sig, \n signedData: msg, \n domainSeparationTag: "FLOW-V0.0-user", \n hashAlgorithm: HashAlgorithm.SHA3_256\n ) {\n res = true\n break\n }\n keyNumber = keyNumber - 1\n }\n return res\n }\n ']))),n.args([n.arg(e.address,Qe),n.arg(e.signature,We),n.arg((0,o.XI)(e.messageToSign),We)])]).then(n.decode)];case 6:return a.sent()?[2,!0]:[3,8];case 7:return a.sent(),console.log("Flow address recover error"),[3,8];case 8:return[2,!1];case 9:if(e.blockchain&&"evm"!==e.blockchain)throw new Error('Blockchain "'.concat(e.blockchain,'" not supported'));if(i=C.r(e.messageToSign),f=B.arrayify(i),R.recoverAddress(f,e.signature).toLowerCase()===e.address.toLowerCase())return[2,!0];a.label=10;case 10:return[2,!1]}}))}))},e.validateChallenge=function(e,t){return Ze(this,void 0,void 0,(function(){return Xe(this,(function(r){switch(r.label){case 0:return[4,fetch(e,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(t)})];case 1:return[4,r.sent().json()];case 2:return[2,r.sent().address]}}))}))},e.DEFAULT_ENDPOINT="https://api.smarttokenlabs.com/un",e.COMMON_API_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZWN0IjoidG9rZW4tbmVnb3RpYXRvciIsImlhdCI6MTY4OTc1NzQ4Nn0.ELE1OVvVFY1yrWlbnxtQur6dgeVxmKlPb9LZ_8cMOs8",e}(),et=(Ue=function(e,t){return Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Ue(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ue(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),tt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},rt=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};"undefined"!=typeof window&&(window.tn={VERSION:"3.0.2"});var Pt,It,Mt,Ot="This browser is not supported. Please try using Chrome, Edge, FireFox or Safari.",Ct={type:"active",issuers:[],uiOptions:{uiType:"popup",containerElement:".overlay-tn",openingHeading:"Open a new world of perks, benefits and opportunities with your attestation, collectible or token.",issuerHeading:"Detected tokens",autoPopup:!0,position:"bottom-right",alwaysShowStartScreen:!1},autoLoadTokens:!0,autoEnableTokens:!0,messagingForceTab:!1,tokenPersistenceTTL:600,unSupportedUserAgent:{authentication:{config:{},errorMessage:Ot},full:{config:{iE:!0,iE9:!0},errorMessage:Ot}}};!function(e){e[e.ISSUERS_LOADING=0]="ISSUERS_LOADING",e[e.ISSUERS_LOADED=1]="ISSUERS_LOADED",e[e.WALLET_DISCONNECTED=2]="WALLET_DISCONNECTED"}(Pt||(Pt={})),function(e){e.POPUP_BLOCKED="POPUP_BLOCKED",e.USER_ABORT="USER_ABORT"}(It||(It={})),function(e){e.POPUP_BLOCKED="Please add an exception to your popup blocker before continuing.",e.USER_ABORT="The user aborted the process."}(Mt||(Mt={}));var Bt=function(){function e(e){var t,r;if(this.clientCallBackEvents={},this.uiUpdateCallbacks=((t={})[Pt.ISSUERS_LOADING]=void 0,t[Pt.ISSUERS_LOADED]=void 0,t[Pt.WALLET_DISCONNECTED]=void 0,t),this.cancelAutoload=!0,window.location.hash){this.urlParams=new URLSearchParams(window.location.hash.substring(1));var i=this.getDataFromQuery("action");(0,o.kg)(2,'Client() fired. Action = "'.concat(i,'"')),this.removeCallbackParamsFromUrl()}else this.urlParams=new URLSearchParams;this.config=this.mergeConfig(Ct,e),this.tokenStore=new f.W(this.config.autoEnableTokens,this.config.tokenPersistenceTTL),(null===(r=this.config.issuers)||void 0===r?void 0:r.length)>0&&this.tokenStore.updateIssuers(this.config.issuers),this.messaging=new n.sT}return e.prototype.handleRecievedRedirectMessages=function(){var e=this,t=this.getDataFromQuery("issuer"),r=this.getDataFromQuery("error"),n=this.getDataFromQuery("type");if("USER_ABORT"===r&&"offchain-issuer-connection"===n){var i=new Error(r);return i.name="USER_ABORT",(0,o.Po)("issuer denied connection with off chain issuer","error",(function(){return e.eventSender("error",{issuer:t,error:i})}),null,!0,!1),i}return null},e.prototype.getDataFromQuery=function(e){return this.urlParams?this.urlParams.get(_t.ss+e):null},e.prototype.readProofCallback=function(){return Tt(this,void 0,void 0,(function(){var e,t;return St(this,(function(r){return this.getDataFromQuery?(e=this.getDataFromQuery("action"),t=this.getDataFromQuery("multi-token"),"proof-callback"!==e?[2,!1]:("true"!==t?this.readProofCallbackLegacy():this.readProofCallbackMultiToken(),[2])):[2,!1]}))}))},e.prototype.readProofCallbackMultiToken=function(){return Tt(this,void 0,void 0,(function(){var e,t,r,n,i,o,f,a,s,c,u,l,d;return St(this,(function(h){switch(h.label){case 0:for(i in e=JSON.parse(this.getDataFromQuery("tokens")),t=this.getDataFromQuery("error"),n=[],r=e)n.push(i);o=0,h.label=1;case 1:if(!(o0},e.prototype.getWalletProvider=function(){return Tt(this,void 0,void 0,(function(){var e;return St(this,(function(t){switch(t.label){case 0:return this.web3WalletProvider?[3,2]:[4,Promise.resolve().then(r.bind(r,77035))];case 1:e=t.sent().Web3WalletProvider,this.web3WalletProvider=new e(this,this.config.walletOptions,this.config.safeConnectOptions),t.label=2;case 2:return[2,this.web3WalletProvider]}}))}))},e.prototype.disconnectWallet=function(){return Tt(this,void 0,void 0,(function(){var e;return St(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,this.getWalletProvider()];case 1:return[4,t.sent().deleteConnections()];case 2:return t.sent(),this.tokenStore.clearCachedTokens(),this.eventSender("connected-wallet",null),this.eventSender("disconnected-wallet",null),this.triggerUiUpdateCallback(Pt.WALLET_DISCONNECTED),[3,4];case 3:return e=t.sent(),(0,o.kg)(2,"Failed to disconnect wallet",e),[3,4];case 4:return[2]}}))}))},e.prototype.negotiatorConnectToWallet=function(e){return Tt(this,void 0,void 0,(function(){return St(this,(function(t){switch(t.label){case 0:return[4,this.getWalletProvider()];case 1:return[4,t.sent().connectWith(e)];case 2:return[2,t.sent()]}}))}))},e.prototype.enrichTokenLookupDataOnChainTokens=function(){return Tt(this,void 0,void 0,(function(){var e,t,r,n,i,f,a,s,c;return St(this,(function(u){switch(u.label){case 0:if(!this.getTokenStore().hasOnChainTokens())return this.issuersLoaded=!0,[2];for(n in this.issuersLoaded=!1,this.triggerUiUpdateCallback(Pt.ISSUERS_LOADING),e=this.tokenStore.getCurrentIssuers(!0),r=[],t=e)r.push(n);i=0,u.label=1;case 1:if(!(if.config.autoLoadTokens?[2,"break"]:[2]}}))},f=this,a=this.tokenStore.getCurrentIssuers(),s=[],a)s.push(c);u=0,h.label=1;case 1:return u1)throw new Error("Only a single token origin is supported by batch authentication at this time.");return[2,t]}}))}))},e.prototype.authenticateMultiple=function(e){return Tt(this,void 0,void 0,(function(){var t,r,n,i,f,a,s,c,u,l,d,h,p;return St(this,(function(y){switch(y.label){case 0:return y.trys.push([0,8,,9]),t=!1,this.ui&&this.ui.showLoaderDelayed(["

Authenticating...

","You may need to sign a new challenge in your wallet",""],600,!0),[4,this.getMultiRequestBatch(e)];case 1:for(a in r=y.sent(),n={},i=r.offChain,f=[],i)f.push(a);s=0,y.label=2;case 2:if(!(sAuthenticating...","You may need to sign a new challenge in your wallet",""],600,!0),this.enableAuthCancel(n)),f=e.type?e.type:i.onChain?nt:ht,a=new f(this),l.label=2;case 2:return l.trys.push([2,4,,5]),e.options||(e.options={}),e.options.messagingForceTab=this.config.messagingForceTab,(0,o.kg)(2,"authRequest",e),(0,o.kg)(2,"get proof at ",window.location.href),[4,a.getTokenProof(i,[e.unsignedToken],e)];case 3:return(s=l.sent())?((0,o.kg)(2,"proof received at ",window.location.href),(0,o.kg)(2,"Ticket proof successfully validated."),this.eventSender("token-proof",{data:s.data,error:null,issuer:n}),[3,5]):[2];case 4:return c=l.sent(),(0,o.kg)(2,c),"WALLET_REQUIRED"===c.message?[2,this.handleWalletRequired(e)]:((0,o.Po)(c,"error",(function(){return u.handleProofError(c,n)}),null,!1,!0),[3,5]);case 5:return this.ui&&(this.ui.dismissLoader(),this.ui.closeOverlay()),[2,s.data]}}))}))},e.prototype.enableAuthCancel=function(e){var t=this;(0,o.xI)(".cancel-auth-btn").then((function(r){r.onclick=function(){var r="User cancelled authentication";t.ui.showError(r),t.eventSender("token-proof",{issuer:e,error:r,data:null})}})).catch((function(e){(0,o.kg)(2,e)}))},e.prototype.handleWalletRequired=function(e){return Tt(this,void 0,void 0,(function(){var t=this;return St(this,(function(r){switch(r.label){case 0:return this.ui?(this.ui.dismissLoader(),this.ui.openOverlay(),[3,4]):[3,1];case 1:return[4,this.getWalletProvider()];case 2:return[4,r.sent().connectWith("MetaMask")];case 3:return r.sent(),[2,this.authenticate(e)];case 4:return[2,new Promise((function(r,n){var i={viewTransition:"slide-in-right"};t.ui.updateUI("wallet",{viewName:"wallet",connectCallback:function(){return Tt(t,void 0,void 0,(function(){var t,o;return St(this,(function(f){switch(f.label){case 0:this.ui.updateUI("main",{viewName:"main"},i),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.authenticate(e)];case 2:return t=f.sent(),r(t),[3,4];case 3:return o=f.sent(),n(o),[3,4];case 4:return[2]}}))}))}},i)}))]}}))}))},e.prototype.handleProofError=function(e,t){this.ui&&this.ui.showError(e),this.eventSender("token-proof",{issuer:t,error:e,data:null})},e.prototype.eventSender=function(e,t){return Tt(this,void 0,void 0,(function(){return St(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve(this.on(e,void 0,t))];case 1:return r.sent(),[2]}}))}))},e.prototype.getOutletConfigForCurrentOrigin=function(e){void 0===e&&(e=window.location.origin);var t=this.tokenStore.getCurrentIssuers(!1),r=[];return Object.keys(t).forEach((function(n){var i=t[n];try{new URL(i.tokenOrigin).origin===e&&r.push(i)}catch(e){(0,o.kg)(2,e)}})),!!r.length&&r[0]},e.prototype.addTokenViaMagicLink=function(e){return Tt(this,void 0,void 0,(function(){var t,r,i,f,a,s;return St(this,(function(c){switch(c.label){case 0:t=new URL(e),r=t.hash.length>1?t.hash.substring(1):t.search.substring(1),i=(0,y.He)(this.config.offChainRedirectMode),f=(0,o.pp)(Object.values(this.tokenStore.getCurrentIssuers(!1))),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.messaging.sendMessage({action:n.gF.MAGIC_URL,origin:t.origin+t.pathname,data:{request:f,urlParams:r}},this.config.messagingForceTab,void 0,!!i&&window.location.href)];case 2:return(a=c.sent())?a.evt===n.AJ.ISSUER_TOKENS?(this.getOutletConfigForCurrentOrigin(t.origin)&&this.storeOutletTokenResponse(a.data.tokens),this.eventSender("tokens-selected",{selectedTokens:this.tokenStore.getSelectedTokens()}),[2,a.data.tokens]):[3,4]:[2,new Promise((function(e){}))];case 3:return s=c.sent(),(0,o.Po)(s.message,"error",null,!1,!0),[3,4];case 4:return[2]}}))}))},e.prototype.on=function(e,t,r){if((0,o.Sg)(e,"Event type is not defined"),"tokens-selected"===e&&t&&this.readTokensFromUrl(),"token-proof"===e&&t){(0,o.kg)(2,"token-proof listener atteched. check URL HASH for proof callbacks.");var n=this.getDataFromQuery("action");"proof-callback"===n?this.readProofCallback():"email-callback"===n&&this.processAttestationIdCallback()}if(t)this.clientCallBackEvents[e]=t;else if(this.clientCallBackEvents[e])return this.clientCallBackEvents[e].call(e,r)},e.prototype.processAttestationIdCallback=function(){var e;return Tt(this,void 0,void 0,(function(){var t,r,i,f,a,s,c,u,l,d;return St(this,(function(h){switch(h.label){case 0:switch(h.trys.push([0,9,,10]),(new kt.p).captureAttestationIdCallback(this.urlParams),t=this.getDataFromQuery("orig-action"),r=new ot.c({issuers:Object.values(this.tokenStore.getCurrentIssuers(!1)),ethRpcMap:this.config.ethRpcMap,skipEasRevokeCheck:this.config.skipEasRevokeCheck}),t){case n.gF.GET_PROOF:return[3,1];case n.gF.GET_MUTLI_PROOF:return[3,4]}return[3,7];case 1:return i=this.getDataFromQuery("issuer"),f=this.getDataFromQuery("token"),a=JSON.parse(f),s=this.tokenStore.getCurrentIssuers(!1)[i],c=(0,o.s1)(s),[4,r.authenticate(s,c,a)];case 2:return l=h.sent(),[4,ht.validateProof(s,l.proof,l.type)];case 3:return h.sent(),this.eventSender("token-proof",{issuer:i,proof:l}),[3,8];case 4:return u=null!==(e=JSON.parse(this.getDataFromQuery("tokens")))&&void 0!==e?e:{},[4,r.authenticateMany(u)];case 5:return l=h.sent(),[4,mt.validateProofResult(l,this.getTokenStore().getCurrentIssuers(!1))];case 6:return h.sent(),this.eventSender("token-proof",{issuers:l}),[3,8];case 7:throw new Error("Original action not defined in attestation.id callback");case 8:return[3,10];case 9:return d=h.sent(),console.error(d),this.emitRedirectProofEvent(null,null,d.message),[3,10];case 10:return window.location.hash=(0,o.rT)(this.urlParams,["attestation","requestSecret","address","email","wallet"]).toString(),[2]}}))}))},e.prototype.switchTheme=function(e){this.ui.switchTheme(e)},e}()},43803:(e,t,r)=>{"use strict";r.d(t,{AJ:()=>i,gF:()=>n,sT:()=>c});var n,i,o=r(35908),f=r(39678),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},s=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";r.d(t,{W:()=>f});var n=r(39896),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},f=function(){function e(e,t){this.autoEnableTokens=e,this.tokenPersistenceTTL=t,this.currentIssuers={},this.tokenData={},this.tokenLookup={},this.selectedTokens={},this.tokenPersistenceTTL>0&&this.loadTokenStore()}return e.prototype.clearTokenStore=function(){localStorage.removeItem(e.LOCAL_STORAGE_KEY)},e.prototype.loadTokenStore=function(){var t=JSON.parse(localStorage.getItem(e.LOCAL_STORAGE_KEY));if(t){for(var r in t.tokenLookup){var n=t.tokenLookup[r];n.timestamp+1e3*this.tokenPersistenceTTL>Date.now()&&(this.tokenLookup[r]=n)}for(var r in t.tokenData){var i=t.tokenData[r];i.timestamp+1e3*this.tokenPersistenceTTL>Date.now()&&(this.tokenData[r]=i)}this.saveTokenStore()}},e.prototype.saveTokenStore=function(){this.tokenPersistenceTTL>0&&localStorage.setItem(e.LOCAL_STORAGE_KEY,JSON.stringify({tokenLookup:this.tokenLookup,tokenData:this.tokenData}))},e.prototype.updateIssuers=function(e){Object.keys(this.currentIssuers).length>0&&(this.selectedTokens={}),this.prePopulateTokenLookupStore(e)},e.prototype.clearCachedTokens=function(e,t){var r;for(var n in this.tokenData)void 0!==e&&e!==this.tokenLookup[n].onChain||(t&&(null===(r=this.tokenData[n].tokens)||void 0===r?void 0:r.length)>0?(this.tokenData[n].tokens=this.tokenData[n].tokens.filter((function(e){return e.walletAddress!==t})),0===this.tokenData[n].tokens.length&&(delete this.tokenData[n],delete this.selectedTokens[n])):(delete this.tokenData[n],delete this.selectedTokens[n]));this.saveTokenStore()},e.prototype.hasOnChainTokens=function(){for(var e in this.currentIssuers)if(this.currentIssuers[e])return!0;return!1},e.prototype.getCurrentIssuers=function(e){var t={};for(var r in this.currentIssuers)void 0!==e&&e!==this.currentIssuers[r]||(t[r]=this.tokenLookup[r]);return t},e.prototype.getCurrentBlockchains=function(){var e=[],t=this.getCurrentIssuers(!0);for(var r in t){var n=t[r];-1===e.indexOf(n.blockchain)&&e.push(n.blockchain)}return e},e.prototype.getCurrentTokens=function(e){var t,r,n={};for(var i in this.currentIssuers)void 0!==e&&e!==this.currentIssuers[i]||(n[i]=null!==(r=null===(t=this.tokenData[i])||void 0===t?void 0:t.tokens)&&void 0!==r?r:[]);return n},e.prototype.getTotalTokenCount=function(e){var t=this.getCurrentTokens(e);return Object.keys(t).reduce((function(e,r){return e+t[r].length}),0)},e.prototype.hasUnloadedIssuers=function(){var e=this.getCurrentIssuers(!0);for(var t in e)if(!e[t].title)return!0;return!1},e.prototype.hasUnloadedTokens=function(){var e,t;try{for(var r=o(Object.values(this.getCurrentTokens())),n=r.next();!n.done;n=r.next()){if(0===n.value.length)return!0}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return!1},e.prototype.getIssuerTokens=function(e){var t;return this.tokenData[e]?null!==(t=this.tokenData[e].tokens)&&void 0!==t?t:[]:null},e.prototype.setTokens=function(e,t){this.tokenData[e]={timestamp:Date.now(),tokens:t},this.saveTokenStore(),this.autoEnableTokens&&(this.selectedTokens[e]={tokens:t})},e.prototype.getSelectedTokens=function(){return this.selectedTokens},e.prototype.setSelectedTokens=function(e){this.selectedTokens=e},e.prototype.prePopulateTokenLookupStore=function(e){var t=this,r={};e.forEach((function(e,i){var o;e.collectionID&&(void 0===e.onChain&&(e.onChain=!0),e.collectionID=t.formatCollectionID(e.collectionID),void 0===r[e.collectionID]?("chain"in e&&(e.chain=t.formatCollectionChain(e.chain)),void 0!==t.tokenData[e.collectionID]&&t.autoEnableTokens&&(null===(o=t.tokenData[e.collectionID].tokens)||void 0===o?void 0:o.length)&&(t.selectedTokens[e.collectionID]={tokens:t.tokenData[e.collectionID].tokens}),t.tokenLookup[e.collectionID]||t.updateTokenLookupStore(e.collectionID,e,!1),r[e.collectionID]=e.onChain):(0,n.kg)(1,"duplicate collectionID key ".concat(e.collectionID,", use unique keys per collection.")))})),this.currentIssuers=r},e.prototype.updateTokenLookupStore=function(e,t,r){void 0===r&&(r=!0),this.tokenLookup[e]=i(i(i({},this.tokenLookup[e]),t),{timestamp:Date.now()}),r&&this.saveTokenStore()},e.prototype.formatCollectionChain=function(e){return e.toLowerCase()},e.prototype.formatCollectionID=function(e){var t=e;return(/[A-Z]+/g.test(e)||/\s+/g.test(e))&&(t=e.replace(/\s+/g,"-").toLowerCase(),(0,n.kg)(1,"Token Negotiator: Spaces or capital letters found in collectionID definition ".concat(e,", this has been re-formatted to ").concat(t)),e=t),e},e.LOCAL_STORAGE_KEY="tn-tokenStore",e}()},67890:(e,t,r)=>{"use strict";r.d(t,{$:()=>g});var n,i=r(52335),o=function(){function e(e,t){this.params={},this.viewContainer=e,this.params=t}return e.prototype.render=function(){var e,t=this,r=this.params.src;r&&"undefined"!==r?((e=document.createElement("img")).loading="lazy",e.addEventListener("load",(function(e){t.onLoad(e)})),e.addEventListener("error",(function(e){t.onError(e)})),e.src=r):(e=this.createAvatar(),this.viewContainer.classList.remove("shimmer-tn")),this.viewContainer.appendChild(e)},e.prototype.onLoad=function(e){this.viewContainer.classList.remove("shimmer-tn")},e.prototype.onError=function(e){this.viewContainer.innerHTML="",this.viewContainer.appendChild(this.createAvatar()),this.viewContainer.classList.remove("shimmer-tn")},e.prototype.createAvatar=function(){var e=document.createElement("img");return e.src=this.generateAvatar(this.params.title),e},e.prototype.generateAvatar=function(e){var t=document.createElement("canvas"),r=t.getContext("2d");if(t.width=200,t.height=200,!r)return"";r.fillStyle=this.getRandomBackgroundColor(),r.fillRect(0,0,t.width,t.height),r.font="bold 100px 'Arial', sans-serif",r.fillStyle="#fff",r.textAlign="center",r.textBaseline="middle";for(var n=e.split(" "),i="",o=0;i.length<2&&o=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.loadedCount=0,t.numberToLoad=25,t.autoLoadMore=!0,t}return s(t,e),t.prototype.init=function(){var e=this;this.viewContainer.addEventListener("click",(function(t){t.target.classList.contains("mobileToggle-tn")?e.tokenToggleSelection():t.target.classList.contains("load-more-btn-tn")&&e.loadMoreTokens()}))},t.prototype.render=function(){var e=this;if(this.loadedCount=0,this.viewContainer.innerHTML=this.getTokenListItems(),this.renderIcons(),this.autoLoadMore){var t=this.viewContainer.querySelector(".load-more-tn");t&&(this.interceptObs||(this.interceptObs=new IntersectionObserver((function(t){t[0].isIntersecting&&e.loadMoreTokens()}),{root:this.viewContainer.querySelector(".view-content-tn")})),this.interceptObs.observe(t))}},t.prototype.getTokenListItems=function(){for(var e="",t=Math.min(this.loadedCount+this.numberToLoad,this.params.data.tokens.length),r=this.loadedCount;r\n \n \n "},t.prototype.createTokenMarkup=function(e){var t,r,n=e.tokenIssuerKey,i=e.title,o=e.data,f=e.index,s=e.image,c=e.toggleState,u=e.hideToggle,l=e.balance,d=e.fungible,h=e.decimals,p=e.symbol;if(d){var y=a.formatUnits(l,h);t=y+" "+p,r=(y.length>15?y.substring(0,12)+"... ":y)+" "+p}else t=f,r=f?"#"+(f.length>15?f.substring(0,5)+"..."+f.substring(f.length-5,f.length):f):"";var b=c?"checked":"";return'\n
  • \n
    \n
    \n

    ").concat(i,"

    \n

    \n \t').concat(r,"\n\t\t\t\t

    \n
    ")+(u?"":"
    \n \n \n
    "))+"
  • \n "},t}(i.w),l=r(39678),d=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),h=function(){return h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.init=function(){var e=this;this.client.registerUiUpdateCallback(l.kS.ISSUERS_LOADING,(function(){e.issuersLoading()})),this.client.registerUiUpdateCallback(l.kS.ISSUERS_LOADED,(function(){e.ui.dismissLoader(),e.client.cancelTokenAutoload(),e.render()})),this.client.registerUiUpdateCallback(l.kS.WALLET_DISCONNECTED,(function(){e.client.getTokenStore().hasOnChainTokens()?e.ui.updateUI("wallet",{viewName:"wallet"},{viewTransition:"slide-in-left"}):e.ui.updateUI("start",{viewName:"start"},{viewTransition:"slide-in-left"})}))},t.prototype.render=function(){this.renderContent(),this.afterRender()},t.prototype.renderContent=function(){var e=this;if(this.viewContainer.innerHTML='\n
    \n
    \n
    \n
    \n
    \n \t

    '.concat(this.params.options.issuerHeading,'

    \n\t\t\t\t\t\t
    \n\t\t\t\t \t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \t\n\t\t\t\t
    \n\t\t\t\t ').concat(this.getCustomContent(),'\n
    \n\t\t\t\t\n
    \n \n
    \n '),this.viewContainer.querySelector(".back-to-menu-tn").addEventListener("click",this.backToIssuers.bind(this)),this.setupWalletButton(),this.viewContainer.querySelector(".refresh-tn").addEventListener("click",(function(){e.client.eventSender("tokens-refreshed",null),e.autoLoadTokens(!0)})),this.issuerListContainer=this.viewContainer.querySelector(".token-issuer-list-container-tn"),this.tokensContainer=this.viewContainer.getElementsByClassName("token-view-tn")[0],this.issuerListContainer){this.populateIssuers();var t=this.tokensContainer.getElementsByClassName("token-list-container-tn")[0];this.tokenListView=new u(this.client,this.ui,t,h({},this.params))}else(0,f.kg)(2,"Element .token-issuer-list-container-tn not found")},t.prototype.afterRender=function(){this.client.issuersLoaded?this.client.getTokenStore().hasUnloadedTokens()&&this.autoLoadTokens():this.issuersLoading()},t.prototype.getCustomContent=function(){return""},t.prototype.setupWalletButton=function(){return p(this,void 0,void 0,(function(){var e,t=this;return y(this,(function(r){return(e=this.viewContainer.querySelector(".dis-wallet-tn")).style.display="block",e.addEventListener("click",(function(){t.client.disconnectWallet()})),[2]}))}))},t.prototype.issuersLoading=function(){this.ui.showLoader("

    Loading contract data...

    ")},t.prototype.populateIssuers=function(){var e,t,r,n=this,i="",f=this.client.getTokenStore().getCurrentIssuers();for(var a in f){var s=f[a],c=null!==(r=this.client.getTokenStore().getIssuerTokens(a))&&void 0!==r?r:[],u=s.title?s.title:s.collectionID.replace(/[-,_]+/g," ");i+=this.issuerConnectMarkup(u,s.image,a,c,s)}this.issuerListContainer.innerHTML=i;try{for(var l=b(this.issuerListContainer.getElementsByClassName("img-container-tn")),d=l.next();!d.done;d=l.next()){var h=d.value,p={src:h.getAttribute("data-image-src"),title:h.getAttribute("data-token-title")};new o(h,p).render()}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}this.issuerListContainer.addEventListener("click",(function(e){if(e.target.classList.contains("connect-btn-tn"))n.connectTokenIssuer(e);else if(e.target.classList.contains("tokens-btn-tn")){var t=e.target.parentNode.dataset.issuer;n.navigateToTokensView(t)}}))},t.prototype.issuerConnectMarkup=function(e,t,r,n,i){var o="";return(null==n?void 0:n.length)&&(o=(null==i?void 0:i.fungible)?"Balance found":"".concat(n.length," token").concat(n.length>1?"s":""," available")),'\n \n ")},t.prototype.backToIssuers=function(){this.tokensContainer.style.display="none",this.viewContainer.querySelector(".issuer-slider-tn").classList.toggle("open")},t.prototype.autoLoadTokens=function(e){return void 0===e&&(e=!1),p(this,void 0,void 0,(function(){var t=this;return y(this,(function(r){switch(r.label){case 0:return[4,this.client.tokenAutoLoad(this.issuerLoading.bind(this),(function(e,r){if(null==r?void 0:r.length)t.issuerConnected(e,r,!1);else{var n=t.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .connect-btn-tn'));n&&(n.innerText="Load")}}),e)];case 1:return r.sent(),[2]}}))}))},t.prototype.connectTokenIssuer=function(e){return p(this,void 0,void 0,(function(){var t,r,n,i;return y(this,(function(o){switch(o.label){case 0:t=e.target.dataset,r=t.issuer,n=[],this.ui.showLoader("

    Loading tokens...

    "),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.client.connectTokenIssuer(r)];case 2:return(n=o.sent())?[3,4]:[2];case 3:return i=o.sent(),(0,f.kg)(2,i),this.ui.showError(i),this.client.eventSender("error",{issuer:r,error:i}),[2];case 4:return this.ui.dismissLoader(),(null==n?void 0:n.length)?(this.issuerConnected(r,n),[2]):(this.ui.showError("No tokens found! ".concat(this.client.getNoTokenMsg(r))),[2])}}))}))},t.prototype.issuerLoading=function(e){var t=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .tokens-btn-tn'));t&&(t.style.display="none");var r=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .connect-btn-tn'));r&&(r.innerHTML='
    ',r.style.display="block")},t.prototype.issuerConnected=function(e,t,r){var n=this;void 0===r&&(r=!0);var i=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .connect-btn-tn')),o=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .tokens-btn-tn'));i&&o||(0,f.kg)(2,"Could not find button handler"),i.style.display="none",i.setAttribute("tabIndex",-1),o.style.display="block";var a=this.client.getTokenStore().getCurrentIssuers();o.innerHTML=t.length&&a[e].fungible?"Balance found":"".concat(t.length," token").concat(t.length>1?"s":""," available"),o.setAttribute("aria-label","Navigate to select from ".concat(t.length," of your ").concat(e," tokens")),o.setAttribute("tabIndex",1),r&&setTimeout((function(){n.navigateToTokensView(e)}),250)},t.prototype.navigateToTokensView=function(e){this.updateTokensView(e),this.showTokenView(e)},t.prototype.updateTokensView=function(e){var t,r;this.tokensContainer.style.display="block",this.tokensContainer.scrollTo(0,0);var n=this.client.getTokenStore(),i=n.getCurrentIssuers()[e],o=null!==(t=n.getIssuerTokens(e))&&void 0!==t?t:[];i.title&&(this.viewContainer.getElementsByClassName("headline-tn token-name")[0].innerHTML=i.title);var f=[];null==o||o.map((function(t,r){var o,a,s,c=!1;if(null===(o=n.getSelectedTokens()[e])||void 0===o||o.tokens.map((function(e){JSON.stringify(t)===JSON.stringify(e)&&(c=!0)})),!1===i.onChain){var u=i.title,l=i.image;f.push({data:t,tokenIssuerKey:e,index:t.ticketId,title:u,image:l,toggleState:c,hideToggle:null==i?void 0:i.hideToggle})}else{var d=null!==(a=t.tokenId)&&void 0!==a?a:r.toString();f.push({data:t,tokenIssuerKey:e,index:d,title:t.title,image:null!==(s=t.image)&&void 0!==s?s:i.image,fungible:i.fungible,decimals:i.decimals,symbol:i.symbol,balance:t.balance,toggleState:c,hideToggle:null==i?void 0:i.hideToggle})}})),null===(r=this.tokenListView)||void 0===r||r.update({data:{issuer:e,tokens:f}})},t.prototype.showTokenView=function(e){this.viewContainer.querySelector(".issuer-slider-tn").classList.toggle("open")},t}(i.w)},82707:(e,t,r)=>{"use strict";r.d(t,{R:()=>S});var n=r(52335),i=r(39896),o=r(39678),f=r(77035),a=r(94043),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rMetamask logo\n\t',label:"MetaMask"},l=' ',d="Ultra",h={imgSmall:"\n\t\t\n\t",imgBig:'\n\t\t\n\t',label:"ImToken"},p={imgBig:'',label:"AlphaWallet"},y={imgBig:'\n\t\t\n\t',label:"Status Wallet"},b={imgBig:'\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t',label:"Trust Wallet"},g={imgBig:'\n\t\n\t',label:"Embedded Wallet"},m={imgBig:'\t\n\t\t\n\t\t\n\t\t\t\x3c!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch --\x3e\n\t\t\tbuild-icons/Stable Copy 3\n\t\t\tCreated with Sketch.\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t',label:"Brave"},v={imgBig:"\n\t\t\n\t",label:"MEW"};function w(e){switch(e){case f.SupportedWalletProviders.MetaMask:return function(){var e=(0,a.Mz)(),t=g;e.brave&&(t=m);e.anyMetamask&&(t=u);e.mew&&(t=v);e.trust&&(t=b);e.status&&(t=y);e.alphaWallet&&(t=p);e.imToken&&(t=h);return s({name:f.SupportedWalletProviders.MetaMask},t)}();case f.SupportedWalletProviders.WalletConnectV2:return{name:e,label:"WalletConnect V2",imgBig:''};case f.SupportedWalletProviders.AlphaWallet:return{name:f.SupportedWalletProviders.WalletConnectV2,label:"AlphaWallet",imgBig:p.imgBig};case f.SupportedWalletProviders.Torus:return{name:e,label:"Torus",imgBig:'Torus logo'};case f.SupportedWalletProviders.Phantom:return(null===(t=window.solana)||void 0===t?void 0:t.isBraveWallet)?{name:f.SupportedWalletProviders.Phantom_Brave,label:"Phantom (Brave)",imgBig:m.imgBig}:{name:f.SupportedWalletProviders.Phantom,label:"Phantom",imgBig:c};case f.SupportedWalletProviders.Flow:return{name:e,label:"Flow",imgBig:'\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n'};case f.SupportedWalletProviders.SafeConnect:return{name:e,label:"SafeConnect",imgBig:'\n\tSafe connect button\n'};case f.SupportedWalletProviders.Ultra:return{name:e,label:d,imgBig:l}}var t}var A,E=(A=function(e,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},A(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),_=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},k=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype.init=function(){this.client.registerUiUpdateCallback(o.kS.WALLET_DISCONNECTED,void 0)},t.prototype.render=function(){var e,t,r=this,n="";if(this.client.hasIssuerForBlockchain("evm")){if(this.client.safeConnectAvailable()){var i=w(f.SupportedWalletProviders.SafeConnect);n+=this.getWalletButtonHtml(i)}var o=w(f.SupportedWalletProviders.AlphaWallet);if(n+=this.getWalletButtonHtml(o),void 0!==window.ethereum){var s=w(f.SupportedWalletProviders.MetaMask);n+=this.getWalletButtonHtml(s)}var c=[w(f.SupportedWalletProviders.WalletConnectV2)];(0,a.Mz)().edgeIOS||c.push(w(f.SupportedWalletProviders.Torus));try{for(var u=T(c),l=u.next();!l.done;l=u.next()){var d=l.value;n+=this.getWalletButtonHtml(d)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}}if(this.client.hasIssuerForBlockchain("solana")){var h=w(f.SupportedWalletProviders.Phantom);n+=this.getWalletButtonHtml(h)}if(this.client.hasIssuerForBlockchain("flow")){var p=w(f.SupportedWalletProviders.Flow);n+=this.getWalletButtonHtml(p)}if(this.client.hasIssuerForBlockchain("ultra")){var y=w(f.SupportedWalletProviders.Ultra);n+=this.getWalletButtonHtml(y)}this.viewContainer.innerHTML='\n
    \n
    \n
    \n
    \n \t'.concat(this.params.viewOptions.backButtonView?'\n \t\t\n \t':"",'\n\t\t\t\t
    \n
    \n

    Select Wallet

    \n
    \n
    \n \t').concat(n,"\n
    \n
    \n
    \n
    \n "),this.viewContainer.querySelectorAll(".wallet-button-tn").forEach((function(e){e.addEventListener("click",r.connectWallet.bind(r))}))},t.prototype.getWalletButtonHtml=function(e){return'\n\t\t\t\n\t\t")},t.prototype.connectWallet=function(e){var t,r,n,o;return _(this,void 0,void 0,(function(){var f,a,s,c=this;return k(this,(function(u){switch(u.label){case 0:f=e.currentTarget.dataset.wallet,a=null!=(a=e.currentTarget.dataset.walletlabel)?a:f,(0,i.kg)(2,"Connect wallet: "+f),this.ui.setForceToOpen(!0),this.ui.showLoaderDelayed(["

    Connecting to "+a+"...

    ","You may need to unlock your wallet to continue."],500),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.client.negotiatorConnectToWallet(f)];case 2:return u.sent(),this.ui.dismissLoader(),(null===(r=null===(t=this.params)||void 0===t?void 0:t.data)||void 0===r?void 0:r.connectCallback)?null===(o=null===(n=this.params)||void 0===n?void 0:n.data)||void 0===o||o.connectCallback():(this.client.enrichTokenLookupDataOnChainTokens(),this.ui.updateUI("main",{viewName:"main"},{viewTransition:"slide-in-right"})),this.ui.setForceToOpen(!1),[3,4];case 3:return s=u.sent(),(0,i.kg)(2,"negotiatorConnectToWallet error",e),this.ui.showError(s),setTimeout((function(){console.log("this.ui.setForceToOpen(false)"),c.ui.setForceToOpen(!1)}),0),[3,4];case 4:return[2]}}))}))},t}(n.w)},30838:(e,t,r)=>{"use strict";r.d(t,{z:()=>s});var n,i=r(52335),o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},a=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]\n
    \n
    \n
    \n \n
    ').concat(this.params.options.openingHeading,"
    \n
    \n
    \n \n\t\t")},t.prototype.goToWalletSelection=function(){return f(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.ui.showLoaderDelayed(["Initializing wallet.."],500),e={viewTransition:"slide-in-right"},[4,this.ui.canSkipWalletSelection()];case 1:return t.sent()?(this.client.enrichTokenLookupDataOnChainTokens(),this.ui.updateUI("main",{viewName:"main"},e)):this.ui.updateUI("wallet",{viewName:"main"},e),this.ui.dismissLoader(),[2]}}))}))},t}(i.w)},52335:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";r.d(t,{W:()=>n});var n={1:"https://ethereum.publicnode.com",5:"https://eth-goerli.g.alchemy.com/v2/yVhq9zPJorAWsw-F87fEabSUl7cCU6z4",11155111:"https://sepolia.infura.io/v3/9f79b2f9274344af90b8d4e244b580ef",137:"https://polygon-rpc.com/",80001:"https://polygon-mumbai.g.alchemy.com/v2/rVI6pOV4irVsrw20cJxc1fxK_1cSeiY0",56:"https://bsc-dataseed.binance.org/",97:"https://data-seed-prebsc-1-s1.binance.org:8545",43114:"https://api.avax.network/ext/bc/C/rpc",43113:"https://api.avax-test.network/ext/bc/C/rpc",250:"https://rpc.fantom.network/",25:"https://evm-cronos.crypto.org",338:"https://evm-t3.cronos.org",42161:"https://arb1.arbitrum.io/rpc",421613:"https://arb-goerli.g.alchemy.com/v2/nFrflomLgsQQL5NWjGileAVqIGGxZWce",10:"https://mainnet.optimism.io"}},35908:(e,t,r)=>{"use strict";r.d(t,{kt:()=>n,sT:()=>u,ss:()=>c});var n,i=r(39896),o=r(39678),f=r(94043),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},s=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(u=setTimeout((function(){c||f(new Error("Failed to receive response from window/iframe")),d()}),r))},e.prototype.getModal=function(e){var t=document.getElementById("modal-tn");return t||!e||((t=document.createElement("div")).id="modal-tn",t.className="modal-tn",t.style.display="none",t.innerHTML='\n \n ',document.body.appendChild(t),t.getElementsByClassName("modal-close-tn")[0].addEventListener("click",(function(){e()}))),t},e.prototype.removeModal=function(){var e=this.getModal();e&&(e.style.display="none",e.remove())},e.prototype.constructUrl=function(e,t){var r=new URL(t.origin),n=new URLSearchParams;n.set(c+"evtid",e),n.set(c+"action",t.action);var i="";for(var o in t.data){var f=t.data[o];f&&(f instanceof Array||f instanceof Object?n.set(c+o,JSON.stringify(f)):"urlParams"===o?i+="&".concat(f):n.set(c+o,f))}return r.hash=n.toString(),r.toString()+i},e.prototype.openTab=function(e){return window.open(e,"_blank")},e.prototype.createIframe=function(e){var t=document.createElement("iframe");return t.setAttribute("allow","clipboard-read"),this.getModal(e).getElementsByClassName("modal-body-tn")[0].appendChild(t),t},e.getUniqueEventId=function(){return(new Date).getTime().toString()},e}()},3076:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var n=r(39896),i=r(94043),o=r(43803),f=r(35908),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},s=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]Math.round(Date.now()/1e3))return n;delete this.attestations[r]}return null},e.prototype.saveAttestation=function(e){this.attestations[e.identifierType+"/"+e.identifier]=e,localStorage.setItem(this.LOCAL_STORAGE_KEY,JSON.stringify(this.attestations))},e.prototype.openAttestationApp=function(){var e=this;if(this.attestationInTab&&!this.tryingToGetAttestationInBackground){var t;(0,n.kg)(2,"display new TAB to attest, ask parent to show current iframe"),this.showIframeCallback&&this.showIframeCallback(),(t=document.createElement("div")).classList.add(this.wrapperBase+"_btn"),t.innerHTML="Click to get Email Attestation",t.addEventListener("click",(function(){e.attestationTabHandler=window.open(e.attestationOrigin,"Attestation"),t.remove();var r=e.buttonOverlay.querySelector("."+e.wrapperBase+"_title"),n=e.buttonOverlay.querySelector("."+e.wrapperBase+"_subtitle");r&&(r.innerHTML="Email Attestation verification in progress"),n&&(n.innerHTML="Please complete the verification process to continue"),e.interval=setInterval((function(){e.attestationTabHandler.closed&&(clearInterval(e.interval),e.rejectHandler(new Error("User closed TAB")))}),2e3)}));var r=this.wrapperBase+"_wrap_"+Date.now(),i=document.createElement("style");i.innerHTML="\n\t\t\t\t#".concat(r," {\n\t\t\t\t\twidth:100%;\n\t\t\t\t\theight: 100vh; \n\t\t\t\t\tposition: fixed; \n\t\t\t\t\talign-items: center; \n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\ttop: 0; \n\t\t\t\t\tleft: 0; \n\t\t\t\t\tbackground: #000f;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t\tpadding: 30px;\n\t\t\t\t\tz-index: 9999;\n\t\t\t\t}\n\t\t\t\t#").concat(r," div:hover {\n\t\t\t\t\tbox-shadow: 0 0px 14px #ffff !important;\n\t\t\t\t}\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_content {\n\t\t\t\t\tcolor: #fff; \n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_title {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_subtitle {\n\t\t\t\t\tfont-size:18px;\n\t\t\t\t\tcolor: #ccc;\n\t\t\t\t}\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_btn {\n\t\t\t\t\tmargin: 20px auto 0;\n\t\t\t\t\tpadding: 5px 15px;\n\t\t\t\t\tbackground: #0219fa;\n\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\tfont-size: 20px;\n\t\t\t\t\tline-height: 1.3;\n\t\t\t\t\tborder-radius: 100px;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\n\t\t\t\t@media (max-width: 768px){\n\t\t\t\t\t#").concat(r," {\n\t\t\t\t\t\tpadding: 20px 10px;\n\t\t\t\t\t}\n\t\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_title {\n\t\t\t\t\t\tfont-size: 24px;\n\t\t\t\t\t}\n\t\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_btn {\n\t\t\t\t\t\tpadding: 10px 15px;\n\t\t\t\t\t\tfont-size: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"),this.buttonOverlay=document.createElement("div"),this.buttonOverlay.id=r,this.buttonOverlay.innerHTML='

    Needs email attestation to complete verification.

    '),this.buttonOverlay.appendChild(t),this.buttonOverlay.appendChild(i),document.body.appendChild(this.buttonOverlay)}else(0,n.kg)(2,"open attestation in iframe"),this.createIframe()},e.prototype.captureAttestationIdCallback=function(e){if(!e.has("attestation")||!e.has("requestSecret"))return console.log("no attestation detected",e.toString()),!1;var t=e.get("email"),r=e.get("attestation"),n="0x"+e.get("requestSecret"),i=this.getAttestationDetails(t,r,n);return this.saveAttestation(i),!0},e.prototype.getAttestationDetails=function(e,t,r){var n=new Date;return n.setDate(n.getDate()+30),{type:"asn",identifierType:"email",identifier:e,identifierSecret:r,attestation:t,expiry:Math.round(n.getTime()/1e3)}},e.prototype.getIdentifierAttestation=function(e,t,r,a){var s=this;return new Promise((function(c,u){var l=s.getExistingAttestation(e);if(l)c(l);else{if(s.rejectHandler=u,s.redirectUrl){var d=new URLSearchParams(window.location.hash.substring(1)),h=new URLSearchParams;h.set("email",e),h.set("address",r),h.set("wallet",t);var p=new URL(s.redirectUrl),y=new URLSearchParams(p.hash.substring(1));if(a)for(var b in a)y.set(f.ss+b,a[b]);y.set(f.ss+"orig-action",a.action),y.set("email",e),y.set(f.ss+"action",o.gF.EMAIL_ATTEST_CALLBACK);var g=d.get(f.ss+"requestor");g&&y.set(f.ss+"requestor",g),p.hash=y.toString(),h.set("email-attestation-callback",p.href);var m="".concat(s.attestationOrigin,"#").concat(h.toString());return(0,n.kg)(2,"authenticate. go to: ",m),void(window.location.href=m)}if(s.attestationInTab&&!(0,i.jP)()&&(s.tryingToGetAttestationInBackground=!0),!s.attestationOrigin)return u(new Error("Attestation origin is null"));window.addEventListener("message",(function(t){var r=new URL(s.attestationOrigin);t.origin===r.origin&&(s.iframe&&s.iframeWrap&&s.iframe.contentWindow||s.attestationTabHandler)&&s.postMessageAttestationListener(t,c,u,e)})),s.openAttestationApp()}}))},e.prototype.createIframe=function(){var e,t=document.createElement("iframe");t.setAttribute("allow","clipboard-read"),this.iframe=t,t.src=null!==(e=this.attestationOrigin)&&void 0!==e?e:"",t.style.width="800px",t.style.height="800px",t.style.maxHeight="100vh",t.style.maxWidth="100%",t.style.background="#fff";var r=document.createElement("div");this.iframeWrap=r,r.setAttribute("style","width:101%;min-height: 100vh; position: fixed; align-items: center; justify-content: center;display: none;top: 0; left: 0; background: #fffa; z-index: 1400"),r.appendChild(t),document.body.appendChild(r)},e.prototype.postMessageAttestationListener=function(e,t,r,i,o,f){var c,u,l,d;return a(this,void 0,void 0,(function(){var a,h,p,y,b;return s(this,(function(s){if((0,n.kg)(2,"postMessageAttestationListener event (auth-handler)",e.data),a=this.attestationTabHandler?this.attestationTabHandler:this.iframe.contentWindow,void 0!==e.data.ready&&!0===e.data.ready)return(h={force:!1}).email=i,o&&(h.wallet=o),f&&(h.address=f),a.postMessage(h,this.attestationOrigin),[2];if(void 0!==e.data.display)if(!0===e.data.display){if(this.iframeWrap){if(this.tryingToGetAttestationInBackground)return this.tryingToGetAttestationInBackground=!1,this.iframe.remove(),this.iframeWrap.remove(),this.openAttestationApp(),[2];this.iframeWrap.style.display="flex",this.showIframeCallback&&this.showIframeCallback()}}else e.data.error&&((0,n.kg)(2,"Error received from the iframe: "+e.data.error),r(new Error(e.data.error)),this.buttonOverlay&&this.buttonOverlay.remove()),this.iframeWrap&&(this.iframeWrap.style.display="none");return(null===(c=e.data)||void 0===c?void 0:c.attestation)&&(null===(u=e.data)||void 0===u?void 0:u.requestSecret)?(this.attestationTabHandler&&this.attestationTabHandler.close(),this.iframeWrap&&this.iframeWrap.remove(),p=null===(l=e.data)||void 0===l?void 0:l.attestation,"bigint"==typeof(y=null===(d=e.data)||void 0===d?void 0:d.requestSecret)&&(y="0x"+y.toString(16)),b=this.getAttestationDetails(i,p,y),this.saveAttestation(b),t(b),this.buttonOverlay&&this.buttonOverlay.remove(),[2]):[2]}))}))},e}()},84570:(e,t,r)=>{"use strict";r.d(t,{s:()=>l});var n=r(67583),i=r(9771),o=r(68810),f=r(39896),a=r(24700),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";r.d(t,{c:()=>l});var n=r(67583),i=r(39896),o=r(3076),f=r(84570),a=r(43803),s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=function(){function e(e){this.ticketStorage=new n.pu(e)}return e.prototype.readMagicLink=function(e){return s(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:if(!e.has("ticket"))return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.ticketStorage.importTicketFromMagicLink(e)];case 2:return r.sent(),[3,4];case 3:return t=r.sent(),console.error("Failed to import attestation",t),(0,i.kg)(2,t),[3,4];case 4:return[2]}}))}))},e.prototype.getTokens=function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){return[2,this.ticketStorage.getDecodedTokens(e)]}))}))},e.prototype.authenticate=function(e,t,r,n,i,u){return void 0===u&&(u=!1),s(this,void 0,void 0,(function(){var s,l;return c(this,(function(c){switch(c.label){case 0:return[4,this.ticketStorage.getStoredTicketFromDecodedTokenOrId(t,r)];case 1:return s=c.sent(),[4,new o.p(e.attestationOrigin,void 0,u).getIdentifierAttestation(s.id,i,n,{action:a.gF.GET_PROOF,issuer:e.collectionID,token:JSON.stringify(r)})];case 2:return l=c.sent(),[4,(0,f.s)(e,l.attestation,l.identifierSecret,s)];case 3:return[2,c.sent()]}}))}))},e.prototype.authenticateMany=function(e,t,r,n,i){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var s,l,d,h,p,y,b,g,m,v,w,A,E,_,k,T,S;return c(this,(function(c){switch(c.label){case 0:for(h in s={},d=[],l=e)d.push(h);p=0,c.label=1;case 1:if(!(p{"use strict";r.d(t,{Hm:()=>v,IA:()=>w,pu:()=>A});var n=r(6549),i=r(65185),o=r(39896),f=r(58204),a=r(79896),s=r(39980),c=r(42949),u=r(24700),l=r(37982),d=function(){return d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},b=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},g=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{"use strict";r.d(t,{BF:()=>P,BT:()=>v,GL:()=>B,Ov:()=>g,Pb:()=>m,Po:()=>A,Rl:()=>x,Sg:()=>b,XI:()=>S,gT:()=>O,kF:()=>_,kg:()=>y,pC:()=>C,pp:()=>I,rT:()=>k,s1:()=>M,xI:()=>w,xK:()=>T});var n,i=r(35908),o=r(65185),f=r(56371),a=r(67583),s=r(48764).lW,c=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},l=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},h=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function y(e){for(var t=[],r=1;rparseInt(window.DISPLAY_DEBUG_LEVEL)||t&&console.log.apply(console,h([],d(t),!1))}var b=function(e,t){if(!e)throw new Error(t)},g=function(e){return e=e.split("-").join("+").split("_").join("/").split(".").join("="),Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))},m=function(e){window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("onmessage",e)},v=function(e){window.removeEventListener?window.removeEventListener("message",e):window.detachEvent("onmessage",e)},w=function(e){return new Promise((function(t){if(document.querySelector(e))return t(document.querySelector(e));var r=new MutationObserver((function(){document.querySelector(e)&&(t(document.querySelector(e)),r.disconnect())}));r.observe(document.body,{childList:!0,subtree:!0})}))},A=function(e,t,r,n,i,o){var f,a;if(void 0===i&&(i=!0),void 0===o&&(o=!1),a="object"==typeof e?null!==(f=e.message)&&void 0!==f?f:"Unknown error type: "+JSON.stringify(e):e,i&&y(2,t+": "+a),r&&r(),o)throw new E(a,e);return{type:t,message:e,data:n}},E=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.originalError=r,i.code=n,i}return c(t,e),t}(Error),_=function(e,t){return u(void 0,void 0,void 0,(function(){var r,n;return l(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,fetch(e)];case 1:if(r=i.sent(),!(n=r.status>=200&&r.status<=299)&&!0===t)return console.warn("token api request failed: ",e),[2];if(n)return[2,r.json()];throw new Error("HTTP error! status: ".concat(r.status));case 2:throw i.sent(),new Error("HTTP error.");case 3:return[2]}}))}))},k=function(e,t,r){var n,o,f,a;if(void 0===t&&(t=[]),void 0===r&&(r=i.ss),r)try{for(var s=p(Array.from(e.keys())),c=s.next();!c.done;c=s.next()){var u=c.value;0===u.indexOf(r)&&e.delete(u)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}try{for(var l=p(t),d=l.next();!d.done;d=l.next()){var h=d.value;e.has(h)&&e.delete(h)}}catch(e){f={error:e}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(f)throw f.error}}return e},T=function(e){for(var t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r=t.length,n=[0],i=0;i>8,n[a]&=255;for(;s;)n.push(255&s),s>>=8}return new Uint8Array(n.reverse())},S=function(e){return void 0!==s?s.from(e).toString("hex"):Array.from(x(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")},x=function(e){return(new TextEncoder).encode(e)},P=function(e){if(e.length%2==1)throw new Error("Wrong Hex String");for(var t=new Uint8Array(e.length/2),r=0;r{"use strict";r.d(t,{He:()=>c,K6:()=>s,Mz:()=>n,jP:()=>i});var n=function(){var e,t="undefined"!=typeof window&&window.navigator.userAgent.toLowerCase(),r=t&&/msie|trident/.test(t),n=t&&t.indexOf("msie 9.0")>0,i=t&&t.indexOf("edg/")>0,a=t&&t.indexOf("edga/")>0,s=t&&t.indexOf("edgios/")>0,c=t&&t.indexOf("edge/")>0,u=i||a||s||c,l=t&&/chrome\/\d+/.test(t)&&!u,d=t&&/phantomjs/.test(t),h=t&&/firefox|fxios\/\d+/.test(t),p=f()||o(),y=!!window.navigator.brave,b=t&&t.indexOf("android")>0,g=t&&/iphone|ipad|ipod|ios/.test(t),m=t&&/\smac\s/.test(t),v=t&&/windows/.test(t),w=!1,A=window.matchMedia;A&&(w=A("(pointer:coarse)").matches);var E=window.ethereum;void 0===window.ethereum&&(E={isMetaMask:!1,isAlphaWallet:!1,isTrust:!1,isStatusWallet:!1,isGoWallet:!1,isBraveWallet:!1});var _=w&&!!E.isAlphaWallet,k=w&&!!E.isTrust,T=w&&!!E.isStatusWallet,S=w&&!!E.isGoWallet,x=w&&!!E.isTrust&&!!E.isMetaMask,P=!!navigator.userAgent.match(/\simToken\//),I=w&&!!E.isMetaMask&&!k&&!y;return{iE:r,iE9:n,edge:u,edgeAndroid:a,edgeIOS:s,chrome:l,phantomJS:d,fireFox:h,safari:p,android:b,iOS:g,mac:m,windows:v,desktop:-1===(null===(e=navigator.userAgent)||void 0===e?void 0:e.indexOf("Mobi")),touchDevice:w,metaMask:I,anyMetamask:!!E.isMetaMask&&!k&&!E.isBraveWallet,alphaWallet:_,mew:x,trust:k,goWallet:S,status:T,imToken:P,brave:y,braveAndroid:y&&b,braveIOS:y&&g,metaMaskAndroid:b&&I,alphaWalletAndroid:b&&_,mewAndroid:b&&x,imTokenAndroid:b&&P}};function i(){return!!window.navigator.brave}function o(){var e=window.navigator.userAgent?window.navigator.userAgent.toLowerCase():"";return/ip(ad|od|hone)/i.test(e)&&/webkit/i.test(e)&&!/(crios|fxios|opios|mercury)/i.test(e)&&!i()}function f(){return!!window.safari}function a(){return f()||o()}function s(){var e=n();return e.iOS||a()||i()||e.fireFox}function c(e){var t=n();switch(e){case"always":return!0;case"never":return!1;default:return i()||t.fireFox||t.iOS&&!a()}}},92485:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SafeConnectAction:()=>i,SafeConnectProvider:()=>T});var n,i,o=r(43803),f=r(50284),a=r(40337),s=r(55050),c=r(52410),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},l=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]299||i.status<200))return[3,6];o=void 0,f.label=2;case 2:return f.trys.push([2,4,,5]),[4,i.json()];case 3:return o=f.sent().error,[3,5];case 4:return f.sent(),o="HTTP Request error: "+i.statusText,[3,5];case 5:throw new Error(o);case 6:return[4,i.json()];case 7:return[2,f.sent()]}}))}))},e.createAndSignLinkAttestation=function(e,t,r){return u(this,void 0,void 0,(function(){var n;return l(this,(function(i){switch(i.label){case 0:return(n=new c.EthereumKeyLinkingAttestation).create(e,t,4200,void 0,Math.round(Date.now()/1e3)-600),[4,n.sign(r)];case 1:return i.sent(),[2,n.getBase64()]}}))}))},e.HOLDING_KEY_ALGORITHM="RSASSA-PKCS1-v1_5",e.keyStore=new f.KeyStore,e}(),h=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";r.r(t),r.d(t,{SupportedWalletProviders:()=>n,Web3WalletProvider:()=>d,default:()=>h});var n,i=r(91023),o=r(241),f=r(39896),a=["evm","flow","solana","ultra"],s=r(24700),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)return console.log(o[0].signature),[2,o[0].signature];throw new Error("No signature");case 8:throw new Error('Blockchain "'.concat(n.blockchain,'" not supported'));case 9:return[2]}}))}))},e.prototype.getConnectionByAddress=function(e){return this.connections[e.toLowerCase()]},e.prototype.getWalletProvider=function(e){e=e.toLowerCase();var t=this.getConnectionByAddress(e);if(!t)throw new Error("Connection not found for address");if(!t.provider)throw new Error("Wallet provider not found for address");return t.provider},e.prototype.hasAnyConnection=function(e){for(var t in this.connections)if(e.includes(this.connections[t].blockchain))return!0;return!1},e.prototype.getConnectedWalletAddresses=function(e){return this.getConnectedWalletData(e).map((function(e){return e.address}))},e.prototype.getConnectedWalletData=function(e){return Object.values(this.connections).filter((function(t){return t.blockchain===e}))},e.prototype.getSingleSignatureCompatibleConnection=function(){var e=this,t=!1;return a.forEach((function(r){var n=Object.values(e.connections).filter((function(e){return e.blockchain===r}));n.length&&(t=n[0])})),t},e.prototype.registerNewWalletAddress=function(e,t,r,n,o,a){var s=this;switch(void 0===a&&(a=[]),this.connections[e.toLowerCase()]={address:e,chainId:t,providerType:r,provider:n,blockchain:o,ethers:i,meta:a},o){case"solana":case"evm":break;case"flow":n.currentUser().subscribe((function(e){(0,f.kg)(2,"=========Flow user subscription: ",e)}));break;case"ultra":n.on("disconnect",(function(){(0,f.kg)(2,"========= Ultra disconnected."),s.client.disconnectWallet()}));break;default:return void(0,f.kg)(2,"Unknown blockchain, dont attach listeners")}},e.prototype.registerEvmProvider=function(e,t){return u(this,void 0,void 0,(function(){var r,n,i,o=this;return l(this,(function(a){switch(a.label){case 0:return[4,e.listAccounts()];case 1:return r=a.sent(),[4,e.detectNetwork()];case 2:if(n=a.sent().chainId,0===r.length)throw new Error("No accounts found via wallet-connect.");return i=r[0],this.registerNewWalletAddress(i,n,t,e,"evm"),e.provider.on("accountsChanged",(function(r){(0,f.kg)(2,"accountsChanged: ",r),r&&0!==r.length?i!==r[0]&&(delete o.connections[i.toLowerCase()],i=r[0],o.registerNewWalletAddress(i,n,t,e,"evm"),o.saveConnections(),o.emitSavedConnection(i),o.client.getTokenStore().clearCachedTokens(),o.client.enrichTokenLookupDataOnChainTokens()):o.client.disconnectWallet()})),e.provider.on("chainChanged",(function(r){o.registerNewWalletAddress(i,r,t,e,"evm"),o.saveConnections(),o.emitNetworkChange(r)})),e.provider.on("disconnect",(function(e){(null==e?void 0:e.message)&&e.message.indexOf("MetaMask: Disconnected from chain")>-1||o.client.disconnectWallet()})),[2,i]}}))}))},e.prototype.registerSolanaProvider=function(e,t){return u(this,void 0,void 0,(function(){var r,n,i,o=this;return l(this,(function(a){switch(a.label){case 0:return[4,e.connect()];case 1:return r=a.sent(),n=r.publicKey.toBase58(),i=n,this.registerNewWalletAddress(n,"mainnet-beta",t,e,"solana"),e.on("connect",(function(e){var t=e.toBase58();(0,f.kg)(2,"connected wallet: ",t),o.registerNewWalletAddress(t,"mainnet-beta","phantom",window.solana,"solana")})),e.on("disconnect",(function(){(0,f.kg)(2,"disconnected wallet."),o.client.disconnectWallet()})),e.on("accountChanged",(function(e){if(e){delete o.connections[i.toLowerCase()];var t=e.toBase58();i=t,o.registerNewWalletAddress(i,"mainnet-beta","phantom",window.solana,"solana"),o.saveConnections(),o.emitSavedConnection(i),o.client.getTokenStore().clearCachedTokens(),o.client.enrichTokenLookupDataOnChainTokens()}else(0,f.kg)(2,"disconnected wallet."),o.client.disconnectWallet()})),[2,n]}}))}))},e.prototype.MetaMask=function(e){return u(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return(0,f.kg)(2,"connect MetaMask"),void 0===window.ethereum?[3,2]:[4,window.ethereum.enable()];case 1:return t.sent(),e=new o.Q(window.ethereum,"any"),[2,this.registerEvmProvider(e,"MetaMask")];case 2:throw new Error("MetaMask is not available. Please check the extension is supported and active.")}}))}))},e.prototype.WalletConnectV2=function(e){return u(this,void 0,void 0,(function(){var t,n,i,a,d=this;return l(this,(function(h){switch(h.label){case 0:return(0,f.kg)(2,"connect Wallet Connect V2"),[4,Promise.all([r.e(438),r.e(276)]).then(r.bind(r,68876))];case 1:return[4,(t=h.sent()).getWalletConnectV2ProviderInstance()];case 2:return n=h.sent(),e?[3,4]:[4,r.e(337).then(r.t.bind(r,4337,23))];case 3:i=h.sent().default,h.label=4;case 4:return n.on("display_uri",(function(e){return u(d,void 0,void 0,(function(){var t=this;return l(this,(function(n){switch(n.label){case 0:return[4,r.e(337).then(r.t.bind(r,4337,23))];case 1:return(i=n.sent().default).open(e,(function(){t.client.getUi().showError("User closed modal")})),[2]}}))}))})),n.on("session_delete",(function(e){e.id,e.topic;d.client.disconnectWallet()})),a=this.walletOptions,[2,new Promise((function(r,u){var l,h;if(e&&!n.session)u("Not connected");else{(n.session?n.enable():n.connect({namespaces:{eip155:{methods:["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"],chains:null!==(h=null===(l=null==a?void 0:a.walletConnectV2)||void 0===l?void 0:l.chains)&&void 0!==h?h:t.WC_V2_DEFAULT_CHAINS,events:["chainChanged","accountsChanged"],rpcMap:c(c({},s.W),d.client.config.ethRpcMap)}}})).then((function(){(0,f.kg)(2,"WC2 connected....."),null==i||i.close();var e=new o.Q(n,"any");r(d.registerEvmProvider(e,"WalletConnectV2"))})).catch((function(e){(0,f.kg)(2,"WC2 connect error...",e),null==i||i.close(),u(e)}))}}))]}}))}))},e.prototype.Torus=function(e){return u(this,void 0,void 0,(function(){var e,t;return l(this,(function(n){switch(n.label){case 0:return[4,Promise.all([r.e(278),r.e(125)]).then(r.bind(r,8125))];case 1:return[4,n.sent().getTorusProviderInstance()];case 2:return[4,(e=n.sent()).init()];case 3:return n.sent(),[4,e.login()];case 4:return n.sent(),t=new o.Q(e.provider,"any"),[2,this.registerEvmProvider(t,"Torus")]}}))}))},e.prototype.Phantom=function(e){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return(0,f.kg)(2,"connect Phantom"),void 0===window.solana?[3,2]:[4,this.registerSolanaProvider(window.solana,"phantom")];case 1:return[2,e.sent()];case 2:throw new Error("Phantom is not available. Please check the extension is supported and active.")}}))}))},e.prototype.SafeConnect=function(e){return u(this,void 0,void 0,(function(){var e,t;return l(this,(function(r){switch(r.label){case 0:return(0,f.kg)(2,"connect SafeConnect"),[4,this.getSafeConnectProvider()];case 1:return[4,(e=r.sent()).initSafeConnect()];case 2:return t=r.sent(),this.registerNewWalletAddress(t,1,"SafeConnect",e,"evm"),[2,t]}}))}))},e.prototype.Flow=function(e){return u(this,void 0,void 0,(function(){var e,t,n;return l(this,(function(i){switch(i.label){case 0:return[4,Promise.all([r.e(817),r.e(83)]).then(r.bind(r,29083))];case 1:return e=i.sent(),[4,(t=e.getFlowProvider()).currentUser.authenticate()];case 2:return i.sent(),[4,t.currentUser.snapshot()];case 3:if(!(n=i.sent()).addr)throw new Error("Failed to connect Flow wallet");return this.registerNewWalletAddress(n.addr,1,"flow",t,"flow"),[2,n.addr]}}))}))},e.prototype.Ultra=function(){var e;return u(this,void 0,void 0,(function(){var t,r;return l(this,(function(n){switch(n.label){case 0:return[4,window.ultra.connect()];case 1:t=n.sent(),r="";try{r=null===(e=t.data)||void 0===e?void 0:e.blockchainid.split("@")[0]}catch(e){throw new Error("Failed to get Ultra wallet address")}if(!r)throw new Error("Failed to get Ultra wallet address");return this.registerNewWalletAddress(r,1,"ultra",window.ultra,"ultra"),[2,r]}}))}))},e.prototype.safeConnectAvailable=function(){return void 0!==this.safeConnectOptions},e.prototype.getSafeConnectProvider=function(){return u(this,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return[4,Promise.resolve().then(r.bind(r,92485))];case 1:return[2,new(0,e.sent().SafeConnectProvider)(this.client.getUi(),this.safeConnectOptions)]}}))}))},e.LOCAL_STORAGE_KEY="tn-wallet-connections",e}();const h=d},70655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>A,__asyncGenerator:()=>w,__asyncValues:()=>E,__await:()=>v,__awaiter:()=>u,__classPrivateFieldGet:()=>x,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>P,__createBinding:()=>d,__decorate:()=>a,__exportStar:()=>h,__extends:()=>i,__generator:()=>l,__importDefault:()=>S,__importStar:()=>T,__makeTemplateObject:()=>_,__metadata:()=>c,__param:()=>s,__read:()=>y,__rest:()=>f,__spread:()=>b,__spreadArray:()=>m,__spreadArrays:()=>g,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f}function s(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f}function b(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof v?Promise.resolve(r.value.v).then(s,c):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return k(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function x(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function P(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},50780:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,i){var o,f=0;for(o=0;o>>8)-1}function b(e,t,r,n){return y(e,t,r,n,16)}function g(e,t,r,n){return y(e,t,r,n,32)}function m(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,f=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,b=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=o,E=f,_=a,k=s,T=c,S=u,x=l,P=d,I=h,M=p,O=y,C=b,B=g,R=m,D=v,N=w,U=0;U<20;U+=2)A^=(i=(B^=(i=(I^=(i=(T^=(i=A+B|0)<<7|i>>>25)+A|0)<<9|i>>>23)+T|0)<<13|i>>>19)+I|0)<<18|i>>>14,S^=(i=(E^=(i=(R^=(i=(M^=(i=S+E|0)<<7|i>>>25)+S|0)<<9|i>>>23)+M|0)<<13|i>>>19)+R|0)<<18|i>>>14,O^=(i=(x^=(i=(_^=(i=(D^=(i=O+x|0)<<7|i>>>25)+O|0)<<9|i>>>23)+D|0)<<13|i>>>19)+_|0)<<18|i>>>14,N^=(i=(C^=(i=(P^=(i=(k^=(i=N+C|0)<<7|i>>>25)+N|0)<<9|i>>>23)+k|0)<<13|i>>>19)+P|0)<<18|i>>>14,A^=(i=(k^=(i=(_^=(i=(E^=(i=A+k|0)<<7|i>>>25)+A|0)<<9|i>>>23)+E|0)<<13|i>>>19)+_|0)<<18|i>>>14,S^=(i=(T^=(i=(P^=(i=(x^=(i=S+T|0)<<7|i>>>25)+S|0)<<9|i>>>23)+x|0)<<13|i>>>19)+P|0)<<18|i>>>14,O^=(i=(M^=(i=(I^=(i=(C^=(i=O+M|0)<<7|i>>>25)+O|0)<<9|i>>>23)+C|0)<<13|i>>>19)+I|0)<<18|i>>>14,N^=(i=(D^=(i=(R^=(i=(B^=(i=N+D|0)<<7|i>>>25)+N|0)<<9|i>>>23)+B|0)<<13|i>>>19)+R|0)<<18|i>>>14;A=A+o|0,E=E+f|0,_=_+a|0,k=k+s|0,T=T+c|0,S=S+u|0,x=x+l|0,P=P+d|0,I=I+h|0,M=M+p|0,O=O+y|0,C=C+b|0,B=B+g|0,R=R+m|0,D=D+v|0,N=N+w|0,e[0]=A>>>0&255,e[1]=A>>>8&255,e[2]=A>>>16&255,e[3]=A>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=x>>>0&255,e[25]=x>>>8&255,e[26]=x>>>16&255,e[27]=x>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=M>>>0&255,e[37]=M>>>8&255,e[38]=M>>>16&255,e[39]=M>>>24&255,e[40]=O>>>0&255,e[41]=O>>>8&255,e[42]=O>>>16&255,e[43]=O>>>24&255,e[44]=C>>>0&255,e[45]=C>>>8&255,e[46]=C>>>16&255,e[47]=C>>>24&255,e[48]=B>>>0&255,e[49]=B>>>8&255,e[50]=B>>>16&255,e[51]=B>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,f=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,b=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=0;A<20;A+=2)o^=(i=(g^=(i=(h^=(i=(c^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+h|0)<<18|i>>>14,u^=(i=(f^=(i=(m^=(i=(p^=(i=u+f|0)<<7|i>>>25)+u|0)<<9|i>>>23)+p|0)<<13|i>>>19)+m|0)<<18|i>>>14,y^=(i=(l^=(i=(a^=(i=(v^=(i=y+l|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(b^=(i=(d^=(i=(s^=(i=w+b|0)<<7|i>>>25)+w|0)<<9|i>>>23)+s|0)<<13|i>>>19)+d|0)<<18|i>>>14,o^=(i=(s^=(i=(a^=(i=(f^=(i=o+s|0)<<7|i>>>25)+o|0)<<9|i>>>23)+f|0)<<13|i>>>19)+a|0)<<18|i>>>14,u^=(i=(c^=(i=(d^=(i=(l^=(i=u+c|0)<<7|i>>>25)+u|0)<<9|i>>>23)+l|0)<<13|i>>>19)+d|0)<<18|i>>>14,y^=(i=(p^=(i=(h^=(i=(b^=(i=y+p|0)<<7|i>>>25)+y|0)<<9|i>>>23)+b|0)<<13|i>>>19)+h|0)<<18|i>>>14,w^=(i=(v^=(i=(m^=(i=(g^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+g|0)<<13|i>>>19)+m|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,n,i,o,f){var a,s,c=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=o[s];for(;i>=64;){for(m(u,c,f,w),s=0;s<64;s++)e[t+s]=r[n+s]^u[s];for(a=1,s=8;s<16;s++)a=a+(255&c[s])|0,c[s]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(m(u,c,f,w),s=0;s=64;){for(m(s,a,i,w),f=0;f<64;f++)e[t+f]=s[f];for(o=1,f=8;f<16;f++)o=o+(255&a[f])|0,a[f]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(m(s,a,i,w),f=0;f>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,f=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|f<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(f>>>11|a<<5),s=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,r,n,i,o){var f=new T(o);return f.update(r,n,i),f.finish(e,t),0}function x(e,t,r,n,i,o){var f=new Uint8Array(16);return S(f,0,r,n,i,o),b(e,t,f,0)}function P(e,t,r,n,i){var o;if(r<32)return-1;for(k(e,0,t,0,r,n,i),S(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function I(e,t,r,n,i){var o,f=new Uint8Array(32);if(r<32)return-1;if(_(f,0,32,n,i),0!==x(t,16,t,32,r-32,f))return-1;for(k(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function M(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function O(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function C(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function B(e,r){var n,i,o,f=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(O(a),O(a),O(a),i=0;i<2;i++){for(f[0]=a[0]-65517,n=1;n<15;n++)f[n]=a[n]-65535-(f[n-1]>>16&1),f[n-1]&=65535;f[15]=a[15]-32767-(f[14]>>16&1),o=f[15]>>16&1,f[14]&=65535,C(a,f,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function R(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return B(r,e),B(n,t),g(r,0,n,0)}function D(e){var t=new Uint8Array(32);return B(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,i,o=0,f=0,a=0,s=0,c=0,u=0,l=0,d=0,h=0,p=0,y=0,b=0,g=0,m=0,v=0,w=0,A=0,E=0,_=0,k=0,T=0,S=0,x=0,P=0,I=0,M=0,O=0,C=0,B=0,R=0,D=0,N=r[0],U=r[1],L=r[2],F=r[3],j=r[4],z=r[5],V=r[6],H=r[7],K=r[8],G=r[9],q=r[10],W=r[11],Q=r[12],J=r[13],Y=r[14],Z=r[15];o+=(n=t[0])*N,f+=n*U,a+=n*L,s+=n*F,c+=n*j,u+=n*z,l+=n*V,d+=n*H,h+=n*K,p+=n*G,y+=n*q,b+=n*W,g+=n*Q,m+=n*J,v+=n*Y,w+=n*Z,f+=(n=t[1])*N,a+=n*U,s+=n*L,c+=n*F,u+=n*j,l+=n*z,d+=n*V,h+=n*H,p+=n*K,y+=n*G,b+=n*q,g+=n*W,m+=n*Q,v+=n*J,w+=n*Y,A+=n*Z,a+=(n=t[2])*N,s+=n*U,c+=n*L,u+=n*F,l+=n*j,d+=n*z,h+=n*V,p+=n*H,y+=n*K,b+=n*G,g+=n*q,m+=n*W,v+=n*Q,w+=n*J,A+=n*Y,E+=n*Z,s+=(n=t[3])*N,c+=n*U,u+=n*L,l+=n*F,d+=n*j,h+=n*z,p+=n*V,y+=n*H,b+=n*K,g+=n*G,m+=n*q,v+=n*W,w+=n*Q,A+=n*J,E+=n*Y,_+=n*Z,c+=(n=t[4])*N,u+=n*U,l+=n*L,d+=n*F,h+=n*j,p+=n*z,y+=n*V,b+=n*H,g+=n*K,m+=n*G,v+=n*q,w+=n*W,A+=n*Q,E+=n*J,_+=n*Y,k+=n*Z,u+=(n=t[5])*N,l+=n*U,d+=n*L,h+=n*F,p+=n*j,y+=n*z,b+=n*V,g+=n*H,m+=n*K,v+=n*G,w+=n*q,A+=n*W,E+=n*Q,_+=n*J,k+=n*Y,T+=n*Z,l+=(n=t[6])*N,d+=n*U,h+=n*L,p+=n*F,y+=n*j,b+=n*z,g+=n*V,m+=n*H,v+=n*K,w+=n*G,A+=n*q,E+=n*W,_+=n*Q,k+=n*J,T+=n*Y,S+=n*Z,d+=(n=t[7])*N,h+=n*U,p+=n*L,y+=n*F,b+=n*j,g+=n*z,m+=n*V,v+=n*H,w+=n*K,A+=n*G,E+=n*q,_+=n*W,k+=n*Q,T+=n*J,S+=n*Y,x+=n*Z,h+=(n=t[8])*N,p+=n*U,y+=n*L,b+=n*F,g+=n*j,m+=n*z,v+=n*V,w+=n*H,A+=n*K,E+=n*G,_+=n*q,k+=n*W,T+=n*Q,S+=n*J,x+=n*Y,P+=n*Z,p+=(n=t[9])*N,y+=n*U,b+=n*L,g+=n*F,m+=n*j,v+=n*z,w+=n*V,A+=n*H,E+=n*K,_+=n*G,k+=n*q,T+=n*W,S+=n*Q,x+=n*J,P+=n*Y,I+=n*Z,y+=(n=t[10])*N,b+=n*U,g+=n*L,m+=n*F,v+=n*j,w+=n*z,A+=n*V,E+=n*H,_+=n*K,k+=n*G,T+=n*q,S+=n*W,x+=n*Q,P+=n*J,I+=n*Y,M+=n*Z,b+=(n=t[11])*N,g+=n*U,m+=n*L,v+=n*F,w+=n*j,A+=n*z,E+=n*V,_+=n*H,k+=n*K,T+=n*G,S+=n*q,x+=n*W,P+=n*Q,I+=n*J,M+=n*Y,O+=n*Z,g+=(n=t[12])*N,m+=n*U,v+=n*L,w+=n*F,A+=n*j,E+=n*z,_+=n*V,k+=n*H,T+=n*K,S+=n*G,x+=n*q,P+=n*W,I+=n*Q,M+=n*J,O+=n*Y,C+=n*Z,m+=(n=t[13])*N,v+=n*U,w+=n*L,A+=n*F,E+=n*j,_+=n*z,k+=n*V,T+=n*H,S+=n*K,x+=n*G,P+=n*q,I+=n*W,M+=n*Q,O+=n*J,C+=n*Y,B+=n*Z,v+=(n=t[14])*N,w+=n*U,A+=n*L,E+=n*F,_+=n*j,k+=n*z,T+=n*V,S+=n*H,x+=n*K,P+=n*G,I+=n*q,M+=n*W,O+=n*Q,C+=n*J,B+=n*Y,R+=n*Z,w+=(n=t[15])*N,f+=38*(E+=n*L),a+=38*(_+=n*F),s+=38*(k+=n*j),c+=38*(T+=n*z),u+=38*(S+=n*V),l+=38*(x+=n*H),d+=38*(P+=n*K),h+=38*(I+=n*G),p+=38*(M+=n*q),y+=38*(O+=n*W),b+=38*(C+=n*Q),g+=38*(B+=n*J),m+=38*(R+=n*Y),v+=38*(D+=n*Z),o=(n=(o+=38*(A+=n*U))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=f,e[2]=a,e[3]=s,e[4]=c,e[5]=u,e[6]=l,e[7]=d,e[8]=h,e[9]=p,e[10]=y,e[11]=b,e[12]=g,e[13]=m,e[14]=v,e[15]=w}function j(e,t){F(e,t,t)}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)j(i,i),2!==n&&4!==n&&F(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function V(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)j(i,i),1!==n&&F(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,f=new Uint8Array(32),a=new Float64Array(80),c=t(),u=t(),l=t(),d=t(),h=t(),p=t();for(o=0;o<31;o++)f[o]=r[o];for(f[31]=127&r[31]|64,f[0]&=248,N(a,n),o=0;o<16;o++)u[o]=a[o],d[o]=c[o]=l[o]=0;for(c[0]=d[0]=1,o=254;o>=0;--o)C(c,u,i=f[o>>>3]>>>(7&o)&1),C(l,d,i),U(h,c,l),L(c,c,l),U(l,u,d),L(u,u,d),j(d,h),j(p,c),F(c,l,c),F(l,u,h),U(h,c,l),L(c,c,l),j(u,c),L(l,d,p),F(c,l,s),U(c,c,d),F(l,l,c),F(c,d,p),F(d,u,a),j(u,h),C(c,u,i),C(l,d,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=l[o],a[o+48]=u[o],a[o+64]=d[o];var y=a.subarray(32),b=a.subarray(16);return z(y,y),F(b,b,y),B(e,b),0}function K(e,t){return H(e,t,o)}function G(e,t){return n(t,32),K(e,t)}function q(e,t,r){var n=new Uint8Array(32);return H(n,r,t),v(e,i,n,w)}T.prototype.blocks=function(e,t,r){for(var n,i,o,f,a,s,c,u,l,d,h,p,y,b,g,m,v,w,A,E=this.fin?0:2048,_=this.h[0],k=this.h[1],T=this.h[2],S=this.h[3],x=this.h[4],P=this.h[5],I=this.h[6],M=this.h[7],O=this.h[8],C=this.h[9],B=this.r[0],R=this.r[1],D=this.r[2],N=this.r[3],U=this.r[4],L=this.r[5],F=this.r[6],j=this.r[7],z=this.r[8],V=this.r[9];r>=16;)d=l=0,d+=(_+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*B,d+=(k+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),d+=(T+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),d+=(S+=8191&(o>>>7|(f=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*j),l=(d+=(x+=8191&(f>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,d&=8191,d+=(P+=a>>>1&8191)*(5*L),d+=(I+=8191&(a>>>14|(s=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*U),d+=(M+=8191&(s>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),d+=(O+=8191&(c>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),h=l+=(d+=(C+=u>>>5|E)*(5*R))>>>13,h+=_*R,h+=k*B,h+=T*(5*V),h+=S*(5*z),l=(h+=x*(5*j))>>>13,h&=8191,h+=P*(5*F),h+=I*(5*L),h+=M*(5*U),h+=O*(5*N),l+=(h+=C*(5*D))>>>13,h&=8191,p=l,p+=_*D,p+=k*R,p+=T*B,p+=S*(5*V),l=(p+=x*(5*z))>>>13,p&=8191,p+=P*(5*j),p+=I*(5*F),p+=M*(5*L),p+=O*(5*U),y=l+=(p+=C*(5*N))>>>13,y+=_*N,y+=k*D,y+=T*R,y+=S*B,l=(y+=x*(5*V))>>>13,y&=8191,y+=P*(5*z),y+=I*(5*j),y+=M*(5*F),y+=O*(5*L),b=l+=(y+=C*(5*U))>>>13,b+=_*U,b+=k*N,b+=T*D,b+=S*R,l=(b+=x*B)>>>13,b&=8191,b+=P*(5*V),b+=I*(5*z),b+=M*(5*j),b+=O*(5*F),g=l+=(b+=C*(5*L))>>>13,g+=_*L,g+=k*U,g+=T*N,g+=S*D,l=(g+=x*R)>>>13,g&=8191,g+=P*B,g+=I*(5*V),g+=M*(5*z),g+=O*(5*j),m=l+=(g+=C*(5*F))>>>13,m+=_*F,m+=k*L,m+=T*U,m+=S*N,l=(m+=x*D)>>>13,m&=8191,m+=P*R,m+=I*B,m+=M*(5*V),m+=O*(5*z),v=l+=(m+=C*(5*j))>>>13,v+=_*j,v+=k*F,v+=T*L,v+=S*U,l=(v+=x*N)>>>13,v&=8191,v+=P*D,v+=I*R,v+=M*B,v+=O*(5*V),w=l+=(v+=C*(5*z))>>>13,w+=_*z,w+=k*j,w+=T*F,w+=S*L,l=(w+=x*U)>>>13,w&=8191,w+=P*N,w+=I*D,w+=M*R,w+=O*B,A=l+=(w+=C*(5*V))>>>13,A+=_*V,A+=k*z,A+=T*j,A+=S*F,l=(A+=x*L)>>>13,A&=8191,A+=P*U,A+=I*N,A+=M*D,A+=O*R,_=d=8191&(l=(l=((l+=(A+=C*B)>>>13)<<2)+l|0)+(d&=8191)|0),k=h+=l>>>=13,T=p&=8191,S=y&=8191,x=b&=8191,P=g&=8191,I=m&=8191,M=v&=8191,O=w&=8191,C=A&=8191,t+=16,r-=16;this.h[0]=_,this.h[1]=k,this.h[2]=T,this.h[3]=S,this.h[4]=x,this.h[5]=P,this.h[6]=I,this.h[7]=M,this.h[8]=O,this.h[9]=C},T.prototype.finish=function(e,t){var r,n,i,o,f=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,f[0]=this.h[0]+5,r=f[0]>>>13,f[0]&=8191,o=1;o<10;o++)f[o]=this.h[o]+r,r=f[o]>>>13,f[o]&=8191;for(f[9]-=8192,n=(1^r)-1,o=0;o<10;o++)f[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|f[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},T.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(E=0;E<16;E++)_=8*E+Q,M[E]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],O[E]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(E=0;E<80;E++)if(i=C,o=B,f=R,a=D,s=N,c=U,u=L,F,d=j,h=z,p=V,y=H,b=K,g=G,m=q,W,S=65535&(T=W),x=T>>>16,P=65535&(k=F),I=k>>>16,S+=65535&(T=(K>>>14|N<<18)^(K>>>18|N<<14)^(N>>>9|K<<23)),x+=T>>>16,P+=65535&(k=(N>>>14|K<<18)^(N>>>18|K<<14)^(K>>>9|N<<23)),I+=k>>>16,S+=65535&(T=K&G^~K&q),x+=T>>>16,P+=65535&(k=N&U^~N&L),I+=k>>>16,k=J[2*E],S+=65535&(T=J[2*E+1]),x+=T>>>16,P+=65535&k,I+=k>>>16,k=M[E%16],x+=(T=O[E%16])>>>16,P+=65535&k,I+=k>>>16,P+=(x+=(S+=65535&T)>>>16)>>>16,S=65535&(T=A=65535&S|x<<16),x=T>>>16,P=65535&(k=w=65535&P|(I+=P>>>16)<<16),I=k>>>16,S+=65535&(T=(j>>>28|C<<4)^(C>>>2|j<<30)^(C>>>7|j<<25)),x+=T>>>16,P+=65535&(k=(C>>>28|j<<4)^(j>>>2|C<<30)^(j>>>7|C<<25)),I+=k>>>16,x+=(T=j&z^j&V^z&V)>>>16,P+=65535&(k=C&B^C&R^B&R),I+=k>>>16,l=65535&(P+=(x+=(S+=65535&T)>>>16)>>>16)|(I+=P>>>16)<<16,v=65535&S|x<<16,S=65535&(T=y),x=T>>>16,P=65535&(k=a),I=k>>>16,x+=(T=A)>>>16,P+=65535&(k=w),I+=k>>>16,B=i,R=o,D=f,N=a=65535&(P+=(x+=(S+=65535&T)>>>16)>>>16)|(I+=P>>>16)<<16,U=s,L=c,F=u,C=l,z=d,V=h,H=p,K=y=65535&S|x<<16,G=b,q=g,W=m,j=v,E%16==15)for(_=0;_<16;_++)k=M[_],S=65535&(T=O[_]),x=T>>>16,P=65535&k,I=k>>>16,k=M[(_+9)%16],S+=65535&(T=O[(_+9)%16]),x+=T>>>16,P+=65535&k,I+=k>>>16,w=M[(_+1)%16],S+=65535&(T=((A=O[(_+1)%16])>>>1|w<<31)^(A>>>8|w<<24)^(A>>>7|w<<25)),x+=T>>>16,P+=65535&(k=(w>>>1|A<<31)^(w>>>8|A<<24)^w>>>7),I+=k>>>16,w=M[(_+14)%16],x+=(T=((A=O[(_+14)%16])>>>19|w<<13)^(w>>>29|A<<3)^(A>>>6|w<<26))>>>16,P+=65535&(k=(w>>>19|A<<13)^(A>>>29|w<<3)^w>>>6),I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,M[_]=65535&P|I<<16,O[_]=65535&S|x<<16;S=65535&(T=j),x=T>>>16,P=65535&(k=C),I=k>>>16,k=e[0],x+=(T=t[0])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[0]=C=65535&P|I<<16,t[0]=j=65535&S|x<<16,S=65535&(T=z),x=T>>>16,P=65535&(k=B),I=k>>>16,k=e[1],x+=(T=t[1])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[1]=B=65535&P|I<<16,t[1]=z=65535&S|x<<16,S=65535&(T=V),x=T>>>16,P=65535&(k=R),I=k>>>16,k=e[2],x+=(T=t[2])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[2]=R=65535&P|I<<16,t[2]=V=65535&S|x<<16,S=65535&(T=H),x=T>>>16,P=65535&(k=D),I=k>>>16,k=e[3],x+=(T=t[3])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[3]=D=65535&P|I<<16,t[3]=H=65535&S|x<<16,S=65535&(T=K),x=T>>>16,P=65535&(k=N),I=k>>>16,k=e[4],x+=(T=t[4])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[4]=N=65535&P|I<<16,t[4]=K=65535&S|x<<16,S=65535&(T=G),x=T>>>16,P=65535&(k=U),I=k>>>16,k=e[5],x+=(T=t[5])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[5]=U=65535&P|I<<16,t[5]=G=65535&S|x<<16,S=65535&(T=q),x=T>>>16,P=65535&(k=L),I=k>>>16,k=e[6],x+=(T=t[6])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[6]=L=65535&P|I<<16,t[6]=q=65535&S|x<<16,S=65535&(T=W),x=T>>>16,P=65535&(k=F),I=k>>>16,k=e[7],x+=(T=t[7])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[7]=F=65535&P|I<<16,t[7]=W=65535&S|x<<16,Q+=128,n-=128}return n}function Z(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),f=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,t,r),r%=128,n=0;n=0;--i)$(e,t,n=r[i/8|0]>>(7&i)&1),X(t,e),X(e,e),$(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];M(n[0],l),M(n[1],d),M(n[2],a),F(n[3],l,d),te(e,n,r)}function ne(e,r,i){var o,f=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),Z(f,r,32),f[0]&=248,f[31]&=127,f[31]|=64,re(a,f),ee(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function fe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function ae(e,r,n,i){var o,f,a=new Uint8Array(64),s=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),l=[t(),t(),t(),t()];Z(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var d=n+64;for(o=0;o>7&&L(e[0],f,e[0]),F(e[3],e[0],e[1]),0)}(d,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(be),t=new Uint8Array(ge);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ve(e),e.length!==ge)throw new Error("bad secret key size");for(var t=new Uint8Array(be),r=0;r{},27912:()=>{},9278:()=>{},46601:()=>{},89214:()=>{},85568:()=>{},51238:()=>{},24654:()=>{},55024:()=>{},17061:(e,t,r)=>{var n=r(18698).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,o=r.hasOwnProperty,f=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),a=new P(n||[]);return f(o,"_invoke",{value:k(e,r,a)}),o}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p={};function y(){}function b(){}function g(){}var m={};l(m,s,(function(){return this}));var v=Object.getPrototypeOf,w=v&&v(v(I([])));w&&w!==r&&o.call(w,s)&&(m=w);var A=g.prototype=y.prototype=Object.create(m);function E(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function r(i,f,a,s){var c=h(e[i],e,f);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==n(l)&&o.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;f(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}})}function k(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return M()}for(r.method=i,r.arg=o;;){var f=r.delegate;if(f){var a=T(f,r);if(a){if(a===p)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function T(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=h(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function I(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var i=this.tryEntries[n],f=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},18698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},64687:(e,t,r)=>{var n=r(17061)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},84102:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Authenticator=void 0;const n=r(58204),i=r(65185),o=r(55050),f=r(80716),a=r(58015),s=r(5393),c=r(94807),u=r(92219),l=r(73506),d=r(3365),h=r(14246),p=r(49674),y=r(22110),b=r(95899),g=r(81453),m=r(19421),v=r(27309);let w;w="object"==typeof crypto&&crypto.subtle?crypto.subtle:r(9278).webcrypto.subtle;class A{static decodePublicKey(e){return i.KeyPair.publicFromBase64orPEM(e)}static async getUseTicket(e,t,r,s,c,u){let l,d,h;try{u=i.KeyPair.parseKeyArrayStrings(u)}catch(e){throw(0,o.logger)(m.DEBUGLEVEL.LOW,e),new Error("Issuer key error")}if(!r)throw new Error("Ticket is empty");if(l=n.Ticket.fromBase64(r,u),!l.checkValidity())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not validate ticket"),new Error("Ticket Validation failed");if(!l.verify())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not verify ticket"),new Error("Ticket Verification failed");if((0,o.logger)(m.DEBUGLEVEL.MEDIUM,"ticked valid (signature OK)"),!c)throw new Error("Attesator key not defined");try{h=i.KeyPair.publicFromBase64orPEM(c)}catch(e){throw new Error("Attesator key read error")}try{d=f.SignedIdentifierAttestation.fromBytes((0,o.base64ToUint8array)(s),h)}catch(e){throw new Error("IDAttestation decode error")}if(!d.checkValidity())throw new Error("IDAttestation Validation failed");if(!d.verify())throw new Error("IDAttestation Verification failed");(0,o.logger)(m.DEBUGLEVEL.HIGH,"attestation valid");try{let r=new a.AttestedObject;r.create(l,d,t,e);let n=r.getDerEncoding();return(0,o.logger)(m.DEBUGLEVEL.HIGH,n),(0,o.hexStringToBase64)(n)}catch(e){let t="";throw e instanceof Error&&(t=e.message),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"getUseTicket: redeem failed",e),new Error("Attestation doesnt fit Ticket: "+t)}}static validateUseTicket(e,t,r,f){let s=i.KeyPair.publicFromBase64orPEM(t),c=i.KeyPair.parseKeyArrayStrings(r);try{let t=a.AttestedObject.fromBytes((0,o.base64ToUint8array)(e),v.UseToken,s,n.Ticket,c);if((0,o.logger)(m.DEBUGLEVEL.LOW,"Verified attested object"),!t.checkValidity(f))throw new Error("Ticket validity check failed!");return t}catch(e){if(e instanceof Error){let t="Ticket proof validation failed! "+e.message;throw(0,o.logger)(m.DEBUGLEVEL.MEDIUM,t),new Error(t)}}}static async requestAttest(e,t,r,n,i){let f,a=new s.AttestationCrypto;if(i)f=i.getAddress();else try{f=await h.SignatureUtility.connectMetamaskAndGetAddress()}catch(e){return(0,o.logger)(m.DEBUGLEVEL.LOW,"Cant find user Ethereum Address. Please check Metamask. "+e),void(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e)}let d=await u.Nonce.makeNonce(f,r);(0,o.logger)(m.DEBUGLEVEL.HIGH,"nonce = "+(0,o.uint8tohex)(d));let p=a.computeAttestationProof(n,d),y=c.AttestationRequest.fromData(a.getType(t),p),b=new l.Eip712AttestationRequest(i);return await b.addData(r,void 0,e,y),A.checkAttestRequestVerifiability(b),A.checkAttestRequestValidity(b),b.getJsonEncoding()}static constructAttest(e,t,r,n,i,a=""){let c,u,h,p=new s.AttestationCrypto;try{u=new l.Eip712AttestationRequest,u.setDomain(i),a&&u.setUsageValue(a),u.fillJsonData(n),A.checkAttestRequestVerifiability(u),A.checkAttestRequestValidity(u)}catch(e){let t="Failed to fill attestation data from json. "+e+"\nRestores as an Eip712AttestationRequestWithUsage object instead";(0,o.logger)(m.DEBUGLEVEL.MEDIUM,t);try{u=new b.Eip712AttestationRequestWithUsage,u.setDomain(i),u.fillJsonData(n),A.checkAttestRequestVerifiability(u),A.checkAttestRequestValidity(u)}catch(e){let t="Failed to parse Eip712AttestationRequestWithUsage. "+e;throw(0,o.logger)(m.DEBUGLEVEL.LOW,t),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e),new Error(t)}}h=p.makeCommitmentFromHiding(u.getIdentifier(),u.getType(),u.getPok().getRiddle()),c=new d.IdentifierAttestation,c.fromCommitment(h,u.getUserPublicKey()),c.setIssuer("CN="+t),c.setSerialNumber(Math.round(Math.random()*Number.MAX_SAFE_INTEGER));let y=Date.now();return c.setNotValidBefore(y),c.setNotValidAfter(y+r),f.SignedIdentifierAttestation.fromData(c,e).getDerEncoding()}static async useAttest(e,t,r,n,i,a,c,l){const d=(0,o.base64ToUint8array)(e);let b,g=f.SignedIdentifierAttestation.fromBytes(d,r),v=(0,o.base64ToUint8array)(t),w=(0,o.uint8ToBn)(v.slice(4)),A=new s.AttestationCrypto;b=l?l.getAddress():await h.SignatureUtility.connectMetamaskAndGetAddress();let E=await u.Nonce.makeNonce(b,a),_=A.computeAttestationProof(w,E);try{let e=p.UseAttestation.fromData(g,A.getType(i),_,c),t=new y.Eip712AttestationUsage(l),r=await t.addData(a,n,e);return(0,o.logger)(m.DEBUGLEVEL.HIGH,"usageRequest ready state = "+r),(0,o.logger)(m.DEBUGLEVEL.HIGH,"usageRequest.getJsonEncoding() = "+t.getJsonEncoding()),t.getJsonEncoding()}catch(e){(0,o.logger)(m.DEBUGLEVEL.LOW,e)}}static checkAttestRequestVerifiability(e){if(!e.verify())throw(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"Could not verify attestation signing request"),new Error("Verification failed")}static checkAttestRequestValidity(e){if(!e.checkValidity())throw(0,o.logger)(m.DEBUGLEVEL.HIGH,"Could not validate attestation signing request"),new Error("Validation failed")}static checkUsageVerifiability(e){if(!e.verify())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not verify usage request"),new Error("Verification failed")}static checkUsageValidity(e){if(!e.checkTokenValidity())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not validate usage request"),new Error("Validation failed")}static async verifyUsage(e,t,r,n,f){let a;try{let r=new y.Eip712AttestationUsage;r.setDomain(n),r.fillJsonData(e,t),A.checkUsageVerifiability(r),A.checkUsageValidity(r),a=r.getSessionPublicKey()}catch(t){(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"Eip712AttestationUsage failed. "+t+". Lets try to verify Eip712AttestationRequestWithUsage");let r=new b.Eip712AttestationRequestWithUsage;r.setDomain(n),r.fillJsonData(e),A.checkUsageVerifiability(r),A.checkUsageValidity(r),a=r.getSessionPublicKey(),(0,o.logger)(m.DEBUGLEVEL.HIGH,"sessionPublicKey from Eip712AttestationRequestWithUsage = "+a.getAddress())}try{if(!await a.verifyStringWithSubtle(i.KeyPair.anySignatureToRawUint8(f),r))throw(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"Could not verify message signature"),new Error("Signature verification failed");return"SUCCESSFULLY validated usage request!"}catch(e){let t="Cant verify session with subtle. "+e;(0,o.logger)(m.DEBUGLEVEL.LOW,t),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e)}}static async requestAttestAndUsage(e,t,r,n,i,f){try{let a,c=(0,o.uint8ToBn)((0,o.base64ToUint8array)(i));a=e?e.getAddress():await h.SignatureUtility.connectMetamaskAndGetAddress();let l=await u.Nonce.makeNonce(a,n,new Uint8Array(0),Date.now()),d=new s.AttestationCrypto,p=d.computeAttestationProof(c,l),y=g.AttestationRequestWithUsage.fromData(d.getType(r),p,f),v=new b.Eip712AttestationRequestWithUsage(e);return await v.fromData(n,void 0,void 0,t,y),(0,o.logger)(m.DEBUGLEVEL.HIGH,"request.getJsonEncoding() = "+v.getJsonEncoding()),v.getJsonEncoding()}catch(e){let t="requestAttestAndUsage error. "+e;(0,o.logger)(m.DEBUGLEVEL.LOW,t),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e)}}static validateTicket(e,t,r){let f,a={};try{a[t]=i.KeyPair.parseKeyArrayStrings({[t]:r})[t]}catch(e){return{valid:!1,massage:"Broken Public Key"}}try{f=n.Ticket.fromBase64(e,a)}catch(e){return(0,o.logger)(m.DEBUGLEVEL.LOW,e),{valid:!1,massage:"Wrong Ticket"}}return{valid:!0,ticketId:f.getTicketId(),ticketClass:f.getTicketClass()}}}t.Authenticator=A},58204:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ticket=void 0;const n=r(5393),i=r(65185),o=r(13649),f=r(4625),a=r(55050),s=r(79896),c=r(39980),u=r(86623);class l extends f.AttestableObject{constructor(){super(),this.magicLinkURLPrefix="https://ticket.devcon.org/",this.isLegasy=!1}fromData(e,t,r,n){this.ticketId=t,this.ticketClass=r,this.devconId=e,this.keys=n;const i=n[e];this.setKeys(i)}setKeys(e){Array.isArray(e)?(this.issuerKeys=e,this.key=e[0]):(this.issuerKeys=[e],this.key=e)}createWithCommitment(e,t,r,n,i,o){if(this.fromData(e,t,r,o),this.commitment=n,this.signature=i,this.encoded=this.encodeSignedTicket(this.makeTicket()),!this.verify())throw new Error("Ticket Signature is invalid")}static createWithMail(e,t,r,i,o,f){let s=new this;s.fromData(t,r,i,o);let c,u=new n.AttestationCrypto;try{s.commitment=u.makeCommitment(e,u.getType("mail"),f);let t=s.makeTicket();c=s.key.signRawBytesWithEthereum((0,a.hexStringToArray)(t))}catch(e){let t="";throw e instanceof Error&&(t=e.message),new Error(t)}return s.createWithCommitment(t,r,i,s.commitment,c,o),s}makeTicket(){let e;try{const t=BigInt(this.ticketId);e=o.Asn1Der.encode("INTEGER",t)}catch(t){e=o.Asn1Der.encode("UTF8STRING",this.ticketId)}let t=o.Asn1Der.encode("UTF8STRING",this.devconId)+e+o.Asn1Der.encode("INTEGER",this.ticketClass);return this.isLegasy||(t+=o.Asn1Der.encode("OCTET_STRING",(0,a.uint8tohex)(this.commitment))),o.Asn1Der.encode("SEQUENCE_30",t)}encodeSignedTicket(e){return this.isLegasy&&(e+=o.Asn1Der.encode("OCTET_STRING",(0,a.uint8tohex)(this.commitment))),e+=o.Asn1Der.encode("BIT_STRING",this.signature),o.Asn1Der.encode("SEQUENCE_30",e)}getDerEncodingWithPK(){let e=this.makeTicket()+o.Asn1Der.encode("OCTET_STRING",(0,a.uint8tohex)(this.commitment))+this.key.getAsnDerPublic()+o.Asn1Der.encode("BIT_STRING",this.signature);return o.Asn1Der.encode("SEQUENCE_30",e)}getDerEncoding(){return this.encoded}verify(){const e=(0,a.hexStringToArray)(this.makeTicket()),t=(0,a.hexStringToArray)(u.ethers.utils.keccak256(e)),r=(0,a.uint8tohex)(i.KeyPair.anySignatureToRawUint8(this.signature)),n=u.ethers.utils.recoverPublicKey(t,u.ethers.utils.splitSignature((0,a.hexStringToUint8)(r)));for(const e of this.issuerKeys)if(n.substring(2)===e.getPublicKeyAsHexStr())return this.key=e,!0;throw new Error("Ticket signature is invalid")}checkValidity(){return!0}getTicketId(){return this.ticketId}getTicketClass(){return this.ticketClass}getDevconId(){return this.devconId}getSignature(){return this.signature}static fromBase64(e,t){let r=new this;return r.fromBytes((0,a.base64ToUint8array)(e),t),r}fromBytes(e,t){const r=c.AsnParser.parse(e,s.SignedDevconTicket);let n=r.ticket.devconId;if(!t||!t[n])throw new Error("Issuer key "+n+" not defined.");const i=t[n];this.setKeys(i);let o,f=r.ticket.ticketIdNumber,u=f?f.toString():r.ticket.ticketIdString??"",l=r.ticket.ticketClass;if(r.ticket.commitment)o=r.ticket.commitment;else{if(!r.commitment)throw new Error("Commitment not defined.");o=r.commitment,this.isLegasy=!0}let d=r.signatureValue;this.createWithCommitment(n,u,l,new Uint8Array(o),(0,a.uint8tohex)(new Uint8Array(d)),t)}getCommitment(){return this.commitment}getKey(){return this.key}getUrlEncoding(){}}t.Ticket=l},54759:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.MyAttestationDecoded=t.MyAttestation=t.SignedInfo=t.SmartContract=t.Payload=t.PrivateKeyInfo=t.PrivateKeyData=t.SubjectPublicKeyInfo=t.PublicKeyInfoValue=void 0;const i=r(39980),o=r(93312),f=r(83458);class a{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],a.prototype,"algorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],a.prototype,"publicKey",void 0),t.PublicKeyInfoValue=a;let s=class{constructor(){this.null=!1}};n([(0,i.AsnProp)({type:a})],s.prototype,"value",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],s.prototype,"null",void 0),s=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],s),t.SubjectPublicKeyInfo=s;class c{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],c.prototype,"one",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],c.prototype,"privateKey",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any,context:0})],c.prototype,"algDescr",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString,context:1})],c.prototype,"publicKey",void 0),t.PrivateKeyData=c;class u{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],u.prototype,"one",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],u.prototype,"algIdent",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],u.prototype,"keysData",void 0),t.PrivateKeyInfo=u;let l=class{};n([(0,i.AsnProp)({type:o.Extensions,context:3})],l.prototype,"extensions",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any,context:4})],l.prototype,"dataObject",void 0),l=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],l),t.Payload=l;class d{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],d.prototype,"value",void 0),t.SmartContract=d;class h{}n([(0,i.AsnProp)({type:o.Version})],h.prototype,"version",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],h.prototype,"serialNumber",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],h.prototype,"signature",void 0),n([(0,i.AsnProp)({type:f.Name})],h.prototype,"issuer",void 0),n([(0,i.AsnProp)({type:o.ValidityValue,optional:!0})],h.prototype,"validity",void 0),n([(0,i.AsnProp)({type:f.Name})],h.prototype,"subject",void 0),n([(0,i.AsnProp)({type:s})],h.prototype,"subjectPublicKeyInfo",void 0),n([(0,i.AsnProp)({type:d,optional:!0})],h.prototype,"contract",void 0),n([(0,i.AsnProp)({type:l,optional:!0})],h.prototype,"attestsTo",void 0),t.SignedInfo=h;class p{constructor(){this.signedInfo=new Uint8Array}}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],p.prototype,"signedInfo",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],p.prototype,"signatureAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],p.prototype,"signatureValue",void 0),t.MyAttestation=p;class y{}n([(0,i.AsnProp)({type:h})],y.prototype,"signedInfo",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],y.prototype,"signatureAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],y.prototype,"signatureValue",void 0),t.MyAttestationDecoded=y},61709:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Identifier=void 0;const i=r(39980),o=r(61538);class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],f.prototype,"type",void 0),n([(0,i.AsnProp)({type:o.Proof})],f.prototype,"proof",void 0),t.Identifier=f},84962:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Identifier=void 0;const i=r(39980),o=r(61538),f=r(54759);class a{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],a.prototype,"type",void 0),n([(0,i.AsnProp)({type:o.Proof})],a.prototype,"proof",void 0),n([(0,i.AsnProp)({type:f.PublicKeyInfoValue})],a.prototype,"sessionKey",void 0),t.Identifier=a},93312:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=t.Extension=t.ValidityValue=t.Version=t.AlgorithmIdentifierASN=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.ObjectIdentifier})],o.prototype,"algorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any,optional:!0})],o.prototype,"parameters",void 0),t.AlgorithmIdentifierASN=o;class f{constructor(){this.version=0}}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],f.prototype,"version",void 0),t.Version=f;let a=class{};n([(0,i.AsnProp)({type:i.AsnPropTypes.UTCTime})],a.prototype,"utcTime",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.GeneralizedTime})],a.prototype,"generalizedTime",void 0),a=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],a);class s{}n([(0,i.AsnProp)({type:a})],s.prototype,"notBefore",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,optional:!0})],s.prototype,"notBeforeInt",void 0),n([(0,i.AsnProp)({type:a})],s.prototype,"notAfter",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,optional:!0})],s.prototype,"notAfterInt",void 0),t.ValidityValue=s;let c=class{};n([(0,i.AsnProp)({type:s,context:0})],c.prototype,"value",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,context:1})],c.prototype,"null",void 0),c=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],c);class u{}n([(0,i.AsnProp)({type:i.AsnPropTypes.ObjectIdentifier})],u.prototype,"extnId",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Boolean})],u.prototype,"critical",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],u.prototype,"extnValue",void 0),t.Extension=u;class l{}n([(0,i.AsnProp)({type:u})],l.prototype,"extension",void 0),t.Extensions=l},35403:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.EpochTimeValidity=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"notBefore",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"notAfter",void 0),t.EpochTimeValidity=o},95978:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressAttestation=void 0;const i=r(39980),o=r(35403);class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],f.prototype,"subjectPublicKey",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"ethereumAddress",void 0),n([(0,i.AsnProp)({type:o.EpochTimeValidity})],f.prototype,"validity",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],f.prototype,"context",void 0),t.EthereumAddressAttestation=f},42909:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.SignedEthereumKeyLinkingAttestation=t.EthereumKeyLinkingAttestation=void 0;const i=r(39980),o=r(35403),f=r(93312),a=r(52551);class s{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],s.prototype,"subjectEthereumAddress",void 0),n([(0,i.AsnProp)({type:a.SignedLinkedAttestation})],s.prototype,"linkedAttestation",void 0),n([(0,i.AsnProp)({type:o.EpochTimeValidity})],s.prototype,"validity",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],s.prototype,"context",void 0),t.EthereumKeyLinkingAttestation=s;class c{}n([(0,i.AsnProp)({type:s})],c.prototype,"ethereumKeyLinkingAttestation",void 0),n([(0,i.AsnProp)({type:f.AlgorithmIdentifierASN})],c.prototype,"signingAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],c.prototype,"signatureValue",void 0),t.SignedEthereumKeyLinkingAttestation=c},83458:function(e,t,r){"use strict";var n,i,o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Name=t.AttributeTypeAndValue=void 0;const f=r(39980);class a{}o([(0,f.AsnProp)({type:f.AsnPropTypes.ObjectIdentifier})],a.prototype,"type",void 0),o([(0,f.AsnProp)({type:f.AsnPropTypes.Utf8String})],a.prototype,"value",void 0),t.AttributeTypeAndValue=a;let s=n=class extends f.AsnArray{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}};s=n=o([(0,f.AsnType)({type:f.AsnTypeTypes.Set,itemType:a})],s);let c=i=class extends f.AsnArray{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}};c=i=o([(0,f.AsnType)({type:f.AsnTypeTypes.Sequence,itemType:s})],c);let u=class{};o([(0,f.AsnProp)({type:c})],u.prototype,"rdnSequence",void 0),o([(0,f.AsnProp)({type:f.AsnPropTypes.Null})],u.prototype,"null",void 0),u=o([(0,f.AsnType)({type:f.AsnTypeTypes.Choice})],u),t.Name=u},83874:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.NFTOwnershipAttestation=t.ERC721=void 0;const i=r(39980),o=r(35403);class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"address",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],f.prototype,"chainId",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0,repeated:"sequence"})],f.prototype,"tokenIds",void 0),t.ERC721=f;class a{constructor(){this.tokens=[]}}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],a.prototype,"subjectPublicKey",void 0),n([(0,i.AsnProp)({type:f,repeated:"sequence"})],a.prototype,"tokens",void 0),n([(0,i.AsnProp)({type:o.EpochTimeValidity})],a.prototype,"validity",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],a.prototype,"context",void 0),t.NFTOwnershipAttestation=a},61538:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.UsageProof=t.Proof=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"riddle",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"challengePoint",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"responseValue",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"nonce",void 0),t.Proof=o;class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"challengePoint",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"responseValue",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"nonce",void 0),t.UsageProof=f},8573:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"r",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"s",void 0),t.Signature=o},79896:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.SignedDevconTicket=t.DevconTicket=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Utf8String})],o.prototype,"devconId",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,optional:!0})],o.prototype,"ticketIdNumber",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Utf8String,optional:!0})],o.prototype,"ticketIdString",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"ticketClass",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],o.prototype,"commitment",void 0),t.DevconTicket=o;class f{}n([(0,i.AsnProp)({type:o})],f.prototype,"ticket",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],f.prototype,"commitment",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],f.prototype,"signatureValue",void 0),t.SignedDevconTicket=f},52551:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.SignedLinkedAttestation=t.LinkedAttestation=void 0;const i=r(39980),o=r(93312),f=r(83874),a=r(95978);let s=class{};n([(0,i.AsnProp)({type:f.NFTOwnershipAttestation,context:0})],s.prototype,"nftOwnership",void 0),n([(0,i.AsnProp)({type:a.EthereumAddressAttestation,context:1})],s.prototype,"ethereumAddress",void 0),s=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],s),t.LinkedAttestation=s;class c{}n([(0,i.AsnProp)({type:s})],c.prototype,"attestation",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],c.prototype,"signingAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],c.prototype,"signatureValue",void 0),t.SignedLinkedAttestation=c},91462:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.UseAttestation=void 0;const i=r(39980),o=r(61538),f=r(54759);class a{}n([(0,i.AsnProp)({type:f.MyAttestation})],a.prototype,"attestation",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],a.prototype,"type",void 0),n([(0,i.AsnProp)({type:o.Proof})],a.prototype,"proof",void 0),n([(0,i.AsnProp)({type:f.PublicKeyInfoValue})],a.prototype,"sessionKey",void 0),t.UseAttestation=a},27309:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.UseToken=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],o.prototype,"signedToken",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],o.prototype,"attestation",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],o.prototype,"proof",void 0),t.UseToken=o},19421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUGLEVEL=void 0,t.DEBUGLEVEL={LOW:1,MEDIUM:2,HIGH:3,VERBOSE:4}},72353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XMLconfigData=void 0;const n=r(79896),i=r(65185);t.XMLconfigData={attestationOrigin:"http://stage.attestation.id",tokensOrigin:"https://devcontickets.herokuapp.com/outlet/",tokenUrlName:"ticket",tokenSecretName:"secret",unsignedTokenDataName:"ticket",tokenParser:n.SignedDevconTicket,localStorageItemName:"dcTokens",base64senderPublicKeys:{6:i.KeyPair.publicFromBase64orPEM("-----BEGIN PUBLIC KEY-----\nMIIBMzCB7AYHKoZIzj0CATCB4AIBATAsBgcqhkjOPQEBAiEA////////////////\n/////////////////////v///C8wRAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBEEEeb5m\nfvncu6xVoGKVzocLBwKb/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0\nSKaFVBmcR9CP+xDUuAIhAP////////////////////66rtzmr0igO7/SXozQNkFB\nAgEBA0IABJUMfAvtI8PKxcwxu7mq2btVMjh4gmcKwrHN8HmasOvHZMJn9wTo/doH\nlquDl6TSEBAk0kxO//aVs6QX8u0OSM0=\n-----END PUBLIC KEY-----"),26:i.KeyPair.publicFromBase64orPEM("-----BEGIN PUBLIC KEY-----\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEQKYTwFMIzSq1QVxoRKoOZXLQ9mUhce8M\ndIzvJx3unbpR3m3TiuWKZKTP4/XCPnS56d1tAhjM43hHjHbZ0k3RKQ==\n-----END PUBLIC KEY-----")},base64attestorPubKey:"MIIBMzCB7AYHKoZIzj0CATCB4AIBATAsBgcqhkjOPQEBAiEA/////////////////////////////////////v///C8wRAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBEEEeb5mfvncu6xVoGKVzocLBwKb/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIhAP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABL+y43T1OJFScEep69/yTqpqnV/jzONz9Sp4TEHyAJ7IPN9+GHweCX1hT4OFxt152sBN3jJc1s0Ymzd8pNGZNoQ=",webDomain:"devcon.org"}},42949:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.convertV1AttestationToV2=t.isSignedOffchainAttestationV1=t.uncompactOffchainAttestationPackage=t.compactOffchainAttestationPackage=t.decodeBase64ZippedBase64=t.zipAndEncodeToBase64=void 0;const f=o(r(99591)),a=r(86623),s=r(55050);function c(e){let{sig:t,signer:r}=e;return l(t)&&(t=d(t)),[t.domain.version,t.domain.chainId,t.domain.verifyingContract,t.signature.r,t.signature.s,t.signature.v,r,t.uid,t.message.schema,t.message.recipient===a.ethers.constants.AddressZero?"0":t.message.recipient,Number(t.message.time),Number(t.message.expirationTime),t.message.refUID===a.ethers.constants.HashZero?"0":t.message.refUID,t.message.revocable,t.message.data,Number(t.message.nonce)]}function u(e){return{sig:{domain:{name:"EAS Attestation",version:e[0],chainId:e[1],verifyingContract:e[2]},primaryType:"Attestation",types:{Attest:[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"time",type:"uint64"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"}]},signature:{r:e[3],s:e[4],v:e[5]},uid:e[7],message:{schema:e[8],recipient:"0"===e[9]?a.ethers.constants.AddressZero:e[9],time:e[10],expirationTime:e[11],refUID:"0"===e[12]?a.ethers.constants.HashZero:e[12],revocable:e[13],data:e[14],nonce:e[15]}},signer:e[6]}}function l(e){return"v"in e&&"r"in e&&"s"in e}function d(e){const{v:t,r,s:n,...i}=e;return{...i,signature:{v:t,r,s:n}}}t.zipAndEncodeToBase64=function(e){const t=c(e),r=JSON.stringify(t),n=f.deflate(r,{level:9});return(0,s.uint8arrayToBase64)(n)},t.decodeBase64ZippedBase64=function(e){const t=(0,s.base64ToUint8array)(e),r=f.inflate(t,{to:"string"});return u(JSON.parse(r))},t.compactOffchainAttestationPackage=c,t.uncompactOffchainAttestationPackage=u,t.isSignedOffchainAttestationV1=l,t.convertV1AttestationToV2=d},3810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EASIdentifierAttestation=void 0;const n=r(6549);class i extends n.EasTicketAttestation{constructor(e,t){super({fields:[{name:"version",type:"uint8"},{name:"identifierType",type:"string"},{name:"commitment",type:"bytes",isCommitment:!0},{name:"ethereumAddress",type:"address"}]},e,void 0,t?{"":t}:void 0)}async createEasAttestation(e,t,r="mail"){if(t||(t={}),void 0===t.revocable&&(t.revocable=!1),!t.validity){const e=new Date;e.setDate(e.getDate()+30),t.validity={from:Math.round(Date.now()/1e3),to:Math.round(e.getTime()/1e3)}}return super.createEasAttestation(e,t,r)}}t.EASIdentifierAttestation=i},89194:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.EasAttestedObject=t.EasUseToken=void 0;const i=r(5393),o=r(55050),f=r(39980),a=r(8441);class s{}n([(0,f.AsnProp)({type:f.AsnPropTypes.Any})],s.prototype,"ticketAttestation",void 0),n([(0,f.AsnProp)({type:f.AsnPropTypes.Any})],s.prototype,"idAttestation",void 0),n([(0,f.AsnProp)({type:f.AsnPropTypes.Any})],s.prototype,"proof",void 0),t.EasUseToken=s;t.EasAttestedObject=class{constructor(){this.crypto=new i.AttestationCrypto}create(e,t,r,n){this.ticketAttestation=e,this.ticketSecret=t,this.identifierAttestation=r,this.identifierSecret=n,this.pok=this.makeProof()}makeProof(){let e=this.identifierAttestation.getCommitment(),t=this.ticketAttestation.getCommitment(),r=this.crypto.computeEqualityProof((0,o.uint8tohex)(e),(0,o.uint8tohex)(t),this.identifierSecret,this.ticketSecret);if(!this.crypto.verifyEqualityProof(e,t,r))throw new Error("The redeem proof did not verify");return r}getEncoded(){const e=new s;return e.ticketAttestation=new Uint8Array(this.ticketAttestation.getAsnEncoded()),e.idAttestation=new Uint8Array(this.identifierAttestation.getAsnEncoded()),e.proof=(0,o.hexStringToUint8)(this.pok.getDerEncoding()),(0,o.uint8tohex)(new Uint8Array(f.AsnSerializer.serialize(e)))}static fromBytes(e,t,r){const n=f.AsnParser.parse(e,s),i=new this;i.ticketAttestation=new t,i.ticketAttestation.loadAsnEncoded(n.ticketAttestation),i.identifierAttestation=new r,i.identifierAttestation.loadAsnEncoded(n.idAttestation);let o=new a.UsageProofOfExponent;return o.fromBytes(new Uint8Array(n.proof)),i.pok=o,i}async checkValidity(e=""){if(await this.ticketAttestation.validateEasAttestation(),await this.identifierAttestation.validateEasAttestation(),!this.crypto.verifyEqualityProof(this.identifierAttestation.getCommitment(),this.ticketAttestation.getCommitment(),this.pok))throw new Error("Could not verify the consistency between the commitment in the identifier and ticket attestations");if(""!==e){if((await this.identifierAttestation.getAttestationField("ethereumAddress")).toLowerCase()!==e.toLowerCase())throw Error("The provided ethereum address does not match the address specified in the identifier attestation")}return!0}}},6549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f},f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EasTicketAttestation=t.EasAsnEmbeddedSchema=t.AbiFieldTypes=void 0;const a=r(30986),s=r(86623),c=r(5393),u=r(39980),l=r(56371),d=r(55050),h=r(4625),p=r(42949),y=r(65185),b=f(r(99591));!function(e){e.bool="bool",e.uint8="uint8",e.uint16="uint16",e.uint32="uint32",e.uint64="uint64",e.uint128="uint128",e.uint256="uint256",e.address="address",e.string="string",e.bytes="bytes",e.bytes32="bytes32"}(t.AbiFieldTypes||(t.AbiFieldTypes={}));class g{}o([(0,u.AsnProp)({type:u.AsnPropTypes.OctetString})],g.prototype,"easAttestation",void 0),o([(0,u.AsnProp)({type:u.AsnPropTypes.BitString})],g.prototype,"signatureValue",void 0),o([(0,u.AsnProp)({type:u.AsnPropTypes.OctetString,optional:!0})],g.prototype,"domainInfo",void 0),t.EasAsnEmbeddedSchema=g;class m extends h.AttestableObject{constructor(e,t,r,n){super(),this.schema=e,this.signingConfig=t,this.rpcMap=r,this.issuerKeys=n,this.crypto=new c.AttestationCrypto}getEasSchema(){return this.schema.fields.map((e=>e.type+" "+e.name)).join(", ")}checkAttestationIsLoaded(){if(!this.signedAttestation)throw new Error("Signed attestation must be loaded to call this function")}async createEasAttestation(e,t,r="mail"){if(!this.signingConfig)throw new Error("Please provide valid signing config for this function.");this.signerAddress=await this.signingConfig.signer.getAddress(),this.signerAddress||new Error("Failed to get signer address"),this.commitmentSecret=void 0;const n=this.schema.fields.map((t=>{if(!e[t.name])throw new Error("Value for field "+t.name+" was not provided");let n=e[t.name];return t.isCommitment&&(this.commitmentSecret||(this.commitmentSecret=this.crypto.makeSecret()),n=this.createCommitment(n,r,this.commitmentSecret)),{name:t.name,value:n,type:t.type}})),i=new a.Offchain(this.signingConfig.EASconfig),o=new a.SchemaEncoder(this.getEasSchema()).encodeData(n),f=await i.signOffchainAttestation({recipient:t?.recipient??"0x0000000000000000000000000000000000000000",expirationTime:t?.validity?.to??0,time:t?.validity?.from??Math.round(Date.now()/1e3),nonce:0,schema:t?.schema??"0x0000000000000000000000000000000000000000000000000000000000000000",revocable:!1!==t?.revocable,refUID:t?.refUID??"0x0000000000000000000000000000000000000000000000000000000000000000",data:o},this.signingConfig.signer);if(!i.verifyOffchainAttestationSignature(this.signerAddress,f))throw new Error("Attestation signature check failed!");return this.signedAttestation=f,this.recoverSignerInfo(),this.getEasJson()}createCommitment(e,t,r){return"0x"+(0,d.uint8tohex)(this.crypto.makeCommitment(e,this.crypto.getType(t),r))}getEasJson(){this.checkAttestationIsLoaded();const e={sig:this.signedAttestation,signer:this.signerAddress};return this.commitmentSecret&&(e.secret="0x"+this.commitmentSecret.toString(16)),e}getEasUid(e){return e||this.checkAttestationIsLoaded(),a.Offchain.getOffchainUID(e??this.signedAttestation.message)}getEncoded(){return(0,p.zipAndEncodeToBase64)(this.getEasJson())}getAttestationData(){if(this.checkAttestationIsLoaded(),!this.decodedData){const e=new a.SchemaEncoder(this.getEasSchema()).decodeData(this.signedAttestation.message.data);this.decodedData={};let t=0;for(const r of this.schema.fields)this.decodedData[r.name]=e[t].value.value,t++}return this.decodedData}getAttestationField(e){const t=this.getAttestationData();if(!t[e])throw new Error("The attestation does not contain data field '"+e+"'");return t[e]}verifyIdCommitment(e,t,r="mail"){if(t&&(this.commitmentSecret=t),!this.commitmentSecret)throw new Error("Commitment secret required.");if(this.createCommitment(e,r,this.commitmentSecret)!==this.getAttestationField("commitment"))throw new Error("Commitment verification failed.")}async validateEasAttestation(e=!1){this.checkAttestationIsLoaded(),this.verify(),this.checkValidity(),!e&&this.signedAttestation.message.revocable&&await this.checkRevocation()}async checkRevocation(e){e||(e=this.getEasUid());const t=this.signedAttestation.domain.chainId;if(!this.rpcMap?.[t])throw new Error("RPC not provided for chain "+t);const r=new a.EAS(this.signedAttestation.domain.verifyingContract,{signerOrProvider:new s.ethers.providers.StaticJsonRpcProvider(this.rpcMap[t])}),n=await r.getRevocationOffchain(this.signerAddress,e);if(s.BigNumber.from(n).gt(0)){throw new Error("Attestation has been revoked :-(")}}async revokeEasAttestation(e){if(e||(e=this.getEasUid()),!this.signingConfig)throw new Error("Please provide a valid signer");const t=new a.EAS(this.signingConfig.EASconfig.address,{signerOrProvider:this.signingConfig.signer}),r=await t.revokeOffchain(e);await r.wait()}async bulkRevokeEasAttestations(e){if(!this.signingConfig)throw new Error("Please provide a valid signer");const t=new a.EAS(this.signingConfig.EASconfig.address,{signerOrProvider:this.signingConfig.signer}),r=await t.multiRevokeOffchain(e);await r.wait()}loadEasAttestation(e,t,r){this.decodedData=void 0,this.commitmentSecret=r?BigInt(r):void 0,this.signedAttestation=e,this.processKeysParam(t)}loadFromEncoded(e,t,r){const n=(0,p.decodeBase64ZippedBase64)(e);this.loadEasAttestation(n.sig,t,r)}getAsnEncoded(e=!1){const t=l.defaultAbiCoder.encode(this.signedAttestation.types.Attest.map((e=>e.type)),this.signedAttestation.types.Attest.map((e=>this.signedAttestation.message[e.name]))),r=new g;r.easAttestation=(0,d.hexStringToUint8)(t),r.signatureValue=(0,d.hexStringToUint8)((0,l.joinSignature)(this.signedAttestation.signature));const n=l.defaultAbiCoder.encode(["string","address","uint256"],[this.signedAttestation.domain.version,this.signedAttestation.domain.verifyingContract,this.signedAttestation.domain.chainId]);r.domainInfo=(0,d.hexStringToUint8)(n);const i=u.AsnSerializer.serialize(r);return e?b.deflate(i,{level:9}):i}loadAsnEncoded(e,t,r=!1){this.decodedData=void 0,this.commitmentSecret=void 0,r&&(e=b.inflate(e));const n=u.AsnParser.parse(e,g),i=l.defaultAbiCoder.decode(["string","address","uint256"],n.domainInfo),o={name:"EAS Attestation",version:i[0],verifyingContract:i[1],chainId:i[2]},f=l.defaultAbiCoder.decode(a.ATTESTATION_TYPE.map((e=>e.type)),"0x"+(0,d.uint8tohex)(new Uint8Array(n.easAttestation))),c={};for(const[e,t]of a.ATTESTATION_TYPE.entries())c[t.name]=f[e];const h=s.ethers.utils.splitSignature(new Uint8Array(n.signatureValue));this.signedAttestation={domain:o,message:c,types:{Attest:a.ATTESTATION_TYPE},primaryType:"Attestation",signature:{r:h.r,s:h.s,v:h.v},uid:this.getEasUid(c)},this.processKeysParam(t)}checkValidity(){const e=Math.round(Date.now()/1e3);if(e0&&e>this.signedAttestation.message.expirationTime)throw new Error("Attestation has expired.");return!0}processKeysParam(e){const t=this.getAttestationData();let r=t.eventId??t.devconId??"";if(!e){if(!this.issuerKeys)throw new Error("No signing keys are defined");e=this.issuerKeys}if(!e[r]){if(!r||r&&!e[""])throw new Error(r?"No key set for conference ID "+r:"No default key set");r=""}const n=e[r];Array.isArray(n)?this.conferenceKeys=n:this.conferenceKeys=[n],this.recoverSignerInfo()}recoverSignerInfo(){const e={version:this.signedAttestation.domain.version,address:this.signedAttestation.domain.verifyingContract,chainId:this.signedAttestation.domain.chainId},t=new a.Offchain(e),r=s.ethers.utils._TypedDataEncoder.hash(t.getDomainTypedData(),{Attest:a.ATTESTATION_TYPE},this.signedAttestation.message);this.signerPublicKey=s.ethers.utils.recoverPublicKey(r,this.signedAttestation.signature),this.signerAddress=s.ethers.utils.recoverAddress(r,this.signedAttestation.signature)}verify(){if(!this.conferenceKeys)throw new Error("Issuer keys are not defined");for(const e of this.conferenceKeys)if(this.signerPublicKey.substring(2)===e.getPublicKeyAsHexStr())return!0;throw new Error("Ticket signature is invalid")}getSignerKeyPair(){return y.KeyPair.fromPublicHex(this.signerPublicKey)}getSignerKey(){return this.signerPublicKey}getSignerAddress(){return this.signerAddress}getCommitment(){return(0,d.hexStringToUint8)(this.getAttestationField("commitment"))}getDerEncoding(){return(0,d.uint8tohex)(new Uint8Array(this.getAsnEncoded(!1)))}fromBytes(e,t){this.loadAsnEncoded(e,t)}}t.EasTicketAttestation=m},9771:(e,t,r)=>{"use strict";t.U=void 0;const n=r(80716),i=r(55050),o=r(65185),f=r(6549),a=r(58015),s=r(27309),c=r(19421),u=r(3810),l=r(89194);t.U=class{constructor(e,t){this.schema=e,this.rpcMap=t}getUseTicket(e,t,r,s,d,h,p){try{h=o.KeyPair.parseKeyArrayStrings(h)}catch(e){throw(0,i.logger)(c.DEBUGLEVEL.LOW,e),new Error("Issuer key error")}const y=new f.EasTicketAttestation(this.schema,void 0,this.rpcMap);let b;if(y.loadFromEncoded(r,h),"eas"===p){const r=new u.EASIdentifierAttestation(void 0,o.KeyPair.publicFromBase64orPEM(d));r.loadFromEncoded(s);const n=new l.EasAttestedObject;n.create(y,e,r,t),b=n.getEncoded()}else{const r=n.SignedIdentifierAttestation.fromBytes((0,i.base64ToUint8array)(s),o.KeyPair.publicFromBase64orPEM(d));let f=new a.AttestedObject;f.create(y,r,t,e),b=f.getDerEncoding()}return(0,i.hexStringToBase64)(b)}async validateUseTicket(e,t,r,n,c){let d=o.KeyPair.publicFromBase64orPEM(t),h=o.KeyPair.parseKeyArrayStrings(r);const p=this,y=class extends f.EasTicketAttestation{constructor(){super(p.schema,void 0,p.rpcMap,h)}};if("eas"!==c){const t=a.AttestedObject.fromBytes((0,i.base64ToUint8array)(e),s.UseToken,d,y,h);if(!t.checkValidity(n))throw new Error("Ticket validity check failed!");return await t.getAttestableObject().validateEasAttestation(),t}{const t=class extends u.EASIdentifierAttestation{constructor(){super(void 0,d)}},r=l.EasAttestedObject.fromBytes((0,i.base64ToUint8array)(e),y,t);await r.checkValidity(n)}}}},68810:(e,t,r)=>{"use strict";t._F=void 0;var n=r(84102);Object.defineProperty(t,"_F",{enumerable:!0,get:function(){return n.Authenticator}});var i=r(73506);var o=r(5393)},4625:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestableObject=void 0;t.AttestableObject=class{constructor(){}getDerEncoding(){return this.encoded}getCommitment(){return this.commitment}}},86085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Attestation=void 0;const n=r(55050),i=r(39980),o=r(54759),f=r(65185),a=r(13649),s=r(54288),c=r(19421);class u{constructor(){this.version=18,this.blockchainFriendly=!0}parseNames(e){let t={};Object.keys(a.X500NamesLabels).forEach((e=>{t[a.X500NamesLabels[e].toLowerCase()]=e}));let r=[];return e.forEach((e=>{let n=t[e.type.toString().toLowerCase()];if(!n)throw new Error(`X500 with name ${e.type.toString()} not implemented yet.`);r.push(`${n}="${e.value}"`)})),r.join(",")}fromBytes(e){const t=this;let r=i.AsnParser.parse(e,o.SignedInfo);if(t.signedInfo=e,t.version=r.version.version,t.serialNumber=r.serialNumber,t.signingAlgorithm=r.signature.algorithm.toString(),r.validity){if(t.notValidBefore=r.validity.notBefore.generalizedTime?.getTime(),t.notValidAfter=r.validity.notAfter.generalizedTime?.getTime(),r.validity.notAfterInt&&Number(r.validity.notAfterInt)!=Math.floor(t.notValidAfter/1e3)||r.validity.notBeforeInt&&Number(r.validity.notBeforeInt)!=Math.floor(t.notValidBefore/1e3))throw new Error("Date doesnt fit");void 0===r.validity.notBeforeInt||void 0===r.validity.notAfterInt?this.blockchainFriendly=!1:this.blockchainFriendly=!0}let n=r.subject.rdnSequence;t.subject="",n&&n[0]&&n[0].length&&(t.subject=this.parseNames(n[0])),t.subjectKey=f.KeyPair.publicFromSubjectPublicKeyInfo(r.subjectPublicKeyInfo);let a=r.issuer.rdnSequence;if(t.issuer="",a?.length&&(t.issuer=this.parseNames(a[0])),r.contract&&(t.smartcontracts=r.contract),r.attestsTo&&r.attestsTo.extensions)t.extensions=r.attestsTo.extensions,t.commitment=new Uint8Array(t.extensions.extension.extnValue);else if(r.attestsTo&&r.attestsTo.dataObject)throw new Error("Implement parse dataObject")}isValidX509(){return 0!=this.version&&1!=this.version&&2!=this.version?((0,n.logger)(c.DEBUGLEVEL.LOW,"Incorrect version number"),!1):this.issuer?null==this.notValidBefore||null==this.notValidAfter?((0,n.logger)(c.DEBUGLEVEL.LOW,"Validity period not set"),!1):null==this.subject?((0,n.logger)(c.DEBUGLEVEL.LOW,"Subject info not set"),!1):this.subjectKey?null!=this.smartcontracts?((0,n.logger)(c.DEBUGLEVEL.LOW,"Smart contract info set"),!1):null!=this.dataObject?((0,n.logger)(c.DEBUGLEVEL.LOW,"Data object set"),!1):null!=this.version&&null!=this.serialNumber&&null!=this.signingAlgorithm||((0,n.logger)(c.DEBUGLEVEL.LOW,"Version, serial number, subject or algorithm missing"),!1):((0,n.logger)(c.DEBUGLEVEL.LOW,"No subject public key info set"),!1):((0,n.logger)(c.DEBUGLEVEL.LOW,"Issuer info not set"),!1)}getDerEncoding(){if(this.signedInfo||(this.signedInfo=this.getPrehash()),!this.signedInfo)throw new Error("Empty Attestaion Der Encoding");return(0,n.uint8tohex)(new Uint8Array(this.signedInfo))}getCommitment(){return this.commitment}getNotValidBefore(){return this.notValidBefore}setNotValidBefore(e){this.notValidBefore=e}getNotValidAfter(){return this.notValidAfter}setNotValidAfter(e){this.notValidAfter=e}getSubjectPublicKeyInfo(){return this.subjectKey}checkValidity(){if(null==this.version)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest version missed"),!1;if(null==this.serialNumber)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest serial number missed"),!1;if(null==this.subject)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest subject missed"),!1;if(null==this.signingAlgorithm)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest signing algorithm missed"),!1;let e=this.getNotValidBefore(),t=this.getNotValidAfter(),r=new s.Timestamp(e);return r.setValidity(t-e),!!r.validateAgainstExpiration(t)&&(null==this.extensions||null==this.dataObject||((0,n.logger)(c.DEBUGLEVEL.LOW,"Both Extensions and dataObject not allowed"),!1))}getExtensions(){return this.extensions}setVersion(e){this.version=e}getVersion(){return this.version}setSubject(e){this.subject=e}getSubject(){return this.subject}setSigningAlgorithm(e){this.signingAlgorithm=e}getPrehash(){if(!this.checkValidity())throw new Error("Attestation invalid");let e=a.Asn1Der.encode("TAG",a.Asn1Der.encode("INTEGER",this.version),0)+a.Asn1Der.encode("INTEGER",this.serialNumber)+a.Asn1Der.encodeObjectId(this.signingAlgorithm);if(e+=this.issuer?a.Asn1Der.encodeName(this.issuer):a.Asn1Der.encode("NULL_VALUE",""),null!=this.notValidAfter&&null!=this.notValidBefore){let t=a.Asn1Der.encode("GENERALIZED_TIME",this.notValidBefore)+(this.blockchainFriendly?a.Asn1Der.encode("INTEGER",Math.floor(this.notValidBefore/1e3)):"")+a.Asn1Der.encode("GENERALIZED_TIME",this.notValidAfter)+(this.blockchainFriendly?a.Asn1Der.encode("INTEGER",Math.floor(this.notValidAfter/1e3)):"");e+=a.Asn1Der.encode("SEQUENCE_30",t)}else e+=a.Asn1Der.encode("NULL_VALUE","");e+=this.subject?a.Asn1Der.encodeName(this.subject):a.Asn1Der.encode("NULL_VALUE",""),e+=this.subjectKey?this.subjectKey.getAsnDerPublic():a.Asn1Der.encode("NULL_VALUE",""),null!=this.smartcontracts&&(e+=this.smartcontracts);let t="";return this.commitment&&this.commitment.length&&(t=a.Asn1Der.encode("OBJECT_ID",u.OID_OCTETSTRING)+a.Asn1Der.encode("BOOLEAN",1)+a.Asn1Der.encode("OCTET_STRING",(0,n.uint8tohex)(this.commitment))),t&&(e+=a.Asn1Der.encode("TAG",a.Asn1Der.encode("SEQUENCE_30",a.Asn1Der.encode("SEQUENCE_30",t)),3)),null!=this.dataObject&&(e+=a.Asn1Der.encode("TAG",a.Asn1Der.encode("SEQUENCE_30",a.Asn1Der.encode("SEQUENCE_30",this.dataObject)),4)),(0,n.hexStringToUint8)(a.Asn1Der.encode("SEQUENCE_30",e))}getSigningAlgorithm(){return this.signingAlgorithm}}t.Attestation=u,u.OID_OCTETSTRING="1.3.6.1.4.1.1466.115.121.1.40"},5393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationCrypto=t.Pedestren_H=t.Pedestren_G=void 0;const n=r(61602),i=r(93431),o=r(55050),f=r(98478),a=r(19421),s=r(86332);let c=r(91094);t.Pedestren_G=new i.Point(21282764439311451829394129092047993080259557426320933158672611067687630484067n,3813889942691430704369624600187664845713336792511424430006907067499686345744n,i.CURVE_BN256),t.Pedestren_H=new i.Point(10844896013696871595893151490650636250667003995871483372134187278207473369077n,9393217696329481319187854592386054938412168121447413803797200472841959383227n,i.CURVE_BN256);class u{constructor(){if(this.curveOrderBitLength=254n,this.rand=this.makeSecret(),!this.verifyCurveOrder())throw new Error("Static values do not work with current implementation")}verifyCurveOrder(){u.validatePointToCurve(u.G,u.curve),u.validatePointToCurve(u.H,u.curve);let e=BigInt(u.curveOrder.toString(2).length);return!(u.curveOrder<1n<>e>0n)||((0,o.logger)(a.DEBUGLEVEL.LOW,"Curve order is not 254 bits which is required by the current implementation"),!1)}getType(e){switch(e.toLowerCase()){case"mail":return n.ATTESTATION_TYPE.mail;case"phone":return n.ATTESTATION_TYPE.phone;case"inetpersona":return n.ATTESTATION_TYPE.InetPersona;default:throw new Error("Wrong type of identifier")}}makeCommitment(e,r,n){let i=this.mapToCurveMultiplier(r,e);return t.Pedestren_G.multiplyDA(i).add(t.Pedestren_H.multiplyDA(n)).getEncoded(!1)}makeCommitmentFromHiding(e,r,n){if(!u.validatePointToCurve(n,u.curve))throw new Error("Point invalid");let i=this.mapToCurveMultiplier(r,e);return t.Pedestren_G.multiplyDA(i).add(n).getEncoded(!1)}injectIdentifierType(e,t){return(0,o.uint8merge)([Uint8Array.from([0,0,0,e]),t])}mapToInteger(e){return BigInt("0x"+c.keccak256(e))>>256n-this.curveOrderBitLength}mapToCurveMultiplier(e,t){let r=Uint8Array.from((0,o.stringToArray)(t.trim().toLowerCase())),n=this.injectIdentifierType(e,r),f=(0,o.uint8ToBn)(n);do{f=this.mapToInteger((0,o.bnToUint8)(f))}while(f>=i.CURVE_BN256.n);return f}computePoint_bn256(e){let t=i.CURVE_BN256.P;e=(0,o.mod)(e,t);let r,n,f,a=0n,s=0n,c=t+1n>>2n,u=t-1n>>1n;do{do{e=(0,o.mod)(e+1n),s=(0,o.mod)((0,o.BnPowMod)(e,3n,t)+i.CURVE_BN256.A*e+i.CURVE_BN256.B),f=(0,o.BnPowMod)(s,u,t)}while(1n!==f);a=(0,o.BnPowMod)(s,c,t),r=new i.Point(e,a,i.CURVE_BN256),r.x>t>>1n&&(r=new i.Point(e,t-a,i.CURVE_BN256)),n=r.multiplyDA(i.CURVE_BN256.n-1n),n.y>t>>1n&&(n=new i.Point(n.x,t-n.y,i.CURVE_BN256))}while(!r.equals(n)||r.isInfinity());return r}makeSecret(e=48){return(0,o.mod)(BigInt(u.generateRandomHexString(e)),i.CURVE_BN256.n)}static generateRandomHexString(e){var t=new Uint8Array(e);"undefined"!=typeof window&&window.crypto?window.crypto.getRandomValues(t):t=new Uint8Array(s.randomBytes(e));let r="0x";for(var n=0;n=i.CURVE_BN256.n);return l=(0,o.mod)(c+u*r,i.CURVE_BN256.n),f.FullProofOfExponent.fromData(e,s,l,a)}computeChallenge(e,t,r){let n=t.concat(e),i=this.makeArray(n),f=(0,o.uint8merge)([i,r]);return this.mapToInteger(f)}verifyFullProof(e){if(!e.validateParameters())return(0,o.logger)(2,"The parameters in the ZK proof are not correct"),!1;let r=this.computeChallenge(e.getPoint(),[t.Pedestren_H,e.getRiddle()],e.getNonce());return this.verifyPok(e,r)}verifyEqualityProof(e,r,n){if(!n.validateParameters())return(0,o.logger)(2,"The parameters in the ZK proof are not correct"),!1;let a=i.Point.decodeFromUint8(e,i.CURVE_BN256);u.validatePointToCurve(a,i.CURVE_BN256);let s=i.Point.decodeFromUint8(r,i.CURVE_BN256);u.validatePointToCurve(s,i.CURVE_BN256);let c=a.subtract(s),l=this.computeChallenge(n.getPoint(),[t.Pedestren_H,a,s],n.getNonce());return this.verifyPok(f.FullProofOfExponent.fromData(c,n.getPoint(),n.getChallengeResponse(),n.getNonce()),l)}verifyPok(e,r){if(r>=i.CURVE_BN256.n||r<=0n)return(0,o.logger)(2,"Challenge is not of the correct size"),!1;let n=t.Pedestren_H.multiplyDA(e.getChallengeResponse()),f=e.getRiddle().multiplyDA(r).add(e.getPoint());return n.equals(f)}makeArray(e){let t=new Uint8Array(0);return e.forEach((e=>{t=new Uint8Array([...t,...e.getEncoded(!1)])})),t}static hashWithKeccak(e){return c.keccak256(e)}static validatePointToCurve(e,t){try{if(e.isInfinity())throw new Error("Point is at infinity");if(!e.multiplyDA(i.CURVE_BN256.n).isInfinity())throw console.log("Point does not have correct order"),new Error("Point does not have correct order")}catch(e){return!1}return!0}}t.AttestationCrypto=u,u.OID_SIGNATURE_ALG="1.2.840.10045.2.1",u.BYTES_IN_DIGEST=32,u.fieldSize=i.CURVE_BN256.P,u.curveOrder=i.CURVE_BN256.n,u.cofactor=1n,u.curve=i.CURVE_BN256,u.G=t.Pedestren_G,u.H=t.Pedestren_H},94807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationRequest=void 0;const n=r(93431),i=r(13649),o=r(55050),f=r(5393),a=r(98478),s=r(39980),c=r(61709),u=r(19421);t.AttestationRequest=class{constructor(){}static fromData(e,t){let r=new this;if(r.type=e,r.pok=t,!r.verify())throw new Error("The proof is not valid");return r}getDerEncoding(){let e=i.Asn1Der.encode("INTEGER",this.type)+this.pok.getDerEncoding();return i.Asn1Der.encode("SEQUENCE_30",e)}static fromBytes(e){let t,r=new this;try{t=s.AsnParser.parse(e,c.Identifier),r.type=t.type}catch(e){throw new Error("Cant parse AttestationRequest Identifier")}try{let e=new Uint8Array(t.proof.riddle),i=new Uint8Array(t.proof.challengePoint),f=new Uint8Array(t.proof.responseValue),s=new Uint8Array(t.proof.nonce),c=n.Point.decodeFromHex((0,o.uint8tohex)(e),n.CURVE_BN256),u=(0,o.uint8ToBn)(i),l=n.Point.decodeFromHex((0,o.uint8tohex)(f),n.CURVE_BN256);r.pok=a.FullProofOfExponent.fromData(c,l,u,s)}catch(e){throw new Error("Cant create FullProofOfExponent")}if(!r.verify())throw new Error("Could not verify the proof");return(0,o.logger)(u.DEBUGLEVEL.HIGH,"proof OK"),r}verify(){return!!(new f.AttestationCrypto).verifyFullProof(this.pok)&&((0,o.logger)(u.DEBUGLEVEL.HIGH,"VerifyAttestationRequestProof OK"),!0)}getPok(){return this.pok}getType(){return this.type}getAsn(){const e=this.getPok().getAsnType(),t=new c.Identifier;return t.type=this.getType(),t.proof=e,t}getAsnEncoded(){return s.AsnSerializer.serialize(this.getAsn())}}},81453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationRequestWithUsage=void 0;const n=r(65185),i=r(98478),o=r(84962),f=r(39980),a=r(55050),s=r(93431),c=r(5393),u=r(13649),l=r(19421);t.AttestationRequestWithUsage=class{constructor(){}static fromData(e,t,r){let n=new this;if(n.type=e,n.pok=t,n.sessionPublicKey=r,!n.verify())throw new Error("Could not verify the proof");return n}static fromBytes(e){let t,r=new this;try{t=f.AsnParser.parse(e,o.Identifier),r.type=t.type,r.sessionPublicKey=n.KeyPair.publicFromSubjectPublicKeyValue(t.sessionKey)}catch(e){throw new Error("Cant parse AttestationRequest Identifier")}try{let e=new Uint8Array(t.proof.riddle),n=new Uint8Array(t.proof.challengePoint),o=new Uint8Array(t.proof.responseValue),f=new Uint8Array(t.proof.nonce),c=s.Point.decodeFromHex((0,a.uint8tohex)(e),s.CURVE_BN256),u=(0,a.uint8ToBn)(n),l=s.Point.decodeFromHex((0,a.uint8tohex)(o),s.CURVE_BN256);r.pok=i.FullProofOfExponent.fromData(c,l,u,f)}catch(e){throw new Error("Cant create FullProofOfExponent")}if(!r.verify())throw new Error("Could not verify the proof");return(0,a.logger)(l.DEBUGLEVEL.HIGH,"proof OK"),r}verify(){return!!(new c.AttestationCrypto).verifyFullProof(this.pok)}getDerEncoding(){let e=u.Asn1Der.encode("INTEGER",this.type)+this.pok.getDerEncoding()+this.sessionPublicKey.getAsnDerPublic();return u.Asn1Der.encode("SEQUENCE_30",e)}getPok(){return this.pok}getType(){return this.type}getSessionPublicKey(){return this.sessionPublicKey}}},58015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestedObject=void 0;const n=r(5393),i=r(80716),o=r(55050),f=r(13649),a=r(39980),s=r(8441),c=r(3365),u=r(19421);class l{constructor(){}create(e,t,r,i){this.attestableObject=e,this.att=t,this.attestationSecret=r,this.objectSecret=i,this.crypto=new n.AttestationCrypto,this.pok=this.makeProof(r,i,this.crypto),this.derEncodedProof=this.pok.getDerEncoding(),this.fillPresignData()}setWebDomain(e){this.webDomain=e}fillPresignData(){this.preSignEncoded=this.attestableObject.getDerEncoding()+this.att.getDerEncoding()+this.pok.getDerEncoding(),this.encoding=f.Asn1Der.encode("SEQUENCE_30",this.preSignEncoded)}fromDecodedData(e,t,r){this.attestableObject=e,this.att=t,this.pok=r,this.fillPresignData(),this.userKeyPair=this.att.getUnsignedAttestation().getSubjectPublicKeyInfo(),this.constructorCheck()}verify(){return this.attestableObject.verify()?this.att.verify()?!!this.crypto.verifyEqualityProof(this.att.getUnsignedAttestation().getCommitment(),this.attestableObject.getCommitment(),this.pok)||((0,o.logger)(u.DEBUGLEVEL.LOW,"Could not verify the consistency between the commitment in the attestation and the attested object"),!1):((0,o.logger)(u.DEBUGLEVEL.LOW,"Could not verify attestation"),!1):((0,o.logger)(u.DEBUGLEVEL.LOW,"Could not verify attestable object"),!1)}static fromBytes(e,t,r,o,f){let c=a.AsnParser.parse(e,t),u=new this;u.attestableObject=new o,u.attestableObject.fromBytes(c.signedToken,f),u.att=i.SignedIdentifierAttestation.fromBytes(new Uint8Array(c.attestation),r);let l=new s.UsageProofOfExponent;return l.fromBytes(new Uint8Array(c.proof)),u.pok=l,u.userKeyPair=u.att.getUnsignedAttestation().getSubjectPublicKeyInfo(),u.crypto=new n.AttestationCrypto,u.constructorCheck(),u}makeProof(e,t,r){let n=this.att.getUnsignedAttestation().getCommitment(),i=this.attestableObject.getCommitment(),f=r.computeEqualityProof((0,o.uint8tohex)(n),(0,o.uint8tohex)(i),e,t);if(!r.verifyEqualityProof(n,i,f))throw new Error("The redeem proof did not verify");return f}getAttestableObject(){return this.attestableObject}getAtt(){return this.att}getDerEncodeProof(){return this.derEncodedProof}getDerEncoding(){return this.encoding}constructorCheck(){if(!this.verify())throw new Error("The redeem request is not valid")}checkValidity(e=""){try{let e=this.att.getUnsignedAttestation().getDerEncoding();if(!c.IdentifierAttestation.fromBytes(new Uint8Array((0,o.hexStringToArray)(e))).checkValidity())return(0,o.logger)(u.DEBUGLEVEL.LOW,"The attestation is not a valid standard attestation"),!1}catch(e){return(0,o.logger)(u.DEBUGLEVEL.LOW,"The attestation is invalid"),!1}try{if(!this.getAttestableObject().checkValidity())return(0,o.logger)(u.DEBUGLEVEL.LOW,"Cheque is not valid"),!1}catch(e){return(0,o.logger)(u.DEBUGLEVEL.LOW,"Cheque validation failed"),!1}if(!e)return!0;try{let t=this.getAtt().getUnsignedAttestation().getAddress();if((0,o.logger)(u.DEBUGLEVEL.HIGH,"attestationEthereumAddress: "+t),(0,o.logger)(u.DEBUGLEVEL.HIGH,"providedEthereumAddress: "+e),t.toLowerCase()!==e.toLowerCase())return(0,o.logger)(u.DEBUGLEVEL.LOW,"The attestation is not to the same Ethereum user who is sending this request"),!1}catch(e){return(0,o.logger)(u.DEBUGLEVEL.LOW,"Address validation failed"),(0,o.logger)(u.DEBUGLEVEL.MEDIUM,e),!1}return!0}}t.AttestedObject=l,l.Eip712UserData={payload:"",description:"",timestamp:0},l.Eip712UserDataTypes=[{name:"payload",type:"string"},{name:"description",type:"string"},{name:"timestamp",type:"uint256"}],l.Eip712UserDataPrimaryName="Authentication",l.Eip712UserDataDescription="Single-use authentication"},13649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Asn1Der=t.X500NamesLabels=void 0;const n=r(55050),i=r(19421),o=(r(94956),{END_OF_CONTENT:0,BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,NULL_VALUE:5,OBJECT_ID:6,OBJECT_DESCRIPTOR:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED_PDV:11,UTF8STRING:12,RELATIVE_OID:13,SEQUENCE_10:16,SET_OF:17,NUMERABLE_STRING:18,PRINTABLE_STRING:19,T61STRING:20,VIDEO_TEX_STRING:21,IA5STRING:22,UTC_TIME:23,GENERALIZED_TIME:24,GRAPHIC_STRING:25,VISIBLE_STRING:26,GENERAL_STRING:27,UNIVERSAL_STRING:28,CHARACTER_STRING:29,BMP_STRING:30,SEQUENCE_30:48,SET:49}),f={0:"END_OF_CONTENT",1:"BOOLEAN",2:"INTEGER",3:"BIT_STRING",4:"OCTET_STRING",5:"NULL_VALUE",6:"OBJECT_ID",7:"OBJECT_DESCRIPTOR",8:"EXTERNAL",9:"REAL",10:"ENUMERATED",11:"EMBEDDED_PDV",12:"UTF8STRING",13:"RELATIVE_OID",16:"SEQUENCE_10",19:"PRINTABLE_STRING",22:"IA5STRING",24:"GENERALIZED_TIME",26:"VISIBLE_STRING",48:"SEQUENCE_30",49:"SET"};t.X500NamesLabels={CN:"2.5.4.3",C:"2.5.4.6",O:"2.5.4.10",OU:"2.5.4.11",L:"2.5.4.7",labeledURI:"1.3.6.1.4.1.250.1.57"};class a{static encodeAsInteger(e){return this.encode("INTEGER",e)}static encodeObjectId(e){return a.encode("SEQUENCE_30",a.encode("OBJECT_ID",e))}static parseX500Names(e){let r=e.matchAll(/(\w+)=("[^"]+"|[\w\.]+)/g),n="";if(!r)throw new Error("wrong Name format");let i=[];for(const e of r){let r=e[1],o=e[2];if('"'==o.substr(0,1)&&'"'==o.substr(-1)&&(o=o.slice(1,o.length-1)),n=t.X500NamesLabels[r],!n)throw new Error('Type "'+r+'" not implemented yet');i.push({type:r,value:o})}return i}static encodeName(e){let r="";return a.parseX500Names(e).forEach((e=>{let n=t.X500NamesLabels[e.type];if(!n)throw new Error(`X500 Name Object ID not implemented.(${e.value})`);let i=a.encode("OBJECT_ID",n)+a.encode("UTF8STRING",e.value);r+=a.encode("SEQUENCE_30",i)})),a.encode("SEQUENCE_30",a.encode("SET",r))}static encode(e,t,r=0){if(void 0===t)throw new Error("Missing value for Der encoding");let i=o[e],f="";switch(e){case"OBJECT_ID":if("string"!=typeof t)throw new Error("OBJECT_ID value must be a string");let o=t.split("."),a=o.shift(),s=o.shift();if(!a||!s)throw new Error("OBJECT_ID parse error.");o.unshift((40*parseInt(a)+parseInt(s)).toString()),o.forEach((e=>{let t=parseInt(e),r="",n=!0;do{let e=127&t;t>>=7,e+=n?0:128,r=e.toString(16).padStart(2,"0")+r,n=!1}while(t);f+=r}));break;case"NULL_VALUE":f="";break;case"GENERALIZED_TIME":f=(0,n.stringToHex)((0,n.formatGeneralizedDateTime)(t));break;case"VISIBLE_STRING":case"UTF8STRING":f=(0,n.stringToHex)(t);break;case"INTEGER":f=BigInt(t).toString(16),f=(f.length%2?"0":"")+f,parseInt("0x"+f.slice(0,1),16)>7&&(f="00"+f);break;case"TAG":if(r>15)throw new Error("DER TAG more than 15 is not implemented");i=parseInt("0xA"+r);case"SEQUENCE_30":case"SET":case"OCTET_STRING":if("string"==typeof t)f=t;else{if(t.constructor!==Uint8Array)throw new Error("Wrong data type for OCTET_STRING");f=(0,n.uint8tohex)(t)}break;case"BIT_STRING":f="00"+t;break;case"BOOLEAN":f=parseInt(t).toString().padStart(2,"0");break;default:throw new Error("Sorry, "+e+" not implemented.")}let a="",s=Math.ceil(f.length/2),c=s.toString(16);return s||(c="00"),c=(c.length%2?"0":"")+c,a=s<128?c:(128+Math.round(c.length/2)).toString(16)+c,f=(f.length%2?"0":"")+f,i.toString(16).padStart(2,"0")+a+f}decode(e){let t=Array.from(e);return this.read(t)}lenEncoded(e){if(!e.length)throw new Error("Empty DER length");let t=e.shift();if(t<128)return t;if(t>128){let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712AttestationRequest=void 0;const n=r(94807),i=r(65185),o=r(14246),f=r(55050),a=r(92219),s=r(9567),c=r(54288),u=r(19421);class l extends s.Eip712Token{constructor(e=undefined,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS){super(),this.Eip712UserDataTypes=[{name:"payload",type:"string"},{name:"description",type:"string"},{name:"timestamp",type:"string"},{name:"identifier",type:"string"}],this.Eip712UserDataPrimaryName="AttestationRequest",this.Eip712UserDataDescription="Linking Ethereum address to phone or email",e&&(this.userKey=e),this.acceptableTimeLimit=t,this.usageValue=this.Eip712UserDataDescription}setUsageValue(e){this.usageValue=e}async addData(e,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS,r,n){this.setDomain(e),this.attestationRequest=n,this.acceptableTimeLimit=t,this.jsonEncoding=await this.makeToken(r);try{this.fillJsonData(this.jsonEncoding)}catch(e){return(0,f.logger)(u.DEBUGLEVEL.LOW,e),!1}}fillJsonData(e){if(!e)throw new Error("Empty json");this.jsonEncoding=e;let t=JSON.parse(e),r=t.signatureInHex,a=JSON.parse(t.jsonSigned);this.eip712DomainData=a.domain,this.data=a.message;try{let e=o.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(a,r);this.requestorKeys=i.KeyPair.fromPublicHex(e.substr(2)),(0,f.logger)(u.DEBUGLEVEL.HIGH,"restored address: "+this.requestorKeys.getAddress())}catch(e){let t="Recover Address failed with error:"+e;throw(0,f.logger)(u.DEBUGLEVEL.LOW,t,e),new Error(t)}this.attestationRequest||(this.attestationRequest=n.AttestationRequest.fromBytes((0,f.base64ToUint8array)(this.data.payload))),this.constructorCheck()}constructorCheck(){if(!this.verify())throw new Error("Could not verify Eip712 AttestationRequest");(0,f.logger)(u.DEBUGLEVEL.HIGH,"Eip712 Attestaion Request verify OK")}async makeToken(e){let t;t=this.userKey?this.userKey.getAddress():await o.SignatureUtility.connectMetamaskAndGetAddress();let r=a.Nonce.getTimestamp(this.attestationRequest.getPok().getNonce()),n=new c.Timestamp(r).getTimeAsString(),i={payload:(0,f.hexStringToBase64Url)(this.attestationRequest.getDerEncoding()),description:this.usageValue,timestamp:n,identifier:e};return await o.SignatureUtility.signEIP712WithBrowserWallet(this.domain,i,this.Eip712UserDataTypes,this.Eip712UserDataPrimaryName,this.userKey)}setAcceptableTimeLimit(e){this.acceptableTimeLimit=e}getJsonEncoding(){return this.jsonEncoding}verify(){return!!this.attestationRequest.verify()||((0,f.logger)(u.DEBUGLEVEL.MEDIUM,"Could not verify proof"),!1)}checkValidity(){if(!this.validateDomain(this.eip712DomainData))return(0,f.logger)(u.DEBUGLEVEL.MEDIUM,"Domain invalid"),!1;if(this.data.description!==this.usageValue)return(0,f.logger)(u.DEBUGLEVEL.MEDIUM,"Description is not correct. :"+this.data.description+" !== "+this.usageValue),!1;let e=new c.Timestamp(this.data.timestamp);return e.setValidity(this.acceptableTimeLimit),e.validateTimestamp()?!!(new a.Nonce).validateNonce(this.getPok().getNonce(),this.requestorKeys.getAddress(),this.domain,c.Timestamp.stringTimestampToLong(this.data.timestamp)-this.acceptableTimeLimit,c.Timestamp.stringTimestampToLong(this.data.timestamp)+this.acceptableTimeLimit)||((0,f.logger)(u.DEBUGLEVEL.LOW,"nonce is not correct"),!1):((0,f.logger)(u.DEBUGLEVEL.LOW,`timestamp is not correct. timestamp = ${this.data.timestamp}, acceptableTimeLimit = ${this.acceptableTimeLimit}`),!1)}getIdentifier(){return this.data.identifier}getType(){return this.attestationRequest.getType()}getPok(){return this.attestationRequest.getPok()}getUserPublicKey(){return this.requestorKeys}}t.Eip712AttestationRequest=l},95899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712AttestationRequestWithUsage=void 0;const n=r(81453),i=r(65185),o=r(55050),f=r(14246),a=r(92219),s=r(9567),c=r(54288),u=r(19421);class l extends s.Eip712Token{constructor(e=undefined,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS,r=c.Timestamp.DEFAULT_TOKEN_TIME_LIMIT){super(),this.Eip712UserDataTypes=[{name:"payload",type:"string"},{name:"description",type:"string"},{name:"identifier",type:"string"},{name:"timestamp",type:"string"},{name:"expirationTime",type:"string"}],this.Eip712UserDataPrimaryName="AttestationRequestWUsage",this.Eip712UserDataDescription='Prove that the "identifier" is the identifier hidden in attestation contained in"payload" and use this to authorize usage of local, temporary keys.',e&&(this.userKey=e),this.acceptableTimeLimit=t,this.maxTokenValidityInMs=r}async fromData(e,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS,r=c.Timestamp.DEFAULT_TOKEN_TIME_LIMIT,n,i,f=undefined){this.setDomain(e),f&&(this.userKey=f);try{this.acceptableTimeLimit=t,this.maxTokenValidityInMs=r,this.attestationRequestWithUsage=i,this.jsonEncoding=await this.makeToken(n,i)}catch(e){throw(0,o.logger)(u.DEBUGLEVEL.LOW,e),new Error("Could not encode object")}try{this.fillJsonData(this.jsonEncoding)}catch(e){throw new Error("Could not decode object")}}Eip712AttestationRequestWithUsage(e,t,r,n){try{this.acceptableTimeLimit=t,this.maxTokenValidityInMs=r,this.jsonEncoding=n,this.fillJsonData(this.jsonEncoding)}catch(e){throw(0,o.logger)(u.DEBUGLEVEL.LOW,e),new Error("Could not decode object")}}fillJsonData(e){if(!e)throw new Error("Empty json");this.jsonEncoding=e;let t=JSON.parse(e),r=t.signatureInHex,a=JSON.parse(t.jsonSigned);this.eip712DomainData=a.domain,this.data=a.message;try{let e=f.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(a,r);this.userPublicKey=i.KeyPair.fromPublicHex(e.substr(2)),(0,o.logger)(u.DEBUGLEVEL.HIGH,"Eip712 withUsage restored address: "+this.userPublicKey.getAddress())}catch(e){let t="Recover Address failed with error:"+e;throw(0,o.logger)(u.DEBUGLEVEL.LOW,t,e),new Error(t)}this.attestationRequestWithUsage||(this.attestationRequestWithUsage=n.AttestationRequestWithUsage.fromBytes((0,o.base64ToUint8array)(this.data.payload))),this.constructorCheck()}constructorCheck(){if(!this.verify())throw new Error("Could not verify Eip712 use attestation")}async makeToken(e,t){this.userKey||await f.SignatureUtility.connectMetamaskAndGetAddress();let r=(new c.Timestamp).getTimeAsString(),n=new c.Timestamp(Date.now()+this.maxTokenValidityInMs).getTimeAsString(),i={payload:(0,o.hexStringToBase64Url)(t.getDerEncoding()),description:this.Eip712UserDataDescription,timestamp:r,identifier:e,expirationTime:n};return await f.SignatureUtility.signEIP712WithBrowserWallet(this.domain,i,this.Eip712UserDataTypes,this.Eip712UserDataPrimaryName,this.userKey)}getIdentifier(){return this.data.identifier}getUserPublicKey(){return this.userPublicKey}getPok(){return this.attestationRequestWithUsage.getPok()}getType(){return this.attestationRequestWithUsage.getType()}getSessionPublicKey(){return this.attestationRequestWithUsage.getSessionPublicKey()}getJsonEncoding(){return this.jsonEncoding}checkValidity(){return!!this.testNonceAndDescription(this.acceptableTimeLimit)}checkTokenValidity(){let e=new c.Timestamp(this.data.timestamp);return e.setValidity(this.maxTokenValidityInMs),e.validateAgainstExpiration(c.Timestamp.stringTimestampToLong(this.data.expirationTime))?!!this.testNonceAndDescription(this.maxTokenValidityInMs):((0,o.logger)(u.DEBUGLEVEL.LOW,"time.validateAgainstExpiration filed"),!1)}testNonceAndDescription(e){if(!e)throw new Error("timeLimit required");let t=c.Timestamp.stringTimestampToLong(this.data.timestamp)-e,r=c.Timestamp.stringTimestampToLong(this.data.timestamp)+e;return!!(new a.Nonce).validateNonce(this.attestationRequestWithUsage.getPok().getNonce(),this.userPublicKey.getAddress(),this.domain,t,r)&&(this.validateDomain(this.eip712DomainData)?this.data.description===this.Eip712UserDataDescription:((0,o.logger)(u.DEBUGLEVEL.MEDIUM,"Domain invalid"),!1))}verify(){return!!this.attestationRequestWithUsage.verify()}}t.Eip712AttestationRequestWithUsage=l},22110:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712AttestationUsage=void 0;const n=r(65185),i=r(14246),o=r(9567),f=r(49674),a=r(55050),s=r(5393),c=r(93431),u=r(92219),l=r(54288),d=r(19421);class h extends o.Eip712Token{constructor(e=undefined,t=l.Timestamp.DEFAULT_TOKEN_TIME_LIMIT){super(),this.PLACEHOLDER_CHAIN_ID=0,this.Eip712PrimaryName="AttestationUsage",this.Eip712Description='Prove that the "identifier" is the identifier hidden in attestation contained in"payload".',this.Eip712UserTypes=[{name:"description",type:"string"},{name:"identifier",type:"string"},{name:"payload",type:"string"},{name:"timestamp",type:"string"},{name:"expirationTime",type:"string"}],this.maxTokenValidityInMs=t,e&&(this.userKey=e)}async addData(e,t,r){this.setDomain(e),this.useAttestation=r;try{this.jsonEncoding=await this.makeToken(t,r)}catch(e){throw(0,a.logger)(d.DEBUGLEVEL.LOW,e),new Error("Could not encode object. "+e)}try{this.fillJsonData(this.jsonEncoding)}catch(e){return(0,a.logger)(d.DEBUGLEVEL.LOW,e),!1}this.constructorCheck()}fillJsonData(e,t=undefined){if(!e)throw new Error("Empty json");t&&(this.attestorKey=t),this.jsonEncoding=e;let r=JSON.parse(e),o=r.signatureInHex,s=JSON.parse(r.jsonSigned);this.eip712DomainData=s.domain,this.data=s.message;try{let e=i.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(s,o);this.requestorKeys=n.KeyPair.fromPublicHex(e.substr(2)),(0,a.logger)(d.DEBUGLEVEL.HIGH,"restored address: "+this.requestorKeys.getAddress())}catch(e){let t="Recover Address failed with error:"+e;throw(0,a.logger)(d.DEBUGLEVEL.LOW,t,e),new Error(t)}if(!this.useAttestation)try{(0,a.logger)(d.DEBUGLEVEL.VERBOSE,(0,a.uint8tohex)((0,a.base64ToUint8array)(this.data.payload))),this.useAttestation=f.UseAttestation.fromBytes((0,a.base64ToUint8array)(this.data.payload),this.attestorKey)}catch(e){let t="Failed to read UseAttestation. "+e;throw(0,a.logger)(d.DEBUGLEVEL.MEDIUM,t,e),new Error(t)}this.constructorCheck()}constructorCheck(){if(!this.verify())throw new Error("Could not verify Eip712 use attestation")}async makeToken(e,t){this.userKey||await i.SignatureUtility.connectMetamaskAndGetAddress();let r={payload:(0,a.hexStringToBase64Url)(t.getDerEncoding()),description:this.Eip712Description,timestamp:(new l.Timestamp).getTimeAsString(),identifier:e,expirationTime:new l.Timestamp(Date.now()+this.maxTokenValidityInMs).getTimeAsString()};return await i.SignatureUtility.signEIP712WithBrowserWallet(this.domain,r,this.Eip712UserTypes,this.Eip712PrimaryName,this.userKey)}proofLinking(){let e=(new s.AttestationCrypto).mapToCurveMultiplier(this.getType(),this.getIdentifier());return!!c.Point.decodeFromUint8(this.getAttestation().getUnsignedAttestation().getCommitment(),c.CURVE_BN256).subtract(s.Pedestren_G.multiplyDA(e)).equals(this.getPok().getRiddle())||((0,a.logger)(d.DEBUGLEVEL.LOW,"candidateRiddle.equals(this.getPok().getRiddle()) error"),!1)}getPok(){return this.useAttestation.getPok()}getType(){return this.useAttestation.type}getIdentifier(){return this.data.identifier}getAttestation(){return this.useAttestation.getAttestation()}getJsonEncoding(){return this.jsonEncoding}checkTokenValidity(){let e=l.Timestamp.stringTimestampToLong(this.data.expirationTime)-this.maxTokenValidityInMs-2*l.Timestamp.ALLOWED_ROUNDING,t=l.Timestamp.stringTimestampToLong(this.data.expirationTime);if(!this.useAttestation.checkValidity())return(0,a.logger)(d.DEBUGLEVEL.LOW,"useAttestation.checkValidity failed"),!1;if(!this.validateDomain(this.eip712DomainData))return(0,a.logger)(d.DEBUGLEVEL.MEDIUM,"Domain invalid"),!1;if(this.data.description!=this.Eip712Description)return(0,a.logger)(d.DEBUGLEVEL.LOW,`wrong description: "${this.data.description}", must be "${this.Eip712Description}"`),!1;let r=new l.Timestamp(this.data.timestamp);return r.setValidity(this.maxTokenValidityInMs),r.validateAgainstExpiration(l.Timestamp.stringTimestampToLong(this.data.expirationTime))?this.requestorKeys.getAddress().toLowerCase()!==this.useAttestation.getAttestation().getUnsignedAttestation().getAddress().toLowerCase()?((0,a.logger)(d.DEBUGLEVEL.LOW,"wrong address"),!1):(new u.Nonce).validateNonce(this.useAttestation.getPok().getNonce(),this.useAttestation.getAttestation().getUnsignedAttestation().getAddress(),this.domain,e,t)?!!this.proofLinking()||((0,a.logger)(d.DEBUGLEVEL.LOW,"wrong proofLinking"),!1):((0,a.logger)(d.DEBUGLEVEL.LOW,"wrong Nonce"),!1):((0,a.logger)(d.DEBUGLEVEL.LOW,"verify timestamp failed.\n"+this.data.timestamp+"\n"+this.maxTokenValidityInMs+"\n"+this.data.expirationTime+"\n"+l.Timestamp.stringTimestampToLong(this.data.expirationTime)+"\n"),!1)}verify(){return!!this.useAttestation.verify()}getSessionPublicKey(){return this.useAttestation.getSessionPublicKey()}}t.Eip712AttestationUsage=h},9567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712Token=void 0;const n=r(75888);class i extends n.Eip712Validator{}t.Eip712Token=i},75888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712Validator=void 0;const n=r(58015),i=r(27309),o=r(72353),f=r(65185),a=r(58204),s=r(14246),c=r(55050),u=r(19421);class l{constructor(){this.XMLConfig=o.XMLconfigData}static stringIsAValidUrl(e){let t;try{t=new URL(e)}catch(e){return(0,c.logger)(u.DEBUGLEVEL.LOW,"cant construct url. Error:",e),!1}return"http:"===t.protocol||"https:"===t.protocol}setDomainAndTimout(e){if(!l.stringIsAValidUrl(e))throw new Error("wrong domain");this.domain=e}setDomain(e){if(!l.stringIsAValidUrl(e))throw new Error("wrong domain");this.domain=e}getDomain(){return this.domain}setSalt(e){this.salt=e}getSalt(){return this.salt}setPrimaryName(e){this.primaryName=e}getPrimaryName(){return this.primaryName}setChainId(e){if(e<1)throw new Error("ChainId should be a positive number");this.chainId=e}getChainId(){return this.chainId}validateDomain(e){return e?e.name&&e.name.toLowerCase()===this.domain.toLowerCase()?e.version&&e.version===s.SignatureUtility.Eip712Data.PROTOCOL_VERSION?this.chainId&&e.chainId!==this.chainId?((0,c.logger)(u.DEBUGLEVEL.LOW,"Chain ID is wrong"),!1):this.verifyingContract&&e.verifyingContract!==this.verifyingContract?((0,c.logger)(u.DEBUGLEVEL.LOW,"Verifying contract is wrong"),!1):!this.salt||e.salt===this.salt||((0,c.logger)(u.DEBUGLEVEL.LOW,"Salt is wrong"),!1):((0,c.logger)(u.DEBUGLEVEL.LOW,"Protocol version is wrong"),!1):((0,c.logger)(u.DEBUGLEVEL.LOW,"Domain name is not valid"),!1):((0,c.logger)(u.DEBUGLEVEL.LOW,"Input param domainToCheck required"),!1)}retrieveAttestedObject(e){let t=e.payload,r=f.KeyPair.publicFromBase64orPEM(o.XMLconfigData.base64attestorPubKey),s=o.XMLconfigData.base64senderPublicKeys;return n.AttestedObject.fromBytes((0,c.hexStringToUint8)(t),i.UseToken,r,a.Ticket,s)}verifySignature(e,t){let r=JSON.parse(e),n=r.signatureInHex,i=JSON.parse(r.jsonSigned),o=s.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(i,n),a=f.KeyPair.fromPublicHex(o.substr(2));return t.toLowerCase()!==i.message.address.toLowerCase()?((0,c.logger)(u.DEBUGLEVEL.LOW,"message.address is not equal pkAddress"),!1):t.toLowerCase()===a.getAddress().toLowerCase()||((0,c.logger)(u.DEBUGLEVEL.LOW,"Recovered address is not equal pkAddress"),!1)}}t.Eip712Validator=l},98478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FullProofOfExponent=void 0;const n=r(93431),i=r(61538),o=r(39980),f=r(55050),a=r(13649),s=r(8441),c=r(5393);class u{constructor(){}static fromData(e,t,r,n=new Uint8Array([])){let i=new this;return i.riddle=e,i.tPoint=t,i.challengeResponse=r,i.nonce=n,i.encoding=i.makeEncoding(e,t,r,n),i}static fromBytes(e){let t=o.AsnParser.parse(e,i.Proof);return this.fromASNType(t)}static fromASNType(e){let t=new Uint8Array(e.riddle),r=n.Point.decodeFromUint8(t,n.CURVE_BN256),i=new Uint8Array(e.challengePoint),o=(0,f.uint8ToBn)(i),a=new Uint8Array(e.responseValue),s=n.Point.decodeFromUint8(a,n.CURVE_BN256),c=new Uint8Array(e.nonce);return this.fromData(r,s,o,c)}static fromBase64(e){return u.fromBytes((0,f.base64ToUint8array)(e))}makeEncoding(e,t,r,n=new Uint8Array([])){let i=a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(e.getEncoded()))+a.Asn1Der.encode("OCTET_STRING",r.toString(16))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(t.getEncoded()))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(n));return a.Asn1Der.encode("SEQUENCE_30",i)}getRiddle(){return this.riddle}getPoint(){return this.tPoint}getChallengeResponse(){return this.challengeResponse}getNonce(){return this.nonce}getUsageProofOfExponent(){return s.UsageProofOfExponent.fromData(this.tPoint,this.challengeResponse,this.nonce)}getDerEncoding(){return this.encoding}getAsnType(){const e=new i.Proof;e.nonce=this.getNonce();let t=(0,f.bnToUint8)(this.getChallengeResponse());if(t.length<32){let e=t;t=new Uint8Array(32),t.set(e,32-e.length)}return e.challengePoint=t,e.riddle=this.getRiddle().getEncoded(),e.responseValue=this.getPoint().getEncoded(),e}validateParameters(){try{if(!c.AttestationCrypto.validatePointToCurve(this.riddle,c.AttestationCrypto.curve)||!c.AttestationCrypto.validatePointToCurve(this.tPoint,c.AttestationCrypto.curve))throw new Error("Point not in the curve");return!(this.challengeResponse<=0n||this.challengeResponse>=c.AttestationCrypto.curveOrder)&&(!this.riddle.equals(c.AttestationCrypto.G)&&!this.riddle.equals(c.AttestationCrypto.H)&&(!this.tPoint.equals(c.AttestationCrypto.G)&&!this.tPoint.equals(c.AttestationCrypto.H)))}catch(e){return!1}}}t.FullProofOfExponent=u},3365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifierAttestation=void 0;const n=r(5393),i=r(86085),o=r(55050),f=r(19421),a=r(13649);class s extends i.Attestation{constructor(){super()}fromCommitment(e,t){this.subjectKey=t,this.setVersion(s.HIDDEN_IDENTIFIER_VERSION),this.setSubject("CN="),this.setSigningAlgorithm(s.DEFAULT_SIGNING_ALGORITHM),this.setSubjectPublicKeyInfo(t),this.setCommitment(e),this.type=s.HIDDEN_TYPE,this.identifier=s.HIDDEN_IDENTIFIER,this.setUnlimitedValidity()}setUnlimitedValidity(){super.setNotValidBefore(Date.now()),super.setNotValidAfter(Date.parse("31 Dec 9999 23:59:59"))}static fromData(e,t,r,i){let o=(new n.AttestationCrypto).makeCommitment(e,t,i),f=new this;return f.fromCommitment(o,r),f.type=t.toString(),f.identifier=e,f}static fromLabelAndUrl(e,t,r){let n=new this;return n.subjectKey=r,n.setVersion(s.NFT_VERSION),n.setSubject(n.makeLabeledURI(e,t)),n.setSigningAlgorithm(s.DEFAULT_SIGNING_ALGORITHM),n.setIssuer("CN=attestation.id"),n.setSerialNumber(1),n.setSubjectPublicKeyInfo(r),n.setUnlimitedValidity(),n.type=e,n.identifier=t,n}makeLabeledURI(e,t){return`${s.LABELED_URI_LABEL}="${t} ${e}"`}static fromBytes(e){let t=new this;if(t.fromBytes(e),!t.checkValidity())throw new Error("Could not validate object");if(t.getVersion()==s.NFT_VERSION){let e=a.Asn1Der.parseX500Names(t.getSubject()),r=!1;if(e.forEach((e=>{if(!r&&e.type==s.LABELED_URI_LABEL){r=!0;let n=e.value.split(" ");if(2!=n.length)throw new Error("LabeledURI values should be separated with space and 2 items only: "+e.value);t.type=n[0],t.identifier=n[1]}})),!r)throw new Error("Cant find LABELED_URI")}else t.type=s.HIDDEN_TYPE,t.identifier=s.HIDDEN_IDENTIFIER;return t}setSubjectPublicKeyInfo(e){this.subjectKey=e}setCommitment(e){this.commitment=e}checkValidity(){return super.checkValidity()?this.getVersion()!=s.HIDDEN_IDENTIFIER_VERSION&&this.getVersion()!=s.NFT_VERSION?((0,o.logger)(f.DEBUGLEVEL.LOW,"The version number is "+this.getVersion()+", it must be either "+s.HIDDEN_IDENTIFIER_VERSION+" or "+s.NFT_VERSION),!1):this.getSigningAlgorithm()!==s.DEFAULT_SIGNING_ALGORITHM?((0,o.logger)(f.DEBUGLEVEL.LOW,"The subject is supposed to only be an Ethereum address as the Common Name"),!1):this.getVersion()!=s.NFT_VERSION||this.subject.includes(s.LABELED_URI_LABEL+"=")?!(this.getVersion()==s.HIDDEN_IDENTIFIER_VERSION&&this.getCommitment().length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyPair=t.subtle=void 0;const n=r(55050),i=r(13649),o=r(93431),f=r(39980),a=r(54759),s=r(86623),c=r(8573),u=r(19421);let l=r(86266);if("object"==typeof crypto&&crypto.subtle)t.subtle=crypto.subtle;else{let e=r(86332).webcrypto;if(!e)throw(0,n.logger)(u.DEBUGLEVEL.LOW,"Webcrypto not accessible"),new Error("webcrypto.subtle missing");t.subtle=e.subtle}let d=new l.ec("secp256k1"),h=r(91094);const p={p192:null,p224:null,p256:"P-256",p384:"P-384",p521:"P-521",curve25519:null,ed25519:null,secp256k1:null};new o.Point(55066263022277343669578718895168534326250603453777594175500187360389116729240n,32670510020758816978083085130507043184471273380659243275938904335757337482424n);class y{constructor(){this.ethereumPrefix="Ethereum Signed Message:\n",this.algorithmASNList={secp256k1:["3081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f3044042000000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000704410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101","06052b8104000a"],sect283k1:["3081f806072a8648ce3d02013081ec020101302506072a8648ce3d0102301a0202011b06092a8648ce3d01020303300902010502010702010c304c042400000000000000000000000000000000000000000000000000000000000000000000000004240000000000000000000000000000000000000000000000000000000000000000000000010449040503213f78ca44883f1a3b8162f188e553cd265f23c1567a16876913b0c2ac245849283601ccda380f1c9e318d90f95d07e5426fe87e45c0e8184698e45962364e34116177dd2259022401ffffffffffffffffffffffffffffffffffe9ae2ed07577265dff7f94451e061e163c61020104"],p256:["3081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d0101022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff30440420ffffffff00000001000000000000000000000000fffffffffffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551020101"]}}getPrivateAsUint8(){return this.privKey}getPrivateAsHexString(){return(0,n.uint8tohex)(this.privKey)}getPrivateAsBigInt(){return(0,n.uint8ToBn)(this.privKey)}static privateFromBigInt(e){let t=new this;return t.privKey=new Uint8Array((0,n.hexStringToArray)(e.toString(16).padStart(64,"0"))),t}static fromPublicHex(e){if(null===(e=e.replace("0x","")).toLowerCase().match(/^[a-f0-9]+$/i))throw new Error("Wrong Hex string input");if(e.length<129||e.length>130)throw new Error("Wrong public hex length");let t=new this;return t.pubKey=new Uint8Array((0,n.hexStringToArray)(e)),t}static fromPrivateUint8(e,t=""){if(!e||32!=e.length)throw new Error("Wrong private key. Should be 32 bytes Uint8");let r=new this;if(r.privKey=e,!t||!o.CURVES.hasOwnProperty(t))throw new Error(`Algorithm ${t} not implemented.`);return r.algorithm=t,r}static publicFromBase64orPEM(e){return y.publicFromPEM((0,n.pemOrBase64Orbase64urlToString)(e))}static publicFromPEM(e){const t=(0,n.base64ToUint8array)(e);let r=f.AsnParser.parse(t,a.PublicKeyInfoValue);return y.publicFromUint(new Uint8Array(r.publicKey))}static publicFromUint(e){let t=new this;if(65!=e.byteLength)throw(0,n.logger)(u.DEBUGLEVEL.LOW,"Wrong public key length"),new Error("Wrong public key length");return t.pubKey=new Uint8Array(e),t}static publicFromSubjectPublicKeyInfo(e){let t=new this;if(!e.value)throw new Error("Key value not defined.");return t.pubKey=new Uint8Array(e.value.publicKey),t}static publicFromSubjectPublicKeyValue(e){let t=new this;return t.pubKey=new Uint8Array(e.publicKey),t.algorithm=t.getAlgorithNameFromASN1((0,n.uint8tohex)(new Uint8Array(e.algorithm))),t}static privateFromKeyInfo(e){let t=new this,r=f.AsnParser.parse(e.keysData,a.PrivateKeyData);return t.algorithm=t.getAlgorithNameFromASN1((0,n.uint8tohex)(new Uint8Array(e.algIdent))),t.privKey=new Uint8Array(r.privateKey),t}static privateFromKeyDataPEM(e){const t=(0,n.base64ToUint8array)(e);let r=f.AsnParser.parse(t,a.PrivateKeyData),i=new this;return i.algorithm=i.getAlgorithNameFromASN1((0,n.uint8tohex)(new Uint8Array(r.algDescr))),i.privKey=new Uint8Array(r.privateKey),i}getAlgorithNameFromASN1(e){let t={};for(const e in this.algorithmASNList)this.algorithmASNList[e].forEach((r=>{t[r]=e}));if(t.hasOwnProperty(e))return t[e];{let e="Unknown algorithm.";throw(0,n.logger)(u.DEBUGLEVEL.LOW,e),new Error(e)}}static privateFromPEM(e){const t=(0,n.base64ToUint8array)(e);let r=f.AsnParser.parse(t,a.PrivateKeyInfo);return y.privateFromKeyInfo(r)}static async generateKeyAsync(){const e=await crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt"]);let t=["0x"];const r=await crypto.subtle.exportKey("raw",e);return new Uint8Array(r).forEach((e=>{var r=e.toString(16);r.length%2&&(r="0"+r),t.push(r)})),this.privateFromBigInt(BigInt(t.join(""))%o.CURVE_SECP256k1.n)}static createKeys(){return this.privateFromBigInt(BigInt("0x"+(0,n.uint8tohex)(crypto.getRandomValues(new Uint8Array(32))))%o.CURVE_SECP256k1.n)}getPublicKeyAsHexStr(){if(this.pubKey)return(0,n.uint8tohex)(this.pubKey);if(o.CURVES.hasOwnProperty(this.algorithm)&&p.hasOwnProperty(this.algorithm)){let e=new l.ec(this.algorithm);if(!this.getPrivateAsHexString())throw(0,n.logger)(u.DEBUGLEVEL.LOW,this),new Error("Cant sign. This is only public key.");return e.keyFromPrivate(this.getPrivateAsHexString(),"hex").getPublic("hex").toString()}{let e='Private -> Public key not implemented for that aglorighm - "'+this.algorithm+'"';throw(0,n.logger)(u.DEBUGLEVEL.LOW,e),new Error(e)}}getAsnDerPublic(){var e=this.getPublicKeyAsHexStr();let t="";if(this.algorithm){if(!this.algorithmASNList.hasOwnProperty(this.algorithm)){let e="Fatal Error. Algorithm not implemented yet - "+this.algorithm;throw(0,n.logger)(u.DEBUGLEVEL.LOW,e),new Error(e)}t=this.algorithmASNList[this.algorithm][0]}else{let e="algorithm undefined, lets use default.";(0,n.logger)(u.DEBUGLEVEL.VERBOSE,e),t=this.algorithmASNList.secp256k1[0]}return i.Asn1Der.encode("SEQUENCE_30",t+i.Asn1Der.encode("BIT_STRING",e))}getAddress(){var e=this.getPublicKeyAsHexStr();return e=e.substr(2),"0x"+h.keccak256((0,n.hexStringToArray)(e)).substr(-40).toUpperCase()}signBytes(e){if(!this.getPrivateAsHexString())throw new Error("Cant sign. This is only public key.");let t=d.keyFromPrivate(this.getPrivateAsHexString(),"hex"),r=h.keccak256(e);return t.sign(r).toDER("hex")}signStringWithEthereum(e){if(!this.getPrivateAsHexString())throw new Error("Cant sign. This is only public key.");let t=d.keyFromPrivate(this.getPrivateAsHexString(),"hex"),r=this.ethereumPrefix+e.length+e,i=h.keccak256((0,n.stringToArray)(r));return t.sign(i).toDER("hex")}signHexStringWithEthereum(e){return this.signStringWithEthereum("0x"+e)}signBytesWithEthereum(e){let t="0x"+(0,n.uint8tohex)(new Uint8Array(e));return(0,n.logger)(u.DEBUGLEVEL.HIGH,"message: "+t),this.signStringWithEthereum(t)}signDeterministicSHA256(e){let t=Array.from(s.ethers.utils.arrayify(s.ethers.utils.sha256(e)));return this.signBytes(t)}verifyDeterministicSHA256(e,t){let r,i,a=s.ethers.utils.sha256(e).substr(2);if(!o.CURVES.hasOwnProperty(this.algorithm)||!p.hasOwnProperty(this.algorithm)){let e='Elliptic.js curve not implemented for that aglorighm - "'+this.algorithm+'"';throw(0,n.logger)(u.DEBUGLEVEL.LOW,e),new Error(e)}r=new l.ec(this.algorithm).keyFromPublic(this.getPublicKeyAsHexStr(),"hex");if(128==t.length||130==t.length){var d=t.match(/([a-f\d]{64})/gi);if(!d||d.length<2)throw new Error("Wrong key syntax");i={r:d[0],s:d[1]}}else{let e=f.AsnParser.parse((0,n.hexStringToUint8)(t),c.Signature);i={r:BigInt(e.r).toString(16).padStart(64,"0"),s:BigInt(e.s).toString(16).padStart(64,"0")}}return r.verify(a,i)}verifyHexStringWithEthereum(e,t){let r="0x"+e,i=h.keccak256((0,n.stringToArray)(this.ethereumPrefix+r.length+r)),o=d.keyFromPublic(this.getPublicKeyAsHexStr(),"hex");var f=t.match(/([a-f\d]{64})/gi);if(!f||f.length<2)throw new Error("Wrong key syntax");let a={r:f[0],s:f[1]};return o.verify(i,a)}signRawBytesWithEthereum(e){let t=s.ethers.utils.keccak256(e).substring(2);if((0,n.logger)(u.DEBUGLEVEL.HIGH,`signRawBytesWithEthereum: key: ${this.getAddress()}, hash: ${t}`),!this.getPrivateAsHexString())throw new Error("Cant sign. This is only public key.");let r=d.keyFromPrivate(this.getPrivateAsHexString(),"hex"),i=r.sign((0,n.hexStringToUint8)(t));return(0,n.ecSignatureToSRVhex)(i,r)}verifyBytesWithEthereum(e,t){if(!e||!e.length)throw new Error("Missing data to verify");if(!t)throw new Error("Missing signature to verify");let r=(0,n.hexStringToArray)(s.ethers.utils.keccak256(e)),i=d.keyFromPublic(this.getPublicKeyAsHexStr(),"hex");(0,n.logger)(u.DEBUGLEVEL.HIGH,`verifyBytesWithEthereum: key: ${this.getAddress()}, hash: ${(0,n.uint8tohex)(new Uint8Array(r))}`);var o=(t=(0,n.uint8tohex)(y.anySignatureToRawUint8(t))).match(/([a-f\d]{64})/gi);if(!o||o.length<2)throw new Error("Wrong key syntax");let f={r:o[0],s:o[1]};return i.verify(r,f)}getJWTParams(){let e=p[this.algorithm];if(!e){let e=`Cant create subtleCrypto key for curve '${this.algorithm}'`;throw(0,n.logger)(u.DEBUGLEVEL.LOW,e),new Error(e)}let t=this.getPublicKeyAsHexStr();return{crv:e,d:(0,n.uint8arrayToBase64)(this.getPrivateAsUint8()),key_ops:["sign"],kty:"EC",x:(0,n.uint8arrayToBase64)((0,n.hexStringToUint8)(t.substr(2,64))),y:(0,n.uint8arrayToBase64)((0,n.hexStringToUint8)(t.substr(66,64)))}}getSubtlePrivateKey(){let e=p[this.algorithm];return t.subtle.importKey("jwk",this.getJWTParams(),{name:"ECDSA",namedCurve:e},!0,["sign"])}getSubtlePublicKey(){let e=p[this.algorithm],r=this.getJWTParams(),n=Object.assign({},r);return delete n.d,n.key_ops=["verify"],t.subtle.importKey("jwk",n,{name:"ECDSA",namedCurve:e},!0,["verify"])}async signStringWithSubtle(e){return await t.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},await this.getSubtlePrivateKey(),Uint8Array.from((0,n.stringToArray)(e)))}async verifyStringWithSubtle(e,r){return(0,n.logger)(u.DEBUGLEVEL.VERBOSE,"pubkey: "+this.getPublicKeyAsHexStr()+" msg:"+r+" signature:"+(0,n.uint8tohex)(e)),(0,n.logger)(u.DEBUGLEVEL.VERBOSE,await this.getSubtlePublicKey()),await t.subtle.verify({name:"ECDSA",hash:{name:"SHA-256"}},await this.getSubtlePublicKey(),e,Uint8Array.from((0,n.stringToArray)(r)))}async verifyStringWithSubtleDerSignature(e,t){let r=f.AsnParser.parse(e,c.Signature);const i=BigInt(r.r).toString(16).padStart(64,"0")+BigInt(r.s).toString(16).padStart(64,"0");return this.verifyStringWithSubtle((0,n.hexStringToUint8)(i),t)}static anySignatureToRawUint8(e){let t,r;if(t="string"==typeof e?(0,n.hexStringToUint8)(e):e,!t||!t.length)throw new Error("Empty signature received");switch(t.length){case 64:(0,n.logger)(u.DEBUGLEVEL.LOW,`anySignatureToRawUint8 received 64 bytes signature (without v value) = ${(0,n.uint8tohex)(t)}`);case 65:r=t;break;case 66:if(4!=t[0])throw new Error(`Cant recognize signature: ${(0,n.uint8tohex)(t)}`);r=t.slice(1,65);break;case 70:case 71:case 72:let e=f.AsnParser.parse(t,c.Signature);r=(0,n.hexStringToUint8)(BigInt(e.r).toString(16).padStart(64,"0")+BigInt(e.s).toString(16).padStart(64,"0"));break;default:let i="wrong Signature: "+(0,n.uint8tohex)(t);throw new Error(i)}return(0,n.logger)(u.DEBUGLEVEL.VERBOSE,"ready signature:"+(0,n.uint8tohex)(r)),r}static parseKeyArrayStrings(e){const t={};for(let r in e)if("string"==typeof e[r]){const n=e[r].split("|"),i=[];for(const e of n)i.push(y.publicFromBase64orPEM(e));t[r]=i}else Array.isArray(t),t[r]=e[r];return t}}t.KeyPair=y},92219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Nonce=void 0;const n=r(55050),i=r(14246),o=r(91104),f=r(54288),a=r(19421);class s{constructor(){this.DEFAULT_NONCE_TIME_LIMIT_MS=12e5}static async makeNonce(e="",t,r=new Uint8Array(0),f=0){if(e||(e=await i.SignatureUtility.connectMetamaskAndGetAddress()),!o.ValidationTools.isAddress(e))throw new Error("Address is not valid");return e=e.toUpperCase(),f||(f=Date.now()),(0,n.uint8merge)([Uint8Array.from((0,n.stringToArray)(e)),(0,n.hashStringTo32bytesUint8)(t),(0,n.getInt64Bytes)(f),r])}validateNonce(e,t,r,i,o,f=new Uint8Array(0)){return s.validateAddress(e,t)?this.validateReceiverIdentifier(e,r)?this.validateTimestamp(e,i,o)?this.validateOtherData(e,f)?this.validateOtherData(e,f):((0,n.logger)(a.DEBUGLEVEL.LOW,"otherData check failed"),!1):((0,n.logger)(a.DEBUGLEVEL.LOW,"timestamp check failed"),!1):((0,n.logger)(a.DEBUGLEVEL.LOW,"validateReceiverIdentifier check failed"),!1):((0,n.logger)(a.DEBUGLEVEL.LOW,"validateAddress check failed for "+t),!1)}validateTimestamp(e,t,r){let n=s.getTimestamp(e),i=new f.Timestamp(n);return i.setValidity(r-t),i.validateAgainstExpiration(r)}static validateAddress(e,t){let r=(0,n.uint8toString)(e.slice(s.senderAddressIndexStart,s.senderAddressIndexStop));return t.toUpperCase()===r.toUpperCase()||((0,n.logger)(a.DEBUGLEVEL.LOW,"nonceAddress = "+r),!1)}validateReceiverIdentifier(e,t){return(0,n.uint8tohex)((0,n.hashStringTo32bytesUint8)(t)).toLowerCase()===(0,n.uint8tohex)(e.slice(s.receiverIdentifierIndexStart,s.receiverIdentifierIndexStop)).toLowerCase()}validateOtherData(e,t){return(0,n.uint8tohex)(t).toLowerCase()===(0,n.uint8tohex)(e.slice(s.otherDataIndexStart,s.otherDataIndexStart+t.length)).toLowerCase()}static getTimestamp(e){let t=e.slice(s.timestampIndexStart,s.timestampIndexStop),r=(0,n.uint8ToBn)(t);if(r>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("timestamp value bigger than MAX_SAFE_INTEGER");return Number(r)}}t.Nonce=s,s.LONG_BYTES=8,s.senderAddressIndexStart=0,s.senderAddressIndexStop=o.ValidationTools.ADDRESS_LENGTH_IN_BYTES,s.receiverIdentifierIndexStart=s.senderAddressIndexStop,s.receiverIdentifierIndexStop=s.receiverIdentifierIndexStart+32,s.timestampIndexStart=s.receiverIdentifierIndexStop,s.timestampIndexStop=s.timestampIndexStart+s.LONG_BYTES,s.otherDataIndexStart=s.timestampIndexStop},93431:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Point=t.CURVE_BN256=t.CURVES=t.CURVE_SECP256k1=void 0;const n=r(55050),i=r(19421);t.CURVE_SECP256k1={P:2n**256n-2n**32n-977n,n:2n**256n-432420386565659656852420866394968145599n,magicExp:(2n**256n-2n**32n-977n+1n)/4n,A:0n,B:7n},t.CURVES={p256:{P:BigInt("0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),A:BigInt("0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),B:BigInt("0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),n:BigInt("0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),GX:BigInt("0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"),GY:BigInt("0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"),h:1n},secp256k1:{P:2n**256n-2n**32n-977n,A:0n,B:7n,n:2n**256n-432420386565659656852420866394968145599n,GX:55066263022277343669578718895168534326250603453777594175500187360389116729240n,GY:32670510020758816978083085130507043184471273380659243275938904335757337482424n},BN256:{P:115792089237314936872688561244471742058375878355761205198700409522629664518163n,n:115792089237314936872688561244471742058035595988840268584488757999429535617037n,magicExp:115792089237314936872688561244471742058375878355761205198700409522629664518164n>>2n,A:0n,B:3n,h:1n}},t.CURVE_BN256={P:21888242871839275222246405745257275088696311157297823662689037894645226208583n,n:21888242871839275222246405745257275088548364400416034343698204186575808495617n,A:0n,B:3n,h:1n};class o{constructor(e,r,i=t.CURVE_BN256){this.x=e,this.y=r,this.useCurve=i,this.x=(0,n.mod)(e,this.useCurve.P),this.y=(0,n.mod)(r,this.useCurve.P),this.useCurve=i}double(){const e=this.x,t=this.y,r=(0,n.mod)(3n*e**2n*(0,n.invert)(2n*t,this.useCurve.P),this.useCurve.P),i=(0,n.mod)(r*r-2n*e,this.useCurve.P),f=(0,n.mod)(r*(e-i)-t,this.useCurve.P);return new o(i,f,this.useCurve)}newZero(){return new o(0n,0n,this.useCurve)}add(e){const[t,r]=[this,e],[i,f,a,s]=[t.x,t.y,r.x,r.y];if(0n===i||0n===f)return r;if(0n===a||0n===s)return t;if(i===a&&f===s)return this.double();if(i===a&&f===(0,n.mod)(-s,this.useCurve.P))return this.newZero();const c=(0,n.mod)((s-f)*(0,n.invert)(a-i,this.useCurve.P),this.useCurve.P),u=(0,n.mod)(c*c-i-a,this.useCurve.P),l=(0,n.mod)(c*(i-u)-f,this.useCurve.P);return new o(u,l,this.useCurve)}multiplyDA(e){let t=this.newZero(),r=this;for(;e>0n;)1n&e&&(t=t.add(r)),r=r.double(),e>>=1n;return t}isInfinity(){return null==this.x||null==this.y||0n==this.x&&0n==this.y}getEncoded(e=!1){if(this.isInfinity())return new Uint8Array(0);let t=(0,n.bnToBuf)(this.x,32);return e?(0,n.uint8merge)([Uint8Array.from([2]),t]):(0,n.uint8merge)([Uint8Array.from([4]),t,(0,n.bnToBuf)(this.y,32)])}equals(e){if(null==e)return!1;let t=this.isInfinity(),r=e.isInfinity();if(t||r)return t&&r;let n=e;return this.x===n.x&&this.y===n.y}static decodeFromHex(e,r=t.CURVE_BN256){if(130!=e.length)throw new Error("only decompressed points allowed. 65 bytes.");return o.decodeFromUint8((0,n.hexStringToUint8)(e),r)}static decodeFromUint8(e,r=t.CURVE_BN256){if(65!=e.length)throw new Error("only decompressed points allowed. 65 bytes.");let f;if(4!==e[0])throw new Error("only decompressed points allowed");{let t=(0,n.uint8ToBn)(e.slice(1,33)),i=(0,n.uint8ToBn)(e.slice(33));f=new o(t,i,r)}if(!f.validate()){let e="Point is not valid ("+f.x.toString(16)+","+f.y.toString(16)+")";throw(0,n.logger)(i.DEBUGLEVEL.LOW,e),new Error(e)}return f}validate(e=!1){return"boolean"==typeof e&&(e=this.useCurve),0n==(0,n.mod)((0,n.mod)(this.y*this.y,e.P)-(0,n.mod)((0,n.BnPowMod)(this.x,3n,e.P)+(0,n.mod)(this.x*e.A,e.P)+e.B,e.P),e.P)}negate(){return new o(this.x,this.useCurve.P-this.y,this.useCurve)}subtract(e){return this.add(e.negate())}}t.Point=o},14246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureUtility=void 0;const n=r(55050),i=r(86623),o=r(56371),f=r(19421);let a=new(r(86266).ec)("secp256k1"),s=r(91094);class c{static sign(e,t){let r=a.keyFromPrivate(t.getPrivateAsHexString(),"hex"),i=s.keccak256((0,n.hexStringToArray)(e));return r.sign(i).toDER("hex")}static verify(e,t,r){return c.verifyArrayBuf((0,n.hexStringToArray)(e),t,r)}static verifyArrayBuf(e,t,r){let n=a.keyFromPublic(r.getPublicKeyAsHexStr(),"hex"),i=s.keccak256(e);return n.verify(i,t)}static async signMessageWithBrowserWallet(e){await c.connectMetamaskAndGetAddress();let t=new i.ethers.providers.Web3Provider(window.ethereum).getSigner();return await t.signMessage(e)}static async recoverPublicKeyFromMessageSignature(e,t){const r=i.ethers.utils.hashMessage(e),n=i.ethers.utils.arrayify(r);return await i.ethers.utils.recoverPublicKey(n,t)}static recoverPublicKeyFromTypedMessageSignature(e,t){let r,f;try{let t=e.message.payload;e.message.payload=i.ethers.utils.id(t).substr(2);let n=e.types;delete n.EIP712Domain,r=o._TypedDataEncoder.hash(e.domain,n,e.message),e.message.payload=t}catch(e){throw new Error("Cant sign data, possibly wrong format. "+e)}try{f=(0,o.recoverPublicKey)((0,n.hexStringToUint8)(r.substr(2)),t)}catch(e){throw new Error("Cant recoverPublicKey. "+e)}return f}static async signEIP712WithBrowserWallet(e,t,r,o,a){try{let n;if(a)n=new i.ethers.Wallet("0x"+a.getPrivateAsHexString());else{n=new i.ethers.providers.Web3Provider(window.ethereum).getSigner()}if(!n)throw new Error("Active Wallet required");const f={name:e,version:c.Eip712Data.PROTOCOL_VERSION},u={};u[o]=r;let l=Object.assign({},t);l.payload=s.keccak256(l.payload);let d=await n._signTypedData(f,u,l),h={types:{EIP712Domain:c.Eip712domainTypes},primaryType:o,message:t,domain:f};h.types[o]=u[o];let p={signatureInHex:d,jsonSigned:JSON.stringify(h)};return JSON.stringify(p)}catch(e){return(0,n.logger)(f.DEBUGLEVEL.LOW,"Cant sign eip712 data. Error: "+e),""}}static async connectMetamaskAndGetAddress(){if(!window.ethereum)throw new Error("Please install metamask before.");const e=await window.ethereum.request({method:"eth_requestAccounts"});if(!e||!e.length)throw new Error("Active Wallet required");return e[0]}static getChainIdFromSignature(e){let t=Number("0x"+e.substr(-2));return 27==t||28==t?0:t-35>>1}static convertToPersonalEthMessage(e){return(0,n.stringToArray)(this.ethereumPrefix+e.length+e)}}t.SignatureUtility=c,c.ethereumPrefix="Ethereum Signed Message:\n",c.OID_ECDSA_PUBLICKEY="1.2.840.10045.2.1",c.Eip712Data={PROTOCOL_VERSION:"0.1"},c.Eip712domainTypes=[{name:"name",type:"string"},{name:"version",type:"string"}]},80716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignedIdentifierAttestation=void 0;const n=r(39980),i=r(54759),o=r(65185),f=r(55050),a=r(13649),s=r(3365),c=r(19421);class u{constructor(){}static fromBytes(e,t){const r=n.AsnParser.parse(e,i.MyAttestation);return this.fromASNType(r,t,e)}static fromASNType(e,t,r=new Uint8Array(0)){let n=new this;n.uint8data=r,n.attestorKeys=t;let i=e.signatureAlgorithm.algorithm;if(n.att=s.IdentifierAttestation.fromBytes(e.signedInfo),n.signature=(0,f.uint8tohex)(new Uint8Array(e.signatureValue)),i!==n.att.getSigningAlgorithm())throw new Error("Algorithm specified is not consistent");return n.constructorCheck(),n}static fromData(e,t){let r=new this;return r.attestorKeys=t,r.att=e,r.signature=r.attestorKeys.signRawBytesWithEthereum(Array.from(r.att.getPrehash())),r.constructorCheck(),r}verify(){try{return this.attestorKeys.verifyBytesWithEthereum((0,f.hexStringToArray)(this.att.getDerEncoding()),this.signature)}catch(e){return(0,f.logger)(c.DEBUGLEVEL.LOW,e),!1}}checkValidity(){return this.getUnsignedAttestation().checkValidity()}getUnsignedAttestation(){return this.att}getDerEncoding(){return this.uint8data&&this.uint8data.length?(0,f.uint8tohex)(new Uint8Array(this.uint8data)):this.constructSignedAttestation(this.getUnsignedAttestation(),this.signature)}constructSignedAttestation(e,t){let r=e.getPrehash(),n=a.Asn1Der.encode("OBJECT_ID",e.getSigningAlgorithm()),i=(0,f.uint8tohex)(r)+a.Asn1Der.encode("SEQUENCE_30",n)+a.Asn1Der.encode("BIT_STRING",(0,f.uint8tohex)(o.KeyPair.anySignatureToRawUint8(t)));return a.Asn1Der.encode("SEQUENCE_30",i)}constructorCheck(){if(!this.verify())throw new Error("The signature is not valid")}}t.SignedIdentifierAttestation=u,u.ECDSA_WITH_SHA256="1.2.840.10045.4.3.2"},54288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=void 0;const n=r(55050),i=r(19421);class o{constructor(e=null){this.ALLOWED_ROUNDING=1e4,this.validity=0,e||(this.time=Date.now()),"number"==typeof e&&(this.time=e),"string"==typeof e&&(this.time=o.stringTimestampToLong(e)),this.time=this.time-this.time%1e3}fromString(e){this.time=o.stringTimestampToLong(e)}getValidity(){return this.validity}setValidity(e){this.validity=e}getTime(){return this.time}getTimeAsString(){let e=new Date(this.time).toString();return e.substr(0,e.indexOf("(")-1)}validateTimestamp(){let e=this.getCurrentTime();return!(this.time>e+this.ALLOWED_ROUNDING)&&!(this.time+this.ALLOWED_ROUNDING+this.validityt+this.ALLOWED_ROUNDING?((0,n.logger)(i.DEBUGLEVEL.LOW,"Object still not valid. Details: not valid before = "+this.time+", currentTime = "+t),!1):e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UsageProofOfExponent=void 0;const n=r(93431),i=r(61538),o=r(39980),f=r(55050),a=r(13649),s=r(5393);t.UsageProofOfExponent=class{constructor(){}static fromData(e,t,r=new Uint8Array([])){let n=new this;return n.tPoint=e,n.challengeResponse=t,n.nonce=r,n.encoding=n.makeEncoding(),n}fromBase64(e){this.encoding=e,this.fromBytes((0,f.base64ToUint8array)(e))}fromBytes(e){this.encodingBytes=e;let t=o.AsnParser.parse(e,i.UsageProof);this.challengeResponse=(0,f.uint8ToBn)(new Uint8Array(t.challengePoint));let r=new Uint8Array(t.responseValue);this.nonce=new Uint8Array(t.nonce),this.tPoint=n.Point.decodeFromHex((0,f.uint8tohex)(r),n.CURVE_BN256)}makeEncoding(){let e=a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)((0,f.bnToUint8)(this.challengeResponse)))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(this.tPoint.getEncoded(!1)))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(this.nonce));return a.Asn1Der.encode("SEQUENCE_30",e)}getPoint(){return this.tPoint}getChallengeResponse(){return this.challengeResponse}getDerEncoding(){return this.encoding}getNonce(){return this.nonce}validateParameters(){try{if(!s.AttestationCrypto.validatePointToCurve(this.tPoint,s.AttestationCrypto.curve))throw new Error("Point not in the curve");return!(this.challengeResponse<=0n||this.challengeResponse>=s.AttestationCrypto.curveOrder)&&(!this.tPoint.equals(s.AttestationCrypto.G)&&!this.tPoint.equals(s.AttestationCrypto.H))}catch(e){return!1}}}},49674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UseAttestation=void 0;const n=r(65185),i=r(98478),o=r(5393),f=r(80716),a=r(91462),s=r(39980),c=r(13649);t.UseAttestation=class{static fromData(e,t,r,n){let i=new this;return i.attestation=e,i.type=t,i.pok=r,i.sessionPublicKey=n,i.encoding=i.makeEncoding(e,t,r,n),i.constructorCheck(),i}static fromBytes(e,t){let r,o=new this;try{r=s.AsnParser.parse(e,a.UseAttestation)}catch(e){throw new Error("Cant parse UseAttestationASN. "+e)}try{o.attestation=f.SignedIdentifierAttestation.fromASNType(r.attestation,t),o.type=r.type,o.pok=i.FullProofOfExponent.fromASNType(r.proof),o.sessionPublicKey=n.KeyPair.publicFromSubjectPublicKeyValue(r.sessionKey)}catch(e){throw new Error("Cant decode internal data. "+e)}return o.constructorCheck(),o}constructorCheck(){if(!this.verify())throw new Error("The use attestation object is not valid")}makeEncoding(e,t,r,n){let i=e.getDerEncoding()+c.Asn1Der.encode("INTEGER",t)+r.getDerEncoding()+n.getAsnDerPublic();return c.Asn1Der.encode("SEQUENCE_30",i)}getAttestation(){return this.attestation}getType(){return this.type}getPok(){return this.pok}getSessionPublicKey(){return this.sessionPublicKey}getDerEncoding(){return this.encoding}verify(){return this.attestation.verify()&&(new o.AttestationCrypto).verifyFullProof(this.pok)}checkValidity(){return this.attestation.checkValidity()}}},91104:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationTools=void 0;const n=r(55050),i=r(19421);class o{static validateTimestamp(e,t,r){return!(e>t+r)&&!(e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ATTESTATION_TYPE=void 0,t.ATTESTATION_TYPE={phone:0,mail:1,InetPersona:2}},55050:(e,t,r)=>{"use strict";var n=r(34155),i=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.ecSignatureToSRVhex=t.testsLogger=t.logger=t.isDomainValid=t.formatGeneralizedDateTime=t.ethAddressToUint8=t.hashUint8To32bytesUint8=t.hashStringTo32bytesUint8=t.getInt64Bytes=t.uint8tohex=t.BnPowMod=t.stringToArray=t.base64ToUint8array=t.pemOrBase64Orbase64urlToString=t.base64toBase64Url=t.uint8arrayToBase64=t.uint8toString=t.uint8merge=t.bnToBuf=t.bnToUint8=t.bufToBn=t.uint8ToBn=t.egcd=t.invert=t.mod=t.hexStringToBase64Url=t.hexStringToBase64=t.hexStringToUint8=t.hexStringToArray=t.stringToHex=void 0;const o=r(19421),f=r(93431);let a,s,c=r(91094);function u(e=""){"0x"===e.substr(0,2).toLowerCase()&&(e=e.substr(2));let t=[],r=[...e];r.length%2&&r.unshift("0");let n,i="";if(!r||void 0===r||!r.length)return[];for(;r.length;){if(i="",i+=r.shift()+r.shift(),n=parseInt(i,16),isNaN(n))throw new Error("hexStringToArray input is not a hex string.");t.push(n)}return t}function l(e=""){return Uint8Array.from(u(e))}function d(e,t=f.CURVE_BN256.P){const r=e%t;return r>=0n?r:t+r}function h(e,t){let[r,n,i,o]=[0n,1n,1n,0n];for(;0n!==e;){let[f,a]=[t/e,t%e],[s,c]=[r-i*f,n-o*f];[t,e]=[e,a],[r,n]=[i,o],[i,o]=[s,c]}return[t,r,n]}function p(e){let t=[];return Uint8Array.from(e).forEach((function(e){var r=e.toString(16);r.length%2&&(r="0"+r),t.push(r)})),BigInt("0x"+t.join(""))}function y(e,t=0){var r=BigInt(e).toString(16).padStart(2*t,"0");r.length%2&&(r="0"+r);for(var n=r.length/2,i=new Uint8Array(n),o=0,f=0;oa||console.log(...t)}void 0!==n&&n.env&&n.env.DISPLAY_DEBUG_LEVEL?a=parseInt(n.env.DISPLAY_DEBUG_LEVEL):"undefined"!=typeof window&&window.DISPLAY_DEBUG_LEVEL&&(a=parseInt(window.DISPLAY_DEBUG_LEVEL)),void 0!==n&&n.env&&n.env.DISPLAY_DEBUG_LEVEL_TESTS&&(s=parseInt(n.env.DISPLAY_DEBUG_LEVEL_TESTS)),t.stringToHex=function(e){for(var t="",r=0;re.charCodeAt(0))):Uint8Array.from(i.from(e,"base64")),t},t.stringToArray=A,t.BnPowMod=function(e,t,r){let n=1n,i=e;for(;t>0n;)1n&t&&(n=n*i%r),i=i*i%r,t>>=1n;return n},t.uint8tohex=function(e){return e&&e.length?Array.from(e).map((e=>("0"+e.toString(16)).slice(-2))).join(""):""},t.getInt64Bytes=function(e){let t=Math.floor(e/2**32);return new Uint8Array([t,t<<8,t<<16,t<<24,e,e<<8,e<<16,e<<24].map((e=>e>>>24)))},t.hashStringTo32bytesUint8=function(e){return E(Uint8Array.from(A(e)))},t.hashUint8To32bytesUint8=E,t.ethAddressToUint8=function(e){if(null===e.toLowerCase().match(/^0x[a-f0-9]{40}$/i))throw new Error("Wrong Ethereum Address");let t=Uint8Array.from(u(e.substr(2)));if(20!=t.length)throw new Error("wrong address length");return t},t.formatGeneralizedDateTime=function(e){var t=new Date(e),r=""+(t.getUTCMonth()+1),n=""+t.getUTCDate(),i=t.getUTCFullYear();let o=""+t.getUTCHours(),f=""+t.getUTCMinutes(),a=""+t.getUTCSeconds();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),f.length<2&&(f="0"+f),a.length<2&&(a="0"+a),[i,r,n,o,f,a].join("")+"Z"},t.isDomainValid=function(e){try{new URL(e)}catch(e){return!1}return!0},t.logger=_,t.testsLogger=function(e,...t){!s||e>s||console.log(...t)},t.ecSignatureToSRVhex=function(e,t){try{let r=e.r.toString(16).padStart(64,"0"),n=e.s,i=e.recoveryParam,o=t.ec.curve.n.shrn(1);return n.cmp(o)>0&&(n=t.ec.curve.n.sub(n),i=1-i),r+n.toString(16).padStart(64,"0")+(1==i?"1c":"1b")}catch(e){throw _(o.DEBUGLEVEL.LOW,e),new Error("Signature format doesn't fit.")}}},92580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidFromAndExpiry=t.AbstractLinkedAttestation=void 0;const n=r(39980),i=r(52551),o=r(55050),f=r(86623),a=r(93312);t.AbstractLinkedAttestation=class{fromObject(e){this.linkedAttestation=e}fromBytes(e){this.linkedAttestation=n.AsnParser.parse(e,i.SignedLinkedAttestation)}fromBase64(e){this.fromBytes((0,o.base64ToUint8array)(e))}getAttestationData(){return this.linkedAttestation.attestation[this.TYPE]}getSubjectPublicKey(){return this.getAttestationData()?.subjectPublicKey}getEncoded(){return new Uint8Array(n.AsnSerializer.serialize(this.linkedAttestation))}getBase64(){return(0,o.uint8arrayToBase64)(this.getEncoded())}sign(e){const t=n.AsnSerializer.serialize(this.linkedAttestation.attestation[this.TYPE]);this.linkedAttestation.signingAlgorithm=new a.AlgorithmIdentifierASN,this.linkedAttestation.signingAlgorithm.algorithm="1.2.840.10045.4.2",this.linkedAttestation.signatureValue=(0,o.hexStringToUint8)(e.signRawBytesWithEthereum(Array.from(new Uint8Array(t))))}verify(e){const t=n.AsnSerializer.serialize(this.getAttestationData());let r=(0,o.hexStringToUint8)(f.ethers.utils.keccak256(new Uint8Array(t))),i=f.ethers.utils.recoverPublicKey(r,f.ethers.utils.splitSignature(new Uint8Array(this.linkedAttestation.signatureValue)));if(i.substring(2)!==e.getPublicKeyAsHexStr())throw new Error("Attestor public key does not match, expected "+e.getPublicKeyAsHexStr()+" got "+i.substring(2));let a=Math.round(Date.now()/1e3),s=this.getAttestationData();if(!s)throw new Error("Linked attestation getAttestationData error");if(s.validity.notBefore>a)throw new Error("Linked attestation is not yet valid");if(s.validity.notAfter{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressAttestation=void 0;const n=r(92580),i=r(52551),o=r(95978),f=r(35403),a=r(55050);class s extends n.AbstractLinkedAttestation{constructor(){super(...arguments),this.TYPE="ethereumAddress"}create(e,t,r,s,c,u){this.linkedAttestation=new i.SignedLinkedAttestation,this.linkedAttestation.attestation=new i.LinkedAttestation,this.linkedAttestation.attestation.ethereumAddress=new o.EthereumAddressAttestation,this.linkedAttestation.attestation.ethereumAddress.subjectPublicKey=e;const l=(0,n.getValidFromAndExpiry)(s,u);this.linkedAttestation.attestation.ethereumAddress.validity=new f.EpochTimeValidity,this.linkedAttestation.attestation.ethereumAddress.validity.notBefore=l.validFrom,this.linkedAttestation.attestation.ethereumAddress.validity.notAfter=l.expiry,this.linkedAttestation.attestation.ethereumAddress.ethereumAddress=(0,a.hexStringToUint8)(t),c&&(this.linkedAttestation.attestation.ethereumAddress.context=c),this.sign(r)}}t.EthereumAddressAttestation=s},52410:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumKeyLinkingAttestation=void 0;const i=r(52551),o=r(42909),f=r(39980),a=r(55050),s=r(35403),c=r(42909),u=r(93312),l=r(92475),d=r(1754),h=n(r(78147)),p=r(92580),y="RSASSA-PKCS1-v1_5";t.EthereumKeyLinkingAttestation=class{create(e,t,r,n,u){let l=f.AsnParser.parse((0,a.base64ToUint8array)(e),i.SignedLinkedAttestation);this.linkAttest=new o.SignedEthereumKeyLinkingAttestation,this.linkAttest.ethereumKeyLinkingAttestation=new c.EthereumKeyLinkingAttestation,this.linkAttest.ethereumKeyLinkingAttestation.subjectEthereumAddress=(0,a.hexStringToUint8)(t),this.linkAttest.ethereumKeyLinkingAttestation.linkedAttestation=l;const d=(0,p.getValidFromAndExpiry)(r,u);this.linkAttest.ethereumKeyLinkingAttestation.validity=new s.EpochTimeValidity,this.linkAttest.ethereumKeyLinkingAttestation.validity.notBefore=d.validFrom,this.linkAttest.ethereumKeyLinkingAttestation.validity.notAfter=d.expiry,n&&(this.linkAttest.ethereumKeyLinkingAttestation.context=n)}async sign(e){const t=f.AsnSerializer.serialize(this.linkAttest.ethereumKeyLinkingAttestation),r=await h.default.sign({name:y,saltLength:128},e,t);this.linkAttest.signingAlgorithm=new u.AlgorithmIdentifierASN,this.linkAttest.signingAlgorithm.algorithm="1.2.840.113549.1.1.11",this.linkAttest.signatureValue=new Uint8Array(r)}fromBytes(e){this.linkAttest=f.AsnParser.parse(e,o.SignedEthereumKeyLinkingAttestation)}fromBase64(e){this.fromBytes((0,a.base64ToUint8array)(e))}getEncoded(){return new Uint8Array(f.AsnSerializer.serialize(this.linkAttest))}getBase64(){return(0,a.uint8arrayToBase64)(this.getEncoded())}getAttestation(){return this.linkAttest}getSignedLinkedAttestation(){return this.linkAttest.ethereumKeyLinkingAttestation.linkedAttestation}getLinkedAttestationData(){const e=this.getSignedLinkedAttestation();return e.attestation.ethereumAddress??e.attestation.nftOwnership}getLinkedAttestationObject(){const e=this.getSignedLinkedAttestation();let t;return e.attestation.ethereumAddress?(t=new l.EthereumAddressAttestation,t.fromObject(e)):(t=new d.NFTOwnershipAttestation,t.fromObject(e)),t}async verify(e){let t=this.getLinkedAttestationObject();t.verify(e);let r=t.getSubjectPublicKey();if(!r)throw new Error("getSubjectPublicKey error");const n=f.AsnSerializer.serialize(this.linkAttest.ethereumKeyLinkingAttestation),i=await h.default.importKey("spki",new Uint8Array(r),{name:y,hash:{name:"SHA-256"}},!0,["verify"]);if(!await h.default.verify({name:y,saltLength:128},i,this.linkAttest.signatureValue,n))throw new Error("Signature verification failed");let o=Math.round(Date.now()/1e3),a=this.linkAttest.ethereumKeyLinkingAttestation;if(a.validity.notBefore>o)throw new Error("Linked attestation is not yet valid");if(a.validity.notAfter{try{this.getDb().then((n=>{let i=n.transaction(f.TABLE_NAME,"readwrite").objectStore(f.TABLE_NAME).get(e);i.onsuccess=()=>{t(i.result),n.close()},i.onerror=e=>{r(e)}}))}catch(e){let t="IndexedDB interaction error.";e instanceof Error&&(t=e.message),console.log(e),r(t)}}))}async saveKey(e,t,r,n){try{let i=await this.getDb(),o=i.transaction(f.TABLE_NAME,"readwrite").objectStore(f.TABLE_NAME),a={id:e,privateKey:t,publicKey:r,spki:n};o.put(a).onsuccess=()=>{i.close()}}catch(e){let t="IndexedDB interaction error.";e instanceof Error&&(t=e.message),console.log("Failed to store key: "+t)}}async getDb(){return new Promise((function(e,t){let r=indexedDB.open(f.DB_NAME,1);r.onupgradeneeded=function(e){let t=e.target.result;t.objectStoreNames.contains(f.TABLE_NAME)||t.createObjectStore(f.TABLE_NAME,{keyPath:"id"})},r.onsuccess=function(t){let r=t.target.result;e(r)},r.onerror=function(e){t("Error opening database "+e.target.errorCode)}}))}}t.KeyStore=f,f.DB_NAME="AttestationKeyStore",f.TABLE_NAME="Keys"},1754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFTOwnershipAttestation=void 0;const n=r(92580),i=r(52551),o=r(83874),f=r(35403),a=r(55050);class s extends n.AbstractLinkedAttestation{constructor(){super(...arguments),this.TYPE="nftOwnership"}create(e,t,r,s,c,u){this.linkedAttestation=new i.SignedLinkedAttestation,this.linkedAttestation.attestation=new i.LinkedAttestation,this.linkedAttestation.attestation.nftOwnership=new o.NFTOwnershipAttestation,this.linkedAttestation.attestation.nftOwnership.subjectPublicKey=e;const l=(0,n.getValidFromAndExpiry)(s,u);this.linkedAttestation.attestation.nftOwnership.validity=new f.EpochTimeValidity,this.linkedAttestation.attestation.nftOwnership.validity.notBefore=l.validFrom,this.linkedAttestation.attestation.nftOwnership.validity.notAfter=l.expiry;for(let e of t){let t=new o.ERC721;if(t.address=(0,a.hexStringToUint8)(e.address),t.chainId=e.chainId,e.tokenIds){t.tokenIds=[];for(let r of e.tokenIds)t.tokenIds.push((0,a.bnToUint8)(r))}this.linkedAttestation.attestation.nftOwnership.tokens.push(t)}c&&(this.linkedAttestation.attestation.nftOwnership.context=c),this.sign(r)}}t.NFTOwnershipAttestation=s},78147:(e,t,r)=>{"use strict";let n;if(Object.defineProperty(t,"__esModule",{value:!0}),"object"==typeof crypto&&crypto.subtle)n=crypto.subtle;else{let e=r(27912).webcrypto;if(!e)throw new Error("webcrypto.subtle missing");n=e.subtle}t.default=n},53030:(e,t,r)=>{"use strict";var n=r(40210),i=r(7317),o=r(95177),f=r(37858),a=r(11645),s=n("%TypeError%");e.exports=function(e,t,r){if("String"!==f(e))throw new s("Assertion failed: `S` must be a String");if(!o(t)||t<0||t>a)throw new s("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==f(r))throw new s("Assertion failed: `unicode` must be a Boolean");return r?t+1>=e.length?t+1:t+i(e,t)["[[CodeUnitCount]]"]:t+1}},13832:(e,t,r)=>{"use strict";var n=r(40210),i=r(21924),o=n("%TypeError%"),f=r(50863),a=n("%Reflect.apply%",!0)||i("%Function.prototype.apply%");e.exports=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!f(r))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return a(e,t,r)}},7317:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(21924),o=r(29544),f=r(65424),a=r(37858),s=r(56415),c=i("String.prototype.charAt"),u=i("String.prototype.charCodeAt");e.exports=function(e,t){if("String"!==a(e))throw new n("Assertion failed: `string` must be a String");var r=e.length;if(t<0||t>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var i=u(e,t),l=c(e,t),d=o(i),h=f(i);if(!d&&!h)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(h||t+1===r)return{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=u(e,t+1);return f(p)?{"[[CodePoint]]":s(i,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":l,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},63410:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(37858);e.exports=function(e,t){if("Boolean"!==i(t))throw new n("Assertion failed: Type(done) is not Boolean");return{value:e,done:t}}},79561:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(63682),o=r(87435),f=r(62780),a=r(20134),s=r(78690),c=r(37858);e.exports=function(e,t,r){if("Object"!==c(e))throw new n("Assertion failed: Type(O) is not Object");if(!a(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return i(f,s,o,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},57257:(e,t,r)=>{"use strict";var n=r(40210),i=r(41405)(),o=n("%TypeError%"),f=n("%IteratorPrototype%",!0),a=r(53030),s=r(63410),c=r(79561),u=r(65537),l=r(86281),d=r(53500),h=r(40892),p=r(82313),y=r(70294),b=r(37858),g=r(9496),m=r(44105),v=function(e,t,r,n){if("String"!==b(t))throw new o("`S` must be a string");if("Boolean"!==b(r))throw new o("`global` must be a boolean");if("Boolean"!==b(n))throw new o("`fullUnicode` must be a boolean");g.set(this,"[[IteratingRegExp]]",e),g.set(this,"[[IteratedString]]",t),g.set(this,"[[Global]]",r),g.set(this,"[[Unicode]]",n),g.set(this,"[[Done]]",!1)};f&&(v.prototype=l(f));if(c(v.prototype,"next",(function(){var e=this;if("Object"!==b(e))throw new o("receiver must be an object");if(!(e instanceof v&&g.has(e,"[[IteratingRegExp]]")&&g.has(e,"[[IteratedString]]")&&g.has(e,"[[Global]]")&&g.has(e,"[[Unicode]]")&&g.has(e,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(g.get(e,"[[Done]]"))return s(void 0,!0);var t=g.get(e,"[[IteratingRegExp]]"),r=g.get(e,"[[IteratedString]]"),n=g.get(e,"[[Global]]"),i=g.get(e,"[[Unicode]]"),f=d(t,r);if(null===f)return g.set(e,"[[Done]]",!0),s(void 0,!0);if(n){if(""===y(u(f,"0"))){var c=p(u(t,"lastIndex")),l=a(r,c,i);h(t,"lastIndex",l,!0)}return s(f,!1)}return g.set(e,"[[Done]]",!0),s(f,!1)})),i&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])){c(v.prototype,Symbol.iterator,(function(){return this}))}e.exports=function(e,t,r,n){return new v(e,t,r,n)}},41667:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(2435),o=r(63682),f=r(87435),a=r(14326),s=r(62780),c=r(20134),u=r(78690),l=r(76223),d=r(37858);e.exports=function(e,t,r){if("Object"!==d(e))throw new n("Assertion failed: Type(O) is not Object");if(!c(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var h=i({Type:d,IsDataDescriptor:s,IsAccessorDescriptor:a},r)?r:l(r);if(!i({Type:d,IsDataDescriptor:s,IsAccessorDescriptor:a},h))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return o(s,u,f,e,t,h)}},87435:(e,t,r)=>{"use strict";var n=r(62188),i=r(17141),o=r(37858);e.exports=function(e){return void 0!==e&&n(o,"Property Descriptor","Desc",e),i(e)}},65537:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(70631),o=r(20134),f=r(37858);e.exports=function(e,t){if("Object"!==f(e))throw new n("Assertion failed: Type(O) is not Object");if(!o(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+i(t));return e[t]}},23555:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(92817),o=r(95695),f=r(20134),a=r(70631);e.exports=function(e,t){if(!f(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=i(e,t);if(null!=r){if(!o(r))throw new n(t+" is not a function: "+a(r));return r}}},92817:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(20134),o=r(66502);e.exports=function(e,t){if(!i(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(e)[t]}},14326:(e,t,r)=>{"use strict";var n=r(17642),i=r(62188),o=r(37858);e.exports=function(e){return void 0!==e&&(i(o,"Property Descriptor","Desc",e),!(!n(e,"[[Get]]")&&!n(e,"[[Set]]")))}},50863:(e,t,r)=>{"use strict";e.exports=r(675)},95695:(e,t,r)=>{"use strict";e.exports=r(95320)},66023:(e,t,r)=>{"use strict";var n=r(14445)("%Reflect.construct%",!0),i=r(41667);try{i({},"",{"[[Get]]":function(){}})}catch(e){i=null}if(i&&n){var o={},f={};i(f,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),e.exports=function(e){try{n(e,f)}catch(e){return e===o}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},62780:(e,t,r)=>{"use strict";var n=r(17642),i=r(62188),o=r(37858);e.exports=function(e){return void 0!==e&&(i(o,"Property Descriptor","Desc",e),!(!n(e,"[[Value]]")&&!n(e,"[[Writable]]")))}},95177:(e,t,r)=>{"use strict";var n=r(46174),i=r(20487),o=r(37858),f=r(29086),a=r(22633);e.exports=function(e){if("Number"!==o(e)||f(e)||!a(e))return!1;var t=n(e);return i(t)===t}},20134:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},15728:(e,t,r)=>{"use strict";var n=r(40210)("%Symbol.match%",!0),i=r(98420),o=r(94686);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(n){var t=e[n];if(void 0!==t)return o(t)}return i(e)}},86281:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Object.create%",!0),o=n("%TypeError%"),f=n("%SyntaxError%"),a=r(50863),s=r(37858),c=r(21069),u=r(9496),l=r(28185)();e.exports=function(e){if(null!==e&&"Object"!==s(e))throw new o("Assertion failed: `proto` must be null or an object");var t,r=arguments.length<2?[]:arguments[1];if(!a(r))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(i)t=i(e);else if(l)t={__proto__:e};else{if(null===e)throw new f("native Object.create support is required to create null objects");var n=function(){};n.prototype=e,t=new n}return r.length>0&&c(r,(function(e){u.set(t,e,void 0)})),t}},53500:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(21924)("RegExp.prototype.exec"),o=r(13832),f=r(65537),a=r(95695),s=r(37858);e.exports=function(e,t){if("Object"!==s(e))throw new n("Assertion failed: `R` must be an Object");if("String"!==s(t))throw new n("Assertion failed: `S` must be a String");var r=f(e,"exec");if(a(r)){var c=o(r,e,[t]);if(null===c||"Object"===s(c))return c;throw new n('"exec" method must return `null` or an Object')}return i(e,t)}},11897:(e,t,r)=>{"use strict";e.exports=r(4559)},78690:(e,t,r)=>{"use strict";var n=r(29086);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:n(e)&&n(t)}},40892:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(20134),o=r(78690),f=r(37858),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,r,s){if("Object"!==f(e))throw new n("Assertion failed: `O` must be an Object");if(!i(t))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==f(s))throw new n("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=r,a&&!o(e[t],r))throw new n("Attempted to assign to readonly property.");return!0}try{return e[t]=r,!a||o(e[t],r)}catch(e){return!1}}},53582:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Symbol.species%",!0),o=n("%TypeError%"),f=r(66023),a=r(37858);e.exports=function(e,t){if("Object"!==a(e))throw new o("Assertion failed: Type(O) is not Object");var r=e.constructor;if(void 0===r)return t;if("Object"!==a(r))throw new o("O.constructor is not an Object");var n=i?r[i]:void 0;if(null==n)return t;if(f(n))return n;throw new o("no constructor found")}},8300:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Number%"),o=n("%RegExp%"),f=n("%TypeError%"),a=n("%parseInt%"),s=r(21924),c=r(79246),u=s("String.prototype.slice"),l=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),h=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),y=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),b=new RegExp("(^["+y+"]+)|(["+y+"]+$)","g"),g=s("String.prototype.replace"),m=r(37858);e.exports=function e(t){if("String"!==m(t))throw new f("Conversion from 'BigInt' to 'number' is not allowed.");if(l(t))return i(a(u(t,2),2));if(d(t))return i(a(u(t,2),8));if(p(t)||h(t))return NaN;var r=g(t,b,"");return r!==t?e(r):i(t)}},94686:e=>{"use strict";e.exports=function(e){return!!e}},86057:(e,t,r)=>{"use strict";var n=r(46174),i=r(20487),o=r(87362),f=r(29086),a=r(22633),s=r(38111);e.exports=function(e){var t=o(e);if(f(t)||0===t)return 0;if(!a(t))return t;var r=i(n(t));return 0===r?0:s(t)*r}},82313:(e,t,r)=>{"use strict";var n=r(11645),i=r(86057);e.exports=function(e){var t=i(e);return t<=0?0:t>n?n:t}},87362:(e,t,r)=>{"use strict";var n=r(40210),i=n("%TypeError%"),o=n("%Number%"),f=r(64790),a=r(94126),s=r(8300);e.exports=function(e){var t=f(e)?e:a(e,o);if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new i("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):o(t)}},66502:(e,t,r)=>{"use strict";var n=r(40210)("%Object%"),i=r(11897);e.exports=function(e){return i(e),n(e)}},94126:(e,t,r)=>{"use strict";var n=r(41503);e.exports=function(e){return arguments.length>1?n(e,arguments[1]):n(e)}},76223:(e,t,r)=>{"use strict";var n=r(17642),i=r(40210)("%TypeError%"),o=r(37858),f=r(94686),a=r(95695);e.exports=function(e){if("Object"!==o(e))throw new i("ToPropertyDescriptor requires an object");var t={};if(n(e,"enumerable")&&(t["[[Enumerable]]"]=f(e.enumerable)),n(e,"configurable")&&(t["[[Configurable]]"]=f(e.configurable)),n(e,"value")&&(t["[[Value]]"]=e.value),n(e,"writable")&&(t["[[Writable]]"]=f(e.writable)),n(e,"get")){var r=e.get;if(void 0!==r&&!a(r))throw new i("getter must be a function");t["[[Get]]"]=r}if(n(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new i("setter must be a function");t["[[Set]]"]=s}if((n(t,"[[Get]]")||n(t,"[[Set]]"))&&(n(t,"[[Value]]")||n(t,"[[Writable]]")))throw new i("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},70294:(e,t,r)=>{"use strict";var n=r(40210),i=n("%String%"),o=n("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return i(e)}},37858:(e,t,r)=>{"use strict";var n=r(23951);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},56415:(e,t,r)=>{"use strict";var n=r(40210),i=n("%TypeError%"),o=n("%String.fromCharCode%"),f=r(29544),a=r(65424);e.exports=function(e,t){if(!f(e)||!a(t))throw new i("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(e)+o(t)}},46174:(e,t,r)=>{"use strict";var n=r(40210)("%Math.abs%");e.exports=function(e){return n(e)}},20487:(e,t,r)=>{"use strict";var n=r(37858),i=Math.floor;e.exports=function(e){return"BigInt"===n(e)?e:i(e)}},4559:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%");e.exports=function(e,t){if(null==e)throw new n(t||"Cannot call method on "+e);return e}},23951:e=>{"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},14445:(e,t,r)=>{"use strict";e.exports=r(40210)},63682:(e,t,r)=>{"use strict";var n=r(31044),i=r(40210),o=n()&&i("%Object.defineProperty%",!0),f=n.hasArrayLengthDefineBug(),a=f&&r(675),s=r(21924)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,r,n,i,c){if(!o){if(!e(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(i in n&&s(n,i)!==!!c["[[Enumerable]]"])return!1;var u=c["[[Value]]"];return n[i]=u,t(n[i],u)}return f&&"length"===i&&"[[Value]]"in c&&a(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(o(n,i,r(c)),!0)}},675:(e,t,r)=>{"use strict";var n=r(40210)("%Array%"),i=!n.isArray&&r(21924)("Object.prototype.toString");e.exports=n.isArray||function(e){return"[object Array]"===i(e)}},62188:(e,t,r)=>{"use strict";var n=r(40210),i=n("%TypeError%"),o=n("%SyntaxError%"),f=r(17642),a={"Property Descriptor":function(e){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in e)if(f(e,r)&&!t[r])return!1;var n=f(e,"[[Value]]"),o=f(e,"[[Get]]")||f(e,"[[Set]]");if(n&&o)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(64377),"Iterator Record":function(e){return f(e,"[[Iterator]]")&&f(e,"[[NextMethod]]")&&f(e,"[[Done]]")},"PromiseCapability Record":function(e){return e&&f(e,"[[Resolve]]")&&"function"==typeof e["[[Resolve]]"]&&f(e,"[[Reject]]")&&"function"==typeof e["[[Reject]]"]&&f(e,"[[Promise]]")&&e["[[Promise]]"]&&"function"==typeof e["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(e){return e&&f(e,"[[Completion]]")&&f(e,"[[Capability]]")&&a["PromiseCapability Record"](e["[[Capability]]"])}};e.exports=function(e,t,r,n){var f=a[t];if("function"!=typeof f)throw new o("unknown record type: "+t);if("Object"!==e(n)||!f(n))throw new i(r+" must be a "+t)}},21069:e=>{"use strict";e.exports=function(e,t){for(var r=0;r{"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},22633:e=>{"use strict";var t=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!t(e)&&e!==1/0&&e!==-1/0}},29544:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=55296&&e<=56319}},64377:(e,t,r)=>{"use strict";var n=r(17642);e.exports=function(e){return n(e,"[[StartIndex]]")&&n(e,"[[EndIndex]]")&&e["[[StartIndex]]"]>=0&&e["[[EndIndex]]"]>=e["[[StartIndex]]"]&&String(parseInt(e["[[StartIndex]]"],10))===String(e["[[StartIndex]]"])&&String(parseInt(e["[[EndIndex]]"],10))===String(e["[[EndIndex]]"])}},29086:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},64790:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2435:(e,t,r)=>{"use strict";var n=r(40210),i=r(17642),o=n("%TypeError%");e.exports=function(e,t){if("Object"!==e.Type(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(i(t,n)&&!r[n])return!1;if(e.IsDataDescriptor(t)&&e.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},65424:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=56320&&e<=57343}},11645:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Math%"),o=n("%Number%");e.exports=o.MAX_SAFE_INTEGER||i.pow(2,53)-1},38111:e=>{"use strict";e.exports=function(e){return e>=0?1:-1}},89880:(e,t,r)=>{"use strict";r.d(t,{kU:()=>l,Dp:()=>u,ET:()=>d});const n=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,f=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var l=0,d=o-1;(0!==u||l>>0,f[d]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=l,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===f[h];)h++;for(var p=new Uint8Array(n+(o-h)),y=n;h!==o;)p[y++]=f[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var f=(o-i)*u+1>>>0,c=new Uint8Array(f);i!==o;){for(var l=t[i],d=0,h=f-1;(0!==l||d>>0,c[h]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=d,i++}for(var p=f-n;p!==f&&0===c[p];)p++;for(var y=s.repeat(r);pnew a({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class c{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(e,t,r),this.decoder=new f(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const u=({name:e,prefix:t,encode:r,decode:n})=>new c(e,t,r,n),l=({prefix:e,name:t,alphabet:r})=>{const{encode:o,decode:f}=n(r,t);return u({prefix:e,name:t,encode:o,decode:e=>(0,i.coerce)(f(e))})},d=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>u({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)f-=r,o+=t[i&a>>f];if(f&&(o+=t[i&a<((e,t,r,n)=>{const i={};for(let e=0;e=8&&(a-=8,f[c++]=255&s>>a)}if(a>=r||255&s<<8-a)throw new SyntaxError("Unexpected end of data");return f})(t,n,r,e)})},22817:(e,t,r)=>{"use strict";r.r(t),r.d(t,{base32:()=>i,base32hex:()=>s,base32hexpad:()=>u,base32hexpadupper:()=>l,base32hexupper:()=>c,base32pad:()=>f,base32padupper:()=>a,base32upper:()=>o,base32z:()=>d});var n=r(89880);const i=(0,n.ET)({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o=(0,n.ET)({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),f=(0,n.ET)({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=(0,n.ET)({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),s=(0,n.ET)({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),c=(0,n.ET)({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),u=(0,n.ET)({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),l=(0,n.ET)({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),d=(0,n.ET)({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})},99086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{base58btc:()=>i,base58flickr:()=>o});var n=r(89880);const i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},95934:(e,t,r)=>{"use strict";r.r(t),r.d(t,{coerce:()=>a,empty:()=>n,equals:()=>f,fromHex:()=>o,fromString:()=>c,isBinary:()=>s,toHex:()=>i,toString:()=>u});const n=new Uint8Array(0),i=e=>e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),""),o=e=>{const t=e.match(/../g);return t?new Uint8Array(t.map((e=>parseInt(e,16)))):n},f=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},s=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),c=e=>(new TextEncoder).encode(e),u=e=>(new TextDecoder).decode(e)},28924:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Digest:()=>s,create:()=>o,decode:()=>f,equals:()=>a});var n=r(95934),i=r(4714);const o=(e,t)=>{const r=t.byteLength,n=i.encodingLength(e),o=n+i.encodingLength(r),f=new Uint8Array(o+r);return i.encodeTo(e,f,0),i.encodeTo(r,f,n),f.set(t,o),new s(e,r,t,f)},f=e=>{const t=(0,n.coerce)(e),[r,o]=i.decode(t),[f,a]=i.decode(t.subarray(o)),c=t.subarray(o+a);if(c.byteLength!==f)throw new Error("Incorrect length");return new s(r,f,c,t)},a=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&(0,n.equals)(e.bytes,t.bytes);class s{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}},7225:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Hasher:()=>o,from:()=>i});var n=r(28924);const i=({name:e,code:t,encode:r})=>new o(e,t,r);class o{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?n.create(this.code,t):t.then((e=>n.create(this.code,e)))}throw Error("Unknown type, must be binary type")}}},63039:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CID:()=>s,bytes:()=>a,digest:()=>i,hasher:()=>w,varint:()=>n});var n=r(4714),i=r(28924),o=r(99086),f=r(22817),a=r(95934);class s{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:g,byteLength:g,code:b,version:b,multihash:b,bytes:b,_baseCache:g,asCID:g})}toV0(){if(0===this.version)return this;{const{code:e,multihash:t}=this;if(e!==d)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==h)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return s.createV0(t)}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=i.create(e,t);return s.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&i.equals(this.multihash,e.multihash)}toString(e){const{bytes:t,version:r,_baseCache:n}=this;return 0===r?u(t,n,e||o.base58btc.encoder):l(t,n,e||f.base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return m(/^0\.0/,v),!(!e||!e[y]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof s)return e;if(null!=e&&e.asCID===e){const{version:t,code:r,multihash:n,bytes:i}=e;return new s(t,r,n,i||p(t,r,n.bytes))}if(null!=e&&!0===e[y]){const{version:t,multihash:r,code:n}=e,o=i.decode(r);return s.create(t,n,o)}return null}static create(e,t,r){if("number"!=typeof t)throw new Error("String codecs are no longer supported");switch(e){case 0:if(t!==d)throw new Error(`Version 0 CID must use dag-pb (code: ${d}) block encoding`);return new s(e,t,r,r.bytes);case 1:{const n=p(e,t,r.bytes);return new s(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return s.create(0,d,e)}static createV1(e,t){return s.create(1,e,t)}static decode(e){const[t,r]=s.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=s.inspectBytes(e),r=t.size-t.multihashSize,n=(0,a.coerce)(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const o=n.subarray(t.multihashSize-t.digestSize),f=new i.Digest(t.multihashCode,t.digestSize,o,n);return[0===t.version?s.createV0(f):s.createV1(t.codec,f),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,i]=n.decode(e.subarray(t));return t+=i,r};let i=r(),o=d;if(18===i?(i=0,t=0):1===i&&(o=r()),0!==i&&1!==i)throw new RangeError(`Invalid CID version ${i}`);const f=t,a=r(),s=r(),c=t+s;return{version:i,codec:o,multihashCode:a,digestSize:s,multihashSize:c-f,size:c}}static parse(e,t){const[r,n]=c(e,t),i=s.decode(n);return i._baseCache.set(r,e),i}}const c=(e,t)=>{switch(e[0]){case"Q":{const r=t||o.base58btc;return[o.base58btc.prefix,r.decode(`${o.base58btc.prefix}${e}`)]}case o.base58btc.prefix:{const r=t||o.base58btc;return[o.base58btc.prefix,r.decode(e)]}case f.base32.prefix:{const r=t||f.base32;return[f.base32.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},u=(e,t,r)=>{const{prefix:n}=r;if(n!==o.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=t.get(n);if(null==i){const i=r.encode(e).slice(1);return t.set(n,i),i}return i},l=(e,t,r)=>{const{prefix:n}=r,i=t.get(n);if(null==i){const i=r.encode(e);return t.set(n,i),i}return i},d=112,h=18,p=(e,t,r)=>{const i=n.encodingLength(e),o=i+n.encodingLength(t),f=new Uint8Array(o+r.byteLength);return n.encodeTo(e,f,0),n.encodeTo(t,f,i),f.set(r,o),f},y=Symbol.for("@ipld/js-cid/CID"),b={writable:!1,configurable:!1,enumerable:!0},g={writable:!1,enumerable:!1,configurable:!1},m=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},v="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n";var w=r(7225)},4714:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>w,encodeTo:()=>A,encodingLength:()=>E});var n=function e(t,r,n){r=r||[];var a=n=n||0;for(;t>=f;)r[n++]=255&t|i,t/=128;for(;t&o;)r[n++]=255&t|i,t>>>=7;return r[n]=0|t,e.bytes=n-a+1,r},i=128,o=-128,f=Math.pow(2,31);var a=function e(t,r){var n,i=0,o=0,f=r=r||0,a=t.length;do{if(f>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[f++],i+=o<28?(n&c)<=s);return e.bytes=f-r,i},s=128,c=127;var u=Math.pow(2,7),l=Math.pow(2,14),d=Math.pow(2,21),h=Math.pow(2,28),p=Math.pow(2,35),y=Math.pow(2,42),b=Math.pow(2,49),g=Math.pow(2,56),m=Math.pow(2,63);const v={encode:n,decode:a,encodingLength:function(e){return e[v.decode(e,t),v.decode.bytes],A=(e,t,r=0)=>(v.encode(e,t,r),t),E=e=>v.encodingLength(e)},18597:e=>{"use strict";e.exports={i8:"6.5.4"}}},o={};function f(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=i,f.amdO={},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);f.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,f.d(i,o),i},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"negotiator-"+{83:"cf3e36806f86b8170ad2",125:"d60dd87121b09ffa9da4",276:"bd1e935f83cc95154946",278:"5365c5c6f9f34b56302f",337:"3d41bf48ddc440c8f8bd",438:"ec517b79aceea82aa05e",817:"237551cd4e104f4399c7"}[e]+".js",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="negotiator:",f.l=(e,t,i,o)=>{if(r[e])r[e].push(t);else{var a,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(h);var i=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e})(),(()=>{var e={179:0};f.f.j=(t,r)=>{var n=f.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=e[t]=[r,i]));r.push(n[2]=i);var o=f.p+f.u(t),a=new Error;f.l(o,(r=>{if(f.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[o,a,s]=r,c=0;if(o.some((t=>0!==e[t]))){for(n in a)f.o(a,n)&&(f.m[n]=a[n]);if(s)s(f)}for(t&&t(r);c{"use strict";f.r(a),f.d(a,{AbstractView:()=>r.w,Client:()=>t.KU,Outlet:()=>E,SelectIssuers:()=>T.$,SelectWallet:()=>k.R,Start:()=>_.z});var e,t=f(39678),r=f(52335),n=f(39896),i=f(35908),o=f(43803),s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=function(){function e(e,t){this.config=e,this.showWhitelistCallback=t,this.storedWhitelist={},this.staticWhitelist={},this.loadStaticWhitelist(),this.loadStoredWhitelist()}return e.prototype.loadStaticWhitelist=function(){var e,t,r,i;if(this.config.issuers)try{for(var o=u(this.config.issuers),f=o.next();!f.done;f=o.next()){var a=f.value,s=a.collectionID,c=a.whitelist;if(c)try{for(var l=(r=void 0,u(c)),d=l.next();!d.done;d=l.next()){var h=d.value;try{if(h=new URL(h).origin,!this.staticWhitelist[h]){this.staticWhitelist[h]=[s];continue}this.staticWhitelist[h].push(s)}catch(e){(0,n.kg)(2,"Failed to validate whitelist origin: "+e.message)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.loadStoredWhitelist=function(){var t;try{this.storedWhitelist=null!==(t=JSON.parse(localStorage.getItem(e.STORAGE_KEY)))&&void 0!==t?t:{}}catch(e){}},e.prototype.saveWhitelist=function(){localStorage.setItem(e.STORAGE_KEY,JSON.stringify(this.storedWhitelist))},e.prototype.getWhitelistedIssuers=function(e){var t,r,n,i,o=null!==(i=null===(n=this.storedWhitelist[e])||void 0===n?void 0:n.issuers)&&void 0!==i?i:[];if(this.staticWhitelist[e])try{for(var f=u(this.staticWhitelist[e]),a=f.next();!a.done;a=f.next()){var s=a.value;o.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return o},e.prototype.isWhitelisted=function(e,t){var r,n,i;try{for(var o=u(t),f=o.next();!f.done;f=o.next()){var a=f.value;if(!(this.staticWhitelist[e]&&-1!==this.staticWhitelist[e].indexOf(a)||(null===(i=this.storedWhitelist[e])||void 0===i?void 0:i.issuers)&&-1!==this.storedWhitelist[e].issuers.indexOf(a)))return!1}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.whitelistCheck=function(e,t){return s(this,void 0,void 0,(function(){var r,i;return c(this,(function(o){switch(o.label){case 0:return(window.parent||window.opener)&&document.referrer?(r=new URL(document.referrer).origin)===window.location.origin?[2]:(i=e.map((function(e){return e.collectionID})),t||!this.isWhitelisted(r,i)&&(0,n.GL)("tn-user-denied-access-to-connection")?[4,this.showWhitelistDialog(r,e)]:[3,2]):[2];case 1:o.sent(),o.label=2;case 2:return[2,this.getWhitelistedIssuers(r)]}}))}))},e.prototype.showWhitelistDialog=function(e,t){var r=this;return new Promise((function(i,o){var f="\n\t\t\t\t

    ".concat(e," is requesting access to the following attestations

    \n\t\t\t\t
    \n\t\t\t\t\t").concat(t.map((function(t){return'\n\t\t\t\t\t\t\n\t\t\t\t\t")})),"\n\t\t\t\t
    \n\t\t\t"),a='',s='',c=r.config.whitelistDialogRenderer?r.config.whitelistDialogRenderer(f,a,s):'\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t'.concat(f,"\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t").concat(a,"\n\t\t\t\t\t\t").concat(s,"\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t");document.body.insertAdjacentHTML("beforeend",c),document.getElementById("tn-access-accept").addEventListener("click",(function(){var t,n,o,f=document.getElementsByClassName("tn-permission-cb"),a=[];try{for(var s=u(f),c=s.next();!c.done;c=s.next()){var l=c.value,d=l.getAttribute("data-issuer");(null===(o=r.storedWhitelist[e])||void 0===o?void 0:o.issuers)||(r.storedWhitelist[e]={issuers:[]}),l.checked&&a.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}r.storedWhitelist[e].issuers=a,r.saveWhitelist(),i()}));document.getElementById("tn-access-deny").addEventListener("click",(function(){r.storedWhitelist[e]&&delete r.storedWhitelist[e],r.saveWhitelist(),(0,n.pC)("tn-user-denied-access-to-connection",!0,10),o(new Error("USER_ABORT"))})),r.showWhitelistCallback()}))},e.STORAGE_KEY="tn-whitelist",e}(),d=f(1694),h=f(3076),p=f(84570),y=(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),b=function(){return b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},w={whitelistDialogWidth:"450px",whitelistDialogHeight:"350px"},A={max_width:"undefined"!=typeof window&&window.innerWidth<700?"400px":"450px",min_height:"undefined"!=typeof window&&window.innerHeight<600?"600px":"650px"},E=function(e){function t(t,r){void 0===r&&(r=null);var o=e.call(this,t)||this;if(o.tokenConfig=t,o.tokenConfig=Object.assign(w,t),o.whitelist=new l(o.tokenConfig,(function(){var e=o.getDataFromQuery("evtid");o.sendMessageResponse({evtid:e,evt:i.kt.SHOW_FRAME,max_width:o.tokenConfig.whitelistDialogWidth,min_height:o.tokenConfig.whitelistDialogHeight})})),r)o.urlParams=r;else{var f=window.location.hash.length>1?"?"+window.location.hash.substring(1):window.location.search;o.urlParams=new URLSearchParams(f)}return o.pageOnLoadEventHandler().catch((function(e){console.error(e),(0,n.kg)(2,"Outlet pageOnLoadEventHandler error: "+e.message)})),o}return y(t,e),t.prototype.getDataFromQuery=function(e){return this.urlParams?this.urlParams.has(i.ss+e)?this.urlParams.get(i.ss+e):this.urlParams.get(e):null},t.prototype.getCallbackUrlKey=function(e){return i.ss+e},t.prototype.pageOnLoadEventHandler=function(){var e;return g(this,void 0,void 0,(function(){var t,r,i,f;return m(this,(function(a){switch(a.label){case 0:t=this.getDataFromQuery("evtid"),r=this.getDataFromQuery("action"),(i=this.getDataFromQuery("requestor"))&&(this.redirectCallbackUrl=new URL(i)),(0,n.kg)(2,"Outlet received event ID "+t+" action "+r+" at "+window.location.href),a.label=1;case 1:switch(a.trys.push([1,15,,16]),r){case o.gF.GET_ISSUER_TOKENS:return[3,2];case o.gF.EMAIL_ATTEST_CALLBACK:return[3,4];case o.gF.GET_PROOF:return[3,6];case o.gF.GET_MUTLI_PROOF:return[3,8]}return[3,10];case 2:return[4,this.sendTokens(t)];case 3:return a.sent(),[3,14];case 4:return"true"===this.getDataFromQuery("localClient")?[2]:[4,this.processAttestationIdCallback(t)];case 5:return a.sent(),[3,14];case 6:return[4,this.sendTokenProof(t)];case 7:return a.sent(),[3,14];case 8:return[4,this.sendMultiTokenProof(t)];case 9:return a.sent(),[3,14];case 10:return this.getDataFromQuery("ticket")?[4,this.readMagicLink()]:[3,13];case 11:return a.sent(),[4,this.sendTokens(t)];case 12:a.sent(),a.label=13;case 13:return[3,14];case 14:return[3,16];case 15:return f=a.sent(),console.error(f),this.sendErrorResponse(t,null!==(e=null==f?void 0:f.message)&&void 0!==e?e:f,this.getDataFromQuery("issuer")),[3,16];case 16:return[2]}}))}))},t.prototype.processAttestationIdCallback=function(e){var t=this.redirectCallbackUrl,r=this.getDataFromQuery("issuer");try{switch((new h.p).captureAttestationIdCallback(this.urlParams),this.getDataFromQuery("orig-action")){case o.gF.GET_PROOF:this.sendTokenProof(e);break;case o.gF.GET_MUTLI_PROOF:this.sendMultiTokenProof(e);break;default:throw new Error("Original action not defined in attestation.id callback")}}catch(e){if(console.error(e),t)return this.proofRedirectError(r,e.message)}window.location.hash=(0,n.rT)(this.urlParams,["attestation","requestSecret","address","wallet"]).toString()},t.prototype.getIssuerConfigById=function(e){var t,r;if(this.tokenConfig.issuers){try{for(var n=v(this.tokenConfig.issuers),i=n.next();!i.done;i=n.next()){var o=i.value;if(o.collectionID===e)return o}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}throw new Error("Issuer "+e+" not found")}},t.prototype.readMagicLink=function(){return g(this,void 0,void 0,(function(){return m(this,(function(e){switch(e.label){case 0:return this.urlParams.has("ticket")?[4,this.ticketStorage.importTicketFromMagicLink(this.urlParams)]:[2];case 1:return e.sent(),[2]}}))}))},t.prototype.sendMultiTokenProof=function(e){return g(this,void 0,void 0,(function(){var t,r,f,a,s,c,u,l,d,h=this;return m(this,(function(p){switch(p.label){case 0:t=this.getDataFromQuery("tokens"),r=this.getDataFromQuery("wallet"),f=this.getDataFromQuery("address"),(0,n.Sg)(t,"unsigned token is missing"),a="true"===this.getDataFromQuery("redirect")&&window.location.href,p.label=1;case 1:return p.trys.push([1,3,,4]),s=JSON.parse(t),[4,this.authenticateMany(s,f,r,a,(function(){h.sendMessageResponse({evtid:e,evt:i.kt.SHOW_FRAME,max_width:A.max_width,min_height:A.min_height})}))];case 2:return c=p.sent(),this.redirectCallbackUrl?(u=this.redirectCallbackUrl,(l=new URLSearchParams(u.hash.substring(1))).set(this.getCallbackUrlKey("action"),"proof-callback"),l.set(this.getCallbackUrlKey("multi-token"),"true"),l.set(this.getCallbackUrlKey("tokens"),JSON.stringify(c)),u.hash=l.toString(),window.location.href=u.href,[2]):(this.sendMessageResponse({evtid:e,evt:o.AJ.PROOF,data:c}),[3,4]);case 3:return d=p.sent(),(0,n.kg)(2,d),a?[2,this.proofRedirectError(this.getDataFromQuery("issuer"),d.message)]:(this.sendErrorResponse(e,d.message),[3,4]);case 4:return[2]}}))}))},t.prototype.sendTokenProof=function(e){return g(this,void 0,void 0,(function(){var t,r,f,a,s,c,u,l,d,y,g,v,w,E=this;return m(this,(function(m){switch(m.label){case 0:t=this.getDataFromQuery("issuer"),r=this.getDataFromQuery("token"),f=this.getDataFromQuery("wallet"),a=this.getDataFromQuery("address"),(0,n.Sg)(r,"unsigned token is missing"),s=JSON.parse(r),c="true"===this.getDataFromQuery("redirect")&&window.location.href,m.label=1;case 1:return m.trys.push([1,5,,6]),u=this.getIssuerConfigById(t),[4,this.ticketStorage.getStoredTicketFromDecodedTokenOrId((0,n.s1)(u),s)];case 2:return l=m.sent(),[4,new h.p(u.attestationOrigin,(function(){E.sendMessageResponse({evtid:e,evt:i.kt.SHOW_FRAME,max_width:A.max_width,min_height:A.min_height})}),c).getIdentifierAttestation(l.id,f,a,{action:o.gF.GET_PROOF,issuer:t,token:JSON.stringify(s)})];case 3:return d=m.sent(),[4,(0,p.s)(u,d.attestation,d.identifierSecret,l)];case 4:return y=m.sent(),this.redirectCallbackUrl?(g=this.redirectCallbackUrl,(v=new URLSearchParams(g.hash.substring(1))).set(this.getCallbackUrlKey("action"),"proof-callback"),v.set(this.getCallbackUrlKey("issuer"),t),v.set(this.getCallbackUrlKey("attestation"),y.proof),v.set(this.getCallbackUrlKey("type"),l.type),v.set(this.getCallbackUrlKey("token"),r),g.hash=v.toString(),window.location.href=g.href,[2]):(this.sendMessageResponse({evtid:e,evt:o.AJ.PROOF,data:b({issuer:u.collectionID},y)}),[3,6]);case 5:return w=m.sent(),(0,n.kg)(2,w),c?[2,this.proofRedirectError(this.getDataFromQuery("issuer"),w.message)]:(this.sendErrorResponse(e,w.message),[3,6]);case 6:return[2]}}))}))},t.prototype.sendTokens=function(e){return g(this,void 0,void 0,(function(){var t,r,i,f,a,s,c,u,l,d,h,p,y,b,g,w,A,E,_,k,T,S,x,P,I,M,O,C;return m(this,(function(m){switch(m.label){case 0:if(!(t=JSON.parse(this.getDataFromQuery("request"))))return[2];r={};try{for(i=v(this.tokenConfig.issuers),f=i.next();!f.done;f=i.next()){p=f.value,a=(0,n.s1)(p);try{for(x=void 0,s=v(a),c=s.next();!c.done;c=s.next())w=c.value,r[w]=p}catch(e){x={error:e}}finally{try{c&&!c.done&&(P=s.return)&&P.call(s)}finally{if(x)throw x.error}}}}catch(e){T={error:e}}finally{try{f&&!f.done&&(S=i.return)&&S.call(i)}finally{if(T)throw T.error}}for(p in u=[],t)try{for(I=void 0,l=v(t[p]),d=l.next();!d.done;d=l.next())w=d.value,r[w]&&-1===u.indexOf(r[w])&&u.push(r[w])}catch(e){I={error:e}}finally{try{d&&!d.done&&(M=l.return)&&M.call(l)}finally{if(I)throw I.error}}return[4,this.whitelist.whitelistCheck(u,!1)];case 1:for(p in h=m.sent(),t){y=[];try{for(O=void 0,b=v(t[p]),g=b.next();!g.done;g=b.next())w=g.value,r[w]&&h.indexOf(r[w].collectionID)>-1&&y.push(w)}catch(e){O={error:e}}finally{try{g&&!g.done&&(C=b.return)&&C.call(b)}finally{if(O)throw O.error}}t[p]=y}return[4,this.ticketStorage.getDecodedTokens(t)];case 2:if(A=m.sent(),(0,n.kg)(2,"issuerTokens: (Outlet.sendTokens)",A),this.redirectCallbackUrl)try{return E=this.redirectCallbackUrl,(_=new URLSearchParams(E.hash.substring(1))).set(this.getCallbackUrlKey("action"),o.gF.GET_ISSUER_TOKENS+"-response"),_.set(this.getCallbackUrlKey("tokens"),JSON.stringify(A)),E.hash="#"+_.toString(),k=E.href,(0,n.kg)(2,"tokens ready. go to: ",k),window.location.href=k,[2]}catch(e){(0,n.kg)(2,"Requestor redirect Error. ",e)}return this.sendMessageResponse({evtid:e,evt:o.AJ.ISSUER_TOKENS,data:{tokens:A}}),[2]}}))}))},t.prototype.sendErrorResponse=function(e,t,r,n){if(void 0===n&&(n="error"),this.redirectCallbackUrl){var o=this.redirectCallbackUrl,f=new URLSearchParams(o.hash.substring(1));return f.set(this.getCallbackUrlKey("action"),i.kt.ERROR),f.set(this.getCallbackUrlKey("issuer"),r),f.set(this.getCallbackUrlKey("type"),n),f.set(this.getCallbackUrlKey("error"),t),o.hash="#"+f.toString(),void(window.location.href=o.href)}this.sendMessageResponse({evtid:e,evt:i.kt.ERROR,errors:[t]})},t.prototype.proofRedirectError=function(e,t){var r=this.redirectCallbackUrl,n=new URLSearchParams(r.hash.substring(1));n.set(this.getCallbackUrlKey("action"),"proof-callback"),n.set(this.getCallbackUrlKey("issuer"),e),n.set(this.getCallbackUrlKey("error"),t),r.hash=n.toString(),window.location.href=r.href},t.prototype.sendMessageResponse=function(e){var t;document.referrer&&(window.opener&&window.opener!==window?t=window.opener:window.parent!==window&&(t=window.parent),t&&t.postMessage(e,"*"))},t}(d.c),_=f(30838),k=f(82707),T=f(67890)})(),a})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.negotiator=t():e.negotiator=t()}(self,(()=>(()=>{var e,t,r,n,i={10536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ownable__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}];t.Ownable__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},76950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ownable__factory=void 0;var n=r(10536);Object.defineProperty(t,"Ownable__factory",{enumerable:!0,get:function(){return n.Ownable__factory}})},75114:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.token=t.access=void 0,t.access=o(r(76950)),t.token=o(r(99377))},92657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERC20__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],o="0x6080604052346200031d5762001095803803806200001d8162000322565b9283398101906040818303126200031d5780516001600160401b03908181116200031d57836200004f91840162000348565b91602093848201518381116200031d576200006b920162000348565b82518281116200021d576003918254916001958684811c9416801562000312575b88851014620002fc578190601f94858111620002a6575b5088908583116001146200023f5760009262000233575b505060001982861b1c191690861b1783555b80519384116200021d5760049586548681811c9116801562000212575b82821014620001fd57838111620001b2575b508092851160011462000144575093839491849260009562000138575b50501b92600019911b1c19161790555b604051610cda9081620003bb8239f35b01519350388062000118565b92919084601f1981168860005285600020956000905b898383106200019757505050106200017c575b50505050811b01905562000128565b01519060f884600019921b161c19169055388080806200016d565b8587015189559097019694850194889350908101906200015a565b87600052816000208480880160051c820192848910620001f3575b0160051c019087905b828110620001e6575050620000fb565b60008155018790620001d6565b92508192620001cd565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000e9565b634e487b7160e01b600052604160045260246000fd5b015190503880620000ba565b90889350601f19831691876000528a6000209260005b8c8282106200028f575050841162000276575b505050811b018355620000cc565b015160001983881b60f8161c1916905538808062000268565b8385015186558c9790950194938401930162000255565b90915085600052886000208580850160051c8201928b8610620002f2575b918a91869594930160051c01915b828110620002e2575050620000a3565b600081558594508a9101620002d2565b92508192620002c4565b634e487b7160e01b600052602260045260246000fd5b93607f16936200008c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200021d57604052565b919080601f840112156200031d5782516001600160401b0381116200021d576020906200037e601f8201601f1916830162000322565b928184528282870101116200031d5760005b818110620003a657508260009394955001015290565b85810183015184820184015282016200039056fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461075657508163095ea7b31461070e57816318160ddd146106d157816323b872dd146105a3578163313ce5671461056957816339509351146104bf57816370a082311461045e57816395d89b4114610268578163a457c2d71461016257508063a9059cbb146101145763dd62ed3e1461009e57600080fd5b3461011057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011057806020926100d86108fe565b6100e0610926565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b503461011057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101105760209061015b6101516108fe565b6024359033610949565b5160018152f35b9050823461026557827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102655761019b6108fe565b918360243592338152600160205281812073ffffffffffffffffffffffffffffffffffffffff861682526020522054908282106101e25760208561015b8585038733610b58565b60849060208651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b80fd5b83833461011057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011057805190828454600181811c90808316928315610454575b60209384841081146104285783885287959493929181156103cd5750600114610351575b50505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff8411838510176103255750829182610321925282610898565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b8888529193925086917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106103b757505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936102d3565b805488850187015287945092850192810161037c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016848701525050151560051b830101905081601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06102d3565b60248960228c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91607f16916102af565b5050346101105760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110578060209273ffffffffffffffffffffffffffffffffffffffff6104b06108fe565b16815280845220549051908152f35b82843461026557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610265576104f76108fe565b338252600160205282822073ffffffffffffffffffffffffffffffffffffffff821683526020528282205491602435830180931161053d5760208461015b858533610b58565b806011867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b50503461011057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110576020905160128152f35b839150346101105760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110576105dd6108fe565b6105e5610926565b91846044359473ffffffffffffffffffffffffffffffffffffffff8416815260016020528181203382526020522054907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361064b575b60208661015b878787610949565b84821061067457509183916106696020969561015b95033383610b58565b91939481935061063d565b60649060208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b50503461011057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610110576020906002549051908152f35b50503461011057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101105760209061015b61074c6108fe565b6024359033610b58565b8490843461089457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126108945782600354600181811c9080831692831561088a575b60209384841081146104285783885287959493929181156103cd575060011461080d5750505003601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019267ffffffffffffffff8411838510176103255750829182610321925282610898565b600388529193925086917fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061087457505050907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe092601f928201019181936102d3565b8054888501870152879450928501928101610839565b91607f169161079c565b8280fd5b60208082528251818301819052939260005b8581106108ea575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8181018301518482016040015282016108aa565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361092157565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361092157565b73ffffffffffffffffffffffffffffffffffffffff809116918215610ad45716918215610a50576000828152806020526040812054918083106109cc57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215610c4a5716918215610bc65760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.ERC20__factory=f},28045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];t.IERC20__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},38518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Metadata__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];t.IERC20Metadata__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},17547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Permit__factory=void 0;const n=r(86623),i=[{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"}];t.IERC20Permit__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},79891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Permit__factory=void 0;var n=r(17547);Object.defineProperty(t,"IERC20Permit__factory",{enumerable:!0,get:function(){return n.IERC20Permit__factory}})},29115:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20Metadata__factory=t.draftIerc20PermitSol=void 0,t.draftIerc20PermitSol=o(r(79891));var f=r(38518);Object.defineProperty(t,"IERC20Metadata__factory",{enumerable:!0,get:function(){return f.IERC20Metadata__factory}})},61701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.IERC20__factory=t.ERC20__factory=t.extensions=void 0,t.extensions=o(r(29115));var f=r(92657);Object.defineProperty(t,"ERC20__factory",{enumerable:!0,get:function(){return f.ERC20__factory}});var a=r(28045);Object.defineProperty(t,"IERC20__factory",{enumerable:!0,get:function(){return a.IERC20__factory}})},99377:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.erc20=void 0,t.erc20=o(r(61701))},27349:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.contracts=void 0,t.contracts=o(r(75114))},19530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAS__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract ISchemaRegistry",name:"registry",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"AlreadyRevoked",type:"error"},{inputs:[],name:"AlreadyRevokedOffchain",type:"error"},{inputs:[],name:"AlreadyTimestamped",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidAttestation",type:"error"},{inputs:[],name:"InvalidAttestations",type:"error"},{inputs:[],name:"InvalidExpirationTime",type:"error"},{inputs:[],name:"InvalidLength",type:"error"},{inputs:[],name:"InvalidOffset",type:"error"},{inputs:[],name:"InvalidRegistry",type:"error"},{inputs:[],name:"InvalidRevocation",type:"error"},{inputs:[],name:"InvalidRevocations",type:"error"},{inputs:[],name:"InvalidSchema",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidVerifier",type:"error"},{inputs:[],name:"Irrevocable",type:"error"},{inputs:[],name:"NotFound",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"WrongSchema",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Attested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"revoker",type:"address"},{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"RevokedOffchain",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"Timestamped",type:"event"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"}],internalType:"struct AttestationRequest",name:"request",type:"tuple"}],name:"attest",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct DelegatedAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttestation",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"revoker",type:"address"},{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getSchemaRegistry",outputs:[{internalType:"contract ISchemaRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"isAttestationValid",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiAttestationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiAttest",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct MultiDelegatedAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiRevocationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiRevoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct MultiDelegatedRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"}],internalType:"struct RevocationRequest",name:"request",type:"tuple"}],name:"revoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct DelegatedRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"revokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"timestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"}],o="0x610160346200030457601f19906001600160401b0390601f62004c8938819003918201851683019184831184841017620003095780849260409485528339602093849181010312620003045751916001600160a01b0383168084036200030457818351966200006e886200031f565b60038852818801966245415360e81b885285516200008c816200031f565b6004958187809352019863302e323760e01b8a528a5190209820988860e05261010099808b524660a0528751858101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9b8c84528a83015260608201524660808201523060a082015260a0815260c0810181811085821117620002ef5789525190206080523060c0526101209889528051918211620002da576000938454916001928381811c91168015620002cf575b83821014620002bc57601f811162000271575b5081601f85116001146200020b5750839450908392918694620001ff575b50501b916000199060031b1c19161790555b15620001f15750610140918252519161494d93846200033c8539608051846143dc015260a05184614497015260c051846143ad015260e0518461442b01525183614451015251826144080152518181816102a901528181611e660152818161268e01528181612d9a01526130180152f35b90516311a1e69760e01b8152fd5b0151925038806200016e565b9294849081168780528488209488905b888383106200025657505050106200023c575b505050811b01905562000180565b015160001960f88460031b161c191690553880806200022e565b8587015188559096019594850194879350908101906200021b565b868052828720601f860160051c810191848710620002b1575b601f0160051c019084905b828110620002a557505062000150565b88815501849062000295565b90915081906200028a565b634e487b7160e01b875260228952602487fd5b90607f16906200013d565b604186634e487b7160e01b6000525260246000fd5b604189634e487b7160e01b6000525260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b03821117620003095760405256fe61016060406101405280610140515260048036101561001d57600080fd5b600091823560e01c90816312b11a171461118d5750806313893f611461110557806317d7de7c14610fe25780632d0335ab14610f7a57806344adc90e14610e715780634692626714610e125780634cb7e9e514610d095780634d00307014610cc0578063831e05a114610a71578063a3112a6414610a07578063b469318d14610987578063b83010d31461092c578063cf190f34146108e2578063d45c44351461088c578063e13458fc14610790578063e30bb56314610739578063e45d03f9146104b1578063e57a6b1b1461039b578063e71ff36514610310578063ed24911d146102cd578063f10b5cc81461025c578063f17325e7146101ae5763ffa1ad741461012857600080fd5b346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5761014051516101a6916101688261141f565b81527f302e3237000000000000000000000000000000000000000000000000000000006020820152610140515191829160208352602083019061123e565b0390f35b5080fd5b50907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020823601126102595782359267ffffffffffffffff84116101aa578301916101405190843603011261025957602061024e8161024786866102296102156114eb565b92610224602436920184611553565b6115d6565b61023283611586565b5261023c82611586565b503491339135611df1565b0151611586565b516101405151908152f35b80fd5b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610259576020610140515173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610259576020610306614396565b6101405151908152f35b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803567ffffffffffffffff918282116103975761035f913691016111e5565b90914216925b818110610379576020846101405151908152f35b806103918561038b6001948688611a39565b356141be565b01610365565b8380fd5b5060e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576101405151906103d58261139c565b358082526103e236611981565b602083015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3601126104ad57610140515161041f81611403565b60643560ff811681036104a9578152608435602082015260a435610140518201526101405183015260c43573ffffffffffffffffffffffffffffffffffffffff8116810361039757610479838260606104a596015261487a565b610481611932565b61048a36611981565b61049382611586565b5261049d81611586565b503492612d4d565b5080f35b8480fd5b8280fd5b506020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ad5767ffffffffffffffff82358181116104a95784926104ff8592369084016111e5565b91903493865b848110610510578780f35b6105208186859a9798999a61189e565b906080823603126107315761014051519761053a8961139c565b82358952858301358a811161073557830196601f973689820112156101aa5761056990369089813591016119c7565b94878b01958652610140518501358c81116104ad5785019836908a0112156101aa57883596610597886114d3565b996105a761014051519b8c611458565b888b52898b018a6060809b0283010191368311610731578b808c9201925b84841061071957505090506105e591508d6101405101978c8952016112a4565b96888d0197885251998a51801591821561070d575b50506106e257825b8a51811015610673578061066d8c8f8b8b8f926106448761063c60019a73ffffffffffffffffffffffffffffffffffffffff9451986115c2565b5193516115c2565b51925116926101405151946106588661139c565b8552840152610140518301528c82015261487a565b01610602565b5099986106d6949897506001955083906106d0939d97929c519073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8d018c1494511691612fca565b90611862565b91969195929301610505565b5061014051517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b51141590508e806105fa565b6107233685611698565b8152019101908b8b916105c5565b8580fd5b8780fd5b5090346102595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025957602061078483356000526002602052604060002054151590565b61014051519015158152f35b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc916020833601126102595767ffffffffffffffff9282358481116104ad5760c08185019282360301126104ad576101405151946107ee8661139c565b82359485875260248301948535928311610259575060209661086b6102479561085860a461024e9a9761082b8d9b986108849836918401016115d6565b8b87015261083c3660448301611698565b61014051870152019361084e856112a4565b60608201526144bd565b6102246108636114eb565b953692611553565b61087484611586565b5261087e83611586565b506116d6565b903492611df1565b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209167ffffffffffffffff913581526003835261014051902054166101405151908152f35b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209061030667ffffffffffffffff421680923533614264565b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025957602061014051517fa98d02348410c9c76735e0d0bb1396f4015ac2bb9615f9c2611d19d7a8a996508152f35b50346101aa57610140517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209167ffffffffffffffff9173ffffffffffffffffffffffffffffffffffffffff6109e3611281565b16825283526101405181206024358252835261014051902054166101405151908152f35b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576101a691610a5b91610a47611a49565b503581526002602052610140519020611ae7565b6101405151918291602083526020830190611300565b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803567ffffffffffffffff81116104ad57610abb8391369084016111e5565b9092610ac6826116f7565b9383346101205280935b808510610af2576101a6610ae48789614329565b6101405151918291826112c5565b9091929394610b0286838661189e565b610b0f602082018261179e565b80929192158015610ca6575b610c7b578560608301928035915b838110610bbb57505092602092610b829260019695610b7c8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8b011494610b7461012051956116d6565b9336916117f2565b9061261c565b610b90815161012051611862565b61012052018051610ba1898b6115c2565b52610bac888a6115c2565b50515101950193929190610ad0565b610bca8160051b870187611553565b610bd9610140518401846118de565b831015610c4f576001929173ffffffffffffffffffffffffffffffffffffffff610c4992610c37610c098b6116d6565b91610c26610140515195610c1c8761139c565b8b875236906115d6565b602086015236906060880201611698565b610140518401521660608201526144bd565b01610b29565b60248b60328f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8761014051517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b50610cb6610140518301836118de565b9050811415610b1b565b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209061030667ffffffffffffffff42168092356141be565b506020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ad57813567ffffffffffffffff928382116104a957610d54913691016111e5565b8493919290345b818610610d66578680f35b610d7186838761175e565b838101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811215610e0e57810191823592868411610e0a578501928060061b36038413610e0a57600193826106d092610e0295610dfb8d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8b011494339336916119c7565b9035612fca565b950194610d5b565b8980fd5b8880fd5b5060607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576104a590610e49611932565b90610e5336611981565b610e5c83611586565b52610e6682611586565b503491339135612d4d565b50602090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ad5780359067ffffffffffffffff821161039757610ebe9084923691016111e5565b90610ec8826116f7565b93833490937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101905b808610610f06576101a6610ae4888a614329565b90919293949560019085610f51610f488a8888610f24838a8f61175e565b610f41610f338883018361179e565b9390951494339336916117f2565b903561261c565b96875190611862565b95018051610f5f8a8c6115c2565b52610f6a898b6115c2565b5051510196019493929190610ef2565b82346102595760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102595760209073ffffffffffffffffffffffffffffffffffffffff610fca611281565b16815260018252610140519020546101405151908152f35b823461025957807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102595761014051519080805461102381611a94565b808552916001918083169081156110bd5750600114611063575b6101a68561104d81870382611458565b610140515191829160208352602083019061123e565b80809450527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106110a557505050810160200161104d826101a661103d565b8054602085870181019190915290930192810161108a565b8695506101a69693506020925061104d9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101929361103d565b50346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57803567ffffffffffffffff9182821161039757611154913691016111e5565b90914216925b81811061116e576020846101405151908152f35b80611187856111806001948688611a39565b3533614264565b0161115a565b8390346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa57807fdbfdf8dc2b135c26253e00d5b6cbe6f20457e003fd526d97cea183883570de6160209252f35b9181601f840112156112165782359167ffffffffffffffff8311611216576020808501948460051b01011161121657565b600080fd5b60005b83811061122e5750506000910152565b818101518382015260200161121e565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361127a8151809281875287808801910161121b565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361121657565b359073ffffffffffffffffffffffffffffffffffffffff8216820361121657565b6020908160408183019282815285518094520193019160005b8281106112ec575050505090565b8351855293810193928101926001016112de565b9061139991805182526020810151602083015267ffffffffffffffff806040830151166040840152806060830151166060840152608082015116608083015260a081015160a083015273ffffffffffffffffffffffffffffffffffffffff8060c08301511660c084015260e08201511660e08301526101008082015115159083015261012080910151916101408092820152019061123e565b90565b6080810190811067ffffffffffffffff8211176113b857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60c0810190811067ffffffffffffffff8211176113b857604052565b6060810190811067ffffffffffffffff8211176113b857604052565b6040810190811067ffffffffffffffff8211176113b857604052565b610140810190811067ffffffffffffffff8211176113b857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176113b857604052565b67ffffffffffffffff81116113b857601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b67ffffffffffffffff81116113b85760051b60200190565b6040908151916114fa8361141f565b60018352829160005b60208082101561154b5783516020929161151c826113e7565b6000825260008183015260008683015260606000818401526080830152600060a0830152828801015201611503565b505091925050565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181360301821215611216570190565b8051156115935760200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156115935760209160051b010190565b91909160c08184031261121657604051906115f0826113e7565b81936115fb826112a4565b835260209167ffffffffffffffff8184013581811681036112165784860152604082013580151581036112165760408601526060820135606086015260808201359081116112165781019180601f840112156112165782359261165d84611499565b9161166b6040519384611458565b84835285858301011161121657848460a09695879660009401838601378301015260808501520135910152565b9190826060910312611216576040516116b081611403565b8092803560ff811681036112165760409182918452602081013560208501520135910152565b3573ffffffffffffffffffffffffffffffffffffffff811681036112165790565b90611701826114d3565b61170e6040519182611458565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061173c82946114d3565b019060005b82811061174d57505050565b806060602080938501015201611741565b91908110156115935760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc181360301821215611216570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611216570180359067ffffffffffffffff821161121657602001918160051b3603831361121657565b929190926117ff846114d3565b9161180d6040519384611458565b829480845260208094019060051b8301928284116112165780915b84831061183757505050505050565b823567ffffffffffffffff811161121657869161185786849386016115d6565b815201920191611828565b9190820391821161186f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91908110156115935760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8181360301821215611216570190565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215611216570180359067ffffffffffffffff82116112165760200191606082023603831361121657565b6040908151916119418361141f565b600183528291600091825b602080821015611978578251602092916119658261141f565b868252868183015282890101520161194c565b50505091925050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc604091011261121657604051906119b88261141f565b60243582526044356020830152565b9291926119d3826114d3565b6040926119e284519283611458565b819581835260208093019160061b84019381851161121657915b848310611a0b57505050505050565b8583830312611216578386918251611a228161141f565b8535815282860135838201528152019201916119fc565b91908110156115935760051b0190565b60405190611a568261143b565b606061012083600080825280602083015280604083015280848301528060808301528060a08301528060c08301528060e08301526101008201520152565b90600182811c92168015611add575b6020831014611aae57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611aa3565b9060405191611af58361143b565b828154815260016006818401549360209485850152600281015467ffffffffffffffff908181166040870152818160401c16606087015260801c166080850152600381015460a085015260ff73ffffffffffffffffffffffffffffffffffffffff8060048401541660c0870152600583015490811660e087015260a01c1615156101008501520190604051938492600092815491611b9283611a94565b80875292828116908115611c075750600114611bc1575b505050506101209291611bbd910384611458565b0152565b60009081528381209695945091905b818310611bef57509394509192509082010181611bbd61012038611ba9565b86548884018501529586019587945091830191611bd0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685880152505050151560051b830101905081611bbd61012038611ba9565b60405190611c548261141f565b6060602083600081520152565b90611c6b826114d3565b611c786040519182611458565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611ca682946114d3565b0190602036910137565b5190811515820361121657565b906020808383031261121657825167ffffffffffffffff938482116112165701926080848403126112165760405193611cf58561139c565b805185528281015173ffffffffffffffffffffffffffffffffffffffff811681036112165783860152611d2a60408201611cb0565b60408601526060810151918211611216570182601f8201121561121657805190611d5382611499565b93611d616040519586611458565b8285528383830101116112165782611d7c938501910161121b565b606082015290565b90611d8e826114d3565b611d9b6040519182611458565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611dc982946114d3565b019060005b828110611dda57505050565b602090611de5611a49565b82828501015201611dce565b9192608052611dfe611c47565b50805190611e0a611c47565b60a052611e1682611c61565b602060a05101526040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815283600482015260008160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa801561261057600060e0526125eb575b5060e05151156125c1579091611ead83611d84565b60c052611eb983611c61565b610100526000915b838310611eec575050505050611ee26080516101005160c05160e0516132ba565b60a0515260a05190565b611efc83829793949596976115c2565b519167ffffffffffffffff60208401511680151590816125ac575b5061258257604060e05101511580612575575b61254b5760608301519567ffffffffffffffff6020850151169673ffffffffffffffffffffffffffffffffffffffff85511660408601511515906080870151926040519a611f778c61143b565b60008c528960208d015267ffffffffffffffff421660408d015260608c0152600060808c015260a08b015260c08a015273ffffffffffffffffffffffffffffffffffffffff8a1660e08a015261010089015261012088015260005b602088015160c08901516120db609d60e08c015160408d01518d60608101519161010082015115159061012060a084015193015193604051988996602088019b8c527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000809260601b16604089015260601b1660548701527fffffffffffffffff000000000000000000000000000000000000000000000000809260c01b16606887015260c01b16607085015260f81b6078840152607983015280516120a0816099936020858701910161121b565b8201907fffffffff000000000000000000000000000000000000000000000000000000008860e01b169082015203607d810184520182611458565b51902080600052600260205260406000205415612101575060010163ffffffff16611fd2565b905097969293909495919780845280600052600260205260406000209184518355602085015160018401556121dd6002840167ffffffffffffffff6040880151168154907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff000000000000000060608b015160401b1692161717815567ffffffffffffffff6080880151167fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff77ffffffffffffffff0000000000000000000000000000000083549260801b169116179055565b60a085015160038401556004830173ffffffffffffffffffffffffffffffffffffffff60c0870151167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556005830173ffffffffffffffffffffffffffffffffffffffff60e0870151168154907fffffffffffffffffffffff00000000000000000000000000000000000000000074ff00000000000000000000000000000000000000006101008a0151151560a01b1692161717905561012085015192835167ffffffffffffffff81116113b85789946122bf6006840154611a94565b601f81116124f0575b50602090601f8311600114612423576006929160009183612418575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179101555b6060810151806123c8575b5073ffffffffffffffffffffffffffffffffffffffff906001956123488660c0516115c2565b526123558560c0516115c2565b5060a081015161236886610100516115c2565b528261237a86602060a05101516115c2565b5251166040519182527f8bf46bf4cfd674fa735a3d63ec1c9ad4153f033c290341f3a588b75685141b35602073ffffffffffffffffffffffffffffffffffffffff8b1693a401919290611ec1565b6123e19193506000526002602052604060002054151590565b156123ee57869138612322565b60046040517fc5723b51000000000000000000000000000000000000000000000000000000008152fd5b0151905038806122e4565b906006840160005260206000209160005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0851681106124d55750918391600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0600697161061249e575b505050811b01910155612317565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080612490565b8183015184558d985060019093019260209283019201612434565b90919293949550600684016000526020600020601f840160051c810160208510612544575b908c979695949392915b601f830160051c820181106125355750506122c8565b600081558d985060010161251f565b5080612515565b60046040517f157bd4c3000000000000000000000000000000000000000000000000000000008152fd5b5060408301511515611f2a565b60046040517f08e8b937000000000000000000000000000000000000000000000000000000008152fd5b905067ffffffffffffffff4216101538611f17565b60046040517fbf37b20e000000000000000000000000000000000000000000000000000000008152fd5b612607903d806000833e6125ff8183611458565b810190611cbd565b60e05238611e98565b6040513d6000823e3d90fd5b9290949391612629611c47565b50855193612635611c47565b9461263f81611c61565b6020870152604051907fa2ea7c6e00000000000000000000000000000000000000000000000000000000825282600483015260008260248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa91821561261057600092612d30575b508151156125c157929790916126d484611d84565b986126de85611c61565b946000935b818510612700575050505050956126fb94959661351e565b815290565b919593989496999092976127148a846115c2565b519a67ffffffffffffffff60208d0151168015159081612d1b575b506125825760408901511580612d0e575b61254b57899860608d01518d602081015167ffffffffffffffff1691815173ffffffffffffffffffffffffffffffffffffffff1690604083015115159260800151936040519e8f906127918261143b565b6000825260208201524267ffffffffffffffff166040820152606001528d608081016000905260a0015260c08d015273ffffffffffffffffffffffffffffffffffffffff8b1660e08d01526101008c01526101208b015260005b60208b01518b6128bc609d60c08301519260e08101519060408101519060608101519161010082015115159061012060a084015193015193604051988996602088019b8c527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000809260601b16604089015260601b1660548701527fffffffffffffffff000000000000000000000000000000000000000000000000809260c01b16606887015260c01b16607085015260f81b6078840152607983015280516120a0816099936020858701910161121b565b519020806000526002602052604060002054156128e2575060010163ffffffff166127eb565b90509d979b9199929a949d9c909698939c80845280600052600260205260406000209184518355602085015160018401556129c46002840167ffffffffffffffff6040880151168154907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff000000000000000060608b015160401b1692161717815567ffffffffffffffff6080880151167fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff77ffffffffffffffff0000000000000000000000000000000083549260801b169116179055565b60a085015160038401556004830173ffffffffffffffffffffffffffffffffffffffff60c0870151167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790556005830173ffffffffffffffffffffffffffffffffffffffff60e0870151168154907fffffffffffffffffffffff00000000000000000000000000000000000000000074ff00000000000000000000000000000000000000006101008a0151151560a01b1692161717905561012085015192835167ffffffffffffffff81116113b8578894612aa66006840154611a94565b601f8111612cb3575b50602090601f8311600114612be6576006929160009183612bdb575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916179101555b8d8b8b606084015180612bae575b5086602073ffffffffffffffffffffffffffffffffffffffff95948794612b44848660019e612b3e83612b5c9a6115c2565b526115c2565b50612b548460a0890151926115c2565b5201516115c2565b5251166040519182527f8bf46bf4cfd674fa735a3d63ec1c9ad4153f033c290341f3a588b75685141b35602073ffffffffffffffffffffffffffffffffffffffff881693a4019290919293949a6126e3565b92505050612bcb9193506000526002602052604060002054151590565b156123ee5785918d8b8b38612b0c565b015190503880612acb565b906006840160005260206000209160005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085168110612c985750918391600193837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06006971610612c61575b505050811b01910155612afe565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080612c53565b8183015184558c985060019093019260209283019201612bf7565b90919293949550600684016000526020600020601f840160051c810160208510612d07575b908b979695949392915b601f830160051c82018110612cf8575050612aaf565b600081558c9850600101612ce2565b5080612cd8565b5060408c01511515612740565b905067ffffffffffffffff421610153861272f565b612d469192503d806000833e6125ff8183611458565b90386126bf565b939291936040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815281600482015260008160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561261057600091612faf575b508051156125c1578251612dde81611d84565b92612de882611c61565b9460005b838110612e0257505050506113999495506136ff565b612e0c81836115c2565b5190815160005260028060205260406000208054156123ee57856001820154036125c1578c73ffffffffffffffffffffffffffffffffffffffff6005830154911673ffffffffffffffffffffffffffffffffffffffff821603612f855760a01c60ff161561254b5767ffffffffffffffff8282015460801c16612f5b5790810180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff164260801b77ffffffffffffffff00000000000000000000000000000000161790556001928c9190612ee082611ae7565b612eea858c6115c2565b52612ef5848b6115c2565b506020810151612f05858d6115c2565b527ff930a6e2523c9cc298691873087a740550b8fc85a0680830414c148ed927f615602073ffffffffffffffffffffffffffffffffffffffff87816004870154169451950154956040519586521693a401612dec565b60046040517f905e7107000000000000000000000000000000000000000000000000000000008152fd5b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b612fc491503d806000833e6125ff8183611458565b38612dcb565b90949392916040517fa2ea7c6e00000000000000000000000000000000000000000000000000000000815282600482015260008160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115612610576000916131eb575b508051156125c157865161305c81611d84565b9261306682611c61565b9460005b83811061308057505050506113999596506138fe565b61308a818c6115c2565b519081516000526002918260205260406000208054156123ee57846001820154036125c157600581015473ffffffffffffffffffffffffffffffffffffffff871673ffffffffffffffffffffffffffffffffffffffff821603612f855760a01c60ff161561254b5767ffffffffffffffff8482015460801c16612f5b5792830180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff164260801b77ffffffffffffffff000000000000000000000000000000001617905560019261315b81611ae7565b613165848b6115c2565b52613170838a6115c2565b506020820151613180848c6115c2565b528373ffffffffffffffffffffffffffffffffffffffff6004830154169251910154916040519182527ff930a6e2523c9cc298691873087a740550b8fc85a0680830414c148ed927f615602073ffffffffffffffffffffffffffffffffffffffff891693a40161306a565b61320091503d806000833e6125ff8183611458565b38613049565b60408101906040815282518092526060810160608360051b830101926020809501916000905b82821061326f57505050508281830391015281808451928381520193019160005b82811061325b575050505090565b83518552938101939281019260010161324d565b909192959485806132aa837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa089600196030186528a51611300565b979801949391909101910161322c565b9092918351936001908186146134fd5773ffffffffffffffffffffffffffffffffffffffff602080950151169182156134cd579560009687915b8083106133bf575050509183929161333d9492876040518097819582947f91db0b7e00000000000000000000000000000000000000000000000000000000845260048401613206565b03925af19081156126105760009161338b575b50905015613361576113999061408f565b60046040517fe8bee839000000000000000000000000000000000000000000000000000000008152fd5b82813d83116133b8575b61339f8183611458565b8101031261025957506133b190611cb0565b8038613350565b503d613395565b909197966133cd89876115c2565b5180151580613447575b61341d578181116133f3578084920398019801909190916132f4565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c3575060009161348e575b50156133d7565b908982813d83116134bc575b6134a48183611458565b8101031261025957506134b690611cb0565b38613487565b503d61349a565b513d6000823e3d90fd5b9594505050905060005b8281106134e75750505050600090565b6134f181836115c2565b5161341d5783016134d7565b6113999550613517915061351090611586565b5191611586565b5191613ad6565b9093918451946001908187146136e25773ffffffffffffffffffffffffffffffffffffffff602080950151169182156136b1579660009788915b80831061360157505050918392916135a19492886040518097819582947f91db0b7e00000000000000000000000000000000000000000000000000000000845260048401613206565b03925af1908115612610576000916135cd575b50905015613361576135c4575090565b6113999061408f565b82813d83116135fa575b6135e18183611458565b8101031261025957506135f390611cb0565b80386135b4565b503d6135d7565b9091989761360f8a876115c2565b5180151580613635575b61341d578181116133f357808492039901990190919091613558565b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c3575060009161367c575b5015613619565b908982813d83116136aa575b6136928183611458565b8101031261025957506136a490611cb0565b38613675565b503d613688565b969550505091505060005b8281106136cc5750505050600090565b6136d681836115c2565b5161341d5783016136bc565b61139996506136f8915061351090959495611586565b5191613c5d565b9092918351936001908186146138e45773ffffffffffffffffffffffffffffffffffffffff602080950151169182156138b4579560009687915b80831061380457505050918392916137829492876040518097819582947f88e5b2d900000000000000000000000000000000000000000000000000000000845260048401613206565b03925af1908115612610576000916137d0575b509050156137a6576113999061408f565b60046040517fbf2f3a8b000000000000000000000000000000000000000000000000000000008152fd5b82813d83116137fd575b6137e48183611458565b8101031261025957506137f690611cb0565b8038613795565b503d6137da565b9091979661381289876115c2565b5180151580613838575b61341d578181116133f357808492039801980190919091613739565b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c3575060009161387f575b501561381c565b908982813d83116138ad575b6138958183611458565b8101031261025957506138a790611cb0565b38613878565b503d61388b565b9594505050905060005b8281106138ce5750505050600090565b6138d881836115c2565b5161341d5783016138be565b61139995506138f7915061351090611586565b5191613dc5565b909391845194600190818714613ab95773ffffffffffffffffffffffffffffffffffffffff60208095015116918215613a88579660009788915b8083106139d857505050918392916139819492886040518097819582947f88e5b2d900000000000000000000000000000000000000000000000000000000845260048401613206565b03925af1908115612610576000916139a4575b509050156137a6576135c4575090565b82813d83116139d1575b6139b88183611458565b8101031261025957506139ca90611cb0565b8038613994565b503d6139ae565b909198976139e68a876115c2565b5180151580613a0c575b61341d578181116133f357808492039901990190919091613938565b50604080517fce46e04600000000000000000000000000000000000000000000000000000000815289816004818b5afa9182156134c35750600091613a53575b50156139f0565b908982813d8311613a81575b613a698183611458565b810103126102595750613a7b90611cb0565b38613a4c565b503d613a5f565b969550505091505060005b828110613aa35750505050600090565b613aad81836115c2565b5161341d578301613a93565b6113999650613acf915061351090959495611586565b5191613f3f565b92919273ffffffffffffffffffffffffffffffffffffffff602080920151168015613c505784151580613bd6575b61341d578385116133f357613b52829186946040519586809481937fe60c35050000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613ba2575b50905015613b785781611399910361408f565b60046040517fbd8ba84d000000000000000000000000000000000000000000000000000000008152fd5b82813d8311613bcf575b613bb68183611458565b810103126102595750613bc890611cb0565b8038613b65565b503d613bac565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa90811561261057600091613c1b575b5015613b04565b908382813d8311613c49575b613c318183611458565b810103126102595750613c4390611cb0565b38613c14565b503d613c27565b5050505061341d57600090565b93919373ffffffffffffffffffffffffffffffffffffffff602080920151168015613db75785151580613d3d575b61341d578486116133f357613cd9829187946040519586809481937fe60c35050000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613d09575b50905015613b78578290613cff57505090565b611399910361408f565b82813d8311613d36575b613d1d8183611458565b810103126102595750613d2f90611cb0565b8038613cec565b503d613d13565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa90811561261057600091613d82575b5015613c8b565b908382813d8311613db0575b613d988183611458565b810103126102595750613daa90611cb0565b38613d7b565b503d613d8e565b505050505061341d57600090565b92919273ffffffffffffffffffffffffffffffffffffffff602080920151168015613c505784151580613ec5575b61341d578385116133f357613e41829186946040519586809481937fe49617e10000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613e91575b50905015613e675781611399910361408f565b60046040517fccf3bb27000000000000000000000000000000000000000000000000000000008152fd5b82813d8311613ebe575b613ea58183611458565b810103126102595750613eb790611cb0565b8038613e54565b503d613e9b565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa90811561261057600091613f0a575b5015613df3565b908382813d8311613f38575b613f208183611458565b810103126102595750613f3290611cb0565b38613f03565b503d613f16565b93919373ffffffffffffffffffffffffffffffffffffffff602080920151168015613db75785151580614015575b61341d578486116133f357613fbb829187946040519586809481937fe49617e10000000000000000000000000000000000000000000000000000000083528760048401526024830190611300565b03925af190811561261057600091613fe1575b50905015613e67578290613cff57505090565b82813d831161400e575b613ff58183611458565b81010312610259575061400790611cb0565b8038613fce565b503d613feb565b506040517fce46e0460000000000000000000000000000000000000000000000000000000081528281600481855afa9081156126105760009161405a575b5015613f6d565b908382813d8311614088575b6140708183611458565b81010312610259575061408290611cb0565b38614053565b503d614066565b806140975750565b80471061416057600080808093335af13d1561415b573d6140b781611499565b906140c56040519283611458565b8152600060203d92013e5b156140d757565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152fd5b6140d0565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152fd5b6000818152600360205267ffffffffffffffff908160408220541661423a577f5aafceeb1c7ad58e4a84898bdee37c02c0fc46e7d24e6b60e8209449f183459f91838252600360205260408220941693847fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000082541617905580a3565b60046040517f2e267946000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff166000818152600460205260408120908381528160205267ffffffffffffffff806040832054166142ff577f92a1f7a41a7c585a8b09e25b195e225b1d43248daca46b0faf9e0792777a22299285835260205260408220951694857fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000082541617905580a4565b60046040517fec9d6eeb000000000000000000000000000000000000000000000000000000008152fd5b9061433390611c61565b60009283925b805184101561438e579361434d84866115c2565b519160005b835181101561437d5761436581856115c2565b5161437084876115c2565b5260019283019201614352565b509094600190940193909150614339565b509250905090565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016301480614494575b156143fe577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261448e816113e7565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000046146143d5565b6020908181015190604080938183015192606081019173ffffffffffffffffffffffffffffffffffffffff948584511660005260018252846000209283549360018501905551928688511667ffffffffffffffff988985820151168882015115159060806060840151930151878151910120938a5198888a019b7fdbfdf8dc2b135c26253e00d5b6cbe6f20457e003fd526d97cea183883570de618d528a01526060890152608088015260a087015260c086015260e085015261010090818501528352610120830196838810908811176113b8576145a886956145bc946145c4998b5251902061482e565b918860ff8351169183015192015192614792565b9490946145f9565b51169116036145d05750565b600490517f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b6005811015614763578061460a5750565b600181036146705760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b600281036146d65760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b6003146146df57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116148225791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa1561481557815173ffffffffffffffffffffffffffffffffffffffff81161561480f579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b614836614396565b906040519060208201927f19010000000000000000000000000000000000000000000000000000000000008452602283015260428201526042815261448e8161139c565b602081015160409182810151916060820173ffffffffffffffffffffffffffffffffffffffff9283825116600052600160205285600020908154916001830190555192519086519160208301947fa98d02348410c9c76735e0d0bb1396f4015ac2bb9615f9c2611d19d7a8a99650865288840152606083015260808201526080815260a081019481861067ffffffffffffffff8711176113b85761492b85946145bc936145c4988a5251902061482e565b9060ff8151168860208301519201519261479256fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.EAS__factory=f},81009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEAS__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Attested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"address",name:"attester",type:"address"},{indexed:!1,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!0,internalType:"bytes32",name:"schema",type:"bytes32"}],name:"Revoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"revoker",type:"address"},{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"RevokedOffchain",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"data",type:"bytes32"},{indexed:!0,internalType:"uint64",name:"timestamp",type:"uint64"}],name:"Timestamped",type:"event"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"}],internalType:"struct AttestationRequest",name:"request",type:"tuple"}],name:"attest",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct DelegatedAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttestation",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"revoker",type:"address"},{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSchemaRegistry",outputs:[{internalType:"contract ISchemaRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"getTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"isAttestationValid",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiAttestationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiAttest",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"}],internalType:"struct MultiDelegatedAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"}],internalType:"struct MultiRevocationRequest[]",name:"multiRequests",type:"tuple[]"}],name:"multiRevoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct MultiDelegatedRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiRevokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32[]",name:"data",type:"bytes32[]"}],name:"multiTimestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"}],internalType:"struct RevocationRequest",name:"request",type:"tuple"}],name:"revoke",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"}],internalType:"struct DelegatedRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"revokeOffchain",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"data",type:"bytes32"}],name:"timestamp",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"nonpayable",type:"function"}];t.IEAS__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},41693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISchemaRegistry__factory=void 0;const n=r(86623),i=[{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!1,internalType:"address",name:"registerer",type:"address"}],name:"Registered",type:"event"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getSchema",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"string",name:"schema",type:"string"}],internalType:"struct SchemaRecord",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"schema",type:"string"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"}],name:"register",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"}];t.ISchemaRegistry__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},19259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry__factory=void 0;const n=r(86623),i=[{inputs:[],name:"AlreadyExists",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"uid",type:"bytes32"},{indexed:!1,internalType:"address",name:"registerer",type:"address"}],name:"Registered",type:"event"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getSchema",outputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"string",name:"schema",type:"string"}],internalType:"struct SchemaRecord",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"schema",type:"string"},{internalType:"contract ISchemaResolver",name:"resolver",type:"address"},{internalType:"bool",name:"revocable",type:"bool"}],name:"register",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"nonpayable",type:"function"}],o="0x60808060405234610016576107b8908161001c8239f35b600080fdfe60806040908082526004918236101561001757600080fd5b600091823560e01c90816360d7a2781461029757508063a2ea7c6e146101045763ffa1ad741461004657600080fd5b3461010057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610100578051918183019083821067ffffffffffffffff8311176100d45750926100d093825282527f302e323700000000000000000000000000000000000000000000000000000000602083015251918291602083526020830190610689565b0390f35b806041867f4e487b71000000000000000000000000000000000000000000000000000000006024945252fd5b5080fd5b503461010057602092837ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610293576060808351610144816106cc565b85815285878201528585820152015235825281835280822090805191610169836106cc565b805483526001918282015491868501600273ffffffffffffffffffffffffffffffffffffffff92838616835260ff8589019660a01c16151586520188845196898354936101b585610758565b808b52948381169081156102505750600114610214575b50505050506101e1856100d097980386610717565b606087019485528251978897818952519088015251169085015251151560608401525160808084015260a0830190610689565b908094939b50528983205b82841061023d575050508501909601956101e1886100d087386101cc565b80548985018c0152928a0192810161021f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016858c01525050505090151560051b86010196506101e1886100d087386101cc565b8280fd5b92939050346106625760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106625780359067ffffffffffffffff80831161065e573660238401121561065e57828201359181831161065a57366024848601011161065a576024359673ffffffffffffffffffffffffffffffffffffffff9182891680990361010057604435978815158099036102935761033b816106cc565b8281526020998a8201908152888201998a52885197848c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe099818b601f83011601610386908d610717565b808c5280828d019460240185378b0101528b6060840199808b5283518d5115158d519384938185019687915180926103bd92610666565b84019260601b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169083015260f81b6034820152036015810182526035016104059082610717565b519020998a8552848c5289852054610632579082918b600294528b8652858d528a8620925183556001968784019251167fffffffffffffffffffffff00000000000000000000000000000000000000000074ff000000000000000000000000000000000000000084549351151560a01b1692161717905501955190815194851161060657506104948654610758565b601f81116105c0575b508891601f8511600114610545578495509084939492919361051a575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91921b9260031b1c19161790555b817f7d917fcbc9a29a9705ff9936ffa599500e4fd902e4486bae317414fe967b307c848351338152a251908152f35b015191507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff386104ba565b9294849081168785528a8520945b8b888383106105a95750505010610572575b505050811b0190556104eb565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c19169055388080610565565b868601518855909601959485019487935001610553565b868352898320601f860160051c8101918b87106105fc575b601f0160051c019084905b8281106105f157505061049d565b8481550184906105e3565b90915081906105d8565b8260416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b838a517f23369fa6000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8580fd5b8380fd5b60005b8381106106795750506000910152565b8181015183820152602001610669565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936106c581518092818752878088019101610666565b0116010190565b6080810190811067ffffffffffffffff8211176106e857604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106e857604052565b90600182811c921680156107a1575b602083101461077257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161076756fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e){return super.deploy(e||{})}getDeployTransaction(e){return super.getDeployTransaction(e||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.SchemaRegistry__factory=f},13041:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Verifier__factory=void 0;const n=r(86623),i=[{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"getNonce",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"}];t.EIP712Verifier__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},37444:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Verifier__factory=t.proxy=void 0,t.proxy=o(r(28457));var f=r(13041);Object.defineProperty(t,"EIP712Verifier__factory",{enumerable:!0,get:function(){return f.EIP712Verifier__factory}})},44726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Proxy__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"string",name:"name",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"DeadlineExpired",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"InvalidLength",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"NotFound",type:"error"},{inputs:[],name:"UsedSignature",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttester",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEAS",outputs:[{internalType:"contract IEAS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"}],o="0x61016060409080825234620003505762002239803803809162000023828562000355565b83398101918082840312620003505781516001600160a01b03811693909190848303620003505760208481015190946001600160401b03919082821162000350570194601f838188011215620003505786518381116200031657855197601f199562000096838501881686018b62000355565b828a528483830101116200035057839060005b8381106200033b575050600091890101528451858101908082108583111762000316578391875260038152019662302e3160e81b8852600381518483012098208860e05261010099818b524660a052875191858301907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9b8c83528a85015260608401524660808401523060a084015260a0835260c0830192808410888511176200031657838a525190206080523060c052610120998a52156200032c575061014096875280519384116200031657600054926001938481811c911680156200030b575b82821014620002f557838111620002aa575b50809285116001146200024057508394509083929160009462000234575b50501b916000199060031b1c1916176000555b5191611ebf93846200037a8539608051846113d7015260a051846114a3015260c051846113a8015260e051846114260152518361144c015251826114030152518181816102a5015281816104870152818161094f01528181610acb0152610e590152f35b015192503880620001bd565b9294849081166000805284600020946000905b888383106200028f575050501062000275575b505050811b01600055620001d0565b015160001960f88460031b161c1916905538808062000266565b85870151885590960195948501948793509081019062000253565b60008052816000208480880160051c820192848910620002eb575b0160051c019085905b828110620002de5750506200019f565b60008155018590620002ce565b92508192620002c5565b634e487b7160e01b600052602260045260246000fd5b90607f16906200018d565b634e487b7160e01b600052604160045260246000fd5b6341bc07ff60e11b8152600490fd5b8181018301518b8201840152859201620000a9565b600080fd5b601f909101601f19168101906001600160401b03821190821017620003165760405256fe6080604052600436101561001257600080fd5b6000803560e01c80630eabf66014610d9957806310d736d514610d3b57806312b11a1714610ce257806317d7de7c14610b815780633c0427151461097357806365c40b9c146109045780639541152514610369578063a6d4dbc7146101b2578063b83010d314610159578063ed24911d146101185763ffa1ad741461009657600080fd5b3461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576101116040516100d3816112e8565b600381527f302e310000000000000000000000000000000000000000000000000000000000602082015260405191829160208352602083019061125a565b0390f35b80fd5b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576020610151611391565b604051908152f35b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155760206040517f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d8152f35b506101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576040516101ea8161129d565b6004358082526101f936611843565b602083015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3601126103645760405161023481611318565b60643560ff81168103610364578152608435602082015260a4356040820152604083015260c43573ffffffffffffffffffffffffffffffffffffffff90818116810361036457606084015260e43567ffffffffffffffff8116810361036457836102a391608087960152611c91565b7f00000000000000000000000000000000000000000000000000000000000000001690604051906102d3826112e8565b81526102de36611843565b60208201908152823b1561035f576064849260209460405195869485937f4692626700000000000000000000000000000000000000000000000000000000855251600485015251805160248501520151604483015234905af18015610354576103445750f35b61034d90611304565b6101155780f35b6040513d84823e3d90fd5b505050fd5b600080fd5b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155767ffffffffffffffff600435818111610900576103b5903690600401611206565b6103be816116e6565b906103cc6040519283611350565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06103f9826116e6565b01855b8181106108e9575050845b81811061070057506040517f44adc90e0000000000000000000000000000000000000000000000000000000081526024810190602060048201528351809252604481016005926020604482861b85010196019189905b82821061063b575050505086818073ffffffffffffffffffffffffffffffffffffffff96038134887f0000000000000000000000000000000000000000000000000000000000000000165af195861561063057879661059b575b5050508490855b81811061050b578587604051918291602083016020845282518091526020604085019301915b8181106104f2575050500390f35b82518452859450602093840193909201916001016104e4565b610516818387611718565b6105236020820182611787565b905060608992015b8982841061053f57505050506001016104be565b8192939661054e6040936116c5565b610558828d61182f565b518352896001948594856020522091167fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790550195019091909161052b565b90919295503d8088843e6105af8184611350565b82019160208184031261062857805191821161062857019181601f8401121561062c5782519260206105e0856116e6565b946105ee6040519687611350565b808652818601931b82010192831161062857602001905b82821061061857505050923880806104b7565b8151815260209182019101610605565b8780fd5b8680fd5b6040513d89823e3d90fd5b909192967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8582030182528a8851916020604082019380518352015192604060208301528351809152606091602083820193838c1b8301019501935b8281106106b757505050505060208060019299019201920190929161045d565b90919293946020806106f3837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa08760019603018952895161165b565b9701950193929101610697565b61070b818386611718565b6107186020820182611787565b90811580156108d1575b6108a7576080830135895b8381106107d057505060405192610743846112e8565b35835261074f826116e6565b9161075d6040519384611350565b80835260051b8101602083013682116107cc5782905b8282106107a35750505050602082015260019190610791828661182f565b5261079c818561182f565b5001610407565b81358b81116107c8576020916107bd8392369088016114ff565b815201910190610773565b8c80fd5b8a80fd5b6107df8160051b840184611628565b906107ed60408701876117db565b82939193101561087a57610803606088016116c5565b908c851685036108765773ffffffffffffffffffffffffffffffffffffffff610870926108586001966108476040519561083c8761129d565b8d35875236906114ff565b6020860152369060608802016115ea565b60408401521660608201528c85166080820152611889565b0161072d565b8d80fd5b60248d7f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b60046040517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b506108df60408401846117db565b9050821415610722565b6020906108f46116fe565b828287010152016103fc565b8280fd5b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b506020907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9082823601126101155760043567ffffffffffffffff8082116109005760e08260040194833603011261090057604051936109d28561129d565b80359485815260248401928335908111610b7d5791610a40610a5b9492610a02610a4595600436918a01016114ff565b8a820152610a1336604489016115ea565b6040820152610a3660c460a4890198610a2b8a6114c9565b6060850152016114ea565b6080820152611889565b611628565b60405194610a52866112e8565b855236906114ff565b92848101938452610aac6040519485927ff17325e70000000000000000000000000000000000000000000000000000000084528760048501525160248401525160406044840152606483019061165b565b0390848473ffffffffffffffffffffffffffffffffffffffff938134867f0000000000000000000000000000000000000000000000000000000000000000165af1938415610b72578394610b41575b50610b076040916116c5565b92848152600186522091167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055604051908152f35b9093508481813d8311610b6b575b610b598183611350565b81010312610900575192610b07610afb565b503d610b4f565b6040513d85823e3d90fd5b8580fd5b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610115576040519080805491600183811c92818516948515610cd8575b6020958686108114610cab57858852879493929187908215610c6a575050600114610c11575b5050610bfd92500383611350565b61011160405192828493845283019061125a565b908592508180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310610c52575050610bfd93508201013880610bef565b80548389018501528794508693909201918101610c3a565b91509350610bfd9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013880610bef565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b93607f1693610bc9565b503461011557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155760206040517f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78152f35b50346101155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155773ffffffffffffffffffffffffffffffffffffffff6040602092600435815260018452205416604051908152f35b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101155760043567ffffffffffffffff811161120257610de4903690600401611206565b90610dee826116e6565b91610dfc6040519384611350565b8083527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610e29826116e6565b01845b8181106111eb57505090835b828110610f975750505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610900579082906040519283917f4cb7e9e5000000000000000000000000000000000000000000000000000000008352602483016020600485015281518091526044840190602060448260051b87010193019186905b828210610f005750505050828091039134905af1801561035457610ef4575080f35b610efd90611304565b80f35b9295847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc929593969850030182528451602060608160408501938051865201519360408382015284518094520192019089905b808210610f755750505060208060019296019201920192879593879593610ed2565b9091926020604060019282875180518352015183820152019401920190610f53565b610fa5818484959794611718565b9160a0833603126101155760405193610fbd8561129d565b83358552602084013567ffffffffffffffff8111610900578401601f943686830112156111b2578135610fef816116e6565b92610ffd6040519485611350565b81845260208085019260061b8201019036821161062c57602001915b8183106111ba5750505060208701918252604081013567ffffffffffffffff81116111b6578101953690870112156111b257853595611057876116e6565b966110656040519889611350565b80885260206060818a0192028301019136831161062c57602001905b8282106111985750505060806110ae918760408a01526110a3606082016114c9565b60608a0152016114ea565b608087015251938451801591821561118c575b50506108a757815b845181101561114f57806111496110e26001938861182f565b518851906110f48460408c015161182f565b5173ffffffffffffffffffffffffffffffffffffffff60608c0151169067ffffffffffffffff60808d015116926040519461112e8661129d565b85526020850152604084015260608301526080820152611c91565b016110c9565b5093516040519196936001939291611166836112e8565b82526020820152611177828761182f565b52611182818661182f565b5001919091610e38565b511415905038806110c1565b60206060916111a736856115ea565b815201910190611081565b8380fd5b8480fd5b60408336031261062c57602060409182516111d4816112e8565b853581528286013583820152815201920191611019565b6020906111f66116fe565b82828801015201610e2c565b5080fd5b9181601f840112156103645782359167ffffffffffffffff8311610364576020808501948460051b01011161036457565b60005b83811061124a5750506000910152565b818101518382015260200161123a565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361129681518092818752878088019101611237565b0116010190565b60a0810190811067ffffffffffffffff8211176112b957604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176112b957604052565b67ffffffffffffffff81116112b957604052565b6060810190811067ffffffffffffffff8211176112b957604052565b6080810190811067ffffffffffffffff8211176112b957604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176112b957604052565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014806114a0575b156113f9577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176112b95760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000046146113d0565b359073ffffffffffffffffffffffffffffffffffffffff8216820361036457565b359067ffffffffffffffff8216820361036457565b919060c083820312610364576040519067ffffffffffffffff60c08301818111848210176112b9576040528294611535816114c9565b84526020926115458483016114ea565b848601526040820135801515810361036457604086015260608201356060860152608082013583811161036457820181601f820112156103645780359384116112b957604051916115bd867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8801160184611350565b84835285858301011161036457848460a09695879660009401838601378301015260808501520135910152565b91908260609103126103645760405161160281611318565b8092803560ff811681036103645760409182918452602081013560208501520135910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181360301821215610364570190565b9073ffffffffffffffffffffffffffffffffffffffff825116815267ffffffffffffffff60208301511660208201526040820151151560408201526060820151606082015260a0806116bc608085015160c0608086015260c085019061125a565b93015191015290565b3573ffffffffffffffffffffffffffffffffffffffff811681036103645790565b67ffffffffffffffff81116112b95760051b60200190565b6040519061170b826112e8565b6060602083600081520152565b91908110156117585760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6181360301821215610364570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610364570180359067ffffffffffffffff821161036457602001918160051b3603831361036457565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610364570180359067ffffffffffffffff82116103645760200191606082023603831361036457565b80518210156117585760209160051b010190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc6040910112610364576040519061187a826112e8565b60243582526044356020830152565b608081019067ffffffffffffffff8083511680151590816119fd575b506119d35760208201519060409384840151936118c185611dc2565b80519173ffffffffffffffffffffffffffffffffffffffff9485815116918560208301511691898101511515876080606084015193015160208151910120935116938b519560208701987f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78a528d8801526060870152608086015260a085015260c084015260e083015261010090818301528152610120810193818510908511176112b95761199d956119806060946119959388978b52519020611c3f565b9060ff81511689602083015192015192611ba3565b959095611a0a565b0151169116036119aa5750565b600490517f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1ab7da6b000000000000000000000000000000000000000000000000000000008152fd5b90508142161015386118a5565b6005811015611b745780611a1b5750565b60018103611a815760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b60028103611ae75760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b600314611af057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611c335791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611c2657815173ffffffffffffffffffffffffffffffffffffffff811615611c20579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b611c47611391565b906040519060208201927f190100000000000000000000000000000000000000000000000000000000000084526022830152604282015260428152611c8b81611334565b51902090565b608081019067ffffffffffffffff90818351168015159081611db5575b506119d3576020810151918251600052600160205273ffffffffffffffffffffffffffffffffffffffff92604094848660002054168015611d8c573303611d63579261199585949361198060609461199d98968a86015193611d0f85611dc2565b865192519151168b519160208301937f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d85528d84015288830152608082015260808152611d5b8161129d565b519020611c3f565b600486517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b600487517fc5723b51000000000000000000000000000000000000000000000000000000008152fd5b9050824216101538611cae565b80519060406020820151910151604051917fff00000000000000000000000000000000000000000000000000000000000000602084019460f81b1684526021830152604182015260418152611e1681611334565b60ff6040516020818451611e2b818389611237565b810160028152030190205416611e8857611e5391602091604051938492839251928391611237565b8101600281520301902060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b60046040517fcce9a824000000000000000000000000000000000000000000000000000000008152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.EIP712Proxy__factory=f},71871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionedEIP712Proxy__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"string",name:"name",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"DeadlineExpired",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"InvalidLength",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"NotFound",type:"error"},{inputs:[],name:"UsedSignature",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyAttestationRequest",name:"delegatedRequest",type:"tuple"}],name:"attestByDelegation",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getAttestTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"uid",type:"bytes32"}],name:"getAttester",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDomainSeparator",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getEAS",outputs:[{internalType:"contract IEAS",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getName",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRevokeTypeHash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct AttestationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"attester",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyAttestationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiAttestByDelegation",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData[]",name:"data",type:"tuple[]"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature[]",name:"signatures",type:"tuple[]"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct MultiDelegatedProxyRevocationRequest[]",name:"multiDelegatedRequests",type:"tuple[]"}],name:"multiRevokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"schema",type:"bytes32"},{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"uint256",name:"value",type:"uint256"}],internalType:"struct RevocationRequestData",name:"data",type:"tuple"},{components:[{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],internalType:"struct EIP712Signature",name:"signature",type:"tuple"},{internalType:"address",name:"revoker",type:"address"},{internalType:"uint64",name:"deadline",type:"uint64"}],internalType:"struct DelegatedProxyRevocationRequest",name:"delegatedRequest",type:"tuple"}],name:"revokeByDelegation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"}],o="0x6101606040908082523462000388576200255a80380380916200002382856200038d565b83398101908281830312620003885780519060018060a01b03928383169485840362000388576020838101516001600160401b039491939185821162000388570193601f93828587011215620003885785518281116200034e57845196601f199462000096838901871685018a6200038d565b8289528383830101116200038857829060005b8381106200037357505060009188010152835194848601868110848211176200034e57855281600396878152019662302e3160e81b88528681518483012098208860e0526101009b818d524660a052875191858301907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9b8c83528a85015260608401524660808401523060a084015260a0835260c0830192808410888511176200034e57838a525190206080523060c052610120998a521562000364575061014098895280519384116200034e57600054926001938481811c9116801562000343575b828210146200032d57838111620002e2575b5080928511600114620002795750839450908392916000946200026d575b50501b9160001990851b1c1916176000555b8154336001600160a01b031982168117909355905194167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36121a89384620003b28539608051846116e1015260a051846117ad015260c051846116b2015260e05184611730015251836117560152518261170d01525181818161040b015281816105f001528181610ba901528181610d2d01526110c30152f35b015192503880620001bd565b9294849081166000805284600020946000905b88838310620002c75750505010620002ae575b505050811b01600055620001cf565b015160001983871b60f8161c191690553880806200029f565b8587015188559096019594850194879350908101906200028c565b60008052816000208480880160051c82019284891062000323575b0160051c019085905b828110620003165750506200019f565b6000815501859062000306565b92508192620002fd565b634e487b7160e01b600052602260045260246000fd5b90607f16906200018d565b634e487b7160e01b600052604160045260246000fd5b6341bc07ff60e11b8152600490fd5b8181018301518a8201840152849201620000a9565b600080fd5b601f909101601f19168101906001600160401b038211908210176200034e5760405256fe6080604052600436101561001257600080fd5b6000803560e01c80630eabf66014610ffb57806310d736d514610f9d57806312b11a1714610f4457806317d7de7c14610de35780633c04271514610bcd57806365c40b9c14610b5e578063715018a614610abf5780638da5cb5b14610a6d57806395411525146104ca578063a6d4dbc714610310578063b83010d3146102b7578063ed24911d14610276578063f2fde38b146101395763ffa1ad74146100b757600080fd5b3461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610136576101326040516100f481611573565b600381527f302e31000000000000000000000000000000000000000000000000000000000060208201526040519182916020835260208301906114c4565b0390f35b80fd5b50346101365760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760043573ffffffffffffffffffffffffffffffffffffffff8082168092036102715761019361161c565b81156101ed57600354827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b600080fd5b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760206102af61169b565b604051908152f35b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760206040517f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d8152f35b506101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365761034461161c565b60405161035081611528565b60043580825261035f36612024565b602083015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c3601126102715760405161039a816115a3565b60643560ff81168103610271578152608435602082015260a4356040820152604083015260c43573ffffffffffffffffffffffffffffffffffffffff90818116810361027157606084015260e43567ffffffffffffffff8116810361027157836104099160808796015261206a565b7f000000000000000000000000000000000000000000000000000000000000000016906040519061043982611573565b815261044436612024565b60208201908152823b156104c5576064849260209460405195869485937f4692626700000000000000000000000000000000000000000000000000000000855251600485015251805160248501520151604483015234905af180156104ba576104aa5750f35b6104b39061158f565b6101365780f35b6040513d84823e3d90fd5b505050fd5b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365767ffffffffffffffff600435818111610a6957610516903690600401611470565b61051e61161c565b61052781611ec7565b9061053560405192836115db565b8082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061056282611ec7565b01855b818110610a52575050845b81811061086957506040517f44adc90e0000000000000000000000000000000000000000000000000000000081526024810190602060048201528351809252604481016005926020604482861b85010196019189905b8282106107a4575050505086818073ffffffffffffffffffffffffffffffffffffffff96038134887f0000000000000000000000000000000000000000000000000000000000000000165af1958615610799578796610704575b5050508490855b818110610674578587604051918291602083016020845282518091526020604085019301915b81811061065b575050500390f35b825184528594506020938401939092019160010161064d565b61067f818387611ef9565b61068c6020820182611f68565b905060608992015b898284106106a85750505050600101610627565b819293966106b76040936119ae565b6106c1828d612010565b518352896001948594856020522091167fffffffffffffffffffffffff000000000000000000000000000000000000000082541617905501950190919091610694565b90919295503d8088843e61071881846115db565b82019160208184031261079157805191821161079157019181601f8401121561079557825192602061074985611ec7565b9461075760405196876115db565b808652818601931b82010192831161079157602001905b8282106107815750505092388080610620565b815181526020918201910161076e565b8780fd5b8680fd5b6040513d89823e3d90fd5b909192967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8582030182528a8851916020604082019380518352015192604060208301528351809152606091602083820193838c1b8301019501935b8281106108205750505050506020806001929901920192019092916105c6565b909192939460208061085c837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa087600196030189528951611944565b9701950193929101610800565b610874818386611ef9565b6108816020820182611f68565b9081158015610a3a575b610a10576080830135895b838110610939575050604051926108ac84611573565b3583526108b882611ec7565b916108c660405193846115db565b80835260051b8101602083013682116109355782905b82821061090c57505050506020820152600191906108fa8286612010565b526109058185612010565b5001610570565b81358b8111610931576020916109268392369088016117e8565b8152019101906108dc565b8c80fd5b8a80fd5b6109488160051b840184611911565b906109566040870187611fbc565b8293919310156109e35761096c606088016119ae565b908c851685036109df5773ffffffffffffffffffffffffffffffffffffffff6109d9926109c16001966109b0604051956109a587611528565b8d35875236906117e8565b6020860152369060608802016118d3565b60408401521660608201528c851660808201526119cf565b01610896565b8d80fd5b60248d7f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b60046040517f947d5a84000000000000000000000000000000000000000000000000000000008152fd5b50610a486040840184611fbc565b905082141561088b565b602090610a5d611edf565b82828701015201610565565b8280fd5b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013657602073ffffffffffffffffffffffffffffffffffffffff60035416604051908152f35b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013657610af661161c565b600073ffffffffffffffffffffffffffffffffffffffff6003547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b506020907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9082823601126101365760043567ffffffffffffffff808211610a695760e082600401948336030112610a6957610c2761161c565b60405193610c3485611528565b80359485815260248401928335908111610ddf5791610ca2610cbd9492610c64610ca795600436918a01016117e8565b8a820152610c7536604489016118d3565b6040820152610c9860c460a4890198610c8d8a611507565b6060850152016117d3565b60808201526119cf565b611911565b60405194610cb486611573565b855236906117e8565b92848101938452610d0e6040519485927ff17325e700000000000000000000000000000000000000000000000000000000845287600485015251602484015251604060448401526064830190611944565b0390848473ffffffffffffffffffffffffffffffffffffffff938134867f0000000000000000000000000000000000000000000000000000000000000000165af1938415610dd4578394610da3575b50610d696040916119ae565b92848152600186522091167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055604051908152f35b9093508481813d8311610dcd575b610dbb81836115db565b81010312610a69575192610d69610d5d565b503d610db1565b6040513d85823e3d90fd5b8580fd5b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610136576040519080805491600183811c92818516948515610f3a575b6020958686108114610f0d57858852879493929187908215610ecc575050600114610e73575b5050610e5f925003836115db565b6101326040519282849384528301906114c4565b908592508180527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b858310610eb4575050610e5f93508201013880610e51565b80548389018501528794508693909201918101610e9c565b91509350610e5f9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201013880610e51565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b93607f1693610e2b565b503461013657807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760206040517f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78152f35b50346101365760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365773ffffffffffffffffffffffffffffffffffffffff6040602092600435815260018452205416604051908152f35b5060207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101365760043567ffffffffffffffff811161146c57611046903690600401611470565b9061104f61161c565b61105882611ec7565b9161106660405193846115db565b8083527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061109382611ec7565b01845b81811061145557505090835b8281106112015750505073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610a69579082906040519283917f4cb7e9e5000000000000000000000000000000000000000000000000000000008352602483016020600485015281518091526044840190602060448260051b87010193019186905b82821061116a5750505050828091039134905af180156104ba5761115e575080f35b6111679061158f565b80f35b9295847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc929593969850030182528451602060608160408501938051865201519360408382015284518094520192019089905b8082106111df575050506020806001929601920192019287959387959361113c565b90919260206040600192828751805183520151838201520194019201906111bd565b61120f818484959794611ef9565b9160a083360312610136576040519361122785611528565b83358552602084013567ffffffffffffffff8111610a69578401601f9436868301121561141c57813561125981611ec7565b9261126760405194856115db565b81845260208085019260061b8201019036821161079557602001915b8183106114245750505060208701918252604081013567ffffffffffffffff81116114205781019536908701121561141c578535956112c187611ec7565b966112cf60405198896115db565b80885260206060818a0192028301019136831161079557602001905b828210611402575050506080611318918760408a015261130d60608201611507565b60608a0152016117d3565b60808701525193845180159182156113f6575b5050610a1057815b84518110156113b957806113b361134c60019388612010565b5188519061135e8460408c0151612010565b5173ffffffffffffffffffffffffffffffffffffffff60608c0151169067ffffffffffffffff60808d015116926040519461139886611528565b8552602085015260408401526060830152608082015261206a565b01611333565b50935160405191969360019392916113d083611573565b825260208201526113e18287612010565b526113ec8186612010565b50019190916110a2565b5114159050388061132b565b602060609161141136856118d3565b8152019101906112eb565b8380fd5b8480fd5b604083360312610795576020604091825161143e81611573565b853581528286013583820152815201920191611283565b602090611460611edf565b82828801015201611096565b5080fd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020808501948460051b01011161027157565b60005b8381106114b45750506000910152565b81810151838201526020016114a4565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093611500815180928187528780880191016114a1565b0116010190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361027157565b60a0810190811067ffffffffffffffff82111761154457604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761154457604052565b67ffffffffffffffff811161154457604052565b6060810190811067ffffffffffffffff82111761154457604052565b6080810190811067ffffffffffffffff82111761154457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761154457604052565b73ffffffffffffffffffffffffffffffffffffffff60035416330361163d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163014806117aa575b15611703577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176115445760405251902090565b507f000000000000000000000000000000000000000000000000000000000000000046146116da565b359067ffffffffffffffff8216820361027157565b919060c083820312610271576040519067ffffffffffffffff60c083018181118482101761154457604052829461181e81611507565b845260209261182e8483016117d3565b848601526040820135801515810361027157604086015260608201356060860152608082013583811161027157820181601f8201121561027157803593841161154457604051916118a6867fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f88011601846115db565b84835285858301011161027157848460a09695879660009401838601378301015260808501520135910152565b9190826060910312610271576040516118eb816115a3565b8092803560ff811681036102715760409182918452602081013560208501520135910152565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4181360301821215610271570190565b9073ffffffffffffffffffffffffffffffffffffffff825116815267ffffffffffffffff60208301511660208201526040820151151560408201526060820151606082015260a0806119a5608085015160c0608086015260c08501906114c4565b93015191015290565b3573ffffffffffffffffffffffffffffffffffffffff811681036102715790565b608081019067ffffffffffffffff808351168015159081611b43575b50611b19576020820151906040938484015193611a0785611dd7565b80519173ffffffffffffffffffffffffffffffffffffffff9485815116918560208301511691898101511515876080606084015193015160208151910120935116938b519560208701987f4120d3b28306666b714826ad7cb70744d9658ad3e6cd873411bedadcf55afda78a528d8801526060870152608086015260a085015260c084015260e0830152610100908183015281526101208101938185109085111761154457611ae395611ac6606094611adb9388978b52519020611d85565b9060ff81511689602083015192015192611ce9565b959095611b50565b015116911603611af05750565b600490517f8baa579f000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1ab7da6b000000000000000000000000000000000000000000000000000000008152fd5b90508142161015386119eb565b6005811015611cba5780611b615750565b60018103611bc75760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b60028103611c2d5760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b600314611c3657565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311611d795791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa15611d6c57815173ffffffffffffffffffffffffffffffffffffffff811615611d66579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b611d8d61169b565b906040519060208201927f190100000000000000000000000000000000000000000000000000000000000084526022830152604282015260428152611dd1816115bf565b51902090565b80519060406020820151910151604051917fff00000000000000000000000000000000000000000000000000000000000000602084019460f81b1684526021830152604182015260418152611e2b816115bf565b60ff6040516020818451611e408183896114a1565b810160028152030190205416611e9d57611e68916020916040519384928392519283916114a1565b8101600281520301902060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b60046040517fcce9a824000000000000000000000000000000000000000000000000000000008152fd5b67ffffffffffffffff81116115445760051b60200190565b60405190611eec82611573565b6060602083600081520152565b9190811015611f395760051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6181360301821215610271570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610271570180359067ffffffffffffffff821161027157602001918160051b3603831361027157565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe181360301821215610271570180359067ffffffffffffffff82116102715760200191606082023603831361027157565b8051821015611f395760209160051b010190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc6040910112610271576040519061205b82611573565b60243582526044356020830152565b608081019067ffffffffffffffff9081835116801515908161218e575b50611b19576020810151918251600052600160205273ffffffffffffffffffffffffffffffffffffffff9260409484866000205416801561216557330361213c5792611adb859493611ac6606094611ae398968a860151936120e885611dd7565b865192519151168b519160208301937f96bdbea8fa280f8a0d0835587e1fbb1470e81d05c44514158443340cea40a05d85528d8401528883015260808201526080815261213481611528565b519020611d85565b600486517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b600487517fc5723b51000000000000000000000000000000000000000000000000000000008152fd5b905082421610153861208756fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.PermissionedEIP712Proxy__factory=f},41772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionedEIP712Proxy__factory=void 0;var n=r(71871);Object.defineProperty(t,"PermissionedEIP712Proxy__factory",{enumerable:!0,get:function(){return n.PermissionedEIP712Proxy__factory}})},28457:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EIP712Proxy__factory=t.examples=void 0,t.examples=o(r(41772));var f=r(44726);Object.defineProperty(t,"EIP712Proxy__factory",{enumerable:!0,get:function(){return f.EIP712Proxy__factory}})},82494:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry__factory=t.ISchemaRegistry__factory=t.IEAS__factory=t.EAS__factory=t.resolver=t.eip712=void 0,t.eip712=o(r(37444)),t.resolver=o(r(68892));var f=r(19530);Object.defineProperty(t,"EAS__factory",{enumerable:!0,get:function(){return f.EAS__factory}});var a=r(81009);Object.defineProperty(t,"IEAS__factory",{enumerable:!0,get:function(){return a.IEAS__factory}});var s=r(41693);Object.defineProperty(t,"ISchemaRegistry__factory",{enumerable:!0,get:function(){return s.ISchemaRegistry__factory}});var c=r(19259);Object.defineProperty(t,"SchemaRegistry__factory",{enumerable:!0,get:function(){return c.SchemaRegistry__factory}})},99227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISchemaResolver__factory=void 0;const n=r(86623),i=[{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"}];t.ISchemaResolver__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},73464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaResolver__factory=void 0;const n=r(86623),i=[{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}];t.SchemaResolver__factory=class{static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}},99786:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"OutOfBounds",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"data",type:"bytes"},{internalType:"uint256",name:"start",type:"uint256"}],name:"toBytes32",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60a03461008957601f61088d38819003918201601f19168301916001600160401b0383118484101761008e5780849260209460405283398101031261008957516001600160a01b0381168082036100895715610077576080526040516107e890816100a5823960805181818161063401526107670152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001e575b361561001957600080fd5b6104a5565b60003560e01c806388e5b2d91461008e57806391db0b7e1461008957806399dd9bd714610084578063ce46e0461461007f578063e49617e11461007a578063e60c3505146100755763ffa1ad740361000e576103d6565b6103bb565b61039e565b610313565b61026b565b610156565b60206100ad61009c366100ed565b926100a892919261061d565b6105da565b6040519015158152f35b9181601f840112156100e85782359167ffffffffffffffff83116100e8576020808501948460051b0101116100e857565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126100e85767ffffffffffffffff916004358381116100e85782610138916004016100b7565b939093926024359182116100e857610152916004016100b7565b9091565b60206100ad610164366100ed565b9261017092919261061d565b610553565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff8211176101c057604052565b610175565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176101c057604052565b92919267ffffffffffffffff82116101c0576040519161024e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846101c5565b8294818452818301116100e8578281602093846000960137010152565b346100e85760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e85760043567ffffffffffffffff81116100e857366023820112156100e8576102cb903690602481600401359101610206565b60243590805160208301116102e95701602090810151604051908152f35b60046040517fb4120f14000000000000000000000000000000000000000000000000000000008152fd5b346100e85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e857602060405160008152f35b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126100e8576004359167ffffffffffffffff83116100e85782610140920301126100e85760040190565b6103a73661034d565b506103b061061d565b602060405160018152f35b60206100ad6103c93661034d565b6103d161061d565b6106aa565b346100e85760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e8576040805190610413826101a4565b6004825260207f302e323700000000000000000000000000000000000000000000000000000000818401528151928184928352815191828285015260005b83811061048f575050600083830185015250601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518782018701528694508201610451565b60046040517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919081101561050e5760051b0190565b6104cf565b919081101561050e5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156100e8570190565b909192349160009182935b8585106105715750505050505050600190565b61057c8583896104fe565b35908082116105b0576105936103d1878987610513565b156105a557906001910394019361055e565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b92600090345b8383106105f257505050505050600190565b6105fd8383876104fe565b358181116105b05760019161061385878a610513565b50039201916105e0565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361065c57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b908160209103126100e8575180151581036100e85790565b6040513d6000823e3d90fd5b610120810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156100e8570180359067ffffffffffffffff82116100e8576020019080360382136100e85761071661071161074e936020933691610206565b6107cb565b604051809381927fe30bb563000000000000000000000000000000000000000000000000000000008352600483019190602083019252565b038173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156107c65760009161079b575090565b6107bc915060203d81116107bf575b6107b481836101c5565b810190610686565b90565b503d6107aa565b61069e565b60208151106102e957602001519056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.AttestationResolver__factory=f},25432:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttesterResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"address",name:"targetAttester",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009e57601f61062738819003918201601f19168301916001600160401b038311848410176100a357808492604094855283398101031261009e5780516001600160a01b03918282169081830361009e5760200151928316830361009e571561008c5760805260a05260405161056d90816100ba8239608051816104c5015260a0518161053c0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610517565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b60e0013573ffffffffffffffffffffffffffffffffffffffff8082168092036102e9577f000000000000000000000000000000000000000000000000000000000000000016149056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.AttesterResolver__factory=f},1902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60a03461008257601f6106bc38819003918201601f19168301916001600160401b038311848410176100875780849260209460405283398101031261008257516001600160a01b03811680820361008257156100705760805260405161061e908161009e8239608051816104c50152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610568565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156102e9570180359067ffffffffffffffff82116102e9576020019181360383136102e957565b610120810190600161057a8383610517565b905014918261058857505090565b9091506105958183610517565b919091156103b8577fff0000000000000000000000000000000000000000000000000000000000000080923516159283156105d1575b50505090565b6105dc929350610517565b919091156103b8577f0100000000000000000000000000000000000000000000000000000000000000913516143880806105cb56fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.DataResolver__factory=f},61583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpirationTimeResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"uint256",name:"validAfter",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009457601f61061038819003918201601f19168301916001600160401b038311848410176100995780849260409485528339810103126100945780516001600160a01b03811691828203610094576020015191156100825760805260a05260405161056090816100b08239608051816104c5015260a0518161052f0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610517565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b6060013567ffffffffffffffff81168091036102e9577f000000000000000000000000000000000000000000000000000000000000000011159056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.ExpirationTimeResolver__factory=f},71545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PayingResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"uint256",name:"incentive",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"InvalidValue",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009b57601f6108ab38819003918201601f19168301916001600160401b038311848410176100a057808492604094855283398101031261009b5780516001600160a01b0381169182820361009b576020015191156100895760805260a0526040516107f490816100b782396080518161049a015260a05181818161053b015261058b0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe604060808152600436101561001d575b50361561001b57600080fd5b005b600090813560e01c806388e5b2d91461021357806391db0b7e146101f3578063ce46e046146101ba578063e49617e11461019c578063e60c3505146101755763ffa1ad741461006c575061000f565b3461017157817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017157805181810181811067ffffffffffffffff821117610144578252600481526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061012e57505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016100f2565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b5080fd5b602082610193610184366102d2565b61018c610483565b349061050d565b90519015158152f35b6020826101936101ab366102d2565b6101b3610483565b3490610589565b503461017157817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610171576020905160018152f35b60208261019361020236610269565b9261020e929192610483565b6103a2565b60208261019361022236610269565b9261022e929192610483565b61042d565b9181601f840112156102645782359167ffffffffffffffff8311610264576020808501948460051b01011161026457565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102645767ffffffffffffffff9160043583811161026457826102b491600401610233565b93909392602435918211610264576102ce91600401610233565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc90602082820112610264576004359167ffffffffffffffff83116102645782610140920301126102645760040190565b91908110156103335760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103335760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec181360301821215610264570190565b91926000918291345b8285106103be5750505050505050600190565b6103c9858389610323565b3590808211610403576103e6826103e188878b610362565b61050d565b156103f85790600191039401936103ab565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b91926000918291345b8285106104495750505050505050600190565b610454858389610323565b3590808211610403576104718261046c88878b610362565b610589565b156103f8579060019103940193610436565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104c257565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036102645790565b90610583576000808073ffffffffffffffffffffffffffffffffffffffff61053860e08396016104ec565b167f00000000000000000000000000000000000000000000000000000000000000009082821561057a575bf11561056e57600190565b6040513d6000823e3d90fd5b506108fc610563565b50600090565b7f0000000000000000000000000000000000000000000000000000000000000000908183106107df578183116105c2575b505050600190565b6105e360e073ffffffffffffffffffffffffffffffffffffffff92016104ec565b169082039182116107b0578147106107525760008080809481945af1903d1561074c5767ffffffffffffffff903d82811161071f57604051927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f8501160116840190848210908211176106f257604052825260203d92013e5b1561066e573880806105ba565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b50610661565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50505060009056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.PayingResolver__factory=f},89796:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecipientResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"address",name:"targetRecipient",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009e57601f61062738819003918201601f19168301916001600160401b038311848410176100a357808492604094855283398101031261009e5780516001600160a01b03918282169081830361009e5760200151928316830361009e571561008c5760805260a05260405161056d90816100ba8239608051816104c5015260a0518161053c0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461023657806391db0b7e14610216578063ce46e046146101d9578063e49617e1146101bd578063e60c3505146101985763ffa1ad74146100905750610011565b913461019457827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101945781519082820182811067ffffffffffffffff82111761016857835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015257505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610116565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b6020836101b46101a736610357565b6101af6104ae565b610517565b90519015158152f35b6020836101c936610357565b506101d26104ae565b5160018152f35b50903461021257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102125751908152602090f35b5080fd5b6020836101b4610225366102ee565b926102319291926104ae565b610427565b5091610241366102ee565b610250969392969491946104ae565b345b878510610263576020875160018152f35b61026e8583886103a8565b35908082116102905790600191610286878b886103e7565b5003940193610252565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e95782359167ffffffffffffffff83116102e9576020808501948460051b0101116102e957565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e95767ffffffffffffffff916004358381116102e95782610339916004016102b8565b939093926024359182116102e957610353916004016102b8565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e9576004359167ffffffffffffffff83116102e95782610140920301126102e95760040190565b91908110156103b85760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b85760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e9570190565b909192349160009182935b8585106104455750505050505050600190565b6104508583896103a8565b3590808211610484576104676101af8789876103e7565b15610479579060019103940193610432565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036104ed57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b60c0013573ffffffffffffffffffffffffffffffffffffffff8082168092036102e9577f000000000000000000000000000000000000000000000000000000000000000016149056fea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.RecipientResolver__factory=f},94381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RevocationResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"status",type:"bool"}],name:"setRevocation",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60a03461008257601f61064438819003918201601f19168301916001600160401b038311848410176100875780849260209460405283398101031261008257516001600160a01b0381168082036100825715610070576080526040516105a6908161009e8239608051816105470152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d91461030b57806391db0b7e14610289578063ce46e04614610250578063e49617e11461022d578063e60c350514610211578063f545cb66146101a35763ffa1ad741461009b5750610011565b913461019f57827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019f5781519082820182811067ffffffffffffffff82111761017357835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061015d57505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b8181018301518882018801528795508201610121565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b50823461020d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261020d573580151580910361020d5760ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00835416911617815580f35b5080fd5b60208361021d366103d3565b50610226610530565b5160018152f35b60208360ff8461023c366103d3565b50610245610530565b541690519015158152f35b50903461020d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261020d5751908152602090f35b50916102943661036a565b6102a396939296949194610530565b345b8785106102b6576020875160018152f35b6102c1858388610424565b35908082116102e357906001916102d9878b88610463565b50039401936102a5565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b60208361032b61031a3661036a565b92610326929192610530565b6104a3565b90519015158152f35b9181601f840112156103655782359167ffffffffffffffff8311610365576020808501948460051b01011161036557565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126103655767ffffffffffffffff9160043583811161036557826103b591600401610334565b93909392602435918211610365576103cf91600401610334565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc90602082820112610365576004359167ffffffffffffffff83116103655782610140920301126103655760040190565b91908110156104345760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156104345760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec181360301821215610365570190565b91929034600091829360ff84541615925b8286106104c8575050505050505050600190565b6104d386838a610424565b359080821161050657846104e888868b610463565b506104fa5790600191039501946104b4565b50505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361056f57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t){return super.deploy(e,t||{})}getDeployTransaction(e,t){return super.getDeployTransaction(e,t||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.RevocationResolver__factory=f},18353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"contract IERC20",name:"targetToken",type:"address"},{internalType:"uint256",name:"targetAmount",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60e0346100b357601f61096e38819003918201601f19168301916001600160401b038311848410176100b8578084926060946040528339810103126100b35780516001600160a01b03808216929091908382036100b357602081015192831683036100b3576040015192156100a15760805260a05260c05260405161089f90816100cf8239608051816104e9015260a051816105e3015260c0518161059b0152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610042575b361561001c57600080fd5b517f1574f9f3000000000000000000000000000000000000000000000000000000008152fd5b6000803560e01c806388e5b2d9146101a957806391db0b7e14610189578063ce46e0461461014c578063e49617e114610130578063e60c35051461010b5763ffa1ad74146100905750610011565b91903461010757827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101075761010392508051916100d18361031b565b82527f302e32370000000000000000000000000000000000000000000000000000000060208301525191829182610366565b0390f35b8280fd5b60208361012761011a366102ca565b6101226104d2565b61053b565b90519015158152f35b60208361013c366102ca565b506101456104d2565b5160018152f35b50903461018557817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101855751908152602090f35b5080fd5b60208361012761019836610261565b926101a49291926104d2565b61044b565b50916101b436610261565b6101c3969392969491946104d2565b345b8785106101d6576020875160018152f35b6101e18583886103cc565b359080821161020357906001916101f9878b8861040b565b50039401936101c5565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f8401121561025c5782359167ffffffffffffffff831161025c576020808501948460051b01011161025c57565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261025c5767ffffffffffffffff9160043583811161025c57826102ac9160040161022b565b9390939260243591821161025c576102c69160040161022b565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9060208282011261025c576004359167ffffffffffffffff831161025c57826101409203011261025c5760040190565b6040810190811067ffffffffffffffff82111761033757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60208082528251818301819052939260005b8581106103b8575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b818101830151848201604001528201610378565b91908110156103dc5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103dc5760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec18136030182121561025c570190565b909192349160009182935b8585106104695750505050505050600190565b6104748583896103cc565b35908082116104a85761048b61012287898761040b565b1561049d579060019103940193610456565b505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361051157565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fd5b60e001359073ffffffffffffffffffffffffffffffffffffffff9182811680910361025c5760405190602091828101917f23b872dd00000000000000000000000000000000000000000000000000000000835260248201523060448201527f000000000000000000000000000000000000000000000000000000000000000060648201526064815260a081019067ffffffffffffffff958183108784111761033757826040527f0000000000000000000000000000000000000000000000000000000000000000169061060d8361031b565b8483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656460c0820152600080948192519082855af13d156107be573d9187831161079157604051927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f81601f8401160116840198848a10908a1117610764576106a69596979860405283528286883d92013e6107ca565b8051806106b7575b50505050600190565b81849181010312610185578201519081159182150361076157506106dd578080806106ae565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b80fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6106a693949596506060915b9192901561084557508151156107de575090565b3b156107e75790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156108585750805190602001fd5b61088e906040519182917f08c379a000000000000000000000000000000000000000000000000000000000835260048301610366565b0390fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r,n){return super.deploy(e,t,r,n||{})}getDeployTransaction(e,t,r,n){return super.getDeployTransaction(e,t,r,n||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.TokenResolver__factory=f},2109:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueResolver__factory=void 0;const n=r(86623),i=[{inputs:[{internalType:"contract IEAS",name:"eas",type:"address"},{internalType:"uint256",name:"targetValue",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AccessDenied",type:"error"},{inputs:[],name:"InsufficientValue",type:"error"},{inputs:[],name:"InvalidEAS",type:"error"},{inputs:[],name:"NotPayable",type:"error"},{inputs:[],name:"VERSION",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"attest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"isPayable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiAttest",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation[]",name:"attestations",type:"tuple[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"multiRevoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes32",name:"uid",type:"bytes32"},{internalType:"bytes32",name:"schema",type:"bytes32"},{internalType:"uint64",name:"time",type:"uint64"},{internalType:"uint64",name:"expirationTime",type:"uint64"},{internalType:"uint64",name:"revocationTime",type:"uint64"},{internalType:"bytes32",name:"refUID",type:"bytes32"},{internalType:"address",name:"recipient",type:"address"},{internalType:"address",name:"attester",type:"address"},{internalType:"bool",name:"revocable",type:"bool"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct Attestation",name:"attestation",type:"tuple"}],name:"revoke",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],o="0x60c03461009b57601f6105fd38819003918201601f19168301916001600160401b038311848410176100a057808492604094855283398101031261009b5780516001600160a01b0381169182820361009b576020015191156100895760805260a05260405161054690816100b78239608051816104e7015260a05181818161018e01526104310152f35b6040516341bc07ff60e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610020575b5050361561001e57600080fd5b005b600091823560e01c806388e5b2d91461023657806391db0b7e1461020d578063ce46e046146101cf578063e49617e1146101b3578063e60c3505146101765763ffa1ad741461006f5750610011565b3461017257827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101725781519082820182811067ffffffffffffffff82111761014657835281526020907f302e3237000000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b84811061013057505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016100f4565b6024856041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8280fd5b60208361018236610356565b5061018b6104d0565b517f000000000000000000000000000000000000000000000000000000000000000034148152f35b6020836101bf36610356565b506101c86104d0565b5160018152f35b50503461020957817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610209576020905160018152f35b5080fd5b60208361022d61021c366102ed565b926102289291926104d0565b610426565b90519015158152f35b50610240366102ed565b61024f969392969491946104d0565b345b878510610262576020875160018152f35b61026d8583886103a7565b359080821161028f5790600191610285878b886103e6565b5003940193610251565b8388517f11011294000000000000000000000000000000000000000000000000000000008152fd5b9181601f840112156102e85782359167ffffffffffffffff83116102e8576020808501948460051b0101116102e857565b600080fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc8201126102e85767ffffffffffffffff916004358381116102e85782610338916004016102b7565b939093926024359182116102e857610352916004016102b7565b9091565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc906020828201126102e8576004359167ffffffffffffffff83116102e85782610140920301126102e85760040190565b91908110156103b75760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b91908110156103b75760051b810135907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1813603018212156102e8570190565b9192903460009182937f0000000000000000000000000000000000000000000000000000000000000000925b828610610466575050505050505050600190565b61047186838a6103a7565b35908082116104a65761048587858a6103e6565b5084820361049a579060019103950194610452565b50505050509250505090565b60046040517f11011294000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361050f57565b60046040517f4ca88867000000000000000000000000000000000000000000000000000000008152fdfea164736f6c6343000813000a";class f extends n.ContractFactory{constructor(...e){e.length>1?super(...e):super(i,o,e[0])}deploy(e,t,r){return super.deploy(e,t,r||{})}getDeployTransaction(e,t,r){return super.getDeployTransaction(e,t,r||{})}attach(e){return super.attach(e)}connect(e){return super.connect(e)}static bytecode=o;static abi=i;static createInterface(){return new n.utils.Interface(i)}static connect(e,t){return new n.Contract(e,i,t)}}t.ValueResolver__factory=f},64158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueResolver__factory=t.TokenResolver__factory=t.RevocationResolver__factory=t.RecipientResolver__factory=t.PayingResolver__factory=t.ExpirationTimeResolver__factory=t.DataResolver__factory=t.AttesterResolver__factory=t.AttestationResolver__factory=void 0;var n=r(99786);Object.defineProperty(t,"AttestationResolver__factory",{enumerable:!0,get:function(){return n.AttestationResolver__factory}});var i=r(25432);Object.defineProperty(t,"AttesterResolver__factory",{enumerable:!0,get:function(){return i.AttesterResolver__factory}});var o=r(1902);Object.defineProperty(t,"DataResolver__factory",{enumerable:!0,get:function(){return o.DataResolver__factory}});var f=r(61583);Object.defineProperty(t,"ExpirationTimeResolver__factory",{enumerable:!0,get:function(){return f.ExpirationTimeResolver__factory}});var a=r(71545);Object.defineProperty(t,"PayingResolver__factory",{enumerable:!0,get:function(){return a.PayingResolver__factory}});var s=r(89796);Object.defineProperty(t,"RecipientResolver__factory",{enumerable:!0,get:function(){return s.RecipientResolver__factory}});var c=r(94381);Object.defineProperty(t,"RevocationResolver__factory",{enumerable:!0,get:function(){return c.RevocationResolver__factory}});var l=r(18353);Object.defineProperty(t,"TokenResolver__factory",{enumerable:!0,get:function(){return l.TokenResolver__factory}});var u=r(2109);Object.defineProperty(t,"ValueResolver__factory",{enumerable:!0,get:function(){return u.ValueResolver__factory}})},68892:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaResolver__factory=t.ISchemaResolver__factory=t.examples=void 0,t.examples=o(r(64158));var f=r(99227);Object.defineProperty(t,"ISchemaResolver__factory",{enumerable:!0,get:function(){return f.ISchemaResolver__factory}});var a=r(73464);Object.defineProperty(t,"SchemaResolver__factory",{enumerable:!0,get:function(){return a.SchemaResolver__factory}})},15148:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.contracts=t.openzeppelin=void 0,t.openzeppelin=o(r(27349)),t.contracts=o(r(82494))},23788:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry__factory=t.SchemaResolver__factory=t.ISchemaResolver__factory=t.ValueResolver__factory=t.TokenResolver__factory=t.RevocationResolver__factory=t.RecipientResolver__factory=t.PayingResolver__factory=t.ExpirationTimeResolver__factory=t.DataResolver__factory=t.AttesterResolver__factory=t.AttestationResolver__factory=t.ISchemaRegistry__factory=t.IEAS__factory=t.PermissionedEIP712Proxy__factory=t.EIP712Proxy__factory=t.EIP712Verifier__factory=t.EAS__factory=t.IERC20__factory=t.IERC20Metadata__factory=t.IERC20Permit__factory=t.ERC20__factory=t.Ownable__factory=t.factories=void 0,t.factories=o(r(15148));var f=r(10536);Object.defineProperty(t,"Ownable__factory",{enumerable:!0,get:function(){return f.Ownable__factory}});var a=r(92657);Object.defineProperty(t,"ERC20__factory",{enumerable:!0,get:function(){return a.ERC20__factory}});var s=r(17547);Object.defineProperty(t,"IERC20Permit__factory",{enumerable:!0,get:function(){return s.IERC20Permit__factory}});var c=r(38518);Object.defineProperty(t,"IERC20Metadata__factory",{enumerable:!0,get:function(){return c.IERC20Metadata__factory}});var l=r(28045);Object.defineProperty(t,"IERC20__factory",{enumerable:!0,get:function(){return l.IERC20__factory}});var u=r(19530);Object.defineProperty(t,"EAS__factory",{enumerable:!0,get:function(){return u.EAS__factory}});var d=r(13041);Object.defineProperty(t,"EIP712Verifier__factory",{enumerable:!0,get:function(){return d.EIP712Verifier__factory}});var h=r(44726);Object.defineProperty(t,"EIP712Proxy__factory",{enumerable:!0,get:function(){return h.EIP712Proxy__factory}});var p=r(71871);Object.defineProperty(t,"PermissionedEIP712Proxy__factory",{enumerable:!0,get:function(){return p.PermissionedEIP712Proxy__factory}});var y=r(81009);Object.defineProperty(t,"IEAS__factory",{enumerable:!0,get:function(){return y.IEAS__factory}});var b=r(41693);Object.defineProperty(t,"ISchemaRegistry__factory",{enumerable:!0,get:function(){return b.ISchemaRegistry__factory}});var g=r(99786);Object.defineProperty(t,"AttestationResolver__factory",{enumerable:!0,get:function(){return g.AttestationResolver__factory}});var m=r(25432);Object.defineProperty(t,"AttesterResolver__factory",{enumerable:!0,get:function(){return m.AttesterResolver__factory}});var v=r(1902);Object.defineProperty(t,"DataResolver__factory",{enumerable:!0,get:function(){return v.DataResolver__factory}});var w=r(61583);Object.defineProperty(t,"ExpirationTimeResolver__factory",{enumerable:!0,get:function(){return w.ExpirationTimeResolver__factory}});var A=r(71545);Object.defineProperty(t,"PayingResolver__factory",{enumerable:!0,get:function(){return A.PayingResolver__factory}});var E=r(89796);Object.defineProperty(t,"RecipientResolver__factory",{enumerable:!0,get:function(){return E.RecipientResolver__factory}});var _=r(94381);Object.defineProperty(t,"RevocationResolver__factory",{enumerable:!0,get:function(){return _.RevocationResolver__factory}});var k=r(18353);Object.defineProperty(t,"TokenResolver__factory",{enumerable:!0,get:function(){return k.TokenResolver__factory}});var T=r(2109);Object.defineProperty(t,"ValueResolver__factory",{enumerable:!0,get:function(){return T.ValueResolver__factory}});var S=r(99227);Object.defineProperty(t,"ISchemaResolver__factory",{enumerable:!0,get:function(){return S.ISchemaResolver__factory}});var x=r(73464);Object.defineProperty(t,"SchemaResolver__factory",{enumerable:!0,get:function(){return x.SchemaResolver__factory}});var P=r(19259);Object.defineProperty(t,"SchemaRegistry__factory",{enumerable:!0,get:function(){return P.SchemaRegistry__factory}})},58601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EAS=void 0;const n=r(70655),i=r(7188),o=r(93580),f=r(20891),a=r(47340),s=r(23788),c=r(86623);n.__exportStar(r(93580),t);class l extends f.Base{proxy;delegated;offchain;constructor(e,t){const{signerOrProvider:r,proxy:n}=t||{};super(new s.EAS__factory,e,r),n&&(this.proxy=n)}connect(e){return delete this.delegated,delete this.offchain,super.connect(e),this}getVersion(){return this.contract.VERSION()}getAttestation(e){return this.contract.getAttestation(e)}isAttestationValid(e){return this.contract.isAttestationValid(e)}async isAttestationRevoked(e){const t=await this.contract.getAttestation(e);if(t.uid===a.ZERO_BYTES32)throw new Error("Invalid attestation");return!t.revocationTime.isZero()}getTimestamp(e){return this.contract.getTimestamp(e)}getRevocationOffchain(e,t){return this.contract.getRevokeOffchain(e,t)}getEIP712Proxy(){return this.proxy}getDelegated(){return this.delegated?this.delegated:this.setDelegated()}getOffchain(){return this.offchain?this.offchain:this.setOffchain()}async attest({schema:e,data:{recipient:t,data:r,expirationTime:n=o.NO_EXPIRATION,revocable:i=!0,refUID:s=a.ZERO_BYTES32,value:c=0}},l){const u=await this.contract.attest({schema:e,data:{recipient:t,expirationTime:n,revocable:i,refUID:s,data:r,value:c}},{value:c,...l});return new f.Transaction(u,(async e=>(await(0,a.getUIDsFromAttestEvents)(e.events))[0]))}async attestByDelegation({schema:e,data:{recipient:t,data:r,expirationTime:n=o.NO_EXPIRATION,revocable:i=!0,refUID:s=a.ZERO_BYTES32,value:c=0},attester:l,signature:u},d){const h=await this.contract.attestByDelegation({schema:e,data:{recipient:t,expirationTime:n,revocable:i,refUID:s,data:r,value:c},signature:u,attester:l},{value:c,...d});return new f.Transaction(h,(async e=>(await(0,a.getUIDsFromAttestEvents)(e.events))[0]))}async multiAttest(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({recipient:e.recipient,expirationTime:e.expirationTime??o.NO_EXPIRATION,revocable:e.revocable??!0,refUID:e.refUID??a.ZERO_BYTES32,data:e.data??a.ZERO_BYTES32,value:e.value??0})))}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiAttest(r,{value:n,...t});return new f.Transaction(i,(async e=>(0,a.getUIDsFromAttestEvents)(e.events)))}async multiAttestByDelegation(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({recipient:e.recipient,expirationTime:e.expirationTime??o.NO_EXPIRATION,revocable:e.revocable??!0,refUID:e.refUID??a.ZERO_BYTES32,data:e.data??a.ZERO_BYTES32,value:e.value??0}))),signatures:e.signatures,attester:e.attester}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiAttestByDelegation(r,{value:n,...t});return new f.Transaction(i,(async e=>(0,a.getUIDsFromAttestEvents)(e.events)))}async revoke({schema:e,data:{uid:t,value:r=0}},n){const i=await this.contract.revoke({schema:e,data:{uid:t,value:r}},{value:r,...n});return new f.Transaction(i,(async()=>{}))}async revokeByDelegation({schema:e,data:{uid:t,value:r=0},signature:n,revoker:i},o){const a=await this.contract.revokeByDelegation({schema:e,data:{uid:t,value:r},signature:n,revoker:i},{value:r,...o});return new f.Transaction(a,(async()=>{}))}async multiRevoke(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({uid:e.uid,value:e.value??0})))}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiRevoke(r,{value:n,...t});return new f.Transaction(i,(async()=>{}))}async multiRevokeByDelegation(e,t){const r=e.map((e=>({schema:e.schema,data:e.data.map((e=>({uid:e.uid,value:e.value??0}))),signatures:e.signatures,revoker:e.revoker}))),n=r.reduce(((e,{data:t})=>{const r=t.reduce(((e,t)=>e.add(t.value)),c.BigNumber.from(0));return e.add(r)}),c.BigNumber.from(0)),i=await this.contract.multiRevokeByDelegation(r,{value:n,...t});return new f.Transaction(i,(async()=>{}))}attestByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.attestByDelegationProxy(e,t)}multiAttestByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.multiAttestByDelegationProxy(e,t)}revokeByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.revokeByDelegationProxy(e,t)}multiRevokeByDelegationProxy(e,t){if(!this.proxy)throw new Error("Proxy wasn't set");return this.proxy.multiRevokeByDelegationProxy(e,t)}async timestamp(e,t){const r=await this.contract.timestamp(e,t??{});return new f.Transaction(r,(async e=>(await(0,a.getTimestampFromTimestampEvents)(e.events))[0]))}async multiTimestamp(e,t){const r=await this.contract.multiTimestamp(e,t??{});return new f.Transaction(r,(async e=>(0,a.getTimestampFromTimestampEvents)(e.events)))}async revokeOffchain(e,t){const r=await this.contract.revokeOffchain(e,t??{});return new f.Transaction(r,(async e=>(await(0,a.getTimestampFromOffchainRevocationEvents)(e.events))[0]))}async multiRevokeOffchain(e,t){const r=await this.contract.multiRevokeOffchain(e,t??{});return new f.Transaction(r,(async e=>(0,a.getTimestampFromOffchainRevocationEvents)(e.events)))}getDomainSeparator(){return this.contract.getDomainSeparator()}getNonce(e){return this.contract.getNonce(e)}getAttestTypeHash(){return this.contract.getAttestTypeHash()}getRevokeTypeHash(){return this.contract.getRevokeTypeHash()}async setDelegated(){return this.delegated=new i.Delegated({address:this.contract.address,version:await this.getVersion(),chainId:await this.getChainId()}),this.delegated}async setOffchain(){return this.offchain=new i.Offchain({address:this.contract.address,version:await this.getVersion(),chainId:await this.getChainId()}),this.offchain}}t.EAS=l},30986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(58601),t),n.__exportStar(r(7188),t),n.__exportStar(r(93580),t),n.__exportStar(r(14095),t),n.__exportStar(r(9336),t),n.__exportStar(r(47340),t)},39634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelegatedProxy=t.REVOKE_PROXY_TYPE=t.ATTEST_PROXY_TYPE=t.REVOKE_PROXY_PRIMARY_TYPE=t.ATTEST_PROXY_PRIMARY_TYPE=t.REVOKE_PROXY_TYPED_SIGNATURE=t.ATTEST_PROXY_TYPED_SIGNATURE=void 0;const n=r(76664);t.ATTEST_PROXY_TYPED_SIGNATURE="Attest(bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint64 deadline)",t.REVOKE_PROXY_TYPED_SIGNATURE="Revoke(bytes32 schema,bytes32 uid,uint64 deadline)",t.ATTEST_PROXY_PRIMARY_TYPE="Attest",t.REVOKE_PROXY_PRIMARY_TYPE="Revoke",t.ATTEST_PROXY_TYPE=[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"},{name:"deadline",type:"uint64"}],t.REVOKE_PROXY_TYPE=[{name:"schema",type:"bytes32"},{name:"uid",type:"bytes32"},{name:"deadline",type:"uint64"}];class i extends n.TypedDataHandler{constructor(e){super(e)}signDelegatedProxyAttestation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.ATTEST_PROXY_PRIMARY_TYPE,message:e,types:{Attest:t.ATTEST_PROXY_TYPE}},r)}verifyDelegatedProxyAttestationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}signDelegatedProxyRevocation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.REVOKE_PROXY_PRIMARY_TYPE,message:e,types:{Revoke:t.REVOKE_PROXY_TYPE}},r)}verifyDelegatedProxyRevocationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}}t.DelegatedProxy=i},78161:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delegated=t.REVOKE_TYPE=t.ATTEST_TYPE=t.REVOKE_PRIMARY_TYPE=t.ATTEST_PRIMARY_TYPE=t.REVOKE_TYPED_SIGNATURE=t.ATTEST_TYPED_SIGNATURE=t.EIP712_NAME=void 0;const n=r(76664);t.EIP712_NAME="EAS",t.ATTEST_TYPED_SIGNATURE="Attest(bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes data,uint256 nonce)",t.REVOKE_TYPED_SIGNATURE="Revoke(bytes32 schema,bytes32 uid,uint256 nonce)",t.ATTEST_PRIMARY_TYPE="Attest",t.REVOKE_PRIMARY_TYPE="Revoke",t.ATTEST_TYPE=[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"},{name:"nonce",type:"uint256"}],t.REVOKE_TYPE=[{name:"schema",type:"bytes32"},{name:"uid",type:"bytes32"},{name:"nonce",type:"uint256"}];class i extends n.TypedDataHandler{constructor(e){super({...e,name:t.EIP712_NAME})}signDelegatedAttestation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.ATTEST_PRIMARY_TYPE,message:e,types:{Attest:t.ATTEST_TYPE}},r)}verifyDelegatedAttestationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}signDelegatedRevocation(e,r){return this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.REVOKE_PRIMARY_TYPE,message:e,types:{Revoke:t.REVOKE_TYPE}},r)}verifyDelegatedRevocationSignature(e,t){return this.verifyTypedDataRequestSignature(e,t)}}t.Delegated=i},7188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(70655);n.__exportStar(r(78161),t),n.__exportStar(r(39634),t),n.__exportStar(r(85214),t)},85214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Offchain=t.DOMAIN_NAME=t.ATTESTATION_TYPE=t.ATTESTATION_PRIMARY_TYPE=void 0;const n=r(47340),i=r(78161),o=r(76664),f=r(86623),{keccak256:a,toUtf8Bytes:s,defaultAbiCoder:c}=f.utils;t.ATTESTATION_PRIMARY_TYPE="Attestation",t.ATTESTATION_TYPE=[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"time",type:"uint64"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"}],t.DOMAIN_NAME="EAS Attestation";class l extends o.TypedDataHandler{constructor(e){super({...e,name:i.EIP712_NAME})}getDomainSeparator(){return a(c.encode(["bytes32","bytes32","uint256","address"],[a(s(t.DOMAIN_NAME)),a(s(this.config.version)),this.config.chainId,this.config.address]))}getDomainTypedData(){return{name:t.DOMAIN_NAME,version:this.config.version,chainId:this.config.chainId,verifyingContract:this.config.address}}async signOffchainAttestation(e,r){const n=l.getOffchainUID(e);return{...await this.signTypedDataRequest(e,{domain:this.getDomainTypedData(),primaryType:t.ATTESTATION_PRIMARY_TYPE,message:e,types:{Attest:t.ATTESTATION_TYPE}},r),uid:n}}verifyOffchainAttestationSignature(e,t){return t.uid===l.getOffchainUID(t.message)&&this.verifyTypedDataRequestSignature(e,t)}static getOffchainUID(e){return(0,n.getOffchainUID)(e.schema,e.recipient,e.time,e.expirationTime,e.revocable,e.refUID,e.data)}}t.Offchain=l},76664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypedDataHandler=t.EIP712_DOMAIN=void 0;const n=r(47340),i=r(86623),{getAddress:o,verifyTypedData:f,hexlify:a,joinSignature:s,splitSignature:c,keccak256:l,toUtf8Bytes:u,defaultAbiCoder:d}=i.utils;t.EIP712_DOMAIN="EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)";t.TypedDataHandler=class{config;constructor(e){this.config=e}getDomainSeparator(){return l(d.encode(["bytes32","bytes32","bytes32","uint256","address"],[l(u(t.EIP712_DOMAIN)),l(u(this.config.name)),l(u(this.config.version)),this.config.chainId,this.config.address]))}getDomainTypedData(){return{name:this.config.name,version:this.config.version,chainId:this.config.chainId,verifyingContract:this.config.address}}async signTypedDataRequest(e,t,r){const n=await r._signTypedData(t.domain,t.types,e),i=c(n);return{...t,signature:{v:i.v,r:i.r,s:i.s}}}verifyTypedDataRequestSignature(e,t){if(e===n.ZERO_ADDRESS)throw new Error("Invalid address");const{signature:r}=t,i=s({v:r.v,r:a(r.r),s:a(r.s)}),c=f(t.domain,t.types,t.message,i);return o(e)===o(c)}}},93580:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NO_EXPIRATION=void 0,t.NO_EXPIRATION=0},14095:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaEncoder=void 0;const i=r(47340),o=r(86623),f=r(63039),{FunctionFragment:a,defaultAbiCoder:s,isBytesLike:c,formatBytes32String:l}=o.utils;class u{schema;constructor(e){this.schema=[];const t=e.replace(/ipfsHash/g,"bytes32"),r=a.from(`func(${t})`);s.getDefaultValue(r.inputs);for(const e of r.inputs){const{name:t,components:r}=e;let{type:n}=e,i=t?`${n} ${t}`:n;const o=t?` ${t}`:"";let f=n;const a=`(${(r||[]).map((e=>e.type)).join(",")})`,s=`(${(r||[]).map((e=>e.name?`${e.type} ${e.name}`:e.type)).join(",")})`;"tuple"===n?(n=a,i=`${s}${o}`):"tuple[]"===n?(n=`${a}[]`,i=`${s}[]${o}`):n.includes("[]")&&(f=f.replace("[]",""));const c=u.getDefaultValueForTypeName(f);this.schema.push({name:t,type:n,signature:i,value:n.includes("[]")?[]:c})}}encodeData(e){if(e.length!==this.schema.length)throw new Error("Invalid number or values");const t=[];for(const[r,n]of this.schema.entries()){const{type:i,name:o,value:f}=e[r],a=i.replace(/\s/g,"");if(a!==n.type&&a!==n.signature&&("ipfsHash"!==a||"bytes32"!==n.type))throw new Error(`Incompatible param type: ${a}`);if(o!==n.name)throw new Error(`Incompatible param name: ${o}`);t.push("bytes32"===n.type&&"ipfsHash"===n.name?u.decodeIpfsValue(f):"bytes32"!==n.type||"string"!=typeof f||c(f)?f:l(f))}return s.encode(this.signatures(),t)}decodeData(e){const t=s.decode(this.signatures(),e);return this.schema.map(((e,r)=>{const n=a.from(`func(${e.signature})`);if(1!==n.inputs.length)throw new Error(`Unexpected inputs: ${n.inputs}`);let i=t[r];const o=n.inputs[0],{components:f}=o;if(i.length>0&&f)if(Array.isArray(i[0])){const t=[];for(const e of i){const r=[],n=e.filter((e=>"object"!=typeof e));for(const[e,t]of n.entries()){const n=f[e];r.push({name:n.name,type:n.type,value:t})}t.push(r)}i={name:e.name,type:e.type,value:t}}else{const t=[],r=i.filter((e=>"object"!=typeof e));for(const[e,n]of r.entries()){const r=f[e];t.push({name:r.name,type:r.type,value:n})}i={name:e.name,type:e.type,value:t}}else i={name:e.name,type:e.type,value:i};return{name:e.name,type:e.type,signature:e.signature,value:i}}))}isEncodedDataValid(e){try{return this.decodeData(e),!0}catch(e){return!1}}static isCID(e){try{return f.CID.parse(e),!0}catch{return!1}}static encodeQmHash(e){const t=f.CID.parse(e);return s.encode(["bytes32"],[t.multihash.digest])}static decodeQmHash(e){const t=Uint8Array.from(n.from(e.slice(2),"hex")),r={digest:t,code:18,size:32,bytes:Uint8Array.from([18,32,...t])};return f.CID.createV0(r).toString()}static getDefaultValueForTypeName(e){return"bool"!==e&&(e.includes("uint")?"0":"address"===e?i.ZERO_ADDRESS:"")}static decodeIpfsValue(e){if(c(e))return u.encodeBytes32Value(e);try{const t=f.CID.parse(e);return s.encode(["bytes32"],[t.multihash.digest])}catch{return u.encodeBytes32Value(e)}}static encodeBytes32Value(e){try{return s.encode(["bytes32"],[e]),e}catch(t){return l(e)}}signatures(){return this.schema.map((e=>e.signature))}}t.SchemaEncoder=u},9336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaRegistry=void 0;const n=r(20891),i=r(47340),o=r(23788);class f extends n.Base{constructor(e,t){const{signerOrProvider:r}=t||{};super(new o.SchemaRegistry__factory,e,r)}getVersion(){return this.contract.VERSION()}async register({schema:e,resolverAddress:t=i.ZERO_ADDRESS,revocable:r=!0}){const o=await this.contract.register(e,t,r);return new n.Transaction(o,(async n=>(0,i.getSchemaUID)(e,t,r)))}async getSchema({uid:e}){const t=await this.contract.getSchema(e);if(t.uid===i.ZERO_BYTES32)throw new Error("Schema not found");return t}}t.SchemaRegistry=f},20891:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Base=t.Transaction=void 0;t.Transaction=class{tx;waitCallback;constructor(e,t){this.tx=e,this.waitCallback=t}async wait(e){const t=await this.tx.wait(e);return this.waitCallback(t)}};t.Base=class{contract;constructor(e,t,r){this.contract=e.attach(t),r&&this.connect(r)}connect(e){return this.contract=this.contract.connect(e),this}async getChainId(){return(await this.contract.provider.getNetwork()).chainId}}},47340:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimestampFromOffchainRevocationEvents=t.getTimestampFromTimestampEvents=t.getUIDsFromAttestEvents=t.getUIDFromDelegatedProxyAttestReceipt=t.getUIDFromDelegatedProxyAttestTx=t.getUIDFromMultiDelegatedProxyAttestReceipt=t.getUIDFromMultiDelegatedProxyAttestTx=t.getUIDFromAttestTx=t.getUIDsFromMultiAttestTx=t.getOffchainUID=t.getUID=t.getSchemaUID=t.ZERO_BYTES32=t.ZERO_BYTES=t.ZERO_ADDRESS=void 0;const n=r(23788),i=r(83893),o=r(86623),{solidityKeccak256:f,hexlify:a,toUtf8Bytes:s}=o.utils,{AddressZero:c}=o.constants;t.ZERO_ADDRESS=c,t.ZERO_BYTES="0x",t.ZERO_BYTES32="0x0000000000000000000000000000000000000000000000000000000000000000";t.getSchemaUID=(e,t,r)=>f(["string","address","bool"],[e,t,r]);t.getUID=(e,t,r,n,i,o,c,l,u)=>f(["bytes","address","address","uint64","uint64","bool","bytes32","bytes","uint32"],[a(s(e)),t,r,n,i,o,c,l,u]);t.getOffchainUID=(e,r,n,i,o,c,l)=>f(["bytes","address","address","uint64","uint64","bool","bytes32","bytes","uint32"],[a(s(e)),r,t.ZERO_ADDRESS,n,i,o,c,l,0]);t.getUIDsFromMultiAttestTx=async e=>{const r=await(await e).wait();return(0,t.getUIDsFromAttestEvents)(r.events)};t.getUIDFromAttestTx=async e=>(await(0,t.getUIDsFromMultiAttestTx)(e))[0];t.getUIDFromMultiDelegatedProxyAttestTx=async e=>(0,t.getUIDFromMultiDelegatedProxyAttestReceipt)((await e).wait());t.getUIDFromMultiDelegatedProxyAttestReceipt=async e=>{const r=await e,o=new i.Interface(n.EAS__factory.abi),f=[];for(const e of r.events||[])f.push({event:"Attested",args:await o.decodeEventLog("Attested",e.data,e.topics)});return(0,t.getUIDsFromAttestEvents)(f)};t.getUIDFromDelegatedProxyAttestTx=async e=>(await(0,t.getUIDFromMultiDelegatedProxyAttestTx)(e))[0];t.getUIDFromDelegatedProxyAttestReceipt=async e=>(await(0,t.getUIDFromMultiDelegatedProxyAttestReceipt)(e))[0];t.getUIDsFromAttestEvents=e=>{if(!e)return[];const t=e.filter((e=>"Attested"===e.event));if(0===t.length)throw new Error("Unable to process attestation events");return t.map((e=>e.args?.uid))};t.getTimestampFromTimestampEvents=e=>{if(!e)return[];const t=e.filter((e=>"Timestamped"===e.event));if(0===t.length)throw new Error("Unable to process attestation events");return t.map((e=>e.args?.timestamp))};t.getTimestampFromOffchainRevocationEvents=e=>{if(!e)return[];const t=e.filter((e=>"RevokedOffchain"===e.event));if(0===t.length)throw new Error("Unable to process offchain revocation events");return t.map((e=>e.args?.timestamp))}},95851:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="abi/5.7.0"},72734:(e,t,r)=>{"use strict";r.d(t,{R:()=>M,$:()=>C});var n=r(93286),i=r(53587),o=r(80711),f=r(95851),a=r(61184),s=r(64594);class c extends a.XI{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,s.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,s.getAddress)((0,n.hexZeroPad)(e.readValue().toHexString(),20))}}class l extends a.XI{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const u=new o.Logger(f.i);function d(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||u.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&u.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else u.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&u.throwArgumentError("types/value length mismatch","tuple",r);let i=new a.QV(e.wordSize),f=new a.QV(e.wordSize),s=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=f.length;e.encode(f,r);let n=i.writeUpdatableValue();s.push((e=>{n(e+t)}))}else e.encode(i,r)})),s.forEach((e=>{e(i.length)}));let c=e.appendWriter(i);return c+=e.appendWriter(f),c}function h(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),f=n.subReader(r.toNumber());try{i=t.decode(f)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let e=0;e{throw t}})}return Object.freeze(r)}class p extends a.XI{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&u.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return d(e,this.coders,t)}decode(e){return e.coerce(this.name,h(e,this.coders))}}var S=r(11388);const x=new o.Logger(f.i),P=new RegExp(/^bytes([0-9]*)$/),I=new RegExp(/^(u?int)([0-9]*)$/);class M{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new c(e.name);case"bool":return new y(e.name);case"string":return new k(e.name);case"bytes":return new g(e.name);case"array":return new p(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new T((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new v(e.name)}let t=e.type.match(I);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&x.throwArgumentError("invalid "+t[1]+" bit length","param",e),new E(r/8,"int"===t[1],e.name)}if(t=e.type.match(P),t){let r=parseInt(t[1]);return(0===r||r>32)&&x.throwArgumentError("invalid bytes length","param",e),new m(r,e.name)}return x.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new a.Ej(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new a.QV(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(S._R.from(e))));return new T(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&x.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(S._R.from(e)))),n=new T(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const i=e.map((e=>this._getCoder(S._R.from(e))));return new T(i,"_").decode(this._getReader((0,n.arrayify)(t),r))}}const C=new M},61184:(e,t,r)=>{"use strict";r.d(t,{BR:()=>c,Ej:()=>d,QV:()=>u,XI:()=>l});var n=r(93286),i=r(2593),o=r(53587),f=r(80711),a=r(95851);const s=new f.Logger(a.i);function c(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class l{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){s.throwArgumentError(e,this.localName,t)}}class u{constructor(e){(0,o.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.concat)(e._data))}writeBytes(e){let t=(0,n.arrayify)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.arrayify)(i.O$.from(e));return t.length>this.wordSize&&s.throwError("value out-of-bounds",f.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.concat)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class d{constructor(e,t,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(e)),(0,o.defineReadOnly)(this,"wordSize",t||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):d.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:s.throwError("data out-of-bounds",f.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new d(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},11388:(e,t,r)=>{"use strict";r.d(t,{HY:()=>g,IC:()=>T,QV:()=>m,Xg:()=>E,YW:()=>_,_R:()=>y,pc:()=>h});var n=r(2593),i=r(53587),o=r(80711),f=r(95851);const a=new o.Logger(f.i),s={};let c={calldata:!0,memory:!0,storage:!0},l={calldata:!0,memory:!0};function u(e,t){if("bytes"===e||"string"===e){if(c[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&l[t])return!0;return(c[t]||"payable"===t)&&a.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class y{constructor(e,t){e!==s&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(p);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:y.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?y.fromString(e,t):y.fromObject(e)}static fromObject(e){return y.isParamType(e)?e:new y(s,{name:e.name||null,type:S(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(y.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){a.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},f=o;for(let r=0;ry.fromString(e,t)))}class g{constructor(e,t){e!==s&&a.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return g.isFragment(e)?e:"string"==typeof e?g.fromString(e):g.fromObject(e)}static fromObject(e){if(g.isFragment(e))return e;switch(e.type){case"function":return _.fromObject(e);case"event":return m.fromObject(e);case"constructor":return E.fromObject(e);case"error":return T.fromObject(e);case"fallback":case"receive":return null}return a.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?m.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?_.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?E.fromString(e.trim()):"error"===e.split(" ")[0]?T.fromString(e.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class m extends g{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?m.fromString(e):m.fromObject(e)}static fromObject(e){if(m.isEventFragment(e))return e;"event"!==e.type&&a.throwArgumentError("invalid event object","value",e);const t={name:P(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(y.fromObject):[],type:"event"};return new m(s,t)}static fromString(e){let t=e.match(I);t||a.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:a.warn("unknown modifier: "+e)}})),m.fromObject({name:t[1].trim(),anonymous:r,inputs:b(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function v(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&a.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||a.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.O$.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function A(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&a.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&a.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||a.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&a.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&a.throwArgumentError("unable to determine stateMutability","value",e),t}class E extends g{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===h.sighash&&a.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?E.fromString(e):E.fromObject(e)}static fromObject(e){if(E.isConstructorFragment(e))return e;"constructor"!==e.type&&a.throwArgumentError("invalid constructor object","value",e);let t=A(e);t.constant&&a.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new E(s,r)}static fromString(e){let t={type:"constructor"},r=(e=v(e,t)).match(I);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",e),t.inputs=b(r[2].trim(),!1),w(r[3].trim(),t),E.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class _ extends E{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isFunctionFragment(e))return e;"function"!==e.type&&a.throwArgumentError("invalid function object","value",e);let t=A(e);const r={type:e.type,name:P(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(y.fromObject):[],outputs:e.outputs?e.outputs.map(y.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new _(s,r)}static fromString(e){let t={type:"function"},r=(e=v(e,t)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",e);let n=r[0].match(I);if(n||a.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&P(t.name),t.inputs=b(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(I);""==n[1].trim()&&""==n[3].trim()||a.throwArgumentError("unexpected tokens","value",e),t.outputs=b(n[2],!1)}else t.outputs=[];return _.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function k(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||a.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class T extends g{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?T.fromString(e):T.fromObject(e)}static fromObject(e){if(T.isErrorFragment(e))return e;"error"!==e.type&&a.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:P(e.name),inputs:e.inputs?e.inputs.map(y.fromObject):[]};return k(new T(s,t))}static fromString(e){let t={type:"error"},r=e.match(I);return r||a.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&P(t.name),t.inputs=b(r[2],!1),k(T.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function S(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const x=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function P(e){return e&&e.match(x)||a.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const I=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},83893:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>i.R,ConstructorFragment:()=>n.Xg,ErrorFragment:()=>n.IC,EventFragment:()=>n.QV,FormatTypes:()=>n.pc,Fragment:()=>n.HY,FunctionFragment:()=>n.YW,Indexed:()=>o.Hk,Interface:()=>o.vU,LogDescription:()=>o.CC,ParamType:()=>n._R,TransactionDescription:()=>o.vk,checkResultErrors:()=>f.BR,defaultAbiCoder:()=>i.$});var n=r(11388),i=r(72734),o=r(8198),f=r(61184)},8198:(e,t,r)=>{"use strict";r.d(t,{CC:()=>p,Hk:()=>g,vU:()=>w,vk:()=>y});var n=r(64594),i=r(2593),o=r(93286),f=r(32046),a=r(38197),s=r(53587),c=r(72734),l=r(11388),u=r(80711),d=r(95851);const h=new u.Logger(d.i);class p extends s.Description{}class y extends s.Description{}class b extends s.Description{}class g extends s.Description{static isIndexed(e){return!(!e||!e._isIndexed)}}const m={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function v(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class w{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,s.defineReadOnly)(this,"fragments",t.map((e=>l.HY.from(e))).filter((e=>null!=e))),(0,s.defineReadOnly)(this,"_abiCoder",(0,s.getStatic)(new.target,"getAbiCoder")()),(0,s.defineReadOnly)(this,"functions",{}),(0,s.defineReadOnly)(this,"errors",{}),(0,s.defineReadOnly)(this,"events",{}),(0,s.defineReadOnly)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void h.warn("duplicate definition - constructor"):void(0,s.defineReadOnly)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?h.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,s.defineReadOnly)(this,"deploy",l.Xg.from({payable:!1,type:"constructor"})),(0,s.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=l.pc.full),e===l.pc.sighash&&h.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===l.pc.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return c.$}static getAddress(e){return(0,n.getAddress)(e)}static getSighash(e){return(0,o.hexDataSlice)((0,f.id)(e.format()),0,4)}static getEventTopic(e){return(0,f.id)(e.format())}getFunction(e){if((0,o.isHexString)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];h.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching function","name",t):r.length>1&&h.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[l.YW.fromString(e).format()];return t||h.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];h.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching event","name",t):r.length>1&&h.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[l.QV.fromString(e).format()];return t||h.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.isHexString)(e)){const t=(0,s.getStatic)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r]}h.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching error","name",t):r.length>1&&h.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[l.YW.fromString(e).format()];return t||h.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,s.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,s.getStatic)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,o.arrayify)(t),n=null,i="",f=null,a=null,s=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=(0,o.hexlify)(r.slice(0,4)),t=m[e];if(t)f=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.signature,t.reason&&(n=f[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(f[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${f[0]}`);else try{const t=this.getError(e);f=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,s=t.format()}catch(e){}break}}return h.throwError("call revert exception"+i,u.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.hexlify)(t),errorArgs:f,errorName:a,errorSignature:s,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&h.throwError("too many arguments for "+e.format(),u.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,f.id)(t):"bytes"===e.type?(0,a.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.hexZeroPad)((0,o.hexlify)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?h.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&h.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&h.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const s=t[o];if(e.indexed)if("string"===e.type)r.push((0,f.id)(s));else if("bytes"===e.type)r.push((0,a.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[s]))}else n.push(e),i.push(s)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t||h.throwError("fragment/topic mismatch",u.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],f=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(l._R.fromObject({type:"bytes32",name:e.name})),f.push(!0)):(n.push(e),f.push(!1)):(i.push(e),f.push(!1))}));let a=null!=r?this._abiCoder.decode(n,(0,o.concat)(r)):null,s=this._abiCoder.decode(i,t,!0),c=[],d=0,p=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)c[t]=new g({_isIndexed:!0,hash:null});else if(f[t])c[t]=new g({_isIndexed:!0,hash:a[p++]});else try{c[t]=a[p++]}catch(e){c[t]=e}else try{c[t]=s[d++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){const r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw v(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}}));for(let e=0;e{throw v(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new y({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new p({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,o.hexlify)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new b({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},64353:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>s,zt:()=>c});var n=r(2593),i=r(53587),o=r(80711);var f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const a=new o.Logger("abstract-provider/5.7.0");class s extends i.Description{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class c{constructor(){a.checkAbstract(new.target,c),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return f(this,void 0,void 0,(function*(){const{block:e,gasPrice:t}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,f=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,f=n.O$.from("1500000000"),o=e.baseFeePerGas.mul(2).add(f)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:f,gasPrice:t}}))}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},48171:(e,t,r)=>{"use strict";r.d(t,{E:()=>c,b:()=>l});var n=r(53587),i=r(80711);var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const f=new i.Logger("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],s=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){f.checkAbstract(new.target,c),(0,n.defineReadOnly)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===a.indexOf(t)&&f.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=(0,n.shallowCopy)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&f.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.resolveProperties)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&f.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||f.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):f.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&f.throwError("network does not support EIP-1559",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):f.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(s.indexOf(e.code)>=0)throw e;return f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&f.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.resolveProperties)(t)}))}_checkProvider(e){this.provider||f.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class l extends c{constructor(e,t){super(),(0,n.defineReadOnly)(this,"address",e),(0,n.defineReadOnly)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{f.throwError(e,i.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new l(this.address,e)}}},64594:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAddress:()=>h,getContractAddress:()=>b,getCreate2Address:()=>g,getIcapAddress:()=>y,isAddress:()=>p});var n=r(93286),i=r(2593),o=r(38197),f=r(61843);const a=new(r(80711).Logger)("address/5.7.0");function s(e){(0,n.isHexString)(e,20)||a.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const i=(0,n.arrayify)((0,o.keccak256)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);const l=Math.floor((u=9007199254740991,Math.log10?Math.log10(u):Math.log(u)/Math.LN10));var u;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=l;){let e=t.substring(0,l);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function h(e){let t=null;if("string"!=typeof e&&a.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=s(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&a.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==d(e)&&a.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=s("0x"+t)}else a.throwArgumentError("invalid address","address",e);return t}function p(e){try{return h(e),!0}catch(e){}return!1}function y(e){let t=(0,i.t2)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function b(e){let t=null;try{t=h(e.from)}catch(t){a.throwArgumentError("missing from address","transaction",e)}const r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(e.nonce).toHexString()));return h((0,n.hexDataSlice)((0,o.keccak256)((0,f.encode)([t,r])),12))}function g(e,t,r){return 32!==(0,n.hexDataLength)(t)&&a.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),h((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",h(e),t,r])),12))}},59567:(e,t,r)=>{"use strict";r.d(t,{J:()=>i,c:()=>o});var n=r(93286);function i(e){e=atob(e);const t=[];for(let r=0;r{"use strict";r.r(t),r.d(t,{decode:()=>n.J,encode:()=>n.c});var n=r(59567)},57727:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Base32:()=>f,Base58:()=>a,BaseX:()=>o});var n=r(93286),i=r(53587);class o{constructor(e){(0,i.defineReadOnly)(this,"alphabet",e),(0,i.defineReadOnly)(this,"base",e.length),(0,i.defineReadOnly)(this,"_alphabetMap",{}),(0,i.defineReadOnly)(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(n%this.base),n=n/this.base|0}let i="";for(let e=0;0===t[e]&&e=0;--e)i+=this.alphabet[r[e]];return i}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r{"use strict";r.d(t,{i:()=>n});const n="bignumber/5.7.0"},2593:(e,t,r)=>{"use strict";r.d(t,{O$:()=>p,Zm:()=>d,g$:()=>v,t2:()=>w});var n=r(13550),i=r.n(n),o=r(93286),f=r(80711),a=r(48794),s=i().BN;const c=new f.Logger(a.i),l={},u=9007199254740991;function d(e){return null!=e&&(p.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||"bigint"==typeof e||(0,o.isBytes)(e))}let h=!1;class p{constructor(e,t){e!==l&&c.throwError("cannot call constructor directly; use BigNumber.from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return b(g(this).fromTwos(e))}toTwos(e){return b(g(this).toTwos(e))}abs(){return"-"===this._hex[0]?p.from(this._hex.substring(1)):this}add(e){return b(g(this).add(g(e)))}sub(e){return b(g(this).sub(g(e)))}div(e){return p.from(e).isZero()&&m("division-by-zero","div"),b(g(this).div(g(e)))}mul(e){return b(g(this).mul(g(e)))}mod(e){const t=g(e);return t.isNeg()&&m("division-by-zero","mod"),b(g(this).umod(t))}pow(e){const t=g(e);return t.isNeg()&&m("negative-power","pow"),b(g(this).pow(t))}and(e){const t=g(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","and"),b(g(this).and(t))}or(e){const t=g(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","or"),b(g(this).or(t))}xor(e){const t=g(e);return(this.isNegative()||t.isNeg())&&m("unbound-bitwise-result","xor"),b(g(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&m("negative-width","mask"),b(g(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&m("negative-width","shl"),b(g(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&m("negative-width","shr"),b(g(this).shrn(e))}eq(e){return g(this).eq(g(e))}lt(e){return g(this).lt(g(e))}lte(e){return g(this).lte(g(e))}gt(e){return g(this).gt(g(e))}gte(e){return g(this).gte(g(e))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(e){m("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",f.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Logger.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",f.Logger.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof p)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new p(l,y(e)):e.match(/^-?[0-9]+$/)?new p(l,y(new s(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&m("underflow","BigNumber.from",e),(e>=u||e<=-u)&&m("overflow","BigNumber.from",e),p.from(String(e));const t=e;if("bigint"==typeof t)return p.from(t.toString());if((0,o.isBytes)(t))return p.from((0,o.hexlify)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return p.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,o.isHexString)(e)||"-"===e[0]&&(0,o.isHexString)(e.substring(1))))return p.from(e)}return c.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function y(e){if("string"!=typeof e)return y(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&c.throwArgumentError("invalid hex","value",e),"0x00"===(e=y(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function b(e){return p.from(y(e))}function g(e){const t=p.from(e).toHexString();return"-"===t[0]?new s("-"+t.substring(3),16):new s(t.substring(2),16)}function m(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,f.Logger.errors.NUMERIC_FAULT,n)}function v(e){return new s(e,36).toString(16)}function w(e){return new s(e,16).toString(36)}},20335:(e,t,r)=>{"use strict";r.d(t,{Ox:()=>y,S5:()=>p,xs:()=>g});var n=r(93286),i=r(80711),o=r(48794),f=r(2593);const a=new i.Logger(o.i),s={},c=f.O$.from(0),l=f.O$.from(-1);function u(e,t,r,n){const o={fault:t,operation:r};return void 0!==n&&(o.value=n),a.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}let d="0";for(;d.length<256;)d+=d;function h(e){if("number"!=typeof e)try{e=f.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+d.substring(0,e):a.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);const r=h(t),n=(e=f.O$.from(e)).lt(c);n&&(e=e.mul(l));let i=e.mod(r).toString();for(;i.length2&&a.throwArgumentError("too many decimal points","value",e);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");"0"===s[s.length-1];)s=s.substring(0,s.length-1);for(s.length>r.length-1&&u("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.lengthnull==e[t]?n:(typeof e[t]!==r&&a.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new b(s,t,r,n)}}class g{constructor(e,t,r,n){e!==s&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=y(this._value,this.format.decimals),r=y(e._value,e.format.decimals);return g.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=g.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(m.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=g.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(m.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&a.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=g.from("1"+d.substring(0,e),this.format),n=v.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&a.throwArgumentError("invalid byte width","width",e);const t=f.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.hexZeroPad)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return g.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,f.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),g.fromString(p(e,t),b.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=b.from(t),i=y(e,r.decimals);!r.signed&&i.lt(c)&&u("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));const f=p(i,r.decimals);return new g(s,o,f,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=b.from(t);if((0,n.arrayify)(e).length>r.width/8)throw new Error("overflow");let i=f.O$.from(e);r.signed&&(i=i.fromTwos(r.width));const o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new g(s,o,a,r)}static from(e,t){if("string"==typeof e)return g.fromString(e,t);if((0,n.isBytes)(e))return g.fromBytes(e,t);try{return g.fromValue(e,0,t)}catch(e){if(e.code!==i.Logger.errors.INVALID_ARGUMENT)throw e}return a.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const m=g.from(1),v=g.from("0.5")},93286:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrayify:()=>c,concat:()=>l,hexConcat:()=>m,hexDataLength:()=>b,hexDataSlice:()=>g,hexStripZeros:()=>w,hexValue:()=>v,hexZeroPad:()=>A,hexlify:()=>y,isBytes:()=>s,isBytesLike:()=>f,isHexString:()=>h,joinSignature:()=>_,splitSignature:()=>E,stripZeros:()=>u,zeroPad:()=>d});const n=new(r(80711).Logger)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function f(e){return h(e)&&!(e.length%2)||s(e)}function a(e){return"number"==typeof e&&e==e&&e%1==0}function s(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!a(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;ec(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function u(e){let t=c(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}const p="0123456789abcdef";function y(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=p[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){let t="0x";for(let r=0;r>4]+p[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function b(e){if("string"!=typeof e)e=y(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,r){return"string"!=typeof e?e=y(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function m(e){let t="0x";return e.forEach((e=>{t+=y(e).substring(2)})),t}function v(e){const t=w(y(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!=typeof e&&(e=y(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function E(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=y(r.slice(0,32)),t.s=y(r.slice(32,64))):65===r.length?(t.r=y(r.slice(0,32)),t.s=y(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=y(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=d(c(t._vs),32);t._vs=y(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=y(r);null==t.s?t.s=o:t.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=A(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=A(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=c(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=y(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function _(e){return y(l([(e=E(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},9279:(e,t,r)=>{"use strict";r.d(t,{d:()=>n});const n="0x0000000000000000000000000000000000000000"},21046:(e,t,r)=>{"use strict";r.d(t,{$B:()=>l,Bz:()=>c,Ce:()=>s,PS:()=>u,Py:()=>a,_Y:()=>o,fh:()=>f,tL:()=>i});var n=r(2593);const i=n.O$.from(-1),o=n.O$.from(0),f=n.O$.from(1),a=n.O$.from(2),s=n.O$.from("1000000000000000000"),c=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),l=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),u=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},57218:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},44328:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AddressZero:()=>n.d,EtherSymbol:()=>f,HashZero:()=>o.R,MaxInt256:()=>i.PS,MaxUint256:()=>i.Bz,MinInt256:()=>i.$B,NegativeOne:()=>i.tL,One:()=>i.fh,Two:()=>i.Py,WeiPerEther:()=>i.Ce,Zero:()=>i._Y});var n=r(9279),i=r(21046),o=r(57218);const f="Ξ"},96519:(e,t,r)=>{"use strict";r.d(t,{VZ:()=>x,CH:()=>P,lV:()=>I});var n=r(61184),i=r(8198),o=r(64353),f=r(48171),a=r(64594),s=r(2593),c=r(93286),l=r(53587),u=r(13479),d=r(80711);var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const p=new d.Logger("contracts/5.7.0"),y={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function b(e,t){return h(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&p.throwArgumentError("invalid address or ENS name","name",r);try{return(0,a.getAddress)(r)}catch(e){}e||p.throwError("a provider or signer is needed to resolve ENS names",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&p.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function g(e,t,r){return h(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>g(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield b(e,t):"tuple"===r.type?yield g(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>g(e,t,r.arrayChildren)))):Promise.reject(p.makeError("invalid value for array",d.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function m(e,t,r){return h(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=(0,l.shallowCopy)(r.pop())),p.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=(0,l.resolveProperties)({override:b(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>h(this,void 0,void 0,(function*(){return(0,a.getAddress)(e.signer)!==e.override&&p.throwError("Contract with a Signer cannot override from",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=b(e.provider,n.from));const i=yield(0,l.resolveProperties)({args:g(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,l.resolveProperties)(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),f={data:o,to:i.address},y=i.overrides;if(null!=y.nonce&&(f.nonce=s.O$.from(y.nonce).toNumber()),null!=y.gasLimit&&(f.gasLimit=s.O$.from(y.gasLimit)),null!=y.gasPrice&&(f.gasPrice=s.O$.from(y.gasPrice)),null!=y.maxFeePerGas&&(f.maxFeePerGas=s.O$.from(y.maxFeePerGas)),null!=y.maxPriorityFeePerGas&&(f.maxPriorityFeePerGas=s.O$.from(y.maxPriorityFeePerGas)),null!=y.from&&(f.from=y.from),null!=y.type&&(f.type=y.type),null!=y.accessList&&(f.accessList=(0,u.accessListify)(y.accessList)),null==f.gasLimit&&null!=t.gas){let e=21e3;const r=(0,c.arrayify)(o);for(let t=0;tnull!=n[e]));return m.length&&p.throwError(`cannot override ${m.map((e=>JSON.stringify(e))).join(",")}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:m}),f}))}function v(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=(0,l.deepCopy)(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function w(e,t,r){const n=e.signer||e.provider;return function(...i){return h(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=(0,l.shallowCopy)(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const f=yield m(e,t,i),a=yield n.call(f,o);try{let n=e.interface.decodeFunctionResult(t,a);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===d.Logger.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=f),t}}))}}function A(e,t,r){return t.constant?w(e,t,r):function(e,t){return function(...r){return h(this,void 0,void 0,(function*(){e.signer||p.throwError("sending a transaction requires a signer",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield m(e,t,r),i=yield e.signer.sendTransaction(n);return v(e,i),i}))}}(e,t)}function E(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class _{constructor(e,t){(0,l.defineReadOnly)(this,"tag",e),(0,l.defineReadOnly)(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e)||(t=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class k extends _{constructor(){super("error",null)}}class T extends _{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&p.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(E(i),i),(0,l.defineReadOnly)(this,"address",e),(0,l.defineReadOnly)(this,"interface",t),(0,l.defineReadOnly)(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=(0,n.BR)(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class S extends _{constructor(e,t){super("*",{address:e}),(0,l.defineReadOnly)(this,"address",e),(0,l.defineReadOnly)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class x{constructor(e,t,r){(0,l.defineReadOnly)(this,"interface",(0,l.getStatic)(new.target,"getInterface")(t)),null==r?((0,l.defineReadOnly)(this,"provider",null),(0,l.defineReadOnly)(this,"signer",null)):f.E.isSigner(r)?((0,l.defineReadOnly)(this,"provider",r.provider||null),(0,l.defineReadOnly)(this,"signer",r)):o.zt.isProvider(r)?((0,l.defineReadOnly)(this,"provider",r),(0,l.defineReadOnly)(this,"signer",null)):p.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,l.defineReadOnly)(this,"callStatic",{}),(0,l.defineReadOnly)(this,"estimateGas",{}),(0,l.defineReadOnly)(this,"functions",{}),(0,l.defineReadOnly)(this,"populateTransaction",{}),(0,l.defineReadOnly)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];(0,l.defineReadOnly)(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?(0,l.defineReadOnly)(this.filters,t,this.filters[r[0]]):p.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if((0,l.defineReadOnly)(this,"_runningEvents",{}),(0,l.defineReadOnly)(this,"_wrappedEmits",{}),null==e&&p.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,l.defineReadOnly)(this,"address",e),this.provider)(0,l.defineReadOnly)(this,"resolvedAddress",b(this.provider,e));else try{(0,l.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,a.getAddress)(e)))}catch(e){p.throwError("provider is required to use ENS name as contract address",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])p.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&(0,l.defineReadOnly)(this,e,A(this,t,!0)),null==this.functions[e]&&(0,l.defineReadOnly)(this.functions,e,A(this,t,!1)),null==this.callStatic[e]&&(0,l.defineReadOnly)(this.callStatic,e,w(this,t,!0)),null==this.populateTransaction[e]&&(0,l.defineReadOnly)(this.populateTransaction,e,function(e,t){return function(...r){return m(e,t,r)}}(this,t)),null==this.estimateGas[e]&&(0,l.defineReadOnly)(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return h(this,void 0,void 0,(function*(){r||p.throwError("estimate require a provider or signer",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield m(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&(0,l.defineReadOnly)(this,e,this[r])}catch(e){}null==this.functions[e]&&(0,l.defineReadOnly)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,l.defineReadOnly)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,l.defineReadOnly)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,l.defineReadOnly)(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return(0,a.getContractAddress)(e)}static getInterface(e){return i.vU.isInterface(e)?e:new i.vU(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&p.throwError("contract not deployed",d.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||p.throwError("sending a transactions require a signer",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=(0,l.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=t[e]&&p.throwError("cannot override "+e,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new f.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,l.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return i.Hk.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new k);if("event"===e)return this._normalizeRunningEvent(new _("event",null));if("*"===e)return this._normalizeRunningEvent(new S(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new T(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new T(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new _(E(t),t))}return this._normalizeRunningEvent(new S(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=(0,l.deepCopy)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||p.throwError("events require a provider or a signer with a provider",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=(0,l.shallowCopy)(n.filter);return"string"==typeof t&&(0,c.isHexString)(t,32)?(null!=r&&p.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class P extends x{}class I{constructor(e,t,r){let n=null;n="string"==typeof t?t:(0,c.isBytes)(t)?(0,c.hexlify)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!(0,c.isHexString)(n)||n.length%2)&&p.throwArgumentError("invalid bytecode","bytecode",t),r&&!f.E.isSigner(r)&&p.throwArgumentError("invalid signer","signer",r),(0,l.defineReadOnly)(this,"bytecode",n),(0,l.defineReadOnly)(this,"interface",(0,l.getStatic)(new.target,"getInterface")(e)),(0,l.defineReadOnly)(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=(0,l.shallowCopy)(e.pop());for(const e in t)if(!y[e])throw new Error("unknown transaction override "+e)}if(["data","from","to"].forEach((e=>{null!=t[e]&&p.throwError("cannot override "+e,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value){s.O$.from(t.value).isZero()||this.interface.deploy.payable||p.throwError("non-payable constructor cannot override value",d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return p.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,c.hexlify)((0,c.concat)([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return h(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),p.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield g(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=(0,l.getStatic)(this.constructor,"getContractAddress")(i),f=(0,l.getStatic)(this.constructor,"getContract")(o,this.interface,this.signer);return v(f,i),(0,l.defineReadOnly)(f,"deployTransaction",i),f}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&p.throwError("missing compiler output",d.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return P.getInterface(e)}static getContractAddress(e){return(0,a.getContractAddress)(e)}static getContract(e,t,r){return new P(e,t,r)}}},35644:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="hash/5.7.0"},32046:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(38197),i=r(44242);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},75931:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_TypedDataEncoder:()=>f.E,dnsEncode:()=>i.Kn,ensNormalize:()=>i.w3,hashMessage:()=>o.r,id:()=>n.id,isValidName:()=>i.r1,messagePrefix:()=>o.B,namehash:()=>i.VM});var n=r(32046),i=r(78339),o=r(93684),f=r(67827)},93684:(e,t,r)=>{"use strict";r.d(t,{B:()=>f,r:()=>a});var n=r(93286),i=r(38197),o=r(44242);const f="Ethereum Signed Message:\n";function a(e){return"string"==typeof e&&(e=(0,o.Y0)(e)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(f),(0,o.Y0)(String(e.length)),e]))}},78339:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>N,w3:()=>B,r1:()=>R,VM:()=>D});var n=r(93286),i=r(44242),o=r(38197),f=r(80711),a=r(35644);function s(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function c(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e>--s&1}const u=Math.pow(2,31),d=u>>>1,h=d>>1,p=u-1;let y=0;for(let e=0;e<31;e++)y=y<<1|l();let b=[],g=0,m=u;for(;;){let e=Math.floor(((y-g+1)*i-1)/m),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|l(),f=f<<1^d,a=(a^d)<<1|d|1;g=f,m=1+a-f}let v=n-4;return b.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(e))}function l(e){return 1&e?~e>>1:e>>1}function u(e,t){let r=Array(e);for(let n=0,i=-1;nt[e])):r}function p(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;in[t].push(e)));return n}function y(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return s(p(i.length,1+e,t).map(((e,t)=>{const o=e[0],f=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,f.map((e=>e+i))]}))})))}function b(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const g=c((0,r(59567).J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA==")),m=new Set(h(g)),v=new Set(h(g)),w=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(y(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(b(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let i=h(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let f=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:f,save:1==i,check:2==i}}()}(g),E=45,_=95;function k(e){return(0,i.XL)(e)}function T(e){return e.filter((e=>65039!=e))}function S(e){for(let t of e.split(".")){let e=k(t);try{for(let t=e.lastIndexOf(_)-1;t>=0;t--)if(e[t]!==_)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===E&&e[3]===E)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function x(e){return S(function(e,t){let r=k(e).reverse(),n=[];for(;r.length;){let e=P(r);if(e){n.push(...t(e));continue}let i=r.pop();if(m.has(i)){n.push(i);continue}if(v.has(i))continue;let o=w[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return S((i=String.fromCodePoint(...n),i.normalize("NFC")));var i}(e,T))}function P(e,t){var r;let n,i,o=A,f=[],a=e.length;for(t&&(t.length=0);a;){let s=e[--a];if(o=null===(r=o.branches.find((e=>e.set.has(s))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=s;else if(o.check&&s===i)break;f.push(s),o.fe0f&&(f.push(65039),a>0&&65039==e[a-1]&&a--),o.valid&&(n=f.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const I=new f.Logger(a.i),M=new Uint8Array(32);function C(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function O(e){const t=(0,i.Y0)(x(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e=t.length)throw new Error("invalid ENS name; empty component");return r.push(C(t.slice(n))),r}function B(e){return O(e).map((e=>(0,i.ZN)(e))).join(".")}function R(e){try{return 0!==O(e).length}catch(e){}return!1}function D(e){"string"!=typeof e&&I.throwArgumentError("invalid ENS name; not a string","name",e);let t=M;const r=O(e);for(;r.length;)t=(0,o.keccak256)((0,n.concat)([t,(0,o.keccak256)(r.pop())]));return(0,n.hexlify)(t)}function N(e){return(0,n.hexlify)((0,n.concat)(O(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}M.fill(0)},67827:(e,t,r)=>{"use strict";r.d(t,{E:()=>S});var n=r(64594),i=r(2593),o=r(93286),f=r(38197),a=r(53587),s=r(80711),c=r(35644),l=r(32046),u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const d=new s.Logger(c.i),h=new Uint8Array(32);h.fill(0);const p=i.O$.from(-1),y=i.O$.from(0),b=i.O$.from(1),g=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const m=(0,o.hexZeroPad)(b.toHexString(),32),v=(0,o.hexZeroPad)(y.toHexString(),32),w={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},A=["name","version","chainId","verifyingContract","salt"];function E(e){return function(t){return"string"!=typeof t&&d.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const _={name:E("name"),version:E("version"),chainId:function(e){try{return i.O$.from(e).toString()}catch(e){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,o.arrayify)(e);if(32!==t.length)throw new Error("bad length");return(0,o.hexlify)(t)}catch(e){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function k(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&d.throwArgumentError("invalid numeric width","type",e);const f=g.mask(r?n-1:n),a=r?f.add(b).mul(p):y;return function(t){const r=i.O$.from(t);return(r.lt(a)||r.gt(f))&&d.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&d.throwArgumentError("invalid bytes width","type",e),function(t){return(0,o.arrayify)(t).length!==r&&d.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,o.arrayify)(e),r=t.length%32;return r?(0,o.hexConcat)([t,h.slice(r)]):(0,o.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,o.hexZeroPad)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?m:v};case"bytes":return function(e){return(0,f.keccak256)(e)};case"string":return function(e){return(0,l.id)(e)}}return null}function T(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class S{constructor(e){(0,a.defineReadOnly)(this,"types",Object.freeze((0,a.deepCopy)(e))),(0,a.defineReadOnly)(this,"_encoderCache",{}),(0,a.defineReadOnly)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&d.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const f=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===n&&d.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e);k(f)||(r[f]||d.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),r[f].push(n),t[n][f]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?d.throwArgumentError("missing primary type","types",e):i.length>1&&d.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,a.defineReadOnly)(this,"primaryType",i[0]),function i(o,f){f[o]&&d.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),f[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,f),Object.keys(f).forEach((t=>{n[t][e]=!0})))})),delete f[o]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=T(t,e[t])+r.map((t=>T(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=k(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(f.keccak256)),(0,f.keccak256)((0,o.hexConcat)(i))}}const r=this.types[e];if(r){const t=(0,l.id)(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?(0,f.keccak256)(n):n}));return n.unshift(t),(0,o.hexConcat)(n)}}return d.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||d.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,f.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(k(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):d.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new S(e)}static getPrimaryType(e){return S.from(e).primaryType}static hashStruct(e,t,r){return S.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=w[r];n||d.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>A.indexOf(e.name)-A.indexOf(t.name))),S.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",S.hashDomain(e),S.from(t).hash(r)])}static hash(e,t,r){return(0,f.keccak256)(S.encode(e,t,r))}static resolveNames(e,t,r,n){return u(this,void 0,void 0,(function*(){e=(0,a.shallowCopy)(e);const i={};e.verifyingContract&&!(0,o.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const f=S.from(t);f.visit(r,((e,t)=>("address"!==e||(0,o.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=f.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}}))}static getPayload(e,t,r){S.hashDomain(e);const n={},f=[];A.forEach((t=>{const r=e[t];null!=r&&(n[t]=_[t](r),f.push({name:t,type:w[t]}))}));const s=S.from(t),c=(0,a.shallowCopy)(t);return c.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):c.EIP712Domain=f,s.encode(r),{types:c,domain:n,primaryType:s.primaryType,message:s.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(t));if(e.match(/^u?int/))return i.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&d.throwArgumentError("invalid string","value",t),t}return d.throwArgumentError("unsupported type","type",e)}))}}}},36274:(e,t,r)=>{"use strict";r.r(t),r.d(t,{HDNode:()=>k,defaultPath:()=>_,entropyToMnemonic:()=>x,getAccountPath:()=>I,isValidMnemonic:()=>P,mnemonicToEntropy:()=>S,mnemonicToSeed:()=>T});var n=r(57727),i=r(93286),o=r(2593),f=r(44242),a=r(85306),s=r(53587),c=r(62768),l=r(77158),u=r(21261),d=r(13479),h=r(9855);const p=new(r(80711).Logger)("hdnode/5.7.0"),y=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=(0,f.Y0)("Bitcoin seed"),g=2147483648;function m(e){return(1<=256)throw new Error("Depth too large!");return w((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new k(E,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~g));const r=new Uint8Array(37);if(e&g){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),t&&(t+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=(0,i.arrayify)((0,l.Gy)(u.p.sha512,this.chainCode,r)),f=n.slice(0,32),a=n.slice(32);let s=null,d=null;if(this.privateKey)s=v(o.O$.from(f).add(this.privateKey).mod(y));else{d=new c.SigningKey((0,i.hexlify)(f))._addPoint(this.publicKey)}let h=t;const p=this.mnemonic;return p&&(h=Object.freeze({phrase:p.phrase,path:t,locale:p.locale||"en"})),new k(E,s,d,this.fingerprint,v(a),e,this.depth+1,h)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e=g)throw new Error("invalid path index - "+n);r=r._derive(g+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=g)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=(0,i.arrayify)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,i.arrayify)((0,l.Gy)(u.p.sha512,b,r));return new k(E,v(n.slice(0,32)),null,"0x00000000",v(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=x(S(e,r=A(r)),r),k._fromSeed(T(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return k._fromSeed(e,null)}static fromExtendedKey(e){const t=n.Base58.decode(e);82===t.length&&w(t.slice(0,78))===e||p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],o=(0,i.hexlify)(t.slice(5,9)),f=parseInt((0,i.hexlify)(t.slice(9,13)).substring(2),16),a=(0,i.hexlify)(t.slice(13,45)),s=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(E,null,(0,i.hexlify)(s),o,a,f,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new k(E,(0,i.hexlify)(s.slice(1)),null,o,a,f,r,null)}return p.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function T(e,t){t||(t="");const r=(0,f.Y0)("mnemonic"+t,f.Uj.NFKD);return(0,a.n)((0,f.Y0)(e,f.Uj.NFKD),r,2048,64,"sha512")}function S(e,t){t=A(t),p.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8)));let o=0;for(let e=0;e>3]|=1<<7-o%8),o++}const f=32*r.length/3,a=m(r.length/3);if(((0,i.arrayify)((0,l.JQ)(n.slice(0,f/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return(0,i.hexlify)(n.slice(0,f/8))}function x(e,t){if(t=A(t),(e=(0,i.arrayify)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const o=e.length/4,f=(0,i.arrayify)((0,l.JQ)(e))[0]&m(o);return r[r.length-1]<<=o,r[r.length-1]|=f>>8-o,t.join(r.map((e=>t.getWord(e))))}function P(e,t){try{return S(e,t),!0}catch(e){}return!1}function I(e){return("number"!=typeof e||e<0||e>=g||e%1)&&p.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}},29816:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="json-wallets/5.7.0"},19380:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decryptCrowdsale:()=>b,decryptJsonWallet:()=>v,decryptJsonWalletSync:()=>w,decryptKeystore:()=>m.pe,decryptKeystoreSync:()=>m.hb,encryptKeystore:()=>m.HI,getJsonWalletAddress:()=>g.Rb,isCrowdsaleWallet:()=>g.LW,isKeystoreWallet:()=>g.aO});var n=r(48709),i=r.n(n),o=r(64594),f=r(93286),a=r(38197),s=r(85306),c=r(44242),l=r(53587),u=r(80711),d=r(29816),h=r(97013);const p=new u.Logger(d.i);class y extends l.Description{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function b(e,t){const r=JSON.parse(e);t=(0,h.Ij)(t);const n=(0,o.getAddress)((0,h.gx)(r,"ethaddr")),l=(0,h.p3)((0,h.gx)(r,"encseed"));l&&l.length%16==0||p.throwArgumentError("invalid encseed","json",e);const u=(0,f.arrayify)((0,s.n)(t,t,2e3,32,"sha256")).slice(0,16),d=l.slice(0,16),b=l.slice(16),g=new(i().ModeOfOperation.cbc)(u,d),m=i().padding.pkcs7.strip((0,f.arrayify)(g.decrypt(b)));let v="";for(let e=0;e{"use strict";r.d(t,{LW:()=>i,Rb:()=>f,aO:()=>o});var n=r(64594);function i(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function o(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function f(e){if(i(e))try{return(0,n.getAddress)(JSON.parse(e).ethaddr)}catch(e){return null}if(o(e))try{return(0,n.getAddress)(JSON.parse(e).address)}catch(e){return null}return null}},81964:(e,t,r)=>{"use strict";r.d(t,{HI:()=>P,hb:()=>S,pe:()=>x});var n=r(48709),i=r.n(n),o=r(17635),f=r.n(o),a=r(64594),s=r(93286),c=r(36274),l=r(38197),u=r(85306),d=r(44478),h=r(53587),p=r(13479),y=r(97013),b=r(80711),g=r(29816),m=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const v=new b.Logger(g.i);function w(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class A extends h.Description{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function E(e,t){const r=(0,y.p3)((0,y.gx)(e,"crypto/ciphertext"));if((0,s.hexlify)((0,l.keccak256)((0,s.concat)([t.slice(16,32),r]))).substring(2)!==(0,y.gx)(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===(0,y.gx)(e,"crypto/cipher")){const n=(0,y.p3)((0,y.gx)(e,"crypto/cipherparams/iv")),o=new(i().Counter)(n),f=new(i().ModeOfOperation.ctr)(t,o);return(0,s.arrayify)(f.decrypt(r))}return null}(e,t.slice(0,16),r);n||v.throwError("unsupported cipher",b.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const o=t.slice(32,64),f=(0,p.computeAddress)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,a.getAddress)(t)!==f)throw new Error("address mismatch")}const u={_isKeystoreAccount:!0,address:f,privateKey:(0,s.hexlify)(n)};if("0.1"===(0,y.gx)(e,"x-ethers/version")){const t=(0,y.p3)((0,y.gx)(e,"x-ethers/mnemonicCiphertext")),r=(0,y.p3)((0,y.gx)(e,"x-ethers/mnemonicCounter")),n=new(i().Counter)(r),f=new(i().ModeOfOperation.ctr)(o,n),a=(0,y.gx)(e,"x-ethers/path")||c.defaultPath,l=(0,y.gx)(e,"x-ethers/locale")||"en",d=(0,s.arrayify)(f.decrypt(t));try{const e=(0,c.entropyToMnemonic)(d,l),t=c.HDNode.fromMnemonic(e,null,l).derivePath(a);if(t.privateKey!=u.privateKey)throw new Error("mnemonic mismatch");u.mnemonic=t.mnemonic}catch(e){if(e.code!==b.Logger.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e}}return new A(u)}function _(e,t,r,n,i){return(0,s.arrayify)((0,u.n)(e,t,r,n,i))}function k(e,t,r,n,i){return Promise.resolve(_(e,t,r,n,i))}function T(e,t,r,n,i){const o=(0,y.Ij)(t),f=(0,y.gx)(e,"crypto/kdf");if(f&&"string"==typeof f){const t=function(e,t){return v.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===f.toLowerCase()){const r=(0,y.p3)((0,y.gx)(e,"crypto/kdfparams/salt")),a=parseInt((0,y.gx)(e,"crypto/kdfparams/n")),s=parseInt((0,y.gx)(e,"crypto/kdfparams/r")),c=parseInt((0,y.gx)(e,"crypto/kdfparams/p"));a&&s&&c||t("kdf",f),0!=(a&a-1)&&t("N",a);const l=parseInt((0,y.gx)(e,"crypto/kdfparams/dklen"));return 32!==l&&t("dklen",l),n(o,r,a,s,c,64,i)}if("pbkdf2"===f.toLowerCase()){const n=(0,y.p3)((0,y.gx)(e,"crypto/kdfparams/salt"));let i=null;const f=(0,y.gx)(e,"crypto/kdfparams/prf");"hmac-sha256"===f?i="sha256":"hmac-sha512"===f?i="sha512":t("prf",f);const a=parseInt((0,y.gx)(e,"crypto/kdfparams/c")),s=parseInt((0,y.gx)(e,"crypto/kdfparams/dklen"));return 32!==s&&t("dklen",s),r(o,n,a,s,i)}}return v.throwArgumentError("unsupported key-derivation function","kdf",f)}function S(e,t){const r=JSON.parse(e);return E(r,T(r,t,_,f().syncScrypt))}function x(e,t,r){return m(this,void 0,void 0,(function*(){const n=JSON.parse(e);return E(n,yield T(n,t,k,f().scrypt,r))}))}function P(e,t,r,n){try{if((0,a.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw new Error("address/privateKey mismatch");if(w(e)){const t=e.mnemonic;if(c.HDNode.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||c.defaultPath).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const o=(0,s.arrayify)(e.privateKey),u=(0,y.Ij)(t);let h=null,b=null,g=null;if(w(e)){const t=e.mnemonic;h=(0,s.arrayify)((0,c.mnemonicToEntropy)(t.phrase,t.locale||"en")),b=t.path||c.defaultPath,g=t.locale||"en"}let m=r.client;m||(m="ethers.js");let v=null;v=r.salt?(0,s.arrayify)(r.salt):(0,d.O)(32);let A=null;if(r.iv){if(A=(0,s.arrayify)(r.iv),16!==A.length)throw new Error("invalid iv")}else A=(0,d.O)(16);let E=null;if(r.uuid){if(E=(0,s.arrayify)(r.uuid),16!==E.length)throw new Error("invalid uuid")}else E=(0,d.O)(16);let _=1<<17,k=8,T=1;return r.scrypt&&(r.scrypt.N&&(_=r.scrypt.N),r.scrypt.r&&(k=r.scrypt.r),r.scrypt.p&&(T=r.scrypt.p)),f().scrypt(u,v,_,k,T,64,n).then((t=>{const r=(t=(0,s.arrayify)(t)).slice(0,16),n=t.slice(16,32),f=t.slice(32,64),a=new(i().Counter)(A),c=new(i().ModeOfOperation.ctr)(r,a),u=(0,s.arrayify)(c.encrypt(o)),p=(0,l.keccak256)((0,s.concat)([n,u])),w={address:e.address.substring(2).toLowerCase(),id:(0,y.EH)(E),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,s.hexlify)(A).substring(2)},ciphertext:(0,s.hexlify)(u).substring(2),kdf:"scrypt",kdfparams:{salt:(0,s.hexlify)(v).substring(2),n:_,dklen:32,p:T,r:k},mac:p.substring(2)}};if(h){const e=(0,d.O)(16),t=new(i().Counter)(e),r=new(i().ModeOfOperation.ctr)(f,t),n=(0,s.arrayify)(r.encrypt(h)),o=new Date,a=o.getUTCFullYear()+"-"+(0,y.VP)(o.getUTCMonth()+1,2)+"-"+(0,y.VP)(o.getUTCDate(),2)+"T"+(0,y.VP)(o.getUTCHours(),2)+"-"+(0,y.VP)(o.getUTCMinutes(),2)+"-"+(0,y.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:m,gethFilename:"UTC--"+a+"--"+w.address,mnemonicCounter:(0,s.hexlify)(e).substring(2),mnemonicCiphertext:(0,s.hexlify)(n).substring(2),path:b,locale:g,version:"0.1"}}return JSON.stringify(w)}))}},97013:(e,t,r)=>{"use strict";r.d(t,{EH:()=>c,Ij:()=>a,VP:()=>f,gx:()=>s,p3:()=>o});var n=r(93286),i=r(44242);function o(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.arrayify)(e)}function f(e,t){for(e=String(e);e.length255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function f(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a,s={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+a[15&n])}return t.join("")}}),l={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],p=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],b=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],g=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],m=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],T=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var f,a=0,s=i;s>16&255]<<24^d[f>>8&255]<<16^d[255&f]<<8^d[f>>24&255]^u[a]<<24,a+=1,8!=i)for(t=1;t>8&255]<<8^d[f>>16&255]<<16^d[f>>24&255]<<24;for(t=i/2+1;t>2,h=s%4,this._Ke[c][h]=o[t],this._Kd[e-c][h]=o[t++],s++}for(var c=1;c>24&255]^_[f>>16&255]^k[f>>8&255]^T[255&f]},x.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var f=1;f>24&255]^y[n[(i+1)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[f][i];n=r.slice()}var a,s=o(16);for(i=0;i<4;i++)a=this._Ke[t][i],s[4*i]=255&(d[n[i]>>24&255]^a>>24),s[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^a>>16),s[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^a>>8),s[4*i+3]=255&(d[255&n[(i+3)%4]]^a);return s},x.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var f=1;f>24&255]^v[n[(i+3)%4]>>16&255]^w[n[(i+2)%4]>>8&255]^A[255&n[(i+1)%4]]^this._Kd[f][i];n=r.slice()}var a,s=o(16);for(i=0;i<4;i++)a=this._Kd[t][i],s[4*i]=255&(h[n[i]>>24&255]^a>>24),s[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^a>>16),s[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^a>>8),s[4*i+3]=255&(h[255&n[(i+1)%4]]^a);return s};var P=function(e){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(e)};P.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n=0;--t)this._counter[t]=e%256,e>>=8},O.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},O.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var B=function(e,t){if(!(this instanceof B))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof O||(t=new O(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(e)};B.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n{"use strict";r.r(t),r.d(t,{keccak256:()=>f});var n=r(91094),i=r.n(n),o=r(93286);function f(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},80711:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ErrorCode:()=>l,LogLevel:()=>c,Logger:()=>d});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let f=o.default,a=null;const s=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var c,l;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(c||(c={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(l||(l={}));const u="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),f>o[r]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=u[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let f="";switch(t){case l.NUMERIC_FAULT:{f="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":f+="-"+t;break;case"negative-power":case"negative-width":f+="-unsupported";break;case"unbound-bitwise-result":f+="-unbound-result"}break}case l.CALL_EXCEPTION:case l.INSUFFICIENT_FUNDS:case l.MISSING_NEW:case l.NONCE_EXPIRED:case l.REPLACEMENT_UNDERPRICED:case l.TRANSACTION_REPLACED:case l.UNPREDICTABLE_GAS_LIMIT:f=t}f&&(e+=" [ See: https://links.ethers.org/v5-errors-"+f+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),s&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:s})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new d("logger/5.7.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?f=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=l,d.levels=c},79861:(e,t,r)=>{"use strict";r.d(t,{H:()=>l});const n=new(r(80711).Logger)("networks/5.7.1");function i(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return i(e)},t}function o(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return o(e,t)},r}const f={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:i("homestead")},a={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:i("ropsten")},s={chainId:63,name:"classicMordor",_defaultProvider:o("https://www.ethercluster.com/mordor","classicMordor")},c={unspecified:{chainId:0,name:"unspecified"},homestead:f,mainnet:f,morden:{chainId:2,name:"morden"},ropsten:a,testnet:a,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:i("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:i("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:i("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:i("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:o("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:s,classicTestnet:s,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:o("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:i("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:i("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function l(e){if(null==e)return null;if("number"==typeof e){for(const t in c){const r=c[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=c[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=c[e.name];if(!t)return"number"!=typeof e.chainId&&n.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&n.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var i;return null==r&&t._defaultProvider&&(r=(i=t._defaultProvider)&&"function"==typeof i.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}},85306:(e,t,r)=>{"use strict";r.d(t,{n:()=>o});var n=r(93286),i=r(77158);function o(e,t,r,o,f){let a;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let s=1;const c=new Uint8Array(o),l=new Uint8Array(t.length+4);let u,d;l.set(t);for(let h=1;h<=s;h++){l[t.length]=h>>24&255,l[t.length+1]=h>>16&255,l[t.length+2]=h>>8&255,l[t.length+3]=255&h;let p=(0,n.arrayify)((0,i.Gy)(f,e,l));a||(a=p.length,d=new Uint8Array(a),s=Math.ceil(o/a),u=o-(s-1)*a),d.set(p);for(let t=1;t{"use strict";r.r(t),r.d(t,{Description:()=>y,checkProperties:()=>c,deepCopy:()=>p,defineReadOnly:()=>f,getStatic:()=>a,resolveProperties:()=>s,shallowCopy:()=>l});var n=r(80711);var i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const o=new n.Logger("properties/5.7.0");function f(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function a(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function s(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function c(e,t){e&&"object"==typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function l(e){const t={};for(const r in e)t[r]=e[r];return t}const u={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(null==e||u[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rp(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&f(t,r,p(n))}return t}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function p(e){return h(e)}class y{constructor(e){for(const t in e)this[t]=p(e[t])}}},34216:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="providers/5.7.2"},75361:(e,t,r)=>{"use strict";r.d(t,{H2:()=>j,Zk:()=>H});var n=r(64353),i=r(59567),o=r(57727),f=r(2593),a=r(93286),s=r(57218),c=r(78339),l=r(79861),u=r(53587),d=r(77158),h=r(44242),p=r(58341),y=r(92882),b=r.n(y),g=r(80711),m=r(34216),v=r(30032),w=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const A=new g.Logger(m.i);function E(e){return null==e?"null":(32!==(0,a.hexDataLength)(e)&&A.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function _(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[E(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return E(e)})).join("&")}function k(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,a.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+_(e);if(n.Sg.isForkEvent(e))throw A.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+_(e.topics||[])}throw new Error("invalid event - "+e)}function T(){return(new Date).getTime()}function S(e){return new Promise((t=>{setTimeout(t,e)}))}const x=["block","network","pending","poll"];class P{constructor(e,t,r){(0,u.defineReadOnly)(this,"tag",e),(0,u.defineReadOnly)(this,"listener",t),(0,u.defineReadOnly)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||x.indexOf(this.tag)>=0}}const I={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function M(e){return(0,a.hexZeroPad)(f.O$.from(e).toHexString(),32)}function C(e){return o.Base58.encode((0,a.concat)([e,(0,a.hexDataSlice)((0,d.JQ)((0,d.JQ)(e)),0,4)]))}const O=new RegExp("^(ipfs)://(.*)$","i"),B=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),O,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function R(e,t){try{return(0,h.ZN)(D(e,t))}catch(e){}return null}function D(e,t){if("0x"===e)return null;const r=f.O$.from((0,a.hexDataSlice)(e,t,t+32)).toNumber(),n=f.O$.from((0,a.hexDataSlice)(e,r,r+32)).toNumber();return(0,a.hexDataSlice)(e,r+32,r+32+n)}function N(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):A.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function U(e){const t=(0,a.arrayify)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function L(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function F(e){const t=[];let r=0;for(let n=0;nf.O$.from(e).eq(1))).catch((e=>{if(e.code===g.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return w(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,a.hexConcat)([e,(0,c.VM)(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,a.hexConcat)(["0x9061b923",F([(0,c.Kn)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,a.arrayify)(e).length%32==4&&A.throwError("resolver threw error",g.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=D(e,0)),e}catch(e){if(e.code===g.Logger.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return w(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?D(r,0):null}))}_getAddress(e,t){const r=I[String(e)];if(null==r&&A.throwError(`unsupported coin type: ${e}`,g.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,a.arrayify)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return C((0,a.concat)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return C((0,a.concat)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=b().toWords(n.slice(2));return e.unshift(t),b().encode(r.prefix,e)}}return null}getAddress(e){return w(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===s.R?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===g.Logger.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",M(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&A.throwError("invalid or unsupported coin data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return w(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;re[t]))}return A.throwError("invalid or unsupported content hash data",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return w(this,void 0,void 0,(function*(){let t=(0,h.Y0)(e);t=(0,a.concat)([M(64),M(t.length),t]),t.length%32!=0&&(t=(0,a.concat)([t,(0,a.hexZeroPad)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,a.hexlify)(t));return null==r||"0x"===r?null:(0,h.ZN)(r)}))}}let z=null,V=1;class H extends n.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,u.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,u.getStatic)(new.target,"getNetwork")(e);t?((0,u.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):A.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return w(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||A.throwError("no network detected",g.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,u.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return(0,p.poll)((()=>this._ready().then((e=>e),(e=>{if(e.code!==g.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==z&&(z=new v.Mb),z}static getNetwork(e){return(0,l.H)(null==e?"homestead":e)}ccipReadFetch(e,t,r){return w(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e=0?null:JSON.stringify({data:i,sender:n}),s=yield(0,p.fetchJson)({url:f,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(s.data)return s.data;const c=s.message||"unknown error";if(s.status>=400&&s.status<500)return A.throwError(`response not found during CCIP fetch: ${c}`,g.Logger.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return A.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,g.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return w(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(T()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=T(),r=(0,u.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=T();return(e=f.O$.from(e).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return w(this,void 0,void 0,(function*(){const e=V++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)A.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",A.makeError("network block skew detected",g.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return w(this,void 0,void 0,(function*(){return A.throwError("provider does not support network detection",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return w(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield S(0),this._network;const r=A.makeError("underlying network changed",g.Logger.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=T();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return w(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return w(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const f=[];let a=!1;const s=function(){return!!a||(a=!0,f.forEach((e=>{e()})),!1)},c=e=>{e.confirmations{this.removeListener(e,c)})),n){let r=n.startBlock,i=null;const c=f=>w(this,void 0,void 0,(function*(){a||(yield S(1e3),this.getTransactionCount(n.from).then((l=>w(this,void 0,void 0,(function*(){if(!a){if(l<=n.nonce)r=f;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i{a||this.once("block",c)})))}));if(a)return;this.once("block",c),f.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{s()||o(A.makeError("timeout exceeded",g.Logger.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),f.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return w(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return f.O$.from(e)}catch(t){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,u.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return f.O$.from(n)}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,u.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return f.O$.from(n).toNumber()}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,u.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,a.hexlify)(n)}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,u.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,a.hexValue)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,a.hexlify)(i)}catch(e){return A.throwError("bad result from backend",g.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,a.hexDataLength)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&A.throwError("Transaction hash mismatch from Provider.sendTransaction.",g.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>w(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&A.throwError("transaction failed",g.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,a.hexlify)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return w(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?f.O$.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,a.hexlify)(e):null)))})),this.formatter.transactionRequest(yield(0,u.resolveProperties)(r))}))}_getFilter(e){return w(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,u.resolveProperties)(t))}))}_call(e,t,r){return w(this,void 0,void 0,(function*(){r>=10&&A.throwError("CCIP read exceeded maximum redirections",g.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,a.hexDataLength)(i)%32==4)try{const o=(0,a.hexDataSlice)(i,4),s=(0,a.hexDataSlice)(o,0,32);f.O$.from(s).eq(n)||A.throwError("CCIP Read sender did not match",g.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const c=[],l=f.O$.from((0,a.hexDataSlice)(o,32,64)).toNumber(),u=f.O$.from((0,a.hexDataSlice)(o,l,l+32)).toNumber(),d=(0,a.hexDataSlice)(o,l+32);for(let t=0;tw(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;rthis._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)((()=>w(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return w(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,u.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),v.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return w(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return w(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&A.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return w(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new j(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return w(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||A.throwError("network does not support ENS",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,c.VM)(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return w(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,a.isHexString)(e))throw t}"string"!=typeof e&&A.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return w(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=R(yield this.call({to:r,data:"0x691f3431"+(0,c.VM)(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return w(this,void 0,void 0,(function*(){let t=null;if((0,a.isHexString)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new j(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==g.Logger.errors.CALL_EXCEPTION)throw e}try{const e=R(yield this.call({to:n,data:"0x691f3431"+(0,c.VM)(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==g.Logger.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return A.throwError(e+" not implemented",g.Logger.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new P(k(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=k(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=k(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=k(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=k(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||(!!n||(n=!0,r.push(e),!1)))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=k(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}},30032:(e,t,r)=>{"use strict";r.d(t,{Ed:()=>h,Gp:()=>p,Mb:()=>d,vh:()=>b});var n=r(64594),i=r(2593),o=r(93286),f=r(9279),a=r(53587),s=r(13479),c=r(80711),l=r(34216);const u=new c.Logger(l.i);class d{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),f=this.hex.bind(this),s=this.number.bind(this),c=this.type.bind(this);return e.transaction={hash:o,type:c,accessList:d.allowNull(this.accessList.bind(this),null),blockHash:d.allowNull(o,null),blockNumber:d.allowNull(s,null),transactionIndex:d.allowNull(s,null),confirmations:d.allowNull(s,null),from:t,gasPrice:d.allowNull(r),maxPriorityFeePerGas:d.allowNull(r),maxFeePerGas:d.allowNull(r),gasLimit:r,to:d.allowNull(t,null),value:r,nonce:s,data:i,r:d.allowNull(this.uint256),s:d.allowNull(this.uint256),v:d.allowNull(s),creates:d.allowNull(t,null),raw:d.allowNull(i)},e.transactionRequest={from:d.allowNull(t),nonce:d.allowNull(s),gasLimit:d.allowNull(r),gasPrice:d.allowNull(r),maxPriorityFeePerGas:d.allowNull(r),maxFeePerGas:d.allowNull(r),to:d.allowNull(t),value:d.allowNull(r),data:d.allowNull((e=>this.data(e,!0))),type:d.allowNull(s),accessList:d.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:o,address:t,topics:d.arrayOf(o),data:i,logIndex:s,blockHash:o},e.receipt={to:d.allowNull(this.address,null),from:d.allowNull(this.address,null),contractAddress:d.allowNull(t,null),transactionIndex:s,root:d.allowNull(f),gasUsed:r,logsBloom:d.allowNull(i),blockHash:o,transactionHash:o,logs:d.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:d.allowNull(s,null),cumulativeGasUsed:r,effectiveGasPrice:d.allowNull(r),status:d.allowNull(s),type:c},e.block={hash:d.allowNull(o),parentHash:o,number:s,timestamp:s,nonce:d.allowNull(f),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:d.allowNull(t),extraData:i,transactions:d.allowNull(d.arrayOf(o)),baseFeePerGas:d.allowNull(r)},e.blockWithTransactions=(0,a.shallowCopy)(e.block),e.blockWithTransactions.transactions=d.allowNull(d.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:d.allowNull(n,void 0),toBlock:d.allowNull(n,void 0),blockHash:d.allowNull(o,void 0),address:d.allowNull(t,void 0),topics:d.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:d.allowNull(s),blockHash:d.allowNull(o),transactionIndex:s,removed:d.allowNull(this.boolean.bind(this)),address:t,data:d.allowFalsish(i,"0x"),topics:d.arrayOf(o),transactionHash:o,logIndex:s},e}accessList(e){return(0,s.accessListify)(e||[])}number(e){return"0x"===e?0:i.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:i.O$.from(e).toNumber()}bigNumber(e){return i.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,o.isHexString)(e))?e.toLowerCase():u.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,n.getAddress)(e)}callAddress(e){if(!(0,o.isHexString)(e,32))return null;const t=(0,n.getAddress)((0,o.hexDataSlice)(e,12));return t===f.d?null:t}contractAddress(e){return(0,n.getContractAddress)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,o.isHexString)(e))return(0,o.hexValue)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,o.hexDataLength)(r)?u.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=i.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,o.isHexString)(e))throw new Error("invalid uint256");return(0,o.hexZeroPad)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=d.check(t,e);return n._difficulty=null==r?null:i.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return d.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&i.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=d.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,s.parse)(e)}receiptLog(e){return d.check(this.formats.receiptLog,e)}receipt(e){const t=d.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=i.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&u.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):u.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&u.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return d.check(this.formats.filter,e)}filterLog(e){return d.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function h(e){return e&&"function"==typeof e.isCommunityResource}function p(e){return h(e)&&e.isCommunityResource()}let y=!1;function b(){y||(y=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}},55538:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AlchemyProvider:()=>k,AlchemyWebSocketProvider:()=>_,AnkrProvider:()=>P,BaseProvider:()=>o.Zk,CloudflareProvider:()=>C,EtherscanProvider:()=>V,FallbackProvider:()=>ie,Formatter:()=>a.Mb,InfuraProvider:()=>ce,InfuraWebSocketProvider:()=>se,IpcProvider:()=>oe,JsonRpcBatchProvider:()=>le,JsonRpcProvider:()=>c.r,JsonRpcSigner:()=>c.C,NodesmithProvider:()=>de,PocketProvider:()=>ye,Provider:()=>n.zt,Resolver:()=>o.H2,StaticJsonRpcProvider:()=>v,UrlJsonRpcProvider:()=>w,Web3Provider:()=>be.Q,WebSocketProvider:()=>b,getDefaultProvider:()=>me,getNetwork:()=>i.H,isCommunityResourcable:()=>a.Ed,isCommunityResource:()=>a.Gp,showThrottleMessage:()=>a.vh});var n=r(64353),i=r(79861),o=r(75361),f=r(53587),a=r(30032),s=r(2593),c=r(82169),l=r(80711),u=r(34216);let d=null;try{if(d=WebSocket,null==d)throw new Error("inject please")}catch(e){const t=new l.Logger(u.i);d=function(){t.throwError("WebSockets not supported in this environment",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const p=new l.Logger(u.i);let y=1;class b extends c.r{constructor(e,t){"any"===t&&p.throwError("WebSocketProvider does not support 'any' network yet",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"==typeof e?(0,f.defineReadOnly)(this,"_websocket",new d(this.connection.url)):(0,f.defineReadOnly)(this,"_websocket",e),(0,f.defineReadOnly)(this,"_requests",{}),(0,f.defineReadOnly)(this,"_subs",{}),(0,f.defineReadOnly)(this,"_subIds",{}),(0,f.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),(0,f.defineReadOnly)(e,"code",r.error.code||null),(0,f.defineReadOnly)(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){p.throwError("cannot reset events block on WebSocketProvider",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){p.throwError("cannot set polling interval on WebSocketProvider",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return h(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&p.throwError("cannot set polling on WebSocketProvider",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=y++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return h(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=s.O$.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return h(this,void 0,void 0,(function*(){this.websocket.readyState===d.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}var g=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const m=new l.Logger(u.i);class v extends c.r{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return g(this,void 0,void 0,(function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||m.throwError("no network detected",l.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,f.defineReadOnly)(this,"_network",t),this.emit("network",t,null))),t}))}}class w extends v{constructor(e,t){m.checkAbstract(new.target,w),e=(0,f.getStatic)(new.target,"getNetwork")(e),t=(0,f.getStatic)(new.target,"getApiKey")(t);super((0,f.getStatic)(new.target,"getUrl")(e,t),e),"string"==typeof t?(0,f.defineReadOnly)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,f.defineReadOnly)(this,e,t[e])}))}_startPending(){m.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return m.throwError("API provider does not support signing",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return m.throwError("not implemented; sub-classes must override getUrl",l.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const A=new l.Logger(u.i),E="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class _ extends b{constructor(e,t){const r=new k(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,f.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===E}}class k extends w{static getWebSocketProvider(e,t){return new _(e,t)}static getApiKey(e){return null==e?E:(e&&"string"!=typeof e&&A.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:A.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===E&&(0,a.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===E}}const T=new l.Logger(u.i),S="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function x(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return T.throwArgumentError("unsupported network","name",e)}class P extends w{isCommunityResource(){return this.apiKey===S}static getApiKey(e){return null==e?S:e}static getUrl(e,t){null==t&&(t=S);const r={allowGzip:!0,url:"https://"+x(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===S&&(0,a.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const M=new l.Logger(u.i);class C extends w{static getApiKey(e){return null!=e&&M.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else M.throwArgumentError("unsupported network","network",arguments[0]);return r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return I(this,void 0,void 0,(function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number}return r.perform.call(this,e,t)}))}}var O=r(93286),B=r(13479),R=r(58341),D=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const N=new l.Logger(u.i);function U(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,O.hexValue)((0,O.hexlify)(n)):"accessList"===r?"["+(0,B.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,O.hexlify)(n),t[r]=n)}return t}function L(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function F(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function j(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function z(e,t,r){if("call"===e&&t.code===l.Logger.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,O.isHexString)(r))return r;N.throwError("missing revert data in call exception",l.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===l.Logger.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&N.throwError("insufficient funds for intrinsic transaction cost",l.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&N.throwError("nonce has already been used",l.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&N.throwError("replacement fee too low",l.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&N.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class V extends o.Zk{constructor(e,t){super(e),(0,f.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,f.defineReadOnly)(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return N.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return D(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?F:L;this.emit("debug",{action:"request",request:n,provider:this});const s={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&(0,a.vh)(),Promise.resolve(!0))};let c=null;i&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},c=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const l=yield(0,R.fetchJson)(s,c,o||F);return this.emit("debug",{action:"response",request:n,response:(0,f.deepCopy)(l),provider:this}),l}))}detectNetwork(){return D(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return D(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>z("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=U(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return z("call",e,t.transaction)}}case"estimateGas":{const e=U(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return z("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=j(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=j(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&N.throwError("unsupported topic count",l.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||N.throwError("unsupported topic format",l.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}var H=r(52472),K=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const G=new l.Logger(u.i);function q(){return(new Date).getTime()}function W(e){let t=null;for(let r=0;rt?null:(n+i)/2}function J(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(s.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>J(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"==typeof r?"[function]":J(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Y=1;function Z(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const X=[l.Logger.errors.CALL_EXCEPTION,l.Logger.errors.INSUFFICIENT_FUNDS,l.Logger.errors.NONCE_EXPIRED,l.Logger.errors.REPLACEMENT_UNDERPRICED,l.Logger.errors.UNPREDICTABLE_GAS_LIMIT],$=["address","args","errorArgs","errorSignature","method","transaction"];function ee(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function te(e,t,r){let n=J;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Q(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Q(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=(0,f.shallowCopy)(e)).confirmations=-1,J(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,f.shallowCopy)(e)).transactions=e.transactions.map((e=>((e=(0,f.shallowCopy)(e)).confirmations=-1,e))),J(e))}:function(e){return null==e?null:J(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e=t)return r.result}}}(n,e.quorum)}function re(e,t){return K(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:(0,R.poll)((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function ne(e,t,r,n){return K(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,O.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,O.isHexString)(n.blockTag)&&(i=yield re(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,O.isHexString)(n.blockTag)&&(i=yield re(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,O.isHexString)(n.blockTag)&&(i=yield re(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,O.isHexString)(r.fromBlock)||r.toBlock&&(0,O.isHexString)(r.toBlock))&&(i=yield re(e,t)),i.getLogs(r)}}return G.throwError("unknown method error",l.Logger.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class ie extends o.Zk{constructor(e,t){0===e.length&&G.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(n.zt.isProvider(e)){const t=(0,a.Gp)(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,f.shallowCopy)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=(0,a.Gp)(e)?2e3:750),null==r.weight&&(r.weight=1);const i=r.weight;return(i%1||i>512||i<1)&&G.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,i),Object.freeze(r)})),i=r.reduce(((e,t)=>e+t.weight),0);null==t?t=i/2:t>i&&G.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let o=W(r.map((e=>e.provider.network)));null==o&&(o=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(o),(0,f.defineReadOnly)(this,"providerConfigs",Object.freeze(r)),(0,f.defineReadOnly)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return K(this,void 0,void 0,(function*(){return W(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return K(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;te.priority-t.priority));const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const s=q();let c=n.filter((e=>e.runner&&s-e.starte+t.weight),0);for(;c{r.staller=null})),r.runner=ne(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:ee(r,q()),request:{method:e,params:(0,f.deepCopy)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:ee(r,q()),request:{method:e,params:(0,f.deepCopy)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:ee(r,null),request:{method:e,params:(0,f.deepCopy)(t)},provider:this}),c+=r.weight}const l=[];n.forEach((e=>{!e.done&&e.runner&&(l.push(e.runner),e.staller&&l.push(e.staller.getPromise()))})),l.length&&(yield Promise.race(l));const u=n.filter((e=>e.done&&null==e.error));if(u.length>=this.quorum){const e=r(u);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;a||(yield Z(100).getPromise()),a=!1}const d=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return X.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(d).forEach((e=>{const t=d[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};$.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),G.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),G.throwError("failed to meet quorum",l.Logger.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>ee(e))),provider:this})}))}}const oe=null,fe=new l.Logger(u.i),ae="84842078b09946638c03157f83405213";class se extends b{constructor(e,t){const r=new ce(e,t),n=r.connection;n.password&&fe.throwError("INFURA WebSocket project secrets unsupported",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,f.defineReadOnly)(this,"apiKey",r.projectId),(0,f.defineReadOnly)(this,"projectId",r.projectId),(0,f.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===ae}}class ce extends w{static getWebSocketProvider(e,t){return new se(e,t)}static getApiKey(e){const t={apiKey:ae,projectId:ae,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(fe.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),fe.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:fe.throwError("unsupported network",l.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===ae&&(0,a.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===ae}}class le extends c.r{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:(0,f.deepCopy)(t),provider:this}),(0,R.fetchJson)(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const ue=new l.Logger(u.i);class de extends w{static getApiKey(e){return e&&"string"!=typeof e&&ue.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){ue.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:ue.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const he=new l.Logger(u.i),pe="62e1ad51b37b8e00394bda3b";class ye extends w{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=pe:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:he.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:he.throwError("unsupported network",l.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===pe}}var be=r(241);const ge=new l.Logger(u.i);function me(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new c.r(e);case"ws":case"wss":return new b(e);default:ge.throwArgumentError("unsupported URL scheme","network",e)}}const r=(0,i.H)(e);return r&&r._defaultProvider||ge.throwError("unsupported getDefaultProvider network",l.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ie,AlchemyProvider:k,AnkrProvider:P,CloudflareProvider:C,EtherscanProvider:V,InfuraProvider:ce,JsonRpcProvider:c.r,NodesmithProvider:de,PocketProvider:ye,Web3Provider:be.Q,IpcProvider:oe},t)}},82169:(e,t,r)=>{"use strict";r.d(t,{C:()=>_,r:()=>S});var n=r(48171),i=r(2593),o=r(93286),f=r(67827),a=r(53587),s=r(44242),c=r(13479),l=r(58341),u=r(80711),d=r(34216),h=r(75361),p=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const y=new u.Logger(d.i),b=["call","estimateGas"];function g(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=(0,o.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=g(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return g(JSON.parse(e),t)}catch(e){}return null}function m(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=g(t,!0);if(e)return e.data;y.throwError("missing revert data in call exception; Transaction reverted without a reason string",u.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=g(t.body,!1);null==r&&(r=g(t,!1)),r&&y.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",u.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===u.Logger.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&y.throwError("insufficient funds for intrinsic transaction cost",u.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&y.throwError("nonce has already been used",u.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&y.throwError("replacement fee too low",u.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&y.throwError("legacy pre-eip-155 transactions not supported",u.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),b.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&y.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",u.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function v(e){return new Promise((function(t){setTimeout(t,e)}))}function w(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function A(e){return e?e.toLowerCase():e}const E={};class _ extends n.E{constructor(e,t,r){if(super(),e!==E)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,a.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,a.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,a.defineReadOnly)(this,"_index",null)):"number"==typeof r?((0,a.defineReadOnly)(this,"_index",r),(0,a.defineReadOnly)(this,"_address",null)):y.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return y.throwError("cannot alter JSON-RPC Signer connection",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new k(E,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&y.throwError("unknown account #"+this._index,u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,a.shallowCopy)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,a.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>p(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&y.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,a.resolveProperties)({tx:(0,a.resolveProperties)(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&y.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&y.throwError("user rejected transaction",u.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),m("sendTransaction",e,n))))}))}signTransaction(e){return y.throwError("signing transactions is unsupported",u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return p(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield(0,l.poll)((()=>p(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return p(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,s.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&y.throwError("user rejected signing",u.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return p(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,s.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&y.throwError("user rejected signing",u.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return p(this,void 0,void 0,(function*(){const n=yield f.E.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(f.E.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&y.throwError("user rejected signing",u.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return p(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class k extends _{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const T={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class S extends h.Zk{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,a.getStatic)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,a.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,a.defineReadOnly)(this,"connection",Object.freeze((0,a.shallowCopy)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return p(this,void 0,void 0,(function*(){yield v(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=(0,a.getStatic)(this.constructor,"getNetwork");try{return t(i.O$.from(e).toNumber())}catch(t){return y.throwError("could not detect network",u.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return y.throwError("could not detect network",u.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new _(E,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,a.deepCopy)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=(0,l.fetchJson)(this.connection,JSON.stringify(r),w).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[A(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[A(t.address),t.blockTag]];case"getCode":return["eth_getCode",[A(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[A(t.address),(0,o.hexZeroPad)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,a.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=A(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return p(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&i.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,a.shallowCopy)(t)).transaction=(0,a.shallowCopy)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&y.throwError(e+" not implemented",u.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return m(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return v(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,a.shallowCopy)(T);if(t)for(const e in t)t[e]&&(r[e]=!0);(0,a.checkProperties)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,o.hexValue)(i.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,o.hexlify)(e[t]))})),e.accessList&&(n.accessList=(0,c.accessListify)(e.accessList)),n}}},241:(e,t,r)=>{"use strict";r.d(t,{Q:()=>l});var n=r(53587),i=r(80711),o=r(34216),f=r(82169);const a=new i.Logger(o.i);let s=1;function c(e,t){const r="Web3LegacyFetcher";return function(e,i){const o={method:e,params:i,id:s++,jsonrpc:"2.0"};return new Promise(((e,i)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,n.deepCopy)(o),provider:this}),t(o,((t,n)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:o,provider:this}),i(t);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:n,provider:this}),n.error){const e=new Error(n.error.message);return e.code=n.error.code,e.data=n.error.data,i(e)}e(n.result)}))}))}}class l extends f.r{constructor(e,t){null==e&&a.throwArgumentError("missing provider","provider",e);let r=null,i=null,o=null;"function"==typeof e?(r="unknown:",i=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),o=e,e.request?(""===r&&(r="eip-1193:"),i=function(e){return function(t,r){null==r&&(r=[]);const i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,n.deepCopy)(i),provider:this}),e.request(i).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:this}),e}))}}(e)):e.sendAsync?i=c(0,e.sendAsync.bind(e)):e.send?i=c(0,e.send.bind(e)):a.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,n.defineReadOnly)(this,"jsonRpcFetchFunc",i),(0,n.defineReadOnly)(this,"provider",o)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}},22118:(e,t,r)=>{"use strict";r.r(t),r.d(t,{randomBytes:()=>n.O,shuffled:()=>i.y});var n=r(44478),i=r(52472)},44478:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(93286),i=r(80711);const o=new i.Logger("random/5.7.0");const f=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let a=f.crypto||f.msCrypto;function s(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return a.getRandomValues(t),(0,n.arrayify)(t)}a&&a.getRandomValues||(o.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(e){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},52472:(e,t,r)=>{"use strict";function n(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}r.d(t,{y:()=>n})},61843:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>c});var n=r(93286),i=r(80711);const o=new i.Logger("rlp/5.7.0");function f(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function a(e,t,r){let n=0;for(let i=0;it+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:f}}function u(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});const n=a(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});const f=a(e,t+1,r);t+1+r+f>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r+f,result:(0,n.hexlify)(e.slice(t+1+r,t+1+r+f))}}if(e[t]>=128){const r=e[t]-128;t+1+r>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+r,result:(0,n.hexlify)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.hexlify)(e[t])}}function d(e){const t=(0,n.arrayify)(e),r=u(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},91278:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SupportedAlgorithm:()=>i.p,computeHmac:()=>n.Gy,ripemd160:()=>n.bP,sha256:()=>n.JQ,sha512:()=>n.o});var n=r(77158),i=r(21261)},77158:(e,t,r)=>{"use strict";r.d(t,{Gy:()=>d,bP:()=>c,JQ:()=>l,o:()=>u});var n=r(33715),i=r.n(n),o=r(93286),f=r(21261),a=r(80711);const s=new a.Logger("sha2/5.7.0");function c(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function l(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function u(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function d(e,t,r){return f.p[e]||s.throwError("unsupported algorithm "+e,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.arrayify)(t)).update((0,o.arrayify)(r)).digest("hex")}},21261:(e,t,r)=>{"use strict";var n;r.d(t,{p:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},62768:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SigningKey:()=>Q,computePublicKey:()=>Y,recoverPublicKey:()=>J});var n=r(13550),i=r.n(n),o=r(33715),f=r.n(o);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;function a(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}var s=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var l=a((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>8,f=255&i;o?r.push(o,f):r.push(f)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),u=a((function(e,t){var r=t;r.assert=s,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-s:s,o.isubn(a)):a=0,n[f]=a,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var f,a,s=e.andln(3)+i&3,c=t.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),f=0==(1&s)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?s:-s,r[0].push(f),a=0==(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==s?c:-c,r[1].push(a),2*i===f+1&&(i=1-i),2*o===a+1&&(o=1-o),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(i())(e,"hex","le")}})),d=u.getNAF,h=u.getJSF,p=u.assert;function y(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(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 b=y;function g(e,t){this.curve=e,this.type=t,this.precomputed=null}y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<=o;s--)f=(f<<1)+n[s];a.push(f)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),u=i;u>0;u--){for(o=0;o=0;a--){for(var s=0;a>=0&&0===o[a];a--)s++;if(a>=0&&s++,f=f.dblp(s),a<0)break;var c=o[a];p(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},y.prototype._wnafMulAdd=function(e,t,r,n,i){var o,f,a,s=this._wnafT1,c=this._wnafT2,l=this._wnafT3,u=0;for(o=0;o=1;o-=2){var y=o-1,b=o;if(1===s[y]&&1===s[b]){var g=[t[y],null,null,t[b]];0===t[y].y.cmp(t[b].y)?(g[1]=t[y].add(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg())):0===t[y].y.cmp(t[b].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].add(t[b].neg())):(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[y],r[b]);for(u=Math.max(v[0].length,u),l[y]=new Array(u),l[b]=new Array(u),f=0;f=0;o--){for(var k=0;o>=0;){var T=!0;for(f=0;f=0&&k++,E=E.dblp(k),o<0)break;for(f=0;f0?a=c[f][S-1>>1]:S<0&&(a=c[f][-S-1>>1].neg()),E="affine"===a.type?E.mixedAdd(a):E.add(a))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},g.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(f=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),f.negative&&(f=f.neg(),a=a.neg()),[{a:n,b:o},{a:f,b:a}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),f=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(f).sub(a),k2:s.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new(i())(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 o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.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)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},E.prototype.isInfinity=function(){return this.inf},E.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)},E.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),o=i.redSqr().redISub(this.x.redAdd(this.x)),f=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,f)},E.prototype.getX=function(){return this.x.fromRed()},E.prototype.getY=function(){return this.y.fromRed()},E.prototype.mul=function(e){return e=new(i())(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)},E.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)},E.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)},E.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))},E.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},E.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},m(_,b.BasePoint),w.prototype.jpoint=function(e,t,r){return new _(this,e,t,r)},_.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)},_.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},_.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),o=this.y.redMul(t.redMul(e.z)),f=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),s=o.redSub(f);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),u=n.redMul(c),d=s.redSqr().redIAdd(l).redISub(u).redISub(u),h=s.redMul(u.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,p)},_.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,o=e.y.redMul(t).redMul(this.z),f=r.redSub(n),a=i.redSub(o);if(0===f.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=f.redSqr(),c=s.redMul(f),l=r.redMul(s),u=a.redSqr().redIAdd(c).redISub(l).redISub(l),d=a.redMul(l.redISub(u)).redISub(i.redMul(c)),h=this.z.redMul(f);return this.curve.jpoint(u,d,h)},_.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=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},_.prototype.inspect=function(){return this.isInfinity()?"":""},_.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var k=a((function(e,t){var r=t;r.base=b,r.short=A,r.mont=null,r.edwards=null})),T=a((function(e,t){var r,n=t,i=u.assert;function o(e){"short"===e.type?this.curve=new k.short(e):"edwards"===e.type?this.curve=new k.edwards(e):this.curve=new k.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 a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("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:f().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("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:f().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("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:f().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("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:f().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"]}),a("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:f().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"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f().sha256,gRed:!1,g:["9"]}),a("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:f().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("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:f().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(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=l.toArray(e.entropy,e.entropyEnc||"hex"),r=l.toArray(e.nonce,e.nonceEnc||"hex"),n=l.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var x=S;S.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.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.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=l.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length"};var C=u.assert;function O(e,t){if(e instanceof O)return e;this._importDER(e,t)||(C(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var B=O;function R(){this.place=0}function D(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,o=0,f=t.place;o>>=0;return!(i<=127)&&(t.place=f,i)}function N(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}O.prototype._importDER=function(e,t){e=u.toArray(e,t);var r=new R;if(48!==e[r.place++])return!1;var n=D(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=D(e,r);if(!1===o)return!1;var f=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var a=D(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new(i())(f),this.s=new(i())(s),this.recoveryParam=null,!0},O.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=N(t),r=N(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];U(n,t.length),(n=n.concat(t)).push(2),U(n,r.length);var i=n.concat(r),o=[48];return U(o,i.length),o=o.concat(i),u.encode(o,e)};var L=function(){throw new Error("unsupported")},F=u.assert;function j(e){if(!(this instanceof j))return new j(e);"string"==typeof e&&(F(Object.prototype.hasOwnProperty.call(T,e),"Unknown curve "+e),e=T[e]),e instanceof T.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 z=j;j.prototype.keyPair=function(e){return new M(this,e)},j.prototype.keyFromPrivate=function(e,t){return M.fromPrivate(this,e,t)},j.prototype.keyFromPublic=function(e,t){return M.fromPublic(this,e,t)},j.prototype.genKeyPair=function(e){e||(e={});for(var t=new x({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||L(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},j.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},j.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(i())(e,16));for(var o=this.n.byteLength(),f=t.getPrivate().toArray("be",o),a=e.toArray("be",o),s=new x({hash:this.hash,entropy:f,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new(i())(1)),l=0;;l++){var u=n.k?n.k(l):new(i())(s.generate(this.n.byteLength()));if(!((u=this._truncateToN(u,!0)).cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var y=u.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return n.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new B({r:p,s:y,recoveryParam:b})}}}}}},j.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o=(t=new B(t,"hex")).r,f=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var a,s=f.invm(this.n),c=s.mul(e).umod(this.n),l=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},j.prototype.recoverPubKey=function(e,t,r,n){F((3&r)===r,"The recovery param is more than two bits"),t=new B(t,n);var o=this.n,f=new(i())(e),a=t.r,s=t.s,c=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var u=t.r.invm(o),d=o.sub(f).mul(u).umod(o),h=s.mul(u).umod(o);return this.g.mulAdd(d,a,h)},j.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new B(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var V=a((function(e,t){var r=t;r.version="6.5.4",r.utils=u,r.rand=function(){throw new Error("unsupported")},r.curve=k,r.curves=T,r.ec=z,r.eddsa=null})).ec,H=r(93286),K=r(53587);const G=new(r(80711).Logger)("signing-key/5.7.0");let q=null;function W(){return q||(q=new V("secp256k1")),q}class Q{constructor(e){(0,K.defineReadOnly)(this,"curve","secp256k1"),(0,K.defineReadOnly)(this,"privateKey",(0,H.hexlify)(e)),32!==(0,H.hexDataLength)(this.privateKey)&&G.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=W().keyFromPrivate((0,H.arrayify)(this.privateKey));(0,K.defineReadOnly)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,K.defineReadOnly)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,K.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(e){const t=W().keyFromPublic((0,H.arrayify)(this.publicKey)),r=W().keyFromPublic((0,H.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=(0,H.arrayify)(e);32!==r.length&&G.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,H.splitSignature)({recoveryParam:n.recoveryParam,r:(0,H.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,H.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=W().keyFromPrivate((0,H.arrayify)(this.privateKey)),r=W().keyFromPublic((0,H.arrayify)(Y(e)));return(0,H.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function J(e,t){const r=(0,H.splitSignature)(t),n={r:(0,H.arrayify)(r.r),s:(0,H.arrayify)(r.s)};return"0x"+W().recoverPubKey((0,H.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function Y(e,t){const r=(0,H.arrayify)(e);if(32===r.length){const e=new Q(r);return t?"0x"+W().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,H.hexlify)(r):"0x"+W().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+W().keyFromPublic(r).getPublic(!0,"hex"):(0,H.hexlify)(r):G.throwArgumentError("invalid public or private key","key","[REDACTED]")}},33777:(e,t,r)=>{"use strict";r.r(t),r.d(t,{keccak256:()=>b,pack:()=>y,sha256:()=>g});var n=r(2593),i=r(93286),o=r(38197),f=r(77158),a=r(44242),s=r(80711);const c=new RegExp("^bytes([0-9]+)$"),l=new RegExp("^(u?int)([0-9]*)$"),u=new RegExp("^(.*)\\[([0-9]*)\\]$"),d="0000000000000000000000000000000000000000000000000000000000000000",h=new s.Logger("solidity/5.7.0");function p(e,t,r){switch(e){case"address":return r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t);case"string":return(0,a.Y0)(t);case"bytes":return(0,i.arrayify)(t);case"bool":return t=t?"0x01":"0x00",r?(0,i.zeroPad)(t,32):(0,i.arrayify)(t)}let o=e.match(l);if(o){let f=parseInt(o[2]||"256");return(o[2]&&String(f)!==o[2]||f%8!=0||0===f||f>256)&&h.throwArgumentError("invalid number type","type",e),r&&(f=256),t=n.O$.from(t).toTwos(f),(0,i.zeroPad)(t,f/8)}if(o=e.match(c),o){const n=parseInt(o[1]);return(String(n)!==o[1]||0===n||n>32)&&h.throwArgumentError("invalid bytes type","type",e),(0,i.arrayify)(t).byteLength!==n&&h.throwArgumentError(`invalid value for ${e}`,"value",t),r?(0,i.arrayify)((t+d).substring(0,66)):t}if(o=e.match(u),o&&Array.isArray(t)){const r=o[1];parseInt(o[2]||String(t.length))!=t.length&&h.throwArgumentError(`invalid array length for ${e}`,"value",t);const n=[];return t.forEach((function(e){n.push(p(r,e,!0))})),(0,i.concat)(n)}return h.throwArgumentError("invalid type","type",e)}function y(e,t){e.length!=t.length&&h.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(p(e,t[n]))})),(0,i.hexlify)((0,i.concat)(r))}function b(e,t){return(0,o.keccak256)(y(e,t))}function g(e,t){return(0,f.JQ)(y(e,t))}},86237:(e,t,r)=>{"use strict";r.d(t,{F:()=>a,s:()=>f});var n=r(57218),i=r(93286),o=r(44242);function f(e){const t=(0,o.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.R]).slice(0,32))}function a(e){const t=(0,i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,o.ZN)(t.slice(0,r))}},35637:(e,t,r)=>{"use strict";r.d(t,{Ll:()=>p});var n=r(44242);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function o(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function f(e,t){let r=0;for(let n=0;n=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const a=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),s="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),c=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],l=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),u=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r{if(s.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=f(e,c);if(t)return[e+t.s];let r=l[e];if(r)return r;let n=u[e];return n?[e+n[0]]:d[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,n.XL)((0,n.uu)(t),n.Uj.NFKC),t.forEach((e=>{if(f(e,h))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(f(e,a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let i=(0,n.uu)(t);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");return i}},62741:(e,t,r)=>{"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:()=>o.Uj,Utf8ErrorFuncs:()=>o.te,Utf8ErrorReason:()=>o.Uw,_toEscapedUtf8String:()=>o.U$,formatBytes32String:()=>n.s,nameprep:()=>i.Ll,parseBytes32String:()=>n.F,toUtf8Bytes:()=>o.Y0,toUtf8CodePoints:()=>o.XL,toUtf8String:()=>o.ZN});var n=r(86237),i=r(35637),o=r(44242)},44242:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>s,Uw:()=>f,U$:()=>d,uu:()=>h,Y0:()=>l,XL:()=>y,ZN:()=>p});var n=r(93286);const i=new(r(80711).Logger)("strings/5.7.0");var o,f;function a(e,t,r,n,i){if(e===f.BAD_PREFIX||e===f.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===f.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(f||(f={}));const s=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:a,replace:function(e,t,r,n,i){return e===f.OVERLONG?(n.push(i),0):(n.push(65533),a(e,t,r))}});function c(e,t){null==t&&(t=s.error),e=(0,n.arrayify)(e);const r=[];let i=0;for(;i>7==0){r.push(n);continue}let o=null,a=null;if(192==(224&n))o=1,a=127;else if(224==(240&n))o=2,a=2047;else{if(240!=(248&n)){i+=t(128==(192&n)?f.UNEXPECTED_CONTINUE:f.BAD_PREFIX,i-1,e,r);continue}o=3,a=65535}if(i-1+o>=e.length){i+=t(f.OVERRUN,i-1,e,r);continue}let s=n&(1<<8-o-1)-1;for(let n=0;n1114111?i+=t(f.OUT_OF_RANGE,i-1-o,e,r,s):s>=55296&&s<=57343?i+=t(f.UTF16_SURROGATE,i-1-o,e,r,s):s<=a?i+=t(f.OVERLONG,i-1-o,e,r,s):r.push(s))}return r}function l(e,t=o.current){t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.arrayify)(r)}function u(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+c(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?u(e):u(55296+((e-=65536)>>10&1023))+u(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function p(e,t){return h(c(e,t))}function y(e,t=o.current){return c(l(e,t))}},13479:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TransactionTypes:()=>h,accessListify:()=>E,computeAddress:()=>m,parse:()=>P,recoverAddress:()=>v,serialize:()=>S});var n=r(64594),i=r(2593),o=r(93286),f=r(21046),a=r(38197),s=r(53587),c=r(61843),l=r(62768),u=r(80711);const d=new u.Logger("transactions/5.7.0");var h;function p(e){return"0x"===e?null:(0,n.getAddress)(e)}function y(e){return"0x"===e?f._Y:i.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(h||(h={}));const b=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],g={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function m(e){const t=(0,l.computePublicKey)(e);return(0,n.getAddress)((0,o.hexDataSlice)((0,a.keccak256)((0,o.hexDataSlice)(t,1)),12))}function v(e,t){return m((0,l.recoverPublicKey)((0,o.arrayify)(e),t))}function w(e,t){const r=(0,o.stripZeros)(i.O$.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,n.getAddress)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.hexDataLength)(t)&&d.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function E(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),A(e[0],e[1])):A(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return A(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function _(e){return E(e).map((e=>[e.address,e.storageKeys]))}function k(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x02",c.encode(r)])}function T(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.getAddress)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",_(e.accessList||[])];if(t){const e=(0,o.splitSignature)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.stripZeros)(e.r)),r.push((0,o.stripZeros)(e.s))}return(0,o.hexConcat)(["0x01",c.encode(r)])}function S(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,s.checkProperties)(e,g);const r=[];b.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.arrayify)((0,o.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.stripZeros)(n),n.length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.hexlify)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&d.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return c.encode(r);const i=(0,o.splitSignature)(t);let f=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),f+=2*n+8,i.v>28&&i.v!==f&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==f&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.hexlify)(f)),r.push((0,o.stripZeros)((0,o.arrayify)(i.r))),r.push((0,o.stripZeros)((0,o.arrayify)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return T(e,t);case 2:return k(e,t)}return d.throwError(`unsupported transaction type: ${e.type}`,u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function x(e,t,r){try{const r=y(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.hexZeroPad)(t[1],32),e.s=(0,o.hexZeroPad)(t[2],32);try{const t=(0,a.keccak256)(r(e));e.from=v(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function P(e){const t=(0,o.arrayify)(e);if(t[0]>127)return function(e){const t=c.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:y(t[0]).toNumber(),gasPrice:y(t[1]),gasLimit:y(t[2]),to:p(t[3]),value:y(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.O$.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,o.hexZeroPad)(t[7],32),r.s=(0,o.hexZeroPad)(t[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push((0,o.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const f=(0,a.keccak256)(c.encode(i));try{r.from=v(f,{r:(0,o.hexlify)(r.r),s:(0,o.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,a.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.hexlify)(e));const r={type:1,chainId:y(t[0]).toNumber(),nonce:y(t[1]).toNumber(),gasPrice:y(t[2]),gasLimit:y(t[3]),to:p(t[4]),value:y(t[5]),data:t[6],accessList:E(t[7])};return 8===t.length||(r.hash=(0,a.keccak256)(e),x(r,t.slice(8),T)),r}(t);case 2:return function(e){const t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.hexlify)(e));const r=y(t[2]),n=y(t[3]),i={type:2,chainId:y(t[0]).toNumber(),nonce:y(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:y(t[4]),to:p(t[5]),value:y(t[6]),data:t[7],accessList:E(t[8])};return 9===t.length||(i.hash=(0,a.keccak256)(e),x(i,t.slice(9),k)),i}(t)}return d.throwError(`unsupported transaction type: ${t[0]}`,u.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},46441:(e,t,r)=>{"use strict";r.r(t),r.d(t,{commify:()=>f,formatEther:()=>c,formatUnits:()=>a,parseEther:()=>l,parseUnits:()=>s});var n=r(20335);const i=new(r(80711).Logger)("units/5.7.0"),o=["wei","kwei","mwei","gwei","szabo","finney","ether"];function f(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&i.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);const f=[];for(;r.length;){if(r.length<=3){f.unshift(r);break}{const e=r.length-3;f.unshift(r.substring(e)),r=r.substring(0,e)}}return n+f.join(",")+o}function a(e,t){if("string"==typeof t){const e=o.indexOf(t);-1!==e&&(t=3*e)}return(0,n.S5)(e,null!=t?t:18)}function s(e,t){if("string"!=typeof e&&i.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=o.indexOf(t);-1!==e&&(t=3*e)}return(0,n.Ox)(e,null!=t?t:18)}function c(e){return a(e,18)}function l(e){return s(e,18)}},44958:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Wallet:()=>w,verifyMessage:()=>A,verifyTypedData:()=>E});var n=r(64594),i=r(64353),o=r(48171),f=r(93286),a=r(93684),s=r(67827),c=r(36274),l=r(38197),u=r(53587),d=r(44478),h=r(62768),p=r(81964),y=r(19380),b=r(13479),g=r(80711);var m=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const v=new g.Logger("wallet/5.7.0");class w extends o.E{constructor(e,t){if(super(),null!=(r=e)&&(0,f.isHexString)(r.privateKey,32)&&null!=r.address){const t=new h.SigningKey(e.privateKey);if((0,u.defineReadOnly)(this,"_signingKey",(()=>t)),(0,u.defineReadOnly)(this,"address",(0,b.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(e.address)&&v.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,u.defineReadOnly)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||c.defaultPath,locale:t.locale||"en"})));const r=this.mnemonic,n=c.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,b.computeAddress)(n.privateKey)!==this.address&&v.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,u.defineReadOnly)(this,"_mnemonic",(()=>null))}else{if(h.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&v.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,u.defineReadOnly)(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new h.SigningKey(e);(0,u.defineReadOnly)(this,"_signingKey",(()=>t))}(0,u.defineReadOnly)(this,"_mnemonic",(()=>null)),(0,u.defineReadOnly)(this,"address",(0,b.computeAddress)(this.publicKey))}var r;t&&!i.zt.isProvider(t)&&v.throwArgumentError("invalid provider","provider",t),(0,u.defineReadOnly)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new w(this,e)}signTransaction(e){return(0,u.resolveProperties)(e).then((t=>{null!=t.from&&((0,n.getAddress)(t.from)!==this.address&&v.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,l.keccak256)((0,b.serialize)(t)));return(0,b.serialize)(t,r)}))}signMessage(e){return m(this,void 0,void 0,(function*(){return(0,f.joinSignature)(this._signingKey().signDigest((0,a.r)(e)))}))}_signTypedData(e,t,r){return m(this,void 0,void 0,(function*(){const n=yield s.E.resolveNames(e,t,r,(e=>(null==this.provider&&v.throwError("cannot resolve ENS names without a provider",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,f.joinSignature)(this._signingKey().signDigest(s.E.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),(0,p.HI)(this,e,t,r)}static createRandom(e){let t=(0,d.O)(16);e||(e={}),e.extraEntropy&&(t=(0,f.arrayify)((0,f.hexDataSlice)((0,l.keccak256)((0,f.concat)([t,e.extraEntropy])),0,16)));const r=(0,c.entropyToMnemonic)(t,e.locale);return w.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,y.decryptJsonWallet)(e,t,r).then((e=>new w(e)))}static fromEncryptedJsonSync(e,t){return new w((0,y.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=c.defaultPath),new w(c.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function A(e,t){return(0,b.recoverAddress)((0,a.r)(e),t)}function E(e,t,r,n){return(0,b.recoverAddress)(s.E.hash(e,t,r),n)}},58341:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_fetchData:()=>p,fetchJson:()=>y,poll:()=>b});var n=r(59567),i=r(93286),o=r(53587),f=r(44242),a=r(80711);var s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};function c(e,t){return s(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),o=yield n.arrayBuffer(),f={};return n.headers.forEach?n.headers.forEach(((e,t)=>{f[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{f[e.toLowerCase()]=n.headers.get(e)})),{headers:f,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}}))}var l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))};const u=new a.Logger("web/5.7.1");function d(e){return new Promise((t=>{setTimeout(t,e)}))}function h(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,f.ZN)(e)}catch(e){}return(0,i.hexlify)(e)}return e}function p(e,t,r){const i="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;u.assertArgument(i>0&&i%1==0,"invalid connection throttle limit","connection.throttleLimit",i);const s="object"==typeof e?e.throttleCallback:null,p="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;u.assertArgument(p>0&&p%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",p);const y="object"==typeof e&&!!e.errorPassThrough,b={};let g=null;const m={method:"GET"};let v=!1,w=12e4;if("string"==typeof e)g=e;else if("object"==typeof e){if(null!=e&&null!=e.url||u.throwArgumentError("missing URL","connection.url",e),g=e.url,"number"==typeof e.timeout&&e.timeout>0&&(w=e.timeout),e.headers)for(const t in e.headers)b[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(v=!0);if(m.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==g.substring(0,6)&&!0!==e.allowInsecureAuthentication&&u.throwError("basic authentication requires a secure https url",a.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:g,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;b.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,f.Y0)(t))}}null!=e.skipFetchSetup&&(m.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(m.fetchOptions=(0,o.shallowCopy)(e.fetchOptions))}const A=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=g?g.match(A):null;if(E)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?(0,n.J)(E[3]):(_=E[3],(0,f.Y0)(_.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){u.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:h(E[1],E[2]),error:e,requestBody:null,requestMethod:"GET",url:g})}var _;t&&(m.method="POST",m.body=t,null==b["content-type"]&&(b["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==b["content-length"]&&(b["content-length"]={key:"Content-Length",value:String(t.length)}));const k={};Object.keys(b).forEach((e=>{const t=b[e];k[t.key]=t.value})),m.headers=k;const T=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(u.makeError("timeout",a.Logger.errors.TIMEOUT,{requestBody:h(m.body,k["content-type"]),requestMethod:m.method,timeout:w,url:g})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),S=function(){return l(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(T.cancel(),u.throwError("bad response",a.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:h(n,t.headers?t.headers["content-type"]:null),requestBody:h(m.body,k["content-type"]),requestMethod:m.method,url:g})),r)try{const e=yield r(n,t);return T.cancel(),e}catch(r){if(r.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return p(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,f.ZN)(e))}catch(t){u.throwError("invalid JSON",a.Logger.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function b(e,t){return t||(t={}),null==(t=(0,o.shallowCopy)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const f=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{f()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let s=0;!function i(){return e().then((function(e){if(void 0!==e)f()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(s++,s>a)return void(f()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,s)));et.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){f()&&n(e)}))}()}))}},48659:(e,t,r)=>{"use strict";r.d(t,{D:()=>a});var n=r(32046),i=r(53587),o=r(80711);const f=new o.Logger("wordlists/5.7.0");class a{constructor(e){f.checkAbstract(new.target,a),(0,i.defineReadOnly)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,n.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}},9855:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(48659);let i=null;function o(e){if(null==i&&(i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(e)))throw i=null,new Error("BIP39 Wordlist for en (English) FAILED")}class f extends n.D{constructor(){super("en")}getWord(e){return o(this),i[e]}getWordIndex(e){return o(this),i.indexOf(e)}}const a=new f;n.D.register(a);const s={en:a}},39980:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AsnAnyConverter:()=>Mt,AsnArray:()=>yr,AsnBitStringConverter:()=>Dt,AsnBmpStringConverter:()=>Vt,AsnBooleanConverter:()=>Ut,AsnCharacterStringConverter:()=>Xt,AsnChoiceType:()=>sr,AsnConstructedOctetStringConverter:()=>Ft,AsnConvert:()=>br,AsnEnumeratedConverter:()=>Ot,AsnGeneralStringConverter:()=>Zt,AsnGeneralizedTimeConverter:()=>er,AsnGraphicStringConverter:()=>Jt,AsnIA5StringConverter:()=>Qt,AsnIntegerArrayBufferConverter:()=>Bt,AsnIntegerBigIntConverter:()=>Rt,AsnIntegerConverter:()=>Ct,AsnNullConverter:()=>tr,AsnNumericStringConverter:()=>Kt,AsnObjectIdentifierConverter:()=>Nt,AsnOctetStringConverter:()=>Lt,AsnParser:()=>hr,AsnPrintableStringConverter:()=>Gt,AsnProp:()=>ur,AsnPropTypes:()=>Ee,AsnSchemaValidationError:()=>dr,AsnSequenceType:()=>lr,AsnSerializer:()=>pr,AsnSetType:()=>cr,AsnTeletexStringConverter:()=>qt,AsnType:()=>ar,AsnTypeTypes:()=>Ae,AsnUTCTimeConverter:()=>$t,AsnUniversalStringConverter:()=>Ht,AsnUtf8StringConverter:()=>zt,AsnVideotexStringConverter:()=>Wt,AsnVisibleStringConverter:()=>Yt,BitString:()=>Pt,OctetString:()=>It,defaultConverter:()=>rr});var n={};r.r(n),r.d(n,{Any:()=>Et,BaseBlock:()=>L,BaseStringBlock:()=>j,BitString:()=>Ne,BmpString:()=>nt,Boolean:()=>Oe,CharacterString:()=>pt,Choice:()=>_t,Constructed:()=>xe,DATE:()=>gt,DateTime:()=>vt,Duration:()=>wt,EndOfContent:()=>Ie,Enumerated:()=>Ve,GeneralString:()=>ht,GeneralizedTime:()=>bt,GraphicString:()=>ut,HexBlock:()=>O,IA5String:()=>lt,Integer:()=>ze,Null:()=>Me,NumericString:()=>ft,ObjectIdentifier:()=>Ge,OctetString:()=>Re,Primitive:()=>_e,PrintableString:()=>at,RawData:()=>Tt,RelativeObjectIdentifier:()=>Qe,Repeated:()=>kt,Sequence:()=>Je,Set:()=>Ye,TIME:()=>At,TeletexString:()=>st,TimeOfDay:()=>mt,UTCTime:()=>yt,UniversalString:()=>ot,Utf8String:()=>tt,ValueBlock:()=>R,VideotexString:()=>ct,ViewWriter:()=>h,VisibleString:()=>dt,compareSchema:()=>St,fromBER:()=>Te,verifySchema:()=>xt});var i=r(72043);function o(e,t){let r=0;if(1===e.length)return e[0];for(let n=e.length-1;n>=0;n--)r+=e[e.length-1-n]*Math.pow(2,t*n);return r}function f(e,t,r=-1){const n=r;let i=e,o=0,f=Math.pow(2,t);for(let r=1;r<8;r++){if(e=0;e--){const r=Math.pow(2,e*t);f[o-e-1]=Math.floor(i/r),i-=f[o-e-1]*r}return e}f*=Math.pow(2,t)}return new ArrayBuffer(0)}function a(...e){let t=0,r=0;for(const r of e)t+=r.length;const n=new ArrayBuffer(t),i=new Uint8Array(n);for(const t of e)i.set(t,r),r+=t.length;return i}function s(){const e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){const t=255===e[0]&&128&e[1],r=0===e[0]&&0==(128&e[1]);(t||r)&&this.warnings.push("Needlessly long format")}const t=new ArrayBuffer(this.valueHex.byteLength),r=new Uint8Array(t);for(let e=0;e=f.length)return this.error="End of input reached before message was fully decoded",-1;if(e===r){r+=255;const e=new Uint8Array(r);for(let r=0;r8)return this.error="Too big integer",-1;if(a+1>f.length)return this.error="End of input reached before message was fully decoded",-1;const s=t+1,c=n.subarray(s,s+a);return 0===c[a-1]&&this.warnings.push("Needlessly long encoded length"),this.length=o(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,t+this.blockLength}toBER(e=!1){let t,r;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return t=new ArrayBuffer(1),!1===e&&(r=new Uint8Array(t),r[0]=128),t;if(this.longFormUsed){const n=f(this.length,8);if(n.byteLength>127)return this.error="Too big length",x;if(t=new ArrayBuffer(n.byteLength+1),e)return t;const i=new Uint8Array(n);r=new Uint8Array(t),r[0]=128|n.byteLength;for(let e=0;e=37&&!1===i.idBlock.isHexOnly)return i.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:i};switch(i.idBlock.tagNumber){case 0:if(i.idBlock.isConstructed&&i.lenBlock.length>0)return i.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:i};a=U.EndOfContent;break;case 1:a=U.Boolean;break;case 2:a=U.Integer;break;case 3:a=U.BitString;break;case 4:a=U.OctetString;break;case 5:a=U.Null;break;case 6:a=U.ObjectIdentifier;break;case 10:a=U.Enumerated;break;case 12:a=U.Utf8String;break;case 13:a=U.RelativeObjectIdentifier;break;case 14:a=U.TIME;break;case 15:return i.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:i};case 16:a=U.Sequence;break;case 17:a=U.Set;break;case 18:a=U.NumericString;break;case 19:a=U.PrintableString;break;case 20:a=U.TeletexString;break;case 21:a=U.VideotexString;break;case 22:a=U.IA5String;break;case 23:a=U.UTCTime;break;case 24:a=U.GeneralizedTime;break;case 25:a=U.GraphicString;break;case 26:a=U.VisibleString;break;case 27:a=U.GeneralString;break;case 28:a=U.UniversalString;break;case 29:a=U.CharacterString;break;case 30:a=U.BmpString;break;case 31:a=U.DATE;break;case 32:a=U.TimeOfDay;break;case 33:a=U.DateTime;break;case 34:a=U.Duration;break;default:{const e=i.idBlock.isConstructed?new U.Constructed:new U.Primitive;e.idBlock=i.idBlock,e.lenBlock=i.lenBlock,e.warnings=i.warnings,i=e}}}else a=i.idBlock.isConstructed?U.Constructed:U.Primitive;return i=function(e,t){if(e instanceof t)return e;const r=new t;return r.idBlock=e.idBlock,r.lenBlock=e.lenBlock,r.warnings=e.warnings,r.valueBeforeDecodeView=e.valueBeforeDecodeView,r}(i,a),f=i.fromBER(e,t,i.lenBlock.isIndefiniteForm?r:i.lenBlock.length),i.valueBeforeDecodeView=e.subarray(n,n+i.blockLength),{offset:f,result:i}}function Te(e){if(!e.byteLength){const e=new L({},R);return e.error="Input buffer has zero length",{offset:-1,result:e}}return ke(i.vJ.toUint8Array(e).slice(),0,e.byteLength)}V=_e,U.Primitive=V,_e.NAME="PRIMITIVE";class Se extends R{constructor({value:e=[],isIndefiniteForm:t=!1,...r}={}){super(r),this.value=e,this.isIndefiniteForm=t}fromBER(e,t,r){const n=i.vJ.toUint8Array(e);if(!d(this,n,t,r))return-1;if(this.valueBeforeDecodeView=n.subarray(t,t+r),0===this.valueBeforeDecodeView.length)return this.warnings.push("Zero buffer length"),t;let o=t;for(;f=this.isIndefiniteForm,a=r,(f?1:a)>0;){const e=ke(n,o,r);if(-1===e.offset)return this.error=e.result.error,this.warnings.concat(e.result.warnings),-1;if(o=e.offset,this.blockLength+=e.result.blockLength,r-=e.result.blockLength,this.value.push(e.result),this.isIndefiniteForm&&e.result.constructor.NAME===I)break}var f,a;return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===I?this.value.pop():this.warnings.push("No EndOfContent block encoded")),o}toBER(e,t){const r=t||new h;for(let t=0;t` ${e}`)).join("\n"));const t=3===this.idBlock.tagClass?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :\n${e.join("\n")}`:`${t} :`}}H=xe,U.Constructed=H,xe.NAME="CONSTRUCTED";class Pe extends R{fromBER(e,t,r){return t}toBER(e){return x}}Pe.override="EndOfContentValueBlock";class Ie extends L{constructor(e={}){super(e,Pe),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}}K=Ie,U.EndOfContent=K,Ie.NAME=I;class Me extends L{constructor(e={}){super(e,R),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(e,t,r){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=r,t+r>e.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):t+r}toBER(e,t){const r=new ArrayBuffer(2);if(!e){const e=new Uint8Array(r);e[0]=5,e[1]=0}return t&&t.write(r),r}onAsciiEncoding(){return`${this.constructor.NAME}`}}G=Me,U.Null=G,Me.NAME="NULL";class Ce extends(O(R)){constructor({value:e,...t}={}){super(t),t.valueHex?this.valueHexView=i.vJ.toUint8Array(t.valueHex):this.valueHexView=new Uint8Array(1),e&&(this.value=e)}get value(){for(const e of this.valueHexView)if(e>0)return!0;return!1}set value(e){this.valueHexView[0]=e?255:0}fromBER(e,t,r){const n=i.vJ.toUint8Array(e);return d(this,n,t,r)?(this.valueHexView=n.subarray(t,t+r),r>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,s.call(this),this.blockLength=r,t+r):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}}Ce.NAME="BooleanValueBlock";class Oe extends L{constructor(e={}){super(e,Ce),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}}q=Oe,U.Boolean=q,Oe.NAME="BOOLEAN";class Be extends(O(Se)){constructor({isConstructed:e=!1,...t}={}){super(t),this.isConstructed=e}fromBER(e,t,r){let n=0;if(this.isConstructed){if(this.isHexOnly=!1,n=Se.prototype.fromBER.call(this,e,t,r),-1===n)return n;for(let e=0;e0&&r.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=r.unusedBits}return n}const o=i.vJ.toUint8Array(e);if(!d(this,o,t,r))return-1;const f=o.subarray(t,t+r);if(this.unusedBits=f[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){const e=f.subarray(1);try{if(e.byteLength){const t=ke(e,0,e.byteLength);-1!==t.offset&&t.offset===r-1&&(this.value=[t.result])}}catch(e){}}return this.valueHexView=f.subarray(1),this.blockLength=f.length,t+r}toBER(e,t){if(this.isConstructed)return Se.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return x;const r=new Uint8Array(this.valueHexView.length+1);return r[0]=this.unusedBits,r.set(this.valueHexView,1),r.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}}De.NAME="BitStringValueBlock";class Ne extends L{constructor({idBlock:e={},lenBlock:t={},...r}={}){var n,i;null!==(n=r.isConstructed)&&void 0!==n||(r.isConstructed=!!(null===(i=r.value)||void 0===i?void 0:i.length)),super({idBlock:{isConstructed:r.isConstructed,...e},lenBlock:{...t,isIndefiniteForm:!!r.isIndefiniteForm},...r},De),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(e,t,r){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(e,t,r)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return xe.prototype.onAsciiEncoding.call(this);{const e=[],t=this.valueBlock.valueHexView;for(const r of t)e.push(r.toString(2).padStart(8,"0"));const r=e.join("");return`${this.constructor.NAME} : ${r.substring(0,r.length-this.valueBlock.unusedBits)}`}}}function Ue(e,t){const r=new Uint8Array([0]),n=new Uint8Array(e),i=new Uint8Array(t);let o=n.slice(0);const f=o.length-1,s=i.slice(0),c=s.length-1;let l=0;let u=0;for(let e=c=0;e--,u++){if(!0==u=o.length)o=a(new Uint8Array([l%10]),o);else o[f-u]=l%10}return r[0]>0&&(o=a(r,o)),o}function Le(e){if(e>=p.length)for(let t=p.length;t<=e;t++){const e=new Uint8Array([0]);let r=p[t-1].slice(0);for(let t=r.length-1;t>=0;t--){const n=new Uint8Array([(r[t]<<1)+e[0]]);e[0]=n[0]/10,r[t]=n[0]%10}e[0]>0&&(r=a(e,r)),p.push(r)}return p[e]}function Fe(e,t){let r=0;const n=new Uint8Array(e),i=new Uint8Array(t),o=n.slice(0),f=o.length-1,a=i.slice(0),s=a.length-1;let c,l=0;for(let e=s;e>=0;e--,l++)if(c=o[f-l]-a[s-l]-r,!0==c<0)r=1,o[f-l]=c+10;else r=0,o[f-l]=c;if(r>0)for(let e=f-s+1;e>=0;e--,l++){if(c=o[f-l]-r,!(c<0)){r=0,o[f-l]=c;break}r=1,o[f-l]=c+10}return o.slice()}Q=Ne,U.BitString=Q,Ne.NAME=C;class je extends(O(R)){constructor({value:e,...t}={}){super(t),this._valueDec=0,t.valueHex&&this.setValueHex(),void 0!==e&&(this.valueDec=e)}setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=s.call(this)))}set valueDec(e){this._valueDec=e,this.isHexOnly=!1,this.valueHexView=new Uint8Array(function(e){const t=e<0?-1*e:e;let r=128;for(let n=1;n<8;n++){if(t<=r){if(e<0){const e=f(r-t,8,n);return new Uint8Array(e)[0]|=128,e}let i=f(t,8,n),o=new Uint8Array(i);if(128&o[0]){const e=i.slice(0),t=new Uint8Array(e);i=new ArrayBuffer(i.byteLength+1),o=new Uint8Array(i);for(let r=0;r1&&(n=o.length+1),this.valueHexView=o.subarray(n-o.length)),i}toDER(e=!1){const t=this.valueHexView;switch(!0){case 0!=(128&t[0]):{const e=new Uint8Array(this.valueHexView.length+1);e[0]=0,e.set(t,1),this.valueHexView=e}break;case 0===t[0]&&0==(128&t[1]):this.valueHexView=this.valueHexView.subarray(1)}return this.toBER(e)}fromBER(e,t,r){const n=super.fromBER(e,t,r);return-1===n||this.setValueHex(),n}toBER(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){const e=8*this.valueHexView.length-1;let t,r=new Uint8Array(8*this.valueHexView.length/3),n=0;const i=this.valueHexView;let o="",f=!1;for(let f=i.byteLength-1;f>=0;f--){t=i[f];for(let i=0;i<8;i++){if(1==(1&t))if(n===e)r=Fe(Le(n),r),o="-";else r=Ue(r,Le(n));n++,t>>=1}}for(let e=0;e0;){const t=new He;if(n=t.fromBER(e,n,r),-1===n)return this.blockLength=0,this.error=t.error,n;0===this.value.length&&(t.isFirstSid=!0),this.blockLength+=t.blockLength,r-=t.blockLength,this.value.push(t)}return n}toBER(e){const t=[];for(let r=0;rNumber.MAX_SAFE_INTEGER){l();const t=BigInt(n);e.valueBigInt=t}else if(e.valueDec=parseInt(n,10),isNaN(e.valueDec))return;this.value.length||(e.isFirstSid=!0,i=!0),this.value.push(e)}}while(-1!==r)}toString(){let e="",t=!1;for(let r=0;r0;){const t=new qe;if(n=t.fromBER(e,n,r),-1===n)return this.blockLength=0,this.error=t.error,n;this.blockLength+=t.blockLength,r-=t.blockLength,this.value.push(t)}return n}toBER(e,t){const r=[];for(let t=0;t4)continue;const o=4-i.length;for(let e=i.length-1;e>=0;e--)r[4*n+e+o]=i[e]}this.valueBlock.value=e}}it.NAME="UniversalStringValueBlock";class ot extends it{constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}}ie=ot,U.UniversalString=ie,ot.NAME="UniversalString";class ft extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}}oe=ft,U.NumericString=oe,ft.NAME="NumericString";class at extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}}fe=at,U.PrintableString=fe,at.NAME="PrintableString";class st extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}}ae=st,U.TeletexString=ae,st.NAME="TeletexString";class ct extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}}se=ct,U.VideotexString=se,ct.NAME="VideotexString";class lt extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}}ce=lt,U.IA5String=ce,lt.NAME="IA5String";class ut extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}}le=ut,U.GraphicString=le,ut.NAME="GraphicString";class dt extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}}ue=dt,U.VisibleString=ue,dt.NAME="VisibleString";class ht extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}}de=ht,U.GeneralString=de,ht.NAME="GeneralString";class pt extends $e{constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}}he=pt,U.CharacterString=he,pt.NAME="CharacterString";class yt extends dt{constructor({value:e,valueDate:t,...r}={}){if(super(r),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,e){this.fromString(e),this.valueBlock.valueHexView=new Uint8Array(e.length);for(let t=0;t=50?1900+r:2e3+r,this.month=parseInt(t[2],10),this.day=parseInt(t[3],10),this.hour=parseInt(t[4],10),this.minute=parseInt(t[5],10),this.second=parseInt(t[6],10)}toString(e="iso"){if("iso"===e){const e=new Array(7);return e[0]=c(this.year<2e3?this.year-1900:this.year-2e3,2),e[1]=c(this.month,2),e[2]=c(this.day,2),e[3]=c(this.hour,2),e[4]=c(this.minute,2),e[5]=c(this.second,2),e[6]="Z",e.join("")}return super.toString(e)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}}pe=yt,U.UTCTime=pe,yt.NAME="UTCTime";class bt extends yt{constructor(e={}){var t;super(e),null!==(t=this.millisecond)&&void 0!==t||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(e){super.fromDate(e),this.millisecond=e.getUTCMilliseconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))}fromString(e){let t,r=!1,n="",i="",o=0,f=0,a=0;if("Z"===e[e.length-1])n=e.substring(0,e.length-1),r=!0;else{const t=new Number(e[e.length-1]);if(isNaN(t.valueOf()))throw new Error("Wrong input string for conversion");n=e}if(r){if(-1!==n.indexOf("+"))throw new Error("Wrong input string for conversion");if(-1!==n.indexOf("-"))throw new Error("Wrong input string for conversion")}else{let e=1,t=n.indexOf("+"),r="";if(-1===t&&(t=n.indexOf("-"),e=-1),-1!==t){if(r=n.substring(t+1),n=n.substring(0,t),2!==r.length&&4!==r.length)throw new Error("Wrong input string for conversion");let i=parseInt(r.substring(0,2),10);if(isNaN(i.valueOf()))throw new Error("Wrong input string for conversion");if(f=e*i,4===r.length){if(i=parseInt(r.substring(2,4),10),isNaN(i.valueOf()))throw new Error("Wrong input string for conversion");a=e*i}}}let s=n.indexOf(".");if(-1===s&&(s=n.indexOf(",")),-1!==s){const e=new Number(`0${n.substring(s)}`);if(isNaN(e.valueOf()))throw new Error("Wrong input string for conversion");o=e.valueOf(),i=n.substring(0,s)}else i=n;switch(!0){case 8===i.length:if(t=/(\d{4})(\d{2})(\d{2})/gi,-1!==s)throw new Error("Wrong input string for conversion");break;case 10===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})/gi,-1!==s){let e=60*o;this.minute=Math.floor(e),e=60*(e-this.minute),this.second=Math.floor(e),e=1e3*(e-this.second),this.millisecond=Math.floor(e)}break;case 12===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==s){let e=60*o;this.second=Math.floor(e),e=1e3*(e-this.second),this.millisecond=Math.floor(e)}break;case 14===i.length:if(t=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi,-1!==s){const e=1e3*o;this.millisecond=Math.floor(e)}break;default:throw new Error("Wrong input string for conversion")}const c=t.exec(i);if(null===c)throw new Error("Wrong input string for conversion");for(let e=1;e0&&r.valueBlock.value[0]instanceof kt&&(o=t.valueBlock.value.length),0===o)return{verified:!0,result:e};if(0===t.valueBlock.value.length&&0!==r.valueBlock.value.length){let t=!0;for(let e=0;e=t.valueBlock.value.length){if(!1===r.valueBlock.value[f].optional){const t={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&(delete e[r.name],t.name=r.name)),t}}else if(r.valueBlock.value[0]instanceof kt){if(i=St(e,t.valueBlock.value[f],r.valueBlock.value[0].value),!1===i.verified){if(!r.valueBlock.value[0].optional)return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&delete e[r.name]),i;n++}if(b in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){let n={};n=T in r.valueBlock.value[0]&&r.valueBlock.value[0].local?t:e,void 0===n[r.valueBlock.value[0].name]&&(n[r.valueBlock.value[0].name]=[]),n[r.valueBlock.value[0].name].push(t.valueBlock.value[f])}}else if(i=St(e,t.valueBlock.value[f-n],r.valueBlock.value[f]),!1===i.verified){if(!r.valueBlock.value[f].optional)return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&delete e[r.name]),i;n++}if(!1===i.verified){const t={verified:!1,result:e};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&(delete e[r.name],t.name=r.name)),t}return{verified:!0,result:e}}if(r.primitiveSchema&&g in t.valueBlock){const n=ke(t.valueBlock.valueHexView);if(-1===n.offset){const t={verified:!1,result:n.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,S),r.name&&(delete e[r.name],t.name=r.name)),t}return St(e,n.result,r.primitiveSchema)}return{verified:!0,result:e}}function xt(e,t){if(t instanceof Object==!1)return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};const r=ke(i.vJ.toUint8Array(e));return-1===r.offset?{verified:!1,result:r.result}:St(r.result,r.result,t)}!function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"}(Ae||(Ae={})),function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"}(Ee||(Ee={}));class Pt{constructor(e,t=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),e)if("number"==typeof e)this.fromNumber(e);else{if(!i.vJ.isBufferSource(e))throw TypeError("Unsupported type of 'params' argument for BitString");this.unusedBits=t,this.value=i.vJ.toArrayBuffer(e)}}fromASN(e){if(!(e instanceof Ne))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=e.valueBlock.unusedBits,this.value=e.valueBlock.valueHex,this}toASN(){return new Ne({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(e){return new Ne({name:e})}toNumber(){let e="";const t=new Uint8Array(this.value);for(const r of t)e+=r.toString(2).padStart(8,"0");return e=e.split("").reverse().join(""),this.unusedBits&&(e=e.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(e,2)}fromNumber(e){let t=e.toString(2);const r=t.length+7>>3;this.unusedBits=(r<<3)-t.length;const n=new Uint8Array(r);t=t.padStart(r<<3,"0").split("").reverse().join("");let i=0;for(;ie instanceof Me?null:e.valueBeforeDecodeView,toASN:e=>{if(null===e)return new Me;const t=Te(e);if(t.result.error)throw new Error(t.result.error);return t.result}},Ct={fromASN:e=>e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec,toASN:e=>new ze({value:+e})},Ot={fromASN:e=>e.valueBlock.valueDec,toASN:e=>new Ve({value:e})},Bt={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new ze({valueHex:e})},Rt={fromASN:e=>e.toBigInt(),toASN:e=>ze.fromBigInt(e)},Dt={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new Ne({valueHex:e})},Nt={fromASN:e=>e.valueBlock.toString(),toASN:e=>new Ge({value:e})},Ut={fromASN:e=>e.valueBlock.value,toASN:e=>new Oe({value:e})},Lt={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new Re({valueHex:e})},Ft={fromASN:e=>new It(e.getValue()),toASN:e=>e.toASN()};function jt(e){return{fromASN:e=>e.valueBlock.value,toASN:t=>new e({value:t})}}const zt=jt(tt),Vt=jt(nt),Ht=jt(ot),Kt=jt(ft),Gt=jt(at),qt=jt(st),Wt=jt(ct),Qt=jt(lt),Jt=jt(ut),Yt=jt(dt),Zt=jt(ht),Xt=jt(pt),$t={fromASN:e=>e.toDate(),toASN:e=>new yt({valueDate:e})},er={fromASN:e=>e.toDate(),toASN:e=>new bt({valueDate:e})},tr={fromASN:()=>null,toASN:()=>new Me};function rr(e){switch(e){case Ee.Any:return Mt;case Ee.BitString:return Dt;case Ee.BmpString:return Vt;case Ee.Boolean:return Ut;case Ee.CharacterString:return Xt;case Ee.Enumerated:return Ot;case Ee.GeneralString:return Zt;case Ee.GeneralizedTime:return er;case Ee.GraphicString:return Jt;case Ee.IA5String:return Qt;case Ee.Integer:return Ct;case Ee.Null:return tr;case Ee.NumericString:return Kt;case Ee.ObjectIdentifier:return Nt;case Ee.OctetString:return Lt;case Ee.PrintableString:return Gt;case Ee.TeletexString:return qt;case Ee.UTCTime:return $t;case Ee.UniversalString:return Ht;case Ee.Utf8String:return zt;case Ee.VideotexString:return Wt;case Ee.VisibleString:return Yt;default:return null}}function nr(e){return"function"==typeof e&&e.prototype?!(!e.prototype.toASN||!e.prototype.fromASN)||nr(e.prototype):!!(e&&"object"==typeof e&&"toASN"in e&&"fromASN"in e)}function ir(e){var t;if(e){const r=Object.getPrototypeOf(e);return(null===(t=null==r?void 0:r.prototype)||void 0===t?void 0:t.constructor)===Array||ir(r)}return!1}function or(e,t){if(!e||!t)return!1;if(e.byteLength!==t.byteLength)return!1;const r=new Uint8Array(e),n=new Uint8Array(t);for(let t=0;tt=>{let r;fr.has(t)?r=fr.get(t):(r=fr.createDefault(t),fr.set(t,r)),Object.assign(r,e)},sr=()=>ar({type:Ae.Choice}),cr=e=>ar({type:Ae.Set,...e}),lr=e=>ar({type:Ae.Sequence,...e}),ur=e=>(t,r)=>{let n;fr.has(t.constructor)?n=fr.get(t.constructor):(n=fr.createDefault(t.constructor),fr.set(t.constructor,n));const i=Object.assign({},e);if("number"==typeof i.type&&!i.converter){const n=rr(e.type);if(!n)throw new Error(`Cannot get default converter for property '${r}' of ${t.constructor.name}`);i.converter=n}n.items[r]=i};class dr extends Error{constructor(){super(...arguments),this.schemas=[]}}class hr{static parse(e,t){const r=Te(e);if(r.result.error)throw new Error(r.result.error);return this.fromASN(r.result,t)}static fromASN(e,t){var r;try{if(nr(t)){return(new t).fromASN(e)}const i=fr.get(t);fr.cache(t);let o=i.schema;if(e.constructor===xe&&i.type!==Ae.Choice){o=new xe({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:i.schema.valueBlock.value});for(const t in i.items)delete e[t]}const f=St({},e,o);if(!f.verified)throw new dr(`Data does not match to ${t.name} ASN1 schema. ${f.result.error}`);const a=new t;if(ir(t)){if(!("value"in e.valueBlock)||!Array.isArray(e.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const r=i.itemType;if("number"==typeof r){const n=rr(r);if(!n)throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);return t.from(e.valueBlock.value,(e=>n.fromASN(e)))}return t.from(e.valueBlock.value,(e=>this.fromASN(e,r)))}for(const e in i.items){const t=f.result[e];if(!t)continue;const o=i.items[e],s=o.type;if("number"==typeof s||nr(s)){const i=null!==(r=o.converter)&&void 0!==r?r:nr(s)?new s:null;if(!i)throw new Error("Converter is empty");if(o.repeated)if(o.implicit){const r=new("sequence"===o.repeated?Je:Ye);r.valueBlock=t.valueBlock;const n=Te(r.toBER(!1));if(-1===n.offset)throw new Error(`Cannot parse the child item. ${n.result.error}`);if(!("value"in n.result.valueBlock)||!Array.isArray(n.result.valueBlock.value))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");const f=n.result.valueBlock.value;a[e]=Array.from(f,(e=>i.fromASN(e)))}else a[e]=Array.from(t,(e=>i.fromASN(e)));else{let r=t;if(o.implicit){let e;if(nr(s))e=(new s).toSchema("");else{const t=Ee[s],r=n[t];if(!r)throw new Error(`Cannot get '${t}' class from asn1js module`);e=new r}e.valueBlock=r.valueBlock,r=Te(e.toBER(!1)).result}a[e]=i.fromASN(r)}}else if(o.repeated){if(!Array.isArray(t))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");a[e]=Array.from(t,(e=>this.fromASN(e,s)))}else a[e]=this.fromASN(t,s)}return a}catch(e){throw e instanceof dr&&e.schemas.push(t.name),e}}}class pr{static serialize(e){return e instanceof L?e.toBER(!1):this.toASN(e).toBER(!1)}static toASN(e){if(e&&"object"==typeof e&&nr(e))return e.toASN();if(!e||"object"!=typeof e)throw new TypeError("Parameter 1 should be type of Object.");const t=e.constructor,r=fr.get(t);fr.cache(t);let n,i=[];if(r.itemType){if(!Array.isArray(e))throw new TypeError("Parameter 1 should be type of Array.");if("number"==typeof r.itemType){const n=rr(r.itemType);if(!n)throw new Error(`Cannot get default converter for array item of ${t.name} ASN1 schema`);i=e.map((e=>n.toASN(e)))}else i=e.map((e=>this.toAsnItem({type:r.itemType},"[]",t,e)))}else for(const n in r.items){const o=r.items[n],f=e[n];if(void 0===f||o.defaultValue===f||"object"==typeof o.defaultValue&&"object"==typeof f&&or(this.serialize(o.defaultValue),this.serialize(f)))continue;const a=pr.toAsnItem(o,n,t,f);if("number"==typeof o.context)if(o.implicit)if(o.repeated||"number"!=typeof o.type&&!nr(o.type))i.push(new xe({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},value:a.valueBlock.value}));else{const e={};e.valueHex=a instanceof Me?a.valueBeforeDecodeView:a.valueBlock.toBER(),i.push(new _e({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},...e}))}else i.push(new xe({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},value:[a]}));else o.repeated?i=i.concat(a):i.push(a)}switch(r.type){case Ae.Sequence:n=new Je({value:i});break;case Ae.Set:n=new Ye({value:i});break;case Ae.Choice:if(!i[0])throw new Error(`Schema '${t.name}' has wrong data. Choice cannot be empty.`);n=i[0]}return n}static toAsnItem(e,t,r,n){let i;if("number"==typeof e.type){const o=e.converter;if(!o)throw new Error(`Property '${t}' doesn't have converter for type ${Ee[e.type]} in schema '${r.name}'`);if(e.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");const t=Array.from(n,(e=>o.toASN(e)));i=new("sequence"===e.repeated?Je:Ye)({value:t})}else i=o.toASN(n)}else if(e.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");const t=Array.from(n,(e=>this.toASN(e)));i=new("sequence"===e.repeated?Je:Ye)({value:t})}else i=this.toASN(n);return i}}class yr extends Array{constructor(e=[]){if("number"==typeof e)super(e);else{super();for(const t of e)this.push(t)}}}class br{static serialize(e){return pr.serialize(e)}static parse(e,t){return hr.parse(e,t)}static toString(e){const t=Te(i.vJ.isBufferSource(e)?i.vJ.toArrayBuffer(e):br.serialize(e));if(-1===t.offset)throw new Error(`Cannot decode ASN.1 data. ${t.result.error}`);return t.result.toString()}}},79742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),f=o[0],a=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,f,a)),l=0,u=a>0?f-4:f;for(r=0;r>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],f=16383,a=0,s=n-i;as?s:a+f));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,a=o.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,f=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return f.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},92882:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n>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 f(e){for(var t=1,r=0;r126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;rt)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var a=(e=n).lastIndexOf("1");if(-1===a)return"No separator character for "+e;if(0===a)return"Missing prefix for "+e;var s=e.slice(0,a),c=e.slice(a+1);if(c.length<6)return"Data too short";var l=f(s);if("string"==typeof l)return l;for(var u=[],d=0;d=c.length||u.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:s,words:u}}function s(e,t,r,n){for(var i=0,o=0,f=(1<=r;)o-=r,a.push(i>>o&f);if(n)o>0&&a.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=f(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var a=e+"1",s=0;s>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,a+=t.charAt(c)}for(s=0;s<6;++s)i=o(i);for(i^=1,s=0;s<6;++s){a+=t.charAt(i>>5*(5-s)&31)}return a},toWordsUnsafe:function(e){var t=s(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=s(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=s(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=s(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},13550:function(e,t,r){!function(e,t){"use strict";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 o(e,t,r){if(o.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 f;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(46601).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,f=0,a=Math.min(e.length,r),s=t;s=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&f0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.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=t;n-=2)i=s(e,t,n)<=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this._strip()},o.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 o=e.length-r,f=o%n,a=Math.min(o,o-f)+r,s=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){o.prototype.inspect=u}else o.prototype.inspect=u;function u(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f>>24-i&16777215,(i+=2)>=26&&(i-=26,f--),r=0!==o||f!==this.length-1?d[6-s.length]+s+r:s+r}for(0!==o&&(r=o.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=h[e],l=p[e];r="";var u=this.clone();for(u.negative=0;!u.isZero();){var y=u.modrn(l).toString(e);r=(u=u.idivn(l)).isZero()?y+r:d[c-y.length]+y+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")},o.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},o.prototype.toJSON=function(){return this.toString(16,2)},f&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(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],o=0|t.words[0],f=i*o,a=67108863&f,s=f/67108864|0;r.words[0]=a;for(var c=1;c>>26,u=67108863&s,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(f=(i=0|e.words[p])*(o=0|t.words[h])+u)/67108864|0,u=67108863&f}r.words[c]=0|u,s=0|l}return 0!==s?r.words[c]=0|s:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,i),f},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r=0&&(e[r--]=f>>8&255),r>=0&&(e[r--]=f>>16&255),6===o?(r>=0&&(e[r--]=f>>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.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;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.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<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 o=0,f=0;f>26,this.words[f]=67108863&t;for(;0!==o&&f>26,this.words[f]=67108863&t;if(0===o&&f>>13,h=0|f[1],p=8191&h,y=h>>>13,b=0|f[2],g=8191&b,m=b>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],_=8191&E,k=E>>>13,T=0|f[5],S=8191&T,x=T>>>13,P=0|f[6],I=8191&P,M=P>>>13,C=0|f[7],O=8191&C,B=C>>>13,R=0|f[8],D=8191&R,N=R>>>13,U=0|f[9],L=8191&U,F=U>>>13,j=0|a[0],z=8191&j,V=j>>>13,H=0|a[1],K=8191&H,G=H>>>13,q=0|a[2],W=8191&q,Q=q>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,fe=ie>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,de=le>>>13,he=0|a[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(u,z))|0)+((8191&(i=(i=Math.imul(u,V))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(y,z)|0,o=Math.imul(y,V);var ge=(c+(n=n+Math.imul(u,K)|0)|0)+((8191&(i=(i=i+Math.imul(u,G)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,V))+Math.imul(m,z)|0,o=Math.imul(m,V),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0;var me=(c+(n=n+Math.imul(u,W)|0)|0)+((8191&(i=(i=i+Math.imul(u,Q)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,V))+Math.imul(A,z)|0,o=Math.imul(A,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var ve=(c+(n=n+Math.imul(u,Y)|0)|0)+((8191&(i=(i=i+Math.imul(u,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,V))+Math.imul(k,z)|0,o=Math.imul(k,V),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0;var we=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(x,z)|0,o=Math.imul(x,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(u,re)|0)|0)+((8191&(i=(i=i+Math.imul(u,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(M,z)|0,o=Math.imul(M,V),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ee=(c+(n=n+Math.imul(u,oe)|0)|0)+((8191&(i=(i=i+Math.imul(u,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,V))+Math.imul(B,z)|0,o=Math.imul(B,V),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,fe)|0;var _e=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(i=(i=i+Math.imul(u,ce)|0)+Math.imul(d,se)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,V))+Math.imul(N,z)|0,o=Math.imul(N,V),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(i=(i=i+Math.imul(u,de)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,V))+Math.imul(F,z)|0,o=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,se)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,de)|0;var Te=(c+(n=n+Math.imul(u,pe)|0)|0)+((8191&(i=(i=i+Math.imul(u,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(F,W)|0,o=Math.imul(F,Q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,Z))+Math.imul(F,Y)|0,o=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,se)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,de)|0;var Ie=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(O,se)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(B,se)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,fe))+Math.imul(F,oe)|0,o=Math.imul(F,fe),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,de)|0;var Ce=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,de)|0;var Oe=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ye)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,de))+Math.imul(F,ue)|0,o=Math.imul(F,de);var Be=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,s[0]=be,s[1]=ge,s[2]=me,s[3]=ve,s[4]=we,s[5]=Ae,s[6]=Ee,s[7]=_e,s[8]=ke,s[9]=Te,s[10]=Se,s[11]=xe,s[12]=Pe,s[13]=Ie,s[14]=Me,s[15]=Ce,s[16]=Oe,s[17]=Be,s[18]=Re,0!==c&&(s[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,f&=67108863}r.words[o]=a,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f>>=1)i++;return 1<>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f>=26,r+=o/67108864|0,r+=f>>>26,this.words[i]=67108863&f}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<f)for(this.length-=f,c=0;c=0&&(0!==l||c>=i);c--){var u=0|this.words[c];this.words[c]=l<<26-o|u>>>o,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=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<=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},o.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>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!==(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==t){(a=new o(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var d=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,u);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:a.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,f,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.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 o(1),f=new o(0),a=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),u=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()||f.isOdd())&&(i.iadd(l),f.isub(u)),i.iushrn(1),f.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),f.isub(s)):(r.isub(t),a.isub(i),s.isub(f))}return{a,b:s,gcd:r.iushln(c)}},o.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,f=new o(1),a=new o(0),s=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;)f.isOdd()&&f.iadd(s),f.iushrn(1);for(var u=0,d=1;0==(r.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(a)):(r.isub(t),a.isub(f))}return(i=0===t.cmpn(1)?f:a).cmpn(0)<0&&i.iadd(e),i},o.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 o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[f]=a}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._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 x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.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=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(E,A),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.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")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.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 o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=f;0!==h.cmp(a);){for(var y=h,b=0;0!==y.cmp(a);b++)y=y.redSqr();n(b=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==f?(f<<=1,f|=u,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[f]),a=0,f=0)):a=0}s=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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),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)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(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),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},29931:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r{"use strict";const n=r(79742),i=r(80645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=s,t.h2=50;const f=2147483647;function a(e){if(e>f)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);const i=function(e){if(s.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?a(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return l(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return 0|e}function y(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function b(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,f=1,a=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;f=2,a/=2,s/=2,r/=2}function c(e,t){return 1===f?e[t]:e.readUInt16BE(t*f)}if(i){let n=-1;for(o=r;oa&&(r=a-s),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let f;for(n>o/2&&(n=o/2),f=0;f>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+f<=r){let r,n,a,s;switch(f){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(s=(31&t)<<6|63&r,s>127&&(o=s));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(s=(15&t)<<12|(63&r)<<6|63&n,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(s=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=f}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!s.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(s.prototype[o]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),f=(r>>>=0)-(t>>>=0);const a=Math.min(o,f),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let f=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=f,f>>=8,e[r++]=f,f>>=8,e[r++]=f,f>>=8,e[r++]=f,r}function D(e,t,r,n,i){V(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let f=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=f,f>>=8,e[r+2]=f,f>>=8,e[r+1]=f,f>>=8,e[r]=f,r+8}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}s.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=X((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){B(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){B(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=X((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,e,t,r,n-1,-n)}let i=0,o=1,f=0;for(this[t]=255&e;++i>0)-f&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,e,t,r,n-1,-n)}let i=r-1,o=1,f=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===f&&0!==this[t+i+1]&&(f=1),this[t+i]=(e/o>>0)-f&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=X((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let f=0;f55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(f+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},21924:(e,t,r)=>{"use strict";var n=r(40210),i=r(55559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},55559:(e,t,r)=>{"use strict";var n=r(58612),i=r(40210),o=i("%Function.prototype.apply%"),f=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(f,o),s=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,f,arguments);s&&c&&(s(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}));return t};var u=function(){return a(n,o,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u},4289:(e,t,r)=>{"use strict";var n=r(82215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,f=Array.prototype.concat,a=Object.defineProperty,s=r(31044)(),c=a&&s,l=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(c?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},u=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=f.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var n=t;n.version=r(18597).i8,n.utils=r(80953),n.rand=r(29931),n.curve=r(88254),n.curves=r(45427),n.ec=r(57954),n.eddsa=r(65980)},4918:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953),o=i.getNAF,f=i.getJSF,a=i.assert;function s(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<=f;l--)s=(s<<1)+n[l];c.push(s)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(f=0;f=0;c--){for(var l=0;c>=0&&0===f[c];c--)l++;if(c>=0&&l++,s=s.dblp(l),c<0)break;var u=f[c];a(0!==u),s="affine"===e.type?u>0?s.mixedAdd(i[u-1>>1]):s.mixedAdd(i[-u-1>>1].neg()):u>0?s.add(i[u-1>>1]):s.add(i[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,t,r,n,i){var a,s,c,l=this._wnafT1,u=this._wnafT2,d=this._wnafT3,h=0;for(a=0;a=1;a-=2){var y=a-1,b=a;if(1===l[y]&&1===l[b]){var g=[t[y],null,null,t[b]];0===t[y].y.cmp(t[b].y)?(g[1]=t[y].add(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg())):0===t[y].y.cmp(t[b].y.redNeg())?(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].add(t[b].neg())):(g[1]=t[y].toJ().mixedAdd(t[b]),g[2]=t[y].toJ().mixedAdd(t[b].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=f(r[y],r[b]);for(h=Math.max(v[0].length,h),d[y]=new Array(h),d[b]=new Array(h),s=0;s=0;a--){for(var k=0;a>=0;){var T=!0;for(s=0;s=0&&k++,E=E.dblp(k),a<0)break;for(s=0;s0?c=u[s][S-1>>1]:S<0&&(c=u[s][-S-1>>1].neg()),E="affine"===c.type?E.mixedAdd(c):E.add(c))}}for(a=0;a=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i{"use strict";var n=r(80953),i=r(73785),o=r(35717),f=r(4918),a=n.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,f.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){f.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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,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()))))}o(s,f),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},s.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),f=n.redMul(o.redInvm()),a=f.redSqrt();if(0!==a.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},s.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),f=n.redMul(o.redInvm());if(0===f.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=f.redSqrt();if(0!==a.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},s.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)},o(c,f.BasePoint),s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},s.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.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),o=n.redAdd(t),f=o.redSub(r),a=n.redSub(t),s=i.redMul(f),c=o.redMul(a),l=i.redMul(a),u=f.redMul(o);return this.curve.point(s,c,u,l)},c.prototype._projDbl=function(){var e,t,r,n,i,o,f=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(s);this.zOne?(e=f.redSub(a).redSub(s).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(s)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=f.redSub(a).redISub(s).redMul(o),t=c.redMul(n.redSub(s)),r=c.redMul(o))}else n=a.redAdd(s),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(f.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(s)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.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)),o=r.redSub(t),f=i.redSub(n),a=i.redAdd(n),s=r.redAdd(t),c=o.redMul(f),l=a.redMul(s),u=o.redMul(s),d=f.redMul(a);return this.curve.point(c,l,d,u)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),f=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(f),s=i.redSub(a),c=i.redAdd(a),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(f),u=n.redMul(s).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(f.redSub(this.curve._mulA(o))),r=s.redMul(c)):(t=n.redMul(c).redMul(f.redSub(o)),r=this.curve._mulC(s).redMul(c)),this.curve.point(u,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.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}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},88254:(e,t,r)=>{"use strict";var n=t;n.base=r(4918),n.short=r(6673),n.mont=r(22881),n.edwards=r(31138)},22881:(e,t,r)=>{"use strict";var n=r(73785),i=r(35717),o=r(4918),f=r(80953);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.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)},i(s,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},a.prototype.point=function(e,t){return new s(this,e,t)},a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.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)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),f=i.redMul(n),a=t.z.redMul(o.redAdd(f).redSqr()),s=t.x.redMul(o.redISub(f).redSqr());return this.curve.point(a,s)},s.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 o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,t,r)=>{"use strict";var n=r(80953),i=r(73785),o=r(35717),f=r(4918),a=n.assert;function s(e){f.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(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)}function c(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(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 l(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(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}o(s,f),e.exports=s,s.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(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 i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(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 i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},s.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t,r,n,o,f,a,s,c,l,u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),p=new i(1),y=new i(0),b=new i(0),g=new i(1),m=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),l=b.sub(v.mul(p));var w=g.sub(v.mul(y));if(!n&&c.cmp(u)<0)t=s.neg(),r=p,n=c.neg(),o=l;else if(n&&2==++m)break;s=c,h=d,d=c,b=p,p=l,g=y,y=w}f=c.neg(),a=l;var A=n.sqr().add(o.sqr());return f.sqr().add(a.sqr()).cmp(A)>=0&&(f=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),f.negative&&(f=f.neg(),a=a.neg()),[{a:n,b:o},{a:f,b:a}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),f=i.mul(r.a),a=o.mul(n.a),s=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(f).sub(a),k2:s.add(c).neg()}},s.prototype.pointFromX=function(e,t){(e=new i(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 o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},s.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)},s.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.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)},c.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),o=i.redSqr().redISub(this.x.redAdd(this.x)),f=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,f)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(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)},c.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)},c.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)},c.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))},c.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},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,f.BasePoint),s.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.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)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.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),o=this.y.redMul(t.redMul(e.z)),f=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),s=o.redSub(f);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),u=n.redMul(c),d=s.redSqr().redIAdd(l).redISub(u).redISub(u),h=s.redMul(u.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,p)},l.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,o=e.y.redMul(t).redMul(this.z),f=r.redSub(n),a=i.redSub(o);if(0===f.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=f.redSqr(),c=s.redMul(f),l=r.redMul(s),u=a.redSqr().redIAdd(c).redISub(l).redISub(l),d=a.redMul(l.redISub(u)).redISub(i.redMul(c)),h=this.z.redMul(f);return this.curve.jpoint(u,d,h)},l.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=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},45427:(e,t,r)=>{"use strict";var n,i=t,o=r(33715),f=r(88254),a=r(80953).assert;function s(e){"short"===e.type?this.curve=new f.short(e):"edwards"===e.type?this.curve=new f.edwards(e):this.curve=new f.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=s,c("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:o.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"]}),c("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:o.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(91037)}catch(e){n=void 0}c("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},57954:(e,t,r)=>{"use strict";var n=r(73785),i=r(2156),o=r(80953),f=r(45427),a=r(29931),s=o.assert,c=r(31251),l=r(90611);function u(e){if(!(this instanceof u))return new u(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(f,e),"Unknown curve "+e),e=f[e]),e instanceof f.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}e.exports=u,u.prototype.keyPair=function(e){return new c(this,e)},u.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},u.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},u.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var f=new n(t.generate(r));if(!(f.cmp(o)>0))return f.iaddn(1),this.keyFromPrivate(f)}},u.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},u.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var f=this.n.byteLength(),a=t.getPrivate().toArray("be",f),s=e.toArray("be",f),c=new i({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),u=this.n.sub(new n(1)),d=0;;d++){var h=o.k?o.k(d):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(u)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var y=p.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var g=h.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return o.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),m^=1),new l({r:b,s:g,recoveryParam:m})}}}}}},u.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new l(t,"hex")).r,f=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var a,s=f.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},u.prototype.recoverPubKey=function(e,t,r,i){s((3&r)===r,"The recovery param is more than two bits"),t=new l(t,i);var o=this.n,f=new n(e),a=t.r,c=t.s,u=1&r,d=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),u):this.curve.pointFromX(a,u);var h=t.r.invm(o),p=o.sub(f).mul(h).umod(o),y=c.mul(h).umod(o);return this.g.mulAdd(p,a,y)},u.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},31251:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953).assert;function o(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)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.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"}},o.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},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(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)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},90611:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953),o=i.assert;function f(e,t){if(e instanceof f)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function s(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,o=0,f=t.place;o>>=0;return!(i<=127)&&(t.place=f,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=f,f.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=s(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var f=s(e,r);if(!1===f)return!1;var c=e.slice(r.place,f+r.place);if(r.place+=f,2!==e[r.place++])return!1;var l=s(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;var u=e.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new n(c),this.s=new n(u),this.recoveryParam=null,!0},f.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=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),f=[48];return l(f,o.length),f=f.concat(o),i.encode(f,e)}},65980:(e,t,r)=>{"use strict";var n=r(33715),i=r(45427),o=r(80953),f=o.assert,a=o.parseBytes,s=r(79087),c=r(23622);function l(e){if(f("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[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=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),f=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(f).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},l.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t{"use strict";var n=r(80953),i=n.assert,o=n.parseBytes,f=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},f(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),f(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),f(a,"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})),f(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),f(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),f(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},23622:(e,t,r)=>{"use strict";var n=r(73785),i=r(80953),o=i.assert,f=i.cachedProperty,a=i.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}f(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),f(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),f(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),f(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},91037:e=>{e.exports={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"]]}}},80953:(e,t,r)=>{"use strict";var n=t,i=r(73785),o=r(79746),f=r(34504);n.assert=o,n.toArray=f.toArray,n.zero2=f.zero2,n.toHex=f.toHex,n.encode=f.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-s:s,o.isubn(a)):a=0,n[f]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var f,a,s=e.andln(3)+i&3,c=t.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),f=0==(1&s)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==c?s:-s,r[0].push(f),a=0==(1&c)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==s?c:-c,r[1].push(a),2*i===f+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},73785:function(e,t,r){!function(e,t){"use strict";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 o(e,t,r){if(o.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 f;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(85568).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),f=t;f=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.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=t;n-=2)i=s(e,t,n)<=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this.strip()},o.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 o=e.length-r,f=o%n,a=Math.min(o,o-f)+r,s=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};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"],u=[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],o=0|t.words[0],f=i*o,a=67108863&f,s=f/67108864|0;r.words[0]=a;for(var c=1;c>>26,u=67108863&s,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(f=(i=0|e.words[p])*(o=0|t.words[h])+u)/67108864|0,u=67108863&f}r.words[c]=0|u,s=0|l}return 0!==s?r.words[c]=0|s:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f>>24-i&16777215)||f!==this.length-1?l[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,f--)}for(0!==o&&(r=o.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=u[e],h=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var y=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?y+r:l[c-y.length]+y+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")},o.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},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==f),this.toArrayLike(f,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var f,a,s="le"===t,c=new e(o),l=this.clone();if(s){for(a=0;!l.isZero();a++)f=l.andln(255),l.iushrn(8),c[a]=f;for(;a=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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.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;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.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<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 o=0,f=0;f>26,this.words[f]=67108863&t;for(;0!==o&&f>26,this.words[f]=67108863&t;if(0===o&&f>>13,h=0|f[1],p=8191&h,y=h>>>13,b=0|f[2],g=8191&b,m=b>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],_=8191&E,k=E>>>13,T=0|f[5],S=8191&T,x=T>>>13,P=0|f[6],I=8191&P,M=P>>>13,C=0|f[7],O=8191&C,B=C>>>13,R=0|f[8],D=8191&R,N=R>>>13,U=0|f[9],L=8191&U,F=U>>>13,j=0|a[0],z=8191&j,V=j>>>13,H=0|a[1],K=8191&H,G=H>>>13,q=0|a[2],W=8191&q,Q=q>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,fe=ie>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,de=le>>>13,he=0|a[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(u,z))|0)+((8191&(i=(i=Math.imul(u,V))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(y,z)|0,o=Math.imul(y,V);var ge=(c+(n=n+Math.imul(u,K)|0)|0)+((8191&(i=(i=i+Math.imul(u,G)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,V))+Math.imul(m,z)|0,o=Math.imul(m,V),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0;var me=(c+(n=n+Math.imul(u,W)|0)|0)+((8191&(i=(i=i+Math.imul(u,Q)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,V))+Math.imul(A,z)|0,o=Math.imul(A,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var ve=(c+(n=n+Math.imul(u,Y)|0)|0)+((8191&(i=(i=i+Math.imul(u,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,V))+Math.imul(k,z)|0,o=Math.imul(k,V),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0;var we=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(x,z)|0,o=Math.imul(x,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(u,re)|0)|0)+((8191&(i=(i=i+Math.imul(u,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(M,z)|0,o=Math.imul(M,V),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ee=(c+(n=n+Math.imul(u,oe)|0)|0)+((8191&(i=(i=i+Math.imul(u,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,V))+Math.imul(B,z)|0,o=Math.imul(B,V),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,fe)|0;var _e=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(i=(i=i+Math.imul(u,ce)|0)+Math.imul(d,se)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,V))+Math.imul(N,z)|0,o=Math.imul(N,V),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(i=(i=i+Math.imul(u,de)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,V))+Math.imul(F,z)|0,o=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,se)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,de)|0;var Te=(c+(n=n+Math.imul(u,pe)|0)|0)+((8191&(i=(i=i+Math.imul(u,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(F,W)|0,o=Math.imul(F,Q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,Z))+Math.imul(F,Y)|0,o=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,se)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,de)|0;var Ie=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(O,se)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(B,se)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,fe))+Math.imul(F,oe)|0,o=Math.imul(F,fe),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,de)|0;var Ce=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,de)|0;var Oe=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ye)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,de))+Math.imul(F,ue)|0,o=Math.imul(F,de);var Be=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,s[0]=be,s[1]=ge,s[2]=me,s[3]=ve,s[4]=we,s[5]=Ae,s[6]=Ee,s[7]=_e,s[8]=ke,s[9]=Te,s[10]=Se,s[11]=xe,s[12]=Pe,s[13]=Ie,s[14]=Me,s[15]=Ce,s[16]=Oe,s[17]=Be,s[18]=Re,0!==c&&(s[19]=c,r.length++),r};function y(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,f&=67108863}r.words[o]=a,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):y(this,e,t),r},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f>>=1)i++;return 1<>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<f)for(this.length-=f,c=0;c=0&&(0!==l||c>=i);c--){var u=0|this.words[c];this.words[c]=l<<26-o|u>>>o,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=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<=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},o.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>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!==(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==t){(a=new o(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var d=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,u);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=d)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:a.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,f,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.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},o.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()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.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 o(1),f=new o(0),a=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),u=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()||f.isOdd())&&(i.iadd(l),f.isub(u)),i.iushrn(1),f.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),f.isub(s)):(r.isub(t),a.isub(i),s.isub(f))}return{a,b:s,gcd:r.iushln(c)}},o.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,f=new o(1),a=new o(0),s=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;)f.isOdd()&&f.iadd(s),f.iushrn(1);for(var u=0,d=1;0==(r.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(a)):(r.isub(t),a.isub(f))}return(i=0===t.cmpn(1)?f:a).cmpn(0)<0&&i.iadd(e),i},o.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 o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[f]=a}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.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 o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){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 A(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._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 k(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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 o(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=t0?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(v,m),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return g[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.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")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.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)},_.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},_.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)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.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 o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=f;0!==h.cmp(a);){for(var y=h,b=0;0!==y.cmp(a);b++)y=y.redSqr();n(b=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==f?(f<<=1,f|=u,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[f]),a=0,f=0)):a=0}s=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,_),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.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),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)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(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),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},39265:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.PrivateKey=void 0;var i=r(722),o=r(78125),f=function(){function e(e,t){this.key=e,this.ec=t}return e.fromElliptic=function(t,r,i){return i||(i=o.constructElliptic(r)),new e({type:r,data:t.getPrivate().toArrayLike(n,"be",32)},i)},e.fromString=function(t,r){var n=i.stringToPrivateKey(t);return r||(r=o.constructElliptic(n.type)),new e(n,r)},e.prototype.toElliptic=function(){return this.ec.keyFromPrivate(this.key.data)},e.prototype.toLegacyString=function(){return i.privateKeyToLegacyString(this.key)},e.prototype.toString=function(){return i.privateKeyToString(this.key)},e.prototype.getType=function(){return this.key.type},e.prototype.getPublicKey=function(){var e=this.toElliptic();return o.PublicKey.fromElliptic(e,this.getType(),this.ec)},e.prototype.sign=function(e,t,r){var f=this;void 0===t&&(t=!0),void 0===r&&(r="utf8"),t&&("string"==typeof e&&(e=n.from(e,r)),e=this.ec.hash().update(e).digest());var a,s,c=0,l=function(t){var r=f.toElliptic().sign(e,t);return o.Signature.fromElliptic(r,f.getType(),f.ec)};if(this.key.type===i.KeyType.k1)do{a=l({canonical:!0,pers:[++c]})}while(128&(s=a.toBinary())[1]||0===s[1]&&!(128&s[2])||128&s[33]||!(0!==s[33]||128&s[34]));else a=l({canonical:!0});return a},e.prototype.isValid=function(){try{return this.toElliptic().validate().result}catch(e){return!1}},e}();t.PrivateKey=f},62680:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=void 0;var i=r(722),o=r(78125),f=function(){function e(e,t){this.key=e,this.ec=t}return e.fromString=function(t,r){var n=i.stringToPublicKey(t);return r||(r=o.constructElliptic(n.type)),new e(n,r)},e.fromElliptic=function(t,r,n){var i=t.getPublic().getX().toArray("be",32),f=t.getPublic().getY().toArray("be",32);return n||(n=o.constructElliptic(r)),new e({type:r,data:new Uint8Array([1&f[31]?3:2].concat(i))},n)},e.prototype.toString=function(){return i.publicKeyToString(this.key)},e.prototype.toLegacyString=function(){return i.publicKeyToLegacyString(this.key)},e.prototype.toElliptic=function(){return this.ec.keyPair({pub:n.from(this.key.data)})},e.prototype.getType=function(){return this.key.type},e.prototype.isValid=function(){try{return this.toElliptic().validate().result}catch(e){return!1}},e}();t.PublicKey=f},70578:(e,t,r)=>{"use strict";var n=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;var i=r(71539),o=r(722),f=r(78125),a=function(){function e(e,t){this.signature=e,this.ec=t}return e.fromString=function(t,r){var n=o.stringToSignature(t);return r||(r=f.constructElliptic(n.type)),new e(n,r)},e.fromElliptic=function(t,r,n){var i,a=t.r.toArray("be",32),s=t.s.toArray("be",32);r===o.KeyType.k1||r===o.KeyType.r1?(i=t.recoveryParam+27,t.recoveryParam<=3&&(i+=4)):r===o.KeyType.wa&&(i=t.recoveryParam);var c=new Uint8Array([i].concat(a,s));return n||(n=f.constructElliptic(r)),new e({type:r,data:c},n)},e.prototype.toElliptic=function(){var e,t=new i(this.signature.data.slice(1,33)),r=new i(this.signature.data.slice(33,65));return this.signature.type===o.KeyType.k1||this.signature.type===o.KeyType.r1?(e=this.signature.data[0]-27)>3&&(e-=4):this.signature.type===o.KeyType.wa&&(e=this.signature.data[0]),{r:t,s:r,recoveryParam:3&e}},e.prototype.toString=function(){return o.signatureToString(this.signature)},e.prototype.toBinary=function(){return this.signature.data},e.prototype.getType=function(){return this.signature.type},e.prototype.verify=function(e,t,r,i){void 0===r&&(r=!0),void 0===i&&(i="utf8"),r&&("string"==typeof e&&(e=n.from(e,i)),e=this.ec.hash().update(e).digest());var o=this.toElliptic(),f=t.toElliptic();return this.ec.verify(e,o,f,i)},e.prototype.recover=function(e,t,r){void 0===t&&(t=!0),void 0===r&&(r="utf8"),t&&("string"==typeof e&&(e=n.from(e,r)),e=this.ec.hash().update(e).digest());var i=this.toElliptic(),o=this.ec.recoverPubKey(e,i,i.recoveryParam,r),a=this.ec.keyFromPublic(o);return f.PublicKey.fromElliptic(a,this.getType(),this.ec)},e}();t.Signature=a},93220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},58982:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){f=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},a=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionBuilder=t.TransactionBuilder=t.Api=void 0;var c=r(6154),l=r(68888),u=function(){function e(e){this.contracts=new Map,this.cachedAbis=new Map,this.transactionExtensions=[{id:1,type:"resource_payer",keys:["payer","max_net_bytes","max_cpu_us","max_memory_bytes"]}],this.rpc=e.rpc,this.authorityProvider=e.authorityProvider||e.rpc,this.abiProvider=e.abiProvider||e.rpc,this.signatureProvider=e.signatureProvider,this.chainId=e.chainId,this.textEncoder=e.textEncoder,this.textDecoder=e.textDecoder,this.abiTypes=l.getTypesFromAbi(l.createAbiTypes()),this.transactionTypes=l.getTypesFromAbi(l.createTransactionTypes())}return e.prototype.rawAbiToJson=function(e){var t=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder,array:e});if(!l.supportedAbiVersion(t.getString()))throw new Error("Unsupported abi version");return t.restartRead(),this.abiTypes.get("abi_def").deserialize(t)},e.prototype.jsonToRawAbi=function(e){var t=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});if(this.abiTypes.get("abi_def").serialize(t,e),!l.supportedAbiVersion(t.getString()))throw new Error("Unsupported abi version");return t.asUint8Array()},e.prototype.getCachedAbi=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){var r,n,i,f;return o(this,(function(o){switch(o.label){case 0:if(!t&&this.cachedAbis.get(e))return[2,this.cachedAbis.get(e)];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.abiProvider.getRawAbi(e)];case 2:return n=o.sent().abi,i=this.rawAbiToJson(n),r={rawAbi:n,abi:i},[3,4];case 3:throw(f=o.sent()).message="fetching abi for "+e+": "+f.message,f;case 4:if(!r)throw new Error("Missing abi for "+e);return this.cachedAbis.set(e,r),[2,r]}}))}))},e.prototype.getAbi=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.getCachedAbi(e,t)];case 1:return[2,r.sent().abi]}}))}))},e.prototype.getTransactionAbis=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){var r,n,s,c,l=this;return o(this,(function(u){return r=(e.context_free_actions||[]).concat(e.actions),n=r.map((function(e){return e.account})),s=new Set(n),c=a([],f(s)).map((function(e){return i(l,void 0,void 0,(function(){var r;return o(this,(function(n){switch(n.label){case 0:return r={accountName:e},[4,this.getCachedAbi(e,t)];case 1:return[2,(r.abi=n.sent().rawAbi,r)]}}))}))})),[2,Promise.all(c)]}))}))},e.prototype.getContract=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){var r,n,i,f,a,c,u,d,h,p,y;return o(this,(function(o){switch(o.label){case 0:return!t&&this.contracts.get(e)?[2,this.contracts.get(e)]:[4,this.getAbi(e,t)];case 1:r=o.sent(),n=l.getTypesFromAbi(l.createInitialTypes(),r),i=new Map;try{for(f=s(r.actions),a=f.next();!a.done;a=f.next())c=a.value,u=c.name,d=c.type,i.set(u,l.getType(n,d))}catch(e){p={error:e}}finally{try{a&&!a.done&&(y=f.return)&&y.call(f)}finally{if(p)throw p.error}}return h={types:n,actions:i},this.contracts.set(e,h),[2,h]}}))}))},e.prototype.serialize=function(e,t,r){this.transactionTypes.get(t).serialize(e,r)},e.prototype.deserialize=function(e,t){return this.transactionTypes.get(t).deserialize(e)},e.prototype.serializeTransaction=function(e){var t=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});return this.serialize(t,"transaction",n({max_net_usage_words:0,max_cpu_usage_ms:0,delay_sec:0,context_free_actions:[],actions:[],transaction_extensions:[]},e)),t.asUint8Array()},e.prototype.serializeContextFreeData=function(e){var t,r;if(!e||!e.length)return null;var n=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});n.pushVaruint32(e.length);try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var f=o.value;n.pushBytes(f)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.asUint8Array()},e.prototype.deserializeTransaction=function(e){var t=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});return t.pushArray(e),this.deserialize(t,"transaction")},e.prototype.serializeTransactionExtensions=function(e){var t=[];if(e.resource_payer){var r=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder});l.getTypesFromAbi(l.createTransactionExtensionTypes()).get("resource_payer").serialize(r,e.resource_payer),t=a(a([],f(t)),[[1,l.arrayToHex(r.asUint8Array())]])}return t},e.prototype.deserializeTransactionExtensions=function(e){var t=this,r={};return e.forEach((function(e){var n=t.transactionExtensions.find((function(t){return t.id===e[0]}));if(void 0===n)throw new Error("Transaction Extension could not be determined: "+e);var i=l.getTypesFromAbi(l.createTransactionExtensionTypes()),o=new l.SerialBuffer({textEncoder:t.textEncoder,textDecoder:t.textDecoder});o.pushArray(l.hexToUint8Array(e[1]));var f=i.get(n.type).deserialize(o);1===e[0]&&(f.max_net_bytes=Number(f.max_net_bytes),f.max_cpu_us=Number(f.max_cpu_us),f.max_memory_bytes=Number(f.max_memory_bytes),r.resource_payer=f)})),r},e.prototype.deleteTransactionExtensionObjects=function(e){return delete e.resource_payer,e},e.prototype.serializeActions=function(e){return i(this,void 0,void 0,(function(){var t=this;return o(this,(function(r){switch(r.label){case 0:return[4,Promise.all(e.map((function(e){return i(t,void 0,void 0,(function(){var t,r,n,i,f;return o(this,(function(o){switch(o.label){case 0:return t=e.account,r=e.name,n=e.authorization,i=e.data,[4,this.getContract(t)];case 1:return f=o.sent(),"object"!=typeof i?[2,e]:[2,l.serializeAction(f,t,r,n,i,this.textEncoder,this.textDecoder)]}}))}))})))];case 1:return[2,r.sent()]}}))}))},e.prototype.deserializeActions=function(e){return i(this,void 0,void 0,(function(){var t=this;return o(this,(function(r){switch(r.label){case 0:return[4,Promise.all(e.map((function(e){var r=e.account,n=e.name,f=e.authorization,a=e.data;return i(t,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return[4,this.getContract(r)];case 1:return e=t.sent(),[2,l.deserializeAction(e,r,n,f,a,this.textEncoder,this.textDecoder)]}}))}))})))];case 1:return[2,r.sent()]}}))}))},e.prototype.deserializeTransactionWithActions=function(e){return i(this,void 0,void 0,(function(){var t,r,i;return o(this,(function(o){switch(o.label){case 0:return"string"==typeof e&&(e=l.hexToUint8Array(e)),t=this.deserializeTransaction(e),[4,this.deserializeActions(t.context_free_actions)];case 1:return r=o.sent(),[4,this.deserializeActions(t.actions)];case 2:return i=o.sent(),[2,n(n({},t),{context_free_actions:r,actions:i})]}}))}))},e.prototype.deflateSerializedArray=function(e){return c.deflate(e,{level:9})},e.prototype.inflateSerializedArray=function(e){return c.inflate(e)},e.prototype.transact=function(e,t){var r=void 0===t?{}:t,f=r.broadcast,a=void 0===f||f,s=r.sign,c=void 0===s||s,l=r.readOnlyTrx,u=r.returnFailureTraces,d=r.requiredKeys,h=r.compression,p=r.blocksBehind,y=r.useLastIrreversible,b=r.expireSeconds;return i(this,void 0,void 0,(function(){var t,r,i,f,s,g,m,v;return o(this,(function(o){switch(o.label){case 0:if("number"==typeof p&&y)throw new Error("Use either blocksBehind or useLastIrreversible");return this.chainId?[3,2]:[4,this.rpc.get_info()];case 1:t=o.sent(),this.chainId=t.chain_id,o.label=2;case 2:return"number"!=typeof p&&!y||!b?[3,4]:[4,this.generateTapos(t,e,p,y,b)];case 3:e=o.sent(),o.label=4;case 4:if(!this.hasRequiredTaposFields(e))throw new Error("Required configuration or TAPOS fields are not present");return[4,this.getTransactionAbis(e)];case 5:return r=o.sent(),i=[n({},e)],v={},[4,this.serializeTransactionExtensions(e)];case 6:return v.transaction_extensions=o.sent(),[4,this.serializeActions(e.context_free_actions||[])];case 7:return v.context_free_actions=o.sent(),[4,this.serializeActions(e.actions)];case 8:return e=n.apply(void 0,i.concat([(v.actions=o.sent(),v)])),e=this.deleteTransactionExtensionObjects(e),f=this.serializeTransaction(e),s=this.serializeContextFreeData(e.context_free_data),g={serializedTransaction:f,serializedContextFreeData:s,signatures:[]},c?d?[3,11]:[4,this.signatureProvider.getAvailableKeys()]:[3,13];case 9:return m=o.sent(),[4,this.authorityProvider.getRequiredKeys({transaction:e,availableKeys:m})];case 10:d=o.sent(),o.label=11;case 11:return[4,this.signatureProvider.sign({chainId:this.chainId,requiredKeys:d,serializedTransaction:f,serializedContextFreeData:s,abis:r})];case 12:g=o.sent(),o.label=13;case 13:return a?h?[2,this.pushCompressedSignedTransaction(g,l,u)]:[2,this.pushSignedTransaction(g,l,u)]:[2,g]}}))}))},e.prototype.query=function(e,t,r,f){var a=f.sign,s=f.requiredKeys,c=f.authorization,u=void 0===c?[]:c;return i(this,void 0,void 0,(function(){var i,f,c,d,h,p,y,b,g,m,v;return o(this,(function(o){switch(o.label){case 0:return[4,this.rpc.get_info()];case 1:return i=o.sent(),[4,this.tryRefBlockFromGetInfo(i)];case 2:return f=o.sent(),c=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder}),l.serializeQuery(c,r),d=n(n({},l.transactionHeader(f,1800)),{context_free_actions:[],actions:[{account:e,name:"queryit",authorization:u,data:l.arrayToHex(c.asUint8Array())}]}),h=this.serializeTransaction(d),p=[],a?[4,this.getTransactionAbis(d)]:[3,8];case 3:return y=o.sent(),s?[3,6]:[4,this.signatureProvider.getAvailableKeys()];case 4:return b=o.sent(),[4,this.authorityProvider.getRequiredKeys({transaction:d,availableKeys:b})];case 5:s=o.sent(),o.label=6;case 6:return[4,this.signatureProvider.sign({chainId:this.chainId,requiredKeys:s,serializedTransaction:h,serializedContextFreeData:null,abis:y})];case 7:g=o.sent(),p=g.signatures,o.label=8;case 8:return[4,this.rpc.send_transaction({signatures:p,compression:0,serializedTransaction:h})];case 9:return m=o.sent(),v=new l.SerialBuffer({textEncoder:this.textEncoder,textDecoder:this.textDecoder,array:l.hexToUint8Array(m.processed.action_traces[0][1].return_value)}),t?[2,l.deserializeAnyvarShort(v)]:[2,l.deserializeAnyvar(v)]}}))}))},e.prototype.pushSignedTransaction=function(e,t,r){var n=e.signatures,f=e.serializedTransaction,a=e.serializedContextFreeData;return void 0===t&&(t=!1),void 0===r&&(r=!1),i(this,void 0,void 0,(function(){return o(this,(function(e){return t?[2,this.rpc.push_ro_transaction({signatures:n,serializedTransaction:f,serializedContextFreeData:a},r)]:[2,this.rpc.push_transaction({signatures:n,serializedTransaction:f,serializedContextFreeData:a})]}))}))},e.prototype.pushCompressedSignedTransaction=function(e,t,r){var n=e.signatures,f=e.serializedTransaction,a=e.serializedContextFreeData;return void 0===t&&(t=!1),void 0===r&&(r=!1),i(this,void 0,void 0,(function(){var e,i;return o(this,(function(o){return e=this.deflateSerializedArray(f),i=this.deflateSerializedArray(a||new Uint8Array(0)),t?[2,this.rpc.push_ro_transaction({signatures:n,compression:1,serializedTransaction:e,serializedContextFreeData:i},r)]:[2,this.rpc.push_transaction({signatures:n,compression:1,serializedTransaction:e,serializedContextFreeData:i})]}))}))},e.prototype.generateTapos=function(e,t,r,f,a){return i(this,void 0,void 0,(function(){var i,s,c,u;return o(this,(function(o){switch(o.label){case 0:return e?[3,2]:[4,this.rpc.get_info()];case 1:e=o.sent(),o.label=2;case 2:return f?[4,this.tryRefBlockFromGetInfo(e)]:[3,4];case 3:return i=o.sent(),[2,n(n({},l.transactionHeader(i,a)),t)];case 4:return(s=e.head_block_num-r)<=e.last_irreversible_block_num?[4,this.tryGetBlockInfo(s)]:[3,6];case 5:return u=o.sent(),[3,8];case 6:return[4,this.tryGetBlockHeaderState(s)];case 7:u=o.sent(),o.label=8;case 8:return c=u,[2,n(n({},l.transactionHeader(c,a)),t)]}}))}))},e.prototype.hasRequiredTaposFields=function(e){var t=e.expiration,r=e.ref_block_num,n=e.ref_block_prefix;return!(!t||"number"!=typeof r||"number"!=typeof n)},e.prototype.tryGetBlockHeaderState=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,this.rpc.get_block_header_state(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,this.tryGetBlockInfo(e)];case 4:return[2]}}))}))},e.prototype.tryGetBlockInfo=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,4]),[4,this.rpc.get_block_info(e)];case 1:case 3:return[2,t.sent()];case 2:return t.sent(),[4,this.rpc.get_block(e)];case 4:return[2]}}))}))},e.prototype.tryRefBlockFromGetInfo=function(e){return i(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:return e.hasOwnProperty("last_irreversible_block_id")&&e.hasOwnProperty("last_irreversible_block_num")&&e.hasOwnProperty("last_irreversible_block_time")?[2,{block_num:e.last_irreversible_block_num,id:e.last_irreversible_block_id,timestamp:e.last_irreversible_block_time}]:[3,1];case 1:return[4,this.tryGetBlockInfo(e.last_irreversible_block_num)];case 2:return[2,{block_num:(t=r.sent()).block_num,id:t.id,timestamp:t.timestamp}]}}))}))},e.prototype.with=function(e){return new h(this,e)},e.prototype.buildTransaction=function(e){var t=new d(this);return e?e(t):t},e}();t.Api=u;var d=function(){function e(e){this.actions=[],this.contextFreeGroups=[],this.api=e}return e.prototype.with=function(e){var t=new h(this.api,e);return this.actions.push(t),t},e.prototype.associateContextFree=function(e){return this.contextFreeGroups.push(e),this},e.prototype.send=function(e){return i(this,void 0,void 0,(function(){var t,r,n,f=this;return o(this,(function(a){switch(a.label){case 0:return t=[],r=[],n=this.actions.map((function(e){return e.serializedData})),[4,Promise.all(this.contextFreeGroups.map((function(e){return i(f,void 0,void 0,(function(){var i,f,a,s;return o(this,(function(o){return i=e({cfd:t.length,cfa:r.length}),f=i.action,a=i.contextFreeAction,s=i.contextFreeData,f&&n.push(f),a&&r.push(a),s&&t.push(s),[2]}))}))})))];case 1:return a.sent(),this.contextFreeGroups=[],this.actions=[],[4,this.api.transact({context_free_data:t,context_free_actions:r,actions:n},e)];case 2:return[2,a.sent()]}}))}))},e}();t.TransactionBuilder=d;var h=function(){function e(e,t){this.api=e,this.accountName=t}return e.prototype.as=function(e){void 0===e&&(e=[]);var t=[];return t=e&&"string"==typeof e?[{actor:e,permission:"active"}]:e,new p(this,this.api,this.accountName,t)},e}();t.ActionBuilder=h;var p=function(e,t,r,n){var i,o,f=this,a=t.cachedAbis.get(r);if(!a)throw new Error("ABI must be cached before using ActionBuilder, run api.getAbi()");var c=l.getTypesFromAbi(l.createInitialTypes(),a.abi),u=new Map;try{for(var d=s(a.abi.actions),h=d.next();!h.done;h=d.next()){var p=h.value,y=p.name,b=p.type;u.set(y,l.getType(c,b))}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}u.forEach((function(i,o){var a;Object.assign(f,((a={})[o]=function(){for(var f=[],a=0;a{"use strict";t.b=void 0;var n=r(58722),i=r(78125),o=r(722);t.b={initialize:function(){return console.error("Method deprecated")},unsafeRandomKey:function(){return console.error("Method deprecated")},randomKey:function(e,t){void 0===t&&(t={}),void 0!==e&&console.warn("Argument `cpuEntropyBits` is deprecated, use the options argument instead");var r=i.generateKeyPair(o.KeyType.k1,t).privateKey;return Promise.resolve(r.toLegacyString())},seedPrivate:function(){return console.error("Method deprecated")},privateToPublic:function(e,t){return void 0!==t&&console.warn("Argument `pubkey_prefix` is deprecated, keys prefixed with PUB_K1_/PUB_R1_/PUB_WA_ going forward"),n.PrivateKey.fromString(e).getPublicKey().toLegacyString()},isValidPublic:function(e,t){void 0!==t&&console.warn("Argument `pubkey_prefix` is deprecated, keys prefixed with PUB_K1_/PUB_R1_/PUB_WA_ going forward");try{return n.PublicKey.fromString(e).isValid()}catch(e){return!1}},isValidPrivate:function(e){try{return n.PrivateKey.fromString(e).isValid()}catch(e){return!1}},sign:function(e,t,r){return void 0===r&&(r="utf8"),("string"==typeof t?n.PrivateKey.fromString(t):t).sign(e,!0,r).toString()},signHash:function(e,t,r){return void 0===r&&(r="hex"),("string"==typeof t?n.PrivateKey.fromString(t):t).sign(e,!1,r).toString()},verify:function(e,t,r,i,o){void 0===i&&(i="utf8"),void 0===o&&(o=!0);var f="string"==typeof r?n.PublicKey.fromString(r):r;return n.Signature.fromString(e).verify(t,f,o,i)},recover:function(e,t,r){return void 0===r&&(r="utf8"),n.Signature.fromString(e).recover(t,!0,r).toLegacyString()},recoverHash:function(e,t,r){return void 0===r&&(r="hex"),n.Signature.fromString(e).recover(t,!1,r).toLegacyString()},sha256:function(e,t,n){return void 0!==n&&console.warn("Argument `encoding` is deprecated"),void 0!==t&&console.warn("Argument `resultEncoding` is deprecated"),r(78125).sha256(e)}}},77556:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;f;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return f.label++,{value:o[1],done:!1};case 5:f.label++,n=o[1],o=[0];continue;case 7:o=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){f=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpc=void 0;var f=r(722),a=r(22485),s=function(e){var t,r,n="";try{for(var i=o(e),f=i.next();!f.done;f=i.next()){n+=("00"+f.value.toString(16)).slice(-2)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},c=function(){function e(e,t){void 0===t&&(t={}),this.endpoint=e.replace(/\/$/,""),t.fetch?this.fetchBuiltin=t.fetch:this.fetchBuiltin=r.g.fetch}return e.prototype.fetch=function(e,t){return n(this,void 0,void 0,(function(){var r,n,o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,(0,this.fetchBuiltin)(this.endpoint+e,{body:JSON.stringify(t),method:"POST"})];case 1:return[4,(r=i.sent()).json()];case 2:if((n=i.sent()).processed&&n.processed.except)throw new a.RpcError(n);if(n.result&&n.result.except)throw new a.RpcError(n);return[3,4];case 3:throw(o=i.sent()).isFetchError=!0,o;case 4:if(!r.ok)throw new a.RpcError(n);return[2,n]}}))}))},e.prototype.abi_bin_to_json=function(e,t,r){return n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/abi_bin_to_json",{code:e,action:t,binargs:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.abi_json_to_bin=function(e,t,r){return n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/abi_json_to_bin",{code:e,action:t,args:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_abi=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_abi",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_account=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_account",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_accounts_by_authorizers=function(e,t){return n(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.fetch("/v1/chain/get_accounts_by_authorizers",{accounts:e,keys:t})];case 1:return[2,r.sent()]}}))}))},e.prototype.get_activated_protocol_features=function(e){var t=e.limit,r=void 0===t?10:t,o=e.search_by_block_num,f=void 0!==o&&o,a=e.reverse,s=void 0!==a&&a,c=e.lower_bound,l=void 0===c?null:c,u=e.upper_bound,d=void 0===u?null:u;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_activated_protocol_features",{lower_bound:l,upper_bound:d,limit:r,search_by_block_num:f,reverse:s})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_block_header_state=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_block_header_state",{block_num_or_id:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_block_info=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_block_info",{block_num:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_block=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_block",{block_num_or_id:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_code=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_code",{account_name:e,code_as_wasm:!0})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_code_hash=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_code_hash",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_currency_balance=function(e,t,r){return void 0===r&&(r=null),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/get_currency_balance",{code:e,account:t,symbol:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_currency_stats=function(e,t){return n(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.fetch("/v1/chain/get_currency_stats",{code:e,symbol:t})];case 1:return[2,r.sent()]}}))}))},e.prototype.get_info=function(){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_info",{})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_producer_schedule=function(){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_producer_schedule",{})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_producers=function(e,t,r){return void 0===e&&(e=!0),void 0===t&&(t=""),void 0===r&&(r=50),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/get_producers",{json:e,lower_bound:t,limit:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_raw_code_and_abi=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_raw_code_and_abi",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.getRawAbi=function(e){return n(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return[4,this.get_raw_abi(e)];case 1:return t=n.sent(),r=f.base64ToBinary(t.abi),[2,{accountName:t.account_name,abi:r}]}}))}))},e.prototype.get_raw_abi=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/chain/get_raw_abi",{account_name:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.get_scheduled_transactions=function(e,t,r){return void 0===e&&(e=!0),void 0===t&&(t=""),void 0===r&&(r=50),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/chain/get_scheduled_transactions",{json:e,lower_bound:t,limit:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.get_table_rows=function(e){var t=e.json,r=void 0===t||t,o=e.code,f=e.scope,a=e.table,s=e.lower_bound,c=void 0===s?"":s,l=e.upper_bound,u=void 0===l?"":l,d=e.index_position,h=void 0===d?1:d,p=e.key_type,y=void 0===p?"":p,b=e.limit,g=void 0===b?10:b,m=e.reverse,v=void 0!==m&&m,w=e.show_payer,A=void 0!==w&&w;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_table_rows",{json:r,code:o,scope:f,table:a,lower_bound:c,upper_bound:u,index_position:h,key_type:y,limit:g,reverse:v,show_payer:A})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_kv_table_rows=function(e){var t=e.json,r=void 0===t||t,o=e.code,f=e.table,a=e.index_name,s=e.encode_type,c=void 0===s?"bytes":s,l=e.index_value,u=e.lower_bound,d=e.upper_bound,h=e.limit,p=void 0===h?10:h,y=e.reverse,b=void 0!==y&&y,g=e.show_payer,m=void 0!==g&&g;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_kv_table_rows",{json:r,code:o,table:f,index_name:a,encode_type:c,index_value:l,lower_bound:u,upper_bound:d,limit:p,reverse:b,show_payer:m})];case 1:return[2,e.sent()]}}))}))},e.prototype.get_table_by_scope=function(e){var t=e.code,r=e.table,o=e.lower_bound,f=void 0===o?"":o,a=e.upper_bound,s=void 0===a?"":a,c=e.limit,l=void 0===c?10:c;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/get_table_by_scope",{code:t,table:r,lower_bound:f,upper_bound:s,limit:l})];case 1:return[2,e.sent()]}}))}))},e.prototype.getRequiredKeys=function(e){return n(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=f.convertLegacyPublicKeys,[4,this.fetch("/v1/chain/get_required_keys",{transaction:e.transaction,available_keys:e.availableKeys})];case 1:return[2,t.apply(void 0,[r.sent().required_keys])]}}))}))},e.prototype.push_transaction=function(e){var t=e.signatures,r=e.compression,o=void 0===r?0:r,f=e.serializedTransaction,a=e.serializedContextFreeData;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/push_transaction",{signatures:t,compression:o,packed_context_free_data:s(a||new Uint8Array(0)),packed_trx:s(f)})];case 1:return[2,e.sent()]}}))}))},e.prototype.push_ro_transaction=function(e,t){var r=e.signatures,o=e.compression,f=void 0===o?0:o,a=e.serializedTransaction;return void 0===t&&(t=!1),n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/push_ro_transaction",{transaction:{signatures:r,compression:f,packed_context_free_data:s(new Uint8Array(0)),packed_trx:s(a)},return_failure_traces:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.push_transactions=function(e){return n(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=e.map((function(e){var t=e.signatures,r=e.compression,n=void 0===r?0:r,i=e.serializedTransaction,o=e.serializedContextFreeData;return{signatures:t,compression:n,packed_context_free_data:s(o||new Uint8Array(0)),packed_trx:s(i)}})),[4,this.fetch("/v1/chain/push_transactions",t)];case 1:return[2,r.sent()]}}))}))},e.prototype.send_transaction=function(e){var t=e.signatures,r=e.compression,o=void 0===r?0:r,f=e.serializedTransaction,a=e.serializedContextFreeData;return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/chain/send_transaction",{signatures:t,compression:o,packed_context_free_data:s(a||new Uint8Array(0)),packed_trx:s(f)})];case 1:return[2,e.sent()]}}))}))},e.prototype.db_size_get=function(){return n(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.fetch("/v1/db_size/get",{})];case 1:return[2,e.sent()]}}))}))},e.prototype.trace_get_block=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/trace_api/get_block",{block_num:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.history_get_actions=function(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=null),n(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.fetch("/v1/history/get_actions",{account_name:e,pos:t,offset:r})];case 1:return[2,n.sent()]}}))}))},e.prototype.history_get_transaction=function(e,t){return void 0===t&&(t=null),n(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.fetch("/v1/history/get_transaction",{id:e,block_num_hint:t})];case 1:return[2,r.sent()]}}))}))},e.prototype.history_get_key_accounts=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/history/get_key_accounts",{public_key:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.history_get_controlled_accounts=function(e){return n(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.fetch("/v1/history/get_controlled_accounts",{controlling_account:e})];case 1:return[2,t.sent()]}}))}))},e}();t.JsonRpc=c},58722:function(e,t,r){"use strict";var n=r(48764).lW,i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;f;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return f.label++,{value:o[1],done:!1};case 5:f.label++,n=o[1],o=[0];continue;case 7:o=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){f=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.JsSignatureProvider=t.digestFromSerializedData=t.Signature=t.PublicKey=t.PrivateKey=void 0;var a=r(86266),s=r(78125);Object.defineProperty(t,"PrivateKey",{enumerable:!0,get:function(){return s.PrivateKey}}),Object.defineProperty(t,"PublicKey",{enumerable:!0,get:function(){return s.PublicKey}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return s.Signature}});var c=r(722),l=new a.ec("secp256k1"),u=function(e,t,r,i){void 0===i&&(i=l);var o=n.concat([n.from(e,"hex"),n.from(t),n.from(r?new Uint8Array(i.hash().update(r).digest()):new Uint8Array(32))]);return i.hash().update(o).digest()};t.digestFromSerializedData=u;var d=function(){function e(e){var t,r;this.keys=new Map,this.availableKeys=[];try{for(var n=f(e),i=n.next();!i.done;i=n.next()){var o=i.value,a=s.PrivateKey.fromString(o),c=a.toElliptic(),l=a.getPublicKey().toString();this.keys.set(l,c),this.availableKeys.push(l)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}}return e.prototype.getAvailableKeys=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.availableKeys]}))}))},e.prototype.sign=function(e){var t=e.chainId,r=e.requiredKeys,n=e.serializedTransaction,a=e.serializedContextFreeData;return i(this,void 0,void 0,(function(){var e,i,d,h,p,y,b,g,m,v,w;return o(this,(function(o){e=u(t,n,a,l),i=[];try{for(d=f(r),h=d.next();!h.done;h=d.next())p=h.value,y=s.PublicKey.fromString(p),b=this.keys.get(c.convertLegacyPublicKey(p)),g=s.PrivateKey.fromElliptic(b,y.getType()),m=g.sign(e,!1),i.push(m.toString())}catch(e){v={error:e}}finally{try{h&&!h.done&&(w=d.return)&&w.call(d)}finally{if(v)throw v.error}}return[2,{signatures:i,serializedTransaction:n,serializedContextFreeData:a}]}))}))},e}();t.JsSignatureProvider=d},78125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha256=t.generateKeyPair=t.constructElliptic=t.Signature=t.PublicKey=t.PrivateKey=void 0;var n=r(86266),i=r(33715),o=r(722),f=r(62680),a=r(39265),s=r(39265);Object.defineProperty(t,"PrivateKey",{enumerable:!0,get:function(){return s.PrivateKey}});var c=r(62680);Object.defineProperty(t,"PublicKey",{enumerable:!0,get:function(){return c.PublicKey}});var l=r(70578);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return l.Signature}});t.constructElliptic=function(e){return e===o.KeyType.k1?new n.ec("secp256k1"):new n.ec("p256")};t.generateKeyPair=function(e,t){if(void 0===t&&(t={}),!t.secureEnv)throw new Error("Key generation is completely INSECURE in production environments in the browser. If you are absolutely certain this does NOT describe your environment, set `secureEnv` in your options to `true`. If this does describe your environment and you set `secureEnv` to `true`, YOU DO SO AT YOUR OWN RISK AND THE RISK OF YOUR USERS.");var r,i=(r=e===o.KeyType.k1?new n.ec("secp256k1"):new n.ec("p256")).genKeyPair(t.ecOptions);return{publicKey:f.PublicKey.fromElliptic(i,e,r),privateKey:a.PrivateKey.fromElliptic(i,e,r)}};t.sha256=function(e){return i.sha256().update(e).digest()}},722:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToString=t.stringToSignature=t.privateKeyToString=t.privateKeyToLegacyString=t.stringToPrivateKey=t.convertLegacyPublicKeys=t.convertLegacyPublicKey=t.publicKeyToString=t.publicKeyToLegacyString=t.stringToPublicKey=t.signatureDataSize=t.privateKeyDataSize=t.publicKeyDataSize=t.KeyType=t.base64ToBinary=t.binaryToBase58=t.base58ToBinary=t.signedBinaryToDecimal=t.binaryToDecimal=t.signedDecimalToBinary=t.decimalToBinary=t.negate=t.isNegative=void 0;var f=r(33715),a=r(12057).RIPEMD160.hash,s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(){for(var e=Array(256).fill(-1),t=0;t"9".charCodeAt(0))throw new Error("invalid number");for(var o=i-"0".charCodeAt(0),f=0;f>8}if(o)throw new Error("number is out of range")}return r};t.signedDecimalToBinary=function(e,r){var n="-"===r[0];n&&(r=r.substr(1));var i=t.decimalToBinary(e,r);if(n){if(t.negate(i),!t.isNegative(i))throw new Error("number is out of range")}else if(t.isNegative(i))throw new Error("number is out of range");return i};t.binaryToDecimal=function(e,t){void 0===t&&(t=1);for(var r=Array(t).fill("0".charCodeAt(0)),o=e.length-1;o>=0;--o){for(var f=e[o],a=0;a>8}f&&n.push(f)}try{for(var c=o(e),u=c.next();!u.done&&"1"===u.value;u=c.next())n.push(0)}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.reverse(),new Uint8Array(n)}(t);for(var r=new Uint8Array(e),n=0;n>8}if(i)throw new Error("base-58 value is out of range")}return r.reverse(),r};t.binaryToBase58=function(e,t){var r,f,a,c;void 0===t&&(t=1);var u=[];try{for(var d=o(e),h=d.next();!h.done;h=d.next()){for(var p=h.value,y=0;y>2,n=3*r;t>0&&"="===e[t-1]&&("="===e[t-2]?n-=2:n-=1);for(var i=new Uint8Array(n),o=0;o>4,3*o+1>2),3*o+2{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22485:function(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=void 0;var i=function(e){function t(r){var n=this;return r.error&&r.error.details&&r.error.details.length&&r.error.details[0].message?(n=e.call(this,r.error.details[0].message)||this).details=r.error.details:r.processed&&r.processed.except&&r.processed.except.message?(n=e.call(this,r.processed.except.message)||this).details=r.processed.except:r.result&&r.result.except&&r.result.except.message?(n=e.call(this,r.result.except.message)||this).details=r.result.except:n=e.call(this,r.message)||this,Object.setPrototypeOf(n,t.prototype),n.json=r,n}return n(t,e),t}(Error);t.RpcError=i},68888:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.serializeQuery=t.deserializeAnyArray=t.serializeAnyArray=t.deserializeAnyObject=t.serializeAnyObject=t.deserializeAnyvarShort=t.deserializeAnyvar=t.serializeAnyvar=t.deserializeAction=t.deserializeActionData=t.serializeAction=t.serializeActionData=t.transactionHeader=t.getTypesFromAbi=t.getType=t.createTransactionTypes=t.createTransactionExtensionTypes=t.createAbiTypes=t.createInitialTypes=t.hexToUint8Array=t.arrayToHex=t.symbolToString=t.stringToSymbol=t.blockTimestampToDate=t.dateToBlockTimestamp=t.timePointSecToDate=t.dateToTimePointSec=t.timePointToDate=t.dateToTimePoint=t.supportedAbiVersion=t.SerialBuffer=t.SerializerState=void 0;var a=r(722),s=function(e){void 0===e&&(e={}),this.skippedBinaryExtension=!1,this.options=e};t.SerializerState=s;var c=function(){function e(e){var t=void 0===e?{}:e,r=t.textEncoder,n=t.textDecoder,i=t.array;this.readPos=0,this.array=i||new Uint8Array(1024),this.length=i?i.length:0,this.textEncoder=r||new TextEncoder,this.textDecoder=n||new TextDecoder("utf-8",{fatal:!0})}return e.prototype.reserve=function(e){if(!(this.length+e<=this.array.length)){for(var t=this.array.length;this.length+e>t;)t=Math.ceil(1.5*t);var r=new Uint8Array(t);r.set(this.array),this.array=r}},e.prototype.haveReadData=function(){return this.readPosthis.length)throw new Error("Read past end of buffer");var t=new Uint8Array(this.array.buffer,this.array.byteOffset+this.readPos,e);return this.readPos+=e,t},e.prototype.skip=function(e){if(this.readPos+e>this.length)throw new Error("Read past end of buffer");this.readPos+=e},e.prototype.pushUint16=function(e){this.push(e>>0&255,e>>8&255)},e.prototype.getUint16=function(){var e=0;return e|=this.get()<<0,e|=this.get()<<8},e.prototype.pushUint32=function(e){this.push(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},e.prototype.getUint32=function(){var e=0;return e|=this.get()<<0,e|=this.get()<<8,e|=this.get()<<16,(e|=this.get()<<24)>>>0},e.prototype.pushNumberAsUint64=function(e){this.pushUint32(e>>>0),this.pushUint32(Math.floor(e/4294967296)>>>0)},e.prototype.getUint64AsNumber=function(){var e=this.getUint32();return 4294967296*(this.getUint32()>>>0)+(e>>>0)},e.prototype.pushVaruint32=function(e){for(;;){if(!(e>>>7)){this.push(e);break}this.push(128|127&e),e>>>=7}},e.prototype.getVaruint32=function(){for(var e=0,t=0;;){var r=this.get();if(e|=(127&r)<>>0},e.prototype.pushVarint32=function(e){this.pushVaruint32(e<<1^e>>31)},e.prototype.getVarint32=function(){var e=this.getVaruint32();return 1&e?~e>>1|2147483648:e>>>1},e.prototype.pushFloat32=function(e){this.pushArray(new Uint8Array(new Float32Array([e]).buffer))},e.prototype.getFloat32=function(){return new Float32Array(this.getUint8Array(4).slice().buffer)[0]},e.prototype.pushFloat64=function(e){this.pushArray(new Uint8Array(new Float64Array([e]).buffer))},e.prototype.getFloat64=function(){return new Float64Array(this.getUint8Array(8).slice().buffer)[0]},e.prototype.pushName=function(e){if("string"!=typeof e)throw new Error("Expected string containing name");if(!new RegExp(/^[.1-5a-z]{0,12}[.1-5a-j]?$/).test(e))throw new Error("Name should be less than 13 characters, or less than 14 if last character is between 1-5 or a-j, and only contain the following symbols .12345abcdefghijklmnopqrstuvwxyz");for(var t=function(e){return e>="a".charCodeAt(0)&&e<="z".charCodeAt(0)?e-"a".charCodeAt(0)+6:e>="1".charCodeAt(0)&&e<="5".charCodeAt(0)?e-"1".charCodeAt(0)+1:0},r=new Uint8Array(8),n=63,i=0;i=0;--f)n>=0&&(r[Math.floor(n/8)]|=(o>>f&1)<=0;){for(var n=0,i=0;i<5;++i)r>=0&&(n=n<<1|e[Math.floor(r/8)]>>r%8&1,--r);t+=n>=6?String.fromCharCode(n+"a".charCodeAt(0)-6):n>=1?String.fromCharCode(n+"1".charCodeAt(0)-1):"."}for(;t.endsWith(".");)t=t.substr(0,t.length-1);return t},e.prototype.pushBytes=function(e){this.pushVaruint32(e.length),this.pushArray(e)},e.prototype.getBytes=function(){return this.getUint8Array(this.getVaruint32())},e.prototype.pushString=function(e){this.pushBytes(this.textEncoder.encode(e))},e.prototype.getString=function(){return this.textDecoder.decode(this.getBytes())},e.prototype.pushSymbolCode=function(e){if("string"!=typeof e)throw new Error("Expected string containing symbol_code");var t=[];for(t.push.apply(t,o([],i(this.textEncoder.encode(e))));t.length<8;)t.push(0);this.pushArray(t.slice(0,8))},e.prototype.getSymbolCode=function(){var e,t=this.getUint8Array(8);for(e=0;e="0".charCodeAt(0)&&e.charCodeAt(t)<="9".charCodeAt(0);)i=!0,r+=e[t],++t;if(!i)throw new Error("Asset must begin with a number");if("."===e[t])for(++t;t="0".charCodeAt(0)&&e.charCodeAt(t)<="9".charCodeAt(0);)r+=e[t],++n,++t;var o=e.substr(t).trim();this.pushArray(a.signedDecimalToBinary(8,r)),this.pushSymbol({name:o,precision:n})},e.prototype.getAsset=function(){var e=this.getUint8Array(8),t=this.getSymbol(),r=t.name,n=t.precision,i=a.signedBinaryToDecimal(e,n+1);return n&&(i=i.substr(0,i.length-n)+"."+i.substr(i.length-n)),i+" "+r},e.prototype.pushPublicKey=function(e){var t=a.stringToPublicKey(e);this.push(t.type),this.pushArray(t.data)},e.prototype.getPublicKey=function(){var e,t=this.get();if(t===a.KeyType.wa){var r=this.readPos;this.skip(34),this.skip(this.getVaruint32()),e=new Uint8Array(this.array.buffer,this.array.byteOffset+r,this.readPos-r)}else e=this.getUint8Array(a.publicKeyDataSize);return a.publicKeyToString({type:t,data:e})},e.prototype.pushPrivateKey=function(e){var t=a.stringToPrivateKey(e);this.push(t.type),this.pushArray(t.data)},e.prototype.getPrivateKey=function(){var e=this.get(),t=this.getUint8Array(a.privateKeyDataSize);return a.privateKeyToString({type:e,data:t})},e.prototype.pushSignature=function(e){var t=a.stringToSignature(e);this.push(t.type),this.pushArray(t.data)},e.prototype.getSignature=function(){var e,t=this.get();if(t===a.KeyType.wa){var r=this.readPos;this.skip(65),this.skip(this.getVaruint32()),this.skip(this.getVaruint32()),e=new Uint8Array(this.array.buffer,this.array.byteOffset+r,this.readPos-r)}else e=this.getUint8Array(a.signatureDataSize);return a.signatureToString({type:t,data:e})},e}();t.SerialBuffer=c;t.supportedAbiVersion=function(e){return e.startsWith("eosio::abi/1.")};var l=function(e){var t=Date.parse(e);if(Number.isNaN(t))throw new Error("Invalid time format");return t};t.dateToTimePoint=function(e){return Math.round(1e3*l(e+"Z"))};t.timePointToDate=function(e){var t=new Date(e/1e3).toISOString();return t.substr(0,t.length-1)};t.dateToTimePointSec=function(e){return Math.round(l(e+"Z")/1e3)};t.timePointSecToDate=function(e){var t=new Date(1e3*e).toISOString();return t.substr(0,t.length-1)};t.dateToBlockTimestamp=function(e){return Math.round((l(e+"Z")-9466848e5)/500)};t.blockTimestampToDate=function(e){var t=new Date(500*e+9466848e5).toISOString();return t.substr(0,t.length-1)};t.stringToSymbol=function(e){if("string"!=typeof e)throw new Error("Expected string containing symbol");var t=e.match(/^([0-9]+),([A-Z]+)$/);if(!t)throw new Error("Invalid symbol");return{name:t[2],precision:+t[1]}};t.symbolToString=function(e){var t=e.name;return e.precision+","+t};t.arrayToHex=function(e){var t,r,n="";try{for(var i=f(e),o=i.next();!o.done;o=i.next()){n+=("00"+o.value.toString(16)).slice(-2)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n.toUpperCase()};function u(e,t){throw new Error("Don't know how to serialize "+this.name)}function d(e){throw new Error("Don't know how to deserialize "+this.name)}function h(e,t,r,n){var i,o;if(void 0===r&&(r=new s),void 0===n&&(n=!0),"object"!=typeof t)throw new Error("expected object containing data: "+JSON.stringify(t));this.base&&this.base.serialize(e,t,r,n);try{for(var a=f(this.fields),c=a.next();!c.done;c=a.next()){var l=c.value;if(l.name in t){if(r.skippedBinaryExtension)throw new Error("unexpected "+this.name+"."+l.name);l.type.serialize(e,t[l.name],r,n&&l===this.fields[this.fields.length-1])}else{if(!n||!l.type.extensionOf)throw new Error("missing "+this.name+"."+l.name+" (type="+l.type.name+")");r.skippedBinaryExtension=!0}}}catch(e){i={error:e}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}function p(e,t,r){var n,i,o;void 0===t&&(t=new s),void 0===r&&(r=!0),o=this.base?this.base.deserialize(e,t,r):{};try{for(var a=f(this.fields),c=a.next();!c.done;c=a.next()){var l=c.value;r&&l.type.extensionOf&&!e.haveReadData()?t.skippedBinaryExtension=!0:o[l.name]=l.type.deserialize(e,t,r)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}function y(e,t,r,n){if(!Array.isArray(t)||2!==t.length||"string"!=typeof t[0])throw new Error('expected variant: ["type", value]');var i=this.fields.findIndex((function(e){return e.name===t[0]}));if(i<0)throw new Error('type "'+t[0]+'" is not valid for variant');e.pushVaruint32(i),this.fields[i].type.serialize(e,t[1],r,n)}function b(e,t,r){var n=e.getVaruint32();if(n>=this.fields.length)throw new Error("type index "+n+" is not valid for variant");var i=this.fields[n];return[i.name,i.type.deserialize(e,t,r)]}function g(e,t,r,n){var i,o;e.pushVaruint32(t.length);try{for(var a=f(t),s=a.next();!s.done;s=a.next()){var c=s.value;this.arrayOf.serialize(e,c,r,!1)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}function m(e,t,r){for(var n=e.getVaruint32(),i=[],o=0;o",aliasOfName:"",arrayOf:null,optionalOf:null,extensionOf:null,baseName:"",base:null,fields:[],serialize:u,deserialize:d},e)},P=function(e,t){if(Number.isNaN(+e)||Number.isNaN(+t)||"number"!=typeof e&&"string"!=typeof e)throw new Error("Expected number");if(+e!=+t)throw new Error("Number is out of range");return+e};t.createInitialTypes=function(){var e=new Map(Object.entries({bool:x({name:"bool",serialize:function(e,t){if("boolean"!=typeof t&&("number"!=typeof t||1!==t&&0!==t))throw new Error("Expected boolean or number equal to 1 or 0");e.push(t?1:0)},deserialize:function(e){return!!e.get()}}),uint8:x({name:"uint8",serialize:function(e,t){e.push(P(t,255&t))},deserialize:function(e){return e.get()}}),int8:x({name:"int8",serialize:function(e,t){e.push(P(t,t<<24>>24))},deserialize:function(e){return e.get()<<24>>24}}),uint16:x({name:"uint16",serialize:function(e,t){e.pushUint16(P(t,65535&t))},deserialize:function(e){return e.getUint16()}}),int16:x({name:"int16",serialize:function(e,t){e.pushUint16(P(t,t<<16>>16))},deserialize:function(e){return e.getUint16()<<16>>16}}),uint32:x({name:"uint32",serialize:function(e,t){e.pushUint32(P(t,t>>>0))},deserialize:function(e){return e.getUint32()}}),uint64:x({name:"uint64",serialize:function(e,t){e.pushArray(a.decimalToBinary(8,""+t))},deserialize:function(e){return a.binaryToDecimal(e.getUint8Array(8))}}),int64:x({name:"int64",serialize:function(e,t){e.pushArray(a.signedDecimalToBinary(8,""+t))},deserialize:function(e){return a.signedBinaryToDecimal(e.getUint8Array(8))}}),int32:x({name:"int32",serialize:function(e,t){e.pushUint32(P(t,0|t))},deserialize:function(e){return 0|e.getUint32()}}),varuint32:x({name:"varuint32",serialize:function(e,t){e.pushVaruint32(P(t,t>>>0))},deserialize:function(e){return e.getVaruint32()}}),varint32:x({name:"varint32",serialize:function(e,t){e.pushVarint32(P(t,0|t))},deserialize:function(e){return e.getVarint32()}}),uint128:x({name:"uint128",serialize:function(e,t){e.pushArray(a.decimalToBinary(16,""+t))},deserialize:function(e){return a.binaryToDecimal(e.getUint8Array(16))}}),int128:x({name:"int128",serialize:function(e,t){e.pushArray(a.signedDecimalToBinary(16,""+t))},deserialize:function(e){return a.signedBinaryToDecimal(e.getUint8Array(16))}}),float32:x({name:"float32",serialize:function(e,t){e.pushFloat32(t)},deserialize:function(e){return e.getFloat32()}}),float64:x({name:"float64",serialize:function(e,t){e.pushFloat64(t)},deserialize:function(e){return e.getFloat64()}}),float128:x({name:"float128",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),16)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(16))}}),bytes:x({name:"bytes",serialize:function(e,r){r instanceof Uint8Array||Array.isArray(r)?e.pushBytes(r):e.pushBytes(t.hexToUint8Array(r))},deserialize:function(e,r){return r&&r.options.bytesAsUint8Array?e.getBytes():t.arrayToHex(e.getBytes())}}),string:x({name:"string",serialize:function(e,t){e.pushString(t)},deserialize:function(e){return e.getString()}}),name:x({name:"name",serialize:function(e,t){e.pushName(t)},deserialize:function(e){return e.getName()}}),time_point:x({name:"time_point",serialize:function(e,r){e.pushNumberAsUint64(t.dateToTimePoint(r))},deserialize:function(e){return t.timePointToDate(e.getUint64AsNumber())}}),time_point_sec:x({name:"time_point_sec",serialize:function(e,r){e.pushUint32(t.dateToTimePointSec(r))},deserialize:function(e){return t.timePointSecToDate(e.getUint32())}}),block_timestamp_type:x({name:"block_timestamp_type",serialize:function(e,r){e.pushUint32(t.dateToBlockTimestamp(r))},deserialize:function(e){return t.blockTimestampToDate(e.getUint32())}}),symbol_code:x({name:"symbol_code",serialize:function(e,t){e.pushSymbolCode(t)},deserialize:function(e){return e.getSymbolCode()}}),symbol:x({name:"symbol",serialize:function(e,r){e.pushSymbol(t.stringToSymbol(r))},deserialize:function(e){return t.symbolToString(e.getSymbol())}}),asset:x({name:"asset",serialize:function(e,t){e.pushAsset(t)},deserialize:function(e){return e.getAsset()}}),checksum160:x({name:"checksum160",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),20)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(20))}}),checksum256:x({name:"checksum256",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),32)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(32))}}),checksum512:x({name:"checksum512",serialize:function(e,r){e.pushUint8ArrayChecked(t.hexToUint8Array(r),64)},deserialize:function(e){return t.arrayToHex(e.getUint8Array(64))}}),public_key:x({name:"public_key",serialize:function(e,t){e.pushPublicKey(t)},deserialize:function(e){return e.getPublicKey()}}),private_key:x({name:"private_key",serialize:function(e,t){e.pushPrivateKey(t)},deserialize:function(e){return e.getPrivateKey()}}),signature:x({name:"signature",serialize:function(e,t){e.pushSignature(t)},deserialize:function(e){return e.getSignature()}})}));return e.set("extended_asset",x({name:"extended_asset",baseName:"",fields:[{name:"quantity",typeName:"asset",type:e.get("asset")},{name:"contract",typeName:"name",type:e.get("name")}],serialize:h,deserialize:p})),e};t.createAbiTypes=function(){var e=t.createInitialTypes();return e.set("extensions_entry",x({name:"extensions_entry",baseName:"",fields:[{name:"tag",typeName:"uint16",type:null},{name:"value",typeName:"bytes",type:null}],serialize:h,deserialize:p})),e.set("type_def",x({name:"type_def",baseName:"",fields:[{name:"new_type_name",typeName:"string",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("field_def",x({name:"field_def",baseName:"",fields:[{name:"name",typeName:"string",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("struct_def",x({name:"struct_def",baseName:"",fields:[{name:"name",typeName:"string",type:null},{name:"base",typeName:"string",type:null},{name:"fields",typeName:"field_def[]",type:null}],serialize:h,deserialize:p})),e.set("action_def",x({name:"action_def",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"type",typeName:"string",type:null},{name:"ricardian_contract",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("table_def",x({name:"table_def",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"index_type",typeName:"string",type:null},{name:"key_names",typeName:"string[]",type:null},{name:"key_types",typeName:"string[]",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("clause_pair",x({name:"clause_pair",baseName:"",fields:[{name:"id",typeName:"string",type:null},{name:"body",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("error_message",x({name:"error_message",baseName:"",fields:[{name:"error_code",typeName:"uint64",type:null},{name:"error_msg",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("variant_def",x({name:"variant_def",baseName:"",fields:[{name:"name",typeName:"string",type:null},{name:"types",typeName:"string[]",type:null}],serialize:h,deserialize:p})),e.set("action_result",x({name:"action_result",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"result_type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("primary_key_index_def",x({name:"primary_key_index_def",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("secondary_index_def",x({name:"secondary_index_def",baseName:"",fields:[{name:"type",typeName:"string",type:null}],serialize:h,deserialize:p})),e.set("secondary_indices",x({name:"secondary_indices",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"secondary_index_def",typeName:"secondary_index_def",type:null}],serialize:_,deserialize:k})),e.set("kv_table_entry_def",x({name:"kv_table_entry_def",baseName:"",fields:[{name:"type",typeName:"string",type:null},{name:"primary_index",typeName:"primary_key_index_def",type:null},{name:"secondary_indices",typeName:"secondary_indices",type:null}],serialize:h,deserialize:p})),e.set("kv_table",x({name:"kv_table",baseName:"",fields:[{name:"name",typeName:"name",type:null},{name:"kv_table_entry_def",typeName:"kv_table_entry_def",type:null}],serialize:_,deserialize:k})),e.set("abi_def",x({name:"abi_def",baseName:"",fields:[{name:"version",typeName:"string",type:null},{name:"types",typeName:"type_def[]",type:null},{name:"structs",typeName:"struct_def[]",type:null},{name:"actions",typeName:"action_def[]",type:null},{name:"tables",typeName:"table_def[]",type:null},{name:"ricardian_clauses",typeName:"clause_pair[]",type:null},{name:"error_messages",typeName:"error_message[]",type:null},{name:"abi_extensions",typeName:"extensions_entry[]",type:null},{name:"variants",typeName:"variant_def[]$",type:null},{name:"action_results",typeName:"action_result[]$",type:null},{name:"kv_tables",typeName:"kv_table$",type:null}],serialize:h,deserialize:p})),e};t.createTransactionExtensionTypes=function(){var e=t.createInitialTypes();return e.set("resource_payer",x({name:"resource_payer",baseName:"",fields:[{name:"payer",typeName:"name",type:null},{name:"max_net_bytes",typeName:"uint64",type:null},{name:"max_cpu_us",typeName:"uint64",type:null},{name:"max_memory_bytes",typeName:"uint64",type:null}],serialize:h,deserialize:p})),e};t.createTransactionTypes=function(){var e=t.createInitialTypes();return e.set("permission_level",x({name:"permission_level",baseName:"",fields:[{name:"actor",typeName:"name",type:null},{name:"permission",typeName:"name",type:null}],serialize:h,deserialize:p})),e.set("action",x({name:"action",baseName:"",fields:[{name:"account",typeName:"name",type:null},{name:"name",typeName:"name",type:null},{name:"authorization",typeName:"permission_level[]",type:null},{name:"data",typeName:"bytes",type:null}],serialize:h,deserialize:p})),e.set("extension",x({name:"extension",baseName:"",fields:[{name:"type",typeName:"uint16",type:null},{name:"data",typeName:"bytes",type:null}],serialize:T,deserialize:S})),e.set("transaction_header",x({name:"transaction_header",baseName:"",fields:[{name:"expiration",typeName:"time_point_sec",type:null},{name:"ref_block_num",typeName:"uint16",type:null},{name:"ref_block_prefix",typeName:"uint32",type:null},{name:"max_net_usage_words",typeName:"varuint32",type:null},{name:"max_cpu_usage_ms",typeName:"uint8",type:null},{name:"delay_sec",typeName:"varuint32",type:null}],serialize:h,deserialize:p})),e.set("transaction",x({name:"transaction",baseName:"transaction_header",fields:[{name:"context_free_actions",typeName:"action[]",type:null},{name:"actions",typeName:"action[]",type:null},{name:"transaction_extensions",typeName:"extension",type:null}],serialize:h,deserialize:p})),e};t.getType=function(e,r){var n=e.get(r);if(n&&n.aliasOfName)return t.getType(e,n.aliasOfName);if(n)return n;if(r.endsWith("[]"))return x({name:r,arrayOf:t.getType(e,r.substr(0,r.length-2)),serialize:g,deserialize:m});if(r.endsWith("?"))return x({name:r,optionalOf:t.getType(e,r.substr(0,r.length-1)),serialize:v,deserialize:w});if(r.endsWith("$"))return x({name:r,extensionOf:t.getType(e,r.substr(0,r.length-1)),serialize:A,deserialize:E});throw new Error("Unknown type: "+r)};t.getTypesFromAbi=function(e,r){var n,o,a,s,c,l,u,d,g,m,v=new Map(e);if(r&&r.types)try{for(var w=f(r.types),A=w.next();!A.done;A=w.next()){var E=A.value,_=E.new_type_name,k=E.type;v.set(_,x({name:_,aliasOfName:k}))}}catch(e){n={error:e}}finally{try{A&&!A.done&&(o=w.return)&&o.call(w)}finally{if(n)throw n.error}}if(r&&r.structs)try{for(var T=f(r.structs),S=T.next();!S.done;S=T.next()){var P=S.value,I=P.name,M=P.base,C=P.fields;v.set(I,x({name:I,baseName:M,fields:C.map((function(e){return{name:e.name,typeName:e.type,type:null}})),serialize:h,deserialize:p}))}}catch(e){a={error:e}}finally{try{S&&!S.done&&(s=T.return)&&s.call(T)}finally{if(a)throw a.error}}if(r&&r.variants)try{for(var O=f(r.variants),B=O.next();!B.done;B=O.next()){var R=B.value,D=R.name,N=R.types;v.set(D,x({name:D,fields:N.map((function(e){return{name:e,typeName:e,type:null}})),serialize:y,deserialize:b}))}}catch(e){c={error:e}}finally{try{B&&!B.done&&(l=O.return)&&l.call(O)}finally{if(c)throw c.error}}try{for(var U=f(v),L=U.next();!L.done;L=U.next()){var F=i(L.value,2);F[0];(k=F[1]).baseName&&(k.base=t.getType(v,k.baseName));try{for(var j=(g=void 0,f(k.fields)),z=j.next();!z.done;z=j.next()){var V=z.value;V.type=t.getType(v,V.typeName)}}catch(e){g={error:e}}finally{try{z&&!z.done&&(m=j.return)&&m.call(j)}finally{if(g)throw g.error}}}}catch(e){u={error:e}}finally{try{L&&!L.done&&(d=U.return)&&d.call(U)}finally{if(u)throw u.error}}return v};t.transactionHeader=function(e,r){var n,i=e.header?e.header.timestamp:e.timestamp,o=parseInt((n=e.id.substr(16,8)).substr(6,2)+n.substr(4,2)+n.substr(2,2)+n.substr(0,2),16);return{expiration:t.timePointSecToDate(t.dateToTimePointSec(i)+r),ref_block_num:65535&e.block_num,ref_block_prefix:o}};t.serializeActionData=function(e,r,n,i,o,f){var a=e.actions.get(n);if(!a)throw new Error("Unknown action "+n+" in contract "+r);var s=new c({textEncoder:o,textDecoder:f});return a.serialize(s,i),t.arrayToHex(s.asUint8Array())};t.serializeAction=function(e,r,n,i,o,f,a){return{account:r,name:n,authorization:i,data:t.serializeActionData(e,r,n,o,f,a)}};t.deserializeActionData=function(e,r,n,i,o,f){var a=e.actions.get(n);if("string"==typeof i&&(i=t.hexToUint8Array(i)),!a)throw new Error("Unknown action "+n+" in contract "+r);var s=new c({textDecoder:f,textEncoder:o});return s.pushArray(i),a.deserialize(s)};t.deserializeAction=function(e,r,n,i,o,f,a){return{account:r,name:n,authorization:i,data:t.deserializeActionData(e,r,n,o,f,a)}};t.serializeAnyvar=function(e,t){var r,n,o,f,a,s,c,l,u;null===t?(l=(r=i([C.null_t,t],2))[0],u=r[1]):"string"==typeof t?(l=(n=i([C.string,t],2))[0],u=n[1]):"number"==typeof t?(l=(o=i([C.int32,t],2))[0],u=o[1]):t instanceof Uint8Array?(l=(f=i([C.bytes,t],2))[0],u=f[1]):Array.isArray(t)?(l=(a=i([C.any_array,t],2))[0],u=a[1]):2===Object.keys(t).length&&t.hasOwnProperty("type")&&t.hasOwnProperty("value")?(l=(s=i([C[t.type],t.value],2))[0],u=s[1]):(l=(c=i([C.any_object,t],2))[0],u=c[1]),e.pushVaruint32(l.index),l.type.serialize(e,u)};t.deserializeAnyvar=function(e,t){var r=e.getVaruint32();if(r>=O.length)throw new Error("Tried to deserialize unknown anyvar type");var n=O[r],i=n.type.deserialize(e,t);return t&&t.options.useShortForm||n.useShortForm?i:{type:n.type.name,value:i}};t.deserializeAnyvarShort=function(e){return t.deserializeAnyvar(e,new s({useShortForm:!0}))};t.serializeAnyObject=function(e,r){var n,o,a=Object.entries(r);e.pushVaruint32(a.length);try{for(var s=f(a),c=s.next();!c.done;c=s.next()){var l=i(c.value,2),u=l[0],d=l[1];e.pushString(u),t.serializeAnyvar(e,d)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}};t.deserializeAnyObject=function(e,r){for(var n=e.getVaruint32(),i={},o=0;o{"use strict";t.pc=void 0;var n=r(58982);r(93220);var i=r(77556);Object.defineProperty(t,"pc",{enumerable:!0,get:function(){return i.JsonRpc}}),r(722),r(20787);var o=r(22485);r(68888)},12057:e=>{"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var f,a=e[Symbol.iterator]();!(n=(f=a.next()).done)&&(r.push(f.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var r=0;r>>32-t}},{key:"hash",value:function(t){for(var r=e.pad(t),n=[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],i=[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],o=[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],f=[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],a=r.byteLength/64,s=new Array(a).fill(void 0).map((function(e,t){return function(e){return new DataView(r,64*t,64).getUint32(4*e,!0)}})),c=[1732584193,4023233417,2562383102,271733878,3285377520],l=0;l=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,f=0,a=Math.min(e.length,r),s=t;s=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&f0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.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=t;n-=2)i=s(e,t,n)<=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this._strip()},o.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 o=e.length-r,f=o%n,a=Math.min(o,o-f)+r,s=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(e){o.prototype.inspect=u}else o.prototype.inspect=u;function u(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f>>24-i&16777215)||f!==this.length-1?d[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,f--)}for(0!==o&&(r=o.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=h[e],l=p[e];r="";var u=this.clone();for(u.negative=0;!u.isZero();){var y=u.modrn(l).toString(e);r=(u=u.idivn(l)).isZero()?y+r:d[c-y.length]+y+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")},o.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},o.prototype.toJSON=function(){return this.toString(16,2)},f&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function y(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],o=0|t.words[0],f=i*o,a=67108863&f,s=f/67108864|0;r.words[0]=a;for(var c=1;c>>26,u=67108863&s,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(f=(i=0|e.words[p])*(o=0|t.words[h])+u)/67108864|0,u=67108863&f}r.words[c]=0|u,s=0|l}return 0!==s?r.words[c]=0|s:r.length--,r._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,i),f},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r=0&&(e[r--]=f>>8&255),r>=0&&(e[r--]=f>>16&255),6===o?(r>=0&&(e[r--]=f>>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.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},o.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},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.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;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.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<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 o=0,f=0;f>26,this.words[f]=67108863&t;for(;0!==o&&f>26,this.words[f]=67108863&t;if(0===o&&f>>13,h=0|f[1],p=8191&h,y=h>>>13,b=0|f[2],g=8191&b,m=b>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],_=8191&E,k=E>>>13,T=0|f[5],S=8191&T,x=T>>>13,P=0|f[6],I=8191&P,M=P>>>13,C=0|f[7],O=8191&C,B=C>>>13,R=0|f[8],D=8191&R,N=R>>>13,U=0|f[9],L=8191&U,F=U>>>13,j=0|a[0],z=8191&j,V=j>>>13,H=0|a[1],K=8191&H,G=H>>>13,q=0|a[2],W=8191&q,Q=q>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,fe=ie>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,de=le>>>13,he=0|a[9],pe=8191&he,ye=he>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(u,z))|0)+((8191&(i=(i=Math.imul(u,V))+Math.imul(d,z)|0))<<13)|0;c=((o=Math.imul(d,V))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,V))+Math.imul(y,z)|0,o=Math.imul(y,V);var ge=(c+(n=n+Math.imul(u,K)|0)|0)+((8191&(i=(i=i+Math.imul(u,G)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,V))+Math.imul(m,z)|0,o=Math.imul(m,V),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,G)|0;var me=(c+(n=n+Math.imul(u,W)|0)|0)+((8191&(i=(i=i+Math.imul(u,Q)|0)+Math.imul(d,W)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,V))+Math.imul(A,z)|0,o=Math.imul(A,V),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Q)|0;var ve=(c+(n=n+Math.imul(u,Y)|0)|0)+((8191&(i=(i=i+Math.imul(u,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,V))+Math.imul(k,z)|0,o=Math.imul(k,V),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0;var we=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(i=(i=i+Math.imul(u,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,z),i=(i=Math.imul(S,V))+Math.imul(x,z)|0,o=Math.imul(x,V),n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,ee)|0;var Ae=(c+(n=n+Math.imul(u,re)|0)|0)+((8191&(i=(i=i+Math.imul(u,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,V))+Math.imul(M,z)|0,o=Math.imul(M,V),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(_,W)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Q)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(g,$)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(y,re)|0,o=o+Math.imul(y,ne)|0;var Ee=(c+(n=n+Math.imul(u,oe)|0)|0)+((8191&(i=(i=i+Math.imul(u,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,V))+Math.imul(B,z)|0,o=Math.imul(B,V),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,G)|0,n=n+Math.imul(S,W)|0,i=(i=i+Math.imul(S,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,fe)|0;var _e=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(i=(i=i+Math.imul(u,ce)|0)+Math.imul(d,se)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,V))+Math.imul(N,z)|0,o=Math.imul(N,V),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,Q)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,fe)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ce)|0;var ke=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(i=(i=i+Math.imul(u,de)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,V))+Math.imul(F,z)|0,o=Math.imul(F,V),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ce)|0)+Math.imul(m,se)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,de)|0;var Te=(c+(n=n+Math.imul(u,pe)|0)|0)+((8191&(i=(i=i+Math.imul(u,ye)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ye)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,G))+Math.imul(F,K)|0,o=Math.imul(F,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,Q)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,de)|0;var Se=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ye)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,ye)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(F,W)|0,o=Math.imul(F,Q),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(k,se)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,ye)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ye)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,Z))+Math.imul(F,Y)|0,o=Math.imul(F,Z),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,se)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,se)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,de)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ye)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ye)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,fe)|0,n=n+Math.imul(I,se)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(M,se)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,ue)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,de)|0;var Ie=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ye)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ye)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,fe)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,fe)|0,n=n+Math.imul(O,se)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(B,se)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(M,ue)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,pe)|0)|0)+((8191&(i=(i=i+Math.imul(S,ye)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,ye)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,fe))+Math.imul(F,oe)|0,o=Math.imul(F,fe),n=n+Math.imul(D,se)|0,i=(i=i+Math.imul(D,ce)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,de)|0;var Ce=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ye)|0)+Math.imul(M,pe)|0))<<13)|0;c=((o=o+Math.imul(M,ye)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,de)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,de)|0;var Oe=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ye)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ye)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,de))+Math.imul(F,ue)|0,o=Math.imul(F,de);var Be=(c+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,ye)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,ye)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ye))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ye))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,s[0]=be,s[1]=ge,s[2]=me,s[3]=ve,s[4]=we,s[5]=Ae,s[6]=Ee,s[7]=_e,s[8]=ke,s[9]=Te,s[10]=Se,s[11]=xe,s[12]=Pe,s[13]=Ie,s[14]=Me,s[15]=Ce,s[16]=Oe,s[17]=Be,s[18]=Re,0!==c&&(s[19]=c,r.length++),r};function g(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,f&=67108863}r.words[o]=a,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return g(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=y),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?y(this,e,t):r<1024?g(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f>>=1)i++;return 1<>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f>=26,r+=o/67108864|0,r+=f>>>26,this.words[i]=67108863&f}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<f)for(this.length-=f,c=0;c=0&&(0!==l||c>=i);c--){var u=0|this.words[c];this.words[c]=l<<26-o|u>>>o,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=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<=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},o.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>26)-(s/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!==(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var a,s=n.length-i.length;if("mod"!==t){(a=new o(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var d=67108864*(0|n.words[i.length+u])+(0|n.words[i.length+u-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,u);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(f=a.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:a.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,f,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.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),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.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 o(1),f=new o(0),a=new o(0),s=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),u=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()||f.isOdd())&&(i.iadd(l),f.isub(u)),i.iushrn(1),f.iushrn(1);for(var p=0,y=1;0==(r.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),f.isub(s)):(r.isub(t),a.isub(i),s.isub(f))}return{a,b:s,gcd:r.iushln(c)}},o.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,f=new o(1),a=new o(0),s=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;)f.isOdd()&&f.iadd(s),f.iushrn(1);for(var u=0,d=1;0==(r.words[0]&d)&&u<26;++u,d<<=1);if(u>0)for(r.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(a)):(r.isub(t),a.isub(f))}return(i=0===t.cmpn(1)?f:a).cmpn(0)<0&&i.iadd(e),i},o.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 o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,a&=67108863,this.words[f]=a}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.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:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.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)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._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 x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.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=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(E,A),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.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>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new _;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.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")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.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)},S.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},S.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)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.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 o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=f;0!==h.cmp(a);){for(var y=h,b=0;0!==y.cmp(a);b++)y=y.redSqr();n(b=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==u||0!==f?(f<<=1,f|=u,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[f]),a=0,f=0)):a=0}s=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.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),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)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(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),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6154:(e,t,r)=>{"use strict";const{Deflate:n,deflate:i,deflateRaw:o,gzip:f}=r(13247),{Inflate:a,inflate:s,inflateRaw:c,ungzip:l}=r(40021),u=r(66165);e.exports.Deflate=n,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=f,e.exports.Inflate=a,e.exports.inflate=s,e.exports.inflateRaw=c,e.exports.ungzip=l,e.exports.constants=u},13247:(e,t,r)=>{"use strict";const n=r(50211),i=r(95298),o=r(69112),f=r(32044),a=r(78781),s=Object.prototype.toString,{Z_NO_FLUSH:c,Z_SYNC_FLUSH:l,Z_FULL_FLUSH:u,Z_FINISH:d,Z_OK:h,Z_STREAM_END:p,Z_DEFAULT_COMPRESSION:y,Z_DEFAULT_STRATEGY:b,Z_DEFLATED:g}=r(66165);function m(e){this.options=i.assign({level:y,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:b},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(f[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===s.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=n.deflateSetDictionary(this.strm,e),r!==h)throw new Error(f[r]);this._dict_set=!0}}function v(e,t){const r=new m(t);if(r.push(e,!0),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize;let f,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?d:c,"string"==typeof e?r.input=o.string2buf(e):"[object ArrayBuffer]"===s.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(a===l||a===u)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(f=n.deflate(r,a),f===p)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),f=n.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===h;if(0!==r.avail_out){if(a>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===h&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=m,e.exports.deflate=v,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,v(e,t)},e.exports.constants=r(66165)},40021:(e,t,r)=>{"use strict";const n=r(49648),i=r(95298),o=r(69112),f=r(32044),a=r(78781),s=r(63507),c=Object.prototype.toString,{Z_NO_FLUSH:l,Z_FINISH:u,Z_OK:d,Z_STREAM_END:h,Z_NEED_DICT:p,Z_STREAM_ERROR:y,Z_DATA_ERROR:b,Z_MEM_ERROR:g}=r(66165);function m(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==d)throw new Error(f[r]);if(this.header=new s,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==d)))throw new Error(f[r])}function v(e,t){const r=new m(t);if(r.push(e),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize,f=this.options.dictionary;let a,s,m;if(this.ended)return!1;for(s=t===~~t?t:!0===t?u:l,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),a=n.inflate(r,s),a===p&&f&&(a=n.inflateSetDictionary(r,f),a===d?a=n.inflate(r,s):a===b&&(a=p));r.avail_in>0&&a===h&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),a=n.inflate(r,s);switch(a){case y:case b:case p:case g:return this.onEnd(a),this.ended=!0,!1}if(m=r.avail_out,r.next_out&&(0===r.avail_out||a===h))if("string"===this.options.to){let e=o.utf8border(r.output,r.next_out),t=r.next_out-e,n=o.buf2string(r.output,e);r.next_out=t,r.avail_out=i-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==d||0!==m){if(a===h)return a=n.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=m,e.exports.inflate=v,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.ungzip=v,e.exports.constants=r(66165)},95298:e=>{"use strict";const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r{"use strict";let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{let t,r,n,i,o,f=e.length,a=0;for(i=0;i>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{let i,o;const f=n||e.length,a=new Array(2*f);for(o=0,i=0;i4)a[o++]=65533,i+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&i1?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},73124:e=>{"use strict";e.exports=(e,t,r,n)=>{let i=65535&e|0,o=e>>>16&65535|0,f=0;for(;0!==r;){f=r>2e3?2e3:r,r-=f;do{i=i+t[n++]|0,o=o+i|0}while(--f);i%=65521,o%=65521}return i|o<<16|0}},66165:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},35632:e=>{"use strict";const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,i)=>{const o=t,f=i+n;e^=-1;for(let t=i;t>>8^o[255&(e^r[t])];return-1^e}},50211:(e,t,r)=>{"use strict";const{_tr_init:n,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:f,_tr_align:a}=r(79027),s=r(73124),c=r(35632),l=r(32044),{Z_NO_FLUSH:u,Z_PARTIAL_FLUSH:d,Z_FULL_FLUSH:h,Z_FINISH:p,Z_BLOCK:y,Z_OK:b,Z_STREAM_END:g,Z_STREAM_ERROR:m,Z_DATA_ERROR:v,Z_BUF_ERROR:w,Z_DEFAULT_COMPRESSION:A,Z_FILTERED:E,Z_HUFFMAN_ONLY:_,Z_RLE:k,Z_FIXED:T,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:x,Z_DEFLATED:P}=r(66165),I=258,M=262,C=103,O=113,B=666,R=(e,t)=>(e.msg=l[t],t),D=e=>(e<<1)-(e>4?9:0),N=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let U=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},F=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,L(e.strm)},j=(e,t)=>{e.pending_buf[e.pending++]=t},z=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},V=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=s(e.adler,t,i,r):2===e.state.wrap&&(e.adler=c(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},H=(e,t)=>{let r,n,i=e.max_chain_length,o=e.strstart,f=e.prev_length,a=e.nice_match;const s=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,c=e.window,l=e.w_mask,u=e.prev,d=e.strstart+I;let h=c[o+f-1],p=c[o+f];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,c[r+f]===p&&c[r+f-1]===h&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&of){if(e.match_start=t,f=n,n>=a)break;h=c[o+f-1],p=c[o+f]}}}while((t=u[t&l])>s&&0!=--i);return f<=e.lookahead?f:e.lookahead},K=e=>{const t=e.w_size;let r,n,i,o,f;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-M)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do{i=e.head[--r],e.head[r]=i>=t?i-t:0}while(--n);n=t,r=n;do{i=e.prev[--r],e.prev[r]=i>=t?i-t:0}while(--n);o+=t}if(0===e.strm.avail_in)break;if(n=V(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=n,e.lookahead+e.insert>=3)for(f=e.strstart-e.insert,e.ins_h=e.window[f],e.ins_h=U(e,e.ins_h,e.window[f+1]);e.insert&&(e.ins_h=U(e,e.ins_h,e.window[f+3-1]),e.prev[f&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=f,f++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-M&&(e.match_length=H(e,r)),e.match_length>=3)if(n=f(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=U(e,e.ins_h,e.window[e.strstart+1]);else n=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2},q=(e,t)=>{let r,n,i;for(;;){if(e.lookahead=3&&(e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=f(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=U(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(F(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=f(e,0,e.window[e.strstart-1]),n&&F(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=f(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2};function W(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const Q=[new W(0,0,0,0,((e,t)=>{let r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(K(e),0===e.lookahead&&t===u)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,F(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-M&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(F(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(F(e,!1),e.strm.avail_out),1)})),new W(4,4,8,4,G),new W(4,5,16,8,G),new W(4,6,32,32,G),new W(4,4,16,16,q),new W(8,16,32,32,q),new W(8,16,128,128,q),new W(8,32,128,256,q),new W(32,128,258,1024,q),new W(32,258,258,4096,q)];function J(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=P,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),N(this.dyn_ltree),N(this.dyn_dtree),N(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),N(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),N(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Y=e=>{if(!e||!e.state)return R(e,m);e.total_in=e.total_out=0,e.data_type=x;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:O,e.adler=2===t.wrap?0:1,t.last_flush=u,n(t),b},Z=e=>{const t=Y(e);var r;return t===b&&((r=e.state).window_size=2*r.w_size,N(r.head),r.max_lazy_match=Q[r.level].max_lazy,r.good_match=Q[r.level].good_length,r.nice_match=Q[r.level].nice_length,r.max_chain_length=Q[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},X=(e,t,r,n,i,o)=>{if(!e)return m;let f=1;if(t===A&&(t=6),n<0?(f=0,n=-n):n>15&&(f=2,n-=16),i<1||i>9||r!==P||n<8||n>15||t<0||t>9||o<0||o>T)return R(e,m);8===n&&(n=9);const a=new J;return e.state=a,a.strm=e,a.wrap=f,a.gzhead=null,a.w_bits=n,a.w_size=1<X(e,t,P,15,8,S),e.exports.deflateInit2=X,e.exports.deflateReset=Z,e.exports.deflateResetKeep=Y,e.exports.deflateSetHeader=(e,t)=>e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,b):m,e.exports.deflate=(e,t)=>{let r,n;if(!e||!e.state||t>y||t<0)return e?R(e,m):m;const o=e.state;if(!e.output||!e.input&&0!==e.avail_in||o.status===B&&t!==p)return R(e,0===e.avail_out?w:m);o.strm=e;const s=o.last_flush;if(o.last_flush=t,42===o.status)if(2===o.wrap)e.adler=0,j(o,31),j(o,139),j(o,8),o.gzhead?(j(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),j(o,255&o.gzhead.time),j(o,o.gzhead.time>>8&255),j(o,o.gzhead.time>>16&255),j(o,o.gzhead.time>>24&255),j(o,9===o.level?2:o.strategy>=_||o.level<2?4:0),j(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(j(o,255&o.gzhead.extra.length),j(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=c(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=69):(j(o,0),j(o,0),j(o,0),j(o,0),j(o,0),j(o,9===o.level?2:o.strategy>=_||o.level<2?4:0),j(o,3),o.status=O);else{let t=P+(o.w_bits-8<<4)<<8,r=-1;r=o.strategy>=_||o.level<2?0:o.level<6?1:6===o.level?2:3,t|=r<<6,0!==o.strstart&&(t|=32),t+=31-t%31,o.status=O,z(o,t),0!==o.strstart&&(z(o,e.adler>>>16),z(o,65535&e.adler)),e.adler=1}if(69===o.status)if(o.gzhead.extra){for(r=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),L(e),r=o.pending,o.pending!==o.pending_buf_size));)j(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=73)}else o.status=73;if(73===o.status)if(o.gzhead.name){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),L(e),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindexr&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.gzindex=0,o.status=91)}else o.status=91;if(91===o.status)if(o.gzhead.comment){r=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>r&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),L(e),r=o.pending,o.pending===o.pending_buf_size)){n=1;break}n=o.gzindexr&&(e.adler=c(e.adler,o.pending_buf,o.pending-r,r)),0===n&&(o.status=C)}else o.status=C;if(o.status===C&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&L(e),o.pending+2<=o.pending_buf_size&&(j(o,255&e.adler),j(o,e.adler>>8&255),e.adler=0,o.status=O)):o.status=O),0!==o.pending){if(L(e),0===e.avail_out)return o.last_flush=-1,b}else if(0===e.avail_in&&D(t)<=D(s)&&t!==p)return R(e,w);if(o.status===B&&0!==e.avail_in)return R(e,w);if(0!==e.avail_in||0!==o.lookahead||t!==u&&o.status!==B){let r=o.strategy===_?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(K(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2})(o,t):o.strategy===k?((e,t)=>{let r,n,i,o;const a=e.window;for(;;){if(e.lookahead<=I){if(K(e),e.lookahead<=I&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+I;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=f(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(F(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(F(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?1:2})(o,t):Q[o.level].func(o,t);if(3!==r&&4!==r||(o.status=B),1===r||3===r)return 0===e.avail_out&&(o.last_flush=-1),b;if(2===r&&(t===d?a(o):t!==y&&(i(o,0,0,!1),t===h&&(N(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),L(e),0===e.avail_out))return o.last_flush=-1,b}return t!==p?b:o.wrap<=0?g:(2===o.wrap?(j(o,255&e.adler),j(o,e.adler>>8&255),j(o,e.adler>>16&255),j(o,e.adler>>24&255),j(o,255&e.total_in),j(o,e.total_in>>8&255),j(o,e.total_in>>16&255),j(o,e.total_in>>24&255)):(z(o,e.adler>>>16),z(o,65535&e.adler)),L(e),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?b:g)},e.exports.deflateEnd=e=>{if(!e||!e.state)return m;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==C&&t!==O&&t!==B?R(e,m):(e.state=null,t===O?R(e,v):b)},e.exports.deflateSetDictionary=(e,t)=>{let r=t.length;if(!e||!e.state)return m;const n=e.state,i=n.wrap;if(2===i||1===i&&42!==n.status||n.lookahead)return m;if(1===i&&(e.adler=s(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(N(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const o=e.avail_in,f=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,K(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=U(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,K(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=f,e.input=a,e.avail_in=o,n.wrap=i,b},e.exports.deflateInfo="pako deflate (from Nodeca project)"},63507:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},68559:e=>{"use strict";e.exports=function(e,t){let r,n,i,o,f,a,s,c,l,u,d,h,p,y,b,g,m,v,w,A,E,_,k,T;const S=e.state;r=e.next_in,k=e.input,n=r+(e.avail_in-5),i=e.next_out,T=e.output,o=i-(t-e.avail_out),f=i+(e.avail_out-257),a=S.dmax,s=S.wsize,c=S.whave,l=S.wnext,u=S.window,d=S.hold,h=S.bits,p=S.lencode,y=S.distcode,b=(1<>>24,d>>>=v,h-=v,v=m>>>16&255,0===v)T[i++]=65535&m;else{if(!(16&v)){if(0==(64&v)){m=p[(65535&m)+(d&(1<>>=v,h-=v),h<15&&(d+=k[r++]<>>24,d>>>=v,h-=v,v=m>>>16&255,!(16&v)){if(0==(64&v)){m=y[(65535&m)+(d&(1<a){e.msg="invalid distance too far back",S.mode=30;break e}if(d>>>=v,h-=v,v=i-o,A>v){if(v=A-v,v>c&&S.sane){e.msg="invalid distance too far back",S.mode=30;break e}if(E=0,_=u,0===l){if(E+=s-v,v2;)T[i++]=_[E++],T[i++]=_[E++],T[i++]=_[E++],w-=3;w&&(T[i++]=_[E++],w>1&&(T[i++]=_[E++]))}else{E=i-A;do{T[i++]=T[E++],T[i++]=T[E++],T[i++]=T[E++],w-=3}while(w>2);w&&(T[i++]=T[E++],w>1&&(T[i++]=T[E++]))}break}}break}}while(r>3,r-=w,h-=w<<3,d&=(1<{"use strict";const n=r(73124),i=r(35632),o=r(68559),f=r(5473),{Z_FINISH:a,Z_BLOCK:s,Z_TREES:c,Z_OK:l,Z_STREAM_END:u,Z_NEED_DICT:d,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:y,Z_BUF_ERROR:b,Z_DEFLATED:g}=r(66165),m=12,v=30,w=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const E=e=>{if(!e||!e.state)return h;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,l},_=e=>{if(!e||!e.state)return h;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,E(e)},k=(e,t)=>{let r;if(!e||!e.state)return h;const n=e.state;return t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?h:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,_(e))},T=(e,t)=>{if(!e)return h;const r=new A;e.state=r,r.window=null;const n=k(e,t);return n!==l&&(e.state=null),n};let S,x,P=!0;const I=e=>{if(P){S=new Int32Array(512),x=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(f(1,e.lens,0,288,S,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;f(2,e.lens,0,32,x,0,e.work,{bits:5}),P=!1}e.lencode=S,e.lenbits=9,e.distcode=x,e.distbits=5},M=(e,t,r,n)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaveT(e,15),e.exports.inflateInit2=T,e.exports.inflate=(e,t)=>{let r,A,E,_,k,T,S,x,P,C,O,B,R,D,N,U,L,F,j,z,V,H,K=0;const G=new Uint8Array(4);let q,W;const Q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return h;r=e.state,r.mode===m&&(r.mode=13),k=e.next_out,E=e.output,S=e.avail_out,_=e.next_in,A=e.input,T=e.avail_in,x=r.hold,P=r.bits,C=T,O=S,H=l;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;P<16;){if(0===T)break e;T--,x+=A[_++]<>>8&255,r.check=i(r.check,G,2,0),x=0,P=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&x)<<8)+(x>>8))%31){e.msg="incorrect header check",r.mode=v;break}if((15&x)!==g){e.msg="unknown compression method",r.mode=v;break}if(x>>>=4,P-=4,V=8+(15&x),0===r.wbits)r.wbits=V;else if(V>r.wbits){e.msg="invalid window size",r.mode=v;break}r.dmax=1<>8&1),512&r.flags&&(G[0]=255&x,G[1]=x>>>8&255,r.check=i(r.check,G,2,0)),x=0,P=0,r.mode=3;case 3:for(;P<32;){if(0===T)break e;T--,x+=A[_++]<>>8&255,G[2]=x>>>16&255,G[3]=x>>>24&255,r.check=i(r.check,G,4,0)),x=0,P=0,r.mode=4;case 4:for(;P<16;){if(0===T)break e;T--,x+=A[_++]<>8),512&r.flags&&(G[0]=255&x,G[1]=x>>>8&255,r.check=i(r.check,G,2,0)),x=0,P=0,r.mode=5;case 5:if(1024&r.flags){for(;P<16;){if(0===T)break e;T--,x+=A[_++]<>>8&255,r.check=i(r.check,G,2,0)),x=0,P=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(B=r.length,B>T&&(B=T),B&&(r.head&&(V=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(A.subarray(_,_+B),V)),512&r.flags&&(r.check=i(r.check,A,B,_)),T-=B,_+=B,r.length-=B),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===T)break e;B=0;do{V=A[_+B++],r.head&&V&&r.length<65536&&(r.head.name+=String.fromCharCode(V))}while(V&&B>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=m;break;case 10:for(;P<32;){if(0===T)break e;T--,x+=A[_++]<>>=7&P,P-=7&P,r.mode=27;break}for(;P<3;){if(0===T)break e;T--,x+=A[_++]<>>=1,P-=1,3&x){case 0:r.mode=14;break;case 1:if(I(r),r.mode=20,t===c){x>>>=2,P-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=v}x>>>=2,P-=2;break;case 14:for(x>>>=7&P,P-=7&P;P<32;){if(0===T)break e;T--,x+=A[_++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=v;break}if(r.length=65535&x,x=0,P=0,r.mode=15,t===c)break e;case 15:r.mode=16;case 16:if(B=r.length,B){if(B>T&&(B=T),B>S&&(B=S),0===B)break e;E.set(A.subarray(_,_+B),k),T-=B,_+=B,S-=B,k+=B,r.length-=B;break}r.mode=m;break;case 17:for(;P<14;){if(0===T)break e;T--,x+=A[_++]<>>=5,P-=5,r.ndist=1+(31&x),x>>>=5,P-=5,r.ncode=4+(15&x),x>>>=4,P-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=v;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,P-=3}for(;r.have<19;)r.lens[Q[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,q={bits:r.lenbits},H=f(0,r.lens,0,19,r.lencode,0,r.work,q),r.lenbits=q.bits,H){e.msg="invalid code lengths set",r.mode=v;break}r.have=0,r.mode=19;case 19:for(;r.have>>24,U=K>>>16&255,L=65535&K,!(N<=P);){if(0===T)break e;T--,x+=A[_++]<>>=N,P-=N,r.lens[r.have++]=L;else{if(16===L){for(W=N+2;P>>=N,P-=N,0===r.have){e.msg="invalid bit length repeat",r.mode=v;break}V=r.lens[r.have-1],B=3+(3&x),x>>>=2,P-=2}else if(17===L){for(W=N+3;P>>=N,P-=N,V=0,B=3+(7&x),x>>>=3,P-=3}else{for(W=N+7;P>>=N,P-=N,V=0,B=11+(127&x),x>>>=7,P-=7}if(r.have+B>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=v;break}for(;B--;)r.lens[r.have++]=V}}if(r.mode===v)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=v;break}if(r.lenbits=9,q={bits:r.lenbits},H=f(1,r.lens,0,r.nlen,r.lencode,0,r.work,q),r.lenbits=q.bits,H){e.msg="invalid literal/lengths set",r.mode=v;break}if(r.distbits=6,r.distcode=r.distdyn,q={bits:r.distbits},H=f(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,q),r.distbits=q.bits,H){e.msg="invalid distances set",r.mode=v;break}if(r.mode=20,t===c)break e;case 20:r.mode=21;case 21:if(T>=6&&S>=258){e.next_out=k,e.avail_out=S,e.next_in=_,e.avail_in=T,r.hold=x,r.bits=P,o(e,O),k=e.next_out,E=e.output,S=e.avail_out,_=e.next_in,A=e.input,T=e.avail_in,x=r.hold,P=r.bits,r.mode===m&&(r.back=-1);break}for(r.back=0;K=r.lencode[x&(1<>>24,U=K>>>16&255,L=65535&K,!(N<=P);){if(0===T)break e;T--,x+=A[_++]<>F)],N=K>>>24,U=K>>>16&255,L=65535&K,!(F+N<=P);){if(0===T)break e;T--,x+=A[_++]<>>=F,P-=F,r.back+=F}if(x>>>=N,P-=N,r.back+=N,r.length=L,0===U){r.mode=26;break}if(32&U){r.back=-1,r.mode=m;break}if(64&U){e.msg="invalid literal/length code",r.mode=v;break}r.extra=15&U,r.mode=22;case 22:if(r.extra){for(W=r.extra;P>>=r.extra,P-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;K=r.distcode[x&(1<>>24,U=K>>>16&255,L=65535&K,!(N<=P);){if(0===T)break e;T--,x+=A[_++]<>F)],N=K>>>24,U=K>>>16&255,L=65535&K,!(F+N<=P);){if(0===T)break e;T--,x+=A[_++]<>>=F,P-=F,r.back+=F}if(x>>>=N,P-=N,r.back+=N,64&U){e.msg="invalid distance code",r.mode=v;break}r.offset=L,r.extra=15&U,r.mode=24;case 24:if(r.extra){for(W=r.extra;P>>=r.extra,P-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=v;break}r.mode=25;case 25:if(0===S)break e;if(B=O-S,r.offset>B){if(B=r.offset-B,B>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=v;break}B>r.wnext?(B-=r.wnext,R=r.wsize-B):R=r.wnext-B,B>r.length&&(B=r.length),D=r.window}else D=E,R=k-r.offset,B=r.length;B>S&&(B=S),S-=B,r.length-=B;do{E[k++]=D[R++]}while(--B);0===r.length&&(r.mode=21);break;case 26:if(0===S)break e;E[k++]=r.length,S--,r.mode=21;break;case 27:if(r.wrap){for(;P<32;){if(0===T)break e;T--,x|=A[_++]<{if(!e||!e.state)return h;let t=e.state;return t.window&&(t.window=null),e.state=null,l},e.exports.inflateGetHeader=(e,t)=>{if(!e||!e.state)return h;const r=e.state;return 0==(2&r.wrap)?h:(r.head=t,t.done=!1,l)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let i,o,f;return e&&e.state?(i=e.state,0!==i.wrap&&11!==i.mode?h:11===i.mode&&(o=1,o=n(o,t,r,0),o!==i.check)?p:(f=M(e,t,r,r),f?(i.mode=31,y):(i.havedict=1,l))):h},e.exports.inflateInfo="pako inflate (from Nodeca project)"},5473:e=>{"use strict";const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),i=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),o=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,f,a,s,c,l,u,d)=>{const h=d.bits;let p,y,b,g,m,v,w=0,A=0,E=0,_=0,k=0,T=0,S=0,x=0,P=0,I=0,M=null,C=0;const O=new Uint16Array(16),B=new Uint16Array(16);let R,D,N,U=null,L=0;for(w=0;w<=t;w++)O[w]=0;for(A=0;A=1&&0===O[_];_--);if(k>_&&(k=_),0===_)return c[l++]=20971520,c[l++]=20971520,d.bits=1,0;for(E=1;E<_&&0===O[E];E++);for(k0&&(0===e||1!==_))return-1;for(B[1]=0,w=1;w852||2===e&&P>592)return 1;for(;;){R=w-S,u[A]v?(D=U[L+u[A]],N=M[C+u[A]]):(D=96,N=0),p=1<>S)+y]=R<<24|D<<16|N|0}while(0!==y);for(p=1<>=1;if(0!==p?(I&=p-1,I+=p):I=0,A++,0==--O[w]){if(w===_)break;w=f[a+u[A]]}if(w>k&&(I&g)!==b){for(0===S&&(S=k),m+=E,T=w-S,x=1<852||2===e&&P>592)return 1;b=I&g,c[b]=k<<24|T<<16|m-l|0}}return 0!==I&&(c[m+I]=w-S<<24|64<<16|0),d.bits=k,0}},32044:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},79027:e=>{"use strict";function t(e){let t=e.length;for(;--t>=0;)e[t]=0}const r=256,n=286,i=30,o=15,f=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);t(l);const u=new Array(60);t(u);const d=new Array(512);t(d);const h=new Array(256);t(h);const p=new Array(29);t(p);const y=new Array(i);function b(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let g,m,v;function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(y);const A=e=>e<256?d[e]:d[256+(e>>>7)],E=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},_=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{_(e,r[2*t],r[2*t+1])},T=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},S=(e,t,r)=>{const n=new Array(16);let i,f,a=0;for(i=1;i<=o;i++)n[i]=a=a+r[i-1]<<1;for(f=0;f<=t;f++){let t=e[2*f+1];0!==t&&(e[2*f]=T(n[t]++,t))}},x=e=>{let t;for(t=0;t{e.bi_valid>8?E(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},I=(e,t,r,n)=>{const i=2*t,o=2*r;return e[i]{const n=e.heap[r];let i=r<<1;for(;i<=e.heap_len&&(i{let i,o,s,c,l=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],o=e.pending_buf[e.l_buf+l],l++,0===i?k(e,o,t):(s=h[o],k(e,s+r+1,t),c=f[s],0!==c&&(o-=p[s],_(e,o,c)),i--,s=A(i),k(e,s,n),c=a[s],0!==c&&(i-=y[s],_(e,i,c)))}while(l{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,f=t.stat_desc.elems;let a,s,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)M(e,r,a);c=f;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[2*c]=r[2*a]+r[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[2*a+1]=r[2*s+1]=c,e.heap[1]=c++,M(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,f=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,d,h,p,y,b=0;for(h=0;h<=o;h++)e.bl_count[h]=0;for(r[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],h=r[2*r[2*u+1]+1]+1,h>c&&(h=c,b++),r[2*u+1]=h,u>n||(e.bl_count[h]++,p=0,u>=s&&(p=a[u-s]),y=r[2*u],e.opt_len+=y*(h+p),f&&(e.static_len+=y*(i[2*u+1]+p)));if(0!==b){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,b-=2}while(b>0);for(h=c;0!==h;h--)for(u=e.bl_count[h];0!==u;)d=e.heap[--l],d>n||(r[2*d+1]!==h&&(e.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),u--)}})(e,t),S(r,l,e.bl_count)},B=(e,t,r)=>{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=f,f=t[2*(n+1)+1],++a{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),n=0;n<=r;n++)if(i=f,f=t[2*(n+1)+1],!(++a{_(e,0+(n?1:0),3),((e,t,r,n)=>{P(e),n&&(E(e,r),E(e,~r)),e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r})(e,t,r,!0)};e.exports._tr_init=e=>{D||((()=>{let e,t,r,c,w;const A=new Array(16);for(r=0,c=0;c<28;c++)for(p[c]=r,e=0;e<1<>=7;c{let o,f,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t{let t;for(B(e,e.dyn_ltree,e.l_desc.max_code),B(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=o&&(o=f)):o=f=n+5,n+4<=o&&-1!==t?N(e,t,n,i):4===e.strategy||f===o?(_(e,2+(i?1:0),3),C(e,l,u)):(_(e,4+(i?1:0),3),((e,t,r,n)=>{let i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(h[n]+r+1)]++,e.dyn_dtree[2*A(t)]++),e.last_lit===e.lit_bufsize-1),e.exports._tr_align=e=>{_(e,2,3),k(e,256,l),(e=>{16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},78781:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},44105:(e,t,r)=>{"use strict";var n=r(40210)("%Object.defineProperty%",!0),i=r(96410)(),o=r(17642),f=i?Symbol.toStringTag:null;e.exports=function(e,t){var r=arguments.length>2&&arguments[2]&&arguments[2].force;!f||!r&&o(e,f)||(n?n(e,f,{configurable:!0,enumerable:!1,value:t,writable:!1}):e[f]=t)}},41503:(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,i=r(34149),o=r(95320),f=r(18923),a=r(12636);e.exports=function(e){if(i(e))return e;var t,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?t=function(e,t){var r=e[t];if(null!=r){if(!o(r))throw new TypeError(r+" returned for property "+t+" of object "+e+" is not a function");return r}}(e,Symbol.toPrimitive):a(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var s=t.call(e,r);if(i(s))return s;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(f(e)||a(e))&&(r="string"),function(e,t){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"');var r,n,f,a="string"===t?["toString","valueOf"]:["valueOf","toString"];for(f=0;f{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},62863:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="ethers/5.7.2"},91023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>n.VZ,BigNumber:()=>i.O$,Contract:()=>n.CH,ContractFactory:()=>n.lV,FixedNumber:()=>o.xs,Signer:()=>f.E,VoidSigner:()=>f.b,Wallet:()=>a.Wallet,Wordlist:()=>u.D,constants:()=>s,errors:()=>h.ErrorCode,getDefaultProvider:()=>c.getDefaultProvider,logger:()=>y,providers:()=>c,utils:()=>d,version:()=>p.i,wordlists:()=>l.E});var n=r(96519),i=r(2593),o=r(20335),f=r(48171),a=r(44958),s=r(44328),c=r(55538),l=r(9855),u=r(48659),d=r(86494),h=r(80711),p=r(62863);const y=new h.Logger(p.i)},86623:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>a.VZ,BigNumber:()=>s.O$,Contract:()=>a.CH,ContractFactory:()=>a.lV,FixedNumber:()=>c.xs,Signer:()=>i.E,VoidSigner:()=>i.b,Wallet:()=>o.Wallet,Wordlist:()=>y.D,constants:()=>l,errors:()=>u.ErrorCode,ethers:()=>n,getDefaultProvider:()=>f.getDefaultProvider,logger:()=>n.logger,providers:()=>f,utils:()=>d,version:()=>p.i,wordlists:()=>h.E});var n=r(91023),i=r(48171),o=r(44958),f=r(55538),a=r(96519),s=r(2593),c=r(20335),l=r(44328),u=r(80711),d=r(86494),h=r(9855),p=r(62863),y=r(48659);try{const e=window;null==e._ethers&&(e._ethers=n)}catch(e){}},86494:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>n.R,ConstructorFragment:()=>i.Xg,ErrorFragment:()=>i.IC,EventFragment:()=>i.QV,FormatTypes:()=>i.pc,Fragment:()=>i.HY,FunctionFragment:()=>i.YW,HDNode:()=>y.HDNode,Indexed:()=>f.Hk,Interface:()=>f.vU,LogDescription:()=>f.CC,Logger:()=>m.Logger,ParamType:()=>i._R,RLP:()=>k,SigningKey:()=>T.SigningKey,SupportedAlgorithm:()=>B.p,TransactionDescription:()=>f.vk,TransactionTypes:()=>I.TransactionTypes,UnicodeNormalizationForm:()=>x.Uj,Utf8ErrorFuncs:()=>x.te,Utf8ErrorReason:()=>x.Uw,_TypedDataEncoder:()=>p.E,_fetchData:()=>O._fetchData,_toEscapedUtf8String:()=>x.U$,accessListify:()=>I.accessListify,arrayify:()=>l.arrayify,base58:()=>c.Base58,base64:()=>s,checkProperties:()=>_.checkProperties,checkResultErrors:()=>o.BR,commify:()=>M.commify,computeAddress:()=>I.computeAddress,computeHmac:()=>v.Gy,computePublicKey:()=>T.computePublicKey,concat:()=>l.concat,deepCopy:()=>_.deepCopy,defaultAbiCoder:()=>n.$,defaultPath:()=>y.defaultPath,defineReadOnly:()=>_.defineReadOnly,dnsEncode:()=>u.Kn,entropyToMnemonic:()=>y.entropyToMnemonic,fetchJson:()=>O.fetchJson,formatBytes32String:()=>P.s,formatEther:()=>M.formatEther,formatUnits:()=>M.formatUnits,getAccountPath:()=>y.getAccountPath,getAddress:()=>a.getAddress,getContractAddress:()=>a.getContractAddress,getCreate2Address:()=>a.getCreate2Address,getIcapAddress:()=>a.getIcapAddress,getJsonWalletAddress:()=>b.Rb,getStatic:()=>_.getStatic,hashMessage:()=>d.r,hexConcat:()=>l.hexConcat,hexDataLength:()=>l.hexDataLength,hexDataSlice:()=>l.hexDataSlice,hexStripZeros:()=>l.hexStripZeros,hexValue:()=>l.hexValue,hexZeroPad:()=>l.hexZeroPad,hexlify:()=>l.hexlify,id:()=>h.id,isAddress:()=>a.isAddress,isBytes:()=>l.isBytes,isBytesLike:()=>l.isBytesLike,isHexString:()=>l.isHexString,isValidMnemonic:()=>y.isValidMnemonic,isValidName:()=>u.r1,joinSignature:()=>l.joinSignature,keccak256:()=>g.keccak256,mnemonicToEntropy:()=>y.mnemonicToEntropy,mnemonicToSeed:()=>y.mnemonicToSeed,namehash:()=>u.VM,nameprep:()=>S.Ll,parseBytes32String:()=>P.F,parseEther:()=>M.parseEther,parseTransaction:()=>I.parse,parseUnits:()=>M.parseUnits,poll:()=>O.poll,randomBytes:()=>A.O,recoverAddress:()=>I.recoverAddress,recoverPublicKey:()=>T.recoverPublicKey,resolveProperties:()=>_.resolveProperties,ripemd160:()=>v.bP,serializeTransaction:()=>I.serialize,sha256:()=>v.JQ,sha512:()=>v.o,shallowCopy:()=>_.shallowCopy,shuffled:()=>E.y,solidityKeccak256:()=>w.keccak256,solidityPack:()=>w.pack,soliditySha256:()=>w.sha256,splitSignature:()=>l.splitSignature,stripZeros:()=>l.stripZeros,toUtf8Bytes:()=>x.Y0,toUtf8CodePoints:()=>x.XL,toUtf8String:()=>x.ZN,verifyMessage:()=>C.verifyMessage,verifyTypedData:()=>C.verifyTypedData,zeroPad:()=>l.zeroPad});var n=r(72734),i=r(11388),o=r(61184),f=r(8198),a=r(64594),s=r(4089),c=r(57727),l=r(93286),u=r(78339),d=r(93684),h=r(32046),p=r(67827),y=r(36274),b=r(67949),g=r(38197),m=r(80711),v=r(77158),w=r(33777),A=r(44478),E=r(52472),_=r(53587),k=r(61843),T=r(62768),S=r(35637),x=r(44242),P=r(86237),I=r(13479),M=r(46441),C=r(44958),O=r(58341),B=r(21261)},56371:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var f=r(83893);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return f.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return f.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return f.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return f.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return f.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return f.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return f.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return f.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return f.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return f.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return f.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return f.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return f.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return f.TransactionDescription}});var a=r(64594);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var s=o(r(4089));t.base64=s;var c=r(57727);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return c.Base58}});var l=r(93286);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return l.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return l.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return l.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return l.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return l.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return l.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return l.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return l.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return l.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return l.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return l.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return l.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return l.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return l.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return l.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return l.stripZeros}});var u=r(75931);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return u._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return u.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return u.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return u.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return u.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return u.namehash}});var d=r(36274);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return d.entropyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return d.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return d.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return d.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return d.mnemonicToSeed}});var h=r(19380);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return h.getJsonWalletAddress}});var p=r(38197);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var y=r(80711);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return y.Logger}});var b=r(91278);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return b.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return b.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return b.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return b.sha512}});var g=r(33777);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return g.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return g.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return g.sha256}});var m=r(22118);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return m.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return m.shuffled}});var v=r(53587);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return v.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return v.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return v.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return v.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return v.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return v.shallowCopy}});var w=o(r(61843));t.RLP=w;var A=r(62768);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return A.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return A.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return A.SigningKey}});var E=r(62741);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return E.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return E.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return E.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return E._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return E.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return E.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return E.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return E.Utf8ErrorFuncs}});var _=r(13479);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return _.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return _.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return _.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return _.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return _.TransactionTypes}});var k=r(46441);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return k.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return k.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return k.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return k.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return k.parseUnits}});var T=r(44958);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return T.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return T.verifyTypedData}});var S=r(58341);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return S._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return S.poll}});var x=r(91278);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return x.SupportedAlgorithm}});var P=r(62741);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return P.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return P.Utf8ErrorReason}})},17648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=t.call(arguments,1),f=Math.max(0,n.length-o.length),a=[],s=0;s{"use strict";var n=r(17648);e.exports=Function.prototype.bind||n},25972:e=>{"use strict";var t=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(e){r=null}t.functionsHaveConfigurableNames=function(){if(!t()||!r)return!1;var e=r((function(){}),"name");return!!e&&!!e.configurable};var n=Function.prototype.bind;t.boundFunctionsHaveNames=function(){return t()&&"function"==typeof n&&""!==function(){}.bind().name},e.exports=t},40210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,f=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var c=function(){throw new f},l=s?function(){try{return c}catch(e){try{return s(arguments,"callee").get}catch(e){return c}}}():c,u=r(41405)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:d(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":u?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?d(""[Symbol.iterator]()):n,"%Symbol%":u?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},b=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=d(i.prototype))}return y[t]=r,r},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=r(58612),v=r(17642),w=m.call(Function.call,Array.prototype.concat),A=m.call(Function.apply,Array.prototype.splice),E=m.call(Function.call,String.prototype.replace),_=m.call(Function.call,String.prototype.slice),k=m.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,x=function(e,t){var r,n=e;if(v(g,n)&&(n="%"+(r=g[n])[0]+"%"),v(y,n)){var o=y[n];if(o===h&&(o=b(n)),void 0===o&&!t)throw new f("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return E(e,T,(function(e,t,r,i){n[n.length]=r?E(i,S,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),a=o.name,c=o.value,l=!1,u=o.alias;u&&(n=u[0],A(r,w([0,1],u)));for(var d=1,h=!0;d=r.length){var m=s(c,p);c=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else h=v(c,p),c=c[p];h&&!l&&(y[a]=c)}}return c}},31044:(e,t,r)=>{"use strict";var n=r(40210)("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},28185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},41405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(55419);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},55419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},96410:(e,t,r)=>{"use strict";var n=r(55419);e.exports=function(){return n()&&!!Symbol.toStringTag}},17642:(e,t,r)=>{"use strict";var n=r(58612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},33715:(e,t,r)=>{var n=t;n.utils=r(26436),n.common=r(95772),n.sha=r(89041),n.ripemd=r(12949),n.hmac=r(52344),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},95772:(e,t,r)=>{"use strict";var n=r(26436),i=r(79746);function o(){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}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.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=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>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,o=8;o{"use strict";var n=r(26436),i=r(79746);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(26436),i=r(95772),o=n.rotl32,f=n.sum32,a=n.sum32_3,s=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function u(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 d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],m=r,v=n,w=i,A=c,E=l,_=0;_<80;_++){var k=f(o(s(r,u(_,n,i,c),e[p[_]+t],d(_)),b[_]),l);r=l,l=c,c=o(i,10),i=n,n=k,k=f(o(s(m,u(79-_,v,w,A),e[y[_]+t],h(_)),g[_]),E),m=E,E=A,A=o(w,10),w=v,v=k}k=a(this.h[1],i,A),this.h[1]=a(this.h[2],c,E),this.h[2]=a(this.h[3],l,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=k},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],y=[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],b=[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],g=[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]},89041:(e,t,r)=>{"use strict";t.sha1=r(84761),t.sha224=r(10799),t.sha256=r(89344),t.sha384=r(80772),t.sha512=r(45900)},84761:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(37038),f=n.rotl32,a=n.sum32,s=n.sum32_5,c=o.ft_1,l=i.BlockHash,u=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,l),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(26436),i=r(89344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},89344:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(37038),f=r(79746),a=n.sum32,s=n.sum32_4,c=n.sum32_5,l=o.ch32,u=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,y=o.g1_256,b=i.BlockHash,g=[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 m(){if(!(this instanceof m))return new m;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(m,b),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(26436),i=r(45900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},45900:(e,t,r)=>{"use strict";var n=r(26436),i=r(95772),o=r(79746),f=n.rotr64_hi,a=n.rotr64_lo,s=n.shr64_hi,c=n.shr64_lo,l=n.sum64,u=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,y=n.sum64_5_hi,b=n.sum64_5_lo,g=i.BlockHash,m=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var f=t&n^~t&o;return f<0&&(f+=4294967296),f}function E(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var f=t&n^t&o^n&o;return f<0&&(f+=4294967296),f}function k(e,t){var r=f(e,t,28)^f(t,e,2)^f(t,e,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=f(e,t,14)^f(e,t,18)^f(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function P(e,t){var r=f(e,t,1)^f(e,t,8)^s(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=f(e,t,19)^f(t,e,29)^s(e,t,6);return r<0&&(r+=4294967296),r}function C(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(26436).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function f(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?f(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=f,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},26436:(e,t,r)=>{"use strict";var n=r(79746),i=r(35717);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function f(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(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}t.inherits=i,t.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>6|192,r[n++]=63&f|128):o(e,i)?(f=65536+((1023&f)<<10)+(1023&e.charCodeAt(++i)),r[n++]=f>>18|240,r[n++]=f>>12&63|128,r[n++]=f>>6&63|128,r[n++]=63&f|128):(r[n++]=f>>12|224,r[n++]=f>>6&63|128,r[n++]=63&f|128)}else for(i=0;i>>0}return f},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,f=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,f,a){var s=0,c=t;return s+=(c=c+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,o,f,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,f,a,s,c){var l=0,u=t;return l+=(u=u+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,o,f,a,s,c){return t+n+o+a+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2156:(e,t,r)=>{"use strict";var n=r(33715),i=r(34504),o=r(79746);function f(e){if(!(this instanceof f))return new f(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=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=f,f.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.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},f.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=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length{t.read=function(e,t,r,n,i){var o,f,a=8*i-n-1,s=(1<>1,l=-7,u=r?i-1:0,d=r?-1:1,h=e[t+u];for(u+=d,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+u],u+=d,l-=8);for(f=o&(1<<-l)-1,o>>=-l,l+=n;l>0;f=256*f+e[t+u],u+=d,l-=8);if(0===o)o=1-c;else{if(o===s)return f?NaN:1/0*(h?-1:1);f+=Math.pow(2,n),o-=c}return(h?-1:1)*f*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var f,a,s,c=8*o-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,f=l):(f=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-f))<1&&(f--,s*=2),(t+=f+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(f++,s/=2),f+u>=l?(a=0,f=l):f+u>=1?(a=(t*s-1)*Math.pow(2,i),f+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,i),f=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(f=f<0;e[r+h]=255&f,h+=p,f/=256,c-=8);e[r+h-p]|=128*y}},35717: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}}},9496:(e,t,r)=>{"use strict";var n=r(40210),i=r(17642),o=r(37478)(),f=n("%TypeError%"),a={assert:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");if(o.assert(e),!a.has(e,t))throw new f("`slot` is not present on `O`")},get:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");var r=o.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");var r=o.get(e);return!!r&&i(r,"$"+t)},set:function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new f("`O` is not an object");if("string"!=typeof t)throw new f("`slot` must be a string");var n=o.get(e);n||(n={},o.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(a),e.exports=a},95320:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,f=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!f(e)&&(n.call(e),!0)}catch(e){return!1}},s=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),u=function(){return!1};if("object"==typeof document){var d=document.all;s.call(d)===s.call(document.all)&&(u=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=s.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!f(e)&&a(e)}:function(e){if(u(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(f(e))return!1;var t=s.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},18923:(e,t,r)=>{"use strict";var n=Date.prototype.getDay,i=Object.prototype.toString,o=r(96410)();e.exports=function(e){return"object"==typeof e&&null!==e&&(o?function(e){try{return n.call(e),!0}catch(e){return!1}}(e):"[object Date]"===i.call(e))}},98420:(e,t,r)=>{"use strict";var n,i,o,f,a=r(21924),s=r(96410)();if(s){n=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var c=function(){throw o};f={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=c)}var l=a("Object.prototype.toString"),u=Object.getOwnPropertyDescriptor;e.exports=s?function(e){if(!e||"object"!=typeof e)return!1;var t=u(e,"lastIndex");if(!(t&&n(t,"value")))return!1;try{i(e,f)}catch(e){return e===o}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===l(e)}},12636:(e,t,r)=>{"use strict";var n=Object.prototype.toString;if(r(41405)()){var i=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;e.exports=function(e){if("symbol"==typeof e)return!0;if("[object Symbol]"!==n.call(e))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&o.test(i.call(e))}(e)}catch(e){return!1}}}else e.exports=function(e){return!1}},91094:(e,t,r)=>{var n,i=r(34155);!function(){"use strict";var o="input is invalid type",f="object"==typeof window,a=f?window:{};a.JS_SHA3_NO_WINDOW&&(f=!1);var s=!f&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?a=r.g:s&&(a=self);var c=!a.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,u=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],g=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},A=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},E=function(e,t,r){return function(t,n,i,o){return x["cshake"+e].update(t,n,i,o)[r]()}},_=function(e,t,r){return function(t,n,i,o){return x["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,f=this.blocks,a=this.byteCount,s=e.length,c=this.blockCount,l=0,d=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(f[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=f[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var f=0;f=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++f)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];f%t==0&&(U(r),o=0)}return i&&(e=r[o],a+=d[e>>4&15]+d[15&e],i>1&&(a+=d[e>>12&15]+d[e>>8&15]),i>2&&(a+=d[e>>20&15]+d[e>>16&15])),a},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,f=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var s=new Uint32Array(e);f>8&255,s[e+2]=t>>16&255,s[e+3]=t>>24&255;a%r==0&&U(n)}return o&&(e=a<<2,t=n[f],s[e]=255&t,o>1&&(s[e+1]=t>>8&255),o>2&&(s[e+2]=t>>16&255)),s},N.prototype=new D,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var U=function(e){var t,r,n,i,o,f,a,s,c,l,u,d,h,p,b,g,m,v,w,A,E,_,k,T,S,x,P,I,M,C,O,B,R,D,N,U,L,F,j,z,V,H,K,G,q,W,Q,J,Y,Z,X,$,ee,te,re,ne,ie,oe,fe,ae,se,ce,le;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],f=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],s=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],u=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(f<<1|a>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|f>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(s<<1|c>>>31),r=o^(c<<1|s>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=f^(l<<1|u>>>31),r=a^(u<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=s^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(i<<1|o>>>31),r=u^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],b=e[1],W=e[11]<<4|e[10]>>>28,Q=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,se=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,O=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,U=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,B=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,q=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,P=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,fe=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,V=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~g&v,e[1]=b^~m&w,e[10]=T^~x&I,e[11]=S^~P&M,e[20]=D^~U&F,e[21]=N^~L&j,e[30]=G^~W&J,e[31]=q^~Q&Y,e[40]=te^~ne&oe,e[41]=re^~ie&fe,e[2]=g^~v&A,e[3]=m^~w&E,e[12]=x^~I&C,e[13]=P^~M&O,e[22]=U^~F&z,e[23]=L^~j&V,e[32]=W^~J&Z,e[33]=Q^~Y&X,e[42]=ne^~oe&ae,e[43]=ie^~fe&se,e[4]=v^~A&_,e[5]=w^~E&k,e[14]=I^~C&B,e[15]=M^~O&R,e[24]=F^~z&H,e[25]=j^~V&K,e[34]=J^~Z&$,e[35]=Y^~X&ee,e[44]=oe^~ae&ce,e[45]=fe^~se&le,e[6]=A^~_&p,e[7]=E^~k&b,e[16]=C^~B&T,e[17]=O^~R&S,e[26]=z^~H&D,e[27]=V^~K&N,e[36]=Z^~$&G,e[37]=X^~ee&q,e[46]=ae^~ce&te,e[47]=se^~le&re,e[8]=_^~p&g,e[9]=k^~b&m,e[18]=B^~T&x,e[19]=R^~S&P,e[28]=H^~D&U,e[29]=K^~N&L,e[38]=$^~G&W,e[39]=ee^~q&Q,e[48]=ce^~te&ne,e[49]=le^~re&ie,e[0]^=y[n],e[1]^=y[n+1]};if(c)e.exports=x;else{for(I=0;I{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},34504:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r>8,f=255&i;o?r.push(o,f):r.push(f)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},70631:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,f=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&"function"==typeof s.get?s.get:null,l=a&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,b=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,A=String.prototype.toLowerCase,E=RegExp.prototype.test,_=Array.prototype.concat,k=Array.prototype.join,T=Array.prototype.slice,S=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,M="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||"symbol")?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,B=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-S(-e):S(e);if(n!==e){var i=String(n),o=m.call(t,i.length+1);return v.call(i,r,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var D=r(24654),N=D.custom,U=V(N)?N:null;function L(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function F(e){return v.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==G(e)||C&&"object"==typeof e&&C in e)}function z(e){return!("[object RegExp]"!==G(e)||C&&"object"==typeof e&&C in e)}function V(e){if(M)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,i){var a=r||{};if(K(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=!K(a,"customInspect")||a.customInspect;if("boolean"!=typeof s&&"symbol"!==s)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return W(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return y?R(t,w):w}if("bigint"==typeof t){var E=String(t)+"n";return y?R(t,E):E}var S=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=S&&S>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var P=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=k.call(Array(e.indent+1)," ")}return{base:r,prev:k.call(Array(t+1),r)}}(a,n);if(void 0===i)i=[];else if(q(i,t)>=0)return"[Circular]";function N(t,r,o){if(r&&(i=T.call(i)).push(r),o){var f={depth:a.depth};return K(a,"quoteStyle")&&(f.quoteStyle=a.quoteStyle),e(t,f,n+1,i)}return e(t,a,n+1,i)}if("function"==typeof t&&!z(t)){var H=function(e){if(e.name)return e.name;var t=g.call(b.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),Q=$(t,N);return"[Function"+(H?": "+H:" (anonymous)")+"]"+(Q.length>0?" { "+k.call(Q,", ")+" }":"")}if(V(t)){var ee=M?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(t);return"object"!=typeof t||M?ee:J(ee)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var te="<"+A.call(String(t.nodeName)),re=t.attributes||[],ne=0;ne"}if(j(t)){if(0===t.length)return"[]";var ie=$(t,N);return P&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+X(ie,P)+"]":"[ "+k.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==G(e)||C&&"object"==typeof e&&C in e)}(t)){var oe=$(t,N);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+k.call(oe,", ")+" }":"{ ["+String(t)+"] "+k.call(_.call("[cause]: "+N(t.cause),oe),", ")+" }"}if("object"==typeof t&&s){if(U&&"function"==typeof t[U]&&D)return D(t,{depth:S-n});if("symbol"!==s&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var fe=[];return f.call(t,(function(e,r){fe.push(N(r,t,!0)+" => "+N(e,t))})),Z("Map",o.call(t),fe,P)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ae=[];return l.call(t,(function(e){ae.push(N(e,t))})),Z("Set",c.call(t),ae,P)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==G(e)||C&&"object"==typeof e&&C in e)}(t))return J(N(Number(t)));if(function(e){if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}(t))return J(N(x.call(t)));if(function(e){return!("[object Boolean]"!==G(e)||C&&"object"==typeof e&&C in e)}(t))return J(p.call(t));if(function(e){return!("[object String]"!==G(e)||C&&"object"==typeof e&&C in e)}(t))return J(N(String(t)));if(!function(e){return!("[object Date]"!==G(e)||C&&"object"==typeof e&&C in e)}(t)&&!z(t)){var se=$(t,N),ce=B?B(t)===Object.prototype:t instanceof Object||t.constructor===Object,le=t instanceof Object?"":"null prototype",ue=!ce&&C&&Object(t)===t&&C in t?m.call(G(t),8,-1):le?"Object":"",de=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(ue||le?"["+k.call(_.call([],ue||[],le||[]),": ")+"] ":"");return 0===se.length?de+"{}":P?de+"{"+X(se,P)+"}":de+"{ "+k.call(se,", ")+" }"}return String(t)};var H=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return H.call(e,t)}function G(e){return y.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return W(m.call(e,0,t.maxStringLength),t)+n}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Q),"single",t)}function Q(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function J(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Z(e,t,r,n){return e+" ("+t+") {"+(n?X(r,n):k.call(r,", "))+"}"}function X(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+k.call(e,","+r)+"\n"+t.prev}function $(e,t){var r=j(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,f=r(21414),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=f(e),a=t&&"[object String]"===o.call(e),d=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(a&&e.length>0&&!i.call(e,0))for(var y=0;y0)for(var b=0;b{"use strict";var n=Array.prototype.slice,i=r(21414),o=Object.keys,f=o?function(e){return o(e)}:r(18987),a=Object.keys;f.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)})}else Object.keys=f;return Object.keys||f},e.exports=f},21414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},99591:(e,t,r)=>{"use strict";const{Deflate:n,deflate:i,deflateRaw:o,gzip:f}=r(24555),{Inflate:a,inflate:s,inflateRaw:c,ungzip:l}=r(78843),u=r(71619);e.exports.Deflate=n,e.exports.deflate=i,e.exports.deflateRaw=o,e.exports.gzip=f,e.exports.Inflate=a,e.exports.inflate=s,e.exports.inflateRaw=c,e.exports.ungzip=l,e.exports.constants=u},24555:(e,t,r)=>{"use strict";const n=r(30405),i=r(24236),o=r(29373),f=r(48898),a=r(62292),s=Object.prototype.toString,{Z_NO_FLUSH:c,Z_SYNC_FLUSH:l,Z_FULL_FLUSH:u,Z_FINISH:d,Z_OK:h,Z_STREAM_END:p,Z_DEFAULT_COMPRESSION:y,Z_DEFAULT_STRATEGY:b,Z_DEFLATED:g}=r(71619);function m(e){this.options=i.assign({level:y,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:b},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h)throw new Error(f[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===s.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=n.deflateSetDictionary(this.strm,e),r!==h)throw new Error(f[r]);this._dict_set=!0}}function v(e,t){const r=new m(t);if(r.push(e,!0),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize;let f,a;if(this.ended)return!1;for(a=t===~~t?t:!0===t?d:c,"string"==typeof e?r.input=o.string2buf(e):"[object ArrayBuffer]"===s.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(a===l||a===u)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(f=n.deflate(r,a),f===p)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),f=n.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===h;if(0!==r.avail_out){if(a>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===h&&(this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Deflate=m,e.exports.deflate=v,e.exports.deflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.gzip=function(e,t){return(t=t||{}).gzip=!0,v(e,t)},e.exports.constants=r(71619)},78843:(e,t,r)=>{"use strict";const n=r(27948),i=r(24236),o=r(29373),f=r(48898),a=r(62292),s=r(42401),c=Object.prototype.toString,{Z_NO_FLUSH:l,Z_FINISH:u,Z_OK:d,Z_STREAM_END:h,Z_NEED_DICT:p,Z_STREAM_ERROR:y,Z_DATA_ERROR:b,Z_MEM_ERROR:g}=r(71619);function m(e){this.options=i.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==d)throw new Error(f[r]);if(this.header=new s,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==d)))throw new Error(f[r])}function v(e,t){const r=new m(t);if(r.push(e),r.err)throw r.msg||f[r.err];return r.result}m.prototype.push=function(e,t){const r=this.strm,i=this.options.chunkSize,f=this.options.dictionary;let a,s,m;if(this.ended)return!1;for(s=t===~~t?t:!0===t?u:l,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),a=n.inflate(r,s),a===p&&f&&(a=n.inflateSetDictionary(r,f),a===d?a=n.inflate(r,s):a===b&&(a=p));r.avail_in>0&&a===h&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),a=n.inflate(r,s);switch(a){case y:case b:case p:case g:return this.onEnd(a),this.ended=!0,!1}if(m=r.avail_out,r.next_out&&(0===r.avail_out||a===h))if("string"===this.options.to){let e=o.utf8border(r.output,r.next_out),t=r.next_out-e,n=o.buf2string(r.output,e);r.next_out=t,r.avail_out=i-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==d||0!==m){if(a===h)return a=n.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},m.prototype.onData=function(e){this.chunks.push(e)},m.prototype.onEnd=function(e){e===d&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Inflate=m,e.exports.inflate=v,e.exports.inflateRaw=function(e,t){return(t=t||{}).raw=!0,v(e,t)},e.exports.ungzip=v,e.exports.constants=r(71619)},24236:e=>{"use strict";const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r{"use strict";let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,i,o,f=e.length,a=0;for(i=0;i>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{const i=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let o,f;const a=new Array(2*i);for(f=0,o=0;o4)a[f++]=65533,o+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&o1?a[f++]=65533:t<65536?a[f++]=t:(t-=65536,a[f++]=55296|t>>10&1023,a[f++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},66069:e=>{"use strict";e.exports=(e,t,r,n)=>{let i=65535&e|0,o=e>>>16&65535|0,f=0;for(;0!==r;){f=r>2e3?2e3:r,r-=f;do{i=i+t[n++]|0,o=o+i|0}while(--f);i%=65521,o%=65521}return i|o<<16|0}},71619:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:e=>{"use strict";const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,i)=>{const o=t,f=i+n;e^=-1;for(let t=i;t>>8^o[255&(e^r[t])];return-1^e}},30405:(e,t,r)=>{"use strict";const{_tr_init:n,_tr_stored_block:i,_tr_flush_block:o,_tr_tally:f,_tr_align:a}=r(10342),s=r(66069),c=r(2869),l=r(48898),{Z_NO_FLUSH:u,Z_PARTIAL_FLUSH:d,Z_FULL_FLUSH:h,Z_FINISH:p,Z_BLOCK:y,Z_OK:b,Z_STREAM_END:g,Z_STREAM_ERROR:m,Z_DATA_ERROR:v,Z_BUF_ERROR:w,Z_DEFAULT_COMPRESSION:A,Z_FILTERED:E,Z_HUFFMAN_ONLY:_,Z_RLE:k,Z_FIXED:T,Z_DEFAULT_STRATEGY:S,Z_UNKNOWN:x,Z_DEFLATED:P}=r(71619),I=258,M=262,C=42,O=113,B=666,R=(e,t)=>(e.msg=l[t],t),D=e=>2*e-(e>4?9:0),N=e=>{let t=e.length;for(;--t>=0;)e[t]=0},U=e=>{let t,r,n,i=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=i?r-i:0}while(--t);t=i,n=t;do{r=e.prev[--n],e.prev[n]=r>=i?r-i:0}while(--t)};let L=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},j=(e,t)=>{o(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)},z=(e,t)=>{e.pending_buf[e.pending++]=t},V=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},H=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),1===e.state.wrap?e.adler=s(e.adler,t,i,r):2===e.state.wrap&&(e.adler=c(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},K=(e,t)=>{let r,n,i=e.max_chain_length,o=e.strstart,f=e.prev_length,a=e.nice_match;const s=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,c=e.window,l=e.w_mask,u=e.prev,d=e.strstart+I;let h=c[o+f-1],p=c[o+f];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(r=t,c[r+f]===p&&c[r+f-1]===h&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&of){if(e.match_start=t,f=n,n>=a)break;h=c[o+f-1],p=c[o+f]}}}while((t=u[t&l])>s&&0!=--i);return f<=e.lookahead?f:e.lookahead},G=e=>{const t=e.w_size;let r,n,i;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-M)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),U(e),n+=t),0===e.strm.avail_in)break;if(r=H(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=L(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=L(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n,o,f=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,F(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(H(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===a);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(H(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,f=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=f||(n||t===p)&&t!==u&&0===e.strm.avail_in&&n<=o)&&(r=n>o?o:n,a=t===p&&0===e.strm.avail_in&&r===n?1:0,i(e,e.block_start,r,a),e.block_start+=r,F(e.strm)),a?3:1)},W=(e,t)=>{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-M&&(e.match_length=K(e,r)),e.match_length>=3)if(n=f(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=L(e,e.ins_h,e.window[e.strstart+1]);else n=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(j(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2},Q=(e,t)=>{let r,n,i;for(;;){if(e.lookahead=3&&(e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=f(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=L(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(j(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=f(e,0,e.window[e.strstart-1]),n&&j(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=f(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2};function J(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}const Y=[new J(0,0,0,0,q),new J(4,4,8,4,W),new J(4,5,16,8,W),new J(4,6,32,32,W),new J(4,4,16,16,Q),new J(8,16,32,32,Q),new J(8,16,128,128,Q),new J(8,32,128,256,Q),new J(32,128,258,1024,Q),new J(32,258,258,4096,Q)];function Z(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=P,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),N(this.dyn_ltree),N(this.dyn_dtree),N(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),N(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),N(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const X=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==C&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==O&&t.status!==B?1:0},$=e=>{if(X(e))return R(e,m);e.total_in=e.total_out=0,e.data_type=x;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?C:O,e.adler=2===t.wrap?0:1,t.last_flush=-2,n(t),b},ee=e=>{const t=$(e);var r;return t===b&&((r=e.state).window_size=2*r.w_size,N(r.head),r.max_lazy_match=Y[r.level].max_lazy,r.good_match=Y[r.level].good_length,r.nice_match=Y[r.level].nice_length,r.max_chain_length=Y[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},te=(e,t,r,n,i,o)=>{if(!e)return m;let f=1;if(t===A&&(t=6),n<0?(f=0,n=-n):n>15&&(f=2,n-=16),i<1||i>9||r!==P||n<8||n>15||t<0||t>9||o<0||o>T||8===n&&1!==f)return R(e,m);8===n&&(n=9);const a=new Z;return e.state=a,a.strm=e,a.status=C,a.wrap=f,a.gzhead=null,a.w_bits=n,a.w_size=1<te(e,t,P,15,8,S),e.exports.deflateInit2=te,e.exports.deflateReset=ee,e.exports.deflateResetKeep=$,e.exports.deflateSetHeader=(e,t)=>X(e)||2!==e.state.wrap?m:(e.state.gzhead=t,b),e.exports.deflate=(e,t)=>{if(X(e)||t>y||t<0)return e?R(e,m):m;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===B&&t!==p)return R(e,0===e.avail_out?w:m);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(F(e),0===e.avail_out)return r.last_flush=-1,b}else if(0===e.avail_in&&D(t)<=D(n)&&t!==p)return R(e,w);if(r.status===B&&0!==e.avail_in)return R(e,w);if(r.status===C&&0===r.wrap&&(r.status=O),r.status===C){let t=P+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=_||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,V(r,t),0!==r.strstart&&(V(r,e.adler>>>16),V(r,65535&e.adler)),e.adler=1,r.status=O,F(e),0!==r.pending)return r.last_flush=-1,b}if(57===r.status)if(e.adler=0,z(r,31),z(r,139),z(r,8),r.gzhead)z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),z(r,255&r.gzhead.time),z(r,r.gzhead.time>>8&255),z(r,r.gzhead.time>>16&255),z(r,r.gzhead.time>>24&255),z(r,9===r.level?2:r.strategy>=_||r.level<2?4:0),z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(z(r,255&r.gzhead.extra.length),z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=c(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(z(r,0),z(r,0),z(r,0),z(r,0),z(r,0),z(r,9===r.level?2:r.strategy>=_||r.level<2?4:0),z(r,3),r.status=O,F(e),0!==r.pending)return r.last_flush=-1,b;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=c(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=i,F(e),0!==r.pending)return r.last_flush=-1,b;t=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=c(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n)),F(e),0!==r.pending)return r.last_flush=-1,b;n=0}t=r.gzindexn&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n)),F(e),0!==r.pending)return r.last_flush=-1,b;n=0}t=r.gzindexn&&(e.adler=c(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(F(e),0!==r.pending))return r.last_flush=-1,b;z(r,255&e.adler),z(r,e.adler>>8&255),e.adler=0}if(r.status=O,F(e),0!==r.pending)return r.last_flush=-1,b}if(0!==e.avail_in||0!==r.lookahead||t!==u&&r.status!==B){let n=0===r.level?q(r,t):r.strategy===_?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(G(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(j(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===k?((e,t)=>{let r,n,i,o;const a=e.window;for(;;){if(e.lookahead<=I){if(G(e),e.lookahead<=I&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,n=a[i],n===a[++i]&&n===a[++i]&&n===a[++i])){o=e.strstart+I;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=f(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=f(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(j(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===p?(j(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(j(e,!1),0===e.strm.avail_out)?1:2})(r,t):Y[r.level].func(r,t);if(3!==n&&4!==n||(r.status=B),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),b;if(2===n&&(t===d?a(r):t!==y&&(i(r,0,0,!1),t===h&&(N(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),F(e),0===e.avail_out))return r.last_flush=-1,b}return t!==p?b:r.wrap<=0?g:(2===r.wrap?(z(r,255&e.adler),z(r,e.adler>>8&255),z(r,e.adler>>16&255),z(r,e.adler>>24&255),z(r,255&e.total_in),z(r,e.total_in>>8&255),z(r,e.total_in>>16&255),z(r,e.total_in>>24&255)):(V(r,e.adler>>>16),V(r,65535&e.adler)),F(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?b:g)},e.exports.deflateEnd=e=>{if(X(e))return m;const t=e.state.status;return e.state=null,t===O?R(e,v):b},e.exports.deflateSetDictionary=(e,t)=>{let r=t.length;if(X(e))return m;const n=e.state,i=n.wrap;if(2===i||1===i&&n.status!==C||n.lookahead)return m;if(1===i&&(e.adler=s(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===i&&(N(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const o=e.avail_in,f=e.next_in,a=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,G(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=L(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,G(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=f,e.input=a,e.avail_in=o,n.wrap=i,b},e.exports.deflateInfo="pako deflate (from Nodeca project)"},42401:e=>{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},94264:e=>{"use strict";const t=16209;e.exports=function(e,r){let n,i,o,f,a,s,c,l,u,d,h,p,y,b,g,m,v,w,A,E,_,k,T,S;const x=e.state;n=e.next_in,T=e.input,i=n+(e.avail_in-5),o=e.next_out,S=e.output,f=o-(r-e.avail_out),a=o+(e.avail_out-257),s=x.dmax,c=x.wsize,l=x.whave,u=x.wnext,d=x.window,h=x.hold,p=x.bits,y=x.lencode,b=x.distcode,g=(1<>>24,h>>>=w,p-=w,w=v>>>16&255,0===w)S[o++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=y[(65535&v)+(h&(1<>>=w,p-=w),p<15&&(h+=T[n++]<>>24,h>>>=w,p-=w,w=v>>>16&255,!(16&w)){if(0==(64&w)){v=b[(65535&v)+(h&(1<s){e.msg="invalid distance too far back",x.mode=t;break e}if(h>>>=w,p-=w,w=o-f,E>w){if(w=E-w,w>l&&x.sane){e.msg="invalid distance too far back",x.mode=t;break e}if(_=0,k=d,0===u){if(_+=c-w,w2;)S[o++]=k[_++],S[o++]=k[_++],S[o++]=k[_++],A-=3;A&&(S[o++]=k[_++],A>1&&(S[o++]=k[_++]))}else{_=o-E;do{S[o++]=S[_++],S[o++]=S[_++],S[o++]=S[_++],A-=3}while(A>2);A&&(S[o++]=S[_++],A>1&&(S[o++]=S[_++]))}break}}break}}while(n>3,n-=A,p-=A<<3,h&=(1<{"use strict";const n=r(66069),i=r(2869),o=r(94264),f=r(9241),{Z_FINISH:a,Z_BLOCK:s,Z_TREES:c,Z_OK:l,Z_STREAM_END:u,Z_NEED_DICT:d,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:y,Z_BUF_ERROR:b,Z_DEFLATED:g}=r(71619),m=16180,v=16190,w=16191,A=16192,E=16194,_=16199,k=16200,T=16206,S=16209,x=16210,P=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function I(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const M=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},C=e=>{if(M(e))return h;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=m,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,l},O=e=>{if(M(e))return h;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,C(e)},B=(e,t)=>{let r;if(M(e))return h;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?h:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,O(e))},R=(e,t)=>{if(!e)return h;const r=new I;e.state=r,r.strm=e,r.window=null,r.mode=m;const n=B(e,t);return n!==l&&(e.state=null),n};let D,N,U=!0;const L=e=>{if(U){D=new Int32Array(512),N=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(f(1,e.lens,0,288,D,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;f(2,e.lens,0,32,N,0,e.work,{bits:5}),U=!1}e.lencode=D,e.lenbits=9,e.distcode=N,e.distbits=5},F=(e,t,r,n)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(t.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(t.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whaveR(e,15),e.exports.inflateInit2=R,e.exports.inflate=(e,t)=>{let r,I,C,O,B,R,D,N,U,j,z,V,H,K,G,q,W,Q,J,Y,Z,X,$=0;const ee=new Uint8Array(4);let te,re;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(M(e)||!e.output||!e.input&&0!==e.avail_in)return h;r=e.state,r.mode===w&&(r.mode=A),B=e.next_out,C=e.output,D=e.avail_out,O=e.next_in,I=e.input,R=e.avail_in,N=r.hold,U=r.bits,j=R,z=D,X=l;e:for(;;)switch(r.mode){case m:if(0===r.wrap){r.mode=A;break}for(;U<16;){if(0===R)break e;R--,N+=I[O++]<>>8&255,r.check=i(r.check,ee,2,0),N=0,U=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&N)<<8)+(N>>8))%31){e.msg="incorrect header check",r.mode=S;break}if((15&N)!==g){e.msg="unknown compression method",r.mode=S;break}if(N>>>=4,U-=4,Z=8+(15&N),0===r.wbits&&(r.wbits=Z),Z>15||Z>r.wbits){e.msg="invalid window size",r.mode=S;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,r.check=i(r.check,ee,2,0)),N=0,U=0,r.mode=16182;case 16182:for(;U<32;){if(0===R)break e;R--,N+=I[O++]<>>8&255,ee[2]=N>>>16&255,ee[3]=N>>>24&255,r.check=i(r.check,ee,4,0)),N=0,U=0,r.mode=16183;case 16183:for(;U<16;){if(0===R)break e;R--,N+=I[O++]<>8),512&r.flags&&4&r.wrap&&(ee[0]=255&N,ee[1]=N>>>8&255,r.check=i(r.check,ee,2,0)),N=0,U=0,r.mode=16184;case 16184:if(1024&r.flags){for(;U<16;){if(0===R)break e;R--,N+=I[O++]<>>8&255,r.check=i(r.check,ee,2,0)),N=0,U=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(V=r.length,V>R&&(V=R),V&&(r.head&&(Z=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(I.subarray(O,O+V),Z)),512&r.flags&&4&r.wrap&&(r.check=i(r.check,I,V,O)),R-=V,O+=V,r.length-=V),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===R)break e;V=0;do{Z=I[O+V++],r.head&&Z&&r.length<65536&&(r.head.name+=String.fromCharCode(Z))}while(Z&&V>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=w;break;case 16189:for(;U<32;){if(0===R)break e;R--,N+=I[O++]<>>=7&U,U-=7&U,r.mode=T;break}for(;U<3;){if(0===R)break e;R--,N+=I[O++]<>>=1,U-=1,3&N){case 0:r.mode=16193;break;case 1:if(L(r),r.mode=_,t===c){N>>>=2,U-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=S}N>>>=2,U-=2;break;case 16193:for(N>>>=7&U,U-=7&U;U<32;){if(0===R)break e;R--,N+=I[O++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=S;break}if(r.length=65535&N,N=0,U=0,r.mode=E,t===c)break e;case E:r.mode=16195;case 16195:if(V=r.length,V){if(V>R&&(V=R),V>D&&(V=D),0===V)break e;C.set(I.subarray(O,O+V),B),R-=V,O+=V,D-=V,B+=V,r.length-=V;break}r.mode=w;break;case 16196:for(;U<14;){if(0===R)break e;R--,N+=I[O++]<>>=5,U-=5,r.ndist=1+(31&N),N>>>=5,U-=5,r.ncode=4+(15&N),N>>>=4,U-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=S;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,U-=3}for(;r.have<19;)r.lens[ne[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,te={bits:r.lenbits},X=f(0,r.lens,0,19,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid code lengths set",r.mode=S;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,q=$>>>16&255,W=65535&$,!(G<=U);){if(0===R)break e;R--,N+=I[O++]<>>=G,U-=G,r.lens[r.have++]=W;else{if(16===W){for(re=G+2;U>>=G,U-=G,0===r.have){e.msg="invalid bit length repeat",r.mode=S;break}Z=r.lens[r.have-1],V=3+(3&N),N>>>=2,U-=2}else if(17===W){for(re=G+3;U>>=G,U-=G,Z=0,V=3+(7&N),N>>>=3,U-=3}else{for(re=G+7;U>>=G,U-=G,Z=0,V=11+(127&N),N>>>=7,U-=7}if(r.have+V>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=S;break}for(;V--;)r.lens[r.have++]=Z}}if(r.mode===S)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=S;break}if(r.lenbits=9,te={bits:r.lenbits},X=f(1,r.lens,0,r.nlen,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid literal/lengths set",r.mode=S;break}if(r.distbits=6,r.distcode=r.distdyn,te={bits:r.distbits},X=f(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,te),r.distbits=te.bits,X){e.msg="invalid distances set",r.mode=S;break}if(r.mode=_,t===c)break e;case _:r.mode=k;case k:if(R>=6&&D>=258){e.next_out=B,e.avail_out=D,e.next_in=O,e.avail_in=R,r.hold=N,r.bits=U,o(e,z),B=e.next_out,C=e.output,D=e.avail_out,O=e.next_in,I=e.input,R=e.avail_in,N=r.hold,U=r.bits,r.mode===w&&(r.back=-1);break}for(r.back=0;$=r.lencode[N&(1<>>24,q=$>>>16&255,W=65535&$,!(G<=U);){if(0===R)break e;R--,N+=I[O++]<>Q)],G=$>>>24,q=$>>>16&255,W=65535&$,!(Q+G<=U);){if(0===R)break e;R--,N+=I[O++]<>>=Q,U-=Q,r.back+=Q}if(N>>>=G,U-=G,r.back+=G,r.length=W,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=w;break}if(64&q){e.msg="invalid literal/length code",r.mode=S;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(re=r.extra;U>>=r.extra,U-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;$=r.distcode[N&(1<>>24,q=$>>>16&255,W=65535&$,!(G<=U);){if(0===R)break e;R--,N+=I[O++]<>Q)],G=$>>>24,q=$>>>16&255,W=65535&$,!(Q+G<=U);){if(0===R)break e;R--,N+=I[O++]<>>=Q,U-=Q,r.back+=Q}if(N>>>=G,U-=G,r.back+=G,64&q){e.msg="invalid distance code",r.mode=S;break}r.offset=W,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(re=r.extra;U>>=r.extra,U-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=S;break}r.mode=16204;case 16204:if(0===D)break e;if(V=z-D,r.offset>V){if(V=r.offset-V,V>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=S;break}V>r.wnext?(V-=r.wnext,H=r.wsize-V):H=r.wnext-V,V>r.length&&(V=r.length),K=r.window}else K=C,H=B-r.offset,V=r.length;V>D&&(V=D),D-=V,r.length-=V;do{C[B++]=K[H++]}while(--V);0===r.length&&(r.mode=k);break;case 16205:if(0===D)break e;C[B++]=r.length,D--,r.mode=k;break;case T:if(r.wrap){for(;U<32;){if(0===R)break e;R--,N|=I[O++]<{if(M(e))return h;let t=e.state;return t.window&&(t.window=null),e.state=null,l},e.exports.inflateGetHeader=(e,t)=>{if(M(e))return h;const r=e.state;return 0==(2&r.wrap)?h:(r.head=t,t.done=!1,l)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let i,o,f;return M(e)?h:(i=e.state,0!==i.wrap&&i.mode!==v?h:i.mode===v&&(o=1,o=n(o,t,r,0),o!==i.check)?p:(f=F(e,t,r,r),f?(i.mode=x,y):(i.havedict=1,l)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},9241:e=>{"use strict";const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),i=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),o=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,f,a,s,c,l,u,d)=>{const h=d.bits;let p,y,b,g,m,v,w=0,A=0,E=0,_=0,k=0,T=0,S=0,x=0,P=0,I=0,M=null;const C=new Uint16Array(16),O=new Uint16Array(16);let B,R,D,N=null;for(w=0;w<=t;w++)C[w]=0;for(A=0;A=1&&0===C[_];_--);if(k>_&&(k=_),0===_)return c[l++]=20971520,c[l++]=20971520,d.bits=1,0;for(E=1;E<_&&0===C[E];E++);for(k0&&(0===e||1!==_))return-1;for(O[1]=0,w=1;w852||2===e&&P>592)return 1;for(;;){B=w-S,u[A]+1=v?(R=N[u[A]-v],D=M[u[A]-v]):(R=96,D=0),p=1<>S)+y]=B<<24|R<<16|D|0}while(0!==y);for(p=1<>=1;if(0!==p?(I&=p-1,I+=p):I=0,A++,0==--C[w]){if(w===_)break;w=f[a+u[A]]}if(w>k&&(I&g)!==b){for(0===S&&(S=k),m+=E,T=w-S,x=1<852||2===e&&P>592)return 1;b=I&g,c[b]=k<<24|T<<16|m-l|0}}return 0!==I&&(c[m+I]=w-S<<24|64<<16|0),d.bits=k,0}},48898:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},10342:e=>{"use strict";function t(e){let t=e.length;for(;--t>=0;)e[t]=0}const r=256,n=286,i=30,o=15,f=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l=new Array(576);t(l);const u=new Array(60);t(u);const d=new Array(512);t(d);const h=new Array(256);t(h);const p=new Array(29);t(p);const y=new Array(i);function b(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}let g,m,v;function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(y);const A=e=>e<256?d[e]:d[256+(e>>>7)],E=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},_=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{_(e,r[2*t],r[2*t+1])},T=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},S=(e,t,r)=>{const n=new Array(16);let i,f,a=0;for(i=1;i<=o;i++)a=a+r[i-1]<<1,n[i]=a;for(f=0;f<=t;f++){let t=e[2*f+1];0!==t&&(e[2*f]=T(n[t]++,t))}},x=e=>{let t;for(t=0;t{e.bi_valid>8?E(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},I=(e,t,r,n)=>{const i=2*t,o=2*r;return e[i]{const n=e.heap[r];let i=r<<1;for(;i<=e.heap_len&&(i{let i,o,s,c,l=0;if(0!==e.sym_next)do{i=255&e.pending_buf[e.sym_buf+l++],i+=(255&e.pending_buf[e.sym_buf+l++])<<8,o=e.pending_buf[e.sym_buf+l++],0===i?k(e,o,t):(s=h[o],k(e,s+r+1,t),c=f[s],0!==c&&(o-=p[s],_(e,o,c)),i--,s=A(i),k(e,s,n),c=a[s],0!==c&&(i-=y[s],_(e,i,c)))}while(l{const r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,f=t.stat_desc.elems;let a,s,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)M(e,r,a);c=f;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,r[2*c]=r[2*a]+r[2*s],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,r[2*a+1]=r[2*s+1]=c,e.heap[1]=c++,M(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,f=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,d,h,p,y,b=0;for(h=0;h<=o;h++)e.bl_count[h]=0;for(r[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],h=r[2*r[2*u+1]+1]+1,h>c&&(h=c,b++),r[2*u+1]=h,u>n||(e.bl_count[h]++,p=0,u>=s&&(p=a[u-s]),y=r[2*u],e.opt_len+=y*(h+p),f&&(e.static_len+=y*(i[2*u+1]+p)));if(0!==b){do{for(h=c-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,b-=2}while(b>0);for(h=c;0!==h;h--)for(u=e.bl_count[h];0!==u;)d=e.heap[--l],d>n||(r[2*d+1]!==h&&(e.opt_len+=(h-r[2*d+1])*r[2*d],r[2*d+1]=h),u--)}})(e,t),S(r,l,e.bl_count)},B=(e,t,r)=>{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=f,f=t[2*(n+1)+1],++a{let n,i,o=-1,f=t[1],a=0,s=7,c=4;for(0===f&&(s=138,c=3),n=0;n<=r;n++)if(i=f,f=t[2*(n+1)+1],!(++a{_(e,0+(n?1:0),3),P(e),E(e,r),E(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};e.exports._tr_init=e=>{D||((()=>{let e,t,r,c,w;const A=new Array(16);for(r=0,c=0;c<28;c++)for(p[c]=r,e=0;e<1<>=7;c{let o,f,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t{let t;for(B(e,e.dyn_ltree,e.l_desc.max_code),B(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,f=e.static_len+3+7>>>3,f<=o&&(o=f)):o=f=n+5,n+4<=o&&-1!==t?N(e,t,n,i):4===e.strategy||f===o?(_(e,2+(i?1:0),3),C(e,l,u)):(_(e,4+(i?1:0),3),((e,t,r,n)=>{let i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(h[n]+r+1)]++,e.dyn_dtree[2*A(t)]++),e.sym_next===e.sym_end),e.exports._tr_align=e=>{_(e,2,3),k(e,256,l),(e=>{16===e.bi_valid?(E(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},62292:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},34155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function f(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,s=[],c=!1,l=-1;function u(){c&&a&&(c=!1,a.length?s=a.concat(s):l=-1,s.length&&d())}function d(){if(!c){var e=f(u);c=!0;for(var t=s.length;t;){for(a=s,s=[];++l1)for(var r=1;r{"use strict";var n=r(48764).lW;class i{static isArrayBuffer(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}static toArrayBuffer(e){return this.isArrayBuffer(e)?e:e.byteLength===e.buffer.byteLength?e.buffer:this.toUint8Array(e).slice().buffer}static toUint8Array(e){return this.toView(e,Uint8Array)}static toView(e,t){if(e.constructor===t)return e;if(this.isArrayBuffer(e))return new t(e);if(this.isArrayBufferView(e))return new t(e.buffer,e.byteOffset,e.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)}static isArrayBufferView(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)}static isEqual(e,t){const r=i.toUint8Array(e),n=i.toUint8Array(t);if(r.length!==n.byteLength)return!1;for(let e=0;e{"use strict";var n=r(25972).functionsHaveConfigurableNames(),i=Object,o=TypeError;e.exports=function(){if(null!=this&&this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e},n&&Object.defineProperty&&Object.defineProperty(e.exports,"name",{value:"get flags"})},2847:(e,t,r)=>{"use strict";var n=r(4289),i=r(55559),o=r(53697),f=r(71721),a=r(32753),s=i(f());n(s,{getPolyfill:f,implementation:o,shim:a}),e.exports=s},71721:(e,t,r)=>{"use strict";var n=r(53697),i=r(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;e.exports=function(){if(i&&"gim"===/a/gim.flags){var e=o(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var t="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(r,"sticky",{get:function(){t+="y"}}),"dy"===t)return e.get}}return n}},32753:(e,t,r)=>{"use strict";var n=r(4289).supportsDescriptors,i=r(71721),o=Object.getOwnPropertyDescriptor,f=Object.defineProperty,a=TypeError,s=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!n||!s)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=s(c),r=o(t,"flags");return r&&r.get===e||f(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},79246:(e,t,r)=>{"use strict";var n=r(21924),i=r(40210),o=r(98420),f=n("RegExp.prototype.exec"),a=i("%TypeError%");e.exports=function(e){if(!o(e))throw new a("`regex` must be a RegExp");return function(t){return null!==f(e,t)}}},17635:function(e){"use strict";!function(t){const r=2147483647;function n(e){const t=new Uint32Array([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]);let r=1779033703,n=3144134277,i=1013904242,o=2773480762,f=1359893119,a=2600822924,s=528734635,c=1541459225;const l=new Uint32Array(64);function u(e){let u=0,d=e.length;for(;d>=64;){let h,p,y,b,g,m=r,v=n,w=i,A=o,E=f,_=a,k=s,T=c;for(p=0;p<16;p++)y=u+4*p,l[p]=(255&e[y])<<24|(255&e[y+1])<<16|(255&e[y+2])<<8|255&e[y+3];for(p=16;p<64;p++)h=l[p-2],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=l[p-15],g=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,l[p]=(b+l[p-7]|0)+(g+l[p-16]|0)|0;for(p=0;p<64;p++)b=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&_^~E&k)|0)+(T+(t[p]+l[p]|0)|0)|0,g=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&v^m&w^v&w)|0,T=k,k=_,_=E,E=A+b|0,A=w,w=v,v=m,m=b+g|0;r=r+m|0,n=n+v|0,i=i+w|0,o=o+A|0,f=f+E|0,a=a+_|0,s=s+k|0,c=c+T|0,u+=64,d-=64}}u(e);let d,h=e.length%64,p=e.length/536870912|0,y=e.length<<3,b=h<56?56:120,g=e.slice(e.length-h,e.length);for(g.push(128),d=h+1;d>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(y>>>24&255),g.push(y>>>16&255),g.push(y>>>8&255),g.push(y>>>0&255),u(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);const i=64+t.length+4,o=new Array(i),f=new Array(64);let a,s=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)c(),s=s.concat(n(f.concat(n(o)))),r-=32;return r>0&&(c(),s=s.concat(n(f.concat(n(o))).slice(0,r))),s}function o(e,t,r,n,i){let o;for(c(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)s(e,16*o,i,16),a(i,n),c(i,0,e,t+16*o,16);for(o=0;o>>32-t}function a(e,t){c(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=f(t[0]+t[12],7),t[8]^=f(t[4]+t[0],9),t[12]^=f(t[8]+t[4],13),t[0]^=f(t[12]+t[8],18),t[9]^=f(t[5]+t[1],7),t[13]^=f(t[9]+t[5],9),t[1]^=f(t[13]+t[9],13),t[5]^=f(t[1]+t[13],18),t[14]^=f(t[10]+t[6],7),t[2]^=f(t[14]+t[10],9),t[6]^=f(t[2]+t[14],13),t[10]^=f(t[6]+t[2],18),t[3]^=f(t[15]+t[11],7),t[7]^=f(t[3]+t[15],9),t[11]^=f(t[7]+t[3],13),t[15]^=f(t[11]+t[7],18),t[1]^=f(t[0]+t[3],7),t[2]^=f(t[1]+t[0],9),t[3]^=f(t[2]+t[1],13),t[0]^=f(t[3]+t[2],18),t[6]^=f(t[5]+t[4],7),t[7]^=f(t[6]+t[5],9),t[4]^=f(t[7]+t[6],13),t[5]^=f(t[4]+t[7],18),t[11]^=f(t[10]+t[9],7),t[8]^=f(t[11]+t[10],9),t[9]^=f(t[8]+t[11],13),t[10]^=f(t[9]+t[8],18),t[12]^=f(t[15]+t[14],7),t[13]^=f(t[12]+t[15],9),t[14]^=f(t[13]+t[12],13),t[15]^=f(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function s(e,t,r,n){for(let i=0;i=256)return!1}return!0}function u(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,t,n,f,a,d,h){if(n=u(n,"N"),f=u(f,"r"),a=u(a,"p"),d=u(d,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>r/128/f)throw new Error("N too large");if(f>r/128/a)throw new Error("r too large");if(!l(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!l(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let p=i(e,t,128*a*f);const y=new Uint32Array(32*a*f);for(let e=0;eI&&(t=I);for(let e=0;eI&&(t=I);for(let e=0;e>0&255),p.push(y[e]>>8&255),p.push(y[e]>>16&255),p.push(y[e]>>24&255);const r=i(e,p,d);return h&&h(null,1,r),r}h&&M(C)};if(!h)for(;;){const e=C();if(null!=e)return e}C()}const h={scrypt:function(e,t,r,n,i,o,f){return new Promise((function(a,s){let c=0;f&&f(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)s(e);else if(r)f&&1!==c&&f(1),a(new Uint8Array(r));else if(f&&t!==c)return c=t,f(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=h}()},37478:(e,t,r)=>{"use strict";var n=r(40210),i=r(21924),o=r(70631),f=n("%TypeError%"),a=n("%WeakMap%",!0),s=n("%Map%",!0),c=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),u=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new f("Side channel does not contain "+o(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(s){if(t)return d(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(s){if(t)return p(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,i){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),l(e,n,i)):s?(t||(t=new s),h(t,n,i)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,i))}};return n}},19505:(e,t,r)=>{"use strict";var n=r(13832),i=r(65537),o=r(23555),f=r(15728),a=r(70294),s=r(11897),c=r(21924),l=r(41405)(),u=r(2847),d=c("String.prototype.indexOf"),h=r(46966),p=function(e){var t=h();if(l&&"symbol"==typeof Symbol.matchAll){var r=o(e,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==t?t:r}if(f(e))return t};e.exports=function(e){var t=s(this);if(null!=e){if(f(e)){var r="flags"in e?i(e,"flags"):u(e);if(s(r),d(a(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var o=p(e);if(void 0!==o)return n(o,e,[t])}var c=a(t),l=new RegExp(e,"g");return n(p(l),l,[c])}},94956:(e,t,r)=>{"use strict";var n=r(55559),i=r(4289),o=r(19505),f=r(83447),a=r(42376),s=n(o);i(s,{getPolyfill:f,implementation:o,shim:a}),e.exports=s},46966:(e,t,r)=>{"use strict";var n=r(41405)(),i=r(27201);e.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:i}},83447:(e,t,r)=>{"use strict";var n=r(19505);e.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(e){return String.prototype.matchAll}return n}},27201:(e,t,r)=>{"use strict";var n=r(57257),i=r(65537),o=r(40892),f=r(53582),a=r(82313),s=r(70294),c=r(37858),l=r(2847),u=r(21924)("String.prototype.indexOf"),d=RegExp,h="flags"in RegExp.prototype,p=function(e){var t=this;if("Object"!==c(t))throw new TypeError('"this" value must be an Object');var r=s(e),p=function(e,t){var r="flags"in t?i(t,"flags"):s(l(t));return{flags:r,matcher:new e(h&&"string"==typeof r?t:e===d?t.source:t,r)}}(f(t,d),t),y=p.flags,b=p.matcher,g=a(i(t,"lastIndex"));o(b,"lastIndex",g,!0);var m=u(y,"g")>-1,v=u(y,"u")>-1;return n(b,r,m,v)},y=Object.defineProperty,b=Object.getOwnPropertyDescriptor;if(y&&b){var g=b(p,"name");g&&g.configurable&&y(p,"name",{value:"[Symbol.matchAll]"})}e.exports=p},42376:(e,t,r)=>{"use strict";var n=r(4289),i=r(41405)(),o=r(83447),f=r(46966),a=Object.defineProperty,s=Object.getOwnPropertyDescriptor;e.exports=function(){var e=o();if(n(String.prototype,{matchAll:e},{matchAll:function(){return String.prototype.matchAll!==e}}),i){var t=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:t},{matchAll:function(){return Symbol.matchAll!==t}}),a&&s){var r=s(Symbol,t);r&&!r.configurable||a(Symbol,t,{configurable:!1,enumerable:!1,value:t,writable:!1})}var c=f(),l={};l[t]=c;var u={};u[t]=function(){return RegExp.prototype[t]!==c},n(RegExp.prototype,l,u)}return e}},40337:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});var n=function(){function e(e){this.client=e}return e.prototype.saveProof=function(t,r){var n=this.getProofs();r?(n[this.getFullKey(t)]=r,localStorage.setItem(e.STORAGE_KEY,JSON.stringify(n))):this.deleteProof(t)},e.prototype.getSavedProof=function(e){var t=this.getProofs(),r=this.getFullKey(e);return t[r]?t[r]:null},e.prototype.deleteProof=function(t){var r=this.getProofs(),n=this.getFullKey(t);r[n]&&delete r[n],localStorage.setItem(e.STORAGE_KEY,JSON.stringify(r))},e.prototype.getFullKey=function(e){return this.TYPE+"-"+e.toLowerCase()},e.prototype.getProofs=function(){var t=localStorage.getItem(e.STORAGE_KEY);return t&&t.length?JSON.parse(t):{}},e.STORAGE_KEY="tn-proof",e}()},5904:(e,t,r)=>{"use strict";r.d(t,{KU:()=>xt,XF:()=>_t,ct:()=>kt,kS:()=>Et});var n=r(43803),i=r(30838),o=r(39896),f=r(37982),a=r(39345),s=r(82707),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},h=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i-1){s=(null==i?void 0:i.viewTransition)+"-tn",l=this.viewContainer;var u=document.createElement("div");this.transitionContainer.classList.add(s),u.classList.add("view-content-tn"),"slide-in-left-tn"===s||"slide-in-top-tn"===s?this.transitionContainer.prepend(u):this.transitionContainer.appendChild(u),this.viewContainer=u}i.componentIsFactory?this.currentView=e(this.client,this,this.viewContainer,{options:this.options,viewOptions:i,data:t}):this.currentView=new e(this.client,this,this.viewContainer,{options:this.options,viewOptions:i,data:t}),this.currentView.render(),s&&(setTimeout((function(){l.remove(),n.transitionContainer.classList.remove("slide-in",s)}),300),this.transitionContainer.classList.add("slide-in")),this.client.eventSender("view-changed",{viewName:f,data:t})}else(0,o.kg)(3,"Element .view-content-tn not found: popup not initialized")},e.prototype.viewIsNotStart=function(){return!this.isStartView},e.prototype.getCustomUserError=function(e){var t=e;return e&&e.contains&&e.contains("Failed to read the 'localStorage'")&&(t="Please enable cookies in your browser to use this feature or try a different browser."),t},e.prototype.showError=function(e,t){var r=this;if(void 0===t&&(t=!0),this.cancelDelayedLoader(),"string"!=typeof e){if(e.name===_t.USER_ABORT)return this.dismissLoader();e=e.message?e.message:e.toString()}else if(e===_t.USER_ABORT)return this.dismissLoader();this.loadContainer.querySelector(".loader-tn").style.display="none",this.retryButton.style.display="block";var n=this.getCustomUserError(e);(this.loadContainer.querySelector(".loader-msg-tn").innerHTML='

    '.concat(n,"

    "),this.loadContainer.style.display="flex",t)||(this.loadContainer.querySelector(".dismiss-error-tn").style.display="none");setTimeout((function(){r.setForceToOpen(!1)}),0)},e.prototype.setErrorRetryCallback=function(e){this.retryCallback=e,this.retryButton.innerText="Retry"},e.prototype.showLoaderDelayed=function(e,t,r){var n=this;void 0===r&&(r=!1),this.loadTimer&&clearTimeout(this.loadTimer),this.loadTimer=setTimeout((function(){n.showLoader.apply(n,h([],d(e),!1)),r&&n.openOverlay()}),t)},e.prototype.cancelDelayedLoader=function(){this.loadTimer&&(clearTimeout(this.loadTimer),this.loadTimer=null)},e.prototype.showLoader=function(){for(var e=[],t=0;t\n\t\t\t\n\t\t\t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t\n\t',e.FAB_BUTTON_HTML='\n\t\t\n\t',e}(),y=r(94043),b=["evm","polygon","optimism","bsc","avalanche","fantom","goerli","mumbai","arbitrum"],g=function(e){if(""===e){return(0,o.Po)("You did not specify 'blockchain', the default value is evm. Check our github to see supported values.","warning",null,null),"evm"}if("solana"===e)return"solana";if("socios"===e)return"socios";if("evm"===e)return"evm";if("flow"===e)return"flow";if("ultra"===e)return"ultra";if(b.includes(e.toLowerCase()))return(0,o.Po)("We recommend you to set `blockchain` as 'evm'.","warning",null,null),"evm";return(0,o.Po)("You set unsupported `blockchain` in the constructor. Check our github to see supported values.","error",null,null),e},m=r(28316),v=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},w=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1](U||(U=Promise.resolve())).then(e).catch((e=>setTimeout((()=>{throw e}),0)));const F=()=>{const e=[];var t;return{async deliver(r){e.push(r),t&&(t(e.shift()),t=void 0)},receive:()=>new Promise((function(r){const n=e.shift();if(n)return r(n);t=r}))}},j="INIT",z="SUBSCRIBE",V="UNSUBSCRIBE",H="TERMINATE",K="object"==typeof self&&self.self===self&&self||"object"==typeof r.g&&r.g.global===r.g&&r.g||"object"==typeof window&&window.window===window&&window;K.FCL_REGISTRY=null==K.FCL_REGISTRY?{}:K.FCL_REGISTRY;var G=0;const q=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(((i,o)=>{const f=n.expectReply||!1,a=null!=n.timeout?n.timeout:5e3;f&&a&&setTimeout((()=>o(new Error(`Timeout: ${a}ms passed without a response.`))),a);const s={to:e,from:n.from,tag:t,data:r,timeout:a,reply:i,reject:o};try{K.FCL_REGISTRY[e]&&K.FCL_REGISTRY[e].mailbox.deliver(s),f||i(!0)}catch(t){console.error("FCL.Actor -- Could Not Deliver Message",s,K.FCL_REGISTRY[e],t)}}))},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==t&&(t=++G),null!=K.FCL_REGISTRY[t])return t;K.FCL_REGISTRY[t]={addr:t,mailbox:F(),subs:new Set,kvs:{},error:null};const r={self:()=>t,receive:()=>K.FCL_REGISTRY[t].mailbox.receive(),send:function(e,r,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i.from=t,q(e,r,n,i)},sendSelf:(e,r,n)=>{K.FCL_REGISTRY[t]&&q(t,e,r,n)},broadcast:function(e,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.from=t;for(let i of K.FCL_REGISTRY[t].subs)q(i,e,r,n)},subscribe:e=>null!=e&&K.FCL_REGISTRY[t].subs.add(e),unsubscribe:e=>null!=e&&K.FCL_REGISTRY[t].subs.delete(e),subscriberCount:()=>K.FCL_REGISTRY[t].subs.size,hasSubs:()=>!!K.FCL_REGISTRY[t].subs.size,put:(e,r)=>{null!=e&&(K.FCL_REGISTRY[t].kvs[e]=r)},get:(e,r)=>{const n=K.FCL_REGISTRY[t].kvs[e];return null==n?r:n},delete:e=>{delete K.FCL_REGISTRY[t].kvs[e]},update:(e,r)=>{null!=e&&(K.FCL_REGISTRY[t].kvs[e]=r(K.FCL_REGISTRY[t].kvs[e]))},keys:()=>Object.keys(K.FCL_REGISTRY[t].kvs),all:()=>K.FCL_REGISTRY[t].kvs,where:e=>Object.keys(K.FCL_REGISTRY[t].kvs).reduce(((r,n)=>e.test(n)?{...r,[n]:K.FCL_REGISTRY[t].kvs[n]}:r),{}),merge:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach((r=>K.FCL_REGISTRY[t].kvs[r]=e[r]))},fatalError:e=>{K.FCL_REGISTRY[t].error=e;for(let e of K.FCL_REGISTRY[t].subs)q(e,"UPDATED")}};return"object"==typeof e&&(e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return async t=>{"function"==typeof e[j]&&await e[j](t);e:for(;;){const r=await t.receive();try{if("EXIT"===r.tag){"function"==typeof e[H]&&await e[H](t,r,r.data||{});break e}await e[r.tag](t,r,r.data||{})}catch(e){console.error(`${t.self()} Error`,r,e)}finally{continue e}}}}(e)),L((async()=>{await e(r),(e=>{delete K.FCL_REGISTRY[e]})(t)})),t};function Q(e,t){if(!e){const e=new Error(`INVARIANT ${t}`);e.stack=e.stack.split("\n").filter((e=>!/at invariant/.test(e))).join("\n");for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;it.reduce(((e,t)=>t(e)),e)},Y=e=>e&&"object"==typeof e&&!Array.isArray(e),Z=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nArray.isArray(e)?Z({},...e):e,$=e=>e.contracts?e.contracts:{},ee=(e,t)=>J(X,function(){for(var e=arguments.length,t=new Array(e),r=0;rt.reduce(((t,r)=>({...t,...r(e)})),{})}((e=>t=>{let{deployments:r={},accounts:n={}}=t;const i=r?.[e];return i?Object.entries(i).reduce(((e,t)=>{let[r,i]=t;const o=n[r]?.address;return o?i.reduce(((e,t)=>({...e,[t]:o})),{}):e}),{}):{}})(t),J($,(e=>t=>Object.entries(t).reduce(((t,r)=>{let[n,i]=r;const o=i?.aliases?.[e];return o&&(t[n]=o),t}),{}))(t))))(e),te=e=>Object.entries(e?.accounts).reduce(((e,t)=>{let[r,n]=t;return!!e||n?.hasOwnProperty("key")&&(i=n?.key,"string"==typeof i&&/^[0-9A-Fa-f]+$/.test(i));var i}),!1),re=e=>Y(e)?te(e):e.some(te),ne=e=>"local"===e?.toLowerCase()?"emulator":e?.toLowerCase(),ie="config",oe="PUT_CONFIG",fe="GET_CONFIG",ae="GET_ALL_CONFIG",se="UPDATE_CONFIG",ce="DELETE_CONFIG",le="CLEAR_CONFIG",ue="WHERE_CONFIG",de="CONFIG/UPDATED",he=e=>e,pe={[oe]:(e,t,r)=>{let{key:n,value:i}=r;if(null==n)throw new Error("Missing 'key' for config/put.");e.put(n,i),e.broadcast(de,{...e.all()})},[fe]:(e,t,r)=>{let{key:n,fallback:i}=r;if(null==n)throw new Error("Missing 'key' for config/get");t.reply(e.get(n,i))},[ae]:(e,t)=>{t.reply({...e.all()})},[se]:(e,t,r)=>{let{key:n,fn:i}=r;if(null==n)throw new Error("Missing 'key' for config/update");e.update(n,i||he),e.broadcast(de,{...e.all()})},[ce]:(e,t,r)=>{let{key:n}=r;if(null==n)throw new Error("Missing 'key' for config/delete");e.delete(n),e.broadcast(de,{...e.all()})},[le]:(e,t)=>{let r=Object.keys(e.all());for(let t of r)e.delete(t);e.broadcast(de,{...e.all()})},[ue]:(e,t,r)=>{let{pattern:n}=r;if(null==n)throw new Error("Missing 'pattern' for config/where");t.reply(e.where(n))},[z]:(e,t)=>{e.subscribe(t.from),e.send(t.from,de,{...e.all()})},[V]:(e,t)=>{e.unsubscribe(t.from)}};function ye(e,t){return q(ie,oe,{key:e,value:t}),Te()}function be(e,t){return q(ie,fe,{key:e,fallback:t},{expectReply:!0,timeout:10})}async function ge(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(!e.length)return t;const[r,...n]=e,i=await be(r);return null==i?ge(n,t):i}function me(){return q(ie,ae,null,{expectReply:!0,timeout:10})}function ve(e){return q(ie,se,{key:e,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:he}),Te()}function we(e){return q(ie,ce,{key:e}),Te()}function Ae(e){return q(ie,ue,{pattern:e},{expectReply:!0,timeout:10})}function Ee(e){return function(e,t,r){t(e);const n="@EXIT",i=W((async t=>{for(t.send(e,z);;){const i=await t.receive(),o=K.FCL_REGISTRY[e].error;if(i.tag===n)return void t.send(e,V);if(o)return r(null,o),void t.send(e,V);r(i.data,null)}}));return()=>q(i,n)}(ie,(()=>W(pe,ie)),e)}function _e(e){return q(ie,le).then(Te(e))}async function ke(e){const t=await be("flow.network"),r=ne(t),{flowJSON:n}=e;if(Q(Boolean(n),"config.load -- 'flowJSON' must be defined"),Q(r,'Flow Network Required -- In order for FCL to load your contracts please define "flow.network" to "emulator", "local", "testnet", or "mainnet" in your config. See more here: https://developers.flow.com/tools/fcl-js/reference/configure-fcl'),re(n)){const e="emulator"===r;if(Ie({title:"Private Keys Detected",message:"Private keys should be stored in a separate flow.json file for security. See more here: https://developers.flow.com/tools/flow-cli/security",level:e?Pe.warn:Pe.error}),!e)return}for(const[e,t]of Object.entries(ee(n,r))){const r=`0x${e}`,n=await be(r);n&&n!==t?Ie({title:"Contract Placeholder Conflict Detected",message:"A generated contract placeholder from config.load conflicts with a placeholder you've set manually in config have the same name.",level:Pe.warn}):ye(r,t);const i=`system.contracts.${e}`,o=await be(i);o&&o!==t?Ie({title:"Contract Placeholder Conflict Detected",message:"A generated contract placeholder from config.load conflicts with a placeholder you've set manually in config have the same name.",level:Pe.warn}):ye(i,t)}}function Te(e){return null!=e&&"object"==typeof e&&Object.keys(e).map((t=>ye(t,e[t]))),{put:ye,get:be,all:me,first:ge,update:ve,delete:we,where:Ae,subscribe:Ee,overload:xe,load:ke}}W(pe,ie),Te.put=ye,Te.get=be,Te.all=me,Te.first=ge,Te.update=ve,Te.delete=we,Te.where=Ae,Te.subscribe=Ee,Te.overload=xe,Te.load=ke;const Se=e=>e;function xe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return new Promise((async(r,n)=>{const i=await me();try{Te(e);var o=await t(await me());await _e(i),r(o)}catch(e){await _e(i),n(e)}}))}const Pe=Object.freeze({debug:5,info:4,log:3,warn:2,error:1}),Ie=async e=>{let{title:t,message:r,level:n,always:i=!1}=e;const o=await Te.get("logger.level",Pe.warn);if(!i&&o{let{title:t,message:r}=e;return[`\n %c${t}\n ============================\n\n ${r}\n\n ============================\n `.replace(/\n[^\S\r\n]+/g,"\n").trim(),,"font-weight:bold;font-family:monospace;"]})({title:t,message:r});switch(n){case Pe.debug:console.debug(...f);break;case Pe.info:console.info(...f);break;case Pe.warn:console.warn(...f);break;case Pe.error:console.error(...f);break;default:console.log(...f)}};Ie.deprecate=e=>{let{pkg:t,subject:r,transition:n,level:i=Pe.warn,message:o="",callback:f=null}=e;const a=()=>{return Ie({title:(t?t+" ":"")+"Deprecation Notice",message:`\n ${r?`${e=r,e.charAt(0).toUpperCase()+e.slice(1)} is deprecated and will cease to work in future releases${t?" of "+t:""}.`:""}${o?"\n"+o:""}${n?`\nYou can learn more (including a guide on common transition paths) here: ${n}`:""}\n `.trim(),level:i});var e};return"function"==typeof f?async function(){return await a(),await f(...arguments)}:a()};const Me=(e,t,r)=>({label:e,asArgument:t,asInjection:r}),Ce=e=>"object"==typeof e,Oe=e=>null==e,Be=e=>"number"==typeof e,Re=e=>Number.isInteger(e),De=e=>"string"==typeof e,Ne=e=>{throw new Error("Type Error: "+e)},Ue=e=>{Ie.deprecate({pkg:"@onflow/types",subject:`Passing in Number as value for ${e}`,message:`Going forward, use String as value for ${e}.`,transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/types/WARNINGS.md#0002-[U]Int*-and-Word*-as-Number"})},Le=(Me("Identity",(e=>e),(e=>e)),Me("UInt",(e=>Be(e)&&Re(e)?(Ue("UInt"),{type:"UInt",value:e.toString()}):De(e)?{type:"UInt",value:e}:void Ne("Expected Positive Integer for type Unsigned Int")),(e=>e)),Me("Int",(e=>Be(e)&&Re(e)?(Ue("Int"),{type:"Int",value:e.toString()}):De(e)?{type:"Int",value:e}:void Ne("Expected Integer for type Int")),(e=>e)),Me("UInt8",(e=>Be(e)&&Re(e)?(Ue("UInt8"),{type:"UInt8",value:e.toString()}):De(e)?{type:"UInt8",value:e}:void Ne("Expected integer for UInt8")),(e=>e)),Me("Int8",(e=>Be(e)&&Re(e)?(Ue("Int8"),{type:"Int8",value:e.toString()}):De(e)?{type:"Int8",value:e}:void Ne("Expected positive integer for Int8")),(e=>e)),Me("UInt16",(e=>Be(e)&&Re(e)?(Ue("UInt16"),{type:"UInt16",value:e.toString()}):De(e)?{type:"UInt16",value:e}:void Ne("Expected integer for UInt16")),(e=>e)),Me("Int16",(e=>Be(e)&&Re(e)?(Ue("Int16"),{type:"Int16",value:e.toString()}):De(e)?{type:"Int16",value:e}:void Ne("Expected positive integer for Int16")),(e=>e)),Me("UInt32",(e=>Be(e)&&Re(e)?(Ue("UInt32"),{type:"UInt32",value:e.toString()}):De(e)?{type:"UInt32",value:e}:void Ne("Expected integer for UInt32")),(e=>e)),Me("Int32",(e=>Be(e)&&Re(e)?(Ue("Int32"),{type:"Int32",value:e.toString()}):De(e)?{type:"Int32",value:e}:void Ne("Expected positive integer for Int32")),(e=>e)),Me("UInt64",(e=>Be(e)&&Re(e)?(Ue("UInt64"),{type:"UInt64",value:e.toString()}):De(e)?{type:"UInt64",value:e}:void Ne("Expected integer for UInt64")),(e=>e)),Me("Int64",(e=>Be(e)&&Re(e)?(Ue("Int64"),{type:"Int64",value:e.toString()}):De(e)?{type:"Int64",value:e}:void Ne("Expected positive integer for Int64")),(e=>e)),Me("UInt128",(e=>Be(e)&&Re(e)?(Ue("UInt128"),{type:"UInt128",value:e.toString()}):De(e)?{type:"UInt128",value:e}:void Ne("Expected integer for UInt128")),(e=>e)),Me("Int128",(e=>Be(e)&&Re(e)?(Ue("Int128"),{type:"Int128",value:e.toString()}):De(e)?{type:"Int128",value:e}:void Ne("Expected positive integer for Int128")),(e=>e)),Me("UInt256",(e=>Be(e)&&Re(e)?(Ue("UInt256"),{type:"UInt256",value:e.toString()}):De(e)?{type:"UInt256",value:e}:void Ne("Expected integer for UInt256")),(e=>e)),Me("Int256",(e=>Be(e)&&Re(e)?(Ue("Int256"),{type:"Int256",value:e.toString()}):De(e)?{type:"Int256",value:e}:void Ne("Expected integer for Int256")),(e=>e)),Me("Word8",(e=>Be(e)&&Re(e)?(Ue("Word8"),{type:"Word8",value:e.toString()}):De(e)?{type:"Word8",value:e}:void Ne("Expected positive number for Word8")),(e=>e)),Me("Word16",(e=>Be(e)&&Re(e)?(Ue("Word16"),{type:"Word16",value:e.toString()}):De(e)?{type:"Word16",value:e}:void Ne("Expected positive number for Word16")),(e=>e)),Me("Word32",(e=>Be(e)&&Re(e)?(Ue("Word32"),{type:"Word32",value:e.toString()}):De(e)?{type:"Word32",value:e}:void Ne("Expected positive number for Word32")),(e=>e)),Me("Word64",(e=>Be(e)&&Re(e)?(Ue("Word64"),{type:"Word64",value:e.toString()}):De(e)?{type:"Word64",value:e}:void Ne("Expected positive number for Word64")),(e=>e)),()=>{Ie.deprecate({subject:"Passing in Numbers as values for Fix64 and UFix64 types",pkg:"@onflow/types",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/types/WARNINGS.md#0001-[U]Fix64-as-Number"})}),Fe=(Me("UFix64",(e=>{if(De(e)){const t=e.split(".");return 2!==t.length&&Ne(`Expected one decimal but found ${t.length} in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),(0==t[1].length||t[1].length>8)&&Ne(`Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ${t[1].length} digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),t[1]=t[1].padEnd(8,"0"),{type:"UFix64",value:e=t.join(".")}}if(Be(e))return Le(),{type:"UFix64",value:e.toString()};Ne("Expected String for UFix64")}),(e=>e)),Me("Fix64",(e=>{if(De(e)){const t=e.split(".");return 2!==t.length&&Ne(`Expected one decimal but found ${t.length} in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),(0==t[1].length||t[1].length>8)&&Ne(`Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ${t[1].length} digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers`),t[1]=t[1].padEnd(8,"0"),{type:"Fix64",value:e=t.join(".")}}if(Be(e))return Le(),{type:"Fix64",value:e.toString()};Ne("Expected String for Fix64")}),(e=>e)),Me("String",(e=>{if(De(e))return{type:"String",value:e};Ne("Expected String for type String")}),(e=>e))),je=(Me("Character",(e=>{if(De(e))return{type:"Character",value:e};Ne("Expected Character for type Character")}),(e=>e)),Me("Bool",(e=>{if("boolean"==typeof e)return{type:"Bool",value:e};Ne("Expected Boolean for type Bool")}),(e=>e)),Me("Address",(e=>{if(De(e))return{type:"Address",value:e};Ne("Expected Address for type Address")}),(e=>e)));Me("Void",(e=>{if(!e||Oe(e))return{type:"Void"};Ne("Expected Void for type Void")}),(e=>e)),Me("Reference",(e=>{if(Ce(e))return{type:"Reference",value:e};Ne("Expected Object for type Reference")}),(e=>e)),Me("Path",(e=>{if(Ce(e))return De(e.domain)||Ne(`Expected a string for the Path domain but found ${e.domain}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`),"storage"!==e.domain&&"private"!==e.domain&&"public"!==e.domain&&Ne(`Expected either "storage", "private" or "public" as the Path domain but found ${e.domain}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`),De(e.identifier)||Ne(`Expected a string for the Path identifier but found ${e.identifier}. Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path`),{type:"Path",value:{domain:e.domain,identifier:e.identifier}};Ne("Expected Object for type Path")}),(e=>e));var ze,Ve,He=r(97688),Ke=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},Ge=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},qe=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1] 0 {\n let accountKey = account.keys.get(keyIndex: Int(keyNumber - 1)) ?? panic("This keyIndex does not exist in this account")\n let key = accountKey.publicKey\n if key.verify(\n signature: sig, \n signedData: msg, \n domainSeparationTag: "FLOW-V0.0-user", \n hashAlgorithm: HashAlgorithm.SHA3_256\n ) {\n res = true\n break\n }\n keyNumber = keyNumber - 1\n }\n return res\n }\n '],['\n pub fun main(address: Address, sig: String, msg: String): Bool {\n let account = getAccount(address)\n let sig = sig.decodeHex()\n let msg = msg.decodeHex()\n let isValid = false\n var keyNumber = account.keys.count\n var res: Bool = false\n while keyNumber > 0 {\n let accountKey = account.keys.get(keyIndex: Int(keyNumber - 1)) ?? panic("This keyIndex does not exist in this account")\n let key = accountKey.publicKey\n if key.verify(\n signature: sig, \n signedData: msg, \n domainSeparationTag: "FLOW-V0.0-user", \n hashAlgorithm: HashAlgorithm.SHA3_256\n ) {\n res = true\n break\n }\n keyNumber = keyNumber - 1\n }\n return res\n }\n ']))),n.args([n.arg(e.address,je),n.arg(e.signature,Fe),n.arg((0,o.XI)(e.messageToSign),Fe)])]).then(n.decode)];case 6:return a.sent()?[2,!0]:[3,8];case 7:return a.sent(),console.log("Flow address recover error"),[3,8];case 8:return[2,!1];case 9:if(e.blockchain&&"evm"!==e.blockchain)throw new Error('Blockchain "'.concat(e.blockchain,'" not supported'));if(i=O.r(e.messageToSign),f=B.arrayify(i),R.recoverAddress(f,e.signature).toLowerCase()===e.address.toLowerCase())return[2,!0];a.label=10;case 10:return[2,!1]}}))}))},e.validateChallenge=function(e,t){return Ge(this,void 0,void 0,(function(){return qe(this,(function(r){switch(r.label){case 0:return[4,fetch(e,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(t)})];case 1:return[4,r.sent().json()];case 2:return[2,r.sent().address]}}))}))},e.DEFAULT_ENDPOINT="https://api.smarttokenlabs.com/un",e.COMMON_API_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9qZWN0IjoidG9rZW4tbmVnb3RpYXRvciIsImlhdCI6MTY4OTc1NzQ4Nn0.ELE1OVvVFY1yrWlbnxtQur6dgeVxmKlPb9LZ_8cMOs8",e}(),Qe=(Ve=function(e,t){return Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Ve(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ve(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Je=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},Ye=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};"undefined"!=typeof window&&(window.tn={VERSION:"3.1.0"});var Et,_t,kt,Tt="This browser is not supported. Please try using Chrome, Edge, FireFox or Safari.",St={type:"active",issuers:[],uiOptions:{uiType:"popup",containerElement:".overlay-tn",openingHeading:"Open a new world of perks, benefits and opportunities with your attestation, collectible or token.",issuerHeading:"Detected tokens",autoPopup:!0,position:"bottom-right",alwaysShowStartScreen:!1},autoLoadTokens:!0,autoEnableTokens:!0,messagingForceTab:!1,tokenPersistenceTTL:600,unSupportedUserAgent:{authentication:{config:{},errorMessage:Tt},full:{config:{iE:!0,iE9:!0},errorMessage:Tt}}};!function(e){e[e.ISSUERS_LOADING=0]="ISSUERS_LOADING",e[e.ISSUERS_LOADED=1]="ISSUERS_LOADED",e[e.WALLET_DISCONNECTED=2]="WALLET_DISCONNECTED"}(Et||(Et={})),function(e){e.POPUP_BLOCKED="POPUP_BLOCKED",e.USER_ABORT="USER_ABORT",e.ISSUER_UNAVAILABLE="ISSUER_UNAVAILABLE"}(_t||(_t={})),function(e){e.POPUP_BLOCKED="Please add an exception to your popup blocker before continuing.",e.USER_ABORT="The user aborted the process.",e.ISSUER_UNAVAILABLE="The issuer is unavailable."}(kt||(kt={}));var xt=function(){function e(e){var t,r;if(this.clientCallBackEvents={},this.uiUpdateCallbacks=((t={})[Et.ISSUERS_LOADING]=void 0,t[Et.ISSUERS_LOADED]=void 0,t[Et.WALLET_DISCONNECTED]=void 0,t),this.cancelAutoload=!0,window.location.hash){this.urlParams=new URLSearchParams(window.location.hash.substring(1));var i=this.getDataFromQuery("action");(0,o.kg)(2,'Client() fired. Action = "'.concat(i,'"')),this.removeCallbackParamsFromUrl()}else this.urlParams=new URLSearchParams;this.config=this.mergeConfig(St,e),this.tokenStore=new f.W(this.config.autoEnableTokens,this.config.tokenPersistenceTTL),(null===(r=this.config.issuers)||void 0===r?void 0:r.length)>0&&this.tokenStore.updateIssuers(this.config.issuers),this.messaging=new n.sT}return e.prototype.handleRecievedRedirectMessages=function(){var e=this,t=this.getDataFromQuery("issuer"),r=this.getDataFromQuery("error"),n=this.getDataFromQuery("type");if("USER_ABORT"===r&&"offchain-issuer-connection"===n){var i=new Error(r);return i.name="USER_ABORT",(0,o.Po)("issuer denied connection with off chain issuer","error",(function(){return e.eventSender("error",{issuer:t,error:i})}),null,!0,!1),i}return null},e.prototype.getDataFromQuery=function(e){return this.urlParams?this.urlParams.get(gt.ss+e):null},e.prototype.readProofCallback=function(){return vt(this,void 0,void 0,(function(){var e,t;return wt(this,(function(r){return this.getDataFromQuery?(e=this.getDataFromQuery("action"),t=this.getDataFromQuery("multi-token"),"proof-callback"!==e?[2,!1]:("true"!==t?this.readProofCallbackLegacy():this.readProofCallbackMultiToken(),[2])):[2,!1]}))}))},e.prototype.readProofCallbackMultiToken=function(){return vt(this,void 0,void 0,(function(){var e,t,r,n,i,o,f,a,s,c,l,u,d;return wt(this,(function(h){switch(h.label){case 0:for(i in e=JSON.parse(this.getDataFromQuery("tokens")),t=this.getDataFromQuery("error"),n=[],r=e)n.push(i);o=0,h.label=1;case 1:if(!(o0},e.prototype.getWalletProvider=function(){return vt(this,void 0,void 0,(function(){var e;return wt(this,(function(t){switch(t.label){case 0:return this.web3WalletProvider?[3,2]:[4,Promise.resolve().then(r.bind(r,45993))];case 1:e=t.sent().Web3WalletProvider,this.web3WalletProvider=new e(this,this.config.walletOptions,this.config.safeConnectOptions),t.label=2;case 2:return[2,this.web3WalletProvider]}}))}))},e.prototype.disconnectWallet=function(){return vt(this,void 0,void 0,(function(){var e;return wt(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),[4,this.getWalletProvider()];case 1:return[4,t.sent().deleteConnections()];case 2:return t.sent(),this.tokenStore.clearCachedTokens(),this.eventSender("connected-wallet",null),this.eventSender("disconnected-wallet",null),this.triggerUiUpdateCallback(Et.WALLET_DISCONNECTED),[3,4];case 3:return e=t.sent(),(0,o.kg)(2,"Failed to disconnect wallet",e),[3,4];case 4:return[2]}}))}))},e.prototype.negotiatorConnectToWallet=function(e){return vt(this,void 0,void 0,(function(){return wt(this,(function(t){switch(t.label){case 0:return[4,this.getWalletProvider()];case 1:return[4,t.sent().connectWith(e)];case 2:return[2,t.sent()]}}))}))},e.prototype.enrichTokenLookupDataOnChainTokens=function(){return vt(this,void 0,void 0,(function(){var e,t,r,n,i,f,a,s,c;return wt(this,(function(l){switch(l.label){case 0:if(!this.getTokenStore().hasOnChainTokens())return this.issuersLoaded=!0,[2];for(n in this.issuersLoaded=!1,this.triggerUiUpdateCallback(Et.ISSUERS_LOADING),e=this.tokenStore.getCurrentIssuers(!0),r=[],t=e)r.push(n);i=0,l.label=1;case 1:if(!(if.config.autoLoadTokens?[2,"break"]:[2]}}))},f=this,a=this.tokenStore.getCurrentIssuers(),s=[],a)s.push(c);l=0,h.label=1;case 1:return l1)throw new Error("Only a single token origin is supported by batch authentication at this time.");return[2,t]}}))}))},e.prototype.authenticateMultiple=function(e){return vt(this,void 0,void 0,(function(){var t,r,n,i,f,a,s,c,l,u,d,h,p;return wt(this,(function(y){switch(y.label){case 0:return y.trys.push([0,8,,9]),t=!1,this.ui&&this.ui.showLoaderDelayed(["

    Authenticating...

    ","You may need to sign a new challenge in your wallet",""],600,!0),[4,this.getMultiRequestBatch(e)];case 1:for(a in r=y.sent(),n={},i=r.offChain,f=[],i)f.push(a);s=0,y.label=2;case 2:if(!(sAuthenticating...","You may need to sign a new challenge in your wallet",""],600,!0),this.enableAuthCancel(n)),f=e.type?e.type:i.onChain?Ze:at,a=new f(this),u.label=2;case 2:return u.trys.push([2,4,,5]),e.options||(e.options={}),e.options.messagingForceTab=this.config.messagingForceTab,(0,o.kg)(2,"authRequest",e),(0,o.kg)(2,"get proof at ",window.location.href),[4,a.getTokenProof(i,[e.unsignedToken],e)];case 3:return(s=u.sent())?((0,o.kg)(2,"proof received at ",window.location.href),(0,o.kg)(2,"Ticket proof successfully validated."),this.eventSender("token-proof",{data:s.data,error:null,issuer:n}),[3,5]):[2];case 4:return c=u.sent(),(0,o.kg)(2,c),"WALLET_REQUIRED"===c.message?[2,this.handleWalletRequired(e)]:((0,o.Po)(c,"error",(function(){return l.handleProofError(c,n)}),null,!1,!0),[3,5]);case 5:return this.ui&&(this.ui.dismissLoader(),this.ui.closeOverlay()),[2,s.data]}}))}))},e.prototype.enableAuthCancel=function(e){var t=this;(0,o.xI)(".cancel-auth-btn").then((function(r){r.onclick=function(){var r="User cancelled authentication";t.ui.showError(r),t.eventSender("token-proof",{issuer:e,error:r,data:null})}})).catch((function(e){(0,o.kg)(2,e)}))},e.prototype.handleWalletRequired=function(e){return vt(this,void 0,void 0,(function(){var t=this;return wt(this,(function(r){switch(r.label){case 0:return this.ui?(this.ui.dismissLoader(),this.ui.openOverlay(),[3,4]):[3,1];case 1:return[4,this.getWalletProvider()];case 2:return[4,r.sent().connectWith("MetaMask")];case 3:return r.sent(),[2,this.authenticate(e)];case 4:return[2,new Promise((function(r,n){var i={viewTransition:"slide-in-right"};t.ui.updateUI("wallet",{viewName:"wallet",connectCallback:function(){return vt(t,void 0,void 0,(function(){var t,o;return wt(this,(function(f){switch(f.label){case 0:this.ui.updateUI("main",{viewName:"main"},i),f.label=1;case 1:return f.trys.push([1,3,,4]),[4,this.authenticate(e)];case 2:return t=f.sent(),r(t),[3,4];case 3:return o=f.sent(),n(o),[3,4];case 4:return[2]}}))}))}},i)}))]}}))}))},e.prototype.handleProofError=function(e,t){this.ui&&this.ui.showError(e),this.eventSender("token-proof",{issuer:t,error:e,data:null})},e.prototype.eventSender=function(e,t){return vt(this,void 0,void 0,(function(){return wt(this,(function(r){switch(r.label){case 0:return[4,Promise.resolve(this.on(e,void 0,t))];case 1:return r.sent(),[2]}}))}))},e.prototype.getOutletConfigForCurrentOrigin=function(e){void 0===e&&(e=window.location.origin);var t=this.tokenStore.getCurrentIssuers(!1),r=[];return Object.keys(t).forEach((function(n){var i=t[n];try{new URL(i.tokenOrigin).origin===e&&r.push(i)}catch(e){(0,o.kg)(2,e)}})),!!r.length&&r[0]},e.prototype.addTokenViaMagicLink=function(e){return vt(this,void 0,void 0,(function(){var t,r,i,f,a,s;return wt(this,(function(c){switch(c.label){case 0:t=new URL(e),r=t.hash.length>1?t.hash.substring(1):t.search.substring(1),i=(0,y.He)(this.config.offChainRedirectMode),f=(0,o.pp)(Object.values(this.tokenStore.getCurrentIssuers(!1))),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.messaging.sendMessage({action:n.gF.MAGIC_URL,origin:t.origin+t.pathname,data:{request:f,urlParams:r}},this.config.messagingForceTab,void 0,!!i&&window.location.href)];case 2:return(a=c.sent())?a.evt===n.AJ.ISSUER_TOKENS?(this.getOutletConfigForCurrentOrigin(t.origin)&&this.storeOutletTokenResponse(a.data.tokens),this.eventSender("tokens-selected",{selectedTokens:this.tokenStore.getSelectedTokens()}),[2,a.data.tokens]):[3,4]:[2,new Promise((function(e){}))];case 3:return s=c.sent(),(0,o.Po)(s.message,"error",null,!1,!0),[3,4];case 4:return[2]}}))}))},e.prototype.on=function(e,t,r){if((0,o.Sg)(e,"Event type is not defined"),"tokens-selected"===e&&t&&this.readTokensFromUrl(),"token-proof"===e&&t){(0,o.kg)(2,"token-proof listener atteched. check URL HASH for proof callbacks.");var n=this.getDataFromQuery("action");"proof-callback"===n?this.readProofCallback():"email-callback"===n&&this.processAttestationIdCallback()}if(t)this.clientCallBackEvents[e]=t;else if(this.clientCallBackEvents[e])return this.clientCallBackEvents[e].call(e,r)},e.prototype.processAttestationIdCallback=function(){var e;return vt(this,void 0,void 0,(function(){var t,r,i,f,a,s,c,l,u,d;return wt(this,(function(h){switch(h.label){case 0:switch(h.trys.push([0,9,,10]),(new mt.p).captureAttestationIdCallback(this.urlParams),t=this.getDataFromQuery("orig-action"),r=new $e.c({issuers:Object.values(this.tokenStore.getCurrentIssuers(!1)),ethRpcMap:this.config.ethRpcMap,skipEasRevokeCheck:this.config.skipEasRevokeCheck}),t){case n.gF.GET_PROOF:return[3,1];case n.gF.GET_MUTLI_PROOF:return[3,4]}return[3,7];case 1:return i=this.getDataFromQuery("issuer"),f=this.getDataFromQuery("token"),a=JSON.parse(f),s=this.tokenStore.getCurrentIssuers(!1)[i],c=(0,o.s1)(s),[4,r.authenticate(s,c,a)];case 2:return u=h.sent(),[4,at.validateProof(s,u.proof,u.type)];case 3:return h.sent(),this.eventSender("token-proof",{issuer:i,proof:u}),[3,8];case 4:return l=null!==(e=JSON.parse(this.getDataFromQuery("tokens")))&&void 0!==e?e:{},[4,r.authenticateMany(l)];case 5:return u=h.sent(),[4,dt.validateProofResult(u,this.getTokenStore().getCurrentIssuers(!1))];case 6:return h.sent(),this.eventSender("token-proof",{issuers:u}),[3,8];case 7:throw new Error("Original action not defined in attestation.id callback");case 8:return[3,10];case 9:return d=h.sent(),console.error(d),this.emitRedirectProofEvent(null,null,d.message),[3,10];case 10:return window.location.hash=(0,o.rT)(this.urlParams,["attestation","requestSecret","address","email","wallet"]).toString(),[2]}}))}))},e.prototype.switchTheme=function(e){this.ui.switchTheme(e)},e}()},75241:(e,t,r)=>{"use strict";var n;r.d(t,{U:()=>n,v:()=>i}),function(e){e.EVM="evm",e.SOLANA="solana",e.FLOW="flow",e.ULTRA="ultra"}(n||(n={}));var i=["evm","flow","solana","ultra"]},43803:(e,t,r)=>{"use strict";r.d(t,{AJ:()=>i,gF:()=>n,sT:()=>c});var n,i,o=r(35908),f=r(5904),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},s=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";r.d(t,{W:()=>f});var n=r(39896),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},f=function(){function e(e,t){this.autoEnableTokens=e,this.tokenPersistenceTTL=t,this.currentIssuers={},this.tokenData={},this.tokenLookup={},this.selectedTokens={},this.tokenPersistenceTTL>0&&this.loadTokenStore()}return e.prototype.clearTokenStore=function(){localStorage.removeItem(e.LOCAL_STORAGE_KEY)},e.prototype.loadTokenStore=function(){var t=JSON.parse(localStorage.getItem(e.LOCAL_STORAGE_KEY));if(t){for(var r in t.tokenLookup){var n=t.tokenLookup[r];n.timestamp+1e3*this.tokenPersistenceTTL>Date.now()&&(this.tokenLookup[r]=n)}for(var r in t.tokenData){var i=t.tokenData[r];i.timestamp+1e3*this.tokenPersistenceTTL>Date.now()&&(this.tokenData[r]=i)}this.saveTokenStore()}},e.prototype.saveTokenStore=function(){this.tokenPersistenceTTL>0&&localStorage.setItem(e.LOCAL_STORAGE_KEY,JSON.stringify({tokenLookup:this.tokenLookup,tokenData:this.tokenData}))},e.prototype.updateIssuers=function(e){Object.keys(this.currentIssuers).length>0&&(this.selectedTokens={}),this.prePopulateTokenLookupStore(e)},e.prototype.clearCachedTokens=function(e,t){var r;for(var n in this.tokenData)void 0!==e&&e!==this.tokenLookup[n].onChain||(t&&(null===(r=this.tokenData[n].tokens)||void 0===r?void 0:r.length)>0?(this.tokenData[n].tokens=this.tokenData[n].tokens.filter((function(e){return e.walletAddress!==t})),0===this.tokenData[n].tokens.length&&(delete this.tokenData[n],delete this.selectedTokens[n])):(delete this.tokenData[n],delete this.selectedTokens[n]));this.saveTokenStore()},e.prototype.hasOnChainTokens=function(){for(var e in this.currentIssuers)if(this.currentIssuers[e])return!0;return!1},e.prototype.getCurrentIssuers=function(e){var t={};for(var r in this.currentIssuers)void 0!==e&&e!==this.currentIssuers[r]||(t[r]=this.tokenLookup[r]);return t},e.prototype.getIssuerConfig=function(e){return this.tokenLookup[e]},e.prototype.getCurrentBlockchains=function(){var e=[],t=this.getCurrentIssuers(!0);for(var r in t){var n=t[r];-1===e.indexOf(n.blockchain)&&e.push(n.blockchain)}return e},e.prototype.getCurrentTokens=function(e){var t,r,n={};for(var i in this.currentIssuers)void 0!==e&&e!==this.currentIssuers[i]||(n[i]=null!==(r=null===(t=this.tokenData[i])||void 0===t?void 0:t.tokens)&&void 0!==r?r:[]);return n},e.prototype.getTotalTokenCount=function(e){var t=this.getCurrentTokens(e);return Object.keys(t).reduce((function(e,r){return e+t[r].length}),0)},e.prototype.hasUnloadedIssuers=function(){var e=this.getCurrentIssuers(!0);for(var t in e)if(!e[t].title)return!0;return!1},e.prototype.hasUnloadedTokens=function(){var e,t;try{for(var r=o(Object.values(this.getCurrentTokens())),n=r.next();!n.done;n=r.next()){if(0===n.value.length)return!0}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return!1},e.prototype.getIssuerTokens=function(e){var t;return this.tokenData[e]?null!==(t=this.tokenData[e].tokens)&&void 0!==t?t:[]:null},e.prototype.setTokens=function(e,t){this.tokenData[e]={timestamp:Date.now(),tokens:t},this.saveTokenStore(),this.autoEnableTokens&&(this.selectedTokens[e]={tokens:t})},e.prototype.getSelectedTokens=function(){return this.selectedTokens},e.prototype.setSelectedTokens=function(e){this.selectedTokens=e},e.prototype.prePopulateTokenLookupStore=function(e){var t=this,r={};e.forEach((function(e,i){var o;e.collectionID&&(void 0===e.onChain&&(e.onChain=!0),e.collectionID=t.formatCollectionID(e.collectionID),void 0===r[e.collectionID]?("chain"in e&&(e.chain=t.formatCollectionChain(e.chain)),void 0!==t.tokenData[e.collectionID]&&t.autoEnableTokens&&(null===(o=t.tokenData[e.collectionID].tokens)||void 0===o?void 0:o.length)&&(t.selectedTokens[e.collectionID]={tokens:t.tokenData[e.collectionID].tokens}),t.tokenLookup[e.collectionID]||t.updateTokenLookupStore(e.collectionID,e,!1),r[e.collectionID]=e.onChain):(0,n.kg)(1,"duplicate collectionID key ".concat(e.collectionID,", use unique keys per collection.")))})),this.currentIssuers=r},e.prototype.updateTokenLookupStore=function(e,t,r){void 0===r&&(r=!0),this.tokenLookup[e]=i(i(i({},this.tokenLookup[e]),t),{timestamp:Date.now()}),r&&this.saveTokenStore()},e.prototype.formatCollectionChain=function(e){return e.toLowerCase()},e.prototype.formatCollectionID=function(e){var t=e;return(/[A-Z]+/g.test(e)||/\s+/g.test(e))&&(t=e.replace(/\s+/g,"-").toLowerCase(),(0,n.kg)(1,"Token Negotiator: Spaces or capital letters found in collectionID definition ".concat(e,", this has been re-formatted to ").concat(t)),e=t),e},e.LOCAL_STORAGE_KEY="tn-tokenStore",e}()},39345:(e,t,r)=>{"use strict";r.d(t,{$:()=>m});var n,i=r(52335),o=function(){function e(e,t){this.params={},this.viewContainer=e,this.params=t}return e.prototype.render=function(){var e,t=this,r=this.params.src;r&&"undefined"!==r?((e=document.createElement("img")).loading="lazy",e.addEventListener("load",(function(e){t.onLoad(e)})),e.addEventListener("error",(function(e){t.onError(e)})),e.src=r):(e=this.createAvatar(),this.viewContainer.classList.remove("shimmer-tn")),this.viewContainer.appendChild(e)},e.prototype.onLoad=function(e){this.viewContainer.classList.remove("shimmer-tn")},e.prototype.onError=function(e){this.viewContainer.innerHTML="",this.viewContainer.appendChild(this.createAvatar()),this.viewContainer.classList.remove("shimmer-tn")},e.prototype.createAvatar=function(){var e=document.createElement("img");return e.src=this.generateAvatar(this.params.title),e},e.prototype.generateAvatar=function(e){var t=document.createElement("canvas"),r=t.getContext("2d");if(t.width=200,t.height=200,!r)return"";r.fillStyle=this.getRandomBackgroundColor(),r.fillRect(0,0,t.width,t.height),r.font="bold 100px 'Arial', sans-serif",r.fillStyle="#fff",r.textAlign="center",r.textBaseline="middle";for(var n=e.split(" "),i="",o=0;i.length<2&&o=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.loadedCount=0,t.numberToLoad=25,t.autoLoadMore=!0,t}return s(t,e),t.prototype.init=function(){var e=this;this.viewContainer.addEventListener("click",(function(t){t.target.classList.contains("mobileToggle-tn")?e.tokenToggleSelection():t.target.classList.contains("load-more-btn-tn")&&e.loadMoreTokens()}))},t.prototype.render=function(){var e=this;if(this.loadedCount=0,this.viewContainer.innerHTML=this.getTokenListItems(),this.renderIcons(),this.autoLoadMore){var t=this.viewContainer.querySelector(".load-more-tn");t&&(this.interceptObs||(this.interceptObs=new IntersectionObserver((function(t){t[0].isIntersecting&&e.loadMoreTokens()}),{root:this.viewContainer.querySelector(".view-content-tn")})),this.interceptObs.observe(t))}},t.prototype.getTokenListItems=function(){for(var e="",t=Math.min(this.loadedCount+this.numberToLoad,this.params.data.tokens.length),r=this.loadedCount;r\n \n \n "},t.prototype.createTokenMarkup=function(e){var t,r,n=e.tokenIssuerKey,i=e.title,o=e.data,f=e.index,s=e.image,c=e.toggleState,l=e.hideToggle,u=e.balance,d=e.fungible,h=e.decimals,p=e.symbol;if(d){var y=a.parseUnits(u,h).toString();t=y+" "+p,r=(y.length>15?y.substring(0,12)+"... ":y)+" "+p}else t=f,r=f?"#"+(f.length>15?f.substring(0,5)+"..."+f.substring(f.length-5,f.length):f):"";var b=c?"checked":"";return'\n
  • \n
    \n
    \n

    ").concat(i,"

    \n

    \n \t').concat(r,"\n\t\t\t\t

    \n
    ")+(l?"":"
    \n \n \n
    "))+"
  • \n "},t}(i.w),u=r(5904),d=function(e,t,r){var n=e.querySelector(t);n&&(n.innerText=r)},h=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.init=function(){var e=this;this.client.registerUiUpdateCallback(u.kS.ISSUERS_LOADING,(function(){e.issuersLoading()})),this.client.registerUiUpdateCallback(u.kS.ISSUERS_LOADED,(function(){e.ui.dismissLoader(),e.client.cancelTokenAutoload(),e.render()})),this.client.registerUiUpdateCallback(u.kS.WALLET_DISCONNECTED,(function(){e.client.getTokenStore().hasOnChainTokens()?e.ui.updateUI("wallet",{viewName:"wallet"},{viewTransition:"slide-in-left"}):e.ui.updateUI("start",{viewName:"start"},{viewTransition:"slide-in-left"})}))},t.prototype.render=function(){this.renderContent(),this.afterRender()},t.prototype.renderContent=function(){var e=this;if(this.viewContainer.innerHTML='\n
    \n
    \n
    \n
    \n
    \n \t

    '.concat(this.params.options.issuerHeading,'

    \n\t\t\t\t\t\t
    \n\t\t\t\t \t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
    \t\n\t\t\t\t
    \n\t\t\t\t ').concat(this.getCustomContent(),'\n
    \n\t\t\t\t\n
    \n \n
    \n '),this.viewContainer.querySelector(".back-to-menu-tn").addEventListener("click",this.backToIssuers.bind(this)),this.setupWalletButton(),this.viewContainer.querySelector(".refresh-tn").addEventListener("click",(function(){e.client.eventSender("tokens-refreshed",null),e.autoLoadTokens(!0)})),this.issuerListContainer=this.viewContainer.querySelector(".token-issuer-list-container-tn"),this.tokensContainer=this.viewContainer.getElementsByClassName("token-view-tn")[0],this.issuerListContainer){this.populateIssuers();var t=this.tokensContainer.getElementsByClassName("token-list-container-tn")[0];this.tokenListView=new l(this.client,this.ui,t,p({},this.params))}else(0,f.kg)(2,"Element .token-issuer-list-container-tn not found")},t.prototype.afterRender=function(){this.client.issuersLoaded?this.client.getTokenStore().hasUnloadedTokens()&&this.autoLoadTokens():this.issuersLoading()},t.prototype.getCustomContent=function(){return""},t.prototype.setupWalletButton=function(){return y(this,void 0,void 0,(function(){var e,t=this;return b(this,(function(r){return(e=this.viewContainer.querySelector(".dis-wallet-tn")).style.display="block",e.addEventListener("click",(function(){t.client.disconnectWallet()})),[2]}))}))},t.prototype.issuersLoading=function(){this.ui.showLoader("

    Loading contract data...

    ")},t.prototype.populateIssuers=function(){var e,t,r,n=this,i="",f=this.client.getTokenStore().getCurrentIssuers();for(var a in f){var s=f[a],c=null!==(r=this.client.getTokenStore().getIssuerTokens(a))&&void 0!==r?r:[],l=s.title?s.title:s.collectionID.replace(/[-,_]+/g," ");i+=this.issuerConnectMarkup(l,s.image,a,c,s)}this.issuerListContainer.innerHTML=i;try{for(var u=g(this.issuerListContainer.getElementsByClassName("img-container-tn")),d=u.next();!d.done;d=u.next()){var h=d.value,p={src:h.getAttribute("data-image-src"),title:h.getAttribute("data-token-title")};new o(h,p).render()}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}this.issuerListContainer.addEventListener("click",(function(e){if(e.target.classList.contains("connect-btn-tn"))n.connectTokenIssuer(e);else if(e.target.classList.contains("tokens-btn-tn")){var t=e.target.parentNode.dataset.issuer;n.navigateToTokensView(t)}}))},t.prototype.issuerConnectMarkup=function(e,t,r,n,i){var o,f,a,s,c="";return(null==n?void 0:n.length)&&(c=(null==i?void 0:i.fungible)?null!==(o=this.params.options.balanceFoundEvent)&&void 0!==o?o:"Balance found":"".concat(n.length," ").concat(null!==(a=null===(f=this.params.options)||void 0===f?void 0:f.nftsFoundEvent)&&void 0!==a?a:"Token(s) Available")),'\n \n ")},t.prototype.backToIssuers=function(){this.tokensContainer.style.display="none",this.viewContainer.querySelector(".issuer-slider-tn").classList.toggle("open")},t.prototype.autoLoadTokens=function(e){return void 0===e&&(e=!1),y(this,void 0,void 0,(function(){var t=this;return b(this,(function(r){switch(r.label){case 0:return[4,this.client.tokenAutoLoad(this.issuerLoading.bind(this),(function(e,r){var n;(null==r?void 0:r.length)?t.issuerConnected(e,r,!1):d(t.issuerListContainer,'[data-issuer="'.concat(e,'"] .connect-btn-tn'),null!==(n=t.params.options.loadAction)&&void 0!==n?n:"Load")}),e)];case 1:return r.sent(),[2]}}))}))},t.prototype.connectTokenIssuer=function(e){var t,r,n;return y(this,void 0,void 0,(function(){var i,o,a,s;return b(this,(function(c){switch(c.label){case 0:i=e.target.dataset,o=i.issuer,a=[],this.ui.showLoader("

    Loading tokens...

    "),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,this.client.connectTokenIssuer(o)];case 2:return(a=c.sent())?[3,4]:[2];case 3:return s=c.sent(),(0,f.kg)(2,s),this.ui.showError(s),this.client.eventSender("error",{issuer:o,error:s}),d(this.issuerListContainer,'[data-issuer="'.concat(o,'"] .connect-btn-tn'),null!==(t=this.params.options.repeatAction)&&void 0!==t?t:"Try Again"),[2];case 4:return this.ui.dismissLoader(),(null==a?void 0:a.length)?(this.issuerConnected(o,a),[2]):(this.ui.showError("\n\t\t\t".concat(null!==(r=this.params.options.noTokensFoundEvent)&&void 0!==r?r:"No tokens found! ","\n\t\t\t").concat(this.client.getNoTokenMsg(o))),d(this.issuerListContainer,'[data-issuer="'.concat(o,'"] .connect-btn-tn'),null!==(n=this.params.options.repeatAction)&&void 0!==n?n:"Try Again"),[2])}}))}))},t.prototype.issuerLoading=function(e){var t=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .tokens-btn-tn'));t&&(t.style.display="none");var r=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .connect-btn-tn'));r&&(r.innerHTML='
    ',r.style.display="block")},t.prototype.issuerConnected=function(e,t,r){var n,i,o,a=this;void 0===r&&(r=!0);var s=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .connect-btn-tn')),c=this.issuerListContainer.querySelector('[data-issuer="'.concat(e,'"] .tokens-btn-tn'));s&&c||(0,f.kg)(2,"Could not find button handler"),s.style.display="none",s.setAttribute("tabIndex",-1),c.style.display="block";var l=this.client.getTokenStore().getCurrentIssuers();c.innerHTML=t.length&&l[e].fungible?null!==(n=this.params.options.balanceFoundEvent)&&void 0!==n?n:"Balance found":"".concat(t.length," ").concat(null!==(o=null===(i=this.params.options)||void 0===i?void 0:i.nftsFoundEvent)&&void 0!==o?o:"Token(s) Available"),c.setAttribute("aria-label","Navigate to select from ".concat(t.length," of your ").concat(e," tokens")),c.setAttribute("tabIndex",1),r&&setTimeout((function(){a.navigateToTokensView(e)}),250)},t.prototype.navigateToTokensView=function(e){this.updateTokensView(e),this.showTokenView(e)},t.prototype.updateTokensView=function(e){var t,r;this.tokensContainer.style.display="block",this.tokensContainer.scrollTo(0,0);var n=this.client.getTokenStore(),i=n.getCurrentIssuers()[e],o=null!==(t=n.getIssuerTokens(e))&&void 0!==t?t:[];i.title?this.viewContainer.getElementsByClassName("headline-tn token-name")[0].innerHTML=i.title:(this.viewContainer.getElementsByClassName("headline-tn token-name")[0].innerHTML=i.collectionID,console.warn("".concat(i.collectionID," config is missing a title.")));var f=[];null==o||o.map((function(t,r){var o,a,s,c,l,u,d,h=!1;if(null===(o=n.getSelectedTokens()[e])||void 0===o||o.tokens.map((function(e){JSON.stringify(t)===JSON.stringify(e)&&(h=!0)})),!1===i.onChain){var p=i.title,y=i.image,b=null!==(s=null!==(a=t.tokenId)&&void 0!==a?a:t.ticketId)&&void 0!==s?s:r.toString();f.push({data:t,tokenIssuerKey:e,index:b,title:p,image:y,toggleState:h,hideToggle:null==i?void 0:i.hideToggle})}else{b=null!==(c=t.tokenId)&&void 0!==c?c:r.toString();f.push({data:t,tokenIssuerKey:e,index:b,title:t.title,image:null!==(l=t.image)&&void 0!==l?l:i.image,fungible:i.fungible,decimals:null!==(u=t.decimals)&&void 0!==u?u:i.decimals,symbol:null!==(d=t.symbol)&&void 0!==d?d:i.symbol,balance:t.balance,toggleState:h,hideToggle:null==i?void 0:i.hideToggle})}})),null===(r=this.tokenListView)||void 0===r||r.update({data:{issuer:e,tokens:f}})},t.prototype.showTokenView=function(e){this.viewContainer.querySelector(".issuer-slider-tn").classList.toggle("open")},t}(i.w)},82707:(e,t,r)=>{"use strict";r.d(t,{R:()=>x});var n=r(52335),i=r(39896),o=r(5904),f=r(45993),a=r(94043),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rMetamask logo\n\t',label:"MetaMask"},u=' ',d="Ultra",h={imgSmall:"\n\t\t\n\t",imgBig:'\n\t\t\n\t',label:"ImToken"},p={imgBig:'',label:"AlphaWallet"},y={imgBig:'\n\t\t\n\t',label:"Status Wallet"},b={imgBig:'\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t',label:"Trust Wallet"},g={imgBig:'\n\t\n\t',label:"Embedded Wallet"},m={imgBig:'\t\n\t\t\n\t\t\n\t\t\t\x3c!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch --\x3e\n\t\t\tbuild-icons/Stable Copy 3\n\t\t\tCreated with Sketch.\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t',label:"Brave"},v={imgBig:"\n\t\t\n\t",label:"MEW"};function w(e){switch(e){case f.SupportedWalletProviders.MetaMask:return function(){var e=(0,a.Mz)(),t=g;e.brave&&(t=m);e.anyMetamask&&(t=l);e.mew&&(t=v);e.trust&&(t=b);e.status&&(t=y);e.alphaWallet&&(t=p);e.imToken&&(t=h);return s({name:f.SupportedWalletProviders.MetaMask},t)}();case f.SupportedWalletProviders.WalletConnectV2:return{name:e,label:"WalletConnect V2",imgBig:''};case f.SupportedWalletProviders.AlphaWallet:return{name:f.SupportedWalletProviders.WalletConnectV2,label:"AlphaWallet",imgBig:p.imgBig};case f.SupportedWalletProviders.Torus:return{name:e,label:"Torus",imgBig:'Torus logo'};case f.SupportedWalletProviders.Phantom:return(null===(t=window.solana)||void 0===t?void 0:t.isBraveWallet)?{name:f.SupportedWalletProviders.Phantom_Brave,label:"Phantom (Brave)",imgBig:m.imgBig}:{name:f.SupportedWalletProviders.Phantom,label:"Phantom",imgBig:c};case f.SupportedWalletProviders.Flow:return{name:e,label:"Flow",imgBig:'\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n'};case f.SupportedWalletProviders.SafeConnect:return{name:e,label:"SafeConnect",imgBig:'\n\tSafe connect button\n'};case f.SupportedWalletProviders.Socios:return{name:e,label:"Socios",imgBig:''};case f.SupportedWalletProviders.Ultra:return{name:e,label:d,imgBig:u}}var t}var A,E=r(75241),_=(A=function(e,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},A(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),k=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},T=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return _(t,e),t.prototype.init=function(){this.client.registerUiUpdateCallback(o.kS.WALLET_DISCONNECTED,void 0)},t.prototype.render=function(){var e,t,r=this,n="";if(this.client.hasIssuerForBlockchain(E.U.EVM)){if(this.client.safeConnectAvailable()){var i=w(f.SupportedWalletProviders.SafeConnect);n+=this.getWalletButtonHtml(i)}var o=w(f.SupportedWalletProviders.AlphaWallet);if(n+=this.getWalletButtonHtml(o),void 0!==window.ethereum){var s=w(f.SupportedWalletProviders.MetaMask);n+=this.getWalletButtonHtml(s)}var c=[w(f.SupportedWalletProviders.WalletConnectV2)];(0,a.Mz)().edgeIOS||c.push(w(f.SupportedWalletProviders.Torus));try{for(var l=S(c),u=l.next();!u.done;u=l.next()){var d=u.value;n+=this.getWalletButtonHtml(d)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}}if(this.client.hasIssuerForBlockchain(E.U.EVM,!0)){var h=w(f.SupportedWalletProviders.Socios);n+=this.getWalletButtonHtml(h)}if(this.client.hasIssuerForBlockchain(E.U.SOLANA)){var p=w(f.SupportedWalletProviders.Phantom);n+=this.getWalletButtonHtml(p)}if(this.client.hasIssuerForBlockchain(E.U.FLOW)){var y=w(f.SupportedWalletProviders.Flow);n+=this.getWalletButtonHtml(y)}if(this.client.hasIssuerForBlockchain(E.U.ULTRA)){var b=w(f.SupportedWalletProviders.Ultra);n+=this.getWalletButtonHtml(b)}this.viewContainer.innerHTML='\n
    \n
    \n
    \n
    \n \t'.concat(this.params.viewOptions.backButtonView?'\n \t\t\n \t':"",'\n\t\t\t\t
    \n
    \n

    Select Wallet

    \n
    \n
    \n \t').concat(n,"\n
    \n
    \n
    \n
    \n "),this.viewContainer.querySelectorAll(".wallet-button-tn").forEach((function(e){e.addEventListener("click",r.connectWallet.bind(r))}))},t.prototype.getWalletButtonHtml=function(e){return'\n\t\t\t\n\t\t")},t.prototype.connectWallet=function(e){var t,r,n,o;return k(this,void 0,void 0,(function(){var f,a,s,c=this;return T(this,(function(l){switch(l.label){case 0:f=e.currentTarget.dataset.wallet,a=null!=(a=e.currentTarget.dataset.walletlabel)?a:f,(0,i.kg)(2,"Connect wallet: "+f),this.ui.setForceToOpen(!0),this.ui.showLoaderDelayed(["

    Connecting to "+a+"...

    ","You may need to unlock your wallet to continue."],500),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,this.client.negotiatorConnectToWallet(f)];case 2:return l.sent(),this.ui.dismissLoader(),(null===(r=null===(t=this.params)||void 0===t?void 0:t.data)||void 0===r?void 0:r.connectCallback)?null===(o=null===(n=this.params)||void 0===n?void 0:n.data)||void 0===o||o.connectCallback():(this.client.enrichTokenLookupDataOnChainTokens(),this.ui.updateUI("main",{viewName:"main"},{viewTransition:"slide-in-right"})),this.ui.setForceToOpen(!1),[3,4];case 3:return s=l.sent(),(0,i.kg)(2,"negotiatorConnectToWallet error",e),this.ui.showError(s),setTimeout((function(){console.log("this.ui.setForceToOpen(false)"),c.ui.setForceToOpen(!1)}),0),[3,4];case 4:return[2]}}))}))},t}(n.w)},30838:(e,t,r)=>{"use strict";r.d(t,{z:()=>s});var n,i=r(52335),o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},a=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]\n
    \n
    \n
    \n \n
    ').concat(this.params.options.openingHeading,"
    \n
    \n
    \n \n\t\t")},t.prototype.goToWalletSelection=function(){return f(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.ui.showLoaderDelayed(["Initializing wallet.."],500),e={viewTransition:"slide-in-right"},[4,this.ui.canSkipWalletSelection()];case 1:return t.sent()?(this.client.enrichTokenLookupDataOnChainTokens(),this.ui.updateUI("main",{viewName:"main"},e)):this.ui.updateUI("wallet",{viewName:"main"},e),this.ui.dismissLoader(),[2]}}))}))},t}(i.w)},52335:(e,t,r)=>{"use strict";r.d(t,{w:()=>i});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";r.d(t,{W:()=>n});var n={1:"https://ethereum.publicnode.com",5:"https://eth-goerli.g.alchemy.com/v2/yVhq9zPJorAWsw-F87fEabSUl7cCU6z4",11155111:"https://sepolia.infura.io/v3/9f79b2f9274344af90b8d4e244b580ef",137:"https://polygon-rpc.com/",80001:"https://polygon-mumbai.g.alchemy.com/v2/rVI6pOV4irVsrw20cJxc1fxK_1cSeiY0",56:"https://bsc-dataseed.binance.org/",97:"https://data-seed-prebsc-1-s1.binance.org:8545",43114:"https://api.avax.network/ext/bc/C/rpc",43113:"https://api.avax-test.network/ext/bc/C/rpc",250:"https://rpc.fantom.network/",25:"https://evm-cronos.crypto.org",338:"https://evm-t3.cronos.org",42161:"https://arb1.arbitrum.io/rpc",421613:"https://arb-goerli.g.alchemy.com/v2/nFrflomLgsQQL5NWjGileAVqIGGxZWce",10:"https://mainnet.optimism.io"}},35908:(e,t,r)=>{"use strict";r.d(t,{kt:()=>n,sT:()=>l,ss:()=>c});var n,i=r(39896),o=r(5904),f=r(94043),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},s=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&(l=setTimeout((function(){c||f(new Error("Failed to receive response from window/iframe")),d()}),r))},e.prototype.getModal=function(e){var t=document.getElementById("modal-tn");return t||!e||((t=document.createElement("div")).id="modal-tn",t.className="modal-tn",t.style.display="none",t.innerHTML='\n \n ',document.body.appendChild(t),t.getElementsByClassName("modal-close-tn")[0].addEventListener("click",(function(){e()}))),t},e.prototype.removeModal=function(){var e=this.getModal();e&&(e.style.display="none",e.remove())},e.prototype.constructUrl=function(e,t){var r=new URL(t.origin),n=new URLSearchParams;n.set(c+"evtid",e),n.set(c+"action",t.action);var i="";for(var o in t.data){var f=t.data[o];f&&(f instanceof Array||f instanceof Object?n.set(c+o,JSON.stringify(f)):"urlParams"===o?i+="&".concat(f):n.set(c+o,f))}return r.hash=n.toString(),r.toString()+i},e.prototype.openTab=function(e){return window.open(e,"_blank")},e.prototype.createIframe=function(e){var t=document.createElement("iframe");return t.setAttribute("allow","clipboard-read"),this.getModal(e).getElementsByClassName("modal-body-tn")[0].appendChild(t),t},e.getUniqueEventId=function(){return(new Date).getTime().toString()},e}()},3076:(e,t,r)=>{"use strict";r.d(t,{p:()=>c});var n=r(39896),i=r(94043),o=r(43803),f=r(35908),a=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},s=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]Math.round(Date.now()/1e3))return n;delete this.attestations[r]}return null},e.prototype.saveAttestation=function(e){this.attestations[e.identifierType+"/"+e.identifier]=e,localStorage.setItem(this.LOCAL_STORAGE_KEY,JSON.stringify(this.attestations))},e.prototype.openAttestationApp=function(){var e=this;if(this.attestationInTab&&!this.tryingToGetAttestationInBackground){var t;(0,n.kg)(2,"display new TAB to attest, ask parent to show current iframe"),this.showIframeCallback&&this.showIframeCallback(),(t=document.createElement("div")).classList.add(this.wrapperBase+"_btn"),t.innerHTML="Click to get Email Attestation",t.addEventListener("click",(function(){e.attestationTabHandler=window.open(e.attestationOrigin,"Attestation"),t.remove();var r=e.buttonOverlay.querySelector("."+e.wrapperBase+"_title"),n=e.buttonOverlay.querySelector("."+e.wrapperBase+"_subtitle");r&&(r.innerHTML="Email Attestation verification in progress"),n&&(n.innerHTML="Please complete the verification process to continue"),e.interval=setInterval((function(){e.attestationTabHandler.closed&&(clearInterval(e.interval),e.rejectHandler(new Error("User closed TAB")))}),2e3)}));var r=this.wrapperBase+"_wrap_"+Date.now(),i=document.createElement("style");i.innerHTML="\n\t\t\t\t#".concat(r," {\n\t\t\t\t\twidth:100%;\n\t\t\t\t\theight: 100vh; \n\t\t\t\t\tposition: fixed; \n\t\t\t\t\talign-items: center; \n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\ttop: 0; \n\t\t\t\t\tleft: 0; \n\t\t\t\t\tbackground: #000f;\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t\tpadding: 30px;\n\t\t\t\t\tz-index: 9999;\n\t\t\t\t}\n\t\t\t\t#").concat(r," div:hover {\n\t\t\t\t\tbox-shadow: 0 0px 14px #ffff !important;\n\t\t\t\t}\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_content {\n\t\t\t\t\tcolor: #fff; \n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_title {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_subtitle {\n\t\t\t\t\tfont-size:18px;\n\t\t\t\t\tcolor: #ccc;\n\t\t\t\t}\n\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_btn {\n\t\t\t\t\tmargin: 20px auto 0;\n\t\t\t\t\tpadding: 5px 15px;\n\t\t\t\t\tbackground: #0219fa;\n\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\tfont-size: 20px;\n\t\t\t\t\tline-height: 1.3;\n\t\t\t\t\tborder-radius: 100px;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\n\t\t\t\t@media (max-width: 768px){\n\t\t\t\t\t#").concat(r," {\n\t\t\t\t\t\tpadding: 20px 10px;\n\t\t\t\t\t}\n\t\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_title {\n\t\t\t\t\t\tfont-size: 24px;\n\t\t\t\t\t}\n\t\t\t\t\t#").concat(r," .").concat(this.wrapperBase,"_btn {\n\t\t\t\t\t\tpadding: 10px 15px;\n\t\t\t\t\t\tfont-size: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"),this.buttonOverlay=document.createElement("div"),this.buttonOverlay.id=r,this.buttonOverlay.innerHTML='

    Needs email attestation to complete verification.

    '),this.buttonOverlay.appendChild(t),this.buttonOverlay.appendChild(i),document.body.appendChild(this.buttonOverlay)}else(0,n.kg)(2,"open attestation in iframe"),this.createIframe()},e.prototype.captureAttestationIdCallback=function(e){if(!e.has("attestation")||!e.has("requestSecret"))return console.log("no attestation detected",e.toString()),!1;var t=e.get("email"),r=e.get("attestation"),n="0x"+e.get("requestSecret"),i=this.getAttestationDetails(t,r,n);return this.saveAttestation(i),!0},e.prototype.getAttestationDetails=function(e,t,r){var n=new Date;return n.setDate(n.getDate()+30),{type:"asn",identifierType:"email",identifier:e,identifierSecret:r,attestation:t,expiry:Math.round(n.getTime()/1e3)}},e.prototype.getIdentifierAttestation=function(e,t,r,a){var s=this;return new Promise((function(c,l){var u=s.getExistingAttestation(e);if(u)c(u);else{if(s.rejectHandler=l,s.redirectUrl){var d=new URLSearchParams(window.location.hash.substring(1)),h=new URLSearchParams;h.set("email",e),h.set("address",r),h.set("wallet",t);var p=new URL(s.redirectUrl),y=new URLSearchParams(p.hash.substring(1));if(a)for(var b in a)y.set(f.ss+b,a[b]);y.set(f.ss+"orig-action",a.action),y.set("email",e),y.set(f.ss+"action",o.gF.EMAIL_ATTEST_CALLBACK);var g=d.get(f.ss+"requestor");g&&y.set(f.ss+"requestor",g),p.hash=y.toString(),h.set("email-attestation-callback",p.href);var m="".concat(s.attestationOrigin,"#").concat(h.toString());return(0,n.kg)(2,"authenticate. go to: ",m),void(window.location.href=m)}if(s.attestationInTab&&!(0,i.jP)()&&(s.tryingToGetAttestationInBackground=!0),!s.attestationOrigin)return l(new Error("Attestation origin is null"));window.addEventListener("message",(function(t){var r=new URL(s.attestationOrigin);t.origin===r.origin&&(s.iframe&&s.iframeWrap&&s.iframe.contentWindow||s.attestationTabHandler)&&s.postMessageAttestationListener(t,c,l,e)})),s.openAttestationApp()}}))},e.prototype.createIframe=function(){var e,t=document.createElement("iframe");t.setAttribute("allow","clipboard-read"),this.iframe=t,t.src=null!==(e=this.attestationOrigin)&&void 0!==e?e:"",t.style.width="800px",t.style.height="800px",t.style.maxHeight="100vh",t.style.maxWidth="100%",t.style.background="#fff";var r=document.createElement("div");this.iframeWrap=r,r.setAttribute("style","width:101%;min-height: 100vh; position: fixed; align-items: center; justify-content: center;display: none;top: 0; left: 0; background: #fffa; z-index: 1400"),r.appendChild(t),document.body.appendChild(r)},e.prototype.postMessageAttestationListener=function(e,t,r,i,o,f){var c,l,u,d;return a(this,void 0,void 0,(function(){var a,h,p,y,b;return s(this,(function(s){if((0,n.kg)(2,"postMessageAttestationListener event (auth-handler)",e.data),a=this.attestationTabHandler?this.attestationTabHandler:this.iframe.contentWindow,void 0!==e.data.ready&&!0===e.data.ready)return(h={force:!1}).email=i,o&&(h.wallet=o),f&&(h.address=f),a.postMessage(h,this.attestationOrigin),[2];if(void 0!==e.data.display)if(!0===e.data.display){if(this.iframeWrap){if(this.tryingToGetAttestationInBackground)return this.tryingToGetAttestationInBackground=!1,this.iframe.remove(),this.iframeWrap.remove(),this.openAttestationApp(),[2];this.iframeWrap.style.display="flex",this.showIframeCallback&&this.showIframeCallback()}}else e.data.error&&((0,n.kg)(2,"Error received from the iframe: "+e.data.error),r(new Error(e.data.error)),this.buttonOverlay&&this.buttonOverlay.remove()),this.iframeWrap&&(this.iframeWrap.style.display="none");return(null===(c=e.data)||void 0===c?void 0:c.attestation)&&(null===(l=e.data)||void 0===l?void 0:l.requestSecret)?(this.attestationTabHandler&&this.attestationTabHandler.close(),this.iframeWrap&&this.iframeWrap.remove(),p=null===(u=e.data)||void 0===u?void 0:u.attestation,"bigint"==typeof(y=null===(d=e.data)||void 0===d?void 0:d.requestSecret)&&(y="0x"+y.toString(16)),b=this.getAttestationDetails(i,p,y),this.saveAttestation(b),t(b),this.buttonOverlay&&this.buttonOverlay.remove(),[2]):[2]}))}))},e}()},84570:(e,t,r)=>{"use strict";r.d(t,{s:()=>u});var n=r(67583),i=r(9771),o=r(68810),f=r(39896),a=r(24700),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";r.d(t,{c:()=>u});var n=r(67583),i=r(39896),o=r(3076),f=r(84570),a=r(43803),s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(){function e(e){this.ticketStorage=new n.pu(e)}return e.prototype.readMagicLink=function(e){return s(this,void 0,void 0,(function(){var t;return c(this,(function(r){switch(r.label){case 0:if(!e.has("ticket"))return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.ticketStorage.importTicketFromMagicLink(e)];case 2:return r.sent(),[3,4];case 3:return t=r.sent(),console.error("Failed to import attestation",t),(0,i.kg)(2,t),[3,4];case 4:return[2]}}))}))},e.prototype.getTokens=function(e){return s(this,void 0,void 0,(function(){return c(this,(function(t){return[2,this.ticketStorage.getDecodedTokens(e)]}))}))},e.prototype.authenticate=function(e,t,r,n,i,l){return void 0===l&&(l=!1),s(this,void 0,void 0,(function(){var s,u;return c(this,(function(c){switch(c.label){case 0:return[4,this.ticketStorage.getStoredTicketFromDecodedTokenOrId(t,r)];case 1:return s=c.sent(),[4,new o.p(e.attestationOrigin,void 0,l).getIdentifierAttestation(s.id,i,n,{action:a.gF.GET_PROOF,issuer:e.collectionID,token:JSON.stringify(r)})];case 2:return u=c.sent(),[4,(0,f.s)(e,u.attestation,u.identifierSecret,s)];case 3:return[2,c.sent()]}}))}))},e.prototype.authenticateMany=function(e,t,r,n,i){return void 0===n&&(n=!1),s(this,void 0,void 0,(function(){var s,u,d,h,p,y,b,g,m,v,w,A,E,_,k,T,S;return c(this,(function(c){switch(c.label){case 0:for(h in s={},d=[],u=e)d.push(h);p=0,c.label=1;case 1:if(!(p{"use strict";r.d(t,{Hm:()=>v,IA:()=>w,pu:()=>A});var n=r(6549),i=r(65185),o=r(39896),f=r(58204),a=r(79896),s=r(39980),c=r(42949),l=r(24700),u=r(37982),d=function(){return d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},b=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},g=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{"use strict";r.d(t,{BF:()=>P,BT:()=>v,GL:()=>R,Ov:()=>g,Pb:()=>m,Po:()=>A,Rl:()=>x,Sg:()=>b,XI:()=>S,gT:()=>C,kF:()=>_,kg:()=>y,mt:()=>B,pC:()=>O,pp:()=>I,qj:()=>D,rT:()=>k,s1:()=>M,xI:()=>w,xK:()=>T});var n,i=r(35908),o=r(65185),f=r(56371),a=r(67583),s=r(48764).lW,c=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f},h=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function y(e){for(var t=[],r=1;rparseInt(window.DISPLAY_DEBUG_LEVEL)||t&&console.log.apply(console,h([],d(t),!1))}var b=function(e,t){if(!e)throw new Error(t)},g=function(e){return e=e.split("-").join("+").split("_").join("/").split(".").join("="),Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))},m=function(e){window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("onmessage",e)},v=function(e){window.removeEventListener?window.removeEventListener("message",e):window.detachEvent("onmessage",e)},w=function(e){return new Promise((function(t){if(document.querySelector(e))return t(document.querySelector(e));var r=new MutationObserver((function(){document.querySelector(e)&&(t(document.querySelector(e)),r.disconnect())}));r.observe(document.body,{childList:!0,subtree:!0})}))},A=function(e,t,r,n,i,o){var f,a;if(void 0===i&&(i=!0),void 0===o&&(o=!1),a="object"==typeof e?null!==(f=e.message)&&void 0!==f?f:"Unknown error type: "+JSON.stringify(e):e,i&&y(2,t+": "+a),r&&r(),o)throw new E(a,e);return{type:t,message:e,data:n}},E=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.originalError=r,i.code=n,i}return c(t,e),t}(Error),_=function(e,t){return l(void 0,void 0,void 0,(function(){var r,n;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,fetch(e)];case 1:if(r=i.sent(),!(n=r.status>=200&&r.status<=299)&&!0===t)return console.warn("token api request failed: ",e),[2];if(n)return[2,r.json()];throw new Error("HTTP error! status: ".concat(r.status));case 2:throw i.sent(),new Error("HTTP error.");case 3:return[2]}}))}))},k=function(e,t,r){var n,o,f,a;if(void 0===t&&(t=[]),void 0===r&&(r=i.ss),r)try{for(var s=p(Array.from(e.keys())),c=s.next();!c.done;c=s.next()){var l=c.value;0===l.indexOf(r)&&e.delete(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}try{for(var u=p(t),d=u.next();!d.done;d=u.next()){var h=d.value;e.has(h)&&e.delete(h)}}catch(e){f={error:e}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(f)throw f.error}}return e},T=function(e){for(var t="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r=t.length,n=[0],i=0;i>8,n[a]&=255;for(;s;)n.push(255&s),s>>=8}return new Uint8Array(n.reverse())},S=function(e){return void 0!==s?s.from(e).toString("hex"):Array.from(x(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("")},x=function(e){return(new TextEncoder).encode(e)},P=function(e){if(e.length%2==1)throw new Error("Wrong Hex String");for(var t=new Uint8Array(e.length/2),r=0;rnew Date)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0},R=function(e){var t,r,n=document.cookie.split(";");try{for(var i=p(n),o=i.next();!o.done;o=i.next()){var f=o.value,a=d(f.trim().split("="),2),s=a[0],c=a[1];if(s===e){var l=new Date(c);return new Date>l}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return!0},D=function(e){document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}},94043:(e,t,r)=>{"use strict";r.d(t,{He:()=>s,K6:()=>a,Mz:()=>n,jP:()=>i});var n=function(){var e,t="undefined"!=typeof window&&window.navigator.userAgent.toLowerCase(),r=t&&/msie|trident/.test(t),n=t&&t.indexOf("msie 9.0")>0,i=t&&t.indexOf("edg/")>0,a=t&&t.indexOf("edga/")>0,s=t&&t.indexOf("edgios/")>0,c=t&&t.indexOf("edge/")>0,l=i||a||s||c,u=t&&/chrome\/\d+/.test(t)&&!l,d=t&&/phantomjs/.test(t),h=t&&/firefox|fxios\/\d+/.test(t),p=f()||o(),y=!!window.navigator.brave,b=t&&t.indexOf("android")>0,g=t&&/iphone|ipad|ipod|ios/.test(t),m=t&&/\smac\s/.test(t),v=t&&/windows/.test(t),w=!1,A=window.matchMedia;A&&(w=A("(pointer:coarse)").matches);var E=window.ethereum;void 0===window.ethereum&&(E={isMetaMask:!1,isAlphaWallet:!1,isTrust:!1,isStatusWallet:!1,isGoWallet:!1,isBraveWallet:!1});var _=w&&!!E.isAlphaWallet,k=w&&!!E.isTrust,T=w&&!!E.isStatusWallet,S=w&&!!E.isGoWallet,x=w&&!!E.isTrust&&!!E.isMetaMask,P=!!navigator.userAgent.match(/\simToken\//),I=w&&!!E.isMetaMask&&!k&&!y;return{iE:r,iE9:n,edge:l,edgeAndroid:a,edgeIOS:s,chrome:u,phantomJS:d,fireFox:h,safari:p,android:b,iOS:g,mac:m,windows:v,desktop:-1===(null===(e=navigator.userAgent)||void 0===e?void 0:e.indexOf("Mobi")),touchDevice:w,metaMask:I,anyMetamask:!!E.isMetaMask&&!k&&!E.isBraveWallet,alphaWallet:_,mew:x,trust:k,goWallet:S,status:T,imToken:P,brave:y,braveAndroid:y&&b,braveIOS:y&&g,metaMaskAndroid:b&&I,alphaWalletAndroid:b&&_,mewAndroid:b&&x,imTokenAndroid:b&&P}};function i(){return!!window.navigator.brave}function o(){var e=window.navigator.userAgent?window.navigator.userAgent.toLowerCase():"";return/ip(ad|od|hone)/i.test(e)&&/webkit/i.test(e)&&!/(crios|fxios|opios|mercury)/i.test(e)&&!i()}function f(){return!!window.safari}function a(){var e=n();return e.iOS||f()||o()||i()||e.fireFox}function s(e){switch(e){case"always":default:return!0;case"never":return!1}}},92485:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SafeConnectAction:()=>i,SafeConnectProvider:()=>T});var n,i,o=r(43803),f=r(50284),a=r(40337),s=r(55050),c=r(52410),l=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},u=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]299||i.status<200))return[3,6];o=void 0,f.label=2;case 2:return f.trys.push([2,4,,5]),[4,i.json()];case 3:return o=f.sent().error,[3,5];case 4:return f.sent(),o="HTTP Request error: "+i.statusText,[3,5];case 5:throw new Error(o);case 6:return[4,i.json()];case 7:return[2,f.sent()]}}))}))},e.createAndSignLinkAttestation=function(e,t,r){return l(this,void 0,void 0,(function(){var n;return u(this,(function(i){switch(i.label){case 0:return(n=new c.EthereumKeyLinkingAttestation).create(e,t,4200,void 0,Math.round(Date.now()/1e3)-600),[4,n.sign(r)];case 1:return i.sent(),[2,n.getBase64()]}}))}))},e.HOLDING_KEY_ALGORITHM="RSASSA-PKCS1-v1_5",e.keyStore=new f.KeyStore,e}(),h=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),p=function(){return p=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]{"use strict";r.r(t),r.d(t,{SupportedWalletProviders:()=>n,Web3WalletProvider:()=>h,default:()=>p});var n,i=r(91023),o=r(241),f=r(39896),a=r(75241),s=r(24700),c=function(){return c=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(e){e.MetaMask="MetaMask",e.WalletConnectV2="WalletConnectV2",e.Torus="Torus",e.Phantom="Phantom",e.Phantom_Brave="Phantom_Brave",e.Flow="Flow",e.Ultra="Ultra",e.SafeConnect="SafeConnect",e.AlphaWallet="AlphaWallet",e.Socios="Socios"}(n||(n={}));var h=function(){function e(e,t,r){this.client=e,this.walletOptions=t,this.safeConnectOptions=r,this.connections={}}return e.prototype.saveConnections=function(){var t={};for(var r in this.connections){var n=this.connections[r.toLowerCase()];t[r]={address:n.address,chainId:n.chainId,providerType:n.providerType,blockchain:n.blockchain}}localStorage.setItem(e.LOCAL_STORAGE_KEY,JSON.stringify(t))},e.prototype.emitSavedConnection=function(e){return Object.keys(this.connections).length&&e?(this.client.eventSender("connected-wallet",this.connections[e.toLowerCase()]),this.connections[e.toLowerCase()]):null},e.prototype.emitNetworkChange=function(e){if(e)return this.client.eventSender("network-change",e),e},e.prototype.deleteConnections=function(){return l(this,void 0,void 0,(function(){var t,n,i,o,a,s,c,l;return u(this,(function(u){switch(u.label){case 0:if(this.connections={},!(t=localStorage.getItem(e.LOCAL_STORAGE_KEY)))return[3,7];if(!(n=JSON.parse(t)))return[3,7];for(a in o=[],i=n)o.push(a);s=0,u.label=1;case 1:if(!(s0)return console.log(o[0].signature),[2,o[0].signature];throw new Error("No signature");case 8:throw new Error('Blockchain "'.concat(n.blockchain,'" not supported'));case 9:return[2]}}))}))},e.prototype.getConnectionByAddress=function(e){return this.connections[e.toLowerCase()]},e.prototype.getWalletProvider=function(e){e=e.toLowerCase();var t=this.getConnectionByAddress(e);if(!t)throw new Error("Connection not found for address");if(!t.provider)throw new Error("Wallet provider not found for address");return t.provider},e.prototype.hasAnyConnection=function(e){for(var t in this.connections)if(e.includes(this.connections[t].blockchain))return!0;return!1},e.prototype.getConnectedWalletAddresses=function(e){return this.getConnectedWalletData(e).map((function(e){return e.address}))},e.prototype.getConnectedWalletData=function(e){return Object.values(this.connections).filter((function(t){return t.blockchain===e}))},e.prototype.getSingleSignatureCompatibleConnection=function(){var e=this,t=!1;return a.v.forEach((function(r){var n=Object.values(e.connections).filter((function(e){return e.blockchain===r}));n.length&&(t=n[0])})),t},e.prototype.registerNewWalletAddress=function(e,t,r,n,o,a){var s=this;switch(void 0===a&&(a=[]),this.connections[e.toLowerCase()]={address:e,chainId:t,providerType:r,provider:n,blockchain:o,ethers:i,meta:a},o){case"solana":case"evm":break;case"flow":n.currentUser().subscribe((function(e){(0,f.kg)(2,"=========Flow user subscription: ",e)}));break;case"ultra":n.on("disconnect",(function(){(0,f.kg)(2,"========= Ultra disconnected."),s.client.disconnectWallet()}));break;default:return void(0,f.kg)(2,"Unknown blockchain, dont attach listeners")}},e.prototype.registerNewOauth2WalletAddress=function(e,t,r,n,i){this.connections[e]={address:e,chainId:t,providerType:r,provider:r,blockchain:n,logoutEndPoint:i},this.saveConnections(),this.emitSavedConnection(e)},e.prototype.registerEvmProvider=function(e,t){return l(this,void 0,void 0,(function(){var r,n,i,o=this;return u(this,(function(a){switch(a.label){case 0:return[4,e.listAccounts()];case 1:return r=a.sent(),[4,e.detectNetwork()];case 2:if(n=a.sent().chainId,0===r.length)throw new Error("No accounts found via wallet-connect.");return i=r[0],this.registerNewWalletAddress(i,n,t,e,"evm"),e.provider.on("accountsChanged",(function(r){(0,f.kg)(2,"accountsChanged: ",r),r&&0!==r.length?i!==r[0]&&(delete o.connections[i.toLowerCase()],i=r[0],o.registerNewWalletAddress(i,n,t,e,"evm"),o.saveConnections(),o.emitSavedConnection(i),o.client.getTokenStore().clearCachedTokens(),o.client.enrichTokenLookupDataOnChainTokens()):o.client.disconnectWallet()})),e.provider.on("chainChanged",(function(r){o.registerNewWalletAddress(i,r,t,e,"evm"),o.saveConnections(),o.emitNetworkChange(r)})),e.provider.on("disconnect",(function(e){(null==e?void 0:e.message)&&e.message.indexOf("MetaMask: Disconnected from chain")>-1||o.client.disconnectWallet()})),[2,i]}}))}))},e.prototype.registerSolanaProvider=function(e,t){return l(this,void 0,void 0,(function(){var r,n,i,o=this;return u(this,(function(a){switch(a.label){case 0:return[4,e.connect()];case 1:return r=a.sent(),n=r.publicKey.toBase58(),i=n,this.registerNewWalletAddress(n,"mainnet-beta",t,e,"solana"),e.on("connect",(function(e){var t=e.toBase58();(0,f.kg)(2,"connected wallet: ",t),o.registerNewWalletAddress(t,"mainnet-beta","phantom",window.solana,"solana")})),e.on("disconnect",(function(){(0,f.kg)(2,"disconnected wallet."),o.client.disconnectWallet()})),e.on("accountChanged",(function(e){if(e){delete o.connections[i.toLowerCase()];var t=e.toBase58();i=t,o.registerNewWalletAddress(i,"mainnet-beta","phantom",window.solana,"solana"),o.saveConnections(),o.emitSavedConnection(i),o.client.getTokenStore().clearCachedTokens(),o.client.enrichTokenLookupDataOnChainTokens()}else(0,f.kg)(2,"disconnected wallet."),o.client.disconnectWallet()})),[2,n]}}))}))},e.prototype.MetaMask=function(e){return l(this,void 0,void 0,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return(0,f.kg)(2,"connect MetaMask"),void 0===window.ethereum?[3,2]:[4,window.ethereum.enable()];case 1:return t.sent(),e=new o.Q(window.ethereum,"any"),[2,this.registerEvmProvider(e,"MetaMask")];case 2:throw new Error("MetaMask is not available. Please check the extension is supported and active.")}}))}))},e.prototype.WalletConnectV2=function(e){return l(this,void 0,void 0,(function(){var t,n,i,a,d=this;return u(this,(function(h){switch(h.label){case 0:return(0,f.kg)(2,"connect Wallet Connect V2"),[4,Promise.all([r.e(438),r.e(276)]).then(r.bind(r,68876))];case 1:return[4,(t=h.sent()).getWalletConnectV2ProviderInstance()];case 2:return n=h.sent(),e?[3,4]:[4,r.e(337).then(r.t.bind(r,4337,23))];case 3:i=h.sent().default,h.label=4;case 4:return n.on("display_uri",(function(e){return l(d,void 0,void 0,(function(){var t=this;return u(this,(function(n){switch(n.label){case 0:return[4,r.e(337).then(r.t.bind(r,4337,23))];case 1:return(i=n.sent().default).open(e,(function(){t.client.getUi().showError("User closed modal")})),[2]}}))}))})),n.on("session_delete",(function(e){e.id,e.topic;d.client.disconnectWallet()})),a=this.walletOptions,[2,new Promise((function(r,l){var u,h;if(e&&!n.session)l("Not connected");else{(n.session?n.enable():n.connect({namespaces:{eip155:{methods:["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"],chains:null!==(h=null===(u=null==a?void 0:a.walletConnectV2)||void 0===u?void 0:u.chains)&&void 0!==h?h:t.WC_V2_DEFAULT_CHAINS,events:["chainChanged","accountsChanged"],rpcMap:c(c({},s.W),d.client.config.ethRpcMap)}}})).then((function(){(0,f.kg)(2,"WC2 connected....."),null==i||i.close();var e=new o.Q(n,"any");r(d.registerEvmProvider(e,"WalletConnectV2"))})).catch((function(e){(0,f.kg)(2,"WC2 connect error...",e),null==i||i.close(),l(e)}))}}))]}}))}))},e.prototype.Torus=function(e){return l(this,void 0,void 0,(function(){var e,t;return u(this,(function(n){switch(n.label){case 0:return[4,Promise.all([r.e(278),r.e(125)]).then(r.bind(r,8125))];case 1:return[4,n.sent().getTorusProviderInstance()];case 2:return[4,(e=n.sent()).init()];case 3:return n.sent(),[4,e.login()];case 4:return n.sent(),t=new o.Q(e.provider,"any"),[2,this.registerEvmProvider(t,"Torus")]}}))}))},e.prototype.Socios=function(e){var t;return l(this,void 0,void 0,(function(){var e,r,n,i,o,a,s,c,l,h;return u(this,(function(u){(0,f.kg)(2,"connect Socios");try{for(o=d(this.client.config.issuers),a=o.next();!a.done;a=o.next())if(s=a.value,(c=s).oAuth2options.consumerKey){e=c.oAuth2options.consumerKey,r=c.oAuth2options.endpoints.redirectURI.path,n=c.oAuth2options.partnerTag,i=null===(t=c.oAuth2options.endpoints)||void 0===t?void 0:t.userLogout.path;break}}catch(e){l={error:e}}finally{try{a&&!a.done&&(h=o.return)&&h.call(o)}finally{if(l)throw l.error}}return(0,f.mt)("tn-oauth2-expiry-socios")?(this.registerNewOauth2WalletAddress("socios","socios","Socios","evm",i),this.client.ui.showLoaderDelayed(["

    Connecting to Socios...

    "],600,!0),window.location.href="https://partner.socios.com/oauth2/authorize?response_type=code&client_id=".concat(e,"&redirect_uri=").concat(r,"&partner_tag=").concat(n),[2,new Promise((function(e){return setTimeout(e,1e4)}))]):(this.registerNewOauth2WalletAddress("socios","socios","Socios","evm",i),[2,"socios"])}))}))},e.prototype.Phantom=function(e){return l(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return(0,f.kg)(2,"connect Phantom"),void 0===window.solana?[3,2]:[4,this.registerSolanaProvider(window.solana,"phantom")];case 1:return[2,e.sent()];case 2:throw new Error("Phantom is not available. Please check the extension is supported and active.")}}))}))},e.prototype.SafeConnect=function(e){return l(this,void 0,void 0,(function(){var e,t;return u(this,(function(r){switch(r.label){case 0:return(0,f.kg)(2,"connect SafeConnect"),[4,this.getSafeConnectProvider()];case 1:return[4,(e=r.sent()).initSafeConnect()];case 2:return t=r.sent(),this.registerNewWalletAddress(t,1,"SafeConnect",e,"evm"),[2,t]}}))}))},e.prototype.Flow=function(e){return l(this,void 0,void 0,(function(){var e,t,n;return u(this,(function(i){switch(i.label){case 0:return[4,Promise.all([r.e(817),r.e(83)]).then(r.bind(r,29083))];case 1:return e=i.sent(),[4,(t=e.getFlowProvider()).currentUser.authenticate()];case 2:return i.sent(),[4,t.currentUser.snapshot()];case 3:if(!(n=i.sent()).addr)throw new Error("Failed to connect Flow wallet");return this.registerNewWalletAddress(n.addr,1,"flow",t,"flow"),[2,n.addr]}}))}))},e.prototype.Ultra=function(){var e;return l(this,void 0,void 0,(function(){var t,r;return u(this,(function(n){switch(n.label){case 0:return[4,window.ultra.connect()];case 1:t=n.sent(),r="";try{r=null===(e=t.data)||void 0===e?void 0:e.blockchainid.split("@")[0]}catch(e){throw new Error("Failed to get Ultra wallet address")}if(!r)throw new Error("Failed to get Ultra wallet address");return this.registerNewWalletAddress(r,1,"ultra",window.ultra,"ultra"),[2,r]}}))}))},e.prototype.safeConnectAvailable=function(){return void 0!==this.safeConnectOptions},e.prototype.getSafeConnectProvider=function(){return l(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,Promise.resolve().then(r.bind(r,92485))];case 1:return[2,new(0,e.sent().SafeConnectProvider)(this.client.getUi(),this.safeConnectOptions)]}}))}))},e.LOCAL_STORAGE_KEY="tn-wallet-connections",e}();const p=h},70655:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>A,__asyncGenerator:()=>w,__asyncValues:()=>E,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>x,__classPrivateFieldIn:()=>I,__classPrivateFieldSet:()=>P,__createBinding:()=>d,__decorate:()=>a,__exportStar:()=>h,__extends:()=>i,__generator:()=>u,__importDefault:()=>S,__importStar:()=>T,__makeTemplateObject:()=>_,__metadata:()=>c,__param:()=>s,__read:()=>y,__rest:()=>f,__spread:()=>b,__spreadArray:()=>m,__spreadArrays:()=>g,__values:()=>p});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f}function s(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),f=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)f.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return f}function b(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof v?Promise.resolve(r.value.v).then(s,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function A(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:v(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return k(t,e),t}function S(e){return e&&e.__esModule?e:{default:e}}function x(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function P(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function I(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},50780:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,i){var o,f=0;for(o=0;o>>8)-1}function b(e,t,r,n){return y(e,t,r,n,16)}function g(e,t,r,n){return y(e,t,r,n,32)}function m(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,f=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,b=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=o,E=f,_=a,k=s,T=c,S=l,x=u,P=d,I=h,M=p,C=y,O=b,B=g,R=m,D=v,N=w,U=0;U<20;U+=2)A^=(i=(B^=(i=(I^=(i=(T^=(i=A+B|0)<<7|i>>>25)+A|0)<<9|i>>>23)+T|0)<<13|i>>>19)+I|0)<<18|i>>>14,S^=(i=(E^=(i=(R^=(i=(M^=(i=S+E|0)<<7|i>>>25)+S|0)<<9|i>>>23)+M|0)<<13|i>>>19)+R|0)<<18|i>>>14,C^=(i=(x^=(i=(_^=(i=(D^=(i=C+x|0)<<7|i>>>25)+C|0)<<9|i>>>23)+D|0)<<13|i>>>19)+_|0)<<18|i>>>14,N^=(i=(O^=(i=(P^=(i=(k^=(i=N+O|0)<<7|i>>>25)+N|0)<<9|i>>>23)+k|0)<<13|i>>>19)+P|0)<<18|i>>>14,A^=(i=(k^=(i=(_^=(i=(E^=(i=A+k|0)<<7|i>>>25)+A|0)<<9|i>>>23)+E|0)<<13|i>>>19)+_|0)<<18|i>>>14,S^=(i=(T^=(i=(P^=(i=(x^=(i=S+T|0)<<7|i>>>25)+S|0)<<9|i>>>23)+x|0)<<13|i>>>19)+P|0)<<18|i>>>14,C^=(i=(M^=(i=(I^=(i=(O^=(i=C+M|0)<<7|i>>>25)+C|0)<<9|i>>>23)+O|0)<<13|i>>>19)+I|0)<<18|i>>>14,N^=(i=(D^=(i=(R^=(i=(B^=(i=N+D|0)<<7|i>>>25)+N|0)<<9|i>>>23)+B|0)<<13|i>>>19)+R|0)<<18|i>>>14;A=A+o|0,E=E+f|0,_=_+a|0,k=k+s|0,T=T+c|0,S=S+l|0,x=x+u|0,P=P+d|0,I=I+h|0,M=M+p|0,C=C+y|0,O=O+b|0,B=B+g|0,R=R+m|0,D=D+v|0,N=N+w|0,e[0]=A>>>0&255,e[1]=A>>>8&255,e[2]=A>>>16&255,e[3]=A>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=x>>>0&255,e[25]=x>>>8&255,e[26]=x>>>16&255,e[27]=x>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=M>>>0&255,e[37]=M>>>8&255,e[38]=M>>>16&255,e[39]=M>>>24&255,e[40]=C>>>0&255,e[41]=C>>>8&255,e[42]=C>>>16&255,e[43]=C>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=B>>>0&255,e[49]=B>>>8&255,e[50]=B>>>16&255,e[51]=B>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,f=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,b=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,A=0;A<20;A+=2)o^=(i=(g^=(i=(h^=(i=(c^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+h|0)<<18|i>>>14,l^=(i=(f^=(i=(m^=(i=(p^=(i=l+f|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+m|0)<<18|i>>>14,y^=(i=(u^=(i=(a^=(i=(v^=(i=y+u|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(b^=(i=(d^=(i=(s^=(i=w+b|0)<<7|i>>>25)+w|0)<<9|i>>>23)+s|0)<<13|i>>>19)+d|0)<<18|i>>>14,o^=(i=(s^=(i=(a^=(i=(f^=(i=o+s|0)<<7|i>>>25)+o|0)<<9|i>>>23)+f|0)<<13|i>>>19)+a|0)<<18|i>>>14,l^=(i=(c^=(i=(d^=(i=(u^=(i=l+c|0)<<7|i>>>25)+l|0)<<9|i>>>23)+u|0)<<13|i>>>19)+d|0)<<18|i>>>14,y^=(i=(p^=(i=(h^=(i=(b^=(i=y+p|0)<<7|i>>>25)+y|0)<<9|i>>>23)+b|0)<<13|i>>>19)+h|0)<<18|i>>>14,w^=(i=(v^=(i=(m^=(i=(g^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+g|0)<<13|i>>>19)+m|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=u>>>0&255,e[17]=u>>>8&255,e[18]=u>>>16&255,e[19]=u>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function A(e,t,r,n,i,o,f){var a,s,c=new Uint8Array(16),l=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=o[s];for(;i>=64;){for(m(l,c,f,w),s=0;s<64;s++)e[t+s]=r[n+s]^l[s];for(a=1,s=8;s<16;s++)a=a+(255&c[s])|0,c[s]=255&a,a>>>=8;i-=64,t+=64,n+=64}if(i>0)for(m(l,c,f,w),s=0;s=64;){for(m(s,a,i,w),f=0;f<64;f++)e[t+f]=s[f];for(o=1,f=8;f<16;f++)o=o+(255&a[f])|0,a[f]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(m(s,a,i,w),f=0;f>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,f=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|f<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(f>>>11|a<<5),s=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,r,n,i,o){var f=new T(o);return f.update(r,n,i),f.finish(e,t),0}function x(e,t,r,n,i,o){var f=new Uint8Array(16);return S(f,0,r,n,i,o),b(e,t,f,0)}function P(e,t,r,n,i){var o;if(r<32)return-1;for(k(e,0,t,0,r,n,i),S(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function I(e,t,r,n,i){var o,f=new Uint8Array(32);if(r<32)return-1;if(_(f,0,32,n,i),0!==x(t,16,t,32,r-32,f))return-1;for(k(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function M(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function C(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function O(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function B(e,r){var n,i,o,f=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(C(a),C(a),C(a),i=0;i<2;i++){for(f[0]=a[0]-65517,n=1;n<15;n++)f[n]=a[n]-65535-(f[n-1]>>16&1),f[n-1]&=65535;f[15]=a[15]-32767-(f[14]>>16&1),o=f[15]>>16&1,f[14]&=65535,O(a,f,1-o)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function R(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return B(r,e),B(n,t),g(r,0,n,0)}function D(e){var t=new Uint8Array(32);return B(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function U(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,i,o=0,f=0,a=0,s=0,c=0,l=0,u=0,d=0,h=0,p=0,y=0,b=0,g=0,m=0,v=0,w=0,A=0,E=0,_=0,k=0,T=0,S=0,x=0,P=0,I=0,M=0,C=0,O=0,B=0,R=0,D=0,N=r[0],U=r[1],L=r[2],F=r[3],j=r[4],z=r[5],V=r[6],H=r[7],K=r[8],G=r[9],q=r[10],W=r[11],Q=r[12],J=r[13],Y=r[14],Z=r[15];o+=(n=t[0])*N,f+=n*U,a+=n*L,s+=n*F,c+=n*j,l+=n*z,u+=n*V,d+=n*H,h+=n*K,p+=n*G,y+=n*q,b+=n*W,g+=n*Q,m+=n*J,v+=n*Y,w+=n*Z,f+=(n=t[1])*N,a+=n*U,s+=n*L,c+=n*F,l+=n*j,u+=n*z,d+=n*V,h+=n*H,p+=n*K,y+=n*G,b+=n*q,g+=n*W,m+=n*Q,v+=n*J,w+=n*Y,A+=n*Z,a+=(n=t[2])*N,s+=n*U,c+=n*L,l+=n*F,u+=n*j,d+=n*z,h+=n*V,p+=n*H,y+=n*K,b+=n*G,g+=n*q,m+=n*W,v+=n*Q,w+=n*J,A+=n*Y,E+=n*Z,s+=(n=t[3])*N,c+=n*U,l+=n*L,u+=n*F,d+=n*j,h+=n*z,p+=n*V,y+=n*H,b+=n*K,g+=n*G,m+=n*q,v+=n*W,w+=n*Q,A+=n*J,E+=n*Y,_+=n*Z,c+=(n=t[4])*N,l+=n*U,u+=n*L,d+=n*F,h+=n*j,p+=n*z,y+=n*V,b+=n*H,g+=n*K,m+=n*G,v+=n*q,w+=n*W,A+=n*Q,E+=n*J,_+=n*Y,k+=n*Z,l+=(n=t[5])*N,u+=n*U,d+=n*L,h+=n*F,p+=n*j,y+=n*z,b+=n*V,g+=n*H,m+=n*K,v+=n*G,w+=n*q,A+=n*W,E+=n*Q,_+=n*J,k+=n*Y,T+=n*Z,u+=(n=t[6])*N,d+=n*U,h+=n*L,p+=n*F,y+=n*j,b+=n*z,g+=n*V,m+=n*H,v+=n*K,w+=n*G,A+=n*q,E+=n*W,_+=n*Q,k+=n*J,T+=n*Y,S+=n*Z,d+=(n=t[7])*N,h+=n*U,p+=n*L,y+=n*F,b+=n*j,g+=n*z,m+=n*V,v+=n*H,w+=n*K,A+=n*G,E+=n*q,_+=n*W,k+=n*Q,T+=n*J,S+=n*Y,x+=n*Z,h+=(n=t[8])*N,p+=n*U,y+=n*L,b+=n*F,g+=n*j,m+=n*z,v+=n*V,w+=n*H,A+=n*K,E+=n*G,_+=n*q,k+=n*W,T+=n*Q,S+=n*J,x+=n*Y,P+=n*Z,p+=(n=t[9])*N,y+=n*U,b+=n*L,g+=n*F,m+=n*j,v+=n*z,w+=n*V,A+=n*H,E+=n*K,_+=n*G,k+=n*q,T+=n*W,S+=n*Q,x+=n*J,P+=n*Y,I+=n*Z,y+=(n=t[10])*N,b+=n*U,g+=n*L,m+=n*F,v+=n*j,w+=n*z,A+=n*V,E+=n*H,_+=n*K,k+=n*G,T+=n*q,S+=n*W,x+=n*Q,P+=n*J,I+=n*Y,M+=n*Z,b+=(n=t[11])*N,g+=n*U,m+=n*L,v+=n*F,w+=n*j,A+=n*z,E+=n*V,_+=n*H,k+=n*K,T+=n*G,S+=n*q,x+=n*W,P+=n*Q,I+=n*J,M+=n*Y,C+=n*Z,g+=(n=t[12])*N,m+=n*U,v+=n*L,w+=n*F,A+=n*j,E+=n*z,_+=n*V,k+=n*H,T+=n*K,S+=n*G,x+=n*q,P+=n*W,I+=n*Q,M+=n*J,C+=n*Y,O+=n*Z,m+=(n=t[13])*N,v+=n*U,w+=n*L,A+=n*F,E+=n*j,_+=n*z,k+=n*V,T+=n*H,S+=n*K,x+=n*G,P+=n*q,I+=n*W,M+=n*Q,C+=n*J,O+=n*Y,B+=n*Z,v+=(n=t[14])*N,w+=n*U,A+=n*L,E+=n*F,_+=n*j,k+=n*z,T+=n*V,S+=n*H,x+=n*K,P+=n*G,I+=n*q,M+=n*W,C+=n*Q,O+=n*J,B+=n*Y,R+=n*Z,w+=(n=t[15])*N,f+=38*(E+=n*L),a+=38*(_+=n*F),s+=38*(k+=n*j),c+=38*(T+=n*z),l+=38*(S+=n*V),u+=38*(x+=n*H),d+=38*(P+=n*K),h+=38*(I+=n*G),p+=38*(M+=n*q),y+=38*(C+=n*W),b+=38*(O+=n*Q),g+=38*(B+=n*J),m+=38*(R+=n*Y),v+=38*(D+=n*Z),o=(n=(o+=38*(A+=n*U))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=f,e[2]=a,e[3]=s,e[4]=c,e[5]=l,e[6]=u,e[7]=d,e[8]=h,e[9]=p,e[10]=y,e[11]=b,e[12]=g,e[13]=m,e[14]=v,e[15]=w}function j(e,t){F(e,t,t)}function z(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)j(i,i),2!==n&&4!==n&&F(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function V(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)j(i,i),1!==n&&F(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,f=new Uint8Array(32),a=new Float64Array(80),c=t(),l=t(),u=t(),d=t(),h=t(),p=t();for(o=0;o<31;o++)f[o]=r[o];for(f[31]=127&r[31]|64,f[0]&=248,N(a,n),o=0;o<16;o++)l[o]=a[o],d[o]=c[o]=u[o]=0;for(c[0]=d[0]=1,o=254;o>=0;--o)O(c,l,i=f[o>>>3]>>>(7&o)&1),O(u,d,i),U(h,c,u),L(c,c,u),U(u,l,d),L(l,l,d),j(d,h),j(p,c),F(c,u,c),F(u,l,h),U(h,c,u),L(c,c,u),j(l,c),L(u,d,p),F(c,u,s),U(c,c,d),F(u,u,c),F(c,d,p),F(d,l,a),j(l,h),O(c,l,i),O(u,d,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=u[o],a[o+48]=l[o],a[o+64]=d[o];var y=a.subarray(32),b=a.subarray(16);return z(y,y),F(b,b,y),B(e,b),0}function K(e,t){return H(e,t,o)}function G(e,t){return n(t,32),K(e,t)}function q(e,t,r){var n=new Uint8Array(32);return H(n,r,t),v(e,i,n,w)}T.prototype.blocks=function(e,t,r){for(var n,i,o,f,a,s,c,l,u,d,h,p,y,b,g,m,v,w,A,E=this.fin?0:2048,_=this.h[0],k=this.h[1],T=this.h[2],S=this.h[3],x=this.h[4],P=this.h[5],I=this.h[6],M=this.h[7],C=this.h[8],O=this.h[9],B=this.r[0],R=this.r[1],D=this.r[2],N=this.r[3],U=this.r[4],L=this.r[5],F=this.r[6],j=this.r[7],z=this.r[8],V=this.r[9];r>=16;)d=u=0,d+=(_+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*B,d+=(k+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),d+=(T+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),d+=(S+=8191&(o>>>7|(f=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*j),u=(d+=(x+=8191&(f>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,d&=8191,d+=(P+=a>>>1&8191)*(5*L),d+=(I+=8191&(a>>>14|(s=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*U),d+=(M+=8191&(s>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),d+=(C+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),h=u+=(d+=(O+=l>>>5|E)*(5*R))>>>13,h+=_*R,h+=k*B,h+=T*(5*V),h+=S*(5*z),u=(h+=x*(5*j))>>>13,h&=8191,h+=P*(5*F),h+=I*(5*L),h+=M*(5*U),h+=C*(5*N),u+=(h+=O*(5*D))>>>13,h&=8191,p=u,p+=_*D,p+=k*R,p+=T*B,p+=S*(5*V),u=(p+=x*(5*z))>>>13,p&=8191,p+=P*(5*j),p+=I*(5*F),p+=M*(5*L),p+=C*(5*U),y=u+=(p+=O*(5*N))>>>13,y+=_*N,y+=k*D,y+=T*R,y+=S*B,u=(y+=x*(5*V))>>>13,y&=8191,y+=P*(5*z),y+=I*(5*j),y+=M*(5*F),y+=C*(5*L),b=u+=(y+=O*(5*U))>>>13,b+=_*U,b+=k*N,b+=T*D,b+=S*R,u=(b+=x*B)>>>13,b&=8191,b+=P*(5*V),b+=I*(5*z),b+=M*(5*j),b+=C*(5*F),g=u+=(b+=O*(5*L))>>>13,g+=_*L,g+=k*U,g+=T*N,g+=S*D,u=(g+=x*R)>>>13,g&=8191,g+=P*B,g+=I*(5*V),g+=M*(5*z),g+=C*(5*j),m=u+=(g+=O*(5*F))>>>13,m+=_*F,m+=k*L,m+=T*U,m+=S*N,u=(m+=x*D)>>>13,m&=8191,m+=P*R,m+=I*B,m+=M*(5*V),m+=C*(5*z),v=u+=(m+=O*(5*j))>>>13,v+=_*j,v+=k*F,v+=T*L,v+=S*U,u=(v+=x*N)>>>13,v&=8191,v+=P*D,v+=I*R,v+=M*B,v+=C*(5*V),w=u+=(v+=O*(5*z))>>>13,w+=_*z,w+=k*j,w+=T*F,w+=S*L,u=(w+=x*U)>>>13,w&=8191,w+=P*N,w+=I*D,w+=M*R,w+=C*B,A=u+=(w+=O*(5*V))>>>13,A+=_*V,A+=k*z,A+=T*j,A+=S*F,u=(A+=x*L)>>>13,A&=8191,A+=P*U,A+=I*N,A+=M*D,A+=C*R,_=d=8191&(u=(u=((u+=(A+=O*B)>>>13)<<2)+u|0)+(d&=8191)|0),k=h+=u>>>=13,T=p&=8191,S=y&=8191,x=b&=8191,P=g&=8191,I=m&=8191,M=v&=8191,C=w&=8191,O=A&=8191,t+=16,r-=16;this.h[0]=_,this.h[1]=k,this.h[2]=T,this.h[3]=S,this.h[4]=x,this.h[5]=P,this.h[6]=I,this.h[7]=M,this.h[8]=C,this.h[9]=O},T.prototype.finish=function(e,t){var r,n,i,o,f=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,f[0]=this.h[0]+5,r=f[0]>>>13,f[0]&=8191,o=1;o<10;o++)f[o]=this.h[o]+r,r=f[o]>>>13,f[o]&=8191;for(f[9]-=8192,n=(1^r)-1,o=0;o<10;o++)f[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|f[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},T.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(E=0;E<16;E++)_=8*E+Q,M[E]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],C[E]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(E=0;E<80;E++)if(i=O,o=B,f=R,a=D,s=N,c=U,l=L,F,d=j,h=z,p=V,y=H,b=K,g=G,m=q,W,S=65535&(T=W),x=T>>>16,P=65535&(k=F),I=k>>>16,S+=65535&(T=(K>>>14|N<<18)^(K>>>18|N<<14)^(N>>>9|K<<23)),x+=T>>>16,P+=65535&(k=(N>>>14|K<<18)^(N>>>18|K<<14)^(K>>>9|N<<23)),I+=k>>>16,S+=65535&(T=K&G^~K&q),x+=T>>>16,P+=65535&(k=N&U^~N&L),I+=k>>>16,k=J[2*E],S+=65535&(T=J[2*E+1]),x+=T>>>16,P+=65535&k,I+=k>>>16,k=M[E%16],x+=(T=C[E%16])>>>16,P+=65535&k,I+=k>>>16,P+=(x+=(S+=65535&T)>>>16)>>>16,S=65535&(T=A=65535&S|x<<16),x=T>>>16,P=65535&(k=w=65535&P|(I+=P>>>16)<<16),I=k>>>16,S+=65535&(T=(j>>>28|O<<4)^(O>>>2|j<<30)^(O>>>7|j<<25)),x+=T>>>16,P+=65535&(k=(O>>>28|j<<4)^(j>>>2|O<<30)^(j>>>7|O<<25)),I+=k>>>16,x+=(T=j&z^j&V^z&V)>>>16,P+=65535&(k=O&B^O&R^B&R),I+=k>>>16,u=65535&(P+=(x+=(S+=65535&T)>>>16)>>>16)|(I+=P>>>16)<<16,v=65535&S|x<<16,S=65535&(T=y),x=T>>>16,P=65535&(k=a),I=k>>>16,x+=(T=A)>>>16,P+=65535&(k=w),I+=k>>>16,B=i,R=o,D=f,N=a=65535&(P+=(x+=(S+=65535&T)>>>16)>>>16)|(I+=P>>>16)<<16,U=s,L=c,F=l,O=u,z=d,V=h,H=p,K=y=65535&S|x<<16,G=b,q=g,W=m,j=v,E%16==15)for(_=0;_<16;_++)k=M[_],S=65535&(T=C[_]),x=T>>>16,P=65535&k,I=k>>>16,k=M[(_+9)%16],S+=65535&(T=C[(_+9)%16]),x+=T>>>16,P+=65535&k,I+=k>>>16,w=M[(_+1)%16],S+=65535&(T=((A=C[(_+1)%16])>>>1|w<<31)^(A>>>8|w<<24)^(A>>>7|w<<25)),x+=T>>>16,P+=65535&(k=(w>>>1|A<<31)^(w>>>8|A<<24)^w>>>7),I+=k>>>16,w=M[(_+14)%16],x+=(T=((A=C[(_+14)%16])>>>19|w<<13)^(w>>>29|A<<3)^(A>>>6|w<<26))>>>16,P+=65535&(k=(w>>>19|A<<13)^(A>>>29|w<<3)^w>>>6),I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,M[_]=65535&P|I<<16,C[_]=65535&S|x<<16;S=65535&(T=j),x=T>>>16,P=65535&(k=O),I=k>>>16,k=e[0],x+=(T=t[0])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[0]=O=65535&P|I<<16,t[0]=j=65535&S|x<<16,S=65535&(T=z),x=T>>>16,P=65535&(k=B),I=k>>>16,k=e[1],x+=(T=t[1])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[1]=B=65535&P|I<<16,t[1]=z=65535&S|x<<16,S=65535&(T=V),x=T>>>16,P=65535&(k=R),I=k>>>16,k=e[2],x+=(T=t[2])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[2]=R=65535&P|I<<16,t[2]=V=65535&S|x<<16,S=65535&(T=H),x=T>>>16,P=65535&(k=D),I=k>>>16,k=e[3],x+=(T=t[3])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[3]=D=65535&P|I<<16,t[3]=H=65535&S|x<<16,S=65535&(T=K),x=T>>>16,P=65535&(k=N),I=k>>>16,k=e[4],x+=(T=t[4])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[4]=N=65535&P|I<<16,t[4]=K=65535&S|x<<16,S=65535&(T=G),x=T>>>16,P=65535&(k=U),I=k>>>16,k=e[5],x+=(T=t[5])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[5]=U=65535&P|I<<16,t[5]=G=65535&S|x<<16,S=65535&(T=q),x=T>>>16,P=65535&(k=L),I=k>>>16,k=e[6],x+=(T=t[6])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[6]=L=65535&P|I<<16,t[6]=q=65535&S|x<<16,S=65535&(T=W),x=T>>>16,P=65535&(k=F),I=k>>>16,k=e[7],x+=(T=t[7])>>>16,P+=65535&k,I+=k>>>16,I+=(P+=(x+=(S+=65535&T)>>>16)>>>16)>>>16,e[7]=F=65535&P|I<<16,t[7]=W=65535&S|x<<16,Q+=128,n-=128}return n}function Z(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),f=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Y(i,o,t,r),r%=128,n=0;n=0;--i)$(e,t,n=r[i/8|0]>>(7&i)&1),X(t,e),X(e,e),$(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];M(n[0],u),M(n[1],d),M(n[2],a),F(n[3],u,d),te(e,n,r)}function ne(e,r,i){var o,f=new Uint8Array(64),a=[t(),t(),t(),t()];for(i||n(r,32),Z(f,r,32),f[0]&=248,f[31]&=127,f[31]|=64,re(a,f),ee(e,a),o=0;o<32;o++)r[o+32]=e[o];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>4)*ie[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ie[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function fe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function ae(e,r,n,i){var o,f,a=new Uint8Array(64),s=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),u=[t(),t(),t(),t()];Z(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var d=n+64;for(o=0;o>7&&L(e[0],f,e[0]),F(e[3],e[0],e[1]),0)}(d,i))return-1;for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(be),t=new Uint8Array(ge);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ve(e),e.length!==ge)throw new Error("bad secret key size");for(var t=new Uint8Array(be),r=0;r{},27912:()=>{},9278:()=>{},46601:()=>{},89214:()=>{},85568:()=>{},51238:()=>{},24654:()=>{},55024:()=>{},84102:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Authenticator=void 0;const n=r(58204),i=r(65185),o=r(55050),f=r(80716),a=r(58015),s=r(5393),c=r(94807),l=r(92219),u=r(73506),d=r(3365),h=r(14246),p=r(49674),y=r(22110),b=r(95899),g=r(81453),m=r(19421),v=r(27309);let w;w="object"==typeof crypto&&crypto.subtle?crypto.subtle:r(9278).webcrypto.subtle;class A{static decodePublicKey(e){return i.KeyPair.publicFromBase64orPEM(e)}static async getUseTicket(e,t,r,s,c,l){let u,d,h;try{l=i.KeyPair.parseKeyArrayStrings(l)}catch(e){throw(0,o.logger)(m.DEBUGLEVEL.LOW,e),new Error("Issuer key error")}if(!r)throw new Error("Ticket is empty");if(u=n.Ticket.fromBase64(r,l),!u.checkValidity())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not validate ticket"),new Error("Ticket Validation failed");if(!u.verify())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not verify ticket"),new Error("Ticket Verification failed");if((0,o.logger)(m.DEBUGLEVEL.MEDIUM,"ticked valid (signature OK)"),!c)throw new Error("Attesator key not defined");try{h=i.KeyPair.publicFromBase64orPEM(c)}catch(e){throw new Error("Attesator key read error")}try{d=f.SignedIdentifierAttestation.fromBytes((0,o.base64ToUint8array)(s),h)}catch(e){throw new Error("IDAttestation decode error")}if(!d.checkValidity())throw new Error("IDAttestation Validation failed");if(!d.verify())throw new Error("IDAttestation Verification failed");(0,o.logger)(m.DEBUGLEVEL.HIGH,"attestation valid");try{let r=new a.AttestedObject;r.create(u,d,t,e);let n=r.getDerEncoding();return(0,o.logger)(m.DEBUGLEVEL.HIGH,n),(0,o.hexStringToBase64)(n)}catch(e){let t="";throw e instanceof Error&&(t=e.message),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"getUseTicket: redeem failed",e),new Error("Attestation doesnt fit Ticket: "+t)}}static validateUseTicket(e,t,r,f){let s=i.KeyPair.publicFromBase64orPEM(t),c=i.KeyPair.parseKeyArrayStrings(r);try{let t=a.AttestedObject.fromBytes((0,o.base64ToUint8array)(e),v.UseToken,s,n.Ticket,c);if((0,o.logger)(m.DEBUGLEVEL.LOW,"Verified attested object"),!t.checkValidity(f))throw new Error("Ticket validity check failed!");return t}catch(e){if(e instanceof Error){let t="Ticket proof validation failed! "+e.message;throw(0,o.logger)(m.DEBUGLEVEL.MEDIUM,t),new Error(t)}}}static async requestAttest(e,t,r,n,i){let f,a=new s.AttestationCrypto;if(i)f=i.getAddress();else try{f=await h.SignatureUtility.connectMetamaskAndGetAddress()}catch(e){return(0,o.logger)(m.DEBUGLEVEL.LOW,"Cant find user Ethereum Address. Please check Metamask. "+e),void(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e)}let d=await l.Nonce.makeNonce(f,r);(0,o.logger)(m.DEBUGLEVEL.HIGH,"nonce = "+(0,o.uint8tohex)(d));let p=a.computeAttestationProof(n,d),y=c.AttestationRequest.fromData(a.getType(t),p),b=new u.Eip712AttestationRequest(i);return await b.addData(r,void 0,e,y),A.checkAttestRequestVerifiability(b),A.checkAttestRequestValidity(b),b.getJsonEncoding()}static constructAttest(e,t,r,n,i,a=""){let c,l,h,p=new s.AttestationCrypto;try{l=new u.Eip712AttestationRequest,l.setDomain(i),a&&l.setUsageValue(a),l.fillJsonData(n),A.checkAttestRequestVerifiability(l),A.checkAttestRequestValidity(l)}catch(e){let t="Failed to fill attestation data from json. "+e+"\nRestores as an Eip712AttestationRequestWithUsage object instead";(0,o.logger)(m.DEBUGLEVEL.MEDIUM,t);try{l=new b.Eip712AttestationRequestWithUsage,l.setDomain(i),l.fillJsonData(n),A.checkAttestRequestVerifiability(l),A.checkAttestRequestValidity(l)}catch(e){let t="Failed to parse Eip712AttestationRequestWithUsage. "+e;throw(0,o.logger)(m.DEBUGLEVEL.LOW,t),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e),new Error(t)}}h=p.makeCommitmentFromHiding(l.getIdentifier(),l.getType(),l.getPok().getRiddle()),c=new d.IdentifierAttestation,c.fromCommitment(h,l.getUserPublicKey()),c.setIssuer("CN="+t),c.setSerialNumber(Math.round(Math.random()*Number.MAX_SAFE_INTEGER));let y=Date.now();return c.setNotValidBefore(y),c.setNotValidAfter(y+r),f.SignedIdentifierAttestation.fromData(c,e).getDerEncoding()}static async useAttest(e,t,r,n,i,a,c,u){const d=(0,o.base64ToUint8array)(e);let b,g=f.SignedIdentifierAttestation.fromBytes(d,r),v=(0,o.base64ToUint8array)(t),w=(0,o.uint8ToBn)(v.slice(4)),A=new s.AttestationCrypto;b=u?u.getAddress():await h.SignatureUtility.connectMetamaskAndGetAddress();let E=await l.Nonce.makeNonce(b,a),_=A.computeAttestationProof(w,E);try{let e=p.UseAttestation.fromData(g,A.getType(i),_,c),t=new y.Eip712AttestationUsage(u),r=await t.addData(a,n,e);return(0,o.logger)(m.DEBUGLEVEL.HIGH,"usageRequest ready state = "+r),(0,o.logger)(m.DEBUGLEVEL.HIGH,"usageRequest.getJsonEncoding() = "+t.getJsonEncoding()),t.getJsonEncoding()}catch(e){(0,o.logger)(m.DEBUGLEVEL.LOW,e)}}static checkAttestRequestVerifiability(e){if(!e.verify())throw(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"Could not verify attestation signing request"),new Error("Verification failed")}static checkAttestRequestValidity(e){if(!e.checkValidity())throw(0,o.logger)(m.DEBUGLEVEL.HIGH,"Could not validate attestation signing request"),new Error("Validation failed")}static checkUsageVerifiability(e){if(!e.verify())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not verify usage request"),new Error("Verification failed")}static checkUsageValidity(e){if(!e.checkTokenValidity())throw(0,o.logger)(m.DEBUGLEVEL.LOW,"Could not validate usage request"),new Error("Validation failed")}static async verifyUsage(e,t,r,n,f){let a;try{let r=new y.Eip712AttestationUsage;r.setDomain(n),r.fillJsonData(e,t),A.checkUsageVerifiability(r),A.checkUsageValidity(r),a=r.getSessionPublicKey()}catch(t){(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"Eip712AttestationUsage failed. "+t+". Lets try to verify Eip712AttestationRequestWithUsage");let r=new b.Eip712AttestationRequestWithUsage;r.setDomain(n),r.fillJsonData(e),A.checkUsageVerifiability(r),A.checkUsageValidity(r),a=r.getSessionPublicKey(),(0,o.logger)(m.DEBUGLEVEL.HIGH,"sessionPublicKey from Eip712AttestationRequestWithUsage = "+a.getAddress())}try{if(!await a.verifyStringWithSubtle(i.KeyPair.anySignatureToRawUint8(f),r))throw(0,o.logger)(m.DEBUGLEVEL.MEDIUM,"Could not verify message signature"),new Error("Signature verification failed");return"SUCCESSFULLY validated usage request!"}catch(e){let t="Cant verify session with subtle. "+e;(0,o.logger)(m.DEBUGLEVEL.LOW,t),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e)}}static async requestAttestAndUsage(e,t,r,n,i,f){try{let a,c=(0,o.uint8ToBn)((0,o.base64ToUint8array)(i));a=e?e.getAddress():await h.SignatureUtility.connectMetamaskAndGetAddress();let u=await l.Nonce.makeNonce(a,n,new Uint8Array(0),Date.now()),d=new s.AttestationCrypto,p=d.computeAttestationProof(c,u),y=g.AttestationRequestWithUsage.fromData(d.getType(r),p,f),v=new b.Eip712AttestationRequestWithUsage(e);return await v.fromData(n,void 0,void 0,t,y),(0,o.logger)(m.DEBUGLEVEL.HIGH,"request.getJsonEncoding() = "+v.getJsonEncoding()),v.getJsonEncoding()}catch(e){let t="requestAttestAndUsage error. "+e;(0,o.logger)(m.DEBUGLEVEL.LOW,t),(0,o.logger)(m.DEBUGLEVEL.MEDIUM,e)}}static validateTicket(e,t,r){let f,a={};try{a[t]=i.KeyPair.parseKeyArrayStrings({[t]:r})[t]}catch(e){return{valid:!1,massage:"Broken Public Key"}}try{f=n.Ticket.fromBase64(e,a)}catch(e){return(0,o.logger)(m.DEBUGLEVEL.LOW,e),{valid:!1,massage:"Wrong Ticket"}}return{valid:!0,ticketId:f.getTicketId(),ticketClass:f.getTicketClass()}}}t.Authenticator=A},58204:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ticket=void 0;const n=r(5393),i=r(65185),o=r(13649),f=r(4625),a=r(55050),s=r(79896),c=r(39980),l=r(86623);class u extends f.AttestableObject{constructor(){super(),this.magicLinkURLPrefix="https://ticket.devcon.org/",this.isLegasy=!1}fromData(e,t,r,n){this.ticketId=t,this.ticketClass=r,this.devconId=e,this.keys=n;const i=n[e];this.setKeys(i)}setKeys(e){Array.isArray(e)?(this.issuerKeys=e,this.key=e[0]):(this.issuerKeys=[e],this.key=e)}createWithCommitment(e,t,r,n,i,o){if(this.fromData(e,t,r,o),this.commitment=n,this.signature=i,this.encoded=this.encodeSignedTicket(this.makeTicket()),!this.verify())throw new Error("Ticket Signature is invalid")}static createWithMail(e,t,r,i,o,f){let s=new this;s.fromData(t,r,i,o);let c,l=new n.AttestationCrypto;try{s.commitment=l.makeCommitment(e,l.getType("mail"),f);let t=s.makeTicket();c=s.key.signRawBytesWithEthereum((0,a.hexStringToArray)(t))}catch(e){let t="";throw e instanceof Error&&(t=e.message),new Error(t)}return s.createWithCommitment(t,r,i,s.commitment,c,o),s}makeTicket(){let e;try{const t=BigInt(this.ticketId);e=o.Asn1Der.encode("INTEGER",t)}catch(t){e=o.Asn1Der.encode("UTF8STRING",this.ticketId)}let t=o.Asn1Der.encode("UTF8STRING",this.devconId)+e+o.Asn1Der.encode("INTEGER",this.ticketClass);return this.isLegasy||(t+=o.Asn1Der.encode("OCTET_STRING",(0,a.uint8tohex)(this.commitment))),o.Asn1Der.encode("SEQUENCE_30",t)}encodeSignedTicket(e){return this.isLegasy&&(e+=o.Asn1Der.encode("OCTET_STRING",(0,a.uint8tohex)(this.commitment))),e+=o.Asn1Der.encode("BIT_STRING",this.signature),o.Asn1Der.encode("SEQUENCE_30",e)}getDerEncodingWithPK(){let e=this.makeTicket()+o.Asn1Der.encode("OCTET_STRING",(0,a.uint8tohex)(this.commitment))+this.key.getAsnDerPublic()+o.Asn1Der.encode("BIT_STRING",this.signature);return o.Asn1Der.encode("SEQUENCE_30",e)}getDerEncoding(){return this.encoded}verify(){const e=(0,a.hexStringToArray)(this.makeTicket()),t=(0,a.hexStringToArray)(l.ethers.utils.keccak256(e)),r=(0,a.uint8tohex)(i.KeyPair.anySignatureToRawUint8(this.signature)),n=l.ethers.utils.recoverPublicKey(t,l.ethers.utils.splitSignature((0,a.hexStringToUint8)(r)));for(const e of this.issuerKeys)if(n.substring(2)===e.getPublicKeyAsHexStr())return this.key=e,!0;throw new Error("Ticket signature is invalid")}checkValidity(){return!0}getTicketId(){return this.ticketId}getTicketClass(){return this.ticketClass}getDevconId(){return this.devconId}getSignature(){return this.signature}static fromBase64(e,t){let r=new this;return r.fromBytes((0,a.base64ToUint8array)(e),t),r}fromBytes(e,t){const r=c.AsnParser.parse(e,s.SignedDevconTicket);let n=r.ticket.devconId;if(!t||!t[n])throw new Error("Issuer key "+n+" not defined.");const i=t[n];this.setKeys(i);let o,f=r.ticket.ticketIdNumber,l=f?f.toString():r.ticket.ticketIdString??"",u=r.ticket.ticketClass;if(r.ticket.commitment)o=r.ticket.commitment;else{if(!r.commitment)throw new Error("Commitment not defined.");o=r.commitment,this.isLegasy=!0}let d=r.signatureValue;this.createWithCommitment(n,l,u,new Uint8Array(o),(0,a.uint8tohex)(new Uint8Array(d)),t)}getCommitment(){return this.commitment}getKey(){return this.key}getUrlEncoding(){}}t.Ticket=u},54759:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.MyAttestationDecoded=t.MyAttestation=t.SignedInfo=t.SmartContract=t.Payload=t.PrivateKeyInfo=t.PrivateKeyData=t.SubjectPublicKeyInfo=t.PublicKeyInfoValue=void 0;const i=r(39980),o=r(93312),f=r(83458);class a{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],a.prototype,"algorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],a.prototype,"publicKey",void 0),t.PublicKeyInfoValue=a;let s=class{constructor(){this.null=!1}};n([(0,i.AsnProp)({type:a})],s.prototype,"value",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],s.prototype,"null",void 0),s=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],s),t.SubjectPublicKeyInfo=s;class c{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],c.prototype,"one",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],c.prototype,"privateKey",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any,context:0})],c.prototype,"algDescr",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString,context:1})],c.prototype,"publicKey",void 0),t.PrivateKeyData=c;class l{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],l.prototype,"one",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],l.prototype,"algIdent",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],l.prototype,"keysData",void 0),t.PrivateKeyInfo=l;let u=class{};n([(0,i.AsnProp)({type:o.Extensions,context:3})],u.prototype,"extensions",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any,context:4})],u.prototype,"dataObject",void 0),u=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],u),t.Payload=u;class d{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],d.prototype,"value",void 0),t.SmartContract=d;class h{}n([(0,i.AsnProp)({type:o.Version})],h.prototype,"version",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],h.prototype,"serialNumber",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],h.prototype,"signature",void 0),n([(0,i.AsnProp)({type:f.Name})],h.prototype,"issuer",void 0),n([(0,i.AsnProp)({type:o.ValidityValue,optional:!0})],h.prototype,"validity",void 0),n([(0,i.AsnProp)({type:f.Name})],h.prototype,"subject",void 0),n([(0,i.AsnProp)({type:s})],h.prototype,"subjectPublicKeyInfo",void 0),n([(0,i.AsnProp)({type:d,optional:!0})],h.prototype,"contract",void 0),n([(0,i.AsnProp)({type:u,optional:!0})],h.prototype,"attestsTo",void 0),t.SignedInfo=h;class p{constructor(){this.signedInfo=new Uint8Array}}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],p.prototype,"signedInfo",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],p.prototype,"signatureAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],p.prototype,"signatureValue",void 0),t.MyAttestation=p;class y{}n([(0,i.AsnProp)({type:h})],y.prototype,"signedInfo",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],y.prototype,"signatureAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],y.prototype,"signatureValue",void 0),t.MyAttestationDecoded=y},61709:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Identifier=void 0;const i=r(39980),o=r(61538);class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],f.prototype,"type",void 0),n([(0,i.AsnProp)({type:o.Proof})],f.prototype,"proof",void 0),t.Identifier=f},84962:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Identifier=void 0;const i=r(39980),o=r(61538),f=r(54759);class a{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],a.prototype,"type",void 0),n([(0,i.AsnProp)({type:o.Proof})],a.prototype,"proof",void 0),n([(0,i.AsnProp)({type:f.PublicKeyInfoValue})],a.prototype,"sessionKey",void 0),t.Identifier=a},93312:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions=t.Extension=t.ValidityValue=t.Version=t.AlgorithmIdentifierASN=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.ObjectIdentifier})],o.prototype,"algorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any,optional:!0})],o.prototype,"parameters",void 0),t.AlgorithmIdentifierASN=o;class f{constructor(){this.version=0}}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],f.prototype,"version",void 0),t.Version=f;let a=class{};n([(0,i.AsnProp)({type:i.AsnPropTypes.UTCTime})],a.prototype,"utcTime",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.GeneralizedTime})],a.prototype,"generalizedTime",void 0),a=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],a);class s{}n([(0,i.AsnProp)({type:a})],s.prototype,"notBefore",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,optional:!0})],s.prototype,"notBeforeInt",void 0),n([(0,i.AsnProp)({type:a})],s.prototype,"notAfter",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,optional:!0})],s.prototype,"notAfterInt",void 0),t.ValidityValue=s;let c=class{};n([(0,i.AsnProp)({type:s,context:0})],c.prototype,"value",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,context:1})],c.prototype,"null",void 0),c=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],c);class l{}n([(0,i.AsnProp)({type:i.AsnPropTypes.ObjectIdentifier})],l.prototype,"extnId",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Boolean})],l.prototype,"critical",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],l.prototype,"extnValue",void 0),t.Extension=l;class u{}n([(0,i.AsnProp)({type:l})],u.prototype,"extension",void 0),t.Extensions=u},35403:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.EpochTimeValidity=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"notBefore",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"notAfter",void 0),t.EpochTimeValidity=o},95978:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressAttestation=void 0;const i=r(39980),o=r(35403);class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],f.prototype,"subjectPublicKey",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"ethereumAddress",void 0),n([(0,i.AsnProp)({type:o.EpochTimeValidity})],f.prototype,"validity",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],f.prototype,"context",void 0),t.EthereumAddressAttestation=f},42909:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.SignedEthereumKeyLinkingAttestation=t.EthereumKeyLinkingAttestation=void 0;const i=r(39980),o=r(35403),f=r(93312),a=r(52551);class s{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],s.prototype,"subjectEthereumAddress",void 0),n([(0,i.AsnProp)({type:a.SignedLinkedAttestation})],s.prototype,"linkedAttestation",void 0),n([(0,i.AsnProp)({type:o.EpochTimeValidity})],s.prototype,"validity",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],s.prototype,"context",void 0),t.EthereumKeyLinkingAttestation=s;class c{}n([(0,i.AsnProp)({type:s})],c.prototype,"ethereumKeyLinkingAttestation",void 0),n([(0,i.AsnProp)({type:f.AlgorithmIdentifierASN})],c.prototype,"signingAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],c.prototype,"signatureValue",void 0),t.SignedEthereumKeyLinkingAttestation=c},83458:function(e,t,r){"use strict";var n,i,o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Name=t.AttributeTypeAndValue=void 0;const f=r(39980);class a{}o([(0,f.AsnProp)({type:f.AsnPropTypes.ObjectIdentifier})],a.prototype,"type",void 0),o([(0,f.AsnProp)({type:f.AsnPropTypes.Utf8String})],a.prototype,"value",void 0),t.AttributeTypeAndValue=a;let s=n=class extends f.AsnArray{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}};s=n=o([(0,f.AsnType)({type:f.AsnTypeTypes.Set,itemType:a})],s);let c=i=class extends f.AsnArray{constructor(e){super(e),Object.setPrototypeOf(this,i.prototype)}};c=i=o([(0,f.AsnType)({type:f.AsnTypeTypes.Sequence,itemType:s})],c);let l=class{};o([(0,f.AsnProp)({type:c})],l.prototype,"rdnSequence",void 0),o([(0,f.AsnProp)({type:f.AsnPropTypes.Null})],l.prototype,"null",void 0),l=o([(0,f.AsnType)({type:f.AsnTypeTypes.Choice})],l),t.Name=l},83874:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.NFTOwnershipAttestation=t.ERC721=void 0;const i=r(39980),o=r(35403);class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"address",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],f.prototype,"chainId",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0,repeated:"sequence"})],f.prototype,"tokenIds",void 0),t.ERC721=f;class a{constructor(){this.tokens=[]}}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],a.prototype,"subjectPublicKey",void 0),n([(0,i.AsnProp)({type:f,repeated:"sequence"})],a.prototype,"tokens",void 0),n([(0,i.AsnProp)({type:o.EpochTimeValidity})],a.prototype,"validity",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],a.prototype,"context",void 0),t.NFTOwnershipAttestation=a},61538:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.UsageProof=t.Proof=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"riddle",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"challengePoint",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"responseValue",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],o.prototype,"nonce",void 0),t.Proof=o;class f{}n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"challengePoint",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"responseValue",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString})],f.prototype,"nonce",void 0),t.UsageProof=f},8573:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"r",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"s",void 0),t.Signature=o},79896:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.SignedDevconTicket=t.DevconTicket=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Utf8String})],o.prototype,"devconId",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer,optional:!0})],o.prototype,"ticketIdNumber",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Utf8String,optional:!0})],o.prototype,"ticketIdString",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],o.prototype,"ticketClass",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],o.prototype,"commitment",void 0),t.DevconTicket=o;class f{}n([(0,i.AsnProp)({type:o})],f.prototype,"ticket",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.OctetString,optional:!0})],f.prototype,"commitment",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],f.prototype,"signatureValue",void 0),t.SignedDevconTicket=f},52551:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.SignedLinkedAttestation=t.LinkedAttestation=void 0;const i=r(39980),o=r(93312),f=r(83874),a=r(95978);let s=class{};n([(0,i.AsnProp)({type:f.NFTOwnershipAttestation,context:0})],s.prototype,"nftOwnership",void 0),n([(0,i.AsnProp)({type:a.EthereumAddressAttestation,context:1})],s.prototype,"ethereumAddress",void 0),s=n([(0,i.AsnType)({type:i.AsnTypeTypes.Choice})],s),t.LinkedAttestation=s;class c{}n([(0,i.AsnProp)({type:s})],c.prototype,"attestation",void 0),n([(0,i.AsnProp)({type:o.AlgorithmIdentifierASN})],c.prototype,"signingAlgorithm",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.BitString})],c.prototype,"signatureValue",void 0),t.SignedLinkedAttestation=c},91462:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.UseAttestation=void 0;const i=r(39980),o=r(61538),f=r(54759);class a{}n([(0,i.AsnProp)({type:f.MyAttestation})],a.prototype,"attestation",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Integer})],a.prototype,"type",void 0),n([(0,i.AsnProp)({type:o.Proof})],a.prototype,"proof",void 0),n([(0,i.AsnProp)({type:f.PublicKeyInfoValue})],a.prototype,"sessionKey",void 0),t.UseAttestation=a},27309:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.UseToken=void 0;const i=r(39980);class o{}n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],o.prototype,"signedToken",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],o.prototype,"attestation",void 0),n([(0,i.AsnProp)({type:i.AsnPropTypes.Any})],o.prototype,"proof",void 0),t.UseToken=o},19421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEBUGLEVEL=void 0,t.DEBUGLEVEL={LOW:1,MEDIUM:2,HIGH:3,VERBOSE:4}},72353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XMLconfigData=void 0;const n=r(79896),i=r(65185);t.XMLconfigData={attestationOrigin:"http://stage.attestation.id",tokensOrigin:"https://devcontickets.herokuapp.com/outlet/",tokenUrlName:"ticket",tokenSecretName:"secret",unsignedTokenDataName:"ticket",tokenParser:n.SignedDevconTicket,localStorageItemName:"dcTokens",base64senderPublicKeys:{6:i.KeyPair.publicFromBase64orPEM("-----BEGIN PUBLIC KEY-----\nMIIBMzCB7AYHKoZIzj0CATCB4AIBATAsBgcqhkjOPQEBAiEA////////////////\n/////////////////////v///C8wRAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBEEEeb5m\nfvncu6xVoGKVzocLBwKb/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0\nSKaFVBmcR9CP+xDUuAIhAP////////////////////66rtzmr0igO7/SXozQNkFB\nAgEBA0IABJUMfAvtI8PKxcwxu7mq2btVMjh4gmcKwrHN8HmasOvHZMJn9wTo/doH\nlquDl6TSEBAk0kxO//aVs6QX8u0OSM0=\n-----END PUBLIC KEY-----"),26:i.KeyPair.publicFromBase64orPEM("-----BEGIN PUBLIC KEY-----\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEQKYTwFMIzSq1QVxoRKoOZXLQ9mUhce8M\ndIzvJx3unbpR3m3TiuWKZKTP4/XCPnS56d1tAhjM43hHjHbZ0k3RKQ==\n-----END PUBLIC KEY-----")},base64attestorPubKey:"MIIBMzCB7AYHKoZIzj0CATCB4AIBATAsBgcqhkjOPQEBAiEA/////////////////////////////////////v///C8wRAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBEEEeb5mfvncu6xVoGKVzocLBwKb/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIhAP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABL+y43T1OJFScEep69/yTqpqnV/jzONz9Sp4TEHyAJ7IPN9+GHweCX1hT4OFxt152sBN3jJc1s0Ymzd8pNGZNoQ=",webDomain:"devcon.org"}},42949:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.convertV1AttestationToV2=t.isSignedOffchainAttestationV1=t.uncompactOffchainAttestationPackage=t.compactOffchainAttestationPackage=t.decodeBase64ZippedBase64=t.zipAndEncodeToBase64=void 0;const f=o(r(99591)),a=r(86623),s=r(55050);function c(e){let{sig:t,signer:r}=e;return u(t)&&(t=d(t)),[t.domain.version,t.domain.chainId,t.domain.verifyingContract,t.signature.r,t.signature.s,t.signature.v,r,t.uid,t.message.schema,t.message.recipient===a.ethers.constants.AddressZero?"0":t.message.recipient,Number(t.message.time),Number(t.message.expirationTime),t.message.refUID===a.ethers.constants.HashZero?"0":t.message.refUID,t.message.revocable,t.message.data,Number(t.message.nonce)]}function l(e){return{sig:{domain:{name:"EAS Attestation",version:e[0],chainId:e[1],verifyingContract:e[2]},primaryType:"Attestation",types:{Attest:[{name:"schema",type:"bytes32"},{name:"recipient",type:"address"},{name:"time",type:"uint64"},{name:"expirationTime",type:"uint64"},{name:"revocable",type:"bool"},{name:"refUID",type:"bytes32"},{name:"data",type:"bytes"}]},signature:{r:e[3],s:e[4],v:e[5]},uid:e[7],message:{schema:e[8],recipient:"0"===e[9]?a.ethers.constants.AddressZero:e[9],time:e[10],expirationTime:e[11],refUID:"0"===e[12]?a.ethers.constants.HashZero:e[12],revocable:e[13],data:e[14],nonce:e[15]}},signer:e[6]}}function u(e){return"v"in e&&"r"in e&&"s"in e}function d(e){const{v:t,r,s:n,...i}=e;return{...i,signature:{v:t,r,s:n}}}t.zipAndEncodeToBase64=function(e){const t=c(e),r=JSON.stringify(t),n=f.deflate(r,{level:9});return(0,s.uint8arrayToBase64)(n)},t.decodeBase64ZippedBase64=function(e){const t=(0,s.base64ToUint8array)(e),r=f.inflate(t,{to:"string"});return l(JSON.parse(r))},t.compactOffchainAttestationPackage=c,t.uncompactOffchainAttestationPackage=l,t.isSignedOffchainAttestationV1=u,t.convertV1AttestationToV2=d},3810:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EASIdentifierAttestation=void 0;const n=r(6549);class i extends n.EasTicketAttestation{constructor(e,t){super({fields:[{name:"version",type:"uint8"},{name:"identifierType",type:"string"},{name:"commitment",type:"bytes",isCommitment:!0},{name:"ethereumAddress",type:"address"}]},e,void 0,t?{"":t}:void 0)}async createEasAttestation(e,t,r="mail"){if(t||(t={}),void 0===t.revocable&&(t.revocable=!1),!t.validity){const e=new Date;e.setDate(e.getDate()+30),t.validity={from:Math.round(Date.now()/1e3),to:Math.round(e.getTime()/1e3)}}return super.createEasAttestation(e,t,r)}}t.EASIdentifierAttestation=i},89194:function(e,t,r){"use strict";var n=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.EasAttestedObject=t.EasUseToken=void 0;const i=r(5393),o=r(55050),f=r(39980),a=r(8441);class s{}n([(0,f.AsnProp)({type:f.AsnPropTypes.Any})],s.prototype,"ticketAttestation",void 0),n([(0,f.AsnProp)({type:f.AsnPropTypes.Any})],s.prototype,"idAttestation",void 0),n([(0,f.AsnProp)({type:f.AsnPropTypes.Any})],s.prototype,"proof",void 0),t.EasUseToken=s;t.EasAttestedObject=class{constructor(){this.crypto=new i.AttestationCrypto}create(e,t,r,n){this.ticketAttestation=e,this.ticketSecret=t,this.identifierAttestation=r,this.identifierSecret=n,this.pok=this.makeProof()}makeProof(){let e=this.identifierAttestation.getCommitment(),t=this.ticketAttestation.getCommitment(),r=this.crypto.computeEqualityProof((0,o.uint8tohex)(e),(0,o.uint8tohex)(t),this.identifierSecret,this.ticketSecret);if(!this.crypto.verifyEqualityProof(e,t,r))throw new Error("The redeem proof did not verify");return r}getEncoded(){const e=new s;return e.ticketAttestation=new Uint8Array(this.ticketAttestation.getAsnEncoded()),e.idAttestation=new Uint8Array(this.identifierAttestation.getAsnEncoded()),e.proof=(0,o.hexStringToUint8)(this.pok.getDerEncoding()),(0,o.uint8tohex)(new Uint8Array(f.AsnSerializer.serialize(e)))}static fromBytes(e,t,r){const n=f.AsnParser.parse(e,s),i=new this;i.ticketAttestation=new t,i.ticketAttestation.loadAsnEncoded(n.ticketAttestation),i.identifierAttestation=new r,i.identifierAttestation.loadAsnEncoded(n.idAttestation);let o=new a.UsageProofOfExponent;return o.fromBytes(new Uint8Array(n.proof)),i.pok=o,i}async checkValidity(e=""){if(await this.ticketAttestation.validateEasAttestation(),await this.identifierAttestation.validateEasAttestation(),!this.crypto.verifyEqualityProof(this.identifierAttestation.getCommitment(),this.ticketAttestation.getCommitment(),this.pok))throw new Error("Could not verify the consistency between the commitment in the identifier and ticket attestations");if(""!==e){if((await this.identifierAttestation.getAttestationField("ethereumAddress")).toLowerCase()!==e.toLowerCase())throw Error("The provided ethereum address does not match the address specified in the identifier attestation")}return!0}}},6549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,r,n){var i,o=arguments.length,f=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(f=(o<3?i(f):o>3?i(t,r,f):i(t,r))||f);return o>3&&f&&Object.defineProperty(t,r,f),f},f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.EasTicketAttestation=t.EasAsnEmbeddedSchema=t.AbiFieldTypes=void 0;const a=r(30986),s=r(86623),c=r(5393),l=r(39980),u=r(56371),d=r(55050),h=r(4625),p=r(42949),y=r(65185),b=f(r(99591));!function(e){e.bool="bool",e.uint8="uint8",e.uint16="uint16",e.uint32="uint32",e.uint64="uint64",e.uint128="uint128",e.uint256="uint256",e.address="address",e.string="string",e.bytes="bytes",e.bytes32="bytes32"}(t.AbiFieldTypes||(t.AbiFieldTypes={}));class g{}o([(0,l.AsnProp)({type:l.AsnPropTypes.OctetString})],g.prototype,"easAttestation",void 0),o([(0,l.AsnProp)({type:l.AsnPropTypes.BitString})],g.prototype,"signatureValue",void 0),o([(0,l.AsnProp)({type:l.AsnPropTypes.OctetString,optional:!0})],g.prototype,"domainInfo",void 0),t.EasAsnEmbeddedSchema=g;class m extends h.AttestableObject{constructor(e,t,r,n){super(),this.schema=e,this.signingConfig=t,this.rpcMap=r,this.issuerKeys=n,this.crypto=new c.AttestationCrypto}getEasSchema(){return this.schema.fields.map((e=>e.type+" "+e.name)).join(", ")}checkAttestationIsLoaded(){if(!this.signedAttestation)throw new Error("Signed attestation must be loaded to call this function")}async createEasAttestation(e,t,r="mail"){if(!this.signingConfig)throw new Error("Please provide valid signing config for this function.");this.signerAddress=await this.signingConfig.signer.getAddress(),this.signerAddress||new Error("Failed to get signer address"),this.commitmentSecret=void 0;const n=this.schema.fields.map((t=>{if(!e[t.name])throw new Error("Value for field "+t.name+" was not provided");let n=e[t.name];return t.isCommitment&&(this.commitmentSecret||(this.commitmentSecret=this.crypto.makeSecret()),n=this.createCommitment(n,r,this.commitmentSecret)),{name:t.name,value:n,type:t.type}})),i=new a.Offchain(this.signingConfig.EASconfig),o=new a.SchemaEncoder(this.getEasSchema()).encodeData(n),f=await i.signOffchainAttestation({recipient:t?.recipient??"0x0000000000000000000000000000000000000000",expirationTime:t?.validity?.to??0,time:t?.validity?.from??Math.round(Date.now()/1e3),nonce:0,schema:t?.schema??"0x0000000000000000000000000000000000000000000000000000000000000000",revocable:!1!==t?.revocable,refUID:t?.refUID??"0x0000000000000000000000000000000000000000000000000000000000000000",data:o},this.signingConfig.signer);if(!i.verifyOffchainAttestationSignature(this.signerAddress,f))throw new Error("Attestation signature check failed!");return this.signedAttestation=f,this.recoverSignerInfo(),this.getEasJson()}createCommitment(e,t,r){return"0x"+(0,d.uint8tohex)(this.crypto.makeCommitment(e,this.crypto.getType(t),r))}getEasJson(){this.checkAttestationIsLoaded();const e={sig:this.signedAttestation,signer:this.signerAddress};return this.commitmentSecret&&(e.secret="0x"+this.commitmentSecret.toString(16)),e}getEasUid(e){return e||this.checkAttestationIsLoaded(),a.Offchain.getOffchainUID(e??this.signedAttestation.message)}getEncoded(){return(0,p.zipAndEncodeToBase64)(this.getEasJson())}getAttestationData(){if(this.checkAttestationIsLoaded(),!this.decodedData){const e=new a.SchemaEncoder(this.getEasSchema()).decodeData(this.signedAttestation.message.data);this.decodedData={};let t=0;for(const r of this.schema.fields)this.decodedData[r.name]=e[t].value.value,t++}return this.decodedData}getAttestationField(e){const t=this.getAttestationData();if(!t[e])throw new Error("The attestation does not contain data field '"+e+"'");return t[e]}verifyIdCommitment(e,t,r="mail"){if(t&&(this.commitmentSecret=t),!this.commitmentSecret)throw new Error("Commitment secret required.");if(this.createCommitment(e,r,this.commitmentSecret)!==this.getAttestationField("commitment"))throw new Error("Commitment verification failed.")}async validateEasAttestation(e=!1){this.checkAttestationIsLoaded(),this.verify(),this.checkValidity(),!e&&this.signedAttestation.message.revocable&&await this.checkRevocation()}async checkRevocation(e){e||(e=this.getEasUid());const t=this.signedAttestation.domain.chainId;if(!this.rpcMap?.[t])throw new Error("RPC not provided for chain "+t);const r=new a.EAS(this.signedAttestation.domain.verifyingContract,{signerOrProvider:new s.ethers.providers.StaticJsonRpcProvider(this.rpcMap[t])}),n=await r.getRevocationOffchain(this.signerAddress,e);if(s.BigNumber.from(n).gt(0)){throw new Error("Attestation has been revoked :-(")}}async revokeEasAttestation(e){if(e||(e=this.getEasUid()),!this.signingConfig)throw new Error("Please provide a valid signer");const t=new a.EAS(this.signingConfig.EASconfig.address,{signerOrProvider:this.signingConfig.signer}),r=await t.revokeOffchain(e);await r.wait()}async bulkRevokeEasAttestations(e){if(!this.signingConfig)throw new Error("Please provide a valid signer");const t=new a.EAS(this.signingConfig.EASconfig.address,{signerOrProvider:this.signingConfig.signer}),r=await t.multiRevokeOffchain(e);await r.wait()}loadEasAttestation(e,t,r){this.decodedData=void 0,this.commitmentSecret=r?BigInt(r):void 0,this.signedAttestation=e,this.processKeysParam(t)}loadFromEncoded(e,t,r){const n=(0,p.decodeBase64ZippedBase64)(e);this.loadEasAttestation(n.sig,t,r)}getAsnEncoded(e=!1){const t=u.defaultAbiCoder.encode(this.signedAttestation.types.Attest.map((e=>e.type)),this.signedAttestation.types.Attest.map((e=>this.signedAttestation.message[e.name]))),r=new g;r.easAttestation=(0,d.hexStringToUint8)(t),r.signatureValue=(0,d.hexStringToUint8)((0,u.joinSignature)(this.signedAttestation.signature));const n=u.defaultAbiCoder.encode(["string","address","uint256"],[this.signedAttestation.domain.version,this.signedAttestation.domain.verifyingContract,this.signedAttestation.domain.chainId]);r.domainInfo=(0,d.hexStringToUint8)(n);const i=l.AsnSerializer.serialize(r);return e?b.deflate(i,{level:9}):i}loadAsnEncoded(e,t,r=!1){this.decodedData=void 0,this.commitmentSecret=void 0,r&&(e=b.inflate(e));const n=l.AsnParser.parse(e,g),i=u.defaultAbiCoder.decode(["string","address","uint256"],n.domainInfo),o={name:"EAS Attestation",version:i[0],verifyingContract:i[1],chainId:i[2]},f=u.defaultAbiCoder.decode(a.ATTESTATION_TYPE.map((e=>e.type)),"0x"+(0,d.uint8tohex)(new Uint8Array(n.easAttestation))),c={};for(const[e,t]of a.ATTESTATION_TYPE.entries())c[t.name]=f[e];const h=s.ethers.utils.splitSignature(new Uint8Array(n.signatureValue));this.signedAttestation={domain:o,message:c,types:{Attest:a.ATTESTATION_TYPE},primaryType:"Attestation",signature:{r:h.r,s:h.s,v:h.v},uid:this.getEasUid(c)},this.processKeysParam(t)}checkValidity(){const e=Math.round(Date.now()/1e3);if(e0&&e>this.signedAttestation.message.expirationTime)throw new Error("Attestation has expired.");return!0}processKeysParam(e){const t=this.getAttestationData();let r=t.eventId??t.devconId??"";if(!e){if(!this.issuerKeys)throw new Error("No signing keys are defined");e=this.issuerKeys}if(!e[r]){if(!r||r&&!e[""])throw new Error(r?"No key set for conference ID "+r:"No default key set");r=""}const n=e[r];Array.isArray(n)?this.conferenceKeys=n:this.conferenceKeys=[n],this.recoverSignerInfo()}recoverSignerInfo(){const e={version:this.signedAttestation.domain.version,address:this.signedAttestation.domain.verifyingContract,chainId:this.signedAttestation.domain.chainId},t=new a.Offchain(e),r=s.ethers.utils._TypedDataEncoder.hash(t.getDomainTypedData(),{Attest:a.ATTESTATION_TYPE},this.signedAttestation.message);this.signerPublicKey=s.ethers.utils.recoverPublicKey(r,this.signedAttestation.signature),this.signerAddress=s.ethers.utils.recoverAddress(r,this.signedAttestation.signature)}verify(){if(!this.conferenceKeys)throw new Error("Issuer keys are not defined");for(const e of this.conferenceKeys)if(this.signerPublicKey.substring(2)===e.getPublicKeyAsHexStr())return!0;throw new Error("Ticket signature is invalid")}getSignerKeyPair(){return y.KeyPair.fromPublicHex(this.signerPublicKey)}getSignerKey(){return this.signerPublicKey}getSignerAddress(){return this.signerAddress}getCommitment(){return(0,d.hexStringToUint8)(this.getAttestationField("commitment"))}getDerEncoding(){return(0,d.uint8tohex)(new Uint8Array(this.getAsnEncoded(!1)))}fromBytes(e,t){this.loadAsnEncoded(e,t)}}t.EasTicketAttestation=m},9771:(e,t,r)=>{"use strict";t.U=void 0;const n=r(80716),i=r(55050),o=r(65185),f=r(6549),a=r(58015),s=r(27309),c=r(19421),l=r(3810),u=r(89194);t.U=class{constructor(e,t){this.schema=e,this.rpcMap=t}getUseTicket(e,t,r,s,d,h,p){try{h=o.KeyPair.parseKeyArrayStrings(h)}catch(e){throw(0,i.logger)(c.DEBUGLEVEL.LOW,e),new Error("Issuer key error")}const y=new f.EasTicketAttestation(this.schema,void 0,this.rpcMap);let b;if(y.loadFromEncoded(r,h),"eas"===p){const r=new l.EASIdentifierAttestation(void 0,o.KeyPair.publicFromBase64orPEM(d));r.loadFromEncoded(s);const n=new u.EasAttestedObject;n.create(y,e,r,t),b=n.getEncoded()}else{const r=n.SignedIdentifierAttestation.fromBytes((0,i.base64ToUint8array)(s),o.KeyPair.publicFromBase64orPEM(d));let f=new a.AttestedObject;f.create(y,r,t,e),b=f.getDerEncoding()}return(0,i.hexStringToBase64)(b)}async validateUseTicket(e,t,r,n,c){let d=o.KeyPair.publicFromBase64orPEM(t),h=o.KeyPair.parseKeyArrayStrings(r);const p=this,y=class extends f.EasTicketAttestation{constructor(){super(p.schema,void 0,p.rpcMap,h)}};if("eas"!==c){const t=a.AttestedObject.fromBytes((0,i.base64ToUint8array)(e),s.UseToken,d,y,h);if(!t.checkValidity(n))throw new Error("Ticket validity check failed!");return await t.getAttestableObject().validateEasAttestation(),t}{const t=class extends l.EASIdentifierAttestation{constructor(){super(void 0,d)}},r=u.EasAttestedObject.fromBytes((0,i.base64ToUint8array)(e),y,t);await r.checkValidity(n)}}}},68810:(e,t,r)=>{"use strict";t._F=void 0;var n=r(84102);Object.defineProperty(t,"_F",{enumerable:!0,get:function(){return n.Authenticator}});var i=r(73506);var o=r(5393)},4625:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestableObject=void 0;t.AttestableObject=class{constructor(){}getDerEncoding(){return this.encoded}getCommitment(){return this.commitment}}},86085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Attestation=void 0;const n=r(55050),i=r(39980),o=r(54759),f=r(65185),a=r(13649),s=r(54288),c=r(19421);class l{constructor(){this.version=18,this.blockchainFriendly=!0}parseNames(e){let t={};Object.keys(a.X500NamesLabels).forEach((e=>{t[a.X500NamesLabels[e].toLowerCase()]=e}));let r=[];return e.forEach((e=>{let n=t[e.type.toString().toLowerCase()];if(!n)throw new Error(`X500 with name ${e.type.toString()} not implemented yet.`);r.push(`${n}="${e.value}"`)})),r.join(",")}fromBytes(e){const t=this;let r=i.AsnParser.parse(e,o.SignedInfo);if(t.signedInfo=e,t.version=r.version.version,t.serialNumber=r.serialNumber,t.signingAlgorithm=r.signature.algorithm.toString(),r.validity){if(t.notValidBefore=r.validity.notBefore.generalizedTime?.getTime(),t.notValidAfter=r.validity.notAfter.generalizedTime?.getTime(),r.validity.notAfterInt&&Number(r.validity.notAfterInt)!=Math.floor(t.notValidAfter/1e3)||r.validity.notBeforeInt&&Number(r.validity.notBeforeInt)!=Math.floor(t.notValidBefore/1e3))throw new Error("Date doesnt fit");void 0===r.validity.notBeforeInt||void 0===r.validity.notAfterInt?this.blockchainFriendly=!1:this.blockchainFriendly=!0}let n=r.subject.rdnSequence;t.subject="",n&&n[0]&&n[0].length&&(t.subject=this.parseNames(n[0])),t.subjectKey=f.KeyPair.publicFromSubjectPublicKeyInfo(r.subjectPublicKeyInfo);let a=r.issuer.rdnSequence;if(t.issuer="",a?.length&&(t.issuer=this.parseNames(a[0])),r.contract&&(t.smartcontracts=r.contract),r.attestsTo&&r.attestsTo.extensions)t.extensions=r.attestsTo.extensions,t.commitment=new Uint8Array(t.extensions.extension.extnValue);else if(r.attestsTo&&r.attestsTo.dataObject)throw new Error("Implement parse dataObject")}isValidX509(){return 0!=this.version&&1!=this.version&&2!=this.version?((0,n.logger)(c.DEBUGLEVEL.LOW,"Incorrect version number"),!1):this.issuer?null==this.notValidBefore||null==this.notValidAfter?((0,n.logger)(c.DEBUGLEVEL.LOW,"Validity period not set"),!1):null==this.subject?((0,n.logger)(c.DEBUGLEVEL.LOW,"Subject info not set"),!1):this.subjectKey?null!=this.smartcontracts?((0,n.logger)(c.DEBUGLEVEL.LOW,"Smart contract info set"),!1):null!=this.dataObject?((0,n.logger)(c.DEBUGLEVEL.LOW,"Data object set"),!1):null!=this.version&&null!=this.serialNumber&&null!=this.signingAlgorithm||((0,n.logger)(c.DEBUGLEVEL.LOW,"Version, serial number, subject or algorithm missing"),!1):((0,n.logger)(c.DEBUGLEVEL.LOW,"No subject public key info set"),!1):((0,n.logger)(c.DEBUGLEVEL.LOW,"Issuer info not set"),!1)}getDerEncoding(){if(this.signedInfo||(this.signedInfo=this.getPrehash()),!this.signedInfo)throw new Error("Empty Attestaion Der Encoding");return(0,n.uint8tohex)(new Uint8Array(this.signedInfo))}getCommitment(){return this.commitment}getNotValidBefore(){return this.notValidBefore}setNotValidBefore(e){this.notValidBefore=e}getNotValidAfter(){return this.notValidAfter}setNotValidAfter(e){this.notValidAfter=e}getSubjectPublicKeyInfo(){return this.subjectKey}checkValidity(){if(null==this.version)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest version missed"),!1;if(null==this.serialNumber)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest serial number missed"),!1;if(null==this.subject)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest subject missed"),!1;if(null==this.signingAlgorithm)return(0,n.logger)(c.DEBUGLEVEL.LOW,"Attest signing algorithm missed"),!1;let e=this.getNotValidBefore(),t=this.getNotValidAfter(),r=new s.Timestamp(e);return r.setValidity(t-e),!!r.validateAgainstExpiration(t)&&(null==this.extensions||null==this.dataObject||((0,n.logger)(c.DEBUGLEVEL.LOW,"Both Extensions and dataObject not allowed"),!1))}getExtensions(){return this.extensions}setVersion(e){this.version=e}getVersion(){return this.version}setSubject(e){this.subject=e}getSubject(){return this.subject}setSigningAlgorithm(e){this.signingAlgorithm=e}getPrehash(){if(!this.checkValidity())throw new Error("Attestation invalid");let e=a.Asn1Der.encode("TAG",a.Asn1Der.encode("INTEGER",this.version),0)+a.Asn1Der.encode("INTEGER",this.serialNumber)+a.Asn1Der.encodeObjectId(this.signingAlgorithm);if(e+=this.issuer?a.Asn1Der.encodeName(this.issuer):a.Asn1Der.encode("NULL_VALUE",""),null!=this.notValidAfter&&null!=this.notValidBefore){let t=a.Asn1Der.encode("GENERALIZED_TIME",this.notValidBefore)+(this.blockchainFriendly?a.Asn1Der.encode("INTEGER",Math.floor(this.notValidBefore/1e3)):"")+a.Asn1Der.encode("GENERALIZED_TIME",this.notValidAfter)+(this.blockchainFriendly?a.Asn1Der.encode("INTEGER",Math.floor(this.notValidAfter/1e3)):"");e+=a.Asn1Der.encode("SEQUENCE_30",t)}else e+=a.Asn1Der.encode("NULL_VALUE","");e+=this.subject?a.Asn1Der.encodeName(this.subject):a.Asn1Der.encode("NULL_VALUE",""),e+=this.subjectKey?this.subjectKey.getAsnDerPublic():a.Asn1Der.encode("NULL_VALUE",""),null!=this.smartcontracts&&(e+=this.smartcontracts);let t="";return this.commitment&&this.commitment.length&&(t=a.Asn1Der.encode("OBJECT_ID",l.OID_OCTETSTRING)+a.Asn1Der.encode("BOOLEAN",1)+a.Asn1Der.encode("OCTET_STRING",(0,n.uint8tohex)(this.commitment))),t&&(e+=a.Asn1Der.encode("TAG",a.Asn1Der.encode("SEQUENCE_30",a.Asn1Der.encode("SEQUENCE_30",t)),3)),null!=this.dataObject&&(e+=a.Asn1Der.encode("TAG",a.Asn1Der.encode("SEQUENCE_30",a.Asn1Der.encode("SEQUENCE_30",this.dataObject)),4)),(0,n.hexStringToUint8)(a.Asn1Der.encode("SEQUENCE_30",e))}getSigningAlgorithm(){return this.signingAlgorithm}}t.Attestation=l,l.OID_OCTETSTRING="1.3.6.1.4.1.1466.115.121.1.40"},5393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationCrypto=t.Pedestren_H=t.Pedestren_G=void 0;const n=r(61602),i=r(93431),o=r(55050),f=r(98478),a=r(19421),s=r(86332);let c=r(91094);t.Pedestren_G=new i.Point(21282764439311451829394129092047993080259557426320933158672611067687630484067n,3813889942691430704369624600187664845713336792511424430006907067499686345744n,i.CURVE_BN256),t.Pedestren_H=new i.Point(10844896013696871595893151490650636250667003995871483372134187278207473369077n,9393217696329481319187854592386054938412168121447413803797200472841959383227n,i.CURVE_BN256);class l{constructor(){if(this.curveOrderBitLength=254n,this.rand=this.makeSecret(),!this.verifyCurveOrder())throw new Error("Static values do not work with current implementation")}verifyCurveOrder(){l.validatePointToCurve(l.G,l.curve),l.validatePointToCurve(l.H,l.curve);let e=BigInt(l.curveOrder.toString(2).length);return!(l.curveOrder<1n<>e>0n)||((0,o.logger)(a.DEBUGLEVEL.LOW,"Curve order is not 254 bits which is required by the current implementation"),!1)}getType(e){switch(e.toLowerCase()){case"mail":return n.ATTESTATION_TYPE.mail;case"phone":return n.ATTESTATION_TYPE.phone;case"inetpersona":return n.ATTESTATION_TYPE.InetPersona;default:throw new Error("Wrong type of identifier")}}makeCommitment(e,r,n){let i=this.mapToCurveMultiplier(r,e);return t.Pedestren_G.multiplyDA(i).add(t.Pedestren_H.multiplyDA(n)).getEncoded(!1)}makeCommitmentFromHiding(e,r,n){if(!l.validatePointToCurve(n,l.curve))throw new Error("Point invalid");let i=this.mapToCurveMultiplier(r,e);return t.Pedestren_G.multiplyDA(i).add(n).getEncoded(!1)}injectIdentifierType(e,t){return(0,o.uint8merge)([Uint8Array.from([0,0,0,e]),t])}mapToInteger(e){return BigInt("0x"+c.keccak256(e))>>256n-this.curveOrderBitLength}mapToCurveMultiplier(e,t){let r=Uint8Array.from((0,o.stringToArray)(t.trim().toLowerCase())),n=this.injectIdentifierType(e,r),f=(0,o.uint8ToBn)(n);do{f=this.mapToInteger((0,o.bnToUint8)(f))}while(f>=i.CURVE_BN256.n);return f}computePoint_bn256(e){let t=i.CURVE_BN256.P;e=(0,o.mod)(e,t);let r,n,f,a=0n,s=0n,c=t+1n>>2n,l=t-1n>>1n;do{do{e=(0,o.mod)(e+1n),s=(0,o.mod)((0,o.BnPowMod)(e,3n,t)+i.CURVE_BN256.A*e+i.CURVE_BN256.B),f=(0,o.BnPowMod)(s,l,t)}while(1n!==f);a=(0,o.BnPowMod)(s,c,t),r=new i.Point(e,a,i.CURVE_BN256),r.x>t>>1n&&(r=new i.Point(e,t-a,i.CURVE_BN256)),n=r.multiplyDA(i.CURVE_BN256.n-1n),n.y>t>>1n&&(n=new i.Point(n.x,t-n.y,i.CURVE_BN256))}while(!r.equals(n)||r.isInfinity());return r}makeSecret(e=48){return(0,o.mod)(BigInt(l.generateRandomHexString(e)),i.CURVE_BN256.n)}static generateRandomHexString(e){var t=new Uint8Array(e);"undefined"!=typeof window&&window.crypto?window.crypto.getRandomValues(t):t=new Uint8Array(s.randomBytes(e));let r="0x";for(var n=0;n=i.CURVE_BN256.n);return u=(0,o.mod)(c+l*r,i.CURVE_BN256.n),f.FullProofOfExponent.fromData(e,s,u,a)}computeChallenge(e,t,r){let n=t.concat(e),i=this.makeArray(n),f=(0,o.uint8merge)([i,r]);return this.mapToInteger(f)}verifyFullProof(e){if(!e.validateParameters())return(0,o.logger)(2,"The parameters in the ZK proof are not correct"),!1;let r=this.computeChallenge(e.getPoint(),[t.Pedestren_H,e.getRiddle()],e.getNonce());return this.verifyPok(e,r)}verifyEqualityProof(e,r,n){if(!n.validateParameters())return(0,o.logger)(2,"The parameters in the ZK proof are not correct"),!1;let a=i.Point.decodeFromUint8(e,i.CURVE_BN256);l.validatePointToCurve(a,i.CURVE_BN256);let s=i.Point.decodeFromUint8(r,i.CURVE_BN256);l.validatePointToCurve(s,i.CURVE_BN256);let c=a.subtract(s),u=this.computeChallenge(n.getPoint(),[t.Pedestren_H,a,s],n.getNonce());return this.verifyPok(f.FullProofOfExponent.fromData(c,n.getPoint(),n.getChallengeResponse(),n.getNonce()),u)}verifyPok(e,r){if(r>=i.CURVE_BN256.n||r<=0n)return(0,o.logger)(2,"Challenge is not of the correct size"),!1;let n=t.Pedestren_H.multiplyDA(e.getChallengeResponse()),f=e.getRiddle().multiplyDA(r).add(e.getPoint());return n.equals(f)}makeArray(e){let t=new Uint8Array(0);return e.forEach((e=>{t=new Uint8Array([...t,...e.getEncoded(!1)])})),t}static hashWithKeccak(e){return c.keccak256(e)}static validatePointToCurve(e,t){try{if(e.isInfinity())throw new Error("Point is at infinity");if(!e.multiplyDA(i.CURVE_BN256.n).isInfinity())throw console.log("Point does not have correct order"),new Error("Point does not have correct order")}catch(e){return!1}return!0}}t.AttestationCrypto=l,l.OID_SIGNATURE_ALG="1.2.840.10045.2.1",l.BYTES_IN_DIGEST=32,l.fieldSize=i.CURVE_BN256.P,l.curveOrder=i.CURVE_BN256.n,l.cofactor=1n,l.curve=i.CURVE_BN256,l.G=t.Pedestren_G,l.H=t.Pedestren_H},94807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationRequest=void 0;const n=r(93431),i=r(13649),o=r(55050),f=r(5393),a=r(98478),s=r(39980),c=r(61709),l=r(19421);t.AttestationRequest=class{constructor(){}static fromData(e,t){let r=new this;if(r.type=e,r.pok=t,!r.verify())throw new Error("The proof is not valid");return r}getDerEncoding(){let e=i.Asn1Der.encode("INTEGER",this.type)+this.pok.getDerEncoding();return i.Asn1Der.encode("SEQUENCE_30",e)}static fromBytes(e){let t,r=new this;try{t=s.AsnParser.parse(e,c.Identifier),r.type=t.type}catch(e){throw new Error("Cant parse AttestationRequest Identifier")}try{let e=new Uint8Array(t.proof.riddle),i=new Uint8Array(t.proof.challengePoint),f=new Uint8Array(t.proof.responseValue),s=new Uint8Array(t.proof.nonce),c=n.Point.decodeFromHex((0,o.uint8tohex)(e),n.CURVE_BN256),l=(0,o.uint8ToBn)(i),u=n.Point.decodeFromHex((0,o.uint8tohex)(f),n.CURVE_BN256);r.pok=a.FullProofOfExponent.fromData(c,u,l,s)}catch(e){throw new Error("Cant create FullProofOfExponent")}if(!r.verify())throw new Error("Could not verify the proof");return(0,o.logger)(l.DEBUGLEVEL.HIGH,"proof OK"),r}verify(){return!!(new f.AttestationCrypto).verifyFullProof(this.pok)&&((0,o.logger)(l.DEBUGLEVEL.HIGH,"VerifyAttestationRequestProof OK"),!0)}getPok(){return this.pok}getType(){return this.type}getAsn(){const e=this.getPok().getAsnType(),t=new c.Identifier;return t.type=this.getType(),t.proof=e,t}getAsnEncoded(){return s.AsnSerializer.serialize(this.getAsn())}}},81453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestationRequestWithUsage=void 0;const n=r(65185),i=r(98478),o=r(84962),f=r(39980),a=r(55050),s=r(93431),c=r(5393),l=r(13649),u=r(19421);t.AttestationRequestWithUsage=class{constructor(){}static fromData(e,t,r){let n=new this;if(n.type=e,n.pok=t,n.sessionPublicKey=r,!n.verify())throw new Error("Could not verify the proof");return n}static fromBytes(e){let t,r=new this;try{t=f.AsnParser.parse(e,o.Identifier),r.type=t.type,r.sessionPublicKey=n.KeyPair.publicFromSubjectPublicKeyValue(t.sessionKey)}catch(e){throw new Error("Cant parse AttestationRequest Identifier")}try{let e=new Uint8Array(t.proof.riddle),n=new Uint8Array(t.proof.challengePoint),o=new Uint8Array(t.proof.responseValue),f=new Uint8Array(t.proof.nonce),c=s.Point.decodeFromHex((0,a.uint8tohex)(e),s.CURVE_BN256),l=(0,a.uint8ToBn)(n),u=s.Point.decodeFromHex((0,a.uint8tohex)(o),s.CURVE_BN256);r.pok=i.FullProofOfExponent.fromData(c,u,l,f)}catch(e){throw new Error("Cant create FullProofOfExponent")}if(!r.verify())throw new Error("Could not verify the proof");return(0,a.logger)(u.DEBUGLEVEL.HIGH,"proof OK"),r}verify(){return!!(new c.AttestationCrypto).verifyFullProof(this.pok)}getDerEncoding(){let e=l.Asn1Der.encode("INTEGER",this.type)+this.pok.getDerEncoding()+this.sessionPublicKey.getAsnDerPublic();return l.Asn1Der.encode("SEQUENCE_30",e)}getPok(){return this.pok}getType(){return this.type}getSessionPublicKey(){return this.sessionPublicKey}}},58015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttestedObject=void 0;const n=r(5393),i=r(80716),o=r(55050),f=r(13649),a=r(39980),s=r(8441),c=r(3365),l=r(19421);class u{constructor(){}create(e,t,r,i){this.attestableObject=e,this.att=t,this.attestationSecret=r,this.objectSecret=i,this.crypto=new n.AttestationCrypto,this.pok=this.makeProof(r,i,this.crypto),this.derEncodedProof=this.pok.getDerEncoding(),this.fillPresignData()}setWebDomain(e){this.webDomain=e}fillPresignData(){this.preSignEncoded=this.attestableObject.getDerEncoding()+this.att.getDerEncoding()+this.pok.getDerEncoding(),this.encoding=f.Asn1Der.encode("SEQUENCE_30",this.preSignEncoded)}fromDecodedData(e,t,r){this.attestableObject=e,this.att=t,this.pok=r,this.fillPresignData(),this.userKeyPair=this.att.getUnsignedAttestation().getSubjectPublicKeyInfo(),this.constructorCheck()}verify(){return this.attestableObject.verify()?this.att.verify()?!!this.crypto.verifyEqualityProof(this.att.getUnsignedAttestation().getCommitment(),this.attestableObject.getCommitment(),this.pok)||((0,o.logger)(l.DEBUGLEVEL.LOW,"Could not verify the consistency between the commitment in the attestation and the attested object"),!1):((0,o.logger)(l.DEBUGLEVEL.LOW,"Could not verify attestation"),!1):((0,o.logger)(l.DEBUGLEVEL.LOW,"Could not verify attestable object"),!1)}static fromBytes(e,t,r,o,f){let c=a.AsnParser.parse(e,t),l=new this;l.attestableObject=new o,l.attestableObject.fromBytes(c.signedToken,f),l.att=i.SignedIdentifierAttestation.fromBytes(new Uint8Array(c.attestation),r);let u=new s.UsageProofOfExponent;return u.fromBytes(new Uint8Array(c.proof)),l.pok=u,l.userKeyPair=l.att.getUnsignedAttestation().getSubjectPublicKeyInfo(),l.crypto=new n.AttestationCrypto,l.constructorCheck(),l}makeProof(e,t,r){let n=this.att.getUnsignedAttestation().getCommitment(),i=this.attestableObject.getCommitment(),f=r.computeEqualityProof((0,o.uint8tohex)(n),(0,o.uint8tohex)(i),e,t);if(!r.verifyEqualityProof(n,i,f))throw new Error("The redeem proof did not verify");return f}getAttestableObject(){return this.attestableObject}getAtt(){return this.att}getDerEncodeProof(){return this.derEncodedProof}getDerEncoding(){return this.encoding}constructorCheck(){if(!this.verify())throw new Error("The redeem request is not valid")}checkValidity(e=""){try{let e=this.att.getUnsignedAttestation().getDerEncoding();if(!c.IdentifierAttestation.fromBytes(new Uint8Array((0,o.hexStringToArray)(e))).checkValidity())return(0,o.logger)(l.DEBUGLEVEL.LOW,"The attestation is not a valid standard attestation"),!1}catch(e){return(0,o.logger)(l.DEBUGLEVEL.LOW,"The attestation is invalid"),!1}try{if(!this.getAttestableObject().checkValidity())return(0,o.logger)(l.DEBUGLEVEL.LOW,"Cheque is not valid"),!1}catch(e){return(0,o.logger)(l.DEBUGLEVEL.LOW,"Cheque validation failed"),!1}if(!e)return!0;try{let t=this.getAtt().getUnsignedAttestation().getAddress();if((0,o.logger)(l.DEBUGLEVEL.HIGH,"attestationEthereumAddress: "+t),(0,o.logger)(l.DEBUGLEVEL.HIGH,"providedEthereumAddress: "+e),t.toLowerCase()!==e.toLowerCase())return(0,o.logger)(l.DEBUGLEVEL.LOW,"The attestation is not to the same Ethereum user who is sending this request"),!1}catch(e){return(0,o.logger)(l.DEBUGLEVEL.LOW,"Address validation failed"),(0,o.logger)(l.DEBUGLEVEL.MEDIUM,e),!1}return!0}}t.AttestedObject=u,u.Eip712UserData={payload:"",description:"",timestamp:0},u.Eip712UserDataTypes=[{name:"payload",type:"string"},{name:"description",type:"string"},{name:"timestamp",type:"uint256"}],u.Eip712UserDataPrimaryName="Authentication",u.Eip712UserDataDescription="Single-use authentication"},13649:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Asn1Der=t.X500NamesLabels=void 0;const n=r(55050),i=r(19421),o=(r(94956),{END_OF_CONTENT:0,BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,NULL_VALUE:5,OBJECT_ID:6,OBJECT_DESCRIPTOR:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED_PDV:11,UTF8STRING:12,RELATIVE_OID:13,SEQUENCE_10:16,SET_OF:17,NUMERABLE_STRING:18,PRINTABLE_STRING:19,T61STRING:20,VIDEO_TEX_STRING:21,IA5STRING:22,UTC_TIME:23,GENERALIZED_TIME:24,GRAPHIC_STRING:25,VISIBLE_STRING:26,GENERAL_STRING:27,UNIVERSAL_STRING:28,CHARACTER_STRING:29,BMP_STRING:30,SEQUENCE_30:48,SET:49}),f={0:"END_OF_CONTENT",1:"BOOLEAN",2:"INTEGER",3:"BIT_STRING",4:"OCTET_STRING",5:"NULL_VALUE",6:"OBJECT_ID",7:"OBJECT_DESCRIPTOR",8:"EXTERNAL",9:"REAL",10:"ENUMERATED",11:"EMBEDDED_PDV",12:"UTF8STRING",13:"RELATIVE_OID",16:"SEQUENCE_10",19:"PRINTABLE_STRING",22:"IA5STRING",24:"GENERALIZED_TIME",26:"VISIBLE_STRING",48:"SEQUENCE_30",49:"SET"};t.X500NamesLabels={CN:"2.5.4.3",C:"2.5.4.6",O:"2.5.4.10",OU:"2.5.4.11",L:"2.5.4.7",labeledURI:"1.3.6.1.4.1.250.1.57"};class a{static encodeAsInteger(e){return this.encode("INTEGER",e)}static encodeObjectId(e){return a.encode("SEQUENCE_30",a.encode("OBJECT_ID",e))}static parseX500Names(e){let r=e.matchAll(/(\w+)=("[^"]+"|[\w\.]+)/g),n="";if(!r)throw new Error("wrong Name format");let i=[];for(const e of r){let r=e[1],o=e[2];if('"'==o.substr(0,1)&&'"'==o.substr(-1)&&(o=o.slice(1,o.length-1)),n=t.X500NamesLabels[r],!n)throw new Error('Type "'+r+'" not implemented yet');i.push({type:r,value:o})}return i}static encodeName(e){let r="";return a.parseX500Names(e).forEach((e=>{let n=t.X500NamesLabels[e.type];if(!n)throw new Error(`X500 Name Object ID not implemented.(${e.value})`);let i=a.encode("OBJECT_ID",n)+a.encode("UTF8STRING",e.value);r+=a.encode("SEQUENCE_30",i)})),a.encode("SEQUENCE_30",a.encode("SET",r))}static encode(e,t,r=0){if(void 0===t)throw new Error("Missing value for Der encoding");let i=o[e],f="";switch(e){case"OBJECT_ID":if("string"!=typeof t)throw new Error("OBJECT_ID value must be a string");let o=t.split("."),a=o.shift(),s=o.shift();if(!a||!s)throw new Error("OBJECT_ID parse error.");o.unshift((40*parseInt(a)+parseInt(s)).toString()),o.forEach((e=>{let t=parseInt(e),r="",n=!0;do{let e=127&t;t>>=7,e+=n?0:128,r=e.toString(16).padStart(2,"0")+r,n=!1}while(t);f+=r}));break;case"NULL_VALUE":f="";break;case"GENERALIZED_TIME":f=(0,n.stringToHex)((0,n.formatGeneralizedDateTime)(t));break;case"VISIBLE_STRING":case"UTF8STRING":f=(0,n.stringToHex)(t);break;case"INTEGER":f=BigInt(t).toString(16),f=(f.length%2?"0":"")+f,parseInt("0x"+f.slice(0,1),16)>7&&(f="00"+f);break;case"TAG":if(r>15)throw new Error("DER TAG more than 15 is not implemented");i=parseInt("0xA"+r);case"SEQUENCE_30":case"SET":case"OCTET_STRING":if("string"==typeof t)f=t;else{if(t.constructor!==Uint8Array)throw new Error("Wrong data type for OCTET_STRING");f=(0,n.uint8tohex)(t)}break;case"BIT_STRING":f="00"+t;break;case"BOOLEAN":f=parseInt(t).toString().padStart(2,"0");break;default:throw new Error("Sorry, "+e+" not implemented.")}let a="",s=Math.ceil(f.length/2),c=s.toString(16);return s||(c="00"),c=(c.length%2?"0":"")+c,a=s<128?c:(128+Math.round(c.length/2)).toString(16)+c,f=(f.length%2?"0":"")+f,i.toString(16).padStart(2,"0")+a+f}decode(e){let t=Array.from(e);return this.read(t)}lenEncoded(e){if(!e.length)throw new Error("Empty DER length");let t=e.shift();if(t<128)return t;if(t>128){let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712AttestationRequest=void 0;const n=r(94807),i=r(65185),o=r(14246),f=r(55050),a=r(92219),s=r(9567),c=r(54288),l=r(19421);class u extends s.Eip712Token{constructor(e=undefined,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS){super(),this.Eip712UserDataTypes=[{name:"payload",type:"string"},{name:"description",type:"string"},{name:"timestamp",type:"string"},{name:"identifier",type:"string"}],this.Eip712UserDataPrimaryName="AttestationRequest",this.Eip712UserDataDescription="Linking Ethereum address to phone or email",e&&(this.userKey=e),this.acceptableTimeLimit=t,this.usageValue=this.Eip712UserDataDescription}setUsageValue(e){this.usageValue=e}async addData(e,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS,r,n){this.setDomain(e),this.attestationRequest=n,this.acceptableTimeLimit=t,this.jsonEncoding=await this.makeToken(r);try{this.fillJsonData(this.jsonEncoding)}catch(e){return(0,f.logger)(l.DEBUGLEVEL.LOW,e),!1}}fillJsonData(e){if(!e)throw new Error("Empty json");this.jsonEncoding=e;let t=JSON.parse(e),r=t.signatureInHex,a=JSON.parse(t.jsonSigned);this.eip712DomainData=a.domain,this.data=a.message;try{let e=o.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(a,r);this.requestorKeys=i.KeyPair.fromPublicHex(e.substr(2)),(0,f.logger)(l.DEBUGLEVEL.HIGH,"restored address: "+this.requestorKeys.getAddress())}catch(e){let t="Recover Address failed with error:"+e;throw(0,f.logger)(l.DEBUGLEVEL.LOW,t,e),new Error(t)}this.attestationRequest||(this.attestationRequest=n.AttestationRequest.fromBytes((0,f.base64ToUint8array)(this.data.payload))),this.constructorCheck()}constructorCheck(){if(!this.verify())throw new Error("Could not verify Eip712 AttestationRequest");(0,f.logger)(l.DEBUGLEVEL.HIGH,"Eip712 Attestaion Request verify OK")}async makeToken(e){let t;t=this.userKey?this.userKey.getAddress():await o.SignatureUtility.connectMetamaskAndGetAddress();let r=a.Nonce.getTimestamp(this.attestationRequest.getPok().getNonce()),n=new c.Timestamp(r).getTimeAsString(),i={payload:(0,f.hexStringToBase64Url)(this.attestationRequest.getDerEncoding()),description:this.usageValue,timestamp:n,identifier:e};return await o.SignatureUtility.signEIP712WithBrowserWallet(this.domain,i,this.Eip712UserDataTypes,this.Eip712UserDataPrimaryName,this.userKey)}setAcceptableTimeLimit(e){this.acceptableTimeLimit=e}getJsonEncoding(){return this.jsonEncoding}verify(){return!!this.attestationRequest.verify()||((0,f.logger)(l.DEBUGLEVEL.MEDIUM,"Could not verify proof"),!1)}checkValidity(){if(!this.validateDomain(this.eip712DomainData))return(0,f.logger)(l.DEBUGLEVEL.MEDIUM,"Domain invalid"),!1;if(this.data.description!==this.usageValue)return(0,f.logger)(l.DEBUGLEVEL.MEDIUM,"Description is not correct. :"+this.data.description+" !== "+this.usageValue),!1;let e=new c.Timestamp(this.data.timestamp);return e.setValidity(this.acceptableTimeLimit),e.validateTimestamp()?!!(new a.Nonce).validateNonce(this.getPok().getNonce(),this.requestorKeys.getAddress(),this.domain,c.Timestamp.stringTimestampToLong(this.data.timestamp)-this.acceptableTimeLimit,c.Timestamp.stringTimestampToLong(this.data.timestamp)+this.acceptableTimeLimit)||((0,f.logger)(l.DEBUGLEVEL.LOW,"nonce is not correct"),!1):((0,f.logger)(l.DEBUGLEVEL.LOW,`timestamp is not correct. timestamp = ${this.data.timestamp}, acceptableTimeLimit = ${this.acceptableTimeLimit}`),!1)}getIdentifier(){return this.data.identifier}getType(){return this.attestationRequest.getType()}getPok(){return this.attestationRequest.getPok()}getUserPublicKey(){return this.requestorKeys}}t.Eip712AttestationRequest=u},95899:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712AttestationRequestWithUsage=void 0;const n=r(81453),i=r(65185),o=r(55050),f=r(14246),a=r(92219),s=r(9567),c=r(54288),l=r(19421);class u extends s.Eip712Token{constructor(e=undefined,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS,r=c.Timestamp.DEFAULT_TOKEN_TIME_LIMIT){super(),this.Eip712UserDataTypes=[{name:"payload",type:"string"},{name:"description",type:"string"},{name:"identifier",type:"string"},{name:"timestamp",type:"string"},{name:"expirationTime",type:"string"}],this.Eip712UserDataPrimaryName="AttestationRequestWUsage",this.Eip712UserDataDescription='Prove that the "identifier" is the identifier hidden in attestation contained in"payload" and use this to authorize usage of local, temporary keys.',e&&(this.userKey=e),this.acceptableTimeLimit=t,this.maxTokenValidityInMs=r}async fromData(e,t=c.Timestamp.DEFAULT_TIME_LIMIT_MS,r=c.Timestamp.DEFAULT_TOKEN_TIME_LIMIT,n,i,f=undefined){this.setDomain(e),f&&(this.userKey=f);try{this.acceptableTimeLimit=t,this.maxTokenValidityInMs=r,this.attestationRequestWithUsage=i,this.jsonEncoding=await this.makeToken(n,i)}catch(e){throw(0,o.logger)(l.DEBUGLEVEL.LOW,e),new Error("Could not encode object")}try{this.fillJsonData(this.jsonEncoding)}catch(e){throw new Error("Could not decode object")}}Eip712AttestationRequestWithUsage(e,t,r,n){try{this.acceptableTimeLimit=t,this.maxTokenValidityInMs=r,this.jsonEncoding=n,this.fillJsonData(this.jsonEncoding)}catch(e){throw(0,o.logger)(l.DEBUGLEVEL.LOW,e),new Error("Could not decode object")}}fillJsonData(e){if(!e)throw new Error("Empty json");this.jsonEncoding=e;let t=JSON.parse(e),r=t.signatureInHex,a=JSON.parse(t.jsonSigned);this.eip712DomainData=a.domain,this.data=a.message;try{let e=f.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(a,r);this.userPublicKey=i.KeyPair.fromPublicHex(e.substr(2)),(0,o.logger)(l.DEBUGLEVEL.HIGH,"Eip712 withUsage restored address: "+this.userPublicKey.getAddress())}catch(e){let t="Recover Address failed with error:"+e;throw(0,o.logger)(l.DEBUGLEVEL.LOW,t,e),new Error(t)}this.attestationRequestWithUsage||(this.attestationRequestWithUsage=n.AttestationRequestWithUsage.fromBytes((0,o.base64ToUint8array)(this.data.payload))),this.constructorCheck()}constructorCheck(){if(!this.verify())throw new Error("Could not verify Eip712 use attestation")}async makeToken(e,t){this.userKey||await f.SignatureUtility.connectMetamaskAndGetAddress();let r=(new c.Timestamp).getTimeAsString(),n=new c.Timestamp(Date.now()+this.maxTokenValidityInMs).getTimeAsString(),i={payload:(0,o.hexStringToBase64Url)(t.getDerEncoding()),description:this.Eip712UserDataDescription,timestamp:r,identifier:e,expirationTime:n};return await f.SignatureUtility.signEIP712WithBrowserWallet(this.domain,i,this.Eip712UserDataTypes,this.Eip712UserDataPrimaryName,this.userKey)}getIdentifier(){return this.data.identifier}getUserPublicKey(){return this.userPublicKey}getPok(){return this.attestationRequestWithUsage.getPok()}getType(){return this.attestationRequestWithUsage.getType()}getSessionPublicKey(){return this.attestationRequestWithUsage.getSessionPublicKey()}getJsonEncoding(){return this.jsonEncoding}checkValidity(){return!!this.testNonceAndDescription(this.acceptableTimeLimit)}checkTokenValidity(){let e=new c.Timestamp(this.data.timestamp);return e.setValidity(this.maxTokenValidityInMs),e.validateAgainstExpiration(c.Timestamp.stringTimestampToLong(this.data.expirationTime))?!!this.testNonceAndDescription(this.maxTokenValidityInMs):((0,o.logger)(l.DEBUGLEVEL.LOW,"time.validateAgainstExpiration filed"),!1)}testNonceAndDescription(e){if(!e)throw new Error("timeLimit required");let t=c.Timestamp.stringTimestampToLong(this.data.timestamp)-e,r=c.Timestamp.stringTimestampToLong(this.data.timestamp)+e;return!!(new a.Nonce).validateNonce(this.attestationRequestWithUsage.getPok().getNonce(),this.userPublicKey.getAddress(),this.domain,t,r)&&(this.validateDomain(this.eip712DomainData)?this.data.description===this.Eip712UserDataDescription:((0,o.logger)(l.DEBUGLEVEL.MEDIUM,"Domain invalid"),!1))}verify(){return!!this.attestationRequestWithUsage.verify()}}t.Eip712AttestationRequestWithUsage=u},22110:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712AttestationUsage=void 0;const n=r(65185),i=r(14246),o=r(9567),f=r(49674),a=r(55050),s=r(5393),c=r(93431),l=r(92219),u=r(54288),d=r(19421);class h extends o.Eip712Token{constructor(e=undefined,t=u.Timestamp.DEFAULT_TOKEN_TIME_LIMIT){super(),this.PLACEHOLDER_CHAIN_ID=0,this.Eip712PrimaryName="AttestationUsage",this.Eip712Description='Prove that the "identifier" is the identifier hidden in attestation contained in"payload".',this.Eip712UserTypes=[{name:"description",type:"string"},{name:"identifier",type:"string"},{name:"payload",type:"string"},{name:"timestamp",type:"string"},{name:"expirationTime",type:"string"}],this.maxTokenValidityInMs=t,e&&(this.userKey=e)}async addData(e,t,r){this.setDomain(e),this.useAttestation=r;try{this.jsonEncoding=await this.makeToken(t,r)}catch(e){throw(0,a.logger)(d.DEBUGLEVEL.LOW,e),new Error("Could not encode object. "+e)}try{this.fillJsonData(this.jsonEncoding)}catch(e){return(0,a.logger)(d.DEBUGLEVEL.LOW,e),!1}this.constructorCheck()}fillJsonData(e,t=undefined){if(!e)throw new Error("Empty json");t&&(this.attestorKey=t),this.jsonEncoding=e;let r=JSON.parse(e),o=r.signatureInHex,s=JSON.parse(r.jsonSigned);this.eip712DomainData=s.domain,this.data=s.message;try{let e=i.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(s,o);this.requestorKeys=n.KeyPair.fromPublicHex(e.substr(2)),(0,a.logger)(d.DEBUGLEVEL.HIGH,"restored address: "+this.requestorKeys.getAddress())}catch(e){let t="Recover Address failed with error:"+e;throw(0,a.logger)(d.DEBUGLEVEL.LOW,t,e),new Error(t)}if(!this.useAttestation)try{(0,a.logger)(d.DEBUGLEVEL.VERBOSE,(0,a.uint8tohex)((0,a.base64ToUint8array)(this.data.payload))),this.useAttestation=f.UseAttestation.fromBytes((0,a.base64ToUint8array)(this.data.payload),this.attestorKey)}catch(e){let t="Failed to read UseAttestation. "+e;throw(0,a.logger)(d.DEBUGLEVEL.MEDIUM,t,e),new Error(t)}this.constructorCheck()}constructorCheck(){if(!this.verify())throw new Error("Could not verify Eip712 use attestation")}async makeToken(e,t){this.userKey||await i.SignatureUtility.connectMetamaskAndGetAddress();let r={payload:(0,a.hexStringToBase64Url)(t.getDerEncoding()),description:this.Eip712Description,timestamp:(new u.Timestamp).getTimeAsString(),identifier:e,expirationTime:new u.Timestamp(Date.now()+this.maxTokenValidityInMs).getTimeAsString()};return await i.SignatureUtility.signEIP712WithBrowserWallet(this.domain,r,this.Eip712UserTypes,this.Eip712PrimaryName,this.userKey)}proofLinking(){let e=(new s.AttestationCrypto).mapToCurveMultiplier(this.getType(),this.getIdentifier());return!!c.Point.decodeFromUint8(this.getAttestation().getUnsignedAttestation().getCommitment(),c.CURVE_BN256).subtract(s.Pedestren_G.multiplyDA(e)).equals(this.getPok().getRiddle())||((0,a.logger)(d.DEBUGLEVEL.LOW,"candidateRiddle.equals(this.getPok().getRiddle()) error"),!1)}getPok(){return this.useAttestation.getPok()}getType(){return this.useAttestation.type}getIdentifier(){return this.data.identifier}getAttestation(){return this.useAttestation.getAttestation()}getJsonEncoding(){return this.jsonEncoding}checkTokenValidity(){let e=u.Timestamp.stringTimestampToLong(this.data.expirationTime)-this.maxTokenValidityInMs-2*u.Timestamp.ALLOWED_ROUNDING,t=u.Timestamp.stringTimestampToLong(this.data.expirationTime);if(!this.useAttestation.checkValidity())return(0,a.logger)(d.DEBUGLEVEL.LOW,"useAttestation.checkValidity failed"),!1;if(!this.validateDomain(this.eip712DomainData))return(0,a.logger)(d.DEBUGLEVEL.MEDIUM,"Domain invalid"),!1;if(this.data.description!=this.Eip712Description)return(0,a.logger)(d.DEBUGLEVEL.LOW,`wrong description: "${this.data.description}", must be "${this.Eip712Description}"`),!1;let r=new u.Timestamp(this.data.timestamp);return r.setValidity(this.maxTokenValidityInMs),r.validateAgainstExpiration(u.Timestamp.stringTimestampToLong(this.data.expirationTime))?this.requestorKeys.getAddress().toLowerCase()!==this.useAttestation.getAttestation().getUnsignedAttestation().getAddress().toLowerCase()?((0,a.logger)(d.DEBUGLEVEL.LOW,"wrong address"),!1):(new l.Nonce).validateNonce(this.useAttestation.getPok().getNonce(),this.useAttestation.getAttestation().getUnsignedAttestation().getAddress(),this.domain,e,t)?!!this.proofLinking()||((0,a.logger)(d.DEBUGLEVEL.LOW,"wrong proofLinking"),!1):((0,a.logger)(d.DEBUGLEVEL.LOW,"wrong Nonce"),!1):((0,a.logger)(d.DEBUGLEVEL.LOW,"verify timestamp failed.\n"+this.data.timestamp+"\n"+this.maxTokenValidityInMs+"\n"+this.data.expirationTime+"\n"+u.Timestamp.stringTimestampToLong(this.data.expirationTime)+"\n"),!1)}verify(){return!!this.useAttestation.verify()}getSessionPublicKey(){return this.useAttestation.getSessionPublicKey()}}t.Eip712AttestationUsage=h},9567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712Token=void 0;const n=r(75888);class i extends n.Eip712Validator{}t.Eip712Token=i},75888:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712Validator=void 0;const n=r(58015),i=r(27309),o=r(72353),f=r(65185),a=r(58204),s=r(14246),c=r(55050),l=r(19421);class u{constructor(){this.XMLConfig=o.XMLconfigData}static stringIsAValidUrl(e){let t;try{t=new URL(e)}catch(e){return(0,c.logger)(l.DEBUGLEVEL.LOW,"cant construct url. Error:",e),!1}return"http:"===t.protocol||"https:"===t.protocol}setDomainAndTimout(e){if(!u.stringIsAValidUrl(e))throw new Error("wrong domain");this.domain=e}setDomain(e){if(!u.stringIsAValidUrl(e))throw new Error("wrong domain");this.domain=e}getDomain(){return this.domain}setSalt(e){this.salt=e}getSalt(){return this.salt}setPrimaryName(e){this.primaryName=e}getPrimaryName(){return this.primaryName}setChainId(e){if(e<1)throw new Error("ChainId should be a positive number");this.chainId=e}getChainId(){return this.chainId}validateDomain(e){return e?e.name&&e.name.toLowerCase()===this.domain.toLowerCase()?e.version&&e.version===s.SignatureUtility.Eip712Data.PROTOCOL_VERSION?this.chainId&&e.chainId!==this.chainId?((0,c.logger)(l.DEBUGLEVEL.LOW,"Chain ID is wrong"),!1):this.verifyingContract&&e.verifyingContract!==this.verifyingContract?((0,c.logger)(l.DEBUGLEVEL.LOW,"Verifying contract is wrong"),!1):!this.salt||e.salt===this.salt||((0,c.logger)(l.DEBUGLEVEL.LOW,"Salt is wrong"),!1):((0,c.logger)(l.DEBUGLEVEL.LOW,"Protocol version is wrong"),!1):((0,c.logger)(l.DEBUGLEVEL.LOW,"Domain name is not valid"),!1):((0,c.logger)(l.DEBUGLEVEL.LOW,"Input param domainToCheck required"),!1)}retrieveAttestedObject(e){let t=e.payload,r=f.KeyPair.publicFromBase64orPEM(o.XMLconfigData.base64attestorPubKey),s=o.XMLconfigData.base64senderPublicKeys;return n.AttestedObject.fromBytes((0,c.hexStringToUint8)(t),i.UseToken,r,a.Ticket,s)}verifySignature(e,t){let r=JSON.parse(e),n=r.signatureInHex,i=JSON.parse(r.jsonSigned),o=s.SignatureUtility.recoverPublicKeyFromTypedMessageSignature(i,n),a=f.KeyPair.fromPublicHex(o.substr(2));return t.toLowerCase()!==i.message.address.toLowerCase()?((0,c.logger)(l.DEBUGLEVEL.LOW,"message.address is not equal pkAddress"),!1):t.toLowerCase()===a.getAddress().toLowerCase()||((0,c.logger)(l.DEBUGLEVEL.LOW,"Recovered address is not equal pkAddress"),!1)}}t.Eip712Validator=u},98478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FullProofOfExponent=void 0;const n=r(93431),i=r(61538),o=r(39980),f=r(55050),a=r(13649),s=r(8441),c=r(5393);class l{constructor(){}static fromData(e,t,r,n=new Uint8Array([])){let i=new this;return i.riddle=e,i.tPoint=t,i.challengeResponse=r,i.nonce=n,i.encoding=i.makeEncoding(e,t,r,n),i}static fromBytes(e){let t=o.AsnParser.parse(e,i.Proof);return this.fromASNType(t)}static fromASNType(e){let t=new Uint8Array(e.riddle),r=n.Point.decodeFromUint8(t,n.CURVE_BN256),i=new Uint8Array(e.challengePoint),o=(0,f.uint8ToBn)(i),a=new Uint8Array(e.responseValue),s=n.Point.decodeFromUint8(a,n.CURVE_BN256),c=new Uint8Array(e.nonce);return this.fromData(r,s,o,c)}static fromBase64(e){return l.fromBytes((0,f.base64ToUint8array)(e))}makeEncoding(e,t,r,n=new Uint8Array([])){let i=a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(e.getEncoded()))+a.Asn1Der.encode("OCTET_STRING",r.toString(16))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(t.getEncoded()))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(n));return a.Asn1Der.encode("SEQUENCE_30",i)}getRiddle(){return this.riddle}getPoint(){return this.tPoint}getChallengeResponse(){return this.challengeResponse}getNonce(){return this.nonce}getUsageProofOfExponent(){return s.UsageProofOfExponent.fromData(this.tPoint,this.challengeResponse,this.nonce)}getDerEncoding(){return this.encoding}getAsnType(){const e=new i.Proof;e.nonce=this.getNonce();let t=(0,f.bnToUint8)(this.getChallengeResponse());if(t.length<32){let e=t;t=new Uint8Array(32),t.set(e,32-e.length)}return e.challengePoint=t,e.riddle=this.getRiddle().getEncoded(),e.responseValue=this.getPoint().getEncoded(),e}validateParameters(){try{if(!c.AttestationCrypto.validatePointToCurve(this.riddle,c.AttestationCrypto.curve)||!c.AttestationCrypto.validatePointToCurve(this.tPoint,c.AttestationCrypto.curve))throw new Error("Point not in the curve");return!(this.challengeResponse<=0n||this.challengeResponse>=c.AttestationCrypto.curveOrder)&&(!this.riddle.equals(c.AttestationCrypto.G)&&!this.riddle.equals(c.AttestationCrypto.H)&&(!this.tPoint.equals(c.AttestationCrypto.G)&&!this.tPoint.equals(c.AttestationCrypto.H)))}catch(e){return!1}}}t.FullProofOfExponent=l},3365:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifierAttestation=void 0;const n=r(5393),i=r(86085),o=r(55050),f=r(19421),a=r(13649);class s extends i.Attestation{constructor(){super()}fromCommitment(e,t){this.subjectKey=t,this.setVersion(s.HIDDEN_IDENTIFIER_VERSION),this.setSubject("CN="),this.setSigningAlgorithm(s.DEFAULT_SIGNING_ALGORITHM),this.setSubjectPublicKeyInfo(t),this.setCommitment(e),this.type=s.HIDDEN_TYPE,this.identifier=s.HIDDEN_IDENTIFIER,this.setUnlimitedValidity()}setUnlimitedValidity(){super.setNotValidBefore(Date.now()),super.setNotValidAfter(Date.parse("31 Dec 9999 23:59:59"))}static fromData(e,t,r,i){let o=(new n.AttestationCrypto).makeCommitment(e,t,i),f=new this;return f.fromCommitment(o,r),f.type=t.toString(),f.identifier=e,f}static fromLabelAndUrl(e,t,r){let n=new this;return n.subjectKey=r,n.setVersion(s.NFT_VERSION),n.setSubject(n.makeLabeledURI(e,t)),n.setSigningAlgorithm(s.DEFAULT_SIGNING_ALGORITHM),n.setIssuer("CN=attestation.id"),n.setSerialNumber(1),n.setSubjectPublicKeyInfo(r),n.setUnlimitedValidity(),n.type=e,n.identifier=t,n}makeLabeledURI(e,t){return`${s.LABELED_URI_LABEL}="${t} ${e}"`}static fromBytes(e){let t=new this;if(t.fromBytes(e),!t.checkValidity())throw new Error("Could not validate object");if(t.getVersion()==s.NFT_VERSION){let e=a.Asn1Der.parseX500Names(t.getSubject()),r=!1;if(e.forEach((e=>{if(!r&&e.type==s.LABELED_URI_LABEL){r=!0;let n=e.value.split(" ");if(2!=n.length)throw new Error("LabeledURI values should be separated with space and 2 items only: "+e.value);t.type=n[0],t.identifier=n[1]}})),!r)throw new Error("Cant find LABELED_URI")}else t.type=s.HIDDEN_TYPE,t.identifier=s.HIDDEN_IDENTIFIER;return t}setSubjectPublicKeyInfo(e){this.subjectKey=e}setCommitment(e){this.commitment=e}checkValidity(){return super.checkValidity()?this.getVersion()!=s.HIDDEN_IDENTIFIER_VERSION&&this.getVersion()!=s.NFT_VERSION?((0,o.logger)(f.DEBUGLEVEL.LOW,"The version number is "+this.getVersion()+", it must be either "+s.HIDDEN_IDENTIFIER_VERSION+" or "+s.NFT_VERSION),!1):this.getSigningAlgorithm()!==s.DEFAULT_SIGNING_ALGORITHM?((0,o.logger)(f.DEBUGLEVEL.LOW,"The subject is supposed to only be an Ethereum address as the Common Name"),!1):this.getVersion()!=s.NFT_VERSION||this.subject.includes(s.LABELED_URI_LABEL+"=")?!(this.getVersion()==s.HIDDEN_IDENTIFIER_VERSION&&this.getCommitment().length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyPair=t.subtle=void 0;const n=r(55050),i=r(13649),o=r(93431),f=r(39980),a=r(54759),s=r(86623),c=r(8573),l=r(19421);let u=r(86266);if("object"==typeof crypto&&crypto.subtle)t.subtle=crypto.subtle;else{let e=r(86332).webcrypto;if(!e)throw(0,n.logger)(l.DEBUGLEVEL.LOW,"Webcrypto not accessible"),new Error("webcrypto.subtle missing");t.subtle=e.subtle}let d=new u.ec("secp256k1"),h=r(91094);const p={p192:null,p224:null,p256:"P-256",p384:"P-384",p521:"P-521",curve25519:null,ed25519:null,secp256k1:null};new o.Point(55066263022277343669578718895168534326250603453777594175500187360389116729240n,32670510020758816978083085130507043184471273380659243275938904335757337482424n);class y{constructor(){this.ethereumPrefix="Ethereum Signed Message:\n",this.algorithmASNList={secp256k1:["3081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f3044042000000000000000000000000000000000000000000000000000000000000000000420000000000000000000000000000000000000000000000000000000000000000704410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101","06052b8104000a"],sect283k1:["3081f806072a8648ce3d02013081ec020101302506072a8648ce3d0102301a0202011b06092a8648ce3d01020303300902010502010702010c304c042400000000000000000000000000000000000000000000000000000000000000000000000004240000000000000000000000000000000000000000000000000000000000000000000000010449040503213f78ca44883f1a3b8162f188e553cd265f23c1567a16876913b0c2ac245849283601ccda380f1c9e318d90f95d07e5426fe87e45c0e8184698e45962364e34116177dd2259022401ffffffffffffffffffffffffffffffffffe9ae2ed07577265dff7f94451e061e163c61020104"],p256:["3081ec06072a8648ce3d02013081e0020101302c06072a8648ce3d0101022100ffffffff00000001000000000000000000000000ffffffffffffffffffffffff30440420ffffffff00000001000000000000000000000000fffffffffffffffffffffffc04205ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b0441046b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5022100ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551020101"]}}getPrivateAsUint8(){return this.privKey}getPrivateAsHexString(){return(0,n.uint8tohex)(this.privKey)}getPrivateAsBigInt(){return(0,n.uint8ToBn)(this.privKey)}static privateFromBigInt(e){let t=new this;return t.privKey=new Uint8Array((0,n.hexStringToArray)(e.toString(16).padStart(64,"0"))),t}static fromPublicHex(e){if(null===(e=e.replace("0x","")).toLowerCase().match(/^[a-f0-9]+$/i))throw new Error("Wrong Hex string input");if(e.length<129||e.length>130)throw new Error("Wrong public hex length");let t=new this;return t.pubKey=new Uint8Array((0,n.hexStringToArray)(e)),t}static fromPrivateUint8(e,t=""){if(!e||32!=e.length)throw new Error("Wrong private key. Should be 32 bytes Uint8");let r=new this;if(r.privKey=e,!t||!o.CURVES.hasOwnProperty(t))throw new Error(`Algorithm ${t} not implemented.`);return r.algorithm=t,r}static publicFromBase64orPEM(e){return y.publicFromPEM((0,n.pemOrBase64Orbase64urlToString)(e))}static publicFromPEM(e){const t=(0,n.base64ToUint8array)(e);let r=f.AsnParser.parse(t,a.PublicKeyInfoValue);return y.publicFromUint(new Uint8Array(r.publicKey))}static publicFromUint(e){let t=new this;if(65!=e.byteLength)throw(0,n.logger)(l.DEBUGLEVEL.LOW,"Wrong public key length"),new Error("Wrong public key length");return t.pubKey=new Uint8Array(e),t}static publicFromSubjectPublicKeyInfo(e){let t=new this;if(!e.value)throw new Error("Key value not defined.");return t.pubKey=new Uint8Array(e.value.publicKey),t}static publicFromSubjectPublicKeyValue(e){let t=new this;return t.pubKey=new Uint8Array(e.publicKey),t.algorithm=t.getAlgorithNameFromASN1((0,n.uint8tohex)(new Uint8Array(e.algorithm))),t}static privateFromKeyInfo(e){let t=new this,r=f.AsnParser.parse(e.keysData,a.PrivateKeyData);return t.algorithm=t.getAlgorithNameFromASN1((0,n.uint8tohex)(new Uint8Array(e.algIdent))),t.privKey=new Uint8Array(r.privateKey),t}static privateFromKeyDataPEM(e){const t=(0,n.base64ToUint8array)(e);let r=f.AsnParser.parse(t,a.PrivateKeyData),i=new this;return i.algorithm=i.getAlgorithNameFromASN1((0,n.uint8tohex)(new Uint8Array(r.algDescr))),i.privKey=new Uint8Array(r.privateKey),i}getAlgorithNameFromASN1(e){let t={};for(const e in this.algorithmASNList)this.algorithmASNList[e].forEach((r=>{t[r]=e}));if(t.hasOwnProperty(e))return t[e];{let e="Unknown algorithm.";throw(0,n.logger)(l.DEBUGLEVEL.LOW,e),new Error(e)}}static privateFromPEM(e){const t=(0,n.base64ToUint8array)(e);let r=f.AsnParser.parse(t,a.PrivateKeyInfo);return y.privateFromKeyInfo(r)}static async generateKeyAsync(){const e=await crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt"]);let t=["0x"];const r=await crypto.subtle.exportKey("raw",e);return new Uint8Array(r).forEach((e=>{var r=e.toString(16);r.length%2&&(r="0"+r),t.push(r)})),this.privateFromBigInt(BigInt(t.join(""))%o.CURVE_SECP256k1.n)}static createKeys(){return this.privateFromBigInt(BigInt("0x"+(0,n.uint8tohex)(crypto.getRandomValues(new Uint8Array(32))))%o.CURVE_SECP256k1.n)}getPublicKeyAsHexStr(){if(this.pubKey)return(0,n.uint8tohex)(this.pubKey);if(o.CURVES.hasOwnProperty(this.algorithm)&&p.hasOwnProperty(this.algorithm)){let e=new u.ec(this.algorithm);if(!this.getPrivateAsHexString())throw(0,n.logger)(l.DEBUGLEVEL.LOW,this),new Error("Cant sign. This is only public key.");return e.keyFromPrivate(this.getPrivateAsHexString(),"hex").getPublic("hex").toString()}{let e='Private -> Public key not implemented for that aglorighm - "'+this.algorithm+'"';throw(0,n.logger)(l.DEBUGLEVEL.LOW,e),new Error(e)}}getAsnDerPublic(){var e=this.getPublicKeyAsHexStr();let t="";if(this.algorithm){if(!this.algorithmASNList.hasOwnProperty(this.algorithm)){let e="Fatal Error. Algorithm not implemented yet - "+this.algorithm;throw(0,n.logger)(l.DEBUGLEVEL.LOW,e),new Error(e)}t=this.algorithmASNList[this.algorithm][0]}else{let e="algorithm undefined, lets use default.";(0,n.logger)(l.DEBUGLEVEL.VERBOSE,e),t=this.algorithmASNList.secp256k1[0]}return i.Asn1Der.encode("SEQUENCE_30",t+i.Asn1Der.encode("BIT_STRING",e))}getAddress(){var e=this.getPublicKeyAsHexStr();return e=e.substr(2),"0x"+h.keccak256((0,n.hexStringToArray)(e)).substr(-40).toUpperCase()}signBytes(e){if(!this.getPrivateAsHexString())throw new Error("Cant sign. This is only public key.");let t=d.keyFromPrivate(this.getPrivateAsHexString(),"hex"),r=h.keccak256(e);return t.sign(r).toDER("hex")}signStringWithEthereum(e){if(!this.getPrivateAsHexString())throw new Error("Cant sign. This is only public key.");let t=d.keyFromPrivate(this.getPrivateAsHexString(),"hex"),r=this.ethereumPrefix+e.length+e,i=h.keccak256((0,n.stringToArray)(r));return t.sign(i).toDER("hex")}signHexStringWithEthereum(e){return this.signStringWithEthereum("0x"+e)}signBytesWithEthereum(e){let t="0x"+(0,n.uint8tohex)(new Uint8Array(e));return(0,n.logger)(l.DEBUGLEVEL.HIGH,"message: "+t),this.signStringWithEthereum(t)}signDeterministicSHA256(e){let t=Array.from(s.ethers.utils.arrayify(s.ethers.utils.sha256(e)));return this.signBytes(t)}verifyDeterministicSHA256(e,t){let r,i,a=s.ethers.utils.sha256(e).substr(2);if(!o.CURVES.hasOwnProperty(this.algorithm)||!p.hasOwnProperty(this.algorithm)){let e='Elliptic.js curve not implemented for that aglorighm - "'+this.algorithm+'"';throw(0,n.logger)(l.DEBUGLEVEL.LOW,e),new Error(e)}r=new u.ec(this.algorithm).keyFromPublic(this.getPublicKeyAsHexStr(),"hex");if(128==t.length||130==t.length){var d=t.match(/([a-f\d]{64})/gi);if(!d||d.length<2)throw new Error("Wrong key syntax");i={r:d[0],s:d[1]}}else{let e=f.AsnParser.parse((0,n.hexStringToUint8)(t),c.Signature);i={r:BigInt(e.r).toString(16).padStart(64,"0"),s:BigInt(e.s).toString(16).padStart(64,"0")}}return r.verify(a,i)}verifyHexStringWithEthereum(e,t){let r="0x"+e,i=h.keccak256((0,n.stringToArray)(this.ethereumPrefix+r.length+r)),o=d.keyFromPublic(this.getPublicKeyAsHexStr(),"hex");var f=t.match(/([a-f\d]{64})/gi);if(!f||f.length<2)throw new Error("Wrong key syntax");let a={r:f[0],s:f[1]};return o.verify(i,a)}signRawBytesWithEthereum(e){let t=s.ethers.utils.keccak256(e).substring(2);if((0,n.logger)(l.DEBUGLEVEL.HIGH,`signRawBytesWithEthereum: key: ${this.getAddress()}, hash: ${t}`),!this.getPrivateAsHexString())throw new Error("Cant sign. This is only public key.");let r=d.keyFromPrivate(this.getPrivateAsHexString(),"hex"),i=r.sign((0,n.hexStringToUint8)(t));return(0,n.ecSignatureToSRVhex)(i,r)}verifyBytesWithEthereum(e,t){if(!e||!e.length)throw new Error("Missing data to verify");if(!t)throw new Error("Missing signature to verify");let r=(0,n.hexStringToArray)(s.ethers.utils.keccak256(e)),i=d.keyFromPublic(this.getPublicKeyAsHexStr(),"hex");(0,n.logger)(l.DEBUGLEVEL.HIGH,`verifyBytesWithEthereum: key: ${this.getAddress()}, hash: ${(0,n.uint8tohex)(new Uint8Array(r))}`);var o=(t=(0,n.uint8tohex)(y.anySignatureToRawUint8(t))).match(/([a-f\d]{64})/gi);if(!o||o.length<2)throw new Error("Wrong key syntax");let f={r:o[0],s:o[1]};return i.verify(r,f)}getJWTParams(){let e=p[this.algorithm];if(!e){let e=`Cant create subtleCrypto key for curve '${this.algorithm}'`;throw(0,n.logger)(l.DEBUGLEVEL.LOW,e),new Error(e)}let t=this.getPublicKeyAsHexStr();return{crv:e,d:(0,n.uint8arrayToBase64)(this.getPrivateAsUint8()),key_ops:["sign"],kty:"EC",x:(0,n.uint8arrayToBase64)((0,n.hexStringToUint8)(t.substr(2,64))),y:(0,n.uint8arrayToBase64)((0,n.hexStringToUint8)(t.substr(66,64)))}}getSubtlePrivateKey(){let e=p[this.algorithm];return t.subtle.importKey("jwk",this.getJWTParams(),{name:"ECDSA",namedCurve:e},!0,["sign"])}getSubtlePublicKey(){let e=p[this.algorithm],r=this.getJWTParams(),n=Object.assign({},r);return delete n.d,n.key_ops=["verify"],t.subtle.importKey("jwk",n,{name:"ECDSA",namedCurve:e},!0,["verify"])}async signStringWithSubtle(e){return await t.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},await this.getSubtlePrivateKey(),Uint8Array.from((0,n.stringToArray)(e)))}async verifyStringWithSubtle(e,r){return(0,n.logger)(l.DEBUGLEVEL.VERBOSE,"pubkey: "+this.getPublicKeyAsHexStr()+" msg:"+r+" signature:"+(0,n.uint8tohex)(e)),(0,n.logger)(l.DEBUGLEVEL.VERBOSE,await this.getSubtlePublicKey()),await t.subtle.verify({name:"ECDSA",hash:{name:"SHA-256"}},await this.getSubtlePublicKey(),e,Uint8Array.from((0,n.stringToArray)(r)))}async verifyStringWithSubtleDerSignature(e,t){let r=f.AsnParser.parse(e,c.Signature);const i=BigInt(r.r).toString(16).padStart(64,"0")+BigInt(r.s).toString(16).padStart(64,"0");return this.verifyStringWithSubtle((0,n.hexStringToUint8)(i),t)}static anySignatureToRawUint8(e){let t,r;if(t="string"==typeof e?(0,n.hexStringToUint8)(e):e,!t||!t.length)throw new Error("Empty signature received");switch(t.length){case 64:(0,n.logger)(l.DEBUGLEVEL.LOW,`anySignatureToRawUint8 received 64 bytes signature (without v value) = ${(0,n.uint8tohex)(t)}`);case 65:r=t;break;case 66:if(4!=t[0])throw new Error(`Cant recognize signature: ${(0,n.uint8tohex)(t)}`);r=t.slice(1,65);break;case 70:case 71:case 72:let e=f.AsnParser.parse(t,c.Signature);r=(0,n.hexStringToUint8)(BigInt(e.r).toString(16).padStart(64,"0")+BigInt(e.s).toString(16).padStart(64,"0"));break;default:let i="wrong Signature: "+(0,n.uint8tohex)(t);throw new Error(i)}return(0,n.logger)(l.DEBUGLEVEL.VERBOSE,"ready signature:"+(0,n.uint8tohex)(r)),r}static parseKeyArrayStrings(e){const t={};for(let r in e)if("string"==typeof e[r]){const n=e[r].split("|"),i=[];for(const e of n)i.push(y.publicFromBase64orPEM(e));t[r]=i}else Array.isArray(t),t[r]=e[r];return t}}t.KeyPair=y},92219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Nonce=void 0;const n=r(55050),i=r(14246),o=r(91104),f=r(54288),a=r(19421);class s{constructor(){this.DEFAULT_NONCE_TIME_LIMIT_MS=12e5}static async makeNonce(e="",t,r=new Uint8Array(0),f=0){if(e||(e=await i.SignatureUtility.connectMetamaskAndGetAddress()),!o.ValidationTools.isAddress(e))throw new Error("Address is not valid");return e=e.toUpperCase(),f||(f=Date.now()),(0,n.uint8merge)([Uint8Array.from((0,n.stringToArray)(e)),(0,n.hashStringTo32bytesUint8)(t),(0,n.getInt64Bytes)(f),r])}validateNonce(e,t,r,i,o,f=new Uint8Array(0)){return s.validateAddress(e,t)?this.validateReceiverIdentifier(e,r)?this.validateTimestamp(e,i,o)?this.validateOtherData(e,f)?this.validateOtherData(e,f):((0,n.logger)(a.DEBUGLEVEL.LOW,"otherData check failed"),!1):((0,n.logger)(a.DEBUGLEVEL.LOW,"timestamp check failed"),!1):((0,n.logger)(a.DEBUGLEVEL.LOW,"validateReceiverIdentifier check failed"),!1):((0,n.logger)(a.DEBUGLEVEL.LOW,"validateAddress check failed for "+t),!1)}validateTimestamp(e,t,r){let n=s.getTimestamp(e),i=new f.Timestamp(n);return i.setValidity(r-t),i.validateAgainstExpiration(r)}static validateAddress(e,t){let r=(0,n.uint8toString)(e.slice(s.senderAddressIndexStart,s.senderAddressIndexStop));return t.toUpperCase()===r.toUpperCase()||((0,n.logger)(a.DEBUGLEVEL.LOW,"nonceAddress = "+r),!1)}validateReceiverIdentifier(e,t){return(0,n.uint8tohex)((0,n.hashStringTo32bytesUint8)(t)).toLowerCase()===(0,n.uint8tohex)(e.slice(s.receiverIdentifierIndexStart,s.receiverIdentifierIndexStop)).toLowerCase()}validateOtherData(e,t){return(0,n.uint8tohex)(t).toLowerCase()===(0,n.uint8tohex)(e.slice(s.otherDataIndexStart,s.otherDataIndexStart+t.length)).toLowerCase()}static getTimestamp(e){let t=e.slice(s.timestampIndexStart,s.timestampIndexStop),r=(0,n.uint8ToBn)(t);if(r>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("timestamp value bigger than MAX_SAFE_INTEGER");return Number(r)}}t.Nonce=s,s.LONG_BYTES=8,s.senderAddressIndexStart=0,s.senderAddressIndexStop=o.ValidationTools.ADDRESS_LENGTH_IN_BYTES,s.receiverIdentifierIndexStart=s.senderAddressIndexStop,s.receiverIdentifierIndexStop=s.receiverIdentifierIndexStart+32,s.timestampIndexStart=s.receiverIdentifierIndexStop,s.timestampIndexStop=s.timestampIndexStart+s.LONG_BYTES,s.otherDataIndexStart=s.timestampIndexStop},93431:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Point=t.CURVE_BN256=t.CURVES=t.CURVE_SECP256k1=void 0;const n=r(55050),i=r(19421);t.CURVE_SECP256k1={P:2n**256n-2n**32n-977n,n:2n**256n-432420386565659656852420866394968145599n,magicExp:(2n**256n-2n**32n-977n+1n)/4n,A:0n,B:7n},t.CURVES={p256:{P:BigInt("0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),A:BigInt("0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),B:BigInt("0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),n:BigInt("0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),GX:BigInt("0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"),GY:BigInt("0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5"),h:1n},secp256k1:{P:2n**256n-2n**32n-977n,A:0n,B:7n,n:2n**256n-432420386565659656852420866394968145599n,GX:55066263022277343669578718895168534326250603453777594175500187360389116729240n,GY:32670510020758816978083085130507043184471273380659243275938904335757337482424n},BN256:{P:115792089237314936872688561244471742058375878355761205198700409522629664518163n,n:115792089237314936872688561244471742058035595988840268584488757999429535617037n,magicExp:115792089237314936872688561244471742058375878355761205198700409522629664518164n>>2n,A:0n,B:3n,h:1n}},t.CURVE_BN256={P:21888242871839275222246405745257275088696311157297823662689037894645226208583n,n:21888242871839275222246405745257275088548364400416034343698204186575808495617n,A:0n,B:3n,h:1n};class o{constructor(e,r,i=t.CURVE_BN256){this.x=e,this.y=r,this.useCurve=i,this.x=(0,n.mod)(e,this.useCurve.P),this.y=(0,n.mod)(r,this.useCurve.P),this.useCurve=i}double(){const e=this.x,t=this.y,r=(0,n.mod)(3n*e**2n*(0,n.invert)(2n*t,this.useCurve.P),this.useCurve.P),i=(0,n.mod)(r*r-2n*e,this.useCurve.P),f=(0,n.mod)(r*(e-i)-t,this.useCurve.P);return new o(i,f,this.useCurve)}newZero(){return new o(0n,0n,this.useCurve)}add(e){const[t,r]=[this,e],[i,f,a,s]=[t.x,t.y,r.x,r.y];if(0n===i||0n===f)return r;if(0n===a||0n===s)return t;if(i===a&&f===s)return this.double();if(i===a&&f===(0,n.mod)(-s,this.useCurve.P))return this.newZero();const c=(0,n.mod)((s-f)*(0,n.invert)(a-i,this.useCurve.P),this.useCurve.P),l=(0,n.mod)(c*c-i-a,this.useCurve.P),u=(0,n.mod)(c*(i-l)-f,this.useCurve.P);return new o(l,u,this.useCurve)}multiplyDA(e){let t=this.newZero(),r=this;for(;e>0n;)1n&e&&(t=t.add(r)),r=r.double(),e>>=1n;return t}isInfinity(){return null==this.x||null==this.y||0n==this.x&&0n==this.y}getEncoded(e=!1){if(this.isInfinity())return new Uint8Array(0);let t=(0,n.bnToBuf)(this.x,32);return e?(0,n.uint8merge)([Uint8Array.from([2]),t]):(0,n.uint8merge)([Uint8Array.from([4]),t,(0,n.bnToBuf)(this.y,32)])}equals(e){if(null==e)return!1;let t=this.isInfinity(),r=e.isInfinity();if(t||r)return t&&r;let n=e;return this.x===n.x&&this.y===n.y}static decodeFromHex(e,r=t.CURVE_BN256){if(130!=e.length)throw new Error("only decompressed points allowed. 65 bytes.");return o.decodeFromUint8((0,n.hexStringToUint8)(e),r)}static decodeFromUint8(e,r=t.CURVE_BN256){if(65!=e.length)throw new Error("only decompressed points allowed. 65 bytes.");let f;if(4!==e[0])throw new Error("only decompressed points allowed");{let t=(0,n.uint8ToBn)(e.slice(1,33)),i=(0,n.uint8ToBn)(e.slice(33));f=new o(t,i,r)}if(!f.validate()){let e="Point is not valid ("+f.x.toString(16)+","+f.y.toString(16)+")";throw(0,n.logger)(i.DEBUGLEVEL.LOW,e),new Error(e)}return f}validate(e=!1){return"boolean"==typeof e&&(e=this.useCurve),0n==(0,n.mod)((0,n.mod)(this.y*this.y,e.P)-(0,n.mod)((0,n.BnPowMod)(this.x,3n,e.P)+(0,n.mod)(this.x*e.A,e.P)+e.B,e.P),e.P)}negate(){return new o(this.x,this.useCurve.P-this.y,this.useCurve)}subtract(e){return this.add(e.negate())}}t.Point=o},14246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureUtility=void 0;const n=r(55050),i=r(86623),o=r(56371),f=r(19421);let a=new(r(86266).ec)("secp256k1"),s=r(91094);class c{static sign(e,t){let r=a.keyFromPrivate(t.getPrivateAsHexString(),"hex"),i=s.keccak256((0,n.hexStringToArray)(e));return r.sign(i).toDER("hex")}static verify(e,t,r){return c.verifyArrayBuf((0,n.hexStringToArray)(e),t,r)}static verifyArrayBuf(e,t,r){let n=a.keyFromPublic(r.getPublicKeyAsHexStr(),"hex"),i=s.keccak256(e);return n.verify(i,t)}static async signMessageWithBrowserWallet(e){await c.connectMetamaskAndGetAddress();let t=new i.ethers.providers.Web3Provider(window.ethereum).getSigner();return await t.signMessage(e)}static async recoverPublicKeyFromMessageSignature(e,t){const r=i.ethers.utils.hashMessage(e),n=i.ethers.utils.arrayify(r);return await i.ethers.utils.recoverPublicKey(n,t)}static recoverPublicKeyFromTypedMessageSignature(e,t){let r,f;try{let t=e.message.payload;e.message.payload=i.ethers.utils.id(t).substr(2);let n=e.types;delete n.EIP712Domain,r=o._TypedDataEncoder.hash(e.domain,n,e.message),e.message.payload=t}catch(e){throw new Error("Cant sign data, possibly wrong format. "+e)}try{f=(0,o.recoverPublicKey)((0,n.hexStringToUint8)(r.substr(2)),t)}catch(e){throw new Error("Cant recoverPublicKey. "+e)}return f}static async signEIP712WithBrowserWallet(e,t,r,o,a){try{let n;if(a)n=new i.ethers.Wallet("0x"+a.getPrivateAsHexString());else{n=new i.ethers.providers.Web3Provider(window.ethereum).getSigner()}if(!n)throw new Error("Active Wallet required");const f={name:e,version:c.Eip712Data.PROTOCOL_VERSION},l={};l[o]=r;let u=Object.assign({},t);u.payload=s.keccak256(u.payload);let d=await n._signTypedData(f,l,u),h={types:{EIP712Domain:c.Eip712domainTypes},primaryType:o,message:t,domain:f};h.types[o]=l[o];let p={signatureInHex:d,jsonSigned:JSON.stringify(h)};return JSON.stringify(p)}catch(e){return(0,n.logger)(f.DEBUGLEVEL.LOW,"Cant sign eip712 data. Error: "+e),""}}static async connectMetamaskAndGetAddress(){if(!window.ethereum)throw new Error("Please install metamask before.");const e=await window.ethereum.request({method:"eth_requestAccounts"});if(!e||!e.length)throw new Error("Active Wallet required");return e[0]}static getChainIdFromSignature(e){let t=Number("0x"+e.substr(-2));return 27==t||28==t?0:t-35>>1}static convertToPersonalEthMessage(e){return(0,n.stringToArray)(this.ethereumPrefix+e.length+e)}}t.SignatureUtility=c,c.ethereumPrefix="Ethereum Signed Message:\n",c.OID_ECDSA_PUBLICKEY="1.2.840.10045.2.1",c.Eip712Data={PROTOCOL_VERSION:"0.1"},c.Eip712domainTypes=[{name:"name",type:"string"},{name:"version",type:"string"}]},80716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignedIdentifierAttestation=void 0;const n=r(39980),i=r(54759),o=r(65185),f=r(55050),a=r(13649),s=r(3365),c=r(19421);class l{constructor(){}static fromBytes(e,t){const r=n.AsnParser.parse(e,i.MyAttestation);return this.fromASNType(r,t,e)}static fromASNType(e,t,r=new Uint8Array(0)){let n=new this;n.uint8data=r,n.attestorKeys=t;let i=e.signatureAlgorithm.algorithm;if(n.att=s.IdentifierAttestation.fromBytes(e.signedInfo),n.signature=(0,f.uint8tohex)(new Uint8Array(e.signatureValue)),i!==n.att.getSigningAlgorithm())throw new Error("Algorithm specified is not consistent");return n.constructorCheck(),n}static fromData(e,t){let r=new this;return r.attestorKeys=t,r.att=e,r.signature=r.attestorKeys.signRawBytesWithEthereum(Array.from(r.att.getPrehash())),r.constructorCheck(),r}verify(){try{return this.attestorKeys.verifyBytesWithEthereum((0,f.hexStringToArray)(this.att.getDerEncoding()),this.signature)}catch(e){return(0,f.logger)(c.DEBUGLEVEL.LOW,e),!1}}checkValidity(){return this.getUnsignedAttestation().checkValidity()}getUnsignedAttestation(){return this.att}getDerEncoding(){return this.uint8data&&this.uint8data.length?(0,f.uint8tohex)(new Uint8Array(this.uint8data)):this.constructSignedAttestation(this.getUnsignedAttestation(),this.signature)}constructSignedAttestation(e,t){let r=e.getPrehash(),n=a.Asn1Der.encode("OBJECT_ID",e.getSigningAlgorithm()),i=(0,f.uint8tohex)(r)+a.Asn1Der.encode("SEQUENCE_30",n)+a.Asn1Der.encode("BIT_STRING",(0,f.uint8tohex)(o.KeyPair.anySignatureToRawUint8(t)));return a.Asn1Der.encode("SEQUENCE_30",i)}constructorCheck(){if(!this.verify())throw new Error("The signature is not valid")}}t.SignedIdentifierAttestation=l,l.ECDSA_WITH_SHA256="1.2.840.10045.4.3.2"},54288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timestamp=void 0;const n=r(55050),i=r(19421);class o{constructor(e=null){this.ALLOWED_ROUNDING=1e4,this.validity=0,e||(this.time=Date.now()),"number"==typeof e&&(this.time=e),"string"==typeof e&&(this.time=o.stringTimestampToLong(e)),this.time=this.time-this.time%1e3}fromString(e){this.time=o.stringTimestampToLong(e)}getValidity(){return this.validity}setValidity(e){this.validity=e}getTime(){return this.time}getTimeAsString(){let e=new Date(this.time).toString();return e.substr(0,e.indexOf("(")-1)}validateTimestamp(){let e=this.getCurrentTime();return!(this.time>e+this.ALLOWED_ROUNDING)&&!(this.time+this.ALLOWED_ROUNDING+this.validityt+this.ALLOWED_ROUNDING?((0,n.logger)(i.DEBUGLEVEL.LOW,"Object still not valid. Details: not valid before = "+this.time+", currentTime = "+t),!1):e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UsageProofOfExponent=void 0;const n=r(93431),i=r(61538),o=r(39980),f=r(55050),a=r(13649),s=r(5393);t.UsageProofOfExponent=class{constructor(){}static fromData(e,t,r=new Uint8Array([])){let n=new this;return n.tPoint=e,n.challengeResponse=t,n.nonce=r,n.encoding=n.makeEncoding(),n}fromBase64(e){this.encoding=e,this.fromBytes((0,f.base64ToUint8array)(e))}fromBytes(e){this.encodingBytes=e;let t=o.AsnParser.parse(e,i.UsageProof);this.challengeResponse=(0,f.uint8ToBn)(new Uint8Array(t.challengePoint));let r=new Uint8Array(t.responseValue);this.nonce=new Uint8Array(t.nonce),this.tPoint=n.Point.decodeFromHex((0,f.uint8tohex)(r),n.CURVE_BN256)}makeEncoding(){let e=a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)((0,f.bnToUint8)(this.challengeResponse)))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(this.tPoint.getEncoded(!1)))+a.Asn1Der.encode("OCTET_STRING",(0,f.uint8tohex)(this.nonce));return a.Asn1Der.encode("SEQUENCE_30",e)}getPoint(){return this.tPoint}getChallengeResponse(){return this.challengeResponse}getDerEncoding(){return this.encoding}getNonce(){return this.nonce}validateParameters(){try{if(!s.AttestationCrypto.validatePointToCurve(this.tPoint,s.AttestationCrypto.curve))throw new Error("Point not in the curve");return!(this.challengeResponse<=0n||this.challengeResponse>=s.AttestationCrypto.curveOrder)&&(!this.tPoint.equals(s.AttestationCrypto.G)&&!this.tPoint.equals(s.AttestationCrypto.H))}catch(e){return!1}}}},49674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UseAttestation=void 0;const n=r(65185),i=r(98478),o=r(5393),f=r(80716),a=r(91462),s=r(39980),c=r(13649);t.UseAttestation=class{static fromData(e,t,r,n){let i=new this;return i.attestation=e,i.type=t,i.pok=r,i.sessionPublicKey=n,i.encoding=i.makeEncoding(e,t,r,n),i.constructorCheck(),i}static fromBytes(e,t){let r,o=new this;try{r=s.AsnParser.parse(e,a.UseAttestation)}catch(e){throw new Error("Cant parse UseAttestationASN. "+e)}try{o.attestation=f.SignedIdentifierAttestation.fromASNType(r.attestation,t),o.type=r.type,o.pok=i.FullProofOfExponent.fromASNType(r.proof),o.sessionPublicKey=n.KeyPair.publicFromSubjectPublicKeyValue(r.sessionKey)}catch(e){throw new Error("Cant decode internal data. "+e)}return o.constructorCheck(),o}constructorCheck(){if(!this.verify())throw new Error("The use attestation object is not valid")}makeEncoding(e,t,r,n){let i=e.getDerEncoding()+c.Asn1Der.encode("INTEGER",t)+r.getDerEncoding()+n.getAsnDerPublic();return c.Asn1Der.encode("SEQUENCE_30",i)}getAttestation(){return this.attestation}getType(){return this.type}getPok(){return this.pok}getSessionPublicKey(){return this.sessionPublicKey}getDerEncoding(){return this.encoding}verify(){return this.attestation.verify()&&(new o.AttestationCrypto).verifyFullProof(this.pok)}checkValidity(){return this.attestation.checkValidity()}}},91104:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationTools=void 0;const n=r(55050),i=r(19421);class o{static validateTimestamp(e,t,r){return!(e>t+r)&&!(e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ATTESTATION_TYPE=void 0,t.ATTESTATION_TYPE={phone:0,mail:1,InetPersona:2}},55050:(e,t,r)=>{"use strict";var n=r(34155),i=r(48764).lW;Object.defineProperty(t,"__esModule",{value:!0}),t.ecSignatureToSRVhex=t.testsLogger=t.logger=t.isDomainValid=t.formatGeneralizedDateTime=t.ethAddressToUint8=t.hashUint8To32bytesUint8=t.hashStringTo32bytesUint8=t.getInt64Bytes=t.uint8tohex=t.BnPowMod=t.stringToArray=t.base64ToUint8array=t.pemOrBase64Orbase64urlToString=t.base64toBase64Url=t.uint8arrayToBase64=t.uint8toString=t.uint8merge=t.bnToBuf=t.bnToUint8=t.bufToBn=t.uint8ToBn=t.egcd=t.invert=t.mod=t.hexStringToBase64Url=t.hexStringToBase64=t.hexStringToUint8=t.hexStringToArray=t.stringToHex=void 0;const o=r(19421),f=r(93431);let a,s,c=r(91094);function l(e=""){"0x"===e.substr(0,2).toLowerCase()&&(e=e.substr(2));let t=[],r=[...e];r.length%2&&r.unshift("0");let n,i="";if(!r||void 0===r||!r.length)return[];for(;r.length;){if(i="",i+=r.shift()+r.shift(),n=parseInt(i,16),isNaN(n))throw new Error("hexStringToArray input is not a hex string.");t.push(n)}return t}function u(e=""){return Uint8Array.from(l(e))}function d(e,t=f.CURVE_BN256.P){const r=e%t;return r>=0n?r:t+r}function h(e,t){let[r,n,i,o]=[0n,1n,1n,0n];for(;0n!==e;){let[f,a]=[t/e,t%e],[s,c]=[r-i*f,n-o*f];[t,e]=[e,a],[r,n]=[i,o],[i,o]=[s,c]}return[t,r,n]}function p(e){let t=[];return Uint8Array.from(e).forEach((function(e){var r=e.toString(16);r.length%2&&(r="0"+r),t.push(r)})),BigInt("0x"+t.join(""))}function y(e,t=0){var r=BigInt(e).toString(16).padStart(2*t,"0");r.length%2&&(r="0"+r);for(var n=r.length/2,i=new Uint8Array(n),o=0,f=0;oa||console.log(...t)}void 0!==n&&n.env&&n.env.DISPLAY_DEBUG_LEVEL?a=parseInt(n.env.DISPLAY_DEBUG_LEVEL):"undefined"!=typeof window&&window.DISPLAY_DEBUG_LEVEL&&(a=parseInt(window.DISPLAY_DEBUG_LEVEL)),void 0!==n&&n.env&&n.env.DISPLAY_DEBUG_LEVEL_TESTS&&(s=parseInt(n.env.DISPLAY_DEBUG_LEVEL_TESTS)),t.stringToHex=function(e){for(var t="",r=0;re.charCodeAt(0))):Uint8Array.from(i.from(e,"base64")),t},t.stringToArray=A,t.BnPowMod=function(e,t,r){let n=1n,i=e;for(;t>0n;)1n&t&&(n=n*i%r),i=i*i%r,t>>=1n;return n},t.uint8tohex=function(e){return e&&e.length?Array.from(e).map((e=>("0"+e.toString(16)).slice(-2))).join(""):""},t.getInt64Bytes=function(e){let t=Math.floor(e/2**32);return new Uint8Array([t,t<<8,t<<16,t<<24,e,e<<8,e<<16,e<<24].map((e=>e>>>24)))},t.hashStringTo32bytesUint8=function(e){return E(Uint8Array.from(A(e)))},t.hashUint8To32bytesUint8=E,t.ethAddressToUint8=function(e){if(null===e.toLowerCase().match(/^0x[a-f0-9]{40}$/i))throw new Error("Wrong Ethereum Address");let t=Uint8Array.from(l(e.substr(2)));if(20!=t.length)throw new Error("wrong address length");return t},t.formatGeneralizedDateTime=function(e){var t=new Date(e),r=""+(t.getUTCMonth()+1),n=""+t.getUTCDate(),i=t.getUTCFullYear();let o=""+t.getUTCHours(),f=""+t.getUTCMinutes(),a=""+t.getUTCSeconds();return r.length<2&&(r="0"+r),n.length<2&&(n="0"+n),o.length<2&&(o="0"+o),f.length<2&&(f="0"+f),a.length<2&&(a="0"+a),[i,r,n,o,f,a].join("")+"Z"},t.isDomainValid=function(e){try{new URL(e)}catch(e){return!1}return!0},t.logger=_,t.testsLogger=function(e,...t){!s||e>s||console.log(...t)},t.ecSignatureToSRVhex=function(e,t){try{let r=e.r.toString(16).padStart(64,"0"),n=e.s,i=e.recoveryParam,o=t.ec.curve.n.shrn(1);return n.cmp(o)>0&&(n=t.ec.curve.n.sub(n),i=1-i),r+n.toString(16).padStart(64,"0")+(1==i?"1c":"1b")}catch(e){throw _(o.DEBUGLEVEL.LOW,e),new Error("Signature format doesn't fit.")}}},92580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getValidFromAndExpiry=t.AbstractLinkedAttestation=void 0;const n=r(39980),i=r(52551),o=r(55050),f=r(86623),a=r(93312);t.AbstractLinkedAttestation=class{fromObject(e){this.linkedAttestation=e}fromBytes(e){this.linkedAttestation=n.AsnParser.parse(e,i.SignedLinkedAttestation)}fromBase64(e){this.fromBytes((0,o.base64ToUint8array)(e))}getAttestationData(){return this.linkedAttestation.attestation[this.TYPE]}getSubjectPublicKey(){return this.getAttestationData()?.subjectPublicKey}getEncoded(){return new Uint8Array(n.AsnSerializer.serialize(this.linkedAttestation))}getBase64(){return(0,o.uint8arrayToBase64)(this.getEncoded())}sign(e){const t=n.AsnSerializer.serialize(this.linkedAttestation.attestation[this.TYPE]);this.linkedAttestation.signingAlgorithm=new a.AlgorithmIdentifierASN,this.linkedAttestation.signingAlgorithm.algorithm="1.2.840.10045.4.2",this.linkedAttestation.signatureValue=(0,o.hexStringToUint8)(e.signRawBytesWithEthereum(Array.from(new Uint8Array(t))))}verify(e){const t=n.AsnSerializer.serialize(this.getAttestationData());let r=(0,o.hexStringToUint8)(f.ethers.utils.keccak256(new Uint8Array(t))),i=f.ethers.utils.recoverPublicKey(r,f.ethers.utils.splitSignature(new Uint8Array(this.linkedAttestation.signatureValue)));if(i.substring(2)!==e.getPublicKeyAsHexStr())throw new Error("Attestor public key does not match, expected "+e.getPublicKeyAsHexStr()+" got "+i.substring(2));let a=Math.round(Date.now()/1e3),s=this.getAttestationData();if(!s)throw new Error("Linked attestation getAttestationData error");if(s.validity.notBefore>a)throw new Error("Linked attestation is not yet valid");if(s.validity.notAfter{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumAddressAttestation=void 0;const n=r(92580),i=r(52551),o=r(95978),f=r(35403),a=r(55050);class s extends n.AbstractLinkedAttestation{constructor(){super(...arguments),this.TYPE="ethereumAddress"}create(e,t,r,s,c,l){this.linkedAttestation=new i.SignedLinkedAttestation,this.linkedAttestation.attestation=new i.LinkedAttestation,this.linkedAttestation.attestation.ethereumAddress=new o.EthereumAddressAttestation,this.linkedAttestation.attestation.ethereumAddress.subjectPublicKey=e;const u=(0,n.getValidFromAndExpiry)(s,l);this.linkedAttestation.attestation.ethereumAddress.validity=new f.EpochTimeValidity,this.linkedAttestation.attestation.ethereumAddress.validity.notBefore=u.validFrom,this.linkedAttestation.attestation.ethereumAddress.validity.notAfter=u.expiry,this.linkedAttestation.attestation.ethereumAddress.ethereumAddress=(0,a.hexStringToUint8)(t),c&&(this.linkedAttestation.attestation.ethereumAddress.context=c),this.sign(r)}}t.EthereumAddressAttestation=s},52410:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumKeyLinkingAttestation=void 0;const i=r(52551),o=r(42909),f=r(39980),a=r(55050),s=r(35403),c=r(42909),l=r(93312),u=r(92475),d=r(1754),h=n(r(78147)),p=r(92580),y="RSASSA-PKCS1-v1_5";t.EthereumKeyLinkingAttestation=class{create(e,t,r,n,l){let u=f.AsnParser.parse((0,a.base64ToUint8array)(e),i.SignedLinkedAttestation);this.linkAttest=new o.SignedEthereumKeyLinkingAttestation,this.linkAttest.ethereumKeyLinkingAttestation=new c.EthereumKeyLinkingAttestation,this.linkAttest.ethereumKeyLinkingAttestation.subjectEthereumAddress=(0,a.hexStringToUint8)(t),this.linkAttest.ethereumKeyLinkingAttestation.linkedAttestation=u;const d=(0,p.getValidFromAndExpiry)(r,l);this.linkAttest.ethereumKeyLinkingAttestation.validity=new s.EpochTimeValidity,this.linkAttest.ethereumKeyLinkingAttestation.validity.notBefore=d.validFrom,this.linkAttest.ethereumKeyLinkingAttestation.validity.notAfter=d.expiry,n&&(this.linkAttest.ethereumKeyLinkingAttestation.context=n)}async sign(e){const t=f.AsnSerializer.serialize(this.linkAttest.ethereumKeyLinkingAttestation),r=await h.default.sign({name:y,saltLength:128},e,t);this.linkAttest.signingAlgorithm=new l.AlgorithmIdentifierASN,this.linkAttest.signingAlgorithm.algorithm="1.2.840.113549.1.1.11",this.linkAttest.signatureValue=new Uint8Array(r)}fromBytes(e){this.linkAttest=f.AsnParser.parse(e,o.SignedEthereumKeyLinkingAttestation)}fromBase64(e){this.fromBytes((0,a.base64ToUint8array)(e))}getEncoded(){return new Uint8Array(f.AsnSerializer.serialize(this.linkAttest))}getBase64(){return(0,a.uint8arrayToBase64)(this.getEncoded())}getAttestation(){return this.linkAttest}getSignedLinkedAttestation(){return this.linkAttest.ethereumKeyLinkingAttestation.linkedAttestation}getLinkedAttestationData(){const e=this.getSignedLinkedAttestation();return e.attestation.ethereumAddress??e.attestation.nftOwnership}getLinkedAttestationObject(){const e=this.getSignedLinkedAttestation();let t;return e.attestation.ethereumAddress?(t=new u.EthereumAddressAttestation,t.fromObject(e)):(t=new d.NFTOwnershipAttestation,t.fromObject(e)),t}async verify(e){let t=this.getLinkedAttestationObject();t.verify(e);let r=t.getSubjectPublicKey();if(!r)throw new Error("getSubjectPublicKey error");const n=f.AsnSerializer.serialize(this.linkAttest.ethereumKeyLinkingAttestation),i=await h.default.importKey("spki",new Uint8Array(r),{name:y,hash:{name:"SHA-256"}},!0,["verify"]);if(!await h.default.verify({name:y,saltLength:128},i,this.linkAttest.signatureValue,n))throw new Error("Signature verification failed");let o=Math.round(Date.now()/1e3),a=this.linkAttest.ethereumKeyLinkingAttestation;if(a.validity.notBefore>o)throw new Error("Linked attestation is not yet valid");if(a.validity.notAfter{try{this.getDb().then((n=>{let i=n.transaction(f.TABLE_NAME,"readwrite").objectStore(f.TABLE_NAME).get(e);i.onsuccess=()=>{t(i.result),n.close()},i.onerror=e=>{r(e)}}))}catch(e){let t="IndexedDB interaction error.";e instanceof Error&&(t=e.message),console.log(e),r(t)}}))}async saveKey(e,t,r,n){try{let i=await this.getDb(),o=i.transaction(f.TABLE_NAME,"readwrite").objectStore(f.TABLE_NAME),a={id:e,privateKey:t,publicKey:r,spki:n};o.put(a).onsuccess=()=>{i.close()}}catch(e){let t="IndexedDB interaction error.";e instanceof Error&&(t=e.message),console.log("Failed to store key: "+t)}}async getDb(){return new Promise((function(e,t){let r=indexedDB.open(f.DB_NAME,1);r.onupgradeneeded=function(e){let t=e.target.result;t.objectStoreNames.contains(f.TABLE_NAME)||t.createObjectStore(f.TABLE_NAME,{keyPath:"id"})},r.onsuccess=function(t){let r=t.target.result;e(r)},r.onerror=function(e){t("Error opening database "+e.target.errorCode)}}))}}t.KeyStore=f,f.DB_NAME="AttestationKeyStore",f.TABLE_NAME="Keys"},1754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NFTOwnershipAttestation=void 0;const n=r(92580),i=r(52551),o=r(83874),f=r(35403),a=r(55050);class s extends n.AbstractLinkedAttestation{constructor(){super(...arguments),this.TYPE="nftOwnership"}create(e,t,r,s,c,l){this.linkedAttestation=new i.SignedLinkedAttestation,this.linkedAttestation.attestation=new i.LinkedAttestation,this.linkedAttestation.attestation.nftOwnership=new o.NFTOwnershipAttestation,this.linkedAttestation.attestation.nftOwnership.subjectPublicKey=e;const u=(0,n.getValidFromAndExpiry)(s,l);this.linkedAttestation.attestation.nftOwnership.validity=new f.EpochTimeValidity,this.linkedAttestation.attestation.nftOwnership.validity.notBefore=u.validFrom,this.linkedAttestation.attestation.nftOwnership.validity.notAfter=u.expiry;for(let e of t){let t=new o.ERC721;if(t.address=(0,a.hexStringToUint8)(e.address),t.chainId=e.chainId,e.tokenIds){t.tokenIds=[];for(let r of e.tokenIds)t.tokenIds.push((0,a.bnToUint8)(r))}this.linkedAttestation.attestation.nftOwnership.tokens.push(t)}c&&(this.linkedAttestation.attestation.nftOwnership.context=c),this.sign(r)}}t.NFTOwnershipAttestation=s},78147:(e,t,r)=>{"use strict";let n;if(Object.defineProperty(t,"__esModule",{value:!0}),"object"==typeof crypto&&crypto.subtle)n=crypto.subtle;else{let e=r(27912).webcrypto;if(!e)throw new Error("webcrypto.subtle missing");n=e.subtle}t.default=n},53030:(e,t,r)=>{"use strict";var n=r(40210),i=r(7317),o=r(95177),f=r(37858),a=r(11645),s=n("%TypeError%");e.exports=function(e,t,r){if("String"!==f(e))throw new s("Assertion failed: `S` must be a String");if(!o(t)||t<0||t>a)throw new s("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==f(r))throw new s("Assertion failed: `unicode` must be a Boolean");return r?t+1>=e.length?t+1:t+i(e,t)["[[CodeUnitCount]]"]:t+1}},13832:(e,t,r)=>{"use strict";var n=r(40210),i=r(21924),o=n("%TypeError%"),f=r(50863),a=n("%Reflect.apply%",!0)||i("%Function.prototype.apply%");e.exports=function(e,t){var r=arguments.length>2?arguments[2]:[];if(!f(r))throw new o("Assertion failed: optional `argumentsList`, if provided, must be a List");return a(e,t,r)}},7317:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(21924),o=r(29544),f=r(65424),a=r(37858),s=r(56415),c=i("String.prototype.charAt"),l=i("String.prototype.charCodeAt");e.exports=function(e,t){if("String"!==a(e))throw new n("Assertion failed: `string` must be a String");var r=e.length;if(t<0||t>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var i=l(e,t),u=c(e,t),d=o(i),h=f(i);if(!d&&!h)return{"[[CodePoint]]":u,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(h||t+1===r)return{"[[CodePoint]]":u,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var p=l(e,t+1);return f(p)?{"[[CodePoint]]":s(i,p),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":u,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},63410:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(37858);e.exports=function(e,t){if("Boolean"!==i(t))throw new n("Assertion failed: Type(done) is not Boolean");return{value:e,done:t}}},79561:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(63682),o=r(87435),f=r(62780),a=r(20134),s=r(78690),c=r(37858);e.exports=function(e,t,r){if("Object"!==c(e))throw new n("Assertion failed: Type(O) is not Object");if(!a(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return i(f,s,o,e,t,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},57257:(e,t,r)=>{"use strict";var n=r(40210),i=r(41405)(),o=n("%TypeError%"),f=n("%IteratorPrototype%",!0),a=r(53030),s=r(63410),c=r(79561),l=r(65537),u=r(86281),d=r(53500),h=r(40892),p=r(82313),y=r(70294),b=r(37858),g=r(9496),m=r(44105),v=function(e,t,r,n){if("String"!==b(t))throw new o("`S` must be a string");if("Boolean"!==b(r))throw new o("`global` must be a boolean");if("Boolean"!==b(n))throw new o("`fullUnicode` must be a boolean");g.set(this,"[[IteratingRegExp]]",e),g.set(this,"[[IteratedString]]",t),g.set(this,"[[Global]]",r),g.set(this,"[[Unicode]]",n),g.set(this,"[[Done]]",!1)};f&&(v.prototype=u(f));if(c(v.prototype,"next",(function(){var e=this;if("Object"!==b(e))throw new o("receiver must be an object");if(!(e instanceof v&&g.has(e,"[[IteratingRegExp]]")&&g.has(e,"[[IteratedString]]")&&g.has(e,"[[Global]]")&&g.has(e,"[[Unicode]]")&&g.has(e,"[[Done]]")))throw new o('"this" value must be a RegExpStringIterator instance');if(g.get(e,"[[Done]]"))return s(void 0,!0);var t=g.get(e,"[[IteratingRegExp]]"),r=g.get(e,"[[IteratedString]]"),n=g.get(e,"[[Global]]"),i=g.get(e,"[[Unicode]]"),f=d(t,r);if(null===f)return g.set(e,"[[Done]]",!0),s(void 0,!0);if(n){if(""===y(l(f,"0"))){var c=p(l(t,"lastIndex")),u=a(r,c,i);h(t,"lastIndex",u,!0)}return s(f,!1)}return g.set(e,"[[Done]]",!0),s(f,!1)})),i&&(m(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])){c(v.prototype,Symbol.iterator,(function(){return this}))}e.exports=function(e,t,r,n){return new v(e,t,r,n)}},41667:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(2435),o=r(63682),f=r(87435),a=r(14326),s=r(62780),c=r(20134),l=r(78690),u=r(76223),d=r(37858);e.exports=function(e,t,r){if("Object"!==d(e))throw new n("Assertion failed: Type(O) is not Object");if(!c(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var h=i({Type:d,IsDataDescriptor:s,IsAccessorDescriptor:a},r)?r:u(r);if(!i({Type:d,IsDataDescriptor:s,IsAccessorDescriptor:a},h))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return o(s,l,f,e,t,h)}},87435:(e,t,r)=>{"use strict";var n=r(62188),i=r(17141),o=r(37858);e.exports=function(e){return void 0!==e&&n(o,"Property Descriptor","Desc",e),i(e)}},65537:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(70631),o=r(20134),f=r(37858);e.exports=function(e,t){if("Object"!==f(e))throw new n("Assertion failed: Type(O) is not Object");if(!o(t))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+i(t));return e[t]}},23555:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(92817),o=r(95695),f=r(20134),a=r(70631);e.exports=function(e,t){if(!f(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=i(e,t);if(null!=r){if(!o(r))throw new n(t+" is not a function: "+a(r));return r}}},92817:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(20134),o=r(66502);e.exports=function(e,t){if(!i(t))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(e)[t]}},14326:(e,t,r)=>{"use strict";var n=r(17642),i=r(62188),o=r(37858);e.exports=function(e){return void 0!==e&&(i(o,"Property Descriptor","Desc",e),!(!n(e,"[[Get]]")&&!n(e,"[[Set]]")))}},50863:(e,t,r)=>{"use strict";e.exports=r(675)},95695:(e,t,r)=>{"use strict";e.exports=r(95320)},66023:(e,t,r)=>{"use strict";var n=r(14445)("%Reflect.construct%",!0),i=r(41667);try{i({},"",{"[[Get]]":function(){}})}catch(e){i=null}if(i&&n){var o={},f={};i(f,"length",{"[[Get]]":function(){throw o},"[[Enumerable]]":!0}),e.exports=function(e){try{n(e,f)}catch(e){return e===o}}}else e.exports=function(e){return"function"==typeof e&&!!e.prototype}},62780:(e,t,r)=>{"use strict";var n=r(17642),i=r(62188),o=r(37858);e.exports=function(e){return void 0!==e&&(i(o,"Property Descriptor","Desc",e),!(!n(e,"[[Value]]")&&!n(e,"[[Writable]]")))}},95177:(e,t,r)=>{"use strict";var n=r(46174),i=r(20487),o=r(37858),f=r(29086),a=r(22633);e.exports=function(e){if("Number"!==o(e)||f(e)||!a(e))return!1;var t=n(e);return i(t)===t}},20134:e=>{"use strict";e.exports=function(e){return"string"==typeof e||"symbol"==typeof e}},15728:(e,t,r)=>{"use strict";var n=r(40210)("%Symbol.match%",!0),i=r(98420),o=r(94686);e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(n){var t=e[n];if(void 0!==t)return o(t)}return i(e)}},86281:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Object.create%",!0),o=n("%TypeError%"),f=n("%SyntaxError%"),a=r(50863),s=r(37858),c=r(21069),l=r(9496),u=r(28185)();e.exports=function(e){if(null!==e&&"Object"!==s(e))throw new o("Assertion failed: `proto` must be null or an object");var t,r=arguments.length<2?[]:arguments[1];if(!a(r))throw new o("Assertion failed: `additionalInternalSlotsList` must be an Array");if(i)t=i(e);else if(u)t={__proto__:e};else{if(null===e)throw new f("native Object.create support is required to create null objects");var n=function(){};n.prototype=e,t=new n}return r.length>0&&c(r,(function(e){l.set(t,e,void 0)})),t}},53500:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(21924)("RegExp.prototype.exec"),o=r(13832),f=r(65537),a=r(95695),s=r(37858);e.exports=function(e,t){if("Object"!==s(e))throw new n("Assertion failed: `R` must be an Object");if("String"!==s(t))throw new n("Assertion failed: `S` must be a String");var r=f(e,"exec");if(a(r)){var c=o(r,e,[t]);if(null===c||"Object"===s(c))return c;throw new n('"exec" method must return `null` or an Object')}return i(e,t)}},11897:(e,t,r)=>{"use strict";e.exports=r(4559)},78690:(e,t,r)=>{"use strict";var n=r(29086);e.exports=function(e,t){return e===t?0!==e||1/e==1/t:n(e)&&n(t)}},40892:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%"),i=r(20134),o=r(78690),f=r(37858),a=function(){try{return delete[].length,!0}catch(e){return!1}}();e.exports=function(e,t,r,s){if("Object"!==f(e))throw new n("Assertion failed: `O` must be an Object");if(!i(t))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==f(s))throw new n("Assertion failed: `Throw` must be a Boolean");if(s){if(e[t]=r,a&&!o(e[t],r))throw new n("Attempted to assign to readonly property.");return!0}try{return e[t]=r,!a||o(e[t],r)}catch(e){return!1}}},53582:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Symbol.species%",!0),o=n("%TypeError%"),f=r(66023),a=r(37858);e.exports=function(e,t){if("Object"!==a(e))throw new o("Assertion failed: Type(O) is not Object");var r=e.constructor;if(void 0===r)return t;if("Object"!==a(r))throw new o("O.constructor is not an Object");var n=i?r[i]:void 0;if(null==n)return t;if(f(n))return n;throw new o("no constructor found")}},8300:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Number%"),o=n("%RegExp%"),f=n("%TypeError%"),a=n("%parseInt%"),s=r(21924),c=r(79246),l=s("String.prototype.slice"),u=c(/^0b[01]+$/i),d=c(/^0o[0-7]+$/i),h=c(/^[-+]0x[0-9a-f]+$/i),p=c(new o("["+["…","​","￾"].join("")+"]","g")),y=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),b=new RegExp("(^["+y+"]+)|(["+y+"]+$)","g"),g=s("String.prototype.replace"),m=r(37858);e.exports=function e(t){if("String"!==m(t))throw new f("Conversion from 'BigInt' to 'number' is not allowed.");if(u(t))return i(a(l(t,2),2));if(d(t))return i(a(l(t,2),8));if(p(t)||h(t))return NaN;var r=g(t,b,"");return r!==t?e(r):i(t)}},94686:e=>{"use strict";e.exports=function(e){return!!e}},86057:(e,t,r)=>{"use strict";var n=r(46174),i=r(20487),o=r(87362),f=r(29086),a=r(22633),s=r(38111);e.exports=function(e){var t=o(e);if(f(t)||0===t)return 0;if(!a(t))return t;var r=i(n(t));return 0===r?0:s(t)*r}},82313:(e,t,r)=>{"use strict";var n=r(11645),i=r(86057);e.exports=function(e){var t=i(e);return t<=0?0:t>n?n:t}},87362:(e,t,r)=>{"use strict";var n=r(40210),i=n("%TypeError%"),o=n("%Number%"),f=r(64790),a=r(94126),s=r(8300);e.exports=function(e){var t=f(e)?e:a(e,o);if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new i("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?s(t):o(t)}},66502:(e,t,r)=>{"use strict";var n=r(40210)("%Object%"),i=r(11897);e.exports=function(e){return i(e),n(e)}},94126:(e,t,r)=>{"use strict";var n=r(41503);e.exports=function(e){return arguments.length>1?n(e,arguments[1]):n(e)}},76223:(e,t,r)=>{"use strict";var n=r(17642),i=r(40210)("%TypeError%"),o=r(37858),f=r(94686),a=r(95695);e.exports=function(e){if("Object"!==o(e))throw new i("ToPropertyDescriptor requires an object");var t={};if(n(e,"enumerable")&&(t["[[Enumerable]]"]=f(e.enumerable)),n(e,"configurable")&&(t["[[Configurable]]"]=f(e.configurable)),n(e,"value")&&(t["[[Value]]"]=e.value),n(e,"writable")&&(t["[[Writable]]"]=f(e.writable)),n(e,"get")){var r=e.get;if(void 0!==r&&!a(r))throw new i("getter must be a function");t["[[Get]]"]=r}if(n(e,"set")){var s=e.set;if(void 0!==s&&!a(s))throw new i("setter must be a function");t["[[Set]]"]=s}if((n(t,"[[Get]]")||n(t,"[[Set]]"))&&(n(t,"[[Value]]")||n(t,"[[Writable]]")))throw new i("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},70294:(e,t,r)=>{"use strict";var n=r(40210),i=n("%String%"),o=n("%TypeError%");e.exports=function(e){if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a string");return i(e)}},37858:(e,t,r)=>{"use strict";var n=r(23951);e.exports=function(e){return"symbol"==typeof e?"Symbol":"bigint"==typeof e?"BigInt":n(e)}},56415:(e,t,r)=>{"use strict";var n=r(40210),i=n("%TypeError%"),o=n("%String.fromCharCode%"),f=r(29544),a=r(65424);e.exports=function(e,t){if(!f(e)||!a(t))throw new i("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return o(e)+o(t)}},46174:(e,t,r)=>{"use strict";var n=r(40210)("%Math.abs%");e.exports=function(e){return n(e)}},20487:(e,t,r)=>{"use strict";var n=r(37858),i=Math.floor;e.exports=function(e){return"BigInt"===n(e)?e:i(e)}},4559:(e,t,r)=>{"use strict";var n=r(40210)("%TypeError%");e.exports=function(e,t){if(null==e)throw new n(t||"Cannot call method on "+e);return e}},23951:e=>{"use strict";e.exports=function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0}},14445:(e,t,r)=>{"use strict";e.exports=r(40210)},63682:(e,t,r)=>{"use strict";var n=r(31044),i=r(40210),o=n()&&i("%Object.defineProperty%",!0),f=n.hasArrayLengthDefineBug(),a=f&&r(675),s=r(21924)("Object.prototype.propertyIsEnumerable");e.exports=function(e,t,r,n,i,c){if(!o){if(!e(c))return!1;if(!c["[[Configurable]]"]||!c["[[Writable]]"])return!1;if(i in n&&s(n,i)!==!!c["[[Enumerable]]"])return!1;var l=c["[[Value]]"];return n[i]=l,t(n[i],l)}return f&&"length"===i&&"[[Value]]"in c&&a(n)&&n.length!==c["[[Value]]"]?(n.length=c["[[Value]]"],n.length===c["[[Value]]"]):(o(n,i,r(c)),!0)}},675:(e,t,r)=>{"use strict";var n=r(40210)("%Array%"),i=!n.isArray&&r(21924)("Object.prototype.toString");e.exports=n.isArray||function(e){return"[object Array]"===i(e)}},62188:(e,t,r)=>{"use strict";var n=r(40210),i=n("%TypeError%"),o=n("%SyntaxError%"),f=r(17642),a={"Property Descriptor":function(e){var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in e)if(f(e,r)&&!t[r])return!1;var n=f(e,"[[Value]]"),o=f(e,"[[Get]]")||f(e,"[[Set]]");if(n&&o)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(64377),"Iterator Record":function(e){return f(e,"[[Iterator]]")&&f(e,"[[NextMethod]]")&&f(e,"[[Done]]")},"PromiseCapability Record":function(e){return e&&f(e,"[[Resolve]]")&&"function"==typeof e["[[Resolve]]"]&&f(e,"[[Reject]]")&&"function"==typeof e["[[Reject]]"]&&f(e,"[[Promise]]")&&e["[[Promise]]"]&&"function"==typeof e["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(e){return e&&f(e,"[[Completion]]")&&f(e,"[[Capability]]")&&a["PromiseCapability Record"](e["[[Capability]]"])}};e.exports=function(e,t,r,n){var f=a[t];if("function"!=typeof f)throw new o("unknown record type: "+t);if("Object"!==e(n)||!f(n))throw new i(r+" must be a "+t)}},21069:e=>{"use strict";e.exports=function(e,t){for(var r=0;r{"use strict";e.exports=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}},22633:e=>{"use strict";var t=Number.isNaN||function(e){return e!=e};e.exports=Number.isFinite||function(e){return"number"==typeof e&&!t(e)&&e!==1/0&&e!==-1/0}},29544:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=55296&&e<=56319}},64377:(e,t,r)=>{"use strict";var n=r(17642);e.exports=function(e){return n(e,"[[StartIndex]]")&&n(e,"[[EndIndex]]")&&e["[[StartIndex]]"]>=0&&e["[[EndIndex]]"]>=e["[[StartIndex]]"]&&String(parseInt(e["[[StartIndex]]"],10))===String(e["[[StartIndex]]"])&&String(parseInt(e["[[EndIndex]]"],10))===String(e["[[EndIndex]]"])}},29086:e=>{"use strict";e.exports=Number.isNaN||function(e){return e!=e}},64790:e=>{"use strict";e.exports=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}},2435:(e,t,r)=>{"use strict";var n=r(40210),i=r(17642),o=n("%TypeError%");e.exports=function(e,t){if("Object"!==e.Type(t))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in t)if(i(t,n)&&!r[n])return!1;if(e.IsDataDescriptor(t)&&e.IsAccessorDescriptor(t))throw new o("Property Descriptors may not be both accessor and data descriptors");return!0}},65424:e=>{"use strict";e.exports=function(e){return"number"==typeof e&&e>=56320&&e<=57343}},11645:(e,t,r)=>{"use strict";var n=r(40210),i=n("%Math%"),o=n("%Number%");e.exports=o.MAX_SAFE_INTEGER||i.pow(2,53)-1},38111:e=>{"use strict";e.exports=function(e){return e>=0?1:-1}},89880:(e,t,r)=>{"use strict";r.d(t,{kU:()=>u,Dp:()=>l,ET:()=>d});const n=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,f=new Uint8Array(o);e[t];){var l=r[e.charCodeAt(t)];if(255===l)return;for(var u=0,d=o-1;(0!==l||u>>0,f[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=u,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===f[h];)h++;for(var p=new Uint8Array(n+(o-h)),y=n;h!==o;)p[y++]=f[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var f=(o-i)*l+1>>>0,c=new Uint8Array(f);i!==o;){for(var u=t[i],d=0,h=f-1;(0!==u||d>>0,c[h]=u%a>>>0,u=u/a>>>0;if(0!==u)throw new Error("Non-zero carry");n=d,i++}for(var p=f-n;p!==f&&0===c[p];)p++;for(var y=s.repeat(r);pnew a({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class c{constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new o(e,t,r),this.decoder=new f(e,t,n)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const l=({name:e,prefix:t,encode:r,decode:n})=>new c(e,t,r,n),u=({prefix:e,name:t,alphabet:r})=>{const{encode:o,decode:f}=n(r,t);return l({prefix:e,name:t,encode:o,decode:e=>(0,i.coerce)(f(e))})},d=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>l({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<r;)f-=r,o+=t[i&a>>f];if(f&&(o+=t[i&a<((e,t,r,n)=>{const i={};for(let e=0;e=8&&(a-=8,f[c++]=255&s>>a)}if(a>=r||255&s<<8-a)throw new SyntaxError("Unexpected end of data");return f})(t,n,r,e)})},22817:(e,t,r)=>{"use strict";r.r(t),r.d(t,{base32:()=>i,base32hex:()=>s,base32hexpad:()=>l,base32hexpadupper:()=>u,base32hexupper:()=>c,base32pad:()=>f,base32padupper:()=>a,base32upper:()=>o,base32z:()=>d});var n=r(89880);const i=(0,n.ET)({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),o=(0,n.ET)({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),f=(0,n.ET)({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=(0,n.ET)({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),s=(0,n.ET)({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),c=(0,n.ET)({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),l=(0,n.ET)({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),u=(0,n.ET)({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),d=(0,n.ET)({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})},99086:(e,t,r)=>{"use strict";r.r(t),r.d(t,{base58btc:()=>i,base58flickr:()=>o});var n=r(89880);const i=(0,n.kU)({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),o=(0,n.kU)({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})},95934:(e,t,r)=>{"use strict";r.r(t),r.d(t,{coerce:()=>a,empty:()=>n,equals:()=>f,fromHex:()=>o,fromString:()=>c,isBinary:()=>s,toHex:()=>i,toString:()=>l});const n=new Uint8Array(0),i=e=>e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),""),o=e=>{const t=e.match(/../g);return t?new Uint8Array(t.map((e=>parseInt(e,16)))):n},f=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},s=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),c=e=>(new TextEncoder).encode(e),l=e=>(new TextDecoder).decode(e)},28924:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Digest:()=>s,create:()=>o,decode:()=>f,equals:()=>a});var n=r(95934),i=r(4714);const o=(e,t)=>{const r=t.byteLength,n=i.encodingLength(e),o=n+i.encodingLength(r),f=new Uint8Array(o+r);return i.encodeTo(e,f,0),i.encodeTo(r,f,n),f.set(t,o),new s(e,r,t,f)},f=e=>{const t=(0,n.coerce)(e),[r,o]=i.decode(t),[f,a]=i.decode(t.subarray(o)),c=t.subarray(o+a);if(c.byteLength!==f)throw new Error("Incorrect length");return new s(r,f,c,t)},a=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&(0,n.equals)(e.bytes,t.bytes);class s{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}},7225:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Hasher:()=>o,from:()=>i});var n=r(28924);const i=({name:e,code:t,encode:r})=>new o(e,t,r);class o{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?n.create(this.code,t):t.then((e=>n.create(this.code,e)))}throw Error("Unknown type, must be binary type")}}},63039:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CID:()=>s,bytes:()=>a,digest:()=>i,hasher:()=>w,varint:()=>n});var n=r(4714),i=r(28924),o=r(99086),f=r(22817),a=r(95934);class s{constructor(e,t,r,n){this.code=t,this.version=e,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:g,byteLength:g,code:b,version:b,multihash:b,bytes:b,_baseCache:g,asCID:g})}toV0(){if(0===this.version)return this;{const{code:e,multihash:t}=this;if(e!==d)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==h)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return s.createV0(t)}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=i.create(e,t);return s.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&i.equals(this.multihash,e.multihash)}toString(e){const{bytes:t,version:r,_baseCache:n}=this;return 0===r?l(t,n,e||o.base58btc.encoder):u(t,n,e||f.base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return m(/^0\.0/,v),!(!e||!e[y]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof s)return e;if(null!=e&&e.asCID===e){const{version:t,code:r,multihash:n,bytes:i}=e;return new s(t,r,n,i||p(t,r,n.bytes))}if(null!=e&&!0===e[y]){const{version:t,multihash:r,code:n}=e,o=i.decode(r);return s.create(t,n,o)}return null}static create(e,t,r){if("number"!=typeof t)throw new Error("String codecs are no longer supported");switch(e){case 0:if(t!==d)throw new Error(`Version 0 CID must use dag-pb (code: ${d}) block encoding`);return new s(e,t,r,r.bytes);case 1:{const n=p(e,t,r.bytes);return new s(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return s.create(0,d,e)}static createV1(e,t){return s.create(1,e,t)}static decode(e){const[t,r]=s.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=s.inspectBytes(e),r=t.size-t.multihashSize,n=(0,a.coerce)(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const o=n.subarray(t.multihashSize-t.digestSize),f=new i.Digest(t.multihashCode,t.digestSize,o,n);return[0===t.version?s.createV0(f):s.createV1(t.codec,f),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,i]=n.decode(e.subarray(t));return t+=i,r};let i=r(),o=d;if(18===i?(i=0,t=0):1===i&&(o=r()),0!==i&&1!==i)throw new RangeError(`Invalid CID version ${i}`);const f=t,a=r(),s=r(),c=t+s;return{version:i,codec:o,multihashCode:a,digestSize:s,multihashSize:c-f,size:c}}static parse(e,t){const[r,n]=c(e,t),i=s.decode(n);return i._baseCache.set(r,e),i}}const c=(e,t)=>{switch(e[0]){case"Q":{const r=t||o.base58btc;return[o.base58btc.prefix,r.decode(`${o.base58btc.prefix}${e}`)]}case o.base58btc.prefix:{const r=t||o.base58btc;return[o.base58btc.prefix,r.decode(e)]}case f.base32.prefix:{const r=t||f.base32;return[f.base32.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},l=(e,t,r)=>{const{prefix:n}=r;if(n!==o.base58btc.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=t.get(n);if(null==i){const i=r.encode(e).slice(1);return t.set(n,i),i}return i},u=(e,t,r)=>{const{prefix:n}=r,i=t.get(n);if(null==i){const i=r.encode(e);return t.set(n,i),i}return i},d=112,h=18,p=(e,t,r)=>{const i=n.encodingLength(e),o=i+n.encodingLength(t),f=new Uint8Array(o+r.byteLength);return n.encodeTo(e,f,0),n.encodeTo(t,f,i),f.set(r,o),f},y=Symbol.for("@ipld/js-cid/CID"),b={writable:!1,configurable:!1,enumerable:!0},g={writable:!1,enumerable:!1,configurable:!1},m=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},v="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n // Make sure to use cid instead of value\n doSomethingWithCID(cid)\n}\n";var w=r(7225)},4714:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>w,encodeTo:()=>A,encodingLength:()=>E});var n=function e(t,r,n){r=r||[];var a=n=n||0;for(;t>=f;)r[n++]=255&t|i,t/=128;for(;t&o;)r[n++]=255&t|i,t>>>=7;return r[n]=0|t,e.bytes=n-a+1,r},i=128,o=-128,f=Math.pow(2,31);var a=function e(t,r){var n,i=0,o=0,f=r=r||0,a=t.length;do{if(f>=a)throw e.bytes=0,new RangeError("Could not decode varint");n=t[f++],i+=o<28?(n&c)<=s);return e.bytes=f-r,i},s=128,c=127;var l=Math.pow(2,7),u=Math.pow(2,14),d=Math.pow(2,21),h=Math.pow(2,28),p=Math.pow(2,35),y=Math.pow(2,42),b=Math.pow(2,49),g=Math.pow(2,56),m=Math.pow(2,63);const v={encode:n,decode:a,encodingLength:function(e){return e[v.decode(e,t),v.decode.bytes],A=(e,t,r=0)=>(v.encode(e,t,r),t),E=e=>v.encodingLength(e)},18597:e=>{"use strict";e.exports={i8:"6.5.4"}}},o={};function f(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=i,f.amdO={},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);f.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,f.d(i,o),i},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((t,r)=>(f.f[r](e,t),t)),[])),f.u=e=>"negotiator-"+{83:"cf3e36806f86b8170ad2",125:"d60dd87121b09ffa9da4",276:"bd1e935f83cc95154946",278:"5365c5c6f9f34b56302f",337:"3d41bf48ddc440c8f8bd",438:"ec517b79aceea82aa05e",817:"ea85034672840bab63bd"}[e]+".js",f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="negotiator:",f.l=(e,t,i,o)=>{if(r[e])r[e].push(t);else{var a,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(h);var i=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;f.g.importScripts&&(e=f.g.location+"");var t=f.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f.p=e})(),(()=>{var e={179:0};f.f.j=(t,r)=>{var n=f.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=e[t]=[r,i]));r.push(n[2]=i);var o=f.p+f.u(t),a=new Error;f.l(o,(r=>{if(f.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[o,a,s]=r,c=0;if(o.some((t=>0!==e[t]))){for(n in a)f.o(a,n)&&(f.m[n]=a[n]);if(s)s(f)}for(t&&t(r);c{"use strict";f.r(a),f.d(a,{AbstractView:()=>r.w,Client:()=>t.KU,Outlet:()=>E,SelectIssuers:()=>T.$,SelectWallet:()=>k.R,Start:()=>_.z});var e,t=f(5904),r=f(52335),n=f(39896),i=f(35908),o=f(43803),s=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,a)}s((n=n.apply(e,t||[])).next())}))},c=function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return f.label++,{value:a[1],done:!1};case 5:f.label++,n=a[1],a=[0];continue;case 7:a=f.ops.pop(),f.trys.pop();continue;default:if(!(i=f.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(){function e(e,t){this.config=e,this.showWhitelistCallback=t,this.storedWhitelist={},this.staticWhitelist={},this.loadStaticWhitelist(),this.loadStoredWhitelist()}return e.prototype.loadStaticWhitelist=function(){var e,t,r,i;if(this.config.issuers)try{for(var o=l(this.config.issuers),f=o.next();!f.done;f=o.next()){var a=f.value,s=a.collectionID,c=a.whitelist;if(c)try{for(var u=(r=void 0,l(c)),d=u.next();!d.done;d=u.next()){var h=d.value;try{if(h=new URL(h).origin,!this.staticWhitelist[h]){this.staticWhitelist[h]=[s];continue}this.staticWhitelist[h].push(s)}catch(e){(0,n.kg)(2,"Failed to validate whitelist origin: "+e.message)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(t){e={error:t}}finally{try{f&&!f.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.loadStoredWhitelist=function(){var t;try{this.storedWhitelist=null!==(t=JSON.parse(localStorage.getItem(e.STORAGE_KEY)))&&void 0!==t?t:{}}catch(e){}},e.prototype.saveWhitelist=function(){localStorage.setItem(e.STORAGE_KEY,JSON.stringify(this.storedWhitelist))},e.prototype.getWhitelistedIssuers=function(e){var t,r,n,i,o=null!==(i=null===(n=this.storedWhitelist[e])||void 0===n?void 0:n.issuers)&&void 0!==i?i:[];if(this.staticWhitelist[e])try{for(var f=l(this.staticWhitelist[e]),a=f.next();!a.done;a=f.next()){var s=a.value;o.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}return o},e.prototype.isWhitelisted=function(e,t){var r,n,i;try{for(var o=l(t),f=o.next();!f.done;f=o.next()){var a=f.value;if(!(this.staticWhitelist[e]&&-1!==this.staticWhitelist[e].indexOf(a)||(null===(i=this.storedWhitelist[e])||void 0===i?void 0:i.issuers)&&-1!==this.storedWhitelist[e].issuers.indexOf(a)))return!1}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.whitelistCheck=function(e,t){return s(this,void 0,void 0,(function(){var r,i;return c(this,(function(o){switch(o.label){case 0:return(window.parent||window.opener)&&document.referrer?(r=new URL(document.referrer).origin)===window.location.origin?[2]:(i=e.map((function(e){return e.collectionID})),t||!this.isWhitelisted(r,i)&&(0,n.GL)("tn-user-denied-access-to-connection")?[4,this.showWhitelistDialog(r,e)]:[3,2]):[2];case 1:o.sent(),o.label=2;case 2:return[2,this.getWhitelistedIssuers(r)]}}))}))},e.prototype.showWhitelistDialog=function(e,t){var r=this;return new Promise((function(i,o){var f="\n\t\t\t\t

    ".concat(e," is requesting access to the following attestations

    \n\t\t\t\t
    \n\t\t\t\t\t").concat(t.map((function(t){return'\n\t\t\t\t\t\t\n\t\t\t\t\t")})),"\n\t\t\t\t
    \n\t\t\t"),a='',s='',c=r.config.whitelistDialogRenderer?r.config.whitelistDialogRenderer(f,a,s):'\n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t'.concat(f,"\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t").concat(a,"\n\t\t\t\t\t\t").concat(s,"\n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t");document.body.insertAdjacentHTML("beforeend",c),document.getElementById("tn-access-accept").addEventListener("click",(function(){var t,n,o,f=document.getElementsByClassName("tn-permission-cb"),a=[];try{for(var s=l(f),c=s.next();!c.done;c=s.next()){var u=c.value,d=u.getAttribute("data-issuer");(null===(o=r.storedWhitelist[e])||void 0===o?void 0:o.issuers)||(r.storedWhitelist[e]={issuers:[]}),u.checked&&a.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}r.storedWhitelist[e].issuers=a,r.saveWhitelist(),i()}));document.getElementById("tn-access-deny").addEventListener("click",(function(){r.storedWhitelist[e]&&delete r.storedWhitelist[e],r.saveWhitelist(),(0,n.pC)("tn-user-denied-access-to-connection",!0,10),o(new Error("USER_ABORT"))})),r.showWhitelistCallback()}))},e.STORAGE_KEY="tn-whitelist",e}(),d=f(1694),h=f(3076),p=f(84570),y=(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),b=function(){return b=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==a[0]&&2!==a[0])){f=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},w={whitelistDialogWidth:"450px",whitelistDialogHeight:"350px"},A={max_width:"undefined"!=typeof window&&window.innerWidth<700?"400px":"450px",min_height:"undefined"!=typeof window&&window.innerHeight<600?"600px":"650px"},E=function(e){function t(t,r){void 0===r&&(r=null);var o=e.call(this,t)||this;if(o.tokenConfig=t,o.tokenConfig=Object.assign(w,t),o.whitelist=new u(o.tokenConfig,(function(){var e=o.getDataFromQuery("evtid");o.sendMessageResponse({evtid:e,evt:i.kt.SHOW_FRAME,max_width:o.tokenConfig.whitelistDialogWidth,min_height:o.tokenConfig.whitelistDialogHeight})})),r)o.urlParams=r;else{var f=window.location.hash.length>1?"?"+window.location.hash.substring(1):window.location.search;o.urlParams=new URLSearchParams(f)}return o.pageOnLoadEventHandler().catch((function(e){console.error(e),(0,n.kg)(2,"Outlet pageOnLoadEventHandler error: "+e.message)})),o}return y(t,e),t.prototype.getDataFromQuery=function(e){return this.urlParams?this.urlParams.has(i.ss+e)?this.urlParams.get(i.ss+e):this.urlParams.get(e):null},t.prototype.getCallbackUrlKey=function(e){return i.ss+e},t.prototype.pageOnLoadEventHandler=function(){var e;return g(this,void 0,void 0,(function(){var t,r,i,f;return m(this,(function(a){switch(a.label){case 0:t=this.getDataFromQuery("evtid"),r=this.getDataFromQuery("action"),(i=this.getDataFromQuery("requestor"))&&(this.redirectCallbackUrl=new URL(i)),(0,n.kg)(2,"Outlet received event ID "+t+" action "+r+" at "+window.location.href),a.label=1;case 1:switch(a.trys.push([1,15,,16]),r){case o.gF.GET_ISSUER_TOKENS:return[3,2];case o.gF.EMAIL_ATTEST_CALLBACK:return[3,4];case o.gF.GET_PROOF:return[3,6];case o.gF.GET_MUTLI_PROOF:return[3,8]}return[3,10];case 2:return[4,this.sendTokens(t)];case 3:return a.sent(),[3,14];case 4:return"true"===this.getDataFromQuery("localClient")?[2]:[4,this.processAttestationIdCallback(t)];case 5:return a.sent(),[3,14];case 6:return[4,this.sendTokenProof(t)];case 7:return a.sent(),[3,14];case 8:return[4,this.sendMultiTokenProof(t)];case 9:return a.sent(),[3,14];case 10:return this.getDataFromQuery("ticket")?[4,this.readMagicLink()]:[3,13];case 11:return a.sent(),[4,this.sendTokens(t)];case 12:a.sent(),a.label=13;case 13:return[3,14];case 14:return[3,16];case 15:return f=a.sent(),console.error(f),this.sendErrorResponse(t,null!==(e=null==f?void 0:f.message)&&void 0!==e?e:f,this.getDataFromQuery("issuer")),[3,16];case 16:return[2]}}))}))},t.prototype.processAttestationIdCallback=function(e){var t=this.redirectCallbackUrl,r=this.getDataFromQuery("issuer");try{switch((new h.p).captureAttestationIdCallback(this.urlParams),this.getDataFromQuery("orig-action")){case o.gF.GET_PROOF:this.sendTokenProof(e);break;case o.gF.GET_MUTLI_PROOF:this.sendMultiTokenProof(e);break;default:throw new Error("Original action not defined in attestation.id callback")}}catch(e){if(console.error(e),t)return this.proofRedirectError(r,e.message)}window.location.hash=(0,n.rT)(this.urlParams,["attestation","requestSecret","address","wallet"]).toString()},t.prototype.getIssuerConfigById=function(e){var t,r;if(this.tokenConfig.issuers){try{for(var n=v(this.tokenConfig.issuers),i=n.next();!i.done;i=n.next()){var o=i.value;if(o.collectionID===e)return o}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}throw new Error("Issuer "+e+" not found")}},t.prototype.readMagicLink=function(){return g(this,void 0,void 0,(function(){return m(this,(function(e){switch(e.label){case 0:return this.urlParams.has("ticket")?[4,this.ticketStorage.importTicketFromMagicLink(this.urlParams)]:[2];case 1:return e.sent(),[2]}}))}))},t.prototype.sendMultiTokenProof=function(e){return g(this,void 0,void 0,(function(){var t,r,f,a,s,c,l,u,d,h=this;return m(this,(function(p){switch(p.label){case 0:t=this.getDataFromQuery("tokens"),r=this.getDataFromQuery("wallet"),f=this.getDataFromQuery("address"),(0,n.Sg)(t,"unsigned token is missing"),a="true"===this.getDataFromQuery("redirect")&&window.location.href,p.label=1;case 1:return p.trys.push([1,3,,4]),s=JSON.parse(t),[4,this.authenticateMany(s,f,r,a,(function(){h.sendMessageResponse({evtid:e,evt:i.kt.SHOW_FRAME,max_width:A.max_width,min_height:A.min_height})}))];case 2:return c=p.sent(),this.redirectCallbackUrl?(l=this.redirectCallbackUrl,(u=new URLSearchParams(l.hash.substring(1))).set(this.getCallbackUrlKey("action"),"proof-callback"),u.set(this.getCallbackUrlKey("multi-token"),"true"),u.set(this.getCallbackUrlKey("tokens"),JSON.stringify(c)),l.hash=u.toString(),window.location.href=l.href,[2]):(this.sendMessageResponse({evtid:e,evt:o.AJ.PROOF,data:c}),[3,4]);case 3:return d=p.sent(),(0,n.kg)(2,d),a?[2,this.proofRedirectError(this.getDataFromQuery("issuer"),d.message)]:(this.sendErrorResponse(e,d.message),[3,4]);case 4:return[2]}}))}))},t.prototype.sendTokenProof=function(e){return g(this,void 0,void 0,(function(){var t,r,f,a,s,c,l,u,d,y,g,v,w,E=this;return m(this,(function(m){switch(m.label){case 0:t=this.getDataFromQuery("issuer"),r=this.getDataFromQuery("token"),f=this.getDataFromQuery("wallet"),a=this.getDataFromQuery("address"),(0,n.Sg)(r,"unsigned token is missing"),s=JSON.parse(r),c="true"===this.getDataFromQuery("redirect")&&window.location.href,m.label=1;case 1:return m.trys.push([1,5,,6]),l=this.getIssuerConfigById(t),[4,this.ticketStorage.getStoredTicketFromDecodedTokenOrId((0,n.s1)(l),s)];case 2:return u=m.sent(),[4,new h.p(l.attestationOrigin,(function(){E.sendMessageResponse({evtid:e,evt:i.kt.SHOW_FRAME,max_width:A.max_width,min_height:A.min_height})}),c).getIdentifierAttestation(u.id,f,a,{action:o.gF.GET_PROOF,issuer:t,token:JSON.stringify(s)})];case 3:return d=m.sent(),[4,(0,p.s)(l,d.attestation,d.identifierSecret,u)];case 4:return y=m.sent(),this.redirectCallbackUrl?(g=this.redirectCallbackUrl,(v=new URLSearchParams(g.hash.substring(1))).set(this.getCallbackUrlKey("action"),"proof-callback"),v.set(this.getCallbackUrlKey("issuer"),t),v.set(this.getCallbackUrlKey("attestation"),y.proof),v.set(this.getCallbackUrlKey("type"),u.type),v.set(this.getCallbackUrlKey("token"),r),g.hash=v.toString(),window.location.href=g.href,[2]):(this.sendMessageResponse({evtid:e,evt:o.AJ.PROOF,data:b({issuer:l.collectionID},y)}),[3,6]);case 5:return w=m.sent(),(0,n.kg)(2,w),c?[2,this.proofRedirectError(this.getDataFromQuery("issuer"),w.message)]:(this.sendErrorResponse(e,w.message),[3,6]);case 6:return[2]}}))}))},t.prototype.sendTokens=function(e){return g(this,void 0,void 0,(function(){var t,r,i,f,a,s,c,l,u,d,h,p,y,b,g,w,A,E,_,k,T,S,x,P,I,M,C,O;return m(this,(function(m){switch(m.label){case 0:if(!(t=JSON.parse(this.getDataFromQuery("request"))))return[2];r={};try{for(i=v(this.tokenConfig.issuers),f=i.next();!f.done;f=i.next()){p=f.value,a=(0,n.s1)(p);try{for(x=void 0,s=v(a),c=s.next();!c.done;c=s.next())w=c.value,r[w]=p}catch(e){x={error:e}}finally{try{c&&!c.done&&(P=s.return)&&P.call(s)}finally{if(x)throw x.error}}}}catch(e){T={error:e}}finally{try{f&&!f.done&&(S=i.return)&&S.call(i)}finally{if(T)throw T.error}}for(p in l=[],t)try{for(I=void 0,u=v(t[p]),d=u.next();!d.done;d=u.next())w=d.value,r[w]&&-1===l.indexOf(r[w])&&l.push(r[w])}catch(e){I={error:e}}finally{try{d&&!d.done&&(M=u.return)&&M.call(u)}finally{if(I)throw I.error}}return[4,this.whitelist.whitelistCheck(l,!1)];case 1:for(p in h=m.sent(),t){y=[];try{for(C=void 0,b=v(t[p]),g=b.next();!g.done;g=b.next())w=g.value,r[w]&&h.indexOf(r[w].collectionID)>-1&&y.push(w)}catch(e){C={error:e}}finally{try{g&&!g.done&&(O=b.return)&&O.call(b)}finally{if(C)throw C.error}}t[p]=y}return[4,this.ticketStorage.getDecodedTokens(t)];case 2:if(A=m.sent(),(0,n.kg)(2,"issuerTokens: (Outlet.sendTokens)",A),this.redirectCallbackUrl)try{return E=this.redirectCallbackUrl,(_=new URLSearchParams(E.hash.substring(1))).set(this.getCallbackUrlKey("action"),o.gF.GET_ISSUER_TOKENS+"-response"),_.set(this.getCallbackUrlKey("tokens"),JSON.stringify(A)),E.hash="#"+_.toString(),k=E.href,(0,n.kg)(2,"tokens ready. go to: ",k),window.location.href=k,[2]}catch(e){(0,n.kg)(2,"Requestor redirect Error. ",e)}return this.sendMessageResponse({evtid:e,evt:o.AJ.ISSUER_TOKENS,data:{tokens:A}}),[2]}}))}))},t.prototype.sendErrorResponse=function(e,t,r,n){if(void 0===n&&(n="error"),this.redirectCallbackUrl){var o=this.redirectCallbackUrl,f=new URLSearchParams(o.hash.substring(1));return f.set(this.getCallbackUrlKey("action"),i.kt.ERROR),f.set(this.getCallbackUrlKey("issuer"),r),f.set(this.getCallbackUrlKey("type"),n),f.set(this.getCallbackUrlKey("error"),t),o.hash="#"+f.toString(),void(window.location.href=o.href)}this.sendMessageResponse({evtid:e,evt:i.kt.ERROR,errors:[t]})},t.prototype.proofRedirectError=function(e,t){var r=this.redirectCallbackUrl,n=new URLSearchParams(r.hash.substring(1));n.set(this.getCallbackUrlKey("action"),"proof-callback"),n.set(this.getCallbackUrlKey("issuer"),e),n.set(this.getCallbackUrlKey("error"),t),r.hash=n.toString(),window.location.href=r.href},t.prototype.sendMessageResponse=function(e){var t;document.referrer&&(window.opener&&window.opener!==window?t=window.opener:window.parent!==window&&(t=window.parent),t&&t.postMessage(e,"*"))},t}(d.c),_=f(30838),k=f(82707),T=f(39345)})(),a})())); \ No newline at end of file diff --git a/negotiator.js.LICENSE.txt b/negotiator.js.LICENSE.txt index 32ddb860..27fa9514 100644 --- a/negotiator.js.LICENSE.txt +++ b/negotiator.js.LICENSE.txt @@ -41,7 +41,7 @@ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ /** * [js-sha3]{@link https://github.com/emn178/js-sha3}