@truebit/cli 1.120.0-beta.165 → 1.120.0-beta.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.mjs CHANGED
@@ -22,5 +22,5 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
22
22
 
23
23
  See the Apache Version 2.0 License for specific language governing permissions
24
24
  and limitations under the License.
25
- ***************************************************************************** */!function(){return xl||(xl=1,function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof we?we:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=r(e);function r(e,t){return function(n,r){Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0!==t.Reflect&&(n=r(t.Reflect,n)),function(e,t){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,o={__proto__:[]}instanceof Array,c=!s&&!o,u={create:s?function(){return pe(Object.create(null))}:o?function(){return pe({__proto__:null})}:function(){return pe({})},has:c?function(e,t){return n.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return n.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),p="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:ce(),d="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:ue(),f="function"==typeof WeakMap?WeakMap:le(),h=r?Symbol.for("@reflect-metadata:registry"):void 0,m=ie(),y=ae(m);function g(e,t,n,r){if($(n)){if(!V(e))throw new TypeError;if(!G(t))throw new TypeError;return M(e,t)}if(!V(e))throw new TypeError;if(!z(t))throw new TypeError;if(!z(r)&&!$(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),A(e,t,n=Y(n),r)}function b(e,t){function n(n,r){if(!z(n))throw new TypeError;if(!$(r)&&!W(r))throw new TypeError;C(e,t,n,r)}return n}function v(e,t,n,r){if(!z(n))throw new TypeError;return $(r)||(r=Y(r)),C(e,t,n,r)}function w(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),O(e,t,n)}function x(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),R(e,t,n)}function _(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),I(e,t,n)}function T(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),N(e,t,n)}function E(e,t){if(!z(e))throw new TypeError;return $(t)||(t=Y(t)),P(e,t)}function S(e,t){if(!z(e))throw new TypeError;return $(t)||(t=Y(t)),j(e,t)}function k(e,t,n){if(!z(t))throw new TypeError;if($(n)||(n=Y(n)),!z(t))throw new TypeError;$(n)||(n=Y(n));var r=oe(t,n,!1);return!$(r)&&r.OrdinaryDeleteMetadata(e,t,n)}function M(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!$(r)&&!D(r)){if(!G(r))throw new TypeError;t=r}}return t}function A(e,t,n,r){for(var i=e.length-1;i>=0;--i){var a=(0,e[i])(t,n,r);if(!$(a)&&!D(a)){if(!z(a))throw new TypeError;r=a}}return r}function O(e,t,n){if(R(e,t,n))return!0;var r=ne(t);return!D(r)&&O(e,r,n)}function R(e,t,n){var r=oe(t,n,!1);return!$(r)&&q(r.OrdinaryHasOwnMetadata(e,t,n))}function I(e,t,n){if(R(e,t,n))return N(e,t,n);var r=ne(t);return D(r)?void 0:I(e,r,n)}function N(e,t,n){var r=oe(t,n,!1);if(!$(r))return r.OrdinaryGetOwnMetadata(e,t,n)}function C(e,t,n,r){oe(n,r,!0).OrdinaryDefineOwnMetadata(e,t,n,r)}function P(e,t){var n=j(e,t),r=ne(e);if(null===r)return n;var i=P(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var a=new d,s=[],o=0,c=n;o<c.length;o++){var u=c[o];a.has(u)||(a.add(u),s.push(u))}for(var l=0,p=i;l<p.length;l++){u=p[l];a.has(u)||(a.add(u),s.push(u))}return s}function j(e,t){var n=oe(e,t,!1);return n?n.OrdinaryOwnMetadataKeys(e,t):[]}function L(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function $(e){return void 0===e}function D(e){return null===e}function U(e){return"symbol"==typeof e}function z(e){return"object"==typeof e?null!==e:"function"==typeof e}function B(e,t){switch(L(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n="string",r=Z(e,i);if(void 0!==r){var a=r.call(e,n);if(z(a))throw new TypeError;return a}return F(e)}function F(e,t){var n,r,i=e.toString;if(K(i)&&!z(r=i.call(e)))return r;if(K(n=e.valueOf)&&!z(r=n.call(e)))return r;throw new TypeError}function q(e){return!!e}function H(e){return""+e}function Y(e){var t=B(e);return U(t)?t:H(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function K(e){return"function"==typeof e}function G(e){return"function"==typeof e}function W(e){switch(L(e)){case 3:case 4:return!0;default:return!1}}function J(e,t){return e===t||e!=e&&t!=t}function Z(e,t){var n=e[t];if(null!=n){if(!K(n))throw new TypeError;return n}}function X(e){var t=Z(e,a);if(!K(t))throw new TypeError;var n=t.call(e);if(!z(n))throw new TypeError;return n}function Q(e){return e.value}function ee(e){var t=e.next();return!t.done&&t}function te(e){var t=e.return;t&&t.call(e)}function ne(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function re(){var e,n,r,i;$(h)||void 0===t.Reflect||h in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=se(t.Reflect));var a=new f,s={registerProvider:o,getProvider:u,setProvider:m};return s;function o(t){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case $(n):n=t;break;case n===t:break;case $(r):r=t;break;case r===t:break;default:void 0===i&&(i=new d),i.add(t)}}function c(t,a){if(!$(n)){if(n.isProviderFor(t,a))return n;if(!$(r)){if(r.isProviderFor(t,a))return n;if(!$(i))for(var s=X(i);;){var o=ee(s);if(!o)return;var c=Q(o);if(c.isProviderFor(t,a))return te(s),c}}}if(!$(e)&&e.isProviderFor(t,a))return e}function u(e,t){var n,r=a.get(e);return $(r)||(n=r.get(t)),$(n)?($(n=c(e,t))||($(r)&&(r=new p,a.set(e,r)),r.set(t,n)),n):n}function l(e){if($(e))throw new TypeError;return n===e||r===e||!$(i)&&i.has(e)}function m(e,t,n){if(!l(n))throw new Error("Metadata provider not registered.");var r=u(e,t);if(r!==n){if(!$(r))return!1;var i=a.get(e);$(i)&&(i=new p,a.set(e,i)),i.set(t,n)}return!0}}function ie(){var e;return!$(h)&&z(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[h]),$(e)&&(e=re()),!$(h)&&z(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,h,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function ae(e){var t=new f,n={isProviderFor:function(e,n){var r=t.get(e);return!$(r)&&r.has(n)},OrdinaryDefineOwnMetadata:s,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:a,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:c};return m.registerProvider(n),n;function r(r,i,a){var s=t.get(r),o=!1;if($(s)){if(!a)return;s=new p,t.set(r,s),o=!0}var c=s.get(i);if($(c)){if(!a)return;if(c=new p,s.set(i,c),!e.setProvider(r,i,n))throw s.delete(i),o&&t.delete(r),new Error("Wrong provider for target.")}return c}function i(e,t,n){var i=r(t,n,!1);return!$(i)&&q(i.has(e))}function a(e,t,n){var i=r(t,n,!1);if(!$(i))return i.get(e)}function s(e,t,n,i){r(n,i,!0).set(e,t)}function o(e,t){var n=[],i=r(e,t,!1);if($(i))return n;for(var a=X(i.keys()),s=0;;){var o=ee(a);if(!o)return n.length=s,n;var c=Q(o);try{n[s]=c}catch(e){try{te(a)}finally{throw e}}s++}}function c(e,n,i){var a=r(n,i,!1);if($(a))return!1;if(!a.delete(e))return!1;if(0===a.size){var s=t.get(n);$(s)||(s.delete(i),0===s.size&&t.delete(s))}return!0}}function se(e){var t=e.defineMetadata,n=e.hasOwnMetadata,r=e.getOwnMetadata,i=e.getOwnMetadataKeys,a=e.deleteMetadata,s=new f;return{isProviderFor:function(e,t){var n=s.get(e);return!($(n)||!n.has(t))||!!i(e,t).length&&($(n)&&(n=new d,s.set(e,n)),n.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:n,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:a}}function oe(e,t,n){var r=m.getProvider(e,t);if(!$(r))return r;if(n){if(m.setProvider(e,t,y))return y;throw new Error("Illegal state.")}}function ce(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}(),r=function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,J(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,i)},t.prototype.values=function(){return new n(this._keys,this._values,s)},t.prototype.entries=function(){return new n(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[a]=function(){return this.entries()},t.prototype._find=function(e,t){if(!J(this._cacheKey,e)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++)if(J(this._keys[n],e)){this._cacheIndex=n;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();return r;function i(e,t){return e}function s(e,t){return t}function o(e,t){return[e,t]}}function ue(){return function(){function e(){this._map=new p}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}()}function le(){var e=16,t=u.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=a(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=a(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return a(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=a(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+c()}while(u.has(t,e));return t[e]=!0,e}function a(e,t){if(!n.call(e,r)){if(!t)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function s(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function o(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):s(t,e),t}return s(new Array(e),e)}function c(){var t=o(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function pe(e){return e.__=void 0,delete e.__,e}e("decorate",g),e("metadata",b),e("defineMetadata",v),e("hasMetadata",w),e("hasOwnMetadata",x),e("getMetadata",_),e("getOwnMetadata",T),e("getMetadataKeys",E),e("getOwnMetadataKeys",S),e("deleteMetadata",k)}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(e||(e={}))),Tl;var e}(),function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(_l||(_l={}));var El=function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?n===_l.CLASS_TO_CLASS||n===_l.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||n===_l.CLASS_TO_PLAIN))})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?"none":n?"excludeAll":"exposeAll"},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===_l.CLASS_TO_CLASS||t===_l.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===_l.CLASS_TO_PLAIN))}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===_l.CLASS_TO_CLASS||t===_l.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===_l.CLASS_TO_PLAIN))}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n,r=e.get(t);r&&(n=Array.from(r.values()).filter(function(e){return void 0!==e.propertyName}));for(var i=[],a=0,s=this.getAncestors(t);a<s.length;a++){var o=s[a],c=e.get(o);if(c){var u=Array.from(c.values()).filter(function(e){return void 0!==e.propertyName});i.push.apply(i,u)}}return i.concat(n||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var a=0,s=this.getAncestors(t);a<s.length;a++){var o=s[a],c=e.get(o);if(c){var u=c.get(n);if(u)return u}}},e.prototype.findMetadatas=function(e,t,n){var r,i=e.get(t);i&&(r=i.get(n));for(var a=[],s=0,o=this.getAncestors(t);s<o.length;s++){var c=o[s],u=e.get(c);u&&u.has(n)&&a.push.apply(a,u.get(n))}return a.slice().reverse().concat((r||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);void 0!==n.prototype;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}(),Sl=new El;function kl(e,t){return void 0===t&&(t={}),function(n,r){var i=Reflect.getMetadata("design:type",n,r);Sl.addTypeMetadata({target:n.constructor,propertyName:r,reflectedType:i,typeFunction:e,options:t})}}var Ml,Al,Ol,Rl=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Il=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(Ml||(Ml={}));class Nl{iv;ephemPublicKey;ciphertext;mac;constructor(e,t,n,r){this.iv=e,this.ephemPublicKey=t,this.ciphertext=n,this.mac=r}}Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"iv",void 0),Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"ephemPublicKey",void 0),Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"ciphertext",void 0),Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"mac",void 0);class Cl{v;r;s;constructor(e,t,n){this.v=e,this.r=t,this.s=n}}Rl([Zu(),hl(),Il("design:type",Number)],Cl.prototype,"v",void 0),Rl([Zu(),bl(),Il("design:type",String)],Cl.prototype,"r",void 0),Rl([Zu(),bl(),Il("design:type",String)],Cl.prototype,"s",void 0);class Pl{memoryGrowDelta;call;frame;steps;constructor(e,t,n,r){this.call=e,this.frame=t,this.steps=n,this.memoryGrowDelta=r}}Rl([hl(),Yu(),Il("design:type",Number)],Pl.prototype,"memoryGrowDelta",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Pl.prototype,"call",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Pl.prototype,"frame",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Pl.prototype,"steps",void 0);class jl{call;frame;gas;memory;constructor(e,t,n,r){this.call=e,this.frame=t,this.gas=n,this.memory=r}}Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"call",void 0),Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"frame",void 0),Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"gas",void 0),Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"memory",void 0);class Ll{call;frame;memory;constructor(e,t,n){this.call=e,this.frame=t,this.memory=n}}Rl([hl(),Zu(),Il("design:type",Number)],Ll.prototype,"call",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Ll.prototype,"frame",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Ll.prototype,"memory",void 0);class $l{protocol;constructor(e){this.protocol=e}}Rl([bl(),Zu(),Il("design:type",String)],$l.prototype,"protocol",void 0);class Dl{last;limits;peak;versions;constructor(e,t,n,r){this.last=e,this.limits=t,this.peak=n,this.versions=r}}Rl([Ku(),kl(()=>Pl),Il("design:type",Pl)],Dl.prototype,"last",void 0),Rl([Ku(),kl(()=>jl),Il("design:type",jl)],Dl.prototype,"limits",void 0),Rl([Ku(),kl(()=>Ll),Il("design:type",Ll)],Dl.prototype,"peak",void 0),Rl([Yu(),Ku(),kl(()=>$l),Il("design:type",$l)],Dl.prototype,"versions",void 0);class Ul{senderAddress;status;output;metering;constructor(e,t,n,r){this.senderAddress=e,this.status=t,this.output=n,this.metering=r}}Rl([Zu(),fl(),Il("design:type",String)],Ul.prototype,"senderAddress",void 0),Rl([Zu(),gl(Ml),Il("design:type",String)],Ul.prototype,"status",void 0),Rl([Yu(),bl(),Il("design:type",String)],Ul.prototype,"output",void 0),Rl([Yu(),Ku(),kl(()=>Dl),Il("design:type",Dl)],Ul.prototype,"metering",void 0);class zl{signature;clearTextSolution;constructor(e,t){this.signature=e,this.clearTextSolution=t}}Rl([Ku(),kl(()=>Cl),Il("design:type",Cl)],zl.prototype,"signature",void 0),Rl([Ku(),kl(()=>Ul),Il("design:type",Ul)],zl.prototype,"clearTextSolution",void 0);class Bl{blockNumber;selectionStrategy;setNodes;constructor(e,t,n){this.blockNumber=e,this.selectionStrategy=t,this.setNodes=n}}Rl([Zu(),Xu(0),Il("design:type",Number)],Bl.prototype,"blockNumber",void 0),Rl([Zu(),bl(),Il("design:type",String)],Bl.prototype,"selectionStrategy",void 0),Rl([Hu({name:"arrayNotEmpty",validator:{validate:function(e,t){return n=e,Array.isArray(n)&&n.length>0;var n},defaultMessage:qu(function(e){return e+"$property should not be empty"},Al)}},Al),Zu({each:!0}),fl({each:!0}),Il("design:type",Array)],Bl.prototype,"setNodes",void 0);class Fl{gas;call;frame;memory;constructor(e,t,n,r){this.gas=e,this.call=t,this.frame=n,this.memory=r}}Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"gas",void 0),Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"call",void 0),Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"frame",void 0),Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"memory",void 0);class ql{reward;requiredSolutions;totalSolutions;executionTimeout;constructor(e,t,n,r){this.reward=e,this.requiredSolutions=t,this.totalSolutions=n,this.executionTimeout=r}}Rl([Zu(),bl(),Il("design:type",String)],ql.prototype,"reward",void 0),Rl([Xu(1),Zu(),hl(),Il("design:type",Number)],ql.prototype,"requiredSolutions",void 0),Rl([Xu(1),Zu(),hl(),Il("design:type",Number)],ql.prototype,"totalSolutions",void 0),Rl([Xu(1),Zu(),hl(),Il("design:type",Number)],ql.prototype,"executionTimeout",void 0);class Hl{request;response;constructor(e,t){this.request=e,this.response=t}}Rl([Zu(),hl(),Il("design:type",Number)],Hl.prototype,"request",void 0),Rl([Zu(),hl(),Il("design:type",Number)],Hl.prototype,"response",void 0),function(e){e.MINIO="minio",e.S3="s3"}(Ol||(Ol={}));var Yl,Vl=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Kl=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Gl{msgType;messageId;payload;msgTimestamp=Date.now();constructor(e,t){this.msgType=this.constructor.name,this.messageId=t||S(),this.payload=e}}Vl([Zu(),bl(),Kl("design:type",String)],Gl.prototype,"msgType",void 0),Vl([Yu(),rl(),Kl("design:type",String)],Gl.prototype,"messageId",void 0),Vl([Ku(),Kl("design:type",Object)],Gl.prototype,"payload",void 0),Vl([vl(),Kl("design:type",Number)],Gl.prototype,"msgTimestamp",void 0);Vl([Zu(),bl(),Kl("design:type",String)],class extends Gl{error;constructor(e,t,n){super(t,n),this.error=e}}.prototype,"error",void 0);Vl([Zu(),bl(),Kl("design:type",String)],class extends Gl{error;constructor(e,t,n){super(t,n),this.error=e}}.prototype,"error",void 0),function(e){e.EVM="evm",e.AVALANCHE="avalanche"}(Yl||(Yl={}));var Wl,Jl=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Zl=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.NODE_OUTCOME="node_outcome",e.TASK_SOLVED="task_solved",e.API_OUTCOME="api_outcome",e.SOLUTIONS_REVEALED="solutions_revealed",e.EXECUTION_COMPLETED="execution_completed"}(Wl||(Wl={}));class Xl{type;executionId;message;msgHash;signature;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){this.type=e,this.executionId=t,this.message=r,this.msgHash=n,this.signature=i,this.timestamp=s,this.sequencerAddress=a}}Jl([Zu(),gl(Wl),Zl("design:type",String)],Xl.prototype,"type",void 0),Jl([rl(),Zu(),Zl("design:type",String)],Xl.prototype,"executionId",void 0),Jl([Ku(),Zl("design:type",Object)],Xl.prototype,"message",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],Xl.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],Xl.prototype,"signature",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Xl.prototype,"sequencerAddress",void 0),Jl([vl(),Zu(),Zl("design:type",Number)],Xl.prototype,"timestamp",void 0);class Ql{type="dispatch_task";taskId;executionId;msgHash;signature;limits;econParams;workers;dispatcherTimestamp;taskRequesterTimestamp;ledgerName;blockHash;blockNumber;chainId;nodeRegistryContractAddress;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;signedRequestBody;senderAddress;input;constructor(e,t,n,r,i,a,s,o,c,u,l,p,d,f,h,m,y,g,b,v,w,x){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=r,this.limits=i,this.econParams=a,this.workers=s,this.dispatcherTimestamp=o,this.taskRequesterTimestamp=c,this.ledgerName=u,this.blockHash=l,this.blockNumber=p,this.chainId=d,this.nodeRegistryContractAddress=f,this.taskRegistryContractAddress=h,this.taskAuthorizationContractAddress=m,this.taskRequesterAddress=y,this.taskPath=g,this.taskVersion=b,this.signedRequestBody=x,this.senderAddress=v,this.input=w}}Jl([Zu(),bl(),Zl("design:type",String)],Ql.prototype,"taskId",void 0),Jl([Zu(),rl(),Zl("design:type",String)],Ql.prototype,"executionId",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],Ql.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],Ql.prototype,"signature",void 0),Jl([Ku(),kl(()=>Fl),Zl("design:type",Fl)],Ql.prototype,"limits",void 0),Jl([Ku(),kl(()=>ql),Zl("design:type",ql)],Ql.prototype,"econParams",void 0),Jl([Ku(),kl(()=>Bl),Zl("design:type",Bl)],Ql.prototype,"workers",void 0),Jl([Zu(),wl(),Zl("design:type",Number)],Ql.prototype,"dispatcherTimestamp",void 0),Jl([Zu(),wl(),Zl("design:type",Number)],Ql.prototype,"taskRequesterTimestamp",void 0),Jl([Zu(),gl(Yl),Zl("design:type",String)],Ql.prototype,"ledgerName",void 0),Jl([Zu(),Zl("design:type",String)],Ql.prototype,"blockHash",void 0),Jl([Zu(),Xu(0),Zl("design:type",Number)],Ql.prototype,"blockNumber",void 0),Jl([Zu(),bl(),Zl("design:type",String)],Ql.prototype,"chainId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"nodeRegistryContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"taskRegistryContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"taskAuthorizationContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"taskRequesterAddress",void 0),Jl([Yu(),Zl("design:type",String)],Ql.prototype,"taskPath",void 0),Jl([Yu(),Xu(0),Zl("design:type",Number)],Ql.prototype,"taskVersion",void 0),Jl([Yu(),Zl("design:type",Object)],Ql.prototype,"signedRequestBody",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"senderAddress",void 0),Jl([Yu(),zu(),Zl("design:type",String)],Ql.prototype,"input",void 0);class ep{type="dispatch_task";taskId;executionId;msgHash;signature;ledgerName;blockHash;blockNumber;chainId;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;senderAddress;executionTimeout;input;constructor(e,t,n,r,i,a,s,o,c,u,l,p,d,f,h,m){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=r,this.executionTimeout=h,this.ledgerName=a,this.blockHash=s,this.blockNumber=o,this.chainId=c,this.taskRegistryContractAddress=u,this.taskAuthorizationContractAddress=l,this.taskRequesterAddress=p,this.taskPath=d,this.taskVersion=f,this.senderAddress=i,this.input=m}}Jl([Zu(),bl(),Zl("design:type",String)],ep.prototype,"taskId",void 0),Jl([Zu(),rl(),Zl("design:type",String)],ep.prototype,"executionId",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],ep.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],ep.prototype,"signature",void 0),Jl([Zu(),gl(Yl),Zl("design:type",String)],ep.prototype,"ledgerName",void 0),Jl([Zu(),Zl("design:type",String)],ep.prototype,"blockHash",void 0),Jl([Zu(),Xu(0),Zl("design:type",Number)],ep.prototype,"blockNumber",void 0),Jl([Zu(),bl(),Zl("design:type",String)],ep.prototype,"chainId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"taskRegistryContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"taskAuthorizationContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"taskRequesterAddress",void 0),Jl([Yu(),Zl("design:type",String)],ep.prototype,"taskPath",void 0),Jl([Yu(),Xu(0),Zl("design:type",Number)],ep.prototype,"taskVersion",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"senderAddress",void 0),Jl([hl(),Zl("design:type",Number)],ep.prototype,"executionTimeout",void 0),Jl([Yu(),zu(),Zl("design:type",String)],ep.prototype,"input",void 0);class tp{executionId;senderAddress;encryptedSolution;msgHash;signature;constructor(e,t,n,r,i){this.executionId=e,this.signature=i,this.encryptedSolution=n,this.senderAddress=t,this.msgHash=r}}Jl([rl(),Zu(),Zl("design:type",String)],tp.prototype,"executionId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],tp.prototype,"senderAddress",void 0),Jl([Ku(),kl(()=>Nl),Zl("design:type",Nl)],tp.prototype,"encryptedSolution",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],tp.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],tp.prototype,"signature",void 0);class np{executionId;senderAddress;bodyResponse;msgHash;signature;tlsHandshakeHash;status;totalTransferredBytes;constructor(e,t,n,r,i,a,s,o){this.executionId=e,this.signature=i,this.bodyResponse=n,this.tlsHandshakeHash=a,this.senderAddress=t,this.msgHash=r,this.status=s,this.totalTransferredBytes=o}}Jl([rl(),Zu(),Zl("design:type",String)],np.prototype,"executionId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],np.prototype,"senderAddress",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],np.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],np.prototype,"signature",void 0),Jl([Zu(),bl(),Zl("design:type",String)],np.prototype,"tlsHandshakeHash",void 0),Jl([Zu(),bl(),Zl("design:type",String)],np.prototype,"status",void 0),Jl([Ku(),kl(()=>Hl),Zl("design:type",Hl)],np.prototype,"totalTransferredBytes",void 0);var rp=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},ip=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ap{executionId;msgHash;signature;limits;econParams;workers;senderAddress;input;constructor(e,t,n,r,i,a,s,o){this.executionId=e,this.msgHash=t,this.signature=n,this.limits=r,this.econParams=i,this.workers=a,this.senderAddress=s,this.input=o}}rp([rl(),Zu(),ip("design:type",String)],ap.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],ap.prototype,"msgHash",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],ap.prototype,"signature",void 0),rp([Ku(),kl(()=>Fl),ip("design:type",Fl)],ap.prototype,"limits",void 0),rp([Ku(),kl(()=>ql),ip("design:type",ql)],ap.prototype,"econParams",void 0),rp([Ku(),kl(()=>Bl),ip("design:type",Bl)],ap.prototype,"workers",void 0),rp([Zu(),bl(),ip("design:type",String)],ap.prototype,"senderAddress",void 0),rp([Zu(),bl(),ip("design:type",String)],ap.prototype,"input",void 0);class sp{executionId;limits;econParams;workers;input;constructor(e,t,n,r,i){this.executionId=e,this.limits=t,this.econParams=n,this.workers=r,this.input=i}}rp([rl(),Zu(),ip("design:type",String)],sp.prototype,"executionId",void 0),rp([Ku(),kl(()=>Fl),ip("design:type",Fl)],sp.prototype,"limits",void 0),rp([Ku(),kl(()=>ql),ip("design:type",ql)],sp.prototype,"econParams",void 0),rp([Ku(),kl(()=>Bl),ip("design:type",Bl)],sp.prototype,"workers",void 0);rp([Ku(),kl(()=>tp),ip("design:type",tp)],class extends Xl{message;constructor(e,t,n,r,i,a){super(Wl.NODE_OUTCOME,e,t,n,r,i,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=a,this.sequencerAddress=i,this.message=n}}.prototype,"message",void 0);rp([Ku(),kl(()=>np),ip("design:type",np)],class extends Xl{message;constructor(e,t,n,r,i,a){super(Wl.API_OUTCOME,e,t,n,r,i,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=a,this.sequencerAddress=i}}.prototype,"message",void 0);class op{type;executionId;transcriptHash;status;signature;signerAddress;timestamp;constructor(e,t,n,r,i,a){this.type=Wl.EXECUTION_COMPLETED,this.executionId=e,this.transcriptHash=t,this.status=n,this.signature=r,this.signerAddress=i,this.timestamp=a}}rp([Zu(),bl(),ip("design:type",String)],op.prototype,"type",void 0),rp([rl(),Zu(),ip("design:type",String)],op.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],op.prototype,"transcriptHash",void 0),rp([Zu(),gl(ku),ip("design:type",String)],op.prototype,"status",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],op.prototype,"signature",void 0),rp([Zu(),bl(),ip("design:type",String)],op.prototype,"signerAddress",void 0),rp([vl(),Zu(),ip("design:type",Number)],op.prototype,"timestamp",void 0);class cp{type;executionId;signature;clearTextSolutions;sequencerAddress;msgHash;timestamp;constructor(e,t,n,r,i,a){this.type=Wl.SOLUTIONS_REVEALED,this.executionId=e,this.signature=t,this.clearTextSolutions=n,this.sequencerAddress=r,this.msgHash=i,this.timestamp=a}}rp([rl(),Zu(),ip("design:type",String)],cp.prototype,"executionId",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],cp.prototype,"signature",void 0),rp([Ku({each:!0}),kl(()=>zl),ip("design:type",Array)],cp.prototype,"clearTextSolutions",void 0),rp([Zu(),fl(),ip("design:type",String)],cp.prototype,"sequencerAddress",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],cp.prototype,"msgHash",void 0),rp([vl(),Zu(),ip("design:type",Number)],cp.prototype,"timestamp",void 0);class up extends Xl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){super(Wl.TASK_CREATED,e,t,n,r,a,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=s,this.sequencerAddress=a,this.publicKey=i,this.message=n}}rp([Zu(),rl(),ip("design:type",String)],up.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],up.prototype,"msgHash",void 0),rp([Ku(),kl(()=>Ql),ip("design:type",Ql)],up.prototype,"message",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],up.prototype,"signature",void 0),rp([Zu(),bl(),ip("design:type",String)],up.prototype,"publicKey",void 0),rp([Zu(),fl(),ip("design:type",String)],up.prototype,"sequencerAddress",void 0),rp([vl(),Zu(),ip("design:type",Number)],up.prototype,"timestamp",void 0);class lp extends Xl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){super(Wl.API_TASK_CREATED,e,t,n,r,a,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=s,this.sequencerAddress=a,this.publicKey=i,this.message=n}}rp([Zu(),rl(),ip("design:type",String)],lp.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],lp.prototype,"msgHash",void 0),rp([Ku(),kl(()=>ep),ip("design:type",ep)],lp.prototype,"message",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],lp.prototype,"signature",void 0),rp([Zu(),bl(),ip("design:type",String)],lp.prototype,"publicKey",void 0),rp([Zu(),fl(),ip("design:type",String)],lp.prototype,"sequencerAddress",void 0),rp([vl(),Zu(),ip("design:type",Number)],lp.prototype,"timestamp",void 0);var pp=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},dp=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class fp{executionId;msgHash;signature;senderAddress;encryptedSolution;constructor(e,t,n,r,i){this.executionId=e,this.msgHash=t,this.signature=n,this.senderAddress=r,this.encryptedSolution=i}}pp([rl(),Zu(),dp("design:type",String)],fp.prototype,"executionId",void 0),pp([Zu(),cl("sha256"),dp("design:type",String)],fp.prototype,"msgHash",void 0),pp([Ku(),kl(()=>Cl),dp("design:type",Cl)],fp.prototype,"signature",void 0),pp([Zu(),fl(),dp("design:type",String)],fp.prototype,"senderAddress",void 0),pp([Ku(),kl(()=>Nl),dp("design:type",Nl)],fp.prototype,"encryptedSolution",void 0);var hp=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},mp=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class yp{input;checkpoint;taskId;constructor(e,t,n){this.taskId=e,this.checkpoint=t,this.input=n}}hp([Zu(),bl(),mp("design:type",String)],yp.prototype,"input",void 0),hp([Zu(),mp("design:type",Object)],yp.prototype,"checkpoint",void 0),hp([Zu(),bl(),mp("design:type",String)],yp.prototype,"taskId",void 0);class gp{input;taskId;constructor(e,t){this.taskId=e,this.input=t}}hp([Zu(),bl(),mp("design:type",String)],gp.prototype,"input",void 0),hp([Zu(),bl(),mp("design:type",String)],gp.prototype,"taskId",void 0);class bp{executionId;input;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.input=n}}hp([Zu(),rl(),mp("design:type",String)],bp.prototype,"executionId",void 0),hp([Zu(),bl(),mp("design:type",String)],bp.prototype,"input",void 0),hp([Zu(),bl(),mp("design:type",String)],bp.prototype,"taskId",void 0);class vp{instrumentationId;taskId;constructor(e,t){this.taskId=e,this.instrumentationId=t}}hp([Zu(),rl(),mp("design:type",String)],vp.prototype,"instrumentationId",void 0),hp([Zu(),bl(),mp("design:type",String)],vp.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class wp{checkpointHash;taskId;constructor(e,t){this.taskId=e,this.checkpointHash=t}}hp([Zu(),bl(),mp("design:type",String)],wp.prototype,"checkpointHash",void 0),hp([Zu(),bl(),mp("design:type",String)],wp.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class xp{checkpointCount;taskId;constructor(e,t){this.taskId=e,this.checkpointCount=t}}hp([Zu(),hl(),mp("design:type",Number)],xp.prototype,"checkpointCount",void 0),hp([Zu(),bl(),mp("design:type",String)],xp.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e,t){this.taskId=t}}.prototype,"taskId",void 0);class _p{executionId;output;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.output=n}}hp([Zu(),rl(),mp("design:type",String)],_p.prototype,"executionId",void 0),hp([Yu(),bl(),mp("design:type",String)],_p.prototype,"output",void 0),hp([Zu(),bl(),mp("design:type",String)],_p.prototype,"taskId",void 0);class Tp{executionId;taskId;constructor(e,t,n){this.taskId=t,this.executionId=n}}hp([Zu(),rl(),mp("design:type",String)],Tp.prototype,"executionId",void 0),hp([Zu(),bl(),mp("design:type",String)],Tp.prototype,"taskId",void 0);class Ep{instrumentationId;output;taskId;instrumentedTaskId;constructor(e,t,n,r){this.taskId=e,this.instrumentationId=t,this.output=r,this.instrumentedTaskId=n}}hp([Zu(),rl(),mp("design:type",String)],Ep.prototype,"instrumentationId",void 0),hp([Zu(),bl(),mp("design:type",String)],Ep.prototype,"output",void 0),hp([Zu(),bl(),mp("design:type",String)],Ep.prototype,"taskId",void 0),hp([Zu(),bl(),mp("design:type",String)],Ep.prototype,"instrumentedTaskId",void 0);class Sp{instrumentationId;taskId;constructor(e,t,n){this.taskId=t,this.instrumentationId=n}}hp([Zu(),rl(),mp("design:type",String)],Sp.prototype,"instrumentationId",void 0),hp([Zu(),bl(),mp("design:type",String)],Sp.prototype,"taskId",void 0);var kp,Mp,Ap,Op={},Rp="6.6.1",Ip={},Np={exports:{}},Cp=Np.exports;function Pp(){return kp||(kp=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function o(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.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<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var p=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)p*=t;this.imuln(p),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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],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];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,p=67108863&c,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var h=u-f|0;l+=(s=(i=0|e.words[h])*(a=0|t.words[f])+p)/67108864|0,p=67108863&s}n.words[u]=0|p,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],c=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?u[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:u[d-m.length]+m+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")},i.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},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,c="le"===t,u=new e(a),l=this.clone();if(c){for(o=0;!l.isZero();o++)s=l.andln(255),l.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-i;o++)u[o]=0;for(o=0;!l.isZero();o++)s=l.andln(255),l.iushrn(8),u[a-o-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.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 n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,a,s=e.words,o=t.words,c=n.words,u=0,l=0|s[0],p=8191&l,d=l>>>13,f=0|s[1],h=8191&f,m=f>>>13,y=0|s[2],g=8191&y,b=y>>>13,v=0|s[3],w=8191&v,x=v>>>13,_=0|s[4],T=8191&_,E=_>>>13,S=0|s[5],k=8191&S,M=S>>>13,A=0|s[6],O=8191&A,R=A>>>13,I=0|s[7],N=8191&I,C=I>>>13,P=0|s[8],j=8191&P,L=P>>>13,$=0|s[9],D=8191&$,U=$>>>13,z=0|o[0],B=8191&z,F=z>>>13,q=0|o[1],H=8191&q,Y=q>>>13,V=0|o[2],K=8191&V,G=V>>>13,W=0|o[3],J=8191&W,Z=W>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],pe=8191&le,de=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ye=(u+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;u=((a=Math.imul(d,F))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(h,B),i=(i=Math.imul(h,F))+Math.imul(m,B)|0,a=Math.imul(m,F);var ge=(u+(r=r+Math.imul(p,H)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,B),i=(i=Math.imul(g,F))+Math.imul(b,B)|0,a=Math.imul(b,F),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(p,K)|0)|0)+((8191&(i=(i=i+Math.imul(p,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,B),i=(i=Math.imul(w,F))+Math.imul(x,B)|0,a=Math.imul(x,F),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,H)|0,a=a+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,G)|0;var ve=(u+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,Z)|0)+Math.imul(d,J)|0))<<13)|0;u=((a=a+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(E,B)|0,a=Math.imul(E,F),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,H)|0,a=a+Math.imul(x,Y)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,G)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(M,B)|0,a=Math.imul(M,F),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(O,B),i=(i=Math.imul(O,F))+Math.imul(R,B)|0,a=Math.imul(R,F),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(p,ae)|0)|0)+((8191&(i=(i=i+Math.imul(p,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,F))+Math.imul(C,B)|0,a=Math.imul(C,F),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,Y)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(b,ne)|0,a=a+Math.imul(b,re)|0,r=r+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,se)|0;var Te=(u+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,B),i=(i=Math.imul(j,F))+Math.imul(L,B)|0,a=Math.imul(L,F),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,Y)|0,r=r+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,Z)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,a=a+Math.imul(x,re)|0,r=r+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,B),i=(i=Math.imul(D,F))+Math.imul(U,B)|0,a=Math.imul(U,F),r=r+Math.imul(j,H)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,G)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,r=r+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,r=r+Math.imul(h,pe)|0,i=(i=i+Math.imul(h,de)|0)+Math.imul(m,pe)|0,a=a+Math.imul(m,de)|0;var Se=(u+(r=r+Math.imul(p,he)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,he)|0))<<13)|0;u=((a=a+Math.imul(d,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,Y))+Math.imul(U,H)|0,a=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(L,K)|0,a=a+Math.imul(L,G)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,Z)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,r=r+Math.imul(g,pe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,pe)|0,a=a+Math.imul(b,de)|0;var ke=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(D,K),i=(i=Math.imul(D,G))+Math.imul(U,K)|0,a=Math.imul(U,G),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(R,ne)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,ue)|0,r=r+Math.imul(w,pe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(x,pe)|0,a=a+Math.imul(x,de)|0;var Me=(u+(r=r+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(D,J),i=(i=Math.imul(D,Z))+Math.imul(U,J)|0,a=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(C,ne)|0,a=a+Math.imul(C,re)|0,r=r+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,ue)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(E,pe)|0,a=a+Math.imul(E,de)|0;var Ae=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((a=a+Math.imul(x,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(U,Q)|0,a=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,a=a+Math.imul(L,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,se)|0,r=r+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(M,pe)|0,a=a+Math.imul(M,de)|0;var Oe=(u+(r=r+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(E,he)|0))<<13)|0;u=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(D,ne),i=(i=Math.imul(D,re))+Math.imul(U,ne)|0,a=Math.imul(U,re),r=r+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,se)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,r=r+Math.imul(O,pe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(R,pe)|0,a=a+Math.imul(R,de)|0;var Re=(u+(r=r+Math.imul(k,he)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(M,he)|0))<<13)|0;u=((a=a+Math.imul(M,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(D,ae),i=(i=Math.imul(D,se))+Math.imul(U,ae)|0,a=Math.imul(U,se),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,ue)|0,r=r+Math.imul(N,pe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,pe)|0,a=a+Math.imul(C,de)|0;var Ie=(u+(r=r+Math.imul(O,he)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,he)|0))<<13)|0;u=((a=a+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(D,ce),i=(i=Math.imul(D,ue))+Math.imul(U,ce)|0,a=Math.imul(U,ue),r=r+Math.imul(j,pe)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(L,pe)|0,a=a+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,he)|0))<<13)|0;u=((a=a+Math.imul(C,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(D,pe),i=(i=Math.imul(D,de))+Math.imul(U,pe)|0,a=Math.imul(U,de);var Ce=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((a=a+Math.imul(L,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Pe=(u+(r=Math.imul(D,he))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(U,he)|0))<<13)|0;return u=((a=Math.imul(U,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,c[0]=ye,c[1]=ge,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Te,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ae,c[13]=Oe,c[14]=Re,c[15]=Ie,c[16]=Ne,c[17]=Ce,c[18]=Pe,0!==u&&(c[19]=u,n.length++),n};function h(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var l=a-u,p=(0|e.words[l])*(0|t.words[u]),d=67108863&p;o=67108863&(d=d+o|0),i+=(s=(s=s+(p/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):h(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,c=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var p=c,d=u,f=0;f<s;f++){var h=n[l+f],m=r[l+f],y=n[l+f+s],g=r[l+f+s],b=p*y-d*g;g=p*g+d*y,y=b,n[l+f]=h+y,r[l+f]=m+g,n[l+f+s]=h-y,r[l+f+s]=m-g,f!==o&&(b=c*p-u*d,d=c*d+u*p,p=b)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(!(-8192&a))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,a,o,c,r,i),this.transform(u,a,l,p,r,i);for(var f=0;f<r;f++){var h=o[f]*l[f]-c[f]*p[f];c[f]=o[f]*p[f]+c[f]*l[f],o[f]=h}return this.conjugate(o,c,r),this.transform(o,c,d,a,r,i),this.conjugate(d,a,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),h(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<r;this.words[t]=c|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(a,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[a.length+p])+(0|r.words[a.length+p-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(a,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(a,1,p),r.isZero()||(r.negative^=1);o&&(o.words[p]=d)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.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},i.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()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.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 a=new i(1),s=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(p)),a.iushrn(1),s.iushrn(1);for(var h=0,m=1;0===(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(p)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o),s.isub(c)):(r.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:r.iushln(u)}},i.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 a,s=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var p=0,d=1;0===(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.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)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._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 T(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(b,g),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|a>>>22,a=s}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(v,g),r(w,g),r(x,g),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[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 n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.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 i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,a),d=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),h=s;0!==f.cmp(o);){for(var m=f,y=0;0!==m.cmp(o);y++)m=m.redSqr();n(y<h);var g=this.pow(p,new i(1).iushln(h-y-1));d=d.redMul(g),p=g.redSqr(),f=f.redMul(p),h=y}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var a=n[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var p=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==p||0!==s?(s<<=1,s|=p,(4===++o||0===r&&0===l)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},_.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},i.mont=function(e){return new T(e)},r(T,_),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Np,Cp)),Np.exports}function jp(){if(Ap)return Mp;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return Ap=1,Mp=e,e.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},Mp}var Lp,$p,Dp={};function Up(){return Lp||(Lp=1,function(){var e=Dp;function t(e){return 1===e.length?"0"+e:e}function n(e){for(var n="",r=0;r<e.length;r++)n+=t(e[r].toString(16));return n}e.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}return n},e.zero2=t,e.toHex=n,e.encode=function(e,t){return"hex"===t?n(e):e}}()),Dp}function zp(){return $p||($p=1,function(){var e=Ip,t=Pp(),n=jp(),r=Up();e.assert=n,e.toArray=r.toArray,e.zero2=r.zero2,e.toHex=r.toHex,e.encode=r.encode,e.getNAF=function(e,t,n){var r,i=new Array(Math.max(e.bitLength(),n)+1);for(r=0;r<i.length;r+=1)i[r]=0;var a=1<<t+1,s=e.clone();for(r=0;r<i.length;r++){var o,c=s.andln(a-1);s.isOdd()?(o=c>(a>>1)-1?(a>>1)-c:c,s.isubn(o)):o=0,i[r]=o,s.iushrn(1)}return i},e.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,a=0;e.cmpn(-i)>0||t.cmpn(-a)>0;){var s,o,c=e.andln(3)+i&3,u=t.andln(3)+a&3;3===c&&(c=-1),3===u&&(u=-1),s=1&c?3!==(r=e.andln(7)+i&7)&&5!==r||2!==u?c:-c:0,n[0].push(s),o=1&u?3!==(r=t.andln(7)+a&7)&&5!==r||2!==c?u:-u:0,n[1].push(o),2*i===s+1&&(i=1-i),2*a===o+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return n},e.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}}()),Ip}var Bp,Fp={exports:{}};function qp(){if(Bp)return Fp.exports;var e;function t(e){this.rand=e}if(Bp=1,Fp.exports=function(n){return e||(e=new t(null)),e.generate(n)},Fp.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=require("crypto");if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return Fp.exports}var Hp,Yp,Vp,Kp,Gp,Wp,Jp,Zp,Xp,Qp={};function ed(){if(Yp)return Hp;Yp=1;var e=Pp(),t=zp(),n=t.getNAF,r=t.getJSF,i=t.assert;function a(t,n){this.type=t,this.p=new e(n.p,16),this.red=n.prime?e.red(n.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=n.n&&new e(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.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 s(e,t){this.curve=e,this.type=t,this.precomputed=null}return Hp=a,a.prototype.point=function(){throw new Error("Not implemented")},a.prototype.validate=function(){throw new Error("Not implemented")},a.prototype._fixedNafMul=function(e,t){i(e.precomputed);var r=e._getDoubles(),a=n(t,1,this._bitLength),s=(1<<r.step+1)-(r.step%2==0?2:1);s/=3;var o,c,u=[];for(o=0;o<a.length;o+=r.step){c=0;for(var l=o+r.step-1;l>=o;l--)c=(c<<1)+a[l];u.push(c)}for(var p=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=s;f>0;f--){for(o=0;o<u.length;o++)(c=u[o])===f?d=d.mixedAdd(r.points[o]):c===-f&&(d=d.mixedAdd(r.points[o].neg()));p=p.add(d)}return p.toP()},a.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var s=a.points,o=n(t,r,this._bitLength),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(var l=0;u>=0&&0===o[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var p=o[u];i(0!==p),c="affine"===e.type?p>0?c.mixedAdd(s[p-1>>1]):c.mixedAdd(s[-p-1>>1].neg()):p>0?c.add(s[p-1>>1]):c.add(s[-p-1>>1].neg())}return"affine"===e.type?c.toP():c},a.prototype._wnafMulAdd=function(e,t,i,a,s){var o,c,u,l=this._wnafT1,p=this._wnafT2,d=this._wnafT3,f=0;for(o=0;o<a;o++){var h=(u=t[o])._getNAFPoints(e);l[o]=h.wnd,p[o]=h.points}for(o=a-1;o>=1;o-=2){var m=o-1,y=o;if(1===l[m]&&1===l[y]){var g=[t[m],null,null,t[y]];0===t[m].y.cmp(t[y].y)?(g[1]=t[m].add(t[y]),g[2]=t[m].toJ().mixedAdd(t[y].neg())):0===t[m].y.cmp(t[y].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[y]),g[2]=t[m].add(t[y].neg())):(g[1]=t[m].toJ().mixedAdd(t[y]),g[2]=t[m].toJ().mixedAdd(t[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=r(i[m],i[y]);for(f=Math.max(v[0].length,f),d[m]=new Array(f),d[y]=new Array(f),c=0;c<f;c++){var w=0|v[0][c],x=0|v[1][c];d[m][c]=b[3*(w+1)+(x+1)],d[y][c]=0,p[m]=g}}else d[m]=n(i[m],l[m],this._bitLength),d[y]=n(i[y],l[y],this._bitLength),f=Math.max(d[m].length,f),f=Math.max(d[y].length,f)}var _=this.jpoint(null,null,null),T=this._wnafT4;for(o=f;o>=0;o--){for(var E=0;o>=0;){var S=!0;for(c=0;c<a;c++)T[c]=0|d[c][o],0!==T[c]&&(S=!1);if(!S)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(c=0;c<a;c++){var k=T[c];0!==k&&(k>0?u=p[c][k-1>>1]:k<0&&(u=p[c][-k-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<a;o++)p[o]=null;return s?_:_.toP()},a.BasePoint=s,s.prototype.eq=function(){throw new Error("Not implemented")},s.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(e,n){e=t.toArray(e,n);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?i(e[e.length-1]%2==0):7===e[0]&&i(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},s.prototype.encodeCompressed=function(e){return this.encode(e,!0)},s.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},s.prototype.encode=function(e,n){return t.encode(this._encode(n),e)},s.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},s.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},s.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)r=r.dbl();n.push(r)}return{step:e,points:n}},s.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},s.prototype._getBeta=function(){return null},s.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t},Hp}function td(){return Xp||(Xp=1,function(e){var t=e;t.base=ed(),t.short=function(){if(Kp)return Vp;Kp=1;var e=zp(),t=Pp(),n=ur(),r=ed(),i=e.assert;function a(e){r.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(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 s(e,n,i,a){r.BasePoint.call(this,e,"affine"),null===n&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(n,16),this.y=new t(i,16),a&&(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 o(e,n,i,a){r.BasePoint.call(this,e,"jacobian"),null===n&&null===i&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(n,16),this.y=new t(i,16),this.z=new t(a,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}return n(a,r),Vp=a,a.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r;if(e.beta)n=new t(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);n=(n=a[0].cmp(a[1])<0?a[0]:a[1]).toRed(this.red)}if(e.lambda)r=new t(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(n))?r=s[0]:(r=s[1],i(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return{beta:n,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new t(e.a,16),b:new t(e.b,16)}}):this._getEndoBasis(r)}}},a.prototype._getEndoRoots=function(e){var n=e===this.p?this.red:t.mont(e),r=new t(2).toRed(n).redInvm(),i=r.redNeg(),a=new t(3).toRed(n).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},a.prototype._getEndoBasis=function(e){for(var n,r,i,a,s,o,c,u,l,p=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),h=new t(1),m=new t(0),y=new t(0),g=new t(1),b=0;0!==d.cmpn(0);){var v=f.div(d);u=f.sub(v.mul(d)),l=y.sub(v.mul(h));var w=g.sub(v.mul(m));if(!i&&u.cmp(p)<0)n=c.neg(),r=h,i=u.neg(),a=l;else if(i&&2===++b)break;c=u,f=d,d=u,y=h,h=l,g=m,m=w}s=u.neg(),o=l;var x=i.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(x)>=0&&(s=n,o=r),i.negative&&(i=i.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:i,b:a},{a:s,b:o}]},a.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),o=a.mul(r.a),c=i.mul(n.b),u=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:c.add(u).neg()}},a.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(n&&!a||!n&&a)&&(i=i.redNeg()),this.point(e,i)},a.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},a.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(t[a]),o=e[a],c=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),r[2*a]=o,r[2*a+1]=c,i[2*a]=s.k1,i[2*a+1]=s.k2}for(var u=this._wnafMulAdd(1,r,i,2*a,n),l=0;l<2*a;l++)r[l]=null,i[l]=null;return u},n(s,r.BasePoint),a.prototype.point=function(e,t,n){return new s(this,e,t,n)},a.prototype.pointFromJSON=function(e,t){return s.fromJSON(this,e,t)},s.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},s.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},s.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(i))}},r},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return this.inf},s.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 n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},s.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,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},s.prototype.getX=function(){return this.x.fromRed()},s.prototype.getY=function(){return this.y.fromRed()},s.prototype.mul=function(e){return e=new t(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)},s.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},s.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},s.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))},s.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},s.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(o,r.BasePoint),a.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),o=r.redSub(i),c=a.redSub(s);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),l=u.redMul(o),p=r.redMul(u),d=c.redSqr().redIAdd(l).redISub(p).redISub(p),f=c.redMul(p.redISub(d)).redISub(a.redMul(l)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(d,f,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),s=n.redSub(r),o=i.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),p=o.redSqr().redIAdd(u).redISub(l).redISub(l),d=o.redMul(l.redISub(p)).redISub(i.redMul(u)),f=this.z.redMul(s);return this.curve.jpoint(p,d,f)},o.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 n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,o=this.z,c=o.redSqr().redSqr(),u=s.redAdd(s);for(t=0;t<e;t++){var l=a.redSqr(),p=u.redSqr(),d=p.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),h=a.redMul(p),m=f.redSqr().redISub(h.redAdd(h)),y=h.redISub(m),g=f.redMul(y);g=g.redIAdd(g).redISub(d);var b=u.redMul(o);t+1<e&&(c=c.redMul(d)),a=m,o=b,u=g}return this.curve.jpoint(a,u.redMul(i),o)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r),c=o.redSqr().redISub(s).redISub(s),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=o.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),f=this.x.redAdd(p).redSqr().redISub(l).redISub(d);f=f.redIAdd(f);var h=l.redAdd(l).redIAdd(l),m=h.redSqr(),y=d.redIAdd(d);y=(y=y.redIAdd(y)).redIAdd(y),e=m.redISub(f).redISub(f),t=h.redMul(f.redISub(e)).redISub(y),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},o.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=o.redSqr().redISub(s).redISub(s);e=c;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),p=this.y.redSqr(),d=this.x.redMul(p),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var h=d.redIAdd(d),m=(h=h.redIAdd(h)).redAdd(h);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(p).redISub(l);var y=p.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=f.redMul(h.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,n)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=t.redSqr(),s=n.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(s),l=o.redSqr().redISub(u.redAdd(u)),p=u.redISub(l),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=o.redMul(p).redISub(d),h=n.redAdd(n).redMul(r);return this.curve.jpoint(l,f,h)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var p=this.x.redMul(o).redISub(l);p=(p=p.redIAdd(p)).redIAdd(p);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(o)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(o);return this.curve.jpoint(p,d,f)},o.prototype.mul=function(e,n){return e=new t(e,n),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},o.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Vp}(),t.mont=function(){if(Wp)return Gp;Wp=1;var e=Pp(),t=ur(),n=ed(),r=zp();function i(t){n.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(t,r,i){n.BasePoint.call(this,t,"projective"),null===r&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(r,16),this.z=new e(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(i,n),Gp=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},t(a,n.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(r.toArray(e,t),1)},i.prototype.point=function(e,t){return new a(this,e,t)},i.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(e,t){return new a(e,t[0],t[1]||e.one)},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},a.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(n),s=i.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),c=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,c)},a.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Gp}(),t.edwards=function(){if(Zp)return Jp;Zp=1;var e=zp(),t=Pp(),n=ur(),r=ed(),i=e.assert;function a(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function s(e,n,i,a,s){r.BasePoint.call(this,e,"projective"),null===n&&null===i&&null===a?(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 t(n,16),this.y=new t(i,16),this.z=a?new t(a,16):this.curve.one,this.t=s&&new t(s,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()))))}return n(a,r),Jp=a,a.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},a.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},a.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},a.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=i.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=o.fromRed().isOdd();return(n&&!c||!n&&c)&&(o=o.redNeg()),this.point(e,o)},a.prototype.pointFromY=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,e)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==n&&(o=o.redNeg()),this.point(o,e)},a.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},n(s,r.BasePoint),a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},a.prototype.point=function(e,t,n,r){return new s(this,e,t,n,r)},s.fromJSON=function(e,t){return new s(e,t[0],t[1],t[2])},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},s.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(n),o=r.redSub(t),c=i.redMul(s),u=a.redMul(o),l=i.redMul(o),p=s.redMul(a);return this.curve.point(c,u,p,l)},s.prototype._projDbl=function(){var e,t,n,r,i,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(o)).redAdd(c);this.zOne?(e=s.redSub(o).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(c)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),a=u.redSub(i).redISub(i),e=s.redSub(o).redISub(c).redMul(a),t=u.redMul(r.redSub(c)),n=u.redMul(a))}else r=o.redAdd(c),i=this.curve._mulC(this.z).redSqr(),a=r.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(r)).redMul(a),t=this.curve._mulC(r).redMul(o.redISub(c)),n=r.redMul(a);return this.curve.point(e,t,n)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},s.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(t),s=i.redSub(r),o=i.redAdd(r),c=n.redAdd(t),u=a.redMul(s),l=o.redMul(c),p=a.redMul(c),d=s.redMul(o);return this.curve.point(u,l,d,p)},s.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),c=i.redSub(o),u=i.redAdd(o),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),p=r.redMul(c).redMul(l);return this.curve.twisted?(t=r.redMul(u).redMul(s.redSub(this.curve._mulA(a))),n=c.redMul(u)):(t=r.redMul(u).redMul(s.redSub(a)),n=this.curve._mulC(c).redMul(u)),this.curve.point(p,t,n)},s.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},s.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},s.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},s.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},s.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},s.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},s.prototype.getY=function(){return this.normalize(),this.y.fromRed()},s.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},s.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},s.prototype.toP=s.prototype.normalize,s.prototype.mixedAdd=s.prototype.add,Jp}()}(Qp)),Qp}var nd,rd={},id={},ad={};function sd(){if(nd)return ad;nd=1;var e=jp(),t=ur();function n(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function a(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}return ad.inherits=t,ad.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),a=0;a<e.length;a+=2)r.push(parseInt(e[a]+e[a+1],16))}else for(var i=0,a=0;a<e.length;a++){var s=e.charCodeAt(a);s<128?r[i++]=s:s<2048?(r[i++]=s>>6|192,r[i++]=63&s|128):n(e,a)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++a)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(a=0;a<e.length;a++)r[a]=0|e[a];return r},ad.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t},ad.htonl=r,ad.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var s=e[i];"little"===t&&(s=r(s)),n+=a(s.toString(16))}return n},ad.zero2=i,ad.zero8=a,ad.join32=function(t,n,r,i){var a=r-n;e(a%4==0);for(var s=new Array(a/4),o=0,c=n;o<s.length;o++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[o]=u>>>0}return s},ad.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},ad.rotr32=function(e,t){return e>>>t|e<<32-t},ad.rotl32=function(e,t){return e<<t|e>>>32-t},ad.sum32=function(e,t){return e+t>>>0},ad.sum32_3=function(e,t,n){return e+t+n>>>0},ad.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},ad.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},ad.sum64=function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,s=(a<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=a},ad.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},ad.sum64_lo=function(e,t,n,r){return t+r>>>0},ad.sum64_4_hi=function(e,t,n,r,i,a,s,o){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+a>>>0)<a?1:0,e+n+i+s+(c+=(u=u+o>>>0)<o?1:0)>>>0},ad.sum64_4_lo=function(e,t,n,r,i,a,s,o){return t+r+a+o>>>0},ad.sum64_5_hi=function(e,t,n,r,i,a,s,o,c,u){var l=0,p=t;return l+=(p=p+r>>>0)<t?1:0,l+=(p=p+a>>>0)<a?1:0,l+=(p=p+o>>>0)<o?1:0,e+n+i+s+c+(l+=(p=p+u>>>0)<u?1:0)>>>0},ad.sum64_5_lo=function(e,t,n,r,i,a,s,o,c,u){return t+r+a+o+u>>>0},ad.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},ad.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},ad.shr64_hi=function(e,t,n){return e>>>n},ad.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},ad}var od,cd={};function ud(){if(od)return cd;od=1;var e=sd(),t=jp();function n(){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}return cd.BlockHash=n,n.prototype.update=function(t,n){if(t=e.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r},cd}var ld,pd,dd,fd,hd,md,yd,gd,bd,vd,wd,xd,_d={},Td={};function Ed(){if(ld)return Td;ld=1;var e=sd().rotr32;function t(e,t,n){return e&t^~e&n}function n(e,t,n){return e&t^e&n^t&n}function r(e,t,n){return e^t^n}return Td.ft_1=function(e,i,a,s){return 0===e?t(i,a,s):1===e||3===e?r(i,a,s):2===e?n(i,a,s):void 0},Td.ch32=t,Td.maj32=n,Td.p32=r,Td.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},Td.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},Td.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},Td.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},Td}function Sd(){if(hd)return fd;hd=1;var e=sd(),t=ud(),n=Ed(),r=jp(),i=e.sum32,a=e.sum32_4,s=e.sum32_5,o=n.ch32,c=n.maj32,u=n.s0_256,l=n.s1_256,p=n.g0_256,d=n.g1_256,f=t.BlockHash,h=[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;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}return e.inherits(m,f),fd=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,f=0;f<16;f++)n[f]=e[t+f];for(;f<n.length;f++)n[f]=a(d(n[f-2]),n[f-7],p(n[f-15]),n[f-16]);var h=this.h[0],m=this.h[1],y=this.h[2],g=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],x=this.h[7];for(r(this.k.length===n.length),f=0;f<n.length;f++){var _=s(x,l(b),o(b,v,w),this.k[f],n[f]),T=i(u(h),c(h,m,y));x=w,w=v,v=b,b=i(g,_),g=y,y=m,m=h,h=i(_,T)}this.h[0]=i(this.h[0],h),this.h[1]=i(this.h[1],m),this.h[2]=i(this.h[2],y),this.h[3]=i(this.h[3],g),this.h[4]=i(this.h[4],b),this.h[5]=i(this.h[5],v),this.h[6]=i(this.h[6],w),this.h[7]=i(this.h[7],x)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},fd}function kd(){if(bd)return gd;bd=1;var e=sd(),t=ud(),n=jp(),r=e.rotr64_hi,i=e.rotr64_lo,a=e.shr64_hi,s=e.shr64_lo,o=e.sum64,c=e.sum64_hi,u=e.sum64_lo,l=e.sum64_4_hi,p=e.sum64_4_lo,d=e.sum64_5_hi,f=e.sum64_5_lo,h=t.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 y(){if(!(this instanceof y))return new y;h.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 g(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function b(e,t,n,r,i,a){var s=t&r^~t&a;return s<0&&(s+=4294967296),s}function v(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function w(e,t,n,r,i,a){var s=t&r^t&a^r&a;return s<0&&(s+=4294967296),s}function x(e,t){var n=r(e,t,28)^r(t,e,2)^r(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=i(e,t,28)^i(t,e,2)^i(t,e,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=r(e,t,14)^r(e,t,18)^r(t,e,9);return n<0&&(n+=4294967296),n}function E(e,t){var n=i(e,t,14)^i(e,t,18)^i(t,e,9);return n<0&&(n+=4294967296),n}function S(e,t){var n=r(e,t,1)^r(e,t,8)^a(e,t,7);return n<0&&(n+=4294967296),n}function k(e,t){var n=i(e,t,1)^i(e,t,8)^s(e,t,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=r(e,t,19)^r(t,e,29)^a(e,t,6);return n<0&&(n+=4294967296),n}function A(e,t){var n=i(e,t,19)^i(t,e,29)^s(e,t,6);return n<0&&(n+=4294967296),n}return e.inherits(y,h),gd=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=M(n[r-4],n[r-3]),a=A(n[r-4],n[r-3]),s=n[r-14],o=n[r-13],c=S(n[r-30],n[r-29]),u=k(n[r-30],n[r-29]),d=n[r-32],f=n[r-31];n[r]=l(i,a,s,o,c,u,d,f),n[r+1]=p(i,a,s,o,c,u,d,f)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],a=this.h[1],s=this.h[2],l=this.h[3],p=this.h[4],h=this.h[5],m=this.h[6],y=this.h[7],S=this.h[8],k=this.h[9],M=this.h[10],A=this.h[11],O=this.h[12],R=this.h[13],I=this.h[14],N=this.h[15];n(this.k.length===r.length);for(var C=0;C<r.length;C+=2){var P=I,j=N,L=T(S,k),$=E(S,k),D=g(S,k,M,A,O),U=b(S,k,M,A,O,R),z=this.k[C],B=this.k[C+1],F=r[C],q=r[C+1],H=d(P,j,L,$,D,U,z,B,F,q),Y=f(P,j,L,$,D,U,z,B,F,q);P=x(i,a),j=_(i,a),L=v(i,a,s,l,p),$=w(i,a,s,l,p,h);var V=c(P,j,L,$),K=u(P,j,L,$);I=O,N=R,O=M,R=A,M=S,A=k,S=c(m,y,H,Y),k=u(y,y,H,Y),m=p,y=h,p=s,h=l,s=i,l=a,i=c(H,Y,V,K),a=u(H,Y,V,K)}o(this.h,0,i,a),o(this.h,2,s,l),o(this.h,4,p,h),o(this.h,6,m,y),o(this.h,8,S,k),o(this.h,10,M,A),o(this.h,12,O,R),o(this.h,14,I,N)},y.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},gd}function Md(){return xd||(xd=1,_d.sha1=function(){if(dd)return pd;dd=1;var e=sd(),t=ud(),n=Ed(),r=e.rotl32,i=e.sum32,a=e.sum32_5,s=n.ft_1,o=t.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(u,o),pd=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.W,o=0;o<16;o++)n[o]=e[t+o];for(;o<n.length;o++)n[o]=r(n[o-3]^n[o-8]^n[o-14]^n[o-16],1);var u=this.h[0],l=this.h[1],p=this.h[2],d=this.h[3],f=this.h[4];for(o=0;o<n.length;o++){var h=~~(o/20),m=a(r(u,5),s(h,l,p,d),f,n[o],c[h]);f=d,d=p,p=r(l,30),l=u,u=m}this.h[0]=i(this.h[0],u),this.h[1]=i(this.h[1],l),this.h[2]=i(this.h[2],p),this.h[3]=i(this.h[3],d),this.h[4]=i(this.h[4],f)},u.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},pd}(),_d.sha224=function(){if(yd)return md;yd=1;var e=sd(),t=Sd();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(n,t),md=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},md}(),_d.sha256=Sd(),_d.sha384=function(){if(wd)return vd;wd=1;var e=sd(),t=kd();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(n,t),vd=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},vd}(),_d.sha512=kd()),_d}var Ad,Od,Rd,Id,Nd,Cd,Pd,jd,Ld,$d,Dd,Ud,zd,Bd,Fd,qd,Hd,Yd,Vd,Kd,Gd,Wd,Jd={};function Zd(){return Id||(Id=1,function(){var e=id;e.utils=sd(),e.common=ud(),e.sha=Md(),e.ripemd=function(){if(Ad)return Jd;Ad=1;var e=sd(),t=ud(),n=e.rotl32,r=e.sum32,i=e.sum32_3,a=e.sum32_4,s=t.BlockHash;function o(){if(!(this instanceof o))return new o;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(o,s),Jd.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var s=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],b=s,v=o,w=m,x=y,_=g,T=0;T<80;T++){var E=r(n(a(s,c(T,o,m,y),e[p[T]+t],u(T)),f[T]),g);s=g,g=y,y=n(m,10),m=o,o=E,E=r(n(a(b,c(79-T,v,w,x),e[d[T]+t],l(T)),h[T]),_),b=_,_=x,x=n(w,10),w=v,v=E}E=i(this.h[1],m,x),this.h[1]=i(this.h[2],y,_),this.h[2]=i(this.h[3],g,b),this.h[3]=i(this.h[4],s,v),this.h[4]=i(this.h[0],o,w),this.h[0]=E},o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.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],d=[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],f=[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],h=[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];return Jd}(),e.hmac=function(){if(Rd)return Od;Rd=1;var e=sd(),t=jp();function n(t,r,i){if(!(this instanceof n))return new n(t,r,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,i))}return Od=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var n=e.length;n<this.blockSize;n++)e.push(0);for(n=0;n<e.length;n++)e[n]^=54;for(this.inner=(new this.Hash).update(e),n=0;n<e.length;n++)e[n]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Od}(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}()),id}function Xd(){return Pd||(Pd=1,function(e){var t,n=e,r=Zd(),i=td(),a=zp().assert;function s(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.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 o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=s,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=Cd?Nd:(Cd=1,Nd={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"]]}})}catch(e){t=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(rd)),rd}function Qd(){if(Fd)return Bd;Fd=1;var e=Pp(),t=function(){if(Ld)return jd;Ld=1;var e=Zd(),t=Up(),n=jp();function r(e){if(!(this instanceof r))return new r(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 i=t.toArray(e.entropy,e.entropyEnc||"hex"),a=t.toArray(e.nonce,e.nonceEnc||"hex"),s=t.toArray(e.pers,e.persEnc||"hex");n(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(i,a,s)}return jd=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,r,i,a){"string"!=typeof r&&(a=i,i=r,r=null),e=t.toArray(e,r),i=t.toArray(i,a),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},r.prototype.generate=function(e,n,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(i=r,r=n,n=null),r&&(r=t.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,e);return this._update(r),this._reseed++,t.encode(s,n)},jd}(),n=zp(),r=Xd(),i=qp(),a=n.assert,s=function(){if(Dd)return $d;Dd=1;var e=Pp(),t=zp().assert;function n(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)}return $d=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.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"}},n.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},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,n){this.priv=new e(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,n){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(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,n)},n.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},n.prototype.verify=function(e,t,n){return this.ec.verify(e,t,this,void 0,n)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},$d}(),o=function(){if(zd)return Ud;zd=1;var e=Pp(),t=zp(),n=t.assert;function r(t,i){if(t instanceof r)return t;this._importDER(t,i)||(n(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function a(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var i=0,a=0,s=t.place;a<r;a++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function s(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function o(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}return Ud=r,r.prototype._importDER=function(n,r){n=t.toArray(n,r);var s=new i;if(48!==n[s.place++])return!1;var o=a(n,s);if(!1===o)return!1;if(o+s.place!==n.length)return!1;if(2!==n[s.place++])return!1;var c=a(n,s);if(!1===c)return!1;if(128&n[s.place])return!1;var u=n.slice(s.place,c+s.place);if(s.place+=c,2!==n[s.place++])return!1;var l=a(n,s);if(!1===l)return!1;if(n.length!==l+s.place)return!1;if(128&n[s.place])return!1;var p=n.slice(s.place,l+s.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===p[0]){if(!(128&p[1]))return!1;p=p.slice(1)}return this.r=new e(u),this.s=new e(p),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=s(n),r=s(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];o(i,n.length),(i=i.concat(n)).push(2),o(i,r.length);var a=i.concat(r),c=[48];return o(c,a.length),c=c.concat(a),t.encode(c,e)},Ud}();function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.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}return Bd=c,c.prototype.keyPair=function(e){return new s(this,e)},c.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},c.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),s=this.n.sub(new e(2));;){var o=new e(r.generate(a));if(!(o.cmp(s)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(t,n,r){var i;if(e.isBN(t)||"number"==typeof t)i=(t=new e(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new e(t,16);else{var a=t.toString();i=a.length+1>>>1,t=new e(a,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(n,r,i,s){if("object"==typeof i&&(s=i,i=null),s||(s={}),"string"!=typeof n&&"number"!=typeof n&&!e.isBN(n)){a("object"==typeof n&&n&&"number"==typeof n.length,"Expected message to be an array-like, a hex string, or a BN instance"),a(n.length>>>0===n.length);for(var c=0;c<n.length;c++)a((255&n[c])===n[c])}r=this.keyFromPrivate(r,i),n=this._truncateToN(n,!1,s.msgBitLength),a(!n.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),l=r.getPrivate().toArray("be",u),p=n.toArray("be",u);a(new e(p).eq(n),"Can not sign message");for(var d=new t({hash:this.hash,entropy:l,nonce:p,pers:s.pers,persEnc:s.persEnc||"utf8"}),f=this.n.sub(new e(1)),h=0;;h++){var m=s.k?s.k(h):new e(d.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(f)>=0)){var y=this.g.mul(m);if(!y.isInfinity()){var g=y.getX(),b=g.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(y.getY().isOdd()?1:0)|(0!==g.cmp(b)?2:0);return s.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new o({r:b,s:v,recoveryParam:w})}}}}}},c.prototype.verify=function(e,t,n,r,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,r);var a=(t=new o(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var c,u=s.invm(this.n),l=u.mul(e).umod(this.n),p=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,n.getPublic(),p)).isInfinity()&&c.eqXToP(a):!(c=this.g.mulAdd(l,n.getPublic(),p)).isInfinity()&&0===c.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(t,n,r,i){a((3&r)===r,"The recovery param is more than two bits"),n=new o(n,i);var s=this.n,c=new e(t),u=n.r,l=n.s,p=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),p):this.curve.pointFromX(u,p);var f=n.r.invm(s),h=s.sub(c).mul(f).umod(s),m=l.mul(f).umod(s);return this.g.mulAdd(h,u,m)},c.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new o(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(n))return i}throw new Error("Unable to find valid recovery factor")},Bd}function ef(){if(Gd)return Kd;Gd=1;var e=Zd(),t=Xd(),n=zp(),r=n.assert,i=n.parseBytes,a=function(){if(Hd)return qd;Hd=1;var e=zp(),t=e.assert,n=e.parseBytes,r=e.cachedProperty;function i(e,t){this.eddsa=e,this._secret=n(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=n(t.pub)}return i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},r(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),r(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),r(i,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),r(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),r(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),r(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(n){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),n)},i.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},qd=i}(),s=function(){if(Vd)return Yd;Vd=1;var e=Pp(),t=zp(),n=t.assert,r=t.cachedProperty,i=t.parseBytes;function a(t,r){this.eddsa=t,"object"!=typeof r&&(r=i(r)),Array.isArray(r)&&(n(r.length===2*t.encodingLength,"Signature has invalid size"),r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),n(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof e&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}return r(a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),r(a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),r(a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),r(a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},Yd=a}();function o(n){if(r("ed25519"===n,"only tested with ed25519 so far"),!(this instanceof o))return new o(n);n=t[n].curve,this.curve=n,this.g=n.g,this.g.precompute(n.n.bitLength()+1),this.pointClass=n.point().constructor,this.encodingLength=Math.ceil(n.n.bitLength()/8),this.hash=e.sha512}return Kd=o,o.prototype.sign=function(e,t){e=i(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),a=this.g.mul(r),s=this.encodePoint(a),o=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:a,S:c,Rencoded:s})},o.prototype.verify=function(e,t,n){if(e=i(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(n),a=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(a)).eq(s)},o.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return n.intFromLE(e.digest()).umod(this.curve.n)},o.prototype.keyFromPublic=function(e){return a.fromPublic(this,e)},o.prototype.keyFromSecret=function(e){return a.fromSecret(this,e)},o.prototype.makeSignature=function(e){return e instanceof s?e:new s(this,e)},o.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},o.prototype.decodePoint=function(e){var t=(e=n.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),a=n.intFromLE(r);return this.curve.pointFromY(a,i)},o.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},o.prototype.decodeInt=function(e){return n.intFromLE(e)},o.prototype.isPoint=function(e){return e instanceof this.pointClass},Kd}function tf(){return Wd||(Wd=1,function(){var e=Op;e.version=Rp,e.utils=zp(),e.rand=qp(),e.curve=td(),e.curves=Xd(),e.ec=Qd(),e.eddsa=ef()}()),Op}const nf=new(tf().ec)("secp256k1"),rf=globalThis.crypto||globalThis.msCrypto||{};rf.subtle||rf.webkitSubtle;const af=Buffer.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),sf=Buffer.alloc(32,0);function of(e,t){if(!e)throw new Error(t)}function cf(e){return t=e,!(!Buffer.isBuffer(t)||32!==t.length)&&(e.compare(sf)>0&&e.compare(af)<0);var t}function uf(e){if(void 0===rf.getRandomValues)return Buffer.from(rf.randomBytes(e));const t=new Uint8Array(e);return rf.getRandomValues(t),Buffer.from(t)}var lf,pf={},df={},ff={},hf={exports:{}},mf=hf.exports;function yf(){return lf||(lf=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(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 o(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),c=t;c<o;c++){var u=e.charCodeAt(c)-48;a*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),a+=s}return a}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.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<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var p=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)p*=t;this.imuln(p),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","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"],d=[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],f=[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,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,p=67108863&c,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var h=u-f|0;l+=(s=(i=0|e.words[h])*(a=0|t.words[f])+p)/67108864|0,p=67108863&s}n.words[u]=0|p,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],c=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?p[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],l=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?m+r:p[u-m.length]+m+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")},i.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},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===a?(n<e.length&&(e[n++]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===a?(n>=0&&(e[n--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.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 n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,a,s=e.words,o=t.words,c=n.words,u=0,l=0|s[0],p=8191&l,d=l>>>13,f=0|s[1],h=8191&f,m=f>>>13,y=0|s[2],g=8191&y,b=y>>>13,v=0|s[3],w=8191&v,x=v>>>13,_=0|s[4],T=8191&_,E=_>>>13,S=0|s[5],k=8191&S,M=S>>>13,A=0|s[6],O=8191&A,R=A>>>13,I=0|s[7],N=8191&I,C=I>>>13,P=0|s[8],j=8191&P,L=P>>>13,$=0|s[9],D=8191&$,U=$>>>13,z=0|o[0],B=8191&z,F=z>>>13,q=0|o[1],H=8191&q,Y=q>>>13,V=0|o[2],K=8191&V,G=V>>>13,W=0|o[3],J=8191&W,Z=W>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],pe=8191&le,de=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ye=(u+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;u=((a=Math.imul(d,F))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(h,B),i=(i=Math.imul(h,F))+Math.imul(m,B)|0,a=Math.imul(m,F);var ge=(u+(r=r+Math.imul(p,H)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,B),i=(i=Math.imul(g,F))+Math.imul(b,B)|0,a=Math.imul(b,F),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(p,K)|0)|0)+((8191&(i=(i=i+Math.imul(p,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,B),i=(i=Math.imul(w,F))+Math.imul(x,B)|0,a=Math.imul(x,F),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,H)|0,a=a+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,G)|0;var ve=(u+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,Z)|0)+Math.imul(d,J)|0))<<13)|0;u=((a=a+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(E,B)|0,a=Math.imul(E,F),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,H)|0,a=a+Math.imul(x,Y)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,G)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(M,B)|0,a=Math.imul(M,F),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(O,B),i=(i=Math.imul(O,F))+Math.imul(R,B)|0,a=Math.imul(R,F),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(p,ae)|0)|0)+((8191&(i=(i=i+Math.imul(p,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,F))+Math.imul(C,B)|0,a=Math.imul(C,F),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,Y)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(b,ne)|0,a=a+Math.imul(b,re)|0,r=r+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,se)|0;var Te=(u+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,B),i=(i=Math.imul(j,F))+Math.imul(L,B)|0,a=Math.imul(L,F),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,Y)|0,r=r+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,Z)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,a=a+Math.imul(x,re)|0,r=r+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,B),i=(i=Math.imul(D,F))+Math.imul(U,B)|0,a=Math.imul(U,F),r=r+Math.imul(j,H)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,G)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,r=r+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,r=r+Math.imul(h,pe)|0,i=(i=i+Math.imul(h,de)|0)+Math.imul(m,pe)|0,a=a+Math.imul(m,de)|0;var Se=(u+(r=r+Math.imul(p,he)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,he)|0))<<13)|0;u=((a=a+Math.imul(d,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,Y))+Math.imul(U,H)|0,a=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(L,K)|0,a=a+Math.imul(L,G)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,Z)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,r=r+Math.imul(g,pe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,pe)|0,a=a+Math.imul(b,de)|0;var ke=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(D,K),i=(i=Math.imul(D,G))+Math.imul(U,K)|0,a=Math.imul(U,G),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(R,ne)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,ue)|0,r=r+Math.imul(w,pe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(x,pe)|0,a=a+Math.imul(x,de)|0;var Me=(u+(r=r+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(D,J),i=(i=Math.imul(D,Z))+Math.imul(U,J)|0,a=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(C,ne)|0,a=a+Math.imul(C,re)|0,r=r+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,ue)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(E,pe)|0,a=a+Math.imul(E,de)|0;var Ae=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((a=a+Math.imul(x,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(U,Q)|0,a=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,a=a+Math.imul(L,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,se)|0,r=r+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(M,pe)|0,a=a+Math.imul(M,de)|0;var Oe=(u+(r=r+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(E,he)|0))<<13)|0;u=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(D,ne),i=(i=Math.imul(D,re))+Math.imul(U,ne)|0,a=Math.imul(U,re),r=r+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,se)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,r=r+Math.imul(O,pe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(R,pe)|0,a=a+Math.imul(R,de)|0;var Re=(u+(r=r+Math.imul(k,he)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(M,he)|0))<<13)|0;u=((a=a+Math.imul(M,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(D,ae),i=(i=Math.imul(D,se))+Math.imul(U,ae)|0,a=Math.imul(U,se),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,ue)|0,r=r+Math.imul(N,pe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,pe)|0,a=a+Math.imul(C,de)|0;var Ie=(u+(r=r+Math.imul(O,he)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,he)|0))<<13)|0;u=((a=a+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(D,ce),i=(i=Math.imul(D,ue))+Math.imul(U,ce)|0,a=Math.imul(U,ue),r=r+Math.imul(j,pe)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(L,pe)|0,a=a+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,he)|0))<<13)|0;u=((a=a+Math.imul(C,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(D,pe),i=(i=Math.imul(D,de))+Math.imul(U,pe)|0,a=Math.imul(U,de);var Ce=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((a=a+Math.imul(L,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Pe=(u+(r=Math.imul(D,he))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(U,he)|0))<<13)|0;return u=((a=Math.imul(U,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,c[0]=ye,c[1]=ge,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Te,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ae,c[13]=Oe,c[14]=Re,c[15]=Ie,c[16]=Ne,c[17]=Ce,c[18]=Pe,0!==u&&(c[19]=u,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var l=a-u,p=(0|e.words[l])*(0|t.words[u]),d=67108863&p;o=67108863&(d=d+o|0),i+=(s=(s=s+(p/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n._strip()}function g(e,t,n){return y(e,t,n)}Math.imul||(m=h),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?h(this,e,t):n<1024?y(this,e,t):g(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),g(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<r;this.words[t]=c|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(a,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[a.length+p])+(0|r.words[a.length+p-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(a,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(a,1,p),r.isZero()||(r.negative^=1);o&&(o.words[p]=d)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.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 a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.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 a=new i(1),s=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(p)),a.iushrn(1),s.iushrn(1);for(var h=0,m=1;0===(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(p)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o),s.isub(c)):(r.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:r.iushln(u)}},i.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 a,s=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var p=0,d=1;0===(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.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)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(w,v),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|a>>>22,a=s}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(x,v),r(_,v),r(T,v),T.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return b[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.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")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,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 i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,a),d=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),h=s;0!==f.cmp(o);){for(var m=f,y=0;0!==m.cmp(o);y++)m=m.redSqr();n(y<h);var g=this.pow(p,new i(1).iushln(h-y-1));d=d.redMul(g),p=g.redSqr(),f=f.redMul(p),h=y}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var a=n[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var p=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==p||0!==s?(s<<=1,s|=p,(4===++o||0===r&&0===l)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(hf,mf)),hf.exports}var gf,bf,vf,wf={};function xf(){if(gf)return wf;gf=1;var e=wf&&wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wf,"__esModule",{value:!0}),wf.getLength=wf.decode=wf.encode=void 0;const t=e(yf());function n(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function r(e,t){if(e<56)return Buffer.from([e+t]);{const n=s(e),r=s(t+55+n.length/2);return Buffer.from(r+n,"hex")}}function i(e){let t,r,a,s,o;const c=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,a=128===u?Buffer.from([]):e.slice(1,t),2===t&&a[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:a,remainder:e.slice(t)}}if(u<=191){if(r=u-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=n(e.slice(1,r).toString("hex"),16),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(a=e.slice(r,t+r),a.length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:a,remainder:e.slice(t+r)}}if(u<=247){for(t=u-191,s=e.slice(1,t);s.length;)o=i(s),c.push(o.data),s=o.remainder;return{data:c,remainder:e.slice(t)}}{r=u-246,t=n(e.slice(1,r).toString("hex"),16);const a=r+t;if(a>e.length)throw new Error("invalid rlp: total length is larger than the data");if(s=e.slice(r,a),0===s.length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)o=i(s),c.push(o.data),s=o.remainder;return{data:c,remainder:e.slice(a)}}}function a(e){return"0x"===e.slice(0,2)}function s(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function o(e){if(!Buffer.isBuffer(e)){if("string"==typeof e)return a(e)?Buffer.from((n="string"!=typeof(r=e)?r:a(r)?r.slice(2):r).length%2?`0${n}`:n,"hex"):Buffer.from(e);if("number"==typeof e||"bigint"==typeof e)return e?function(e){const t=s(e);return Buffer.from(t,"hex")}(e):Buffer.from([]);if(null==e)return Buffer.from([]);if(e instanceof Uint8Array)return Buffer.from(e);if(t.default.isBN(e))return Buffer.from(e.toArray());throw new Error("invalid type")}var n,r;return e}return wf.encode=function e(t){if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++)n.push(e(t[r]));const i=Buffer.concat(n);return Buffer.concat([r(i.length,192),i])}{const e=o(t);return 1===e.length&&e[0]<128?e:Buffer.concat([r(e.length,128),e])}},wf.decode=function(e,t=!1){if(!e||0===e.length)return Buffer.from([]);const n=i(o(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},wf.getLength=function(e){if(!e||0===e.length)return Buffer.from([]);const t=o(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;{const e=r-246;return e+n(t.slice(1,e).toString("hex"),16)}},wf}function _f(){if(bf)return ff;bf=1;var e=ff&&ff.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=ff&&ff.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=ff&&ff.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},r=ff&&ff.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ff,"__esModule",{value:!0}),ff.rlp=ff.BN=void 0;const i=r(yf());ff.BN=i.default;const a=n(xf());return ff.rlp=a,ff}function Tf(){return vf||(vf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=d,n=_f();e.MAX_UINT64=new n.BN("ffffffffffffffff",16),e.MAX_INTEGER=new n.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new n.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex")}(df)),df}var Ef,Sf,kf,Mf,Af,Of,Rf,If,Nf,Cf,Pf,jf,Lf={},$f={},Df={exports:{}},Uf={exports:{}};function zf(){if(kf)return Uf.exports;kf=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:Xs;return"function"==typeof e.addon?Uf.exports=e.addon.bind(e):Uf.exports=function(){if(Sf)return Ef;Sf=1;var e=n,t=a,r=l,i="function"==typeof __webpack_require__?__non_webpack_require__:Xs,s=process.config&&process.config.variables||{},o=!!process.env.PREBUILDS_ONLY,c=process.versions.modules,u=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",p=process.env.npm_config_arch||r.arch(),d=process.env.npm_config_platform||r.platform(),f=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(d)?"musl":"glibc"),h=process.env.ARM_VERSION||("arm64"===p?"8":s.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function y(e){return i(y.resolve(e))}function g(t){try{return e.readdirSync(t)}catch(e){return[]}}function b(e,n){var r=g(e).filter(n);return r[0]&&t.join(e,r[0])}function v(e){return/\.node$/.test(e)}function w(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function x(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function _(e,t){return e.architectures.length-t.architectures.length}function T(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function E(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==h||n.libc&&n.libc!==f)}}function S(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return Ef=y,y.resolve=y.path=function(e){e=t.resolve(e||".");try{var n=i(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!o){var r=b(t.join(e,"build/Release"),v);if(r)return r;var a=b(t.join(e,"build/Debug"),v);if(a)return a}var s=k(e);if(s)return s;var l=k(t.dirname(process.execPath));if(l)return l;var y=["platform="+d,"arch="+p,"runtime="+u,"abi="+c,"uv="+m,h?"armv="+h:"","libc="+f,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+y+"\n loaded from: "+e+"\n");function k(e){var n=g(t.join(e,"prebuilds")).map(w).filter(x(d,p)).sort(_)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=g(r).map(T).filter(E(u,c)).sort(S(u))[0];return i?t.join(r,i.file):void 0}}},y.parseTags=T,y.matchTags=E,y.compareTags=S,y.parseTuple=w,y.matchTuple=x,y.compareTuples=_,Ef}(),Uf.exports}function Bf(){if(Af)return Mf;Af=1;const e="Impossible case. Please create issue.",t="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",r="Unknow error on context randomization",i="Private Key is invalid",a="Public Key could not be parsed",s="Public Key serialization error",o="The sum of the public keys is not valid",c="Signature could not be parsed",u="The nonce generation function failed, or the private key was invalid",l="Public key could not be recover",p="Scalar was invalid (zero or overflow)";function d(e,t){if(!e)throw new Error(t)}function f(e,t,n){if(d(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;d(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;d(t.length===n,r)}}function h(e){d("Boolean"===y(e),"Expected compressed to be a Boolean")}function m(e=e=>new Uint8Array(e),t){return"function"==typeof e&&(e=e(t)),f("output",e,t),e}function y(e){return Object.prototype.toString.call(e).slice(8,-1)}return Mf=g=>({contextRandomize(e){if(d(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&f("seed",e,32),1===g.contextRandomize(e))throw new Error(r)},privateKeyVerify:e=>(f("private key",e,32),0===g.privateKeyVerify(e)),privateKeyNegate(t){switch(f("private key",t,32),g.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(f("private key",e,32),f("tweak",n,32),g.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(t)}},privateKeyTweakMul(e,t){switch(f("private key",e,32),f("tweak",t,32),g.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(f("public key",e,[33,65]),0===g.publicKeyVerify(e)),publicKeyCreate(e,t=!0,n){switch(f("private key",e,32),h(t),n=m(n,t?33:65),g.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(s)}},publicKeyConvert(e,t=!0,n){switch(f("public key",e,[33,65]),h(t),n=m(n,t?33:65),g.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(s)}},publicKeyNegate(t,n=!0,r){switch(f("public key",t,[33,65]),h(n),r=m(r,n?33:65),g.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(a);case 2:throw new Error(e);case 3:throw new Error(s)}},publicKeyCombine(e,t=!0,n){d(Array.isArray(e),"Expected public keys to be an Array"),d(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)f("public key",t,[33,65]);switch(h(t),n=m(n,t?33:65),g.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(o);case 3:throw new Error(s)}},publicKeyTweakAdd(e,n,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",n,32),h(r),i=m(i,r?33:65),g.publicKeyTweakAdd(i,e,n)){case 0:return i;case 1:throw new Error(a);case 2:throw new Error(t)}},publicKeyTweakMul(e,t,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",t,32),h(r),i=m(i,r?33:65),g.publicKeyTweakMul(i,e,t)){case 0:return i;case 1:throw new Error(a);case 2:throw new Error(n)}},signatureNormalize(e){switch(f("signature",e,64),g.signatureNormalize(e)){case 0:return e;case 1:throw new Error(c)}},signatureExport(t,n){f("signature",t,64);const r={output:n=m(n,72),outputlen:72};switch(g.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(c);case 2:throw new Error(e)}},signatureImport(t,n){switch(f("signature",t),n=m(n,64),g.signatureImport(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(e)}},ecdsaSign(t,n,r={},i){f("message",t,32),f("private key",n,32),d("Object"===y(r),"Expected options to be an Object"),void 0!==r.data&&f("options.data",r.data),void 0!==r.noncefn&&d("Function"===y(r.noncefn),"Expected options.noncefn to be a Function");const a={signature:i=m(i,64),recid:null};switch(g.ecdsaSign(a,t,n,r.data,r.noncefn)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(e)}},ecdsaVerify(e,t,n){switch(f("signature",e,64),f("message",t,32),f("public key",n,[33,65]),g.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(c);case 2:throw new Error(a)}},ecdsaRecover(t,n,r,i=!0,a){switch(f("signature",t,64),d("Number"===y(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),f("message",r,32),h(i),a=m(a,i?33:65),g.ecdsaRecover(a,t,n,r)){case 0:return a;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(e)}},ecdh(e,t,n={},r){switch(f("public key",e,[33,65]),f("private key",t,32),d("Object"===y(n),"Expected options to be an Object"),void 0!==n.data&&f("options.data",n.data),void 0!==n.hashfn?(d("Function"===y(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&f("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&f("options.ybuf",n.ybuf,32),f("output",r)):r=m(r,32),g.ecdh(r,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return r;case 1:throw new Error(a);case 2:throw new Error(p)}}}),Mf}function Ff(){if(Nf)return If;Nf=1;const e=new(0,tf().ec)("secp256k1"),t=e.curve,n=t.n.constructor;function r(r){const i=r[0];switch(i){case 2:case 3:return 33!==r.length?null:function(r,i){let a=new n(i);if(a.cmp(t.p)>=0)return null;a=a.toRed(t.red);let s=a.redSqr().redIMul(a).redIAdd(t.b).redSqrt();3===r!==s.isOdd()&&(s=s.redNeg());const o=a.redSqr().redIMul(a);return s.redSqr().redISub(o.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:a,y:s}}):null}(i,r.subarray(1,33));case 4:case 6:case 7:return 65!==r.length?null:function(r,i,a){let s=new n(i),o=new n(a);if(s.cmp(t.p)>=0||o.cmp(t.p)>=0)return null;if(s=s.toRed(t.red),o=o.toRed(t.red),(6===r||7===r)&&o.isOdd()!==(7===r))return null;const c=s.redSqr().redIMul(s);return o.redSqr().redISub(c.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:s,y:o}}):null}(i,r.subarray(1,33),r.subarray(33,65));default:return null}}function i(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}return If={contextRandomize:()=>0,privateKeyVerify(e){const r=new n(e);return r.cmp(t.n)<0&&!r.isZero()?0:1},privateKeyNegate(e){const r=new n(e),i=t.n.sub(r).umod(t.n).toArrayLike(Uint8Array,"be",32);return e.set(i),0},privateKeyTweakAdd(e,r){const i=new n(r);if(i.cmp(t.n)>=0)return 1;if(i.iadd(new n(e)),i.cmp(t.n)>=0&&i.isub(t.n),i.isZero())return 1;const a=i.toArrayLike(Uint8Array,"be",32);return e.set(a),0},privateKeyTweakMul(e,r){let i=new n(r);if(i.cmp(t.n)>=0||i.isZero())return 1;i.imul(new n(e)),i.cmp(t.n)>=0&&(i=i.umod(t.n));const a=i.toArrayLike(Uint8Array,"be",32);return e.set(a),0},publicKeyVerify:e=>null===r(e)?1:0,publicKeyCreate(r,a){const s=new n(a);if(s.cmp(t.n)>=0||s.isZero())return 1;return i(r,e.keyFromPrivate(a).getPublic()),0},publicKeyConvert(e,t){const n=r(t);if(null===n)return 1;return i(e,n.getPublic()),0},publicKeyNegate(e,t){const n=r(t);if(null===n)return 1;const a=n.getPublic();return a.y=a.y.redNeg(),i(e,a),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=r(t[e]),null===n[e])return 1;let a=n[0].getPublic();for(let e=1;e<n.length;++e)a=a.add(n[e].pub);return a.isInfinity()?2:(i(e,a),0)},publicKeyTweakAdd(e,a,s){const o=r(a);if(null===o)return 1;if((s=new n(s)).cmp(t.n)>=0)return 2;const c=o.getPublic().add(t.g.mul(s));return c.isInfinity()?2:(i(e,c),0)},publicKeyTweakMul(e,a,s){const o=r(a);if(null===o)return 1;if((s=new n(s)).cmp(t.n)>=0||s.isZero())return 2;return i(e,o.getPublic().mul(s)),0},signatureNormalize(r){const i=new n(r.subarray(0,32)),a=new n(r.subarray(32,64));return i.cmp(t.n)>=0||a.cmp(t.n)>=0?1:(1===a.cmp(e.nh)&&r.set(t.n.sub(a).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,r){const i=r.subarray(0,32),a=r.subarray(32,64);if(new n(i).cmp(t.n)>=0)return 1;if(new n(a).cmp(t.n)>=0)return 1;const{output:s}=e;let o=s.subarray(4,37);o[0]=0,o.set(i,1);let c=33,u=0;for(;c>1&&0===o[u]&&!(128&o[u+1]);--c,++u);if(o=o.subarray(u),128&o[0])return 1;if(c>1&&0===o[0]&&!(128&o[1]))return 1;let l=s.subarray(39,72);l[0]=0,l.set(a,1);let p=33,d=0;for(;p>1&&0===l[d]&&!(128&l[d+1]);--p,++d);return l=l.subarray(d),128&l[0]||p>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+p,s[0]=48,s[1]=e.outputlen-2,s[2]=2,s[3]=o.length,s.set(o,4),s[4+c]=2,s[5+c]=l.length,s.set(l,6+c),0)},signatureImport(e,r){if(r.length<8)return 1;if(r.length>72)return 1;if(48!==r[0])return 1;if(r[1]!==r.length-2)return 1;if(2!==r[2])return 1;const i=r[3];if(0===i)return 1;if(5+i>=r.length)return 1;if(2!==r[4+i])return 1;const a=r[5+i];if(0===a)return 1;if(6+i+a!==r.length)return 1;if(128&r[4])return 1;if(i>1&&0===r[4]&&!(128&r[5]))return 1;if(128&r[i+6])return 1;if(a>1&&0===r[i+6]&&!(128&r[i+7]))return 1;let s=r.subarray(4,4+i);if(33===s.length&&0===s[0]&&(s=s.subarray(1)),s.length>32)return 1;let o=r.subarray(6+i);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let c=new n(s);c.cmp(t.n)>=0&&(c=new n(0));let u=new n(r.subarray(6+i));return u.cmp(t.n)>=0&&(u=new n(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,i,a,s,o){if(o){const e=o;o=t=>{const r=e(i,a,null,s,t);if(!(r instanceof Uint8Array&&32===r.length))throw new Error("This is the way");return new n(r)}}const c=new n(a);if(c.cmp(t.n)>=0||c.isZero())return 1;let u;try{u=e.sign(i,a,{canonical:!0,k:o,pers:s})}catch(e){return 1}return r.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),r.recid=u.recoveryParam,0},ecdsaVerify(i,a,s){const o={r:i.subarray(0,32),s:i.subarray(32,64)},c=new n(o.r),u=new n(o.s);if(c.cmp(t.n)>=0||u.cmp(t.n)>=0)return 1;if(1===u.cmp(e.nh)||c.isZero()||u.isZero())return 3;const l=r(s);if(null===l)return 2;const p=l.getPublic();return e.verify(a,o,p)?0:3},ecdsaRecover(r,a,s,o){const c={r:a.slice(0,32),s:a.slice(32,64)},u=new n(c.r),l=new n(c.s);if(u.cmp(t.n)>=0||l.cmp(t.n)>=0)return 1;if(u.isZero()||l.isZero())return 2;let p;try{p=e.recoverPubKey(o,c,s)}catch(e){return 2}return i(r,p),0},ecdh(i,a,s,o,c,u,l){const p=r(a);if(null===p)return 1;const d=new n(s);if(d.cmp(t.n)>=0||d.isZero())return 2;const f=p.getPublic().mul(d);if(void 0===c){const t=f.encode(null,!0),n=e.hash().update(t).digest();for(let e=0;e<32;++e)i[e]=n[e]}else{u||(u=new Uint8Array(32));const e=f.getX().toArray("be",32);for(let t=0;t<32;++t)u[t]=e[t];l||(l=new Uint8Array(32));const t=f.getY().toArray("be",32);for(let e=0;e<32;++e)l[e]=t[e];const n=c(u,l,o);if(!(n instanceof Uint8Array&&n.length===i.length))return 2;i.set(n)}return 0}},If}function qf(){if(jf)return Df.exports;jf=1;try{Df.exports=function(){if(Rf)return Of;Rf=1;const e=zf()(__dirname);return Of=Bf()(new e.Secp256k1)}()}catch(e){Df.exports=Pf?Cf:(Pf=1,Cf=Bf()(Ff()))}return Df.exports}var Hf,Yf,Vf,Kf,Gf={};function Wf(){return Yf?Hf:(Yf=1,Hf=T.randomBytes)}function Jf(){if(Vf)return Gf;Vf=1,Object.defineProperty(Gf,"__esModule",{value:!0});var e=Wf();return Gf.getRandomBytes=function(t){return new Promise(function(n,r){e(t,function(e,t){e?r(e):n(t)})})},Gf.getRandomBytesSync=function(t){return e(t)},Gf}function Zf(){return Kf||(Kf=1,function(e){var t=$f&&$f.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,o)}c((r=r.apply(e,t||[])).next())})},n=$f&&$f.__generator||function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var r=qf(),i=Jf();e.createPrivateKey=function(){return t(this,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return[4,i.getRandomBytes(32)];case 1:return e=t.sent(),r.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}})})},e.createPrivateKeySync=function(){for(;;){var e=i.getRandomBytesSync(32);if(r.privateKeyVerify(e))return e}},function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(qf())}($f)),$f}var Xf,Qf={};function eh(){if(Xf)return Qf;function e(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Xf=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.isHexString=Qf.getKeys=Qf.fromAscii=Qf.fromUtf8=Qf.toAscii=Qf.arrayContainsArray=Qf.getBinarySize=Qf.padToEven=Qf.stripHexPrefix=Qf.isHexPrefixed=void 0,Qf.isHexPrefixed=e;function t(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}return Qf.stripHexPrefix=t=>{if("string"!=typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof t);return e(t)?t.slice(2):t},Qf.padToEven=t,Qf.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved "+typeof e);return Buffer.byteLength(e,"utf8")},Qf.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[n?"some":"every"](t=>e.indexOf(t)>=0)},Qf.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},Qf.fromUtf8=function(e){return`0x${t(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},Qf.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},Qf.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let a=e[i][t];if(n&&!a)a="";else if("string"!=typeof a)throw new Error("invalid abi - expected type 'string', received "+typeof a);r.push(a)}return r},Qf.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)},Qf}var th,nh,rh={},ih={};function ah(){if(th)return ih;th=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.assertIsString=ih.assertIsArray=ih.assertIsBuffer=ih.assertIsHexString=void 0;const e=eh();ih.assertIsHexString=function(t){if(!(0,e.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};ih.assertIsBuffer=function(e){if(!Buffer.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};ih.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};return ih.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}},ih}function sh(){return nh||(nh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=_f(),n=eh(),r=ah();e.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return Buffer.from((0,n.padToEven)(r.slice(2)),"hex")};e.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(t,n,r){const i=(0,e.zeros)(n);return r?t.length<n?(t.copy(i),i):t.slice(0,n):t.length<n?(t.copy(i,n-t.length),i):t.slice(-n)};e.setLengthLeft=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!1)};e.setLengthRight=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};e.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),a(e)};e.unpadArray=function(e){return(0,r.assertIsArray)(e),a(e)};e.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,n.stripHexPrefix)(e),a(e)};e.toBuffer=function(r){if(null==r)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(r))return Buffer.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return Buffer.from(r);if("string"==typeof r){if(!(0,n.isHexString)(r))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${r}`);return Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,e.intToBuffer)(r);if(t.BN.isBN(r)){if(r.isNeg())throw new Error(`Cannot convert negative BN to buffer. Given: ${r}`);return r.toArrayLike(Buffer)}if(r.toArray)return Buffer.from(r.toArray());if(r.toBuffer)return Buffer.from(r.toBuffer());throw new Error("invalid type")};e.bufferToInt=function(n){return new t.BN((0,e.toBuffer)(n)).toNumber()};e.bufferToHex=function(t){return"0x"+(t=(0,e.toBuffer)(t)).toString("hex")};e.fromSigned=function(e){return new t.BN(e).fromTwos(256)};e.toUnsigned=function(e){return Buffer.from(e.toTwos(256).toArray())};e.addHexPrefix=function(e){return"string"!=typeof e||(0,n.isHexPrefixed)(e)?e:"0x"+e};e.toUtf8=function(e){if((e=(0,n.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};e.baToJSON=function(t){if(Buffer.isBuffer(t))return`0x${t.toString("hex")}`;if(t instanceof Array){const n=[];for(let r=0;r<t.length;r++)n.push((0,e.baToJSON)(t[r]));return n}};e.validateNoLeadingZeroes=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},e.arrToBufArr=function e(t){return Array.isArray(t)?t.map(t=>e(t)):Buffer.from(t)},e.bufArrToArr=function e(t){return Array.isArray(t)?t.map(t=>e(t)):Uint8Array.from(null!=t?t:[])}}(rh)),rh}var oh,ch={},uh={},lh={};function ph(){if(oh)return lh;return oh=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.createHashFunction=function(e){return function(t){var n=e();return n.update(t),Buffer.from(n.digest())}},lh}var dh,fh,hh,mh,yh,gh,bh,vh,wh={exports:{}};function xh(){if(gh)return yh;gh=1;const e=function(){if(fh)return dh;fh=1;const{Transform:e}=Hi();return dh=t=>class n extends e{constructor(e,n,r,i,a){super(a),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=a,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},dh}(),t=function(){if(mh)return hh;mh=1;const{Transform:e}=Hi();return hh=t=>class n extends e{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},hh}();return yh=function(n){const r=e(n),i=t(n);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new r(1152,448,null,224,t);case"keccak256":return new r(1088,512,null,256,t);case"keccak384":return new r(832,768,null,384,t);case"keccak512":return new r(576,1024,null,512,t);case"sha3-224":return new r(1152,448,6,224,t);case"sha3-256":return new r(1088,512,6,256,t);case"sha3-384":return new r(832,768,6,384,t);case"sha3-512":return new r(576,1024,6,512,t);case"shake128":return new i(1344,256,31,t);case"shake256":return new i(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}},yh}var _h,Th,Eh,Sh,kh,Mh,Ah,Oh,Rh,Ih,Nh={};function Ch(){if(Eh)return Th;Eh=1;const e=function(){if(_h)return Nh;_h=1;const e=[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];return Nh.p1600=function(t){for(let n=0;n<24;++n){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],p=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=p^(a<<1|s>>>31),h=d^(s<<1|a>>>31);const m=t[0]^f,y=t[1]^h,g=t[10]^f,b=t[11]^h,v=t[20]^f,w=t[21]^h,x=t[30]^f,_=t[31]^h,T=t[40]^f,E=t[41]^h;f=r^(o<<1|c>>>31),h=i^(c<<1|o>>>31);const S=t[2]^f,k=t[3]^h,M=t[12]^f,A=t[13]^h,O=t[22]^f,R=t[23]^h,I=t[32]^f,N=t[33]^h,C=t[42]^f,P=t[43]^h;f=a^(u<<1|l>>>31),h=s^(l<<1|u>>>31);const j=t[4]^f,L=t[5]^h,$=t[14]^f,D=t[15]^h,U=t[24]^f,z=t[25]^h,B=t[34]^f,F=t[35]^h,q=t[44]^f,H=t[45]^h;f=o^(p<<1|d>>>31),h=c^(d<<1|p>>>31);const Y=t[6]^f,V=t[7]^h,K=t[16]^f,G=t[17]^h,W=t[26]^f,J=t[27]^h,Z=t[36]^f,X=t[37]^h,Q=t[46]^f,ee=t[47]^h;f=u^(r<<1|i>>>31),h=l^(i<<1|r>>>31);const te=t[8]^f,ne=t[9]^h,re=t[18]^f,ie=t[19]^h,ae=t[28]^f,se=t[29]^h,oe=t[38]^f,ce=t[39]^h,ue=t[48]^f,le=t[49]^h,pe=m,de=y,fe=b<<4|g>>>28,he=g<<4|b>>>28,me=v<<3|w>>>29,ye=w<<3|v>>>29,ge=_<<9|x>>>23,be=x<<9|_>>>23,ve=T<<18|E>>>14,we=E<<18|T>>>14,xe=S<<1|k>>>31,_e=k<<1|S>>>31,Te=A<<12|M>>>20,Ee=M<<12|A>>>20,Se=O<<10|R>>>22,ke=R<<10|O>>>22,Me=N<<13|I>>>19,Ae=I<<13|N>>>19,Oe=C<<2|P>>>30,Re=P<<2|C>>>30,Ie=L<<30|j>>>2,Ne=j<<30|L>>>2,Ce=$<<6|D>>>26,Pe=D<<6|$>>>26,je=z<<11|U>>>21,Le=U<<11|z>>>21,$e=B<<15|F>>>17,De=F<<15|B>>>17,Ue=H<<29|q>>>3,ze=q<<29|H>>>3,Be=Y<<28|V>>>4,Fe=V<<28|Y>>>4,qe=G<<23|K>>>9,He=K<<23|G>>>9,Ye=W<<25|J>>>7,Ve=J<<25|W>>>7,Ke=Z<<21|X>>>11,Ge=X<<21|Z>>>11,We=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ze=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=se<<7|ae>>>25,nt=ae<<7|se>>>25,rt=oe<<8|ce>>>24,it=ce<<8|oe>>>24,at=ue<<14|le>>>18,st=le<<14|ue>>>18;t[0]=pe^~Te&je,t[1]=de^~Ee&Le,t[10]=Be^~Qe&me,t[11]=Fe^~et&ye,t[20]=xe^~Ce&Ye,t[21]=_e^~Pe&Ve,t[30]=Ze^~fe&Se,t[31]=Xe^~he&ke,t[40]=Ie^~qe&tt,t[41]=Ne^~He&nt,t[2]=Te^~je&Ke,t[3]=Ee^~Le&Ge,t[12]=Qe^~me&Me,t[13]=et^~ye&Ae,t[22]=Ce^~Ye&rt,t[23]=Pe^~Ve&it,t[32]=fe^~Se&$e,t[33]=he^~ke&De,t[42]=qe^~tt&ge,t[43]=He^~nt&be,t[4]=je^~Ke&at,t[5]=Le^~Ge&st,t[14]=me^~Me&Ue,t[15]=ye^~Ae&ze,t[24]=Ye^~rt&ve,t[25]=Ve^~it&we,t[34]=Se^~$e&We,t[35]=ke^~De&Je,t[44]=tt^~ge&Oe,t[45]=nt^~be&Re,t[6]=Ke^~at&pe,t[7]=Ge^~st&de,t[16]=Me^~Ue&Be,t[17]=Ae^~ze&Fe,t[26]=rt^~ve&xe,t[27]=it^~we&_e,t[36]=$e^~We&Ze,t[37]=De^~Je&Xe,t[46]=ge^~Oe&Ie,t[47]=be^~Re&Ne,t[8]=at^~pe&Te,t[9]=st^~de&Ee,t[18]=Ue^~Be&Qe,t[19]=ze^~Fe&et,t[28]=ve^~xe&Ce,t[29]=we^~_e&Pe,t[38]=We^~Ze&fe,t[39]=Je^~Xe&he,t[48]=Oe^~Ie&qe,t[49]=Re^~Ne&He,t[0]^=e[2*n],t[1]^=e[2*n+1]}},Nh}();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(t){for(let n=0;n<t.length;++n)this.state[~~(this.count/4)]^=t[n]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,128&t&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(t);for(let r=0;r<t;++r)n[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Th=t}function Ph(){if(Mh)return wh.exports;Mh=1;try{wh.exports=function(){if(vh)return bh;vh=1;const e=zf()(__dirname);if("function"!=typeof e)throw new Error("Native add-on failed to load");return bh=xh()(e)}()}catch(e){wh.exports=kh?Sh:(kh=1,Sh=xh()(Ch()))}return wh.exports}function jh(){if(Ah)return uh;Ah=1,Object.defineProperty(uh,"__esModule",{value:!0});var e=ph(),t=Ph();return uh.keccak224=e.createHashFunction(function(){return t("keccak224")}),uh.keccak256=e.createHashFunction(function(){return t("keccak256")}),uh.keccak384=e.createHashFunction(function(){return t("keccak384")}),uh.keccak512=e.createHashFunction(function(){return t("keccak512")}),uh}function Lh(){return Rh?Oh:(Rh=1,Oh=T.createHash)}function $h(){return Ih||(Ih=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;const t=jh(),n=Lh(),r=_f(),i=sh(),a=ah();e.keccak=function(e,n=256){switch((0,a.assertIsBuffer)(e),n){case 224:return(0,t.keccak224)(e);case 256:return(0,t.keccak256)(e);case 384:return(0,t.keccak384)(e);case 512:return(0,t.keccak512)(e);default:throw new Error(`Invald algorithm: keccak${n}`)}};e.keccak256=function(t){return(0,e.keccak)(t)};e.keccakFromString=function(t,n=256){(0,a.assertIsString)(t);const r=Buffer.from(t,"utf8");return(0,e.keccak)(r,n)};e.keccakFromHexString=function(t,n=256){return(0,a.assertIsHexString)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};e.keccakFromArray=function(t,n=256){return(0,a.assertIsArray)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};const s=function(e){return e=(0,i.toBuffer)(e),n("sha256").update(e).digest()};e.sha256=function(e){return(0,a.assertIsBuffer)(e),s(e)};e.sha256FromString=function(e){return(0,a.assertIsString)(e),s(e)};e.sha256FromArray=function(e){return(0,a.assertIsArray)(e),s(e)};const o=function(e,t){e=(0,i.toBuffer)(e);const r=n("rmd160").update(e).digest();return!0===t?(0,i.setLengthLeft)(r,32):r};e.ripemd160=function(e,t){return(0,a.assertIsBuffer)(e),o(e,t)};e.ripemd160FromString=function(e,t){return(0,a.assertIsString)(e),o(e,t)};e.ripemd160FromArray=function(e,t){return(0,a.assertIsArray)(e),o(e,t)};e.rlphash=function(t){return(0,e.keccak)(r.rlp.encode(t))}}(ch)),ch}var Dh,Uh,zh={};function Bh(){return Dh||(Dh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;const t=_f(),n=eh(),r=sh();function i(e){return(0,r.unpadBuffer)(e.toArrayLike(Buffer))}var a;e.bnToHex=function(e){return`0x${e.toString(16)}`},e.bnToUnpaddedBuffer=i,e.bnToRlp=function(e){return i(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(a=e.TypeOutput||(e.TypeOutput={})),e.toType=function(e,i){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,n.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const s=(0,r.toBuffer)(e);if(i===a.Buffer)return s;if(i===a.BN)return new t.BN(s);if(i===a.Number){const e=new t.BN(s),n=new t.BN(Number.MAX_SAFE_INTEGER.toString());if(e.gt(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return e.toNumber()}return`0x${s.toString("hex")}`}}(zh)),zh}function Fh(){return Uh||(Uh=1,function(e){var t=Lf&&Lf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const n=t(M),r=_f(),i=Zf(),a=eh(),s=Tf(),o=sh(),c=$h(),u=ah(),l=Bh();class p{constructor(e=new r.BN(0),t=new r.BN(0),n=s.KECCAK256_RLP,i=s.KECCAK256_NULL){this.nonce=e,this.balance=t,this.stateRoot=n,this.codeHash=i,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,stateRoot:i,codeHash:a}=e;return new p(t?new r.BN((0,o.toBuffer)(t)):void 0,n?new r.BN((0,o.toBuffer)(n)):void 0,i?(0,o.toBuffer)(i):void 0,a?(0,o.toBuffer)(a):void 0)}static fromRlpSerializedAccount(e){const t=r.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,i,a]=e;return new p(new r.BN(t),new r.BN(n),i,a)}_validate(){if(this.nonce.lt(new r.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new r.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]}serialize(){return r.rlp.encode(this.raw())}isContract(){return!this.codeHash.equals(s.KECCAK256_NULL)}isEmpty(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(s.KECCAK256_NULL)}}e.Account=p;e.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};e.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const n=(0,a.stripHexPrefix)(e).toLowerCase();let r="";if(t){r=(0,l.toType)(t,l.TypeOutput.BN).toString()+"0x"}const i=(0,c.keccakFromString)(r+n).toString("hex");let s="0x";for(let e=0;e<n.length;e++)parseInt(i[e],16)>=8?s+=n[e].toUpperCase():s+=n[e];return s};e.isValidChecksumAddress=function(t,n){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,n)===t};e.generateAddress=function(e,t){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t);const n=new r.BN(t);return n.isZero()?(0,c.rlphash)([e,null]).slice(-20):(0,c.rlphash)([e,Buffer.from(n.toArray())]).slice(-20)};e.generateAddress2=function(e,t,r){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),(0,n.default)(20===e.length),(0,n.default)(32===t.length);return(0,c.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,c.keccak256)(r)])).slice(-20)};e.isValidPrivate=function(e){return(0,i.privateKeyVerify)(e)};e.isValidPublic=function(e,t=!1){return(0,u.assertIsBuffer)(e),64===e.length?(0,i.publicKeyVerify)(Buffer.concat([Buffer.from([4]),e])):!!t&&(0,i.publicKeyVerify)(e)};e.pubToAddress=function(e,t=!1){return(0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),(0,n.default)(64===e.length),(0,c.keccak)(e).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from((0,i.publicKeyCreate)(e,!1)).slice(1)};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),e};e.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bufferToHex)(e)};e.isZeroAddress=function(t){try{(0,u.assertIsString)(t)}catch(e){return!1}return(0,e.zeroAddress)()===t}}(Lf)),Lf}var qh,Hh={};var Yh,Vh={};var Kh,Gh,Wh={};var Jh,Zh,Xh,Qh,em,tm=(Gh||(Gh=1,function(e){var t=pf&&pf.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=pf&&pf.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,n(Tf(),e),n(Fh(),e),n(function(){if(qh)return Hh;qh=1;var e=Hh&&Hh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.Address=void 0;const t=e(M),n=_f(),r=sh(),i=Fh();class a{constructor(e){(0,t.default)(20===e.length,"Invalid address length"),this.buf=e}static zero(){return new a((0,r.zeros)(20))}static fromString(e){return(0,t.default)((0,i.isValidAddress)(e),"Invalid address"),new a((0,r.toBuffer)(e))}static fromPublicKey(e){(0,t.default)(Buffer.isBuffer(e),"Public key should be Buffer");const n=(0,i.pubToAddress)(e);return new a(n)}static fromPrivateKey(e){(0,t.default)(Buffer.isBuffer(e),"Private key should be Buffer");const n=(0,i.privateToAddress)(e);return new a(n)}static generate(e,r){return(0,t.default)(n.BN.isBN(r)),new a((0,i.generateAddress)(e.buf,r.toArrayLike(Buffer)))}static generate2(e,n,r){return(0,t.default)(Buffer.isBuffer(n)),(0,t.default)(Buffer.isBuffer(r)),new a((0,i.generateAddress2)(e.buf,n,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(a.zero())}isPrecompileOrSystemAddress(){const e=new n.BN(this.buf),t=new n.BN(0),r=new n.BN("ffff","hex");return e.gte(t)&&e.lte(r)}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}return Hh.Address=a,Hh}(),e),n($h(),e),n(function(){if(Yh)return Vh;Yh=1,Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.hashPersonalMessage=Vh.isValidSignature=Vh.fromRpcSig=Vh.toCompactSig=Vh.toRpcSig=Vh.ecrecover=Vh.ecsign=void 0;const e=Zf(),t=_f(),n=sh(),r=$h(),i=ah(),a=Bh();function s(e,t){const n=(0,a.toType)(e,a.TypeOutput.BN);if(n.eqn(0)||n.eqn(1))return(0,a.toType)(e,a.TypeOutput.BN);if(!t)return n.subn(27);const r=(0,a.toType)(t,a.TypeOutput.BN);return n.sub(r.muln(2).addn(35))}function o(e){const n=new t.BN(e);return n.eqn(0)||n.eqn(1)}return Vh.ecsign=function(t,n,r){const{signature:i,recid:s}=(0,e.ecdsaSign)(t,n),o=Buffer.from(i.slice(0,32)),c=Buffer.from(i.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:o,s:c,v:r?s+(2*r+35):s+27}}return{r:o,s:c,v:(0,a.toType)(r,a.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(Buffer)}},Vh.ecrecover=function(t,r,i,a,c){const u=Buffer.concat([(0,n.setLengthLeft)(i,32),(0,n.setLengthLeft)(a,32)],64),l=s(r,c);if(!o(l))throw new Error("Invalid signature v value");const p=(0,e.ecdsaRecover)(u,l.toNumber(),t);return Buffer.from((0,e.publicKeyConvert)(p,!1).slice(1))},Vh.toRpcSig=function(e,t,r,i){if(!o(s(e,i)))throw new Error("Invalid signature v value");return(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(r,32),(0,n.toBuffer)(e)]))},Vh.toCompactSig=function(e,t,r,i){if(!o(s(e,i)))throw new Error("Invalid signature v value");const c=(0,a.toType)(e,a.TypeOutput.Number);let u=r;return(c>28&&c%2==1||1===c||28===c)&&(u=Buffer.from(r),u[0]|=128),(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(u,32)]))},Vh.fromRpcSig=function(e){const t=(0,n.toBuffer)(e);let r,i,a;if(t.length>=65)r=t.slice(0,32),i=t.slice(32,64),a=(0,n.bufferToInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),i=t.slice(32,64),a=(0,n.bufferToInt)(t.slice(32,33))>>7,i[0]&=127}return a<27&&(a+=27),{v:a,r:r,s:i}},Vh.isValidSignature=function(e,n,r,i=!0,a){const c=new t.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new t.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==n.length||32!==r.length)return!1;if(!o(s(e,a)))return!1;const l=new t.BN(n),p=new t.BN(r);return!(l.isZero()||l.gt(u)||p.isZero()||p.gt(u)||i&&1===p.cmp(c))},Vh.hashPersonalMessage=function(e){(0,i.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return(0,r.keccak)(Buffer.concat([t,e]))},Vh}(),e),n(sh(),e),n(function(){if(Kh)return Wh;Kh=1;var e=Wh&&Wh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.defineProperties=void 0;const t=e(M),n=eh(),r=_f(),i=sh();return Wh.defineProperties=function(e,a,s){if(e.raw=[],e._fields=[],e.toJSON=function(t=!1){if(t){const t={};return e._fields.forEach(n=>{t[n]=`0x${e[n].toString("hex")}`}),t}return(0,i.baToJSON)(e.raw)},e.serialize=function(){return r.rlp.encode(e.raw)},a.forEach((n,r)=>{function a(){return e.raw[r]}function s(a){"00"!==(a=(0,i.toBuffer)(a)).toString("hex")||n.allowZero||(a=Buffer.allocUnsafe(0)),n.allowLess&&n.length?(a=(0,i.unpadBuffer)(a),(0,t.default)(n.length>=a.length,`The field ${n.name} must not have more ${n.length} bytes`)):n.allowZero&&0===a.length||!n.length||(0,t.default)(n.length===a.length,`The field ${n.name} must have byte length of ${n.length}`),e.raw[r]=a}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:a,set:s}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:s,get:a})}),s)if("string"==typeof s&&(s=Buffer.from((0,n.stripHexPrefix)(s),"hex")),Buffer.isBuffer(s)&&(s=r.rlp.decode(s)),Array.isArray(s)){if(s.length>e._fields.length)throw new Error("wrong number of fields in data");s.forEach((t,n)=>{e[e._fields[n]]=(0,i.toBuffer)(t)})}else{if("object"!=typeof s)throw new Error("invalid data");{const t=Object.keys(s);a.forEach(n=>{-1!==t.indexOf(n.name)&&(e[n.name]=s[n.name]),-1!==t.indexOf(n.alias)&&(e[n.alias]=s[n.alias])})}}},Wh}(),e),n(_f(),e),n(Bh(),e);var r=eh();Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return r.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return r.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return r.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return r.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return r.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return r.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return r.isHexString}})}(pf)),pf);class nm{static hash(e){const t=Buffer.from(e,"utf8");return tm.keccak256(t)}static hashRandomBits(e){if(!this.isValidSHA256(e.blockHash.replace("0x",""))||e.taskRequesterTimestamp<=0||e.dispatcherTimestamp<=0)throw`Invalid inputs for hashRandomBits:\n blockHash: ${e.blockHash},\n taskRequesterTimestamp: ${e.taskRequesterTimestamp},\n dispatcherTimestamp: ${e.dispatcherTimestamp}\n `;const t=e.taskRequesterTimestamp.toString()+e.dispatcherTimestamp.toString()+e.blockHash,n=Buffer.from(t,"utf8");return tm.keccak256(n)}static hashMessage(e={}){let t=JSON.parse(JSON.stringify(e));t.payload&&(t=t.payload),delete t.type,delete t.msgHash,delete t.signature;const n=Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}),r=Buffer.from(JSON.stringify(n),"utf-8");return tm.keccak256(r)}static computeFileSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static computeStringSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static isValidSHA256(e){return/^[a-f0-9]{64}$/gi.test(e)}}class rm{static sign(e,t){const n=tm.toBuffer("0x"+t);if(!tm.isValidPrivate(n))throw"Invalid private key when trying to sign msg";return tm.ecsign(e,n)}static getAddressFromPrivateKey(e){const t=tm.toBuffer("0x"+e);if(!tm.isValidPrivate(t))throw"Invalid private key when trying to get the address";const n=tm.privateToPublic(t);return"0x"+tm.pubToAddress(n).toString("hex")}static verifySignature(e,t,n){const r=tm.ecrecover(e,t.v,t.r,t.s);return"0x"+tm.pubToAddress(r).toString("hex").toLowerCase()===n.toLowerCase()}static serializeSignature(e){return JSON.stringify({v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")})}static deserializeSignature(e){const t=JSON.parse(e);return{v:t.v,r:Buffer.from(t.r,"hex"),s:Buffer.from(t.s,"hex")}}static ECDSASignatureToHex(e){return{v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")}}static SignatureHexToECDSA(e){return{v:e.v,r:Buffer.from(e.r,"hex"),s:Buffer.from(e.s,"hex")}}static isValidSignature(e){const t=rm.SignatureHexToECDSA(e);return tm.isValidSignature(t.v,t.r,t.s)}static generateAddress(){const e=function(){let e=uf(32);for(;!cf(e);)e=uf(32);return e}(),t=tm.privateToPublic(e),n=function(e){return of(32===e.length,"Bad private key"),of(cf(e),"Bad private key"),Buffer.from(nf.keyFromPrivate(e).getPublic("array"))}(e),r=tm.pubToAddress(t),i=tm.bufferToHex(e).replace("0x",""),a=tm.bufferToHex(n).replace("0x","");return{addressHex:tm.bufferToHex(r),privateKeyHex:i,publicKeyHex:a}}static createSignedBody(e,t,n){!e.walletAddress&&n&&(e.walletAddress=n);const r=nm.hashMessage(e);let i;i="0"===t[0]&&"x"===t[1]?t.slice(2):t;const a=rm.sign(r,i);return e.signature=rm.ECDSASignatureToHex(a),e}}!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(Jh||(Jh={}));class im{constructor(){}}class am extends im{async build(e,n){const r=i.join(process.cwd(),e,"main.js");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/main.js`))}}class sm extends im{async build(e,n){const r=i.join(process.cwd(),e,"task.py");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/task.py`))}}class om extends im{async build(e,n){const r=i.join(process.cwd(),e),a=i.join(r,"task.wasm");if(t.existsSync(a)&&t.rmSync(a),await new Promise((e,t)=>{I(`cd ${r} && sh compile.sh`,(n,r,i)=>{n&&t(i),e(r)})}),!t.existsSync(a))throw`File doesn't exist: ${a}`;t.copyFileSync(a,i.join(process.cwd(),`${n}/task.wasm`))}}class cm extends im{async build(e,n){await new Promise((t,n)=>{I("rustc --version",(r,a,s)=>{r&&n(`Rust ${s.split("error: ")[1]}`);const o=a.split(" ")[1];"1.81.0"!==o?n(`Rust version detected is: ${o}. Version must be 1.81`):I(`cargo build --manifest-path ${i.join(process.cwd(),e,"Cargo.toml")} --target wasm32-wasip1`,(e,r,i)=>{e&&n(`Cargo ${i.split("error: ")[1]}`),t(r)})})});const r=e.split("/"),a=r[r.length-1]||r[r.length-2];if(!t.existsSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`)))throw`File doesn't exist: ${i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`)}. Please check that your Cargo.toml file has the same name of the directory of the task. `;t.copyFileSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`),i.join(process.cwd(),`${n}/task.wasm`))}}class um extends im{async build(e,n){const r=i.join(process.cwd(),e);if(!t.existsSync(r))throw`File doesn't exist: ${r}`;try{const e=t.readFileSync(r,"utf-8"),[n,i,a]=await N(JSON.parse(e),{fullResult:!0});if(void 0!==i)throw console.error(i),new Error(i);void 0!==a&&console.warn(a),void 0!==n&&console.log("OpenAPI manifest is valid!")}catch{throw"Error validating OpenAPI manifest"}t.copyFileSync(r,i.join(process.cwd(),`${n}/manifest.json`))}}class lm{static createBuild(e){switch(e){case so.RUST:return new cm;case so.C:return new om;case so.JS:return new am;case oo.API:return new um;case so.PYTHON:return new sm;default:throw"Invalid language"}}}function pm(){if(em)return Qh;em=1;var e=s,t=p.Stream,n=function(){if(Xh)return Zh;Xh=1;var e=p.Stream;function t(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}return Zh=t,s.inherits(t,e),t.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n},Object.defineProperty(t.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),t.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},t.prototype.resume=function(){this._released||this.release(),this.source.resume()},t.prototype.pause=function(){this.source.pause()},t.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},t.prototype.pipe=function(){var t=e.prototype.pipe.apply(this,arguments);return this.resume(),t},t.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},t.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},Zh}();function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}return Qh=r,e.inherits(r,t),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof n)){var t=n.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,n){return t.prototype.pipe.call(this,e,n),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",function(e){t._emitError(e)})},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)},Qh}var dm,fm,hm,mm,ym,gm,bm,vm,wm,xm,_m,Tm,Em,Sm,km,Mm,Am,Om={},Rm={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};function Im(){return hm||(hm=1,function(e){var t=fm?dm:(fm=1,dm=Rm),n=a.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function s(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),a=n&&t[n[1].toLowerCase()];return a&&a.charset?a.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=s,e.charsets={lookup:s},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach(function(i){var a=t[i],s=a.extensions;if(s&&s.length){e[i]=s;for(var o=0;o<s.length;o++){var c=s[o];if(n[c]){var u=r.indexOf(t[n[c]].source),l=r.indexOf(a.source);if("application/octet-stream"!==n[c]&&(u>l||u===l&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}})}(e.extensions,e.types)}(Om)),Om}function Nm(){if(bm)return gm;bm=1;var e=ym?mm:(ym=1,mm=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)});return gm=function(t){var n=!1;return e(function(){n=!0}),function(r,i){n?t(r,i):e(function(){t(r,i)})}}}function Cm(){if(wm)return vm;function e(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}return wm=1,vm=function(t){Object.keys(t.jobs).forEach(e.bind(t)),t.jobs={}},vm}function Pm(){if(_m)return xm;_m=1;var e=Nm(),t=Cm();return xm=function(n,r,i,a){var s=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[s]=function(t,n,r,i){var a;a=2==t.length?t(r,e(i)):t(r,n,e(i));return a}(r,s,n[s],function(e,n){s in i.jobs&&(delete i.jobs[s],e?t(i):i.results[s]=n,a(e,i.results))})},xm}function jm(){if(Em)return Tm;return Em=1,Tm=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r}}function Lm(){if(km)return Sm;km=1;var e=Cm(),t=Nm();return Sm=function(n){if(!Object.keys(this.jobs).length)return;this.index=this.size,e(this),t(n)(null,this.results)}}function $m(){if(Am)return Mm;Am=1;var e=Pm(),t=jm(),n=Lm();return Mm=function(r,i,a){var s=t(r);for(;s.index<(s.keyedList||r).length;)e(r,i,s,function(e,t){e?a(e,t):0!==Object.keys(s.jobs).length||a(null,s.results)}),s.index++;return n.bind(s,a)},Mm}var Dm,Um,zm,Bm,Fm,qm,Hm,Ym,Vm,Km,Gm,Wm,Jm,Zm,Xm,Qm,ey,ty,ny,ry,iy,ay,sy,oy,cy,uy,ly,py,dy,fy,hy,my,yy,gy,by,vy,wy,xy,_y,Ty,Ey,Sy,ky,My,Ay,Oy,Ry,Iy,Ny,Cy,Py,jy,Ly,$y,Dy,Uy,zy,By,Fy,qy,Hy,Yy,Vy,Ky,Gy,Wy,Jy,Zy,Xy,Qy,eg,tg,ng,rg,ig,ag,sg,og,cg,ug,lg,pg={exports:{}};function dg(){if(Dm)return pg.exports;Dm=1;var e=Pm(),t=jm(),n=Lm();function r(e,t){return e<t?-1:e>t?1:0}return pg.exports=function(r,i,a,s){var o=t(r,a);return e(r,i,o,function t(n,a){n?s(n,a):(o.index++,o.index<(o.keyedList||r).length?e(r,i,o,t):s(null,o.results))}),n.bind(o,s)},pg.exports.ascending=r,pg.exports.descending=function(e,t){return-1*r(e,t)},pg.exports}function fg(){if(zm)return Um;zm=1;var e=dg();return Um=function(t,n,r){return e(t,n,null,r)},Um}function hg(){return Fm?Bm:(Fm=1,Bm={parallel:$m(),serial:fg(),serialOrdered:dg()})}function mg(){return Hm?qm:(Hm=1,qm=Object)}function yg(){return Vm?Ym:(Vm=1,Ym=Error)}function gg(){return Gm?Km:(Gm=1,Km=EvalError)}function bg(){return Jm?Wm:(Jm=1,Wm=RangeError)}function vg(){return Xm?Zm:(Xm=1,Zm=ReferenceError)}function wg(){return ey?Qm:(ey=1,Qm=SyntaxError)}function xg(){return ny?ty:(ny=1,ty=TypeError)}function _g(){return iy?ry:(iy=1,ry=URIError)}function Tg(){return sy?ay:(sy=1,ay=Math.abs)}function Eg(){return cy?oy:(cy=1,oy=Math.floor)}function Sg(){return ly?uy:(ly=1,uy=Math.max)}function kg(){return dy?py:(dy=1,py=Math.min)}function Mg(){return hy?fy:(hy=1,fy=Math.pow)}function Ag(){return yy?my:(yy=1,my=Math.round)}function Og(){return by?gy:(by=1,gy=Number.isNaN||function(e){return e!=e})}function Rg(){if(wy)return vy;wy=1;var e=Og();return vy=function(t){return e(t)||0===t?t:t<0?-1:1}}function Ig(){return _y?xy:(_y=1,xy=Object.getOwnPropertyDescriptor)}function Ng(){if(Ey)return Ty;Ey=1;var e=Ig();if(e)try{e([],"length")}catch(t){e=null}return Ty=e}function Cg(){if(ky)return Sy;ky=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return Sy=e}function Pg(){return Ay?My:(Ay=1,My=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=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(n))return!1;for(var r 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 i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0})}function jg(){if(Ry)return Oy;Ry=1;var e="undefined"!=typeof Symbol&&Symbol,t=Pg();return Oy=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function Lg(){return Ny?Iy:(Ny=1,Iy="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function $g(){return Py?Cy:(Py=1,Cy=mg().getPrototypeOf||null)}function Dg(){if(Ly)return jy;Ly=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return jy=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var a,s=function(e,t){for(var n=[],r=t,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),o=t(0,i.length-s.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(a=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(r,n(s,arguments))}),i.prototype){var l=function(){};l.prototype=i.prototype,a.prototype=new l,l.prototype=null}return a},jy}function Ug(){if(Dy)return $y;Dy=1;var e=Dg();return $y=Function.prototype.bind||e}function zg(){return zy?Uy:(zy=1,Uy=Function.prototype.call)}function Bg(){return Fy?By:(Fy=1,By=Function.prototype.apply)}function Fg(){if(Vy)return Yy;Vy=1;var e=Ug(),t=Bg(),n=zg(),r=Hy?qy:(Hy=1,qy="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Yy=r||e.call(n,t)}function qg(){if(Jy)return Wy;Jy=1;var e,t=function(){if(Gy)return Ky;Gy=1;var e=Ug(),t=xg(),n=zg(),r=Fg();return Ky=function(i){if(i.length<1||"function"!=typeof i[0])throw new t("a function is required");return r(e,n,i)}}(),n=Ng();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!e&&n&&n(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Wy=r&&"function"==typeof r.get?t([r.get]):"function"==typeof a&&function(e){return a(null==e?e:i(e))}}function Hg(){if(Xy)return Zy;Xy=1;var e=Lg(),t=$g(),n=qg();return Zy=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function Yg(){if(eg)return Qy;eg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ug();return Qy=n.call(e,t)}function Vg(){if(ng)return tg;var e;ng=1;var t=mg(),n=yg(),r=gg(),i=bg(),a=vg(),s=wg(),o=xg(),c=_g(),u=Tg(),l=Eg(),p=Sg(),d=kg(),f=Mg(),h=Ag(),m=Rg(),y=Function,g=function(e){try{return y('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=Ng(),v=Cg(),w=function(){throw new o},x=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,_=jg()(),T=Hg(),E=$g(),S=Lg(),k=Bg(),M=zg(),A={},O="undefined"!=typeof Uint8Array&&T?T(Uint8Array):e,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&T?T((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&T?T((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":x,"%TypedArray%":O,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":k,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":E,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":S};if(T)try{null.error}catch(e){var I=T(T(e));R["%Error.prototype%"]=I}var N=function e(t){var n;if("%AsyncFunction%"===t)n=g("async function () {}");else if("%GeneratorFunction%"===t)n=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=g("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&T&&(n=T(i.prototype))}return R[t]=n,n},C={__proto__:null,"%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"]},P=Ug(),j=Yg(),L=P.call(M,Array.prototype.concat),$=P.call(k,Array.prototype.splice),D=P.call(M,String.prototype.replace),U=P.call(M,String.prototype.slice),z=P.call(M,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,q=function(e,t){var n,r=e;if(j(C,r)&&(r="%"+(n=C[r])[0]+"%"),j(R,r)){var i=R[r];if(i===A&&(i=N(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new s("intrinsic "+e+" does not exist!")};return tg=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=U(e,0,1),n=U(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return D(e,B,function(e,t,n,i){r[r.length]=n?D(i,F,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",i=q("%"+r+"%",t),a=i.name,c=i.value,u=!1,l=i.alias;l&&(r=l[0],$(n,L([0,1],l)));for(var p=1,d=!0;p<n.length;p+=1){var f=n[p],h=U(f,0,1),m=U(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&d||(u=!0),j(R,a="%"+(r+="."+f)+"%"))c=R[a];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&p+1>=n.length){var y=b(c,f);c=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[f]}else d=j(c,f),c=c[f];d&&!u&&(R[a]=c)}}return c},tg}function Kg(){if(sg)return ag;sg=1;var e=Vg()("%Object.defineProperty%",!0),t=function(){if(ig)return rg;ig=1;var e=Pg();return rg=function(){return e()&&!!Symbol.toStringTag}}()(),n=Yg(),r=xg(),i=t?Symbol.toStringTag:null;return ag=function(t,a){var s=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==s&&"boolean"!=typeof s||void 0!==o&&"boolean"!=typeof o)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!i||!s&&n(t,i)||(e?e(t,i,{configurable:!o,enumerable:!1,value:a,writable:!1}):t[i]=a)},ag}function Gg(){return cg||(cg=1,og=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}),og}var Wg=function(){if(lg)return ug;lg=1;var e=pm(),t=s,r=a,i=b,o=w,c=C.parse,u=n,l=p.Stream,d=T,f=Im(),h=hg(),m=Kg(),y=Yg(),g=Gg();function v(t){if(!(this instanceof v))return new v(t);for(var n in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e.call(this),t=t||{})this[n]=t[n]}return t.inherits(v,e),v.LINE_BREAK="\r\n",v.DEFAULT_CONTENT_TYPE="application/octet-stream",v.prototype.append=function(t,n,r){"string"==typeof(r=r||{})&&(r={filename:r});var i=e.prototype.append.bind(this);if("number"!=typeof n&&null!=n||(n=String(n)),Array.isArray(n))this._error(new Error("Arrays are not supported."));else{var a=this._multiPartHeader(t,n,r),s=this._multiPartFooter();i(a),i(n),i(s),this._trackLength(a,n,r)}},v.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=Number(n.knownLength):Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+v.LINE_BREAK.length,t&&(t.path||t.readable&&y(t,"httpVersion")||t instanceof l)&&(n.knownLength||this._valuesToMeasure.push(t))},v.prototype._lengthRetriever=function(e,t){y(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):u.stat(e.path,function(n,r){if(n)t(n);else{var i=r.size-(e.start?e.start:0);t(null,i)}}):y(e,"httpVersion")?t(null,Number(e.headers["content-length"])):y(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")},v.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),a=this._getContentType(t,n),s="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(a||[])};for(var c in"object"==typeof n.header&&g(o,n.header),o)if(y(o,c)){if(null==(r=o[c]))continue;Array.isArray(r)||(r=[r]),r.length&&(s+=c+": "+r.join("; ")+v.LINE_BREAK)}return"--"+this.getBoundary()+v.LINE_BREAK+s+v.LINE_BREAK},v.prototype._getContentDisposition=function(e,t){var n;if("string"==typeof t.filepath?n=r.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=r.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&y(e,"httpVersion")&&(n=r.basename(e.client._httpMessage.path||"")),n)return'filename="'+n+'"'},v.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=f.lookup(e.name)),!n&&e&&e.path&&(n=f.lookup(e.path)),!n&&e&&e.readable&&y(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=f.lookup(t.filepath||t.filename)),!n&&e&&"object"==typeof e&&(n=v.DEFAULT_CONTENT_TYPE),n},v.prototype._multiPartFooter=function(){return function(e){var t=v.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},v.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+v.LINE_BREAK},v.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)y(e,t)&&(n[t.toLowerCase()]=e[t]);return n},v.prototype.setBoundary=function(e){if("string"!=typeof e)throw new TypeError("FormData boundary must be a string");this._boundary=e},v.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},v.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(v.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},v.prototype._generateBoundary=function(){this._boundary="--------------------------"+d.randomBytes(12).toString("hex")},v.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},v.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},v.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?h.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){n?e(n):(r.forEach(function(e){t+=e}),e(null,t))}):process.nextTick(e.bind(this,null,t))},v.prototype.submit=function(e,t){var n,r,a={method:"post"};return"string"==typeof e?(e=c(e),r=g({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},a)):(r=g(e,a)).port||(r.port="https:"===r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"===r.protocol?o.request(r):i.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener("error",a),n.removeListener("response",i),t.call(this,e,r)};i=a.bind(this,null),n.on("error",a),n.on("response",i)}}.bind(this)),n},v.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},v.prototype.toString=function(){return"[object FormData]"},m(v,"FormData"),ug=v}(),Jg=xe(Wg);const Zg={httpAdapterURL:"https://worker01-prod.truebit.network/http-adapter/",hubURL:"https://run.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"production",eula:"",RPC_URL:""},Xg={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"local",eula:"",RPC_URL:""},Qg={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"testnet",eula:"",RPC_URL:""},eb={httpAdapterURL:"https://worker01-staging.truebit.network/http-adapter/",hubURL:"https://staging.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"staging",eula:"",RPC_URL:""};function tb(){let e=Zg;return"local"===process.env.TRUEBIT_ENV?e=Xg:"staging"===process.env.TRUEBIT_ENV?e=eb:"testnet"===process.env.TRUEBIT_ENV&&(e=Qg),e}function nb(){const e=ib(),n=i.join(e,".truebit","secret.json");if(!t.existsSync(n))return null;const r=t.readFileSync(n,{encoding:"utf8"});try{return JSON.parse(r)}catch(e){return console.error("Error parsing secret config file:",e),null}}function rb(e){const n=ib(),r=i.join(n,".truebit","secret.json");if(!t.existsSync(r))return;const a=t.readFileSync(r,{encoding:"utf8"});try{const n={...JSON.parse(a),...e};t.writeFileSync(r,JSON.stringify(n,null,2),{encoding:"utf8"})}catch(e){console.error("Error updating secret config file:",e)}}function ib(){return process.env.TRUEBIT_PATH||(process.env.TRUEBIT_PATH=u.homedir()),process.env.TRUEBIT_PATH}function ab(e){const t=nb();return t&&e in t?t[e]:void 0}function sb(){const e=nb();if(!e)return void console.error("Secret config file does not exist.");let t=!1;const n=["privateKey","address"];for(const r of n)r in e||(e[r]="",t=!0);const r=["httpAdapterURL","hubURL","defaultLanguage","blockchainEnv"];for(const n of r)n in e&&""!==e[n]||(e[n]=tb()[n],t=!0);t&&(rb(e),console.log("Configuration has been updated with default values for missing properties."))}class ob{static EULA_TERMS_LINK="https://truebit.io/terms/";static SETUP_INTRODUCTION=`\nYour all-in-one solution to develop, build, test, and deploy tasks seamlessly.\nLet's get started by setting up your account and configuring your wallet.\nWe'll guide you through each step to ensure a smooth experience.\n\n${P.bold("**Important: Private Key Information")}\n\nTruebit Verify employs a private key system to secure your account:\n\n - A unique private key will be automatically generated for you.\n - This key serves as your secure identifier within Truebit Verify.\n - It's used internally to authenticate your actions.\n - You won't need to manage this key directly.\n\nWe are committed to ensuring the security of your private key and safeguarding your account.\nReady to begin?`;static SETUP_INTRODUCTION_NO_ACCEPTANCE=`\n${P.bold("Account Setup Required")}\n\nYou need an account to access platform features.\n\n${P.bold("To get started:")}\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\n${P.bold("Need assistance?")}\nUse the 'truebit -h' command for more information.`;static SETUP_STEP1=`\n${P.bold("Step 1: Create an Account")}\n\nIt appears you're a new user without a wallet configured locally.\n\nWould you like to create a new wallet now?`;static SETUP_STEP1_SCENARIO1_P1=`\nYour configuration file has been detected and will not be overwritten.\nTo make any modifications, edit the file located at: ${ib()}/.truebit/secret.json\n\nEnsure this file is kept secure, as it contains your credentials for using Truebit Verify.`;static SETUP_STEP1_SCENARIO1_P2(e){return`\nYour account setup appears to be complete.\n\nAccount Details:\n\n - Name: ${e.name}\n - Email: ${e.email}\n - Company: ${e.company}\n - Job Description: ${e.jobDescription}\n - Wallet Address: ${e.walletAddress}\n - Namespace: ${e.defaultNamespace} // API Key: ${e.defaultApiKey}\n\nRun 'truebit -h' to explore available commands and start your journey.`}static SETUP_STEP1_SCENARIO2(e){return`\nYour new wallet address is: ${e}\n\nYour wallet information has been securely stored in ${ib()}/.truebit/secret.json\nPlease keep this file safe, as it contains your credentials for using Truebit Verify.`}static SETUP_STEP1_SCENARIO3=`\n${P.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to create a new wallet at this time.\n\n - A wallet is required for full access to Truebit Verify features.\n - Without a wallet, your functionality on the platform will be limited.\n - You can create a wallet at any time by running the truebit setup command again.\n\nRun 'truebit setup' to get started.`;static SETUP_STEP2_SCENARIO3_P1=`\n${P.bold("Step 2: Create an Account")}\n\nYour wallet is now set up. Let's proceed with creating your Truebit Verify account.\n\nPlease provide the following information:`;static SETUP_STEP2_SCENARIO3_P2(e,t,n,r){return`\n${P.bold("Account Registration Complete")}\n\nThanks for registering with Truebit Verify!\n\nCongratulations! Your Truebit Verify account has been successfully created.\n\nAccount Summary:\n\n ${P.bold("- Name: ")+e.fullNameAnswer}\n ${P.bold("- Email: ")+e.emailAddressAnswer}\n ${P.bold("- Company: ")+e.companyNameAnswer}\n ${P.bold("- Job Description: ")+e.jobPositionAnswer}\n ${P.bold("- Wallet Address: ")+t}\n ${P.bold("- Namespace: ")+n} // ${P.bold("API Key: ")+r}\n\nRun 'truebit -h' to begin your journey.`}static SETUP_STEP2_UNHANDLED_ERROR=P.bold("\nSomething went wrong with the user registration:\n \nAccount registration interrupted.\n\nPlease run 'truebit setup' again.");static EULA_INSTALLATION=`\nWelcome to Truebit Verify!\n\nBefore completing your Truebit Verify installation, you must review the Terms of Use at: ${ob.EULA_TERMS_LINK}`;static EULA_INSTALLATION_NO_ACCEPTED="Installation cancelled because you have not accepted the Terms of Use.";static EULA_REGISTRATION_NO_ACCEPTED=`\n${P.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to accept the End User License Agreement (EULA) at this time.\n\n - Accepting the EULA is required for full access to Truebit Verify features.\n\nRun 'truebit setup' to get started`;static USER_NO_REGISTERED="You need to set up your Truebit Verify account to access platform features.\n\nTo get started:\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\nNeed assistance?\nUse the 'truebit -h' command for additional information."}async function cb(){const e=ab("hubURL");if(e)return k.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw ob.USER_NO_REGISTERED}async function ub(){const e=ab("httpAdapterURL");if(e)return k.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw ob.USER_NO_REGISTERED}var lb,pb={},db={};function fb(){return lb||(lb=1,db.toString=function(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e},db.toType=function(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}),db}var hb,mb={};function yb(){return hb||(hb=1,mb.toString=function(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e},mb.toRcode=function(e){switch(e.toUpperCase()){case"NOERROR":return 0;case"FORMERR":return 1;case"SERVFAIL":return 2;case"NXDOMAIN":return 3;case"NOTIMP":return 4;case"REFUSED":return 5;case"YXDOMAIN":return 6;case"YXRRSET":return 7;case"NXRRSET":return 8;case"NOTAUTH":return 9;case"NOTZONE":return 10;case"RCODE_11":return 11;case"RCODE_12":return 12;case"RCODE_13":return 13;case"RCODE_14":return 14;case"RCODE_15":return 15}return 0}),mb}var gb,bb={};function vb(){return gb||(gb=1,bb.toString=function(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e},bb.toOpcode=function(e){switch(e.toUpperCase()){case"QUERY":return 0;case"IQUERY":return 1;case"STATUS":return 2;case"OPCODE_3":return 3;case"NOTIFY":return 4;case"UPDATE":return 5;case"OPCODE_6":return 6;case"OPCODE_7":return 7;case"OPCODE_8":return 8;case"OPCODE_9":return 9;case"OPCODE_10":return 10;case"OPCODE_11":return 11;case"OPCODE_12":return 12;case"OPCODE_13":return 13;case"OPCODE_14":return 14;case"OPCODE_15":return 15}return 0}),bb}var wb,xb={};function _b(){return wb||(wb=1,xb.toString=function(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e},xb.toClass=function(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}),xb}var Tb,Eb={};function Sb(){return Tb||(Tb=1,Eb.toString=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:`OPTION_${e}`},Eb.toCode=function(e){if("number"==typeof e)return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}const t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}),Eb}var kb,Mb,Ab,Ob,Rb={exports:{}};function Ib(){return Mb||(Mb=1,function(e){const t=d.Buffer,n=fb(),r=yb(),i=vb(),a=_b(),s=Sb(),o=(kb||(kb=1,function(e){var t=function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decode=function(e,t,n){if(t=~~t,(n=n||e.length-t)===r.size)return r.decode(e,t,n);if(n===i.size)return i.decode(e,t,n);throw Error(`Invalid buffer size needs to be ${r.size} for v4 or ${i.size} for v6.`)},e.encode=function(e,t,n){n=~~n;const s=a(e);return"function"==typeof t&&(t=t(n+s)),s===r.size?r.encode(e,t,n):i.encode(e,t,n)},e.familyOf=function(e){return a(e)===r.size?1:2},e.name=void 0,e.sizeOf=a,e.v6=e.v4=void 0;const t=/^(\d{1,3}\.){3,3}\d{1,3}$/,n=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,r={name:"v4",size:4,isFormat:e=>t.test(e),encode(e,t,n){n=~~n,t=t||new Uint8Array(n+4);const r=e.length;let i=0;for(let a=0;a<r;){const r=e.charCodeAt(a++);46===r?(t[n++]=i,i=0):i=10*i+(r-48)}return t[n]=i,t},decode:(e,t)=>(t=~~t,`${e[t++]}.${e[t++]}.${e[t++]}.${e[t]}`)};e.v4=r;const i={name:"v6",size:16,isFormat:e=>e.length>0&&n.test(e),encode(e,t,n){let r=16+(n=~~n),i=-1,a=0,s=0,o=!0,c=!1;t=t||new Uint8Array(n+16);for(let u=0;u<e.length;u++){let l=e.charCodeAt(u);58===l?(o?-1!==i?(n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2):n<r&&(i=n):(!0===c?(n<r&&(t[n]=s),n++):(n<r&&(t[n]=a>>8),n<r-1&&(t[n+1]=255&a),n+=2),a=0,s=0),o=!0,c=!1):46===l?(n<r&&(t[n]=s),n++,s=0,a=0,o=!1,c=!0):(o=!1,l>=97?l-=87:l>=65?l-=55:(l-=48,s=10*s+l),a=(a<<4)+l)}if(!1===o)!0===c?(n<r&&(t[n]=s),n++):(n<r&&(t[n]=a>>8),n<r-1&&(t[n+1]=255&a),n+=2);else if(0===i)n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2;else if(-1!==i){n+=2;for(let e=Math.min(n-1,r-1);e>=i+2;e--)t[e]=t[e-2];t[i]=0,t[i+1]=0,i=n}if(i!==n&&-1!==i)for(n>r-2&&(n=r-2);r>i;)t[--r]=n<r&&n>i?t[--n]:0;else for(;n<r;)t[n++]=0;return t},decode(e,t){t=~~t;let n="";for(let r=0;r<16;r+=2)0!==r&&(n+=":"),n+=(e[t+r]<<8|e[t+r+1]).toString(16);return n.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};function a(e){if(r.isFormat(e))return r.size;if(i.isFormat(e))return i.size;throw Error(`Invalid ip address: ${e}`)}return e.v6=i,e.name="ip","default"in e?e.default:e}({});e.exports=t}(Rb)),Rb.exports),c=32768,u=e.name={};u.encode=function(e,n,r,{mail:i=!1}={}){n||(n=t.alloc(u.encodingLength(e))),r||(r=0);const a=r,s=e.replace(/^\.|\.$/gm,"");if(s.length){let e=[];if(i){let t="";s.split(".").forEach(n=>{n.endsWith("\\")?t+=(t.length?".":"")+n.slice(0,-1):0===e.length&&t.length?e.push(t+"."+n):e.push(n)})}else e=s.split(".");for(let t=0;t<e.length;t++){const i=n.write(e[t],r+1);n[r]=i,r+=i+1}}return n[r++]=0,u.encode.bytes=r-a,n},u.encode.bytes=0,u.decode=function(e,t,{mail:n=!1}={}){t||(t=0);const r=[];let i=t,a=0,s=0,o=!1;for(;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");const c=e[t++];if(s+=o?0:1,0===c)break;if(192&c){if(192&~c)throw new Error("Cannot decode name (bad label)");{if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");const n=e.readUInt16BE(t-1)-49152;if(n>=i)throw new Error("Cannot decode name (bad pointer)");t=n,i=n,s+=o?0:1,o=!0}}else{if(t+c>e.length)throw new Error("Cannot decode name (buffer overflow)");if(a+=c+1,a>254)throw new Error("Cannot decode name (name too long)");let i=e.toString("utf-8",t,t+c);n&&(i=i.replace(/\./g,"\\.")),r.push(i),t+=c,s+=o?0:c}}return u.decode.bytes=s,0===r.length?".":r.join(".")},u.decode.bytes=0,u.encodingLength=function(e){return"."===e||".."===e?1:t.byteLength(e.replace(/^\.|\.$/gm,""))+2};const l={encode:function(e,n,r){n||(n=t.alloc(l.encodingLength(e))),r||(r=0);const i=n.write(e,r+1);return n[r]=i,l.encode.bytes=i+1,n}};l.encode.bytes=0,l.decode=function(e,t){t||(t=0);const n=e[t],r=e.toString("utf-8",t+1,t+1+n);return l.decode.bytes=n+1,r},l.decode.bytes=0,l.encodingLength=function(e){return t.byteLength(e)+1};const p={encode:function(e,t,n){t||(t=p.encodingLength(e)),n||(n=0);const r=32767&(e.flags||0),i="response"===e.type?32768:0;return t.writeUInt16BE(e.id||0,n),t.writeUInt16BE(r|i,n+2),t.writeUInt16BE(e.questions.length,n+4),t.writeUInt16BE(e.answers.length,n+6),t.writeUInt16BE(e.authorities.length,n+8),t.writeUInt16BE(e.additionals.length,n+10),t}};p.encode.bytes=12,p.decode=function(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");const n=e.readUInt16BE(t+2);return{id:e.readUInt16BE(t),type:32768&n?"response":"query",flags:32767&n,flag_qr:1==(n>>15&1),opcode:i.toString(n>>11&15),flag_aa:1==(n>>10&1),flag_tc:1==(n>>9&1),flag_rd:1==(n>>8&1),flag_ra:1==(n>>7&1),flag_z:1==(n>>6&1),flag_ad:1==(n>>5&1),flag_cd:1==(n>>4&1),rcode:r.toString(15&n),questions:new Array(e.readUInt16BE(t+4)),answers:new Array(e.readUInt16BE(t+6)),authorities:new Array(e.readUInt16BE(t+8)),additionals:new Array(e.readUInt16BE(t+10))}},p.decode.bytes=12,p.encodingLength=function(){return 12};const f=e.unknown={};f.encode=function(e,n,r){return n||(n=t.alloc(f.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.length,r),e.copy(n,r+2),f.encode.bytes=e.length+2,n},f.encode.bytes=0,f.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=e.slice(t+2,t+2+n);return f.decode.bytes=n+2,r},f.decode.bytes=0,f.encodingLength=function(e){return e.length+2};const h=e.ns={};h.encode=function(e,n,r){return n||(n=t.alloc(h.encodingLength(e))),r||(r=0),u.encode(e,n,r+2),n.writeUInt16BE(u.encode.bytes,r),h.encode.bytes=u.encode.bytes+2,n},h.encode.bytes=0,h.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=u.decode(e,t+2);return h.decode.bytes=n+2,r},h.decode.bytes=0,h.encodingLength=function(e){return u.encodingLength(e)+2};const m=e.soa={};m.encode=function(e,n,r){n||(n=t.alloc(m.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.mname,n,r),r+=u.encode.bytes,u.encode(e.rname,n,r,{mail:!0}),r+=u.encode.bytes,n.writeUInt32BE(e.serial||0,r),r+=4,n.writeUInt32BE(e.refresh||0,r),r+=4,n.writeUInt32BE(e.retry||0,r),r+=4,n.writeUInt32BE(e.expire||0,r),r+=4,n.writeUInt32BE(e.minimum||0,r),r+=4,n.writeUInt16BE(r-i-2,i),m.encode.bytes=r-i,n},m.encode.bytes=0,m.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mname=u.decode(e,t),t+=u.decode.bytes,r.rname=u.decode(e,t,{mail:!0}),t+=u.decode.bytes,r.serial=e.readUInt32BE(t),t+=4,r.refresh=e.readUInt32BE(t),t+=4,r.retry=e.readUInt32BE(t),t+=4,r.expire=e.readUInt32BE(t),t+=4,r.minimum=e.readUInt32BE(t),t+=4,m.decode.bytes=t-n,r},m.decode.bytes=0,m.encodingLength=function(e){return 22+u.encodingLength(e.mname)+u.encodingLength(e.rname)};const y=e.txt={};y.encode=function(e,n,r){Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++)if("string"==typeof e[n]&&(e[n]=t.from(e[n])),!t.isBuffer(e[n]))throw new Error("Must be a Buffer");n||(n=t.alloc(y.encodingLength(e))),r||(r=0);const i=r;return r+=2,e.forEach(function(e){n[r++]=e.length,e.copy(n,r,0,e.length),r+=e.length}),n.writeUInt16BE(r-i-2,i),y.encode.bytes=r-i,n},y.encode.bytes=0,y.decode=function(e,t){t||(t=0);const n=t;let r=e.readUInt16BE(t);t+=2;let i=[];for(;r>0;){const n=e[t++];if(--r,r<n)throw new Error("Buffer overflow");i.push(e.slice(t,t+n)),t+=n,r-=n}return y.decode.bytes=t-n,i},y.decode.bytes=0,y.encodingLength=function(e){Array.isArray(e)||(e=[e]);let n=2;return e.forEach(function(e){n+="string"==typeof e?t.byteLength(e)+1:e.length+1}),n};const g=e.null={};g.encode=function(e,n,r){n||(n=t.alloc(g.encodingLength(e))),r||(r=0),"string"==typeof e&&(e=t.from(e)),e||(e=t.alloc(0));const i=r;r+=2;const a=e.length;return e.copy(n,r,0,a),r+=a,n.writeUInt16BE(r-i-2,i),g.encode.bytes=r-i,n},g.encode.bytes=0,g.decode=function(e,t){t||(t=0);const n=t,r=e.readUInt16BE(t);t+=2;const i=e.slice(t,t+r);return t+=r,g.decode.bytes=t-n,i},g.decode.bytes=0,g.encodingLength=function(e){return e?(t.isBuffer(e)?e.length:t.byteLength(e))+2:2};const b=e.hinfo={};b.encode=function(e,n,r){n||(n=t.alloc(b.encodingLength(e))),r||(r=0);const i=r;return r+=2,l.encode(e.cpu,n,r),r+=l.encode.bytes,l.encode(e.os,n,r),r+=l.encode.bytes,n.writeUInt16BE(r-i-2,i),b.encode.bytes=r-i,n},b.encode.bytes=0,b.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.cpu=l.decode(e,t),t+=l.decode.bytes,r.os=l.decode(e,t),t+=l.decode.bytes,b.decode.bytes=t-n,r},b.decode.bytes=0,b.encodingLength=function(e){return l.encodingLength(e.cpu)+l.encodingLength(e.os)+2};const v=e.ptr={},w=e.cname=v,x=e.dname=v;v.encode=function(e,n,r){return n||(n=t.alloc(v.encodingLength(e))),r||(r=0),u.encode(e,n,r+2),n.writeUInt16BE(u.encode.bytes,r),v.encode.bytes=u.encode.bytes+2,n},v.encode.bytes=0,v.decode=function(e,t){t||(t=0);const n=u.decode(e,t+2);return v.decode.bytes=u.decode.bytes+2,n},v.decode.bytes=0,v.encodingLength=function(e){return u.encodingLength(e)+2};const _=e.srv={};_.encode=function(e,n,r){n||(n=t.alloc(_.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.priority||0,r+2),n.writeUInt16BE(e.weight||0,r+4),n.writeUInt16BE(e.port||0,r+6),u.encode(e.target,n,r+8);const i=u.encode.bytes+6;return n.writeUInt16BE(i,r),_.encode.bytes=i+2,n},_.encode.bytes=0,_.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r={};return r.priority=e.readUInt16BE(t+2),r.weight=e.readUInt16BE(t+4),r.port=e.readUInt16BE(t+6),r.target=u.decode(e,t+8),_.decode.bytes=n+2,r},_.decode.bytes=0,_.encodingLength=function(e){return 8+u.encodingLength(e.target)};const T=e.caa={};T.ISSUER_CRITICAL=128,T.encode=function(e,n,r){const i=T.encodingLength(e);return n||(n=t.alloc(T.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=T.ISSUER_CRITICAL),n.writeUInt16BE(i-2,r),r+=2,n.writeUInt8(e.flags||0,r),r+=1,l.encode(e.tag,n,r),r+=l.encode.bytes,n.write(e.value,r),r+=t.byteLength(e.value),T.encode.bytes=i,n},T.encode.bytes=0,T.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=t+=2,i={};return i.flags=e.readUInt8(t),t+=1,i.tag=l.decode(e,t),t+=l.decode.bytes,i.value=e.toString("utf-8",t,r+n),i.issuerCritical=!!(i.flags&T.ISSUER_CRITICAL),T.decode.bytes=n+2,i},T.decode.bytes=0,T.encodingLength=function(e){return l.encodingLength(e.tag)+l.encodingLength(e.value)+2};const E=e.mx={};E.encode=function(e,n,r){n||(n=t.alloc(E.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,u.encode(e.exchange,n,r),r+=u.encode.bytes,n.writeUInt16BE(r-i-2,i),E.encode.bytes=r-i,n},E.encode.bytes=0,E.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.preference=e.readUInt16BE(t),t+=2,r.exchange=u.decode(e,t),t+=u.decode.bytes,E.decode.bytes=t-n,r},E.encodingLength=function(e){return 4+u.encodingLength(e.exchange)};const S=e.a={};S.encode=function(e,n,r){return n||(n=t.alloc(S.encodingLength(e))),r||(r=0),n.writeUInt16BE(4,r),r+=2,o.v4.encode(e,n,r),S.encode.bytes=6,n},S.encode.bytes=0,S.decode=function(e,t){t||(t=0),t+=2;const n=o.v4.decode(e,t);return S.decode.bytes=6,n},S.decode.bytes=0,S.encodingLength=function(){return 6};const k=e.aaaa={};k.encode=function(e,n,r){return n||(n=t.alloc(k.encodingLength(e))),r||(r=0),n.writeUInt16BE(16,r),r+=2,o.v6.encode(e,n,r),k.encode.bytes=18,n},k.encode.bytes=0,k.decode=function(e,t){t||(t=0),t+=2;const n=o.v6.decode(e,t);return k.decode.bytes=18,n},k.decode.bytes=0,k.encodingLength=function(){return 18};const M=e.option={};M.encode=function(e,n,r){n||(n=t.alloc(M.encodingLength(e))),r||(r=0);const i=r,a=s.toCode(e.code);if(n.writeUInt16BE(a,r),r+=2,e.data)n.writeUInt16BE(e.data.length,r),r+=2,e.data.copy(n,r),r+=e.data.length;else switch(a){case 8:const i=e.sourcePrefixLength||0,a=e.family||o.familyOf(e.ip),s=o.encode(e.ip,t.alloc),c=Math.ceil(i/8);n.writeUInt16BE(c+4,r),r+=2,n.writeUInt16BE(a,r),r+=2,n.writeUInt8(i,r++),n.writeUInt8(e.scopePrefixLength||0,r++),s.copy(n,r,0,c),r+=c;break;case 11:e.timeout?(n.writeUInt16BE(2,r),r+=2,n.writeUInt16BE(e.timeout,r),r+=2):(n.writeUInt16BE(0,r),r+=2);break;case 12:const u=e.length||0;n.writeUInt16BE(u,r),r+=2,n.fill(0,r,r+u),r+=u;break;case 14:const l=2*e.tags.length;n.writeUInt16BE(l,r),r+=2;for(const t of e.tags)n.writeUInt16BE(t,r),r+=2;break;default:throw new Error(`Unknown roption code: ${e.code}`)}return M.encode.bytes=r-i,n},M.encode.bytes=0,M.decode=function(e,n){n||(n=0);const r={};r.code=e.readUInt16BE(n),r.type=s.toString(r.code),n+=2;const i=e.readUInt16BE(n);switch(n+=2,r.data=e.slice(n,n+i),r.code){case 8:r.family=e.readUInt16BE(n),n+=2,r.sourcePrefixLength=e.readUInt8(n++),r.scopePrefixLength=e.readUInt8(n++);const a=t.alloc(1===r.family?4:16);e.copy(a,0,n,n+i-4),r.ip=o.decode(a);break;case 11:i>0&&(r.timeout=e.readUInt16BE(n),n+=2);break;case 14:r.tags=[];for(let t=0;t<i;t+=2)r.tags.push(e.readUInt16BE(n)),n+=2}return M.decode.bytes=i+4,r},M.decode.bytes=0,M.encodingLength=function(e){if(e.data)return e.data.length+4;switch(s.toCode(e.code)){case 8:const t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8;case 11:return"number"==typeof e.timeout?6:4;case 12:return e.length+4;case 14:return 4+2*e.tags.length}throw new Error(`Unknown roption code: ${e.code}`)};const A=e.opt={};A.encode=function(e,n,r){n||(n=t.alloc(A.encodingLength(e))),r||(r=0);const i=r,a=F(e,M);return n.writeUInt16BE(a,r),r=q(e,M,n,r+2),A.encode.bytes=r-i,n},A.encode.bytes=0,A.decode=function(e,t){t||(t=0);const n=t,r=[];let i=e.readUInt16BE(t);t+=2;let a=0;for(;i>0;)r[a++]=M.decode(e,t),t+=M.decode.bytes,i-=M.decode.bytes;return A.decode.bytes=t-n,r},A.decode.bytes=0,A.encodingLength=function(e){return 2+F(e||[],M)};const O=e.dnskey={};O.PROTOCOL_DNSSEC=3,O.ZONE_KEY=128,O.SECURE_ENTRYPOINT=32768,O.encode=function(e,n,r){n||(n=t.alloc(O.encodingLength(e))),r||(r=0);const i=r,a=e.key;if(!t.isBuffer(a))throw new Error("Key must be a Buffer");return r+=2,n.writeUInt16BE(e.flags,r),r+=2,n.writeUInt8(O.PROTOCOL_DNSSEC,r),r+=1,n.writeUInt8(e.algorithm,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,O.encode.bytes=r-i,n.writeUInt16BE(O.encode.bytes-2,i),n},O.encode.bytes=0,O.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);if(t+=2,r.flags=e.readUInt16BE(t),t+=2,e.readUInt8(t)!==O.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,r.algorithm=e.readUInt8(t),t+=1,r.key=e.slice(t,n+i+2),t+=r.key.length,O.decode.bytes=t-n,r},O.decode.bytes=0,O.encodingLength=function(e){return 6+t.byteLength(e.key)};const R=e.rrsig={};R.encode=function(e,r,i){r||(r=t.alloc(R.encodingLength(e))),i||(i=0);const a=i,s=e.signature;if(!t.isBuffer(s))throw new Error("Signature must be a Buffer");return i+=2,r.writeUInt16BE(n.toType(e.typeCovered),i),i+=2,r.writeUInt8(e.algorithm,i),i+=1,r.writeUInt8(e.labels,i),i+=1,r.writeUInt32BE(e.originalTTL,i),i+=4,r.writeUInt32BE(e.expiration,i),i+=4,r.writeUInt32BE(e.inception,i),i+=4,r.writeUInt16BE(e.keyTag,i),i+=2,u.encode(e.signersName,r,i),i+=u.encode.bytes,s.copy(r,i,0,s.length),i+=s.length,R.encode.bytes=i-a,r.writeUInt16BE(R.encode.bytes-2,a),r},R.encode.bytes=0,R.decode=function(e,t){t||(t=0);const r=t;var i={},a=e.readUInt16BE(t);return t+=2,i.typeCovered=n.toString(e.readUInt16BE(t)),t+=2,i.algorithm=e.readUInt8(t),t+=1,i.labels=e.readUInt8(t),t+=1,i.originalTTL=e.readUInt32BE(t),t+=4,i.expiration=e.readUInt32BE(t),t+=4,i.inception=e.readUInt32BE(t),t+=4,i.keyTag=e.readUInt16BE(t),t+=2,i.signersName=u.decode(e,t),t+=u.decode.bytes,i.signature=e.slice(t,r+a+2),t+=i.signature.length,R.decode.bytes=t-r,i},R.decode.bytes=0,R.encodingLength=function(e){return 20+u.encodingLength(e.signersName)+t.byteLength(e.signature)};const I=e.rp={};I.encode=function(e,n,r){n||(n=t.alloc(I.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.mbox||".",n,r,{mail:!0}),r+=u.encode.bytes,u.encode(e.txt||".",n,r),r+=u.encode.bytes,I.encode.bytes=r-i,n.writeUInt16BE(I.encode.bytes-2,i),n},I.encode.bytes=0,I.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mbox=u.decode(e,t,{mail:!0})||".",t+=u.decode.bytes,r.txt=u.decode(e,t)||".",t+=u.decode.bytes,I.decode.bytes=t-n,r},I.decode.bytes=0,I.encodingLength=function(e){return 2+u.encodingLength(e.mbox||".")+u.encodingLength(e.txt||".")};const N={encode:function(e,r,i){r||(r=t.alloc(N.encodingLength(e))),i||(i=0);const a=i;for(var s=[],o=0;o<e.length;o++){var c=n.toType(e[o]);void 0===s[c>>8]&&(s[c>>8]=[]),s[c>>8][c>>3&31]|=1<<7-(7&c)}for(o=0;o<s.length;o++)if(void 0!==s[o]){var u=t.from(s[o]);r.writeUInt8(o,i),i+=1,r.writeUInt8(u.length,i),i+=1,u.copy(r,i),i+=u.length}return N.encode.bytes=i-a,r}};N.encode.bytes=0,N.decode=function(e,t,r){t||(t=0);const i=t;for(var a=[];t-i<r;){var s=e.readUInt8(t);t+=1;var o=e.readUInt8(t);t+=1;for(var c=0;c<o;c++)for(var u=e.readUInt8(t+c),l=0;l<8;l++)if(u&1<<7-l){var p=n.toString(s<<8|c<<3|l);a.push(p)}t+=o}return N.decode.bytes=t-i,a},N.decode.bytes=0,N.encodingLength=function(e){for(var t=[],r=0;r<e.length;r++){var i=n.toType(e[r]);t[i>>8]=Math.max(t[i>>8]||0,255&i)}var a=0;for(r=0;r<t.length;r++)void 0!==t[r]&&(a+=2+Math.ceil((t[r]+1)/8));return a};const C=e.nsec={};C.encode=function(e,n,r){n||(n=t.alloc(C.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.nextDomain,n,r),r+=u.encode.bytes,N.encode(e.rrtypes,n,r),r+=N.encode.bytes,C.encode.bytes=r-i,n.writeUInt16BE(C.encode.bytes-2,i),n},C.encode.bytes=0,C.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.nextDomain=u.decode(e,t),t+=u.decode.bytes,r.rrtypes=N.decode(e,t,i-(t-n)),t+=N.decode.bytes,C.decode.bytes=t-n,r},C.decode.bytes=0,C.encodingLength=function(e){return 2+u.encodingLength(e.nextDomain)+N.encodingLength(e.rrtypes)};const P=e.nsec3={};P.encode=function(e,n,r){n||(n=t.alloc(P.encodingLength(e))),r||(r=0);const i=r,a=e.salt;if(!t.isBuffer(a))throw new Error("salt must be a Buffer");const s=e.nextDomain;if(!t.isBuffer(s))throw new Error("nextDomain must be a Buffer");return r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.flags,r),r+=1,n.writeUInt16BE(e.iterations,r),r+=2,n.writeUInt8(a.length,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,n.writeUInt8(s.length,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,N.encode(e.rrtypes,n,r),r+=N.encode.bytes,P.encode.bytes=r-i,n.writeUInt16BE(P.encode.bytes-2,i),n},P.encode.bytes=0,P.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);t+=2,r.algorithm=e.readUInt8(t),t+=1,r.flags=e.readUInt8(t),t+=1,r.iterations=e.readUInt16BE(t),t+=2;const a=e.readUInt8(t);t+=1,r.salt=e.slice(t,t+a),t+=a;const s=e.readUInt8(t);return t+=1,r.nextDomain=e.slice(t,t+s),t+=s,r.rrtypes=N.decode(e,t,i-(t-n)),t+=N.decode.bytes,P.decode.bytes=t-n,r},P.decode.bytes=0,P.encodingLength=function(e){return 8+e.salt.length+e.nextDomain.length+N.encodingLength(e.rrtypes)};const j=e.ds={};j.encode=function(e,n,r){n||(n=t.alloc(j.encodingLength(e))),r||(r=0);const i=r,a=e.digest;if(!t.isBuffer(a))throw new Error("Digest must be a Buffer");return r+=2,n.writeUInt16BE(e.keyTag,r),r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.digestType,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,j.encode.bytes=r-i,n.writeUInt16BE(j.encode.bytes-2,i),n},j.encode.bytes=0,j.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.keyTag=e.readUInt16BE(t),t+=2,r.algorithm=e.readUInt8(t),t+=1,r.digestType=e.readUInt8(t),t+=1,r.digest=e.slice(t,n+i+2),t+=r.digest.length,j.decode.bytes=t-n,r},j.decode.bytes=0,j.encodingLength=function(e){return 6+t.byteLength(e.digest)};const L=e.sshfp={};L.getFingerprintLengthForHashType=function(e){switch(e){case 1:return 20;case 2:return 32}},L.encode=function(e,n,r){n||(n=t.alloc(L.encodingLength(e))),r||(r=0);const i=r;n[r+=2]=e.algorithm,n[r+=1]=e.hash,r+=1;const a=t.from(e.fingerprint.toUpperCase(),"hex");if(a.length!==L.getFingerprintLengthForHashType(e.hash))throw new Error("Invalid fingerprint length");return a.copy(n,r),r+=a.byteLength,L.encode.bytes=r-i,n.writeUInt16BE(L.encode.bytes-2,i),n},L.encode.bytes=0,L.decode=function(e,t){t||(t=0);const n=t,r={};t+=2,r.algorithm=e[t],t+=1,r.hash=e[t],t+=1;const i=L.getFingerprintLengthForHashType(r.hash);return r.fingerprint=e.slice(t,t+i).toString("hex").toUpperCase(),t+=i,L.decode.bytes=t-n,r},L.decode.bytes=0,L.encodingLength=function(e){return 4+t.from(e.fingerprint,"hex").byteLength};const $=e.naptr={};$.encode=function(e,n,r){n||(n=t.alloc($.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.order||0,r),r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,l.encode(e.flags,n,r),r+=l.encode.bytes,l.encode(e.services,n,r),r+=l.encode.bytes,l.encode(e.regexp,n,r),r+=l.encode.bytes,u.encode(e.replacement,n,r),r+=u.encode.bytes,$.encode.bytes=r-i,n.writeUInt16BE($.encode.bytes-2,i),n},$.encode.bytes=0,$.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.order=e.readUInt16BE(t),t+=2,r.preference=e.readUInt16BE(t),t+=2,r.flags=l.decode(e,t),t+=l.decode.bytes,r.services=l.decode(e,t),t+=l.decode.bytes,r.regexp=l.decode(e,t),t+=l.decode.bytes,r.replacement=u.decode(e,t),t+=u.decode.bytes,$.decode.bytes=t-n,r},$.decode.bytes=0,$.encodingLength=function(e){return l.encodingLength(e.flags)+l.encodingLength(e.services)+l.encodingLength(e.regexp)+u.encodingLength(e.replacement)+6};const D=e.tlsa={};D.encode=function(e,n,r){n||(n=t.alloc(D.encodingLength(e))),r||(r=0);const i=r,a=e.certificate;if(!t.isBuffer(a))throw new Error("Certificate must be a Buffer");return r+=2,n.writeUInt8(e.usage,r),r+=1,n.writeUInt8(e.selector,r),r+=1,n.writeUInt8(e.matchingType,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,D.encode.bytes=r-i,n.writeUInt16BE(D.encode.bytes-2,i),n},D.encode.bytes=0,D.decode=function(e,t){t||(t=0);const n=t,r={},i=e.readUInt16BE(t);return t+=2,r.usage=e.readUInt8(t),t+=1,r.selector=e.readUInt8(t),t+=1,r.matchingType=e.readUInt8(t),t+=1,r.certificate=e.slice(t,n+i+2),t+=r.certificate.length,D.decode.bytes=t-n,r},D.decode.bytes=0,D.encodingLength=function(e){return 5+t.byteLength(e.certificate)};const U=e.record=function(e){switch(e.toUpperCase()){case"A":return S;case"PTR":return v;case"CNAME":return w;case"DNAME":return x;case"TXT":return y;case"NULL":return g;case"AAAA":return k;case"SRV":return _;case"HINFO":return b;case"CAA":return T;case"NS":return h;case"SOA":return m;case"MX":return E;case"OPT":return A;case"DNSKEY":return O;case"RRSIG":return R;case"RP":return I;case"NSEC":return C;case"NSEC3":return P;case"SSHFP":return L;case"DS":return j;case"NAPTR":return $;case"TLSA":return D}return f},z=e.answer={};z.encode=function(e,r,i){r||(r=t.alloc(z.encodingLength(e))),i||(i=0);const s=i;if(u.encode(e.name,r,i),i+=u.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),"OPT"===e.type.toUpperCase()){if("."!==e.name)throw new Error("OPT name must be root.");r.writeUInt16BE(e.udpPayloadSize||4096,i+2),r.writeUInt8(e.extendedRcode||0,i+4),r.writeUInt8(e.ednsVersion||0,i+5),r.writeUInt16BE(e.flags||0,i+6),i+=8,A.encode(e.options||[],r,i),i+=A.encode.bytes}else{let t=a.toClass(void 0===e.class?"IN":e.class);e.flush&&(t|=c),r.writeUInt16BE(t,i+2),r.writeUInt32BE(e.ttl||0,i+4),i+=8;const n=U(e.type);n.encode(e.data,r,i),i+=n.encode.bytes}return z.encode.bytes=i-s,r},z.encode.bytes=0,z.decode=function(e,t){t||(t=0);const r={},i=t;if(r.name=u.decode(e,t),t+=u.decode.bytes,r.type=n.toString(e.readUInt16BE(t)),"OPT"===r.type)r.udpPayloadSize=e.readUInt16BE(t+2),r.extendedRcode=e.readUInt8(t+4),r.ednsVersion=e.readUInt8(t+5),r.flags=e.readUInt16BE(t+6),r.flag_do=1==(r.flags>>15&1),r.options=A.decode(e,t+8),t+=8+A.decode.bytes;else{const n=e.readUInt16BE(t+2);r.ttl=e.readUInt32BE(t+4),r.class=a.toString(-32769&n),r.flush=!!(n&c);const i=U(r.type);r.data=i.decode(e,t+8),t+=8+i.decode.bytes}return z.decode.bytes=t-i,r},z.decode.bytes=0,z.encodingLength=function(e){const t=null!==e.data&&void 0!==e.data?e.data:e.options;return u.encodingLength(e.name)+8+U(e.type).encodingLength(t)};const B=e.question={};function F(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t.encodingLength(e[r]);return n}function q(e,t,n,r){for(let i=0;i<e.length;i++)t.encode(e[i],n,r),r+=t.encode.bytes;return r}function H(e,t,n,r){for(let i=0;i<e.length;i++)e[i]=t.decode(n,r),r+=t.decode.bytes;return r}B.encode=function(e,r,i){r||(r=t.alloc(B.encodingLength(e))),i||(i=0);const s=i;return u.encode(e.name,r,i),i+=u.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),i+=2,r.writeUInt16BE(a.toClass(void 0===e.class?"IN":e.class),i),i+=2,B.encode.bytes=i-s,e},B.encode.bytes=0,B.decode=function(e,t){t||(t=0);const r=t,i={};i.name=u.decode(e,t),t+=u.decode.bytes,i.type=n.toString(e.readUInt16BE(t)),t+=2,i.class=a.toString(e.readUInt16BE(t)),t+=2;return!!(32768&i.class)&&(i.class&=-32769),B.decode.bytes=t-r,i},B.decode.bytes=0,B.encodingLength=function(e){return u.encodingLength(e.name)+4},e.AUTHORITATIVE_ANSWER=1024,e.TRUNCATED_RESPONSE=512,e.RECURSION_DESIRED=256,e.RECURSION_AVAILABLE=128,e.AUTHENTIC_DATA=32,e.CHECKING_DISABLED=16,e.DNSSEC_OK=32768,e.encode=function(n,r,i){const a=!r;a&&(r=t.alloc(e.encodingLength(n))),i||(i=0);const s=i;return n.questions||(n.questions=[]),n.answers||(n.answers=[]),n.authorities||(n.authorities=[]),n.additionals||(n.additionals=[]),p.encode(n,r,i),i+=p.encode.bytes,i=q(n.questions,B,r,i),i=q(n.answers,z,r,i),i=q(n.authorities,z,r,i),i=q(n.additionals,z,r,i),e.encode.bytes=i-s,a&&e.encode.bytes!==r.length?r.slice(0,e.encode.bytes):r},e.encode.bytes=0,e.decode=function(t,n){n||(n=0);const r=n,i=p.decode(t,n);return n+=p.decode.bytes,n=H(i.questions,B,t,n),n=H(i.answers,z,t,n),n=H(i.authorities,z,t,n),n=H(i.additionals,z,t,n),e.decode.bytes=n-r,i},e.decode.bytes=0,e.encodingLength=function(e){return p.encodingLength(e)+F(e.questions||[],B)+F(e.answers||[],z)+F(e.authorities||[],z)+F(e.additionals||[],z)},e.streamEncode=function(n){const r=e.encode(n),i=t.alloc(2);i.writeUInt16BE(r.byteLength);const a=t.concat([i,r]);return e.streamEncode.bytes=a.byteLength,a},e.streamEncode.bytes=0,e.streamDecode=function(t){const n=t.readUInt16BE(0);if(t.byteLength<n+2)return null;const r=e.decode(t.slice(2));return e.streamDecode.bytes=e.decode.bytes,r},e.streamDecode.bytes=0}(pb)),pb}var Nb=function(){if(Ob)return Ab;Ob=1;const e=D,t=s,n=Ib(),r=f;function i(t){if(!(this instanceof i))return new i(t);t||(t={}),r.EventEmitter.call(this);const n=this;function a(){n._ontimeoutCheck()}function s(){n._interval=setInterval(a,n.timeoutChecks),n.emit("listening")}this.retries=void 0!==t.retries?t.retries:5,this.timeout=t.timeout||7500,this.timeoutChecks=t.timeoutChecks||this.timeout/10,this.destroyed=!1,this.inflight=0,this.maxQueries=t.maxQueries||1e4,this.maxRedirects=t.maxRedirects||0,this.socket=t.socket||e.createSocket("udp4"),this._id=Math.ceil(Math.random()*this.maxQueries),this._queries=new Array(this.maxQueries).fill(null),this._interval=null,this.socket.on("error",function(e){"EACCES"===e.code||"EADDRINUSE"===e.code?n.emit("error",e):n.emit("warning",e)}),this.socket.on("message",function(e,t){n._onmessage(e,t)}),!function(e){try{return 0!==e.address().port}catch(e){return!1}}(this.socket)?this.socket.on("listening",s):s(),this.socket.on("close",function(){n.emit("close")})}function a(){}return Ab=i,t.inherits(i,r.EventEmitter),i.RECURSION_DESIRED=i.prototype.RECURSION_DESIRED=n.RECURSION_DESIRED,i.RECURSION_AVAILABLE=i.prototype.RECURSION_AVAILABLE=n.RECURSION_AVAILABLE,i.TRUNCATED_RESPONSE=i.prototype.TRUNCATED_RESPONSE=n.TRUNCATED_RESPONSE,i.AUTHORITATIVE_ANSWER=i.prototype.AUTHORITATIVE_ANSWER=n.AUTHORITATIVE_ANSWER,i.AUTHENTIC_DATA=i.prototype.AUTHENTIC_DATA=n.AUTHENTIC_DATA,i.CHECKING_DISABLED=i.prototype.CHECKING_DISABLED=n.CHECKING_DISABLED,i.prototype.address=function(){return this.socket.address()},i.prototype.bind=function(...e){const t=e.length>0&&e[e.length-1];"function"==typeof t?(this.once("listening",t),this.socket.bind(...e.slice(0,-1))):this.socket.bind(...e)},i.prototype.destroy=function(e){if(e&&this.once("close",e),!this.destroyed){this.destroyed=!0,clearInterval(this._interval),this.socket.close();for(let e=0;e<this.maxQueries;e++){const t=this._queries[e];t&&(t.callback(new Error("Socket destroyed")),this._queries[e]=null)}this.inflight=0}},i.prototype._ontimeoutCheck=function(){const e=Date.now();for(let t=0;t<this.maxQueries;t++){const n=this._queries[t];!n||e-n.firstTry<(n.tries+1)*this.timeout||(n.tries>this.retries?(this._queries[t]=null,this.inflight--,this.emit("timeout",n.query,n.port,n.host),n.callback(new Error("Query timed out"))):(n.tries++,this.socket.send(n.buffer,0,n.buffer.length,n.port,Array.isArray(n.host)?n.host[Math.floor(n.host.length*Math.random())]:n.host||"127.0.0.1")))}},i.prototype._shouldRedirect=function(e,t){if(this.maxRedirects<=0||!e||1!==e.query.questions.length||t.answers.filter(e=>"A"===e.type).length>0)return!1;if(e.redirects>this.maxRedirects)return!1;const r=t.answers.filter(e=>"CNAME"===e.type);if(0===r.length)return!1;const i=this._getNextEmptyId();return-1===i?(e.callback(new Error("Query array is full!")),!0):(e.query={id:i+1,flags:n.RECURSION_DESIRED,questions:[{type:"A",name:r[0].data}]},e.redirects++,e.firstTry=Date.now(),e.tries=0,e.buffer=n.encode(e.query),this._queries[i]=e,this.socket.send(e.buffer,0,e.buffer.length,e.port,Array.isArray(e.host)?e.host[Math.floor(e.host.length*Math.random())]:e.host||"127.0.0.1"),!0)},i.prototype._onmessage=function(e,t){let r;try{r=n.decode(e)}catch(e){return void this.emit("warning",e)}if("response"===r.type&&r.id){const e=this._queries[r.id-1];e&&(this._queries[r.id-1]=null,this.inflight--,this._shouldRedirect(e,r)||e.callback(null,r))}this.emit(r.type,r,t.port,t.address)},i.prototype.unref=function(){this.socket.unref()},i.prototype.ref=function(){this.socket.ref()},i.prototype.response=function(e,t,r,i){if(this.destroyed)return;t.type="response",t.id=e.id;const a=n.encode(t);this.socket.send(a,0,a.length,r,i)},i.prototype.cancel=function(e){const t=this._queries[e];t&&(this._queries[e]=null,this.inflight--,t.callback(new Error("Query cancelled")))},i.prototype.setRetries=function(e,t){const n=this._queries[e];n&&(n.firstTry=n.firstTry-this.timeout*(t-n.retries),n.retries=this.retries-t)},i.prototype._getNextEmptyId=function(){let e=-1;for(let t=this.maxQueries;t>0;t--){const n=(this._id+t)%this.maxQueries;if(null===this._queries[n]){e=n,this._id=(n+1)%this.maxQueries;break}}return e},i.prototype.query=function(e,t,r,s){if(this.destroyed)return s(new Error("Socket destroyed")),0;this.inflight++,e.type="query",e.flags="number"==typeof e.flags?e.flags:i.RECURSION_DESIRED;const o=this._getNextEmptyId();if(-1===o)return s(new Error("Query array is full!")),0;e.id=o+1;const c=n.encode(e);return this._queries[o]={callback:s||a,redirects:0,firstTry:Date.now(),query:e,tries:0,buffer:c,port:t,host:r},this.socket.send(c,0,c.length,t,Array.isArray(r)?r[Math.floor(r.length*Math.random())]:r||"127.0.0.1"),o},Ab}(),Cb=xe(Nb);const Pb=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const jb=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...Pb];const Lb=["null","undefined","string","number","bigint","boolean","symbol"];function $b(e){return t=>typeof t===e}const{toString:Db}=Object.prototype,Ub=e=>{const t=Db.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&Bb.domElement(e)?"HTMLElement":(n=t,jb.includes(n)?t:void 0);var n},zb=e=>t=>Ub(t)===e;function Bb(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(Bb.observable(e))return"Observable";if(Bb.array(e))return"Array";if(Bb.buffer(e))return"Buffer";const t=Ub(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Bb.undefined=$b("undefined"),Bb.string=$b("string");const Fb=$b("number");Bb.number=e=>Fb(e)&&!Bb.nan(e),Bb.positiveNumber=e=>Bb.number(e)&&e>0,Bb.negativeNumber=e=>Bb.number(e)&&e<0,Bb.bigint=$b("bigint"),Bb.function_=$b("function"),Bb.null_=e=>null===e,Bb.class_=e=>Bb.function_(e)&&e.toString().startsWith("class "),Bb.boolean=e=>!0===e||!1===e,Bb.symbol=$b("symbol"),Bb.numericString=e=>Bb.string(e)&&!Bb.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),Bb.array=(e,t)=>!!Array.isArray(e)&&(!Bb.function_(t)||e.every(e=>t(e))),Bb.buffer=e=>e?.constructor?.isBuffer?.(e)??!1,Bb.blob=e=>zb("Blob")(e),Bb.nullOrUndefined=e=>Bb.null_(e)||Bb.undefined(e),Bb.object=e=>!Bb.null_(e)&&("object"==typeof e||Bb.function_(e)),Bb.iterable=e=>Bb.function_(e?.[Symbol.iterator]),Bb.asyncIterable=e=>Bb.function_(e?.[Symbol.asyncIterator]),Bb.generator=e=>Bb.iterable(e)&&Bb.function_(e?.next)&&Bb.function_(e?.throw),Bb.asyncGenerator=e=>Bb.asyncIterable(e)&&Bb.function_(e.next)&&Bb.function_(e.throw),Bb.nativePromise=e=>zb("Promise")(e);Bb.promise=e=>Bb.nativePromise(e)||(e=>Bb.function_(e?.then)&&Bb.function_(e?.catch))(e),Bb.generatorFunction=zb("GeneratorFunction"),Bb.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===Ub(e),Bb.asyncFunction=e=>"AsyncFunction"===Ub(e),Bb.boundFunction=e=>Bb.function_(e)&&!e.hasOwnProperty("prototype"),Bb.regExp=zb("RegExp"),Bb.date=zb("Date"),Bb.error=zb("Error"),Bb.map=e=>zb("Map")(e),Bb.set=e=>zb("Set")(e),Bb.weakMap=e=>zb("WeakMap")(e),Bb.weakSet=e=>zb("WeakSet")(e),Bb.weakRef=e=>zb("WeakRef")(e),Bb.int8Array=zb("Int8Array"),Bb.uint8Array=zb("Uint8Array"),Bb.uint8ClampedArray=zb("Uint8ClampedArray"),Bb.int16Array=zb("Int16Array"),Bb.uint16Array=zb("Uint16Array"),Bb.int32Array=zb("Int32Array"),Bb.uint32Array=zb("Uint32Array"),Bb.float32Array=zb("Float32Array"),Bb.float64Array=zb("Float64Array"),Bb.bigInt64Array=zb("BigInt64Array"),Bb.bigUint64Array=zb("BigUint64Array"),Bb.arrayBuffer=zb("ArrayBuffer"),Bb.sharedArrayBuffer=zb("SharedArrayBuffer"),Bb.dataView=zb("DataView"),Bb.enumCase=(e,t)=>Object.values(t).includes(e),Bb.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,Bb.urlInstance=e=>zb("URL")(e),Bb.urlString=e=>{if(!Bb.string(e))return!1;try{return new URL(e),!0}catch{return!1}},Bb.truthy=e=>Boolean(e),Bb.falsy=e=>!e,Bb.nan=e=>Number.isNaN(e),Bb.primitive=e=>{return Bb.null_(e)||(t=typeof e,Lb.includes(t));var t},Bb.integer=e=>Number.isInteger(e),Bb.safeInteger=e=>Number.isSafeInteger(e),Bb.plainObject=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Bb.typedArray=e=>{return t=Ub(e),Pb.includes(t);var t};Bb.arrayLike=e=>!Bb.nullOrUndefined(e)&&!Bb.function_(e)&&(e=>Bb.safeInteger(e)&&e>=0)(e.length),Bb.tupleLike=(e,t)=>!(!Bb.array(t)||!Bb.array(e)||t.length!==e.length)&&t.every((t,n)=>t(e[n])),Bb.inRange=(e,t)=>{if(Bb.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(Bb.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const qb=["innerHTML","ownerDocument","style","attributes","nodeValue"];Bb.domElement=e=>Bb.object(e)&&1===e.nodeType&&Bb.string(e.nodeName)&&!Bb.plainObject(e)&&qb.every(t=>t in e),Bb.observable=e=>!!e&&(e===e[Symbol.observable]?.()||e===e["@@observable"]?.()),Bb.nodeStream=e=>Bb.object(e)&&Bb.function_(e.pipe)&&!Bb.observable(e),Bb.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;const Hb=e=>t=>Bb.integer(t)&&Math.abs(t%2)===e;Bb.evenInteger=Hb(0),Bb.oddInteger=Hb(1),Bb.emptyArray=e=>Bb.array(e)&&0===e.length,Bb.nonEmptyArray=e=>Bb.array(e)&&e.length>0,Bb.emptyString=e=>Bb.string(e)&&0===e.length;Bb.emptyStringOrWhitespace=e=>Bb.emptyString(e)||(e=>Bb.string(e)&&!/\S/.test(e))(e),Bb.nonEmptyString=e=>Bb.string(e)&&e.length>0,Bb.nonEmptyStringAndNotWhitespace=e=>Bb.string(e)&&!Bb.emptyStringOrWhitespace(e),Bb.emptyObject=e=>Bb.object(e)&&!Bb.map(e)&&!Bb.set(e)&&0===Object.keys(e).length,Bb.nonEmptyObject=e=>Bb.object(e)&&!Bb.map(e)&&!Bb.set(e)&&Object.keys(e).length>0,Bb.emptySet=e=>Bb.set(e)&&0===e.size,Bb.nonEmptySet=e=>Bb.set(e)&&e.size>0,Bb.emptyMap=e=>Bb.map(e)&&0===e.size,Bb.nonEmptyMap=e=>Bb.map(e)&&e.size>0,Bb.propertyKey=e=>Bb.any([Bb.string,Bb.number,Bb.symbol],e),Bb.formData=e=>zb("FormData")(e),Bb.urlSearchParams=e=>zb("URLSearchParams")(e);const Yb=(e,t,n)=>{if(!Bb.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(0===n.length)throw new TypeError("Invalid number of values");return e.call(n,t)};Bb.any=(e,...t)=>(Bb.array(e)?e:[e]).some(e=>Yb(Array.prototype.some,e,t)),Bb.all=(e,...t)=>Yb(Array.prototype.every,e,t);const Vb=(e,t,n,r={})=>{if(!e){const{multipleValues:e}=r,i=e?`received values of types ${[...new Set(n.map(e=>`\`${Bb(e)}\``))].join(", ")}`:`received value of type \`${Bb(n)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${i}.`)}},Kb={undefined:e=>Vb(Bb.undefined(e),"undefined",e),string:e=>Vb(Bb.string(e),"string",e),number:e=>Vb(Bb.number(e),"number",e),positiveNumber:e=>Vb(Bb.positiveNumber(e),"positive number",e),negativeNumber:e=>Vb(Bb.negativeNumber(e),"negative number",e),bigint:e=>Vb(Bb.bigint(e),"bigint",e),function_:e=>Vb(Bb.function_(e),"Function",e),null_:e=>Vb(Bb.null_(e),"null",e),class_:e=>Vb(Bb.class_(e),"Class",e),boolean:e=>Vb(Bb.boolean(e),"boolean",e),symbol:e=>Vb(Bb.symbol(e),"symbol",e),numericString:e=>Vb(Bb.numericString(e),"string with a number",e),array:(e,t)=>{Vb(Bb.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>Vb(Bb.buffer(e),"Buffer",e),blob:e=>Vb(Bb.blob(e),"Blob",e),nullOrUndefined:e=>Vb(Bb.nullOrUndefined(e),"null or undefined",e),object:e=>Vb(Bb.object(e),"Object",e),iterable:e=>Vb(Bb.iterable(e),"Iterable",e),asyncIterable:e=>Vb(Bb.asyncIterable(e),"AsyncIterable",e),generator:e=>Vb(Bb.generator(e),"Generator",e),asyncGenerator:e=>Vb(Bb.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>Vb(Bb.nativePromise(e),"native Promise",e),promise:e=>Vb(Bb.promise(e),"Promise",e),generatorFunction:e=>Vb(Bb.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>Vb(Bb.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>Vb(Bb.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>Vb(Bb.boundFunction(e),"Function",e),regExp:e=>Vb(Bb.regExp(e),"RegExp",e),date:e=>Vb(Bb.date(e),"Date",e),error:e=>Vb(Bb.error(e),"Error",e),map:e=>Vb(Bb.map(e),"Map",e),set:e=>Vb(Bb.set(e),"Set",e),weakMap:e=>Vb(Bb.weakMap(e),"WeakMap",e),weakSet:e=>Vb(Bb.weakSet(e),"WeakSet",e),weakRef:e=>Vb(Bb.weakRef(e),"WeakRef",e),int8Array:e=>Vb(Bb.int8Array(e),"Int8Array",e),uint8Array:e=>Vb(Bb.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>Vb(Bb.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>Vb(Bb.int16Array(e),"Int16Array",e),uint16Array:e=>Vb(Bb.uint16Array(e),"Uint16Array",e),int32Array:e=>Vb(Bb.int32Array(e),"Int32Array",e),uint32Array:e=>Vb(Bb.uint32Array(e),"Uint32Array",e),float32Array:e=>Vb(Bb.float32Array(e),"Float32Array",e),float64Array:e=>Vb(Bb.float64Array(e),"Float64Array",e),bigInt64Array:e=>Vb(Bb.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>Vb(Bb.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>Vb(Bb.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>Vb(Bb.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>Vb(Bb.dataView(e),"DataView",e),enumCase:(e,t)=>Vb(Bb.enumCase(e,t),"EnumCase",e),urlInstance:e=>Vb(Bb.urlInstance(e),"URL",e),urlString:e=>Vb(Bb.urlString(e),"string with a URL",e),truthy:e=>Vb(Bb.truthy(e),"truthy",e),falsy:e=>Vb(Bb.falsy(e),"falsy",e),nan:e=>Vb(Bb.nan(e),"NaN",e),primitive:e=>Vb(Bb.primitive(e),"primitive",e),integer:e=>Vb(Bb.integer(e),"integer",e),safeInteger:e=>Vb(Bb.safeInteger(e),"integer",e),plainObject:e=>Vb(Bb.plainObject(e),"plain object",e),typedArray:e=>Vb(Bb.typedArray(e),"TypedArray",e),arrayLike:e=>Vb(Bb.arrayLike(e),"array-like",e),tupleLike:(e,t)=>Vb(Bb.tupleLike(e,t),"tuple-like",e),domElement:e=>Vb(Bb.domElement(e),"HTMLElement",e),observable:e=>Vb(Bb.observable(e),"Observable",e),nodeStream:e=>Vb(Bb.nodeStream(e),"Node.js Stream",e),infinite:e=>Vb(Bb.infinite(e),"infinite number",e),emptyArray:e=>Vb(Bb.emptyArray(e),"empty array",e),nonEmptyArray:e=>Vb(Bb.nonEmptyArray(e),"non-empty array",e),emptyString:e=>Vb(Bb.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>Vb(Bb.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>Vb(Bb.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>Vb(Bb.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>Vb(Bb.emptyObject(e),"empty object",e),nonEmptyObject:e=>Vb(Bb.nonEmptyObject(e),"non-empty object",e),emptySet:e=>Vb(Bb.emptySet(e),"empty set",e),nonEmptySet:e=>Vb(Bb.nonEmptySet(e),"non-empty set",e),emptyMap:e=>Vb(Bb.emptyMap(e),"empty map",e),nonEmptyMap:e=>Vb(Bb.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>Vb(Bb.propertyKey(e),"PropertyKey",e),formData:e=>Vb(Bb.formData(e),"FormData",e),urlSearchParams:e=>Vb(Bb.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>Vb(Bb.evenInteger(e),"even integer",e),oddInteger:e=>Vb(Bb.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>Vb(Bb.directInstanceOf(e,t),"T",e),inRange:(e,t)=>Vb(Bb.inRange(e,t),"in range",e),any:(e,...t)=>Vb(Bb.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>Vb(Bb.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(Bb,{class:{value:Bb.class_},function:{value:Bb.function_},null:{value:Bb.null_}}),Object.defineProperties(Kb,{class:{value:Kb.class_},function:{value:Kb.function_},null:{value:Kb.null_}});let Gb=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}};class Wb{static fn(e){return(...t)=>new Wb((n,r,i)=>{t.push(i),e(...t).then(n,r)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((t,n)=>{this._reject=n;const r=e=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(e)};Object.defineProperties(r,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e(e=>{this._isCanceled&&r.shouldReject||(this._isPending=!1,t(e))},e=>{this._isPending=!1,n(e)},r)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const e of this._cancelHandlers)e()}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new Gb(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(Wb.prototype,Promise.prototype);let Jb=class extends Error{constructor(e,t,n){var r;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code??"ERR_GOT_REQUEST_ERROR",this.input=t.input,r=n,Bb.object(r)&&"_onResponse"in r?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,Bb.string(t.stack)&&Bb.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length,n=this.stack.slice(e).split("\n").reverse(),r=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();for(;r.length>0&&r[0]===n[0];)n.shift();this.stack=`${this.stack.slice(0,e)}${n.reverse().join("\n")}${r.reverse().join("\n")}`}}};class Zb extends Jb{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}class Xb extends Jb{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}let Qb=class extends Jb{constructor(e,t){super(e.message,e,t),this.name="CacheError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_CACHE_ACCESS":this.code}};class ev extends Jb{constructor(e,t){super(e.message,e,t),this.name="UploadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_UPLOAD":this.code}}let tv=class extends Jb{constructor(e,t,n){super(e.message,e,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=t}};class nv extends Jb{constructor(e,t){super(e.message,e,t),this.name="ReadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_READING_RESPONSE_STREAM":this.code}}class rv extends Jb{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}}class iv extends Jb{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}}var av,sv={exports:{}};var ov=(av||(av=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=(e,t)=>{let n;n="function"==typeof t?{connect:t}:t;const r="function"==typeof n.connect,i="function"==typeof n.secureConnect,a="function"==typeof n.close,s=()=>{r&&n.connect(),function(e){return e.encrypted}(e)&&i&&(e.authorized?n.secureConnect():e.authorizationError||e.once("secureConnect",n.secureConnect)),a&&e.once("close",n.close)};e.writable&&!e.connecting?s():e.connecting?e.once("connect",s):e.destroyed&&a&&n.close(e._hadError)};t.default=n,e.exports=n,e.exports.default=n}(sv,sv.exports)),sv.exports),cv=xe(ov);const uv=(e,t)=>t.some(t=>t instanceof RegExp?t.test(e):t===e),lv=new Set(["https:","http:","file:"]);function pv(e,t){if("string"!=typeof(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t}).defaultProtocol||t.defaultProtocol.endsWith(":")||(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!n)throw new Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups;const s=r.split(";");a=t?"":a;let o=!1;"base64"===s[s.length-1]&&(s.pop(),o=!0);const c=s.shift()?.toLowerCase()??"",u=s.map(e=>{let[t,n=""]=e.split("=").map(e=>e.trim());return"charset"===t&&(n=n.toLowerCase(),"us-ascii"===n)?"":`${t}${n?`=${n}`:""}`}).filter(Boolean),l=[...u];return o&&l.push("base64"),(l.length>0||c&&"text/plain"!==c)&&l.unshift(c),`data:${l.join(";")},${o?i.trim():i}${a?`#${a}`:""}`})(e,t);if((e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!lv.has(t)}catch{return!1}})(e))return e;const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const r=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),t.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),t.stripAuthentication&&(r.username="",r.password=""),t.stripHash?r.hash="":t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,n="";for(;;){const i=e.exec(r.pathname);if(!i)break;const a=i[0],s=i.index;n+=r.pathname.slice(t,s).replace(/\/{2,}/g,"/"),n+=a,t=s+a.length}n+=r.pathname.slice(t,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=n}if(r.pathname)try{r.pathname=decodeURI(r.pathname).replace(/\\/g,"%5C")}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split("/");const n=e[e.length-1];uv(n,t.removeDirectoryIndex)&&(e=e.slice(0,-1),r.pathname=e.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...r.searchParams.keys()])uv(e,t.removeQueryParameters)&&r.searchParams.delete(e);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(r.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const e of[...r.searchParams.keys()])uv(e,t.keepQueryParameters)||r.searchParams.delete(e);if(t.sortQueryParameters){r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,"")),t.removeExplicitPort&&r.port&&(r.port="");const i=e;return e=r.toString(),t.removeSingleSlash||"/"!==r.pathname||i.endsWith("/")||""!==r.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}var dv,fv,hv,mv={exports:{}};function yv(){if(fv)return dv;fv=1;const{PassThrough:e}=p;return dv=t=>{t={...t};const{array:n}=t;let{encoding:r}=t;const i="buffer"===r;let a=!1;n?a=!(r||i):r=r||"utf8",i&&(r=null);const s=new e({objectMode:a});r&&s.setEncoding(r);let o=0;const c=[];return s.on("data",e=>{c.push(e),a?o=c.length:o+=e.length}),s.getBufferedValue=()=>n?c:i?Buffer.concat(c,o):c.join(""),s.getBufferedLength=()=>o,s},dv}var gv,bv,vv=function(){if(hv)return mv.exports;hv=1;const{constants:e}=d,t=p,{promisify:n}=s,r=yv(),i=n(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function o(t,n){if(!t)throw new Error("Expected a stream");n={maxBuffer:1/0,...n};const{maxBuffer:s}=n,o=r(n);return await new Promise((n,r)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),r(t)};(async()=>{try{await i(t,o),n()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>s&&c(new a)})}),o.getBufferedValue()}return mv.exports=o,mv.exports.buffer=(e,t)=>o(e,{...t,encoding:"buffer"}),mv.exports.array=(e,t)=>o(e,{...t,array:!0}),mv.exports.MaxBufferError=a,mv.exports}(),wv=xe(vv);var xv=xe(function(){if(bv)return gv;bv=1;const e=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),r={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},i={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function a(e){const t=parseInt(e,10);return isFinite(t)?t:0}function s(e){const t={};if(!e)return t;const n=e.trim().split(/,/);for(const e of n){const[n,r]=e.split(/=/,2);t[n.trim()]=void 0===r||r.trim().replace(/^"|"$/g,"")}return t}function o(e){let t=[];for(const n in e){const r=e[n];t.push(!0===r?n:n+"="+r)}if(t.length)return t.join(", ")}return gv=class{constructor(e,t,{shared:n,cacheHeuristic:r,immutableMinTimeToLive:i,ignoreCargoCult:a,_fromObject:c}={}){if(c)this._fromObject(c);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==n,this._ignoreCargoCult=!!a,this._cacheHeuristic=void 0!==r?r:.1,this._immutableMinTtl=void 0!==i?i:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=s(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=s(e.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":o(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!t.has(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||e.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){return!this.evaluateRequest(e).revalidation}_evaluateRequestHitResult(e){return{response:{headers:this.responseHeaders()},revalidation:e}}_evaluateRequestRevalidation(e,t){return{synchronous:t,headers:this.revalidationHeaders(e)}}_evaluateRequestMissResult(e){return{response:void 0,revalidation:this._evaluateRequestRevalidation(e,!0)}}evaluateRequest(e){if(this._assertRequestHasHeaders(e),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);const t=s(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma))return this._evaluateRequestMissResult(e);if(t["max-age"]&&this.age()>a(t["max-age"]))return this._evaluateRequestMissResult(e);if(t["min-fresh"]&&this.maxAge()-this.age()<a(t["min-fresh"]))return this._evaluateRequestMissResult(e);if(this.stale()){return"max-stale"in t&&(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e,!1)):this._evaluateRequestMissResult(e)}return this._evaluateRequestHitResult(void 0)}_requestMatches(e,t){return!(this._url&&this._url!==e.url||this._host!==e.headers.host||e.method&&this._method!==e.method&&(!t||"HEAD"!==e.method)||!this._varyMatches(e))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const n of t)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const n in e)r[n]||(t[n]=e[n]);if(e.connection){const n=e.connection.trim().split(/\s*,\s*/);for(const e of n)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter(e=>!/^\s*1[0-9][0-9]/.test(e));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return a(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return a(this._rescc["s-maxage"])}if(this._rescc["max-age"])return a(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<t?0:Math.max(e,(n-t)/1e3)}if(this._resHeaders["last-modified"]){const n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&t>n)return Math.max(e,(t-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+a(this._rescc["stale-if-error"]),n=e+a(this._rescc["stale-while-revalidate"]);return Math.round(1e3*Math.max(0,e,t,n))}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+a(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){const e=a(this._rescc["stale-while-revalidate"]);return e>0&&this.maxAge()+e>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._ignoreCargoCult=!!e.icc,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);if(t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter(e=>!/^\s*W\//.test(e));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0);const a={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!r)return{policy:new this.constructor(e,t,a),modified:304!=t.status,matches:!1};const s={};for(const e in this._resHeaders)s[e]=e in t.headers&&!i[e]?t.headers[e]:this._resHeaders[e];const o=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,o,a),modified:!1,matches:!0}}}}());function _v(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLowerCase(),t]))}class Tv extends H{statusCode;headers;body;url;constructor({statusCode:e,headers:t,body:n,url:r}){if("number"!=typeof e)throw new TypeError("Argument `statusCode` should be a number");if("object"!=typeof t)throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if("string"!=typeof r)throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=_v(t),this.body=n,this.url=r}}var Ev,Sv,kv,Mv={};var Av=function(){if(kv)return Sv;kv=1;const e=f,t=(Ev||(Ev=1,Mv.stringify=function e(t){if(void 0===t)return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&"object"==typeof t){var n="",r=Array.isArray(t);n=r?"[":"{";var i=!0;for(var a in t){var s="function"==typeof t[a]||!r&&void 0===t[a];Object.hasOwnProperty.call(t,a)&&!s&&(i||(n+=","),i=!1,r?null==t[a]?n+="null":n+=e(t[a]):void 0!==t[a]&&(n+=e(a)+":"+e(t[a])))}return n+(r?"]":"}")}return"string"==typeof t?JSON.stringify(/^:/.test(t)?":"+t:t):void 0===t?"null":JSON.stringify(t)},Mv.parse=function(e){return JSON.parse(e,function(e,t){return"string"==typeof t?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t})}),Mv),n=["sqlite","postgres","mysql","mongo","redis","tiered"];return Sv=class extends e{constructor(e,{emitErrors:n=!0,...r}={}){if(super(),this.opts={namespace:"keyv",serialize:t.stringify,deserialize:t.parse,..."string"==typeof e?{uri:e}:e,...r},!this.opts.store){const e={...this.opts};this.opts.store=(e=>{const t={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri)return new(Xs(t[e.adapter||/^[^:+]*/.exec(e.uri)[0]]))(e);return new Map})(e)}if(this.opts.compression){const e=this.opts.compression;this.opts.serialize=e.serialize.bind(e),this.opts.deserialize=e.deserialize.bind(e)}"function"==typeof this.opts.store.on&&n&&this.opts.store.on("error",e=>this.emit("error",e)),this.opts.store.namespace=this.opts.namespace;const i=e=>async function*(){for await(const[t,n]of"function"==typeof e?e(this.opts.store.namespace):e){const e=await this.opts.deserialize(n);this.opts.store.namespace&&!t.includes(this.opts.store.namespace)||("number"==typeof e.expires&&Date.now()>e.expires?this.delete(t):yield[this._getKeyUnprefix(t),e.value])}};"function"==typeof this.opts.store[Symbol.iterator]&&this.opts.store instanceof Map?this.iterator=i(this.opts.store):"function"==typeof this.opts.store.iterator&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=i(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return n.includes(this.opts.store.opts.dialect)||n.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(e=>`${this.opts.namespace}:${e}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:n}=this.opts,r=Array.isArray(e),i=r?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(r&&void 0===n.getMany){const e=[];for(const r of i)e.push(Promise.resolve().then(()=>n.get(r)).then(e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e).then(e=>{if(null!=e)return"number"==typeof e.expires&&Date.now()>e.expires?this.delete(r).then(()=>{}):t&&t.raw?e:e.value}));return Promise.allSettled(e).then(e=>{const t=[];for(const n of e)t.push(n.value);return t})}return Promise.resolve().then(()=>r?n.getMany(i):n.get(i)).then(e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e).then(n=>{if(null!=n)return r?n.map((n,r)=>{if("string"==typeof n&&(n=this.opts.deserialize(n)),null!=n){if(!("number"==typeof n.expires&&Date.now()>n.expires))return t&&t.raw?n:n.value;this.delete(e[r]).then(()=>{})}}):"number"==typeof n.expires&&Date.now()>n.expires?this.delete(e).then(()=>{}):t&&t.raw?n:n.value})}set(e,t,n){const r=this._getKeyPrefix(e);void 0===n&&(n=this.opts.ttl),0===n&&(n=void 0);const{store:i}=this.opts;return Promise.resolve().then(()=>{const e="number"==typeof n?Date.now()+n:null;return"symbol"==typeof t&&this.emit("error","symbol cannot be serialized"),t={value:t,expires:e},this.opts.serialize(t)}).then(e=>i.set(r,e,n)).then(()=>!0)}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const n=this._getKeyPrefixArray(e);if(void 0===t.deleteMany){const e=[];for(const r of n)e.push(t.delete(r));return Promise.allSettled(e).then(e=>e.every(e=>!0===e.value))}return Promise.resolve().then(()=>t.deleteMany(n))}const n=this._getKeyPrefix(e);return Promise.resolve().then(()=>t.delete(n))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){const t=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>{if("function"==typeof n.has)return n.has(t);return void 0!==await n.get(t)})}disconnect(){const{store:e}=this.opts;if("function"==typeof e.disconnect)return e.disconnect()}},Sv}(),Ov=xe(Av);const Rv=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];class Iv extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Nv extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Cv{constructor(e,t){this.hooks=new Map,this.request=()=>(e,t)=>{let n;if("string"==typeof e)n=$v(W.parse(e)),e={};else if(e instanceof W.URL)n=$v(W.parse(e.toString())),e={};else{const[t,...r]=(e.path??"").split("?"),i=r.length>0?`?${r.join("?")}`:"";n=$v({...e,pathname:t,search:i})}(e={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...e,...Lv(n)}).headers=Object.fromEntries(Pv(e.headers).map(([e,t])=>[e.toLowerCase(),t]));const r=new U,i=pv(W.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1});let a=`${e.method}:${i}`;e.body&&void 0!==e.method&&["POST","PATCH","PUT"].includes(e.method)&&(e.body instanceof q.Readable?e.cache=!1:a+=`:${J.createHash("md5").update(e.body).digest("hex")}`);let s=!1,o=!1;const c=e=>{o=!0;let n=!1,i=()=>{};const c=new Promise(e=>{i=()=>{n||(n=!0,e())}}),u=async n=>{if(s){n.status=n.statusCode;const t=xv.fromObject(s.cachePolicy).revalidatedPolicy(e,n);if(!t.modified){n.resume(),await new Promise(e=>{n.once("end",e)});const e=Dv(t.policy.responseHeaders());(n=new Tv({statusCode:s.statusCode,headers:e,body:s.body,url:s.url})).cachePolicy=t.policy,n.fromCache=!0}}let i;n.fromCache||(n.cachePolicy=new xv(e,n,e),n.fromCache=!1),e.cache&&n.cachePolicy.storable()?(i=jv(n),(async()=>{try{const t=wv.buffer(n);await Promise.race([c,new Promise(e=>n.once("end",e)),new Promise(e=>n.once("close",e))]);const r=await t;let i={url:n.url,statusCode:n.fromCache?s.statusCode:n.statusCode,body:r,cachePolicy:n.cachePolicy.toObject()},o=e.strictTtl?n.cachePolicy.timeToLive():void 0;if(e.maxTtl&&(o=o?Math.min(o,e.maxTtl):e.maxTtl),this.hooks.size>0)for(const e of this.hooks.keys())i=await this.runHook(e,i,n);await this.cache.set(a,i,o)}catch(e){r.emit("error",new Nv(e))}})()):e.cache&&s&&(async()=>{try{await this.cache.delete(a)}catch(e){r.emit("error",new Nv(e))}})(),r.emit("response",i??n),"function"==typeof t&&t(i??n)};try{const t=this.cacheRequest(e,u);t.once("error",i),t.once("abort",i),t.once("destroy",i),r.emit("request",t)}catch(e){r.emit("error",new Iv(e))}};return(async()=>{const n=async e=>{await Promise.resolve();const n=e.cache?await this.cache.get(a):void 0;if(void 0===n&&!e.forceRefresh)return void c(e);const i=xv.fromObject(n.cachePolicy);if(i.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=Dv(i.responseHeaders()),a=new Tv({statusCode:n.statusCode,headers:e,body:n.body,url:n.url});a.cachePolicy=i,a.fromCache=!0,r.emit("response",a),"function"==typeof t&&t(a)}else i.satisfiesWithoutRevalidation(e)&&Date.now()>=i.timeToLive()&&e.forceRefresh?(await this.cache.delete(a),e.headers=i.revalidationHeaders(e),c(e)):(s=n,e.headers=i.revalidationHeaders(e),c(e))},i=e=>r.emit("error",new Nv(e));if(this.cache instanceof Ov){const e=this.cache;e.once("error",i),r.on("error",()=>e.removeListener("error",i)),r.on("response",()=>e.removeListener("error",i))}try{await n(e)}catch(t){e.automaticFailover&&!o&&c(e),r.emit("error",new Nv(t))}})(),r},this.addHook=(e,t)=>{this.hooks.has(e)||this.hooks.set(e,t)},this.removeHook=e=>this.hooks.delete(e),this.getHook=e=>this.hooks.get(e),this.runHook=async(e,...t)=>this.hooks.get(e)?.(...t),this.cache=t instanceof Ov?t:new Ov("string"==typeof t?{uri:t,namespace:"cacheable-request"}:{store:t,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e}}const Pv=Object.entries,jv=e=>{const t=new Y({autoDestroy:!1});return function(e,t){if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const n=new Set([...Object.keys(e),...Rv]),r={};for(const i of n)i in t||(r[i]={get(){const t=e[i];return"function"==typeof t?t.bind(e):t},set(t){e[i]=t},enumerable:!0,configurable:!1});Object.defineProperties(t,r),e.once("aborted",()=>{t.destroy(),t.emit("aborted")}),e.once("close",()=>{e.complete&&t.readable?t.once("end",()=>{t.emit("close")}):t.emit("close")})}(e,t),e.pipe(t)},Lv=e=>{const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t},$v=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}),Dv=e=>{const t=[];for(const n of Object.keys(e))t[n.toLowerCase()]=e[n];return t};var Uv,zv,Bv,Fv;function qv(){if(zv)return Uv;zv=1;const e=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];return Uv=(t,n)=>{if(n._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(e)),i={};for(const e of r)e in n||(i[e]={get(){const n=t[e];return"function"==typeof n?n.bind(t):n},set(n){t[e]=n},enumerable:!0,configurable:!1});return Object.defineProperties(n,i),t.once("aborted",()=>{n.destroy(),n.emit("aborted")}),t.once("close",()=>{t.complete&&n.readable?n.once("end",()=>{n.emit("close")}):n.emit("close")}),n}}var Hv=function(){if(Fv)return Bv;Fv=1;const{Transform:e,PassThrough:t}=p,n=m,r=qv();return Bv=i=>{const a=(i.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(a))return i;const s="br"===a;if(s&&"function"!=typeof n.createBrotliDecompress)return i.destroy(new Error("Brotli is not supported on Node.js < 12")),i;let o=!0;const c=new e({transform(e,t,n){o=!1,n(null,e)},flush(e){e()}}),u=new t({autoDestroy:!1,destroy(e,t){i.destroy(),t(e)}}),l=s?n.createBrotliDecompress():n.createUnzip();return l.once("error",e=>{!o||i.readable?u.destroy(e):u.end()}),r(i,u),i.pipe(c).pipe(l).pipe(u),u}}(),Yv=xe(Hv);const Vv=e=>"function"==typeof e;const Kv=e=>{if(Vv(e[Symbol.asyncIterator]))return e;if(Vv(e.getReader))return async function*(e){const t=e.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}(e);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")},Gv="abcdefghijklmnopqrstuvwxyz0123456789";const Wv=e=>String(e).replace(/\r|\n/g,(e,t,n)=>"\r"===e&&"\n"!==n[t+1]||"\n"===e&&"\r"!==n[t-1]?"\r\n":e);function Jv(e){if("object"!==(e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase())(e))return!1;const t=Object.getPrototypeOf(e);if(null==t)return!0;return(t.constructor&&t.constructor.toString())===Object.toString()}function Zv(e,t){if("string"==typeof t)for(const[n,r]of Object.entries(e))if(t.toLowerCase()===n.toLowerCase())return r}const Xv=e=>Boolean(e&&Vv(e.constructor)&&"FormData"===e[Symbol.toStringTag]&&Vv(e.append)&&Vv(e.getAll)&&Vv(e.entries)&&Vv(e[Symbol.iterator])),Qv=e=>String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),ew=e=>Boolean(e&&"object"==typeof e&&Vv(e.constructor)&&"File"===e[Symbol.toStringTag]&&Vv(e.stream)&&null!=e.name);var tw,nw,rw,iw,aw,sw,ow,cw,uw,lw,pw,dw=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},fw=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const hw={enableAdditionalHeaders:!1},mw={writable:!1,configurable:!1};class yw{constructor(e,t,n){if(tw.add(this),nw.set(this,"\r\n"),rw.set(this,void 0),iw.set(this,void 0),aw.set(this,"-".repeat(2)),sw.set(this,new TextEncoder),ow.set(this,void 0),cw.set(this,void 0),uw.set(this,void 0),!Xv(e))throw new TypeError("Expected first argument to be a FormData instance.");let r;if(Jv(t)?n=t:r=t,r||(r=function(){let e=16,t="";for(;e--;)t+=Gv[36*Math.random()|0];return t}()),"string"!=typeof r)throw new TypeError("Expected boundary argument to be a string.");if(n&&!Jv(n))throw new TypeError("Expected options argument to be an object.");dw(this,cw,Array.from(e.entries()),"f"),dw(this,uw,{...hw,...n},"f"),dw(this,rw,fw(this,sw,"f").encode(fw(this,nw,"f")),"f"),dw(this,iw,fw(this,rw,"f").byteLength,"f"),this.boundary=`form-data-boundary-${r}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,dw(this,ow,fw(this,sw,"f").encode(`${fw(this,aw,"f")}${this.boundary}${fw(this,aw,"f")}${fw(this,nw,"f").repeat(2)}`),"f");const i={"Content-Type":this.contentType},a=fw(this,tw,"m",pw).call(this);a&&(this.contentLength=a,i["Content-Length"]=a),this.headers=(e=>new Proxy(e,{get:(e,t)=>Zv(e,t),has:(e,t)=>void 0!==Zv(e,t)}))(Object.freeze(i)),Object.defineProperties(this,{boundary:mw,contentType:mw,contentLength:mw,headers:mw})}getContentLength(){return null==this.contentLength?void 0:Number(this.contentLength)}*values(){for(const[e,t]of fw(this,cw,"f")){const n=ew(t)?t:fw(this,sw,"f").encode(Wv(t));yield fw(this,tw,"m",lw).call(this,e,n),yield n,yield fw(this,rw,"f")}yield fw(this,ow,"f")}async*encode(){for(const e of this.values())ew(e)?yield*Kv(e.stream()):yield e}[(nw=new WeakMap,rw=new WeakMap,iw=new WeakMap,aw=new WeakMap,sw=new WeakMap,ow=new WeakMap,cw=new WeakMap,uw=new WeakMap,tw=new WeakSet,lw=function(e,t){let n="";n+=`${fw(this,aw,"f")}${this.boundary}${fw(this,nw,"f")}`,n+=`Content-Disposition: form-data; name="${Qv(e)}"`,ew(t)&&(n+=`; filename="${Qv(t.name)}"${fw(this,nw,"f")}`,n+=`Content-Type: ${t.type||"application/octet-stream"}`);const r=ew(t)?t.size:t.byteLength;return!0!==fw(this,uw,"f").enableAdditionalHeaders||null==r||isNaN(r)||(n+=`${fw(this,nw,"f")}Content-Length: ${ew(t)?t.size:t.byteLength}`),fw(this,sw,"f").encode(`${n}${fw(this,nw,"f").repeat(2)}`)},pw=function(){let e=0;for(const[t,n]of fw(this,cw,"f")){const r=ew(n)?n:fw(this,sw,"f").encode(Wv(n)),i=ew(r)?r.size:r.byteLength;if(null==i||isNaN(i))return;e+=fw(this,tw,"m",lw).call(this,t,r).byteLength,e+=i,e+=fw(this,iw,"f")}return String(e+fw(this,ow,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}}function gw(e){return Bb.nodeStream(e)&&Bb.function_(e.getBoundary)}function bw(e,t,n){const r={};for(const i of n){const n=(...e)=>{t.emit(i,...e)};r[i]=n,e.on(i,n)}return()=>{for(const[t,n]of Object.entries(r))e.off(t,n)}}const vw=Symbol("reentry"),ww=()=>{};class xw extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}}const _w=({attemptCount:e,retryOptions:t,error:n,retryAfter:r,computedValue:i})=>{if("RetryError"===n.name)return 1;if(e>t.limit)return 0;const a=t.methods.includes(n.options.method),s=t.errorCodes.includes(n.code),o=n.response&&t.statusCodes.includes(n.response.statusCode);if(!a||!s&&!o)return 0;if(n.response){if(r)return r>i?0:r;if(413===n.response.statusCode)return 0}const c=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+c},{Resolver:Tw}=te,Ew=Symbol("cacheableLookupCreateConnection"),Sw=Symbol("cacheableLookupInstance"),kw=Symbol("expires"),Mw="number"==typeof ie,Aw=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},Ow=()=>{let e=!1,t=!1;for(const n of Object.values(se.networkInterfaces()))for(const r of n)if(!r.internal&&("IPv6"===r.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},Rw=e=>e.catch(e=>{if("ENODATA"===e.code||"ENOTFOUND"===e.code||"ENOENT"===e.code)return[];throw e}),Iw={ttl:!0},Nw={all:!0},Cw={all:!0,family:4},Pw={all:!0,family:6};class jw{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:n=3600,errorTtl:r=.15,resolver:i=new Tw,lookup:a=ne}={}){if(this.maxTtl=t,this.errorTtl=r,this._cache=e,this._resolver=i,this._dnsLookup=a&&j(a),this.stats={cache:0,query:0},this._resolver instanceof Tw?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=j(this._resolver.resolve4.bind(this._resolver)),this._resolve6=j(this._resolver.resolve6.bind(this._resolver))),this._iface=Ow(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){const e=setInterval(()=>{this._hostnamesToFallback.clear()},1e3*n);e.unref&&e.unref(),this._fallbackInterval=e}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,n){if("function"==typeof t?(n=t,t={}):"number"==typeof t&&(t={family:t}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?n(null,e):n(null,e.address,e.family,e.expires,e.ttl,e.source)},n)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let n=await this.query(e);if(6===t.family){const e=n.filter(e=>6===e.family);t.hints&re&&(Mw&&t.hints&ie||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address=`::ffff:${t.address}`,t.family=6)})(n):n=e}else 4===t.family&&(n=n.filter(e=>4===e.family));if(t.hints&ae){const{_iface:e}=this;n=n.filter(t=>6===t.family?e.has6:e.has4)}if(0===n.length){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?n:n[0]}async query(e){let t="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){const r=this._pending[e];if(r)this.stats.cache++,n=await r;else{t="query";const r=this.queryAndCache(e);this._pending[e]=r,this.stats.query++;try{n=await r}finally{delete this._pending[e]}}}return n=n.map(e=>({...e,source:t})),n}async _resolve(e){const[t,n]=await Promise.all([Rw(this._resolve4(e,Iw)),Rw(this._resolve6(e,Iw))]);let r=0,i=0,a=0;const s=Date.now();for(const e of t)e.family=4,e.expires=s+1e3*e.ttl,r=Math.max(r,e.ttl);for(const e of n)e.family=6,e.expires=s+1e3*e.ttl,i=Math.max(i,e.ttl);return a=t.length>0?n.length>0?Math.min(r,i):r:i,{entries:[...t,...n],cacheTtl:a}}async _lookup(e){try{const[t,n]=await Promise.all([Rw(this._dnsLookup(e,Cw)),Rw(this._dnsLookup(e,Pw))]);return{entries:[...t,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,n){if(this.maxTtl>0&&n>0){n=1e3*Math.min(n,this.maxTtl),t[kw]=Date.now()+n;try{await this._cache.set(e,t,n)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}r=this._cache,Symbol.iterator in r&&this._tick(n)}var r}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Nw);let t=await this._resolve(e);0===t.entries.length&&this._dnsLookup&&(t=await this._lookup(e),0!==t.entries.length&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));const n=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,n),t.entries}_tick(e){const t=this._nextRemovalTime;(!t||e<t)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[n,r]of this._cache){const i=r[kw];t>=i?this._cache.delete(n):i<e&&(e=i)}e!==1/0&&this._tick(e-t)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Aw(e),Ew in e)throw new Error("CacheableLookup has been already installed");e[Ew]=e.createConnection,e[Sw]=this,e.createConnection=(t,n)=>("lookup"in t||(t.lookup=this.lookup),e[Ew](t,n))}uninstall(e){if(Aw(e),e[Ew]){if(e[Sw]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Ew],delete e[Ew],delete e[Sw]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=Ow(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}var Lw,$w,Dw,Uw,zw,Bw,Fw,qw,Hw,Yw;function Vw(){if($w)return Lw;$w=1;class e{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,"function"==typeof this.onEviction)for(const[e,t]of this.oldCache.entries())this.onEviction(e,t);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}}return Lw=e}function Kw(){return Uw||(Uw=1,Dw=e=>{if(0!==e.listenerCount("error"))return e;e.__destroy=e._destroy,e._destroy=(...t)=>{const n=t.pop();e.__destroy(...t,async e=>{await Promise.resolve(),n(e)})};const t=t=>{Promise.resolve().then(()=>{e.emit("error",t)})};return e.once("error",t),Promise.resolve().then(()=>{e.off("error",t)}),e}),Dw}function Gw(){if(Bw)return zw;Bw=1;const{URL:e}=C,t=f,n=ce,r=oe,i=Vw(),a=Kw(),s=Symbol("currentStreamCount"),o=Symbol("request"),c=Symbol("cachedOriginSet"),u=Symbol("gracefullyClosing"),l=Symbol("length"),p=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],d=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,h=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];r[c].length>0&&r[c].length<t[c].length&&r[c].every(e=>t[c].includes(e))&&r[s]+t[s]<=t.remoteSettings.maxConcurrentStreams&&y(r)}},m=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(t[c].length>0&&t[c].length<r[c].length&&t[c].every(e=>r[c].includes(e))&&t[s]+r[s]<=r.remoteSettings.maxConcurrentStreams)return y(t),!0}return!1},y=e=>{e[u]=!0,0===e[s]&&e.close()};class g extends t{constructor({timeout:e=0,maxSessions:t=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:r=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:33554432},this.tlsSessionCache=new i({maxSize:r})}get protocol(){return"https:"}normalizeOptions(e){let t="";for(let n=0;n<p.length;n++){const r=p[n];t+=":",e&&void 0!==e[r]&&(t+=e[r])}return t}_processQueue(){if(this._sessionCount>=this.maxSessions)this.closeEmptySessions(this.maxSessions-this._sessionCount+1);else for(const e in this.queue)for(const t in this.queue[e]){const n=this.queue[e][t];n.completed||(n.completed=!0,n())}}_isBetterSession(e,t){return e>t}_accept(e,t,n,r){let i=0;for(;i<t.length&&e[s]<e.remoteSettings.maxConcurrentStreams;)t[i].resolve(e),i++;t.splice(0,i),t.length>0&&(this.getSession(n,r,t),t.length=0)}getSession(t,n,i){return new Promise((a,p)=>{Array.isArray(i)&&i.length>0?(i=[...i],a()):i=[{resolve:a,reject:p}];try{if("string"==typeof t)t=new e(t);else if(!(t instanceof e))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(n){const{servername:e}=n,{hostname:r}=t;if(e&&r!==e)throw new Error(`Origin ${r} differs from servername ${e}`)}}catch(e){for(let t=0;t<i.length;t++)i[t].reject(e);return}const f=this.normalizeOptions(n),y=t.origin;if(f in this.sessions){const e=this.sessions[f];let t,r=-1,a=-1;for(let n=0;n<e.length;n++){const i=e[n],o=i.remoteSettings.maxConcurrentStreams;if(o<r)break;if(!i[c].includes(y))continue;const l=i[s];l>=o||i[u]||i.destroyed||(t||(r=o),this._isBetterSession(l,a)&&(t=i,a=l))}if(t)return void this._accept(t,i,y,n)}if(f in this.queue){if(y in this.queue[f])return void this.queue[f][y].listeners.push(...i)}else this.queue[f]={[l]:0};const g=()=>{f in this.queue&&this.queue[f][y]===b&&(delete this.queue[f][y],0===--this.queue[f][l]&&delete this.queue[f])},b=async()=>{this._sessionCount++;const e=`${y}:${f}`;let a,p=!1;try{const v={...n};void 0===v.settings&&(v.settings=this.settings),void 0===v.session&&(v.session=this.tlsSessionCache.get(e));const w=v.createConnection||this.createConnection;a=await w.call(this,t,v),v.createConnection=()=>a;const x=r.connect(t,v);x[s]=0,x[u]=!1;const _=()=>{const{socket:e}=x;let t;return!1===e.servername?(e.servername=e.remoteAddress,t=x.originSet,e.servername=!1):t=x.originSet,t},T=()=>x[s]<x.remoteSettings.maxConcurrentStreams;x.socket.once("session",t=>{this.tlsSessionCache.set(e,t)}),x.once("error",t=>{for(let e=0;e<i.length;e++)i[e].reject(t);this.tlsSessionCache.delete(e)}),x.setTimeout(this.timeout,()=>{x.destroy()}),x.once("close",()=>{if(this._sessionCount--,p){this._emptySessionCount--;const e=this.sessions[f];1===e.length?delete this.sessions[f]:e.splice(e.indexOf(x),1)}else{g();const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(let t=0;t<i.length;t++)i[t].reject(e)}this._processQueue()});const E=()=>{const e=this.queue[f];if(!e)return;const t=x[c];for(let n=0;n<t.length;n++){const r=t[n];if(r in e){const{listeners:t,completed:n}=e[r];let i=0;for(;i<t.length&&T();)t[i].resolve(x),i++;if(e[r].listeners.splice(0,i),0===e[r].listeners.length&&!n&&(delete e[r],0===--e[l])){delete this.queue[f];break}if(!T())break}}};x.on("origin",()=>{x[c]=_()||[],x[u]=!1,m(this.sessions[f],x),!x[u]&&T()&&(E(),T()&&h(this.sessions[f],x))}),x.once("remoteSettings",()=>{if(b.destroyed){const e=new Error("Agent has been destroyed");for(let t=0;t<i.length;t++)i[t].reject(e);return void x.destroy()}if(x.setLocalWindowSize&&x.setLocalWindowSize(4194304),x[c]=_()||[],x.socket.encrypted){const e=x[c][0];if(e!==y){const t=new Error(`Requested origin ${y} does not match server ${e}`);for(let e=0;e<i.length;e++)i[e].reject(t);return void x.destroy()}}g();{const e=this.sessions;if(f in e){const t=e[f];t.splice(((e,t,n)=>{let r=0,i=e.length;for(;r<i;){const a=r+i>>>1;n(e[a],t)?r=a+1:i=a}return r})(t,x,d),0,x)}else e[f]=[x]}p=!0,this._emptySessionCount++,this.emit("session",x),this._accept(x,i,y,n),0===x[s]&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),x.on("remoteSettings",()=>{T()&&(E(),T()&&h(this.sessions[f],x))})}),x[o]=x.request,x.request=(e,t)=>{if(x[u])throw new Error("The session is gracefully closing. No new streams are allowed.");const n=x[o](e,t);return x.ref(),0===x[s]++&&this._emptySessionCount--,n.once("close",()=>{0===--x[s]&&(this._emptySessionCount++,x.unref(),this._emptySessionCount>this.maxEmptySessions||x[u])?x.close():x.destroyed||x.closed||T()&&!m(this.sessions[f],x)&&(h(this.sessions[f],x),E(),0===x[s]&&this._processQueue())}),n}}catch(e){g(),this._sessionCount--;for(let t=0;t<i.length;t++)i[t].reject(e)}};b.listeners=i,b.completed=!1,b.destroyed=!1,this.queue[f][y]=b,this.queue[f][l]++,this._processQueue()})}request(e,t,n,r){return new Promise((i,s)=>{this.getSession(e,t,[{reject:s,resolve:e=>{try{const t=e.request(n,r);a(t),i(t)}catch(e){s(e)}}}])})}async createConnection(e,t){return g.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443,i=e.hostname;void 0===t.servername&&(t.servername=i);const a=n.connect(r,i,t);return t.socket&&(a._peername={family:void 0,address:void 0,port:r}),a}closeEmptySessions(e=Number.POSITIVE_INFINITY){let t=0;const{sessions:n}=this;for(const r in n){const i=n[r];for(let n=0;n<i.length;n++){const r=i[n];if(0===r[s]&&(t++,r.close(),t>=e))return t}}return t}destroy(e){const{sessions:t,queue:n}=this;for(const n in t){const r=t[n];for(let t=0;t<r.length;t++)r[t].destroy(e)}for(const e in n){const t=n[e];for(const e in t)t[e].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}}return g.kCurrentStreamCount=s,g.kGracefullyClosing=u,zw={Agent:g,globalAgent:new g}}function Ww(){if(qw)return Fw;qw=1;const{Readable:e}=p;return Fw=class extends e{constructor(e,t){super({emitClose:!1,autoDestroy:!0,highWaterMark:t}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,t){this.readableEnded||(this.aborted=!0),t(),this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}},Fw}function Jw(){return Yw?Hw:(Yw=1,Hw=(e,t,n)=>{for(const r of n)e.on(r,(...e)=>t.emit(r,...e))})}var Zw,Xw,Qw,ex,tx,nx,rx,ix,ax,sx,ox,cx={exports:{}};function ux(){return Zw||(Zw=1,function(e){const t=(t,n,r)=>{e.exports[n]=class extends t{constructor(...e){super("string"==typeof r?r:r(e)),this.name=`${super.name} [${n}]`,this.code=n}}};t(TypeError,"ERR_INVALID_ARG_TYPE",e=>{const t=e[0].includes(".")?"property":"argument";let n=e[1];const r=Array.isArray(n);return r&&(n=`${n.slice(0,-1).join(", ")} or ${n.slice(-1)}`),`The "${e[0]}" ${t} must be ${r?"one of":"of"} type ${n}. Received ${typeof e[2]}`}),t(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`),t(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`),t(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`),t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`),t(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`),t(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")}(cx)),cx.exports}function lx(){return Qw?Xw:(Qw=1,Xw=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}})}function px(){if(tx)return ex;tx=1;const{ERR_INVALID_HTTP_TOKEN:e}=ux(),t=lx(),n=/^[\^`\-\w!#$%&*+.|~]+$/;return ex=r=>{if("string"!=typeof r||!n.test(r)&&!t(r))throw new e("Header name",r)}}function dx(){if(rx)return nx;rx=1;const{ERR_HTTP_INVALID_HEADER_VALUE:e,ERR_INVALID_CHAR:t}=ux(),n=/[^\t\u0020-\u007E\u0080-\u00FF]/;return nx=(r,i)=>{if(void 0===i)throw new e(i,r);if(n.test(i))throw new t("header content",r)}}function fx(){if(ox)return sx;ox=1;const{URL:e,urlToHttpOptions:t}=C,n=oe,{Writable:r}=p,{Agent:i,globalAgent:a}=Gw(),s=Ww(),o=Jw(),{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_PROTOCOL:u,ERR_HTTP_HEADERS_SENT:l}=ux(),d=px(),f=dx(),h=function(){if(ax)return ix;ax=1;const{ERR_HTTP2_NO_SOCKET_MANIPULATION:e}=ux(),t={has(e,t){const n=void 0===e.session?e:e.session.socket;return t in e||t in n},get(t,n){switch(n){case"on":case"once":case"end":case"emit":case"destroy":return t[n].bind(t);case"writable":case"destroyed":return t[n];case"readable":return!t.destroyed&&t.readable;case"setTimeout":{const{session:e}=t;return void 0!==e?e.setTimeout.bind(e):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new e;default:{const e=void 0===t.session?t:t.session.socket,r=e[n];return"function"==typeof r?r.bind(e):r}}},getPrototypeOf:e=>void 0!==e.session?Reflect.getPrototypeOf(e.session.socket):Reflect.getPrototypeOf(e),set(t,n,r){switch(n){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[n]=r,!0;case"setTimeout":{const{session:e}=t;return void 0===e?t.setTimeout=r:e.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new e;default:return(void 0===t.session?t:t.session.socket)[n]=r,!0}}};return ix=t}(),{HTTP2_HEADER_STATUS:m,HTTP2_HEADER_METHOD:y,HTTP2_HEADER_PATH:g,HTTP2_HEADER_AUTHORITY:b,HTTP2_METHOD_CONNECT:v}=n.constants,w=Symbol("headers"),x=Symbol("origin"),_=Symbol("session"),T=Symbol("options"),E=Symbol("flushedHeaders"),S=Symbol("jobs"),k=Symbol("pendingAgentPromise");return sx=class extends r{constructor(n,r,s){if(super({autoDestroy:!1,emitClose:!1}),n="string"==typeof n?t(new e(n)):n instanceof e?t(n):{...n},"function"==typeof r||void 0===r?(s=r,r=n):r=Object.assign(n,r),r.h2session){if(this[_]=r.h2session,this[_].destroyed)throw new Error("The session has been closed already");this.protocol=this[_].socket.encrypted?"https:":"http:"}else if(!1===r.agent)this.agent=new i({maxEmptySessions:0});else if(void 0===r.agent||null===r.agent)this.agent=a;else{if("function"!=typeof r.agent.request)throw new c("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);this.agent=r.agent}if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new u(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;const{timeout:o}=r;r.timeout=void 0,this[w]=Object.create(null),this[S]=[],this[k]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",("CONNECT"!==this.method||"/"!==r.path&&void 0!==r.path)&&(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;const{headers:l}=r;if(l)for(const e in l)this.setHeader(e,l[e]);r.auth&&!("authorization"in this[w])&&(this[w].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[T]=r,this[x]=new e(`${this.protocol}//${r.servername||r.host}:${r.port}`);const p=r._reuseSocket;p&&(r.createConnection=(...e)=>p.destroyed?this.agent.createConnection(...e):p,this.agent.getSession(this[x],this[T]).catch(()=>{})),o&&this.setTimeout(o),s&&this.once("response",s),this[E]=!1}get method(){return this[w][y]}set method(e){e&&(this[w][y]=e.toUpperCase())}get path(){const e="CONNECT"===this.method?b:g;return this[w][e]}set path(e){if(e){const t="CONNECT"===this.method?b:g;this[w][t]=e}}get host(){return this[x].hostname}set host(e){}get _mustNotHaveABody(){return"GET"===this.method||"HEAD"===this.method||"DELETE"===this.method}_write(e,t,n){if(this._mustNotHaveABody)return void n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));this.flushHeaders();const r=()=>this._request.write(e,t,n);this._request?r():this[S].push(r)}_final(e){this.flushHeaders();const t=()=>{this._mustNotHaveABody||"CONNECT"===this.method?e():this._request.end(e)};this._request?t():this[S].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(e,t){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[k]}catch(t){this.aborted&&(e=t)}t(e)}async flushHeaders(){if(this[E]||this.destroyed)return;this[E]=!0;const e=this.method===v,t=t=>{if(this._request=t,this.destroyed)return void t.destroy();e||o(t,this,["timeout","continue"]),t.once("error",e=>{this.destroy(e)}),t.once("aborted",()=>{const{res:e}=this;e?(e.aborted=!0,e.emit("aborted"),e.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});const n=(n,r,i)=>{const a=new s(this.socket,t.readableHighWaterMark);this.res=a,a.url=`${this[x].origin}${this.path}`,a.req=this,a.statusCode=n[m],a.headers=n,a.rawHeaders=i,a.once("end",()=>{a.complete=!0,a.socket=null,a.connection=null}),e?(a.upgrade=!0,this.emit("connect",a,t,Buffer.alloc(0))?this.emit("close"):t.destroy()):(t.on("data",e=>{a._dumped||a.push(e)||t.pause()}),t.once("end",()=>{this.aborted||a.push(null)}),this.emit("response",a)||a._dump())};t.once("response",n),t.once("headers",e=>this.emit("information",{statusCode:e[m]})),t.once("trailers",(e,t,r)=>{const{res:i}=this;null!==i?(i.trailers=e,i.rawTrailers=r):n(e,0,r)}),t.once("close",()=>{const{aborted:e,res:t}=this;if(t){e&&(t.aborted=!0,t.emit("aborted"),t.destroy());const n=()=>{t.emit("close"),this.destroy(),this.emit("close")};return void(t.readable?t.once("end",n):n())}if(!this.destroyed)return this.destroy(new Error("The HTTP/2 stream has been early terminated")),void this.emit("close");this.destroy(),this.emit("close")}),this.socket=new Proxy(t,h);for(const e of this[S])e();this[S].length=0,this.emit("socket",this.socket)};if(b in this[w]||e||(this[w][b]=this[x].host),this[_])try{t(this[_].request(this[w]))}catch(e){this.destroy(e)}else{this.reusedSocket=!0;try{const e=this.agent.request(this[x],this[T],this[w]);this[k]=e,t(await e),this[k]=!1}catch(e){this[k]=!1,this.destroy(e)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[w])}hasHeader(e){if("string"!=typeof e)throw new c("name","string",e);return Boolean(this[w][e.toLowerCase()])}getHeader(e){if("string"!=typeof e)throw new c("name","string",e);return this[w][e.toLowerCase()]}get headersSent(){return this[E]}removeHeader(e){if("string"!=typeof e)throw new c("name","string",e);if(this.headersSent)throw new l("remove");delete this[w][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new l("set");d(e),f(e,t);const n=e.toLowerCase();if("connection"===n){if("keep-alive"===t.toLowerCase())return;throw new Error(`Invalid 'connection' header: ${t}`)}"host"===n&&"CONNECT"===this.method?this[w][b]=t:this[w][n]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const n=()=>this._request.setTimeout(e,t);return this._request?n():this[S].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}},sx}var hx,mx,yx,gx,bx,vx,wx,xx,_x,Tx,Ex,Sx,kx,Mx,Ax,Ox,Rx,Ix,Nx,Cx,Px,jx,Lx,$x,Dx,Ux={exports:{}};function zx(){if(gx)return yx;gx=1;const{isIP:e}=ue,t=M;return yx=n=>{const r=(e=>{if("["===e[0]){const n=e.indexOf("]");return t(-1!==n),e.slice(1,n)}const n=e.indexOf(":");return-1===n?e:e.slice(0,n)})(n);return e(r)?"":r}}function Bx(){if(bx)return Ux.exports;bx=1;const{URL:e,urlToHttpOptions:t}=C,n=b,r=w,i=function(){if(mx)return hx;mx=1;const e=ce;return hx=(t={},n=e.connect)=>new Promise((e,r)=>{let i,a=!1;const s=async()=>{await c,i.off("timeout",o),i.off("error",r),t.resolveSocket?(e({alpnProtocol:i.alpnProtocol,socket:i,timeout:a}),a&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),e({alpnProtocol:i.alpnProtocol,timeout:a}))},o=async()=>{a=!0,s()},c=(async()=>{try{i=await n(t,s),i.on("error",r),i.once("timeout",o)}catch(e){r(e)}})()}),hx}(),a=Vw(),{Agent:s,globalAgent:o}=Gw(),c=fx(),u=zx(),l=Kw(),p=new a({maxSize:100}),d=new Map,f=(e,t=new Map,n=void 0)=>async r=>{const a=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!e.has(a)){if(t.has(a)){return{alpnProtocol:(await t.get(a)).alpnProtocol}}const{path:s}=r;r.path=r.socketPath;const o=i(r,n);t.set(a,o);try{const n=await o;return e.set(a,n.alpnProtocol),t.delete(a),r.path=s,n}catch(e){throw t.delete(a),r.path=s,e}}return{alpnProtocol:e.get(a)}},h=f(p,d);return Ux.exports=async(i,a,p)=>{if(i="string"==typeof i?t(new e(i)):i instanceof e?t(i):{...i},"function"==typeof a||void 0===a?(p=a,a=i):a=Object.assign(i,a),a.ALPNProtocols=a.ALPNProtocols||["h2","http/1.1"],!Array.isArray(a.ALPNProtocols)||0===a.ALPNProtocols.length)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");a.protocol=a.protocol||"https:";const d="https:"===a.protocol;a.host=a.hostname||a.host||"localhost",a.session=a.tlsSession,a.servername=a.servername||u(a.headers&&a.headers.host||a.host),a.port=a.port||(d?443:80),a._defaultAgent=d?r.globalAgent:n.globalAgent;const f=a.resolveProtocol||h;let{agent:m}=a;if(void 0!==m&&!1!==m&&"Object"!==m.constructor.name)throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(d){a.resolveSocket=!0;let{socket:e,alpnProtocol:t,timeout:n}=await f(a);if(n){e&&e.destroy();const t=new Error(`Timed out resolving ALPN: ${a.timeout} ms`);throw t.code="ETIMEDOUT",t.ms=a.timeout,t}e&&a.createConnection&&(e.destroy(),e=void 0),delete a.resolveSocket;const i="h2"===t;if(m&&(m=i?m.http2:m.https,a.agent=m),void 0===m&&(m=i?o:r.globalAgent),e)if(!1===m)e.destroy();else{const t=(i?s:r.Agent).prototype.createConnection;m.createConnection===t?i?a._reuseSocket=e:((e,t,n)=>{t._httpMessage={shouldKeepAlive:!0};const r=()=>{e.emit("free",t,n)};t.on("free",r);const i=()=>{e.removeSocket(t,n)};t.on("close",i);const a=()=>{const{freeSockets:n}=e;for(const e of Object.values(n))if(e.includes(t))return void t.destroy()};t.on("timeout",a);const s=()=>{e.removeSocket(t,n),t.off("close",i),t.off("free",r),t.off("timeout",a),t.off("agentRemove",s)};t.on("agentRemove",s),e.emit("free",t,n)})(m,e,a):e.destroy()}if(i)return l(new c(a,p))}else m&&(a.agent=m.http);return a.headers&&(a.headers={...a.headers},a.headers[":authority"]&&(a.headers.host||(a.headers.host=a.headers[":authority"]),delete a.headers[":authority"]),delete a.headers[":method"],delete a.headers[":scheme"],delete a.headers[":path"]),l(n.request(a,p))},Ux.exports.protocolCache=p,Ux.exports.resolveProtocol=h,Ux.exports.createResolveProtocol=f,Ux.exports}function Fx(){if(wx)return vx;wx=1;const e=p,t=new ce.TLSSocket(new e.PassThrough)._handle._parentWrap.constructor;return vx=t}function qx(){if(_x)return xx;_x=1;class e extends Error{constructor(e,t=""){super(`The proxy server rejected the request with status code ${e} (${t||"empty status message"})`),this.statusCode=e,this.statusMessage=t}}return xx=e}function Hx(){if(kx)return Sx;kx=1;const{URL:e}=C,t=(Ex||(Ex=1,Tx=(e,t,n)=>{const r=n.some(e=>"string"==typeof e?typeof t===e:t instanceof e);if(!r){const r=n.map(e=>"string"==typeof e?e:e.name);throw new TypeError(`Expected '${e}' to be a type of ${r.join(" or ")}, got ${typeof t}`)}}),Tx);return Sx=(n,r)=>{t("proxyOptions",r,["object"]),t("proxyOptions.headers",r.headers,["object","undefined"]),t("proxyOptions.raw",r.raw,["boolean","undefined"]),t("proxyOptions.url",r.url,[e,"string"]);const i=new e(r.url);n.proxyOptions={raw:!0,...r,headers:{...r.headers},url:i}}}function Yx(){return Ax?Mx:(Ax=1,Mx=e=>{const{username:t,password:n}=e.proxyOptions.url;if(t||n){const e=`${t}:${n}`,r=`Basic ${Buffer.from(e).toString("base64")}`;return{"proxy-authorization":r,authorization:r}}return{}})}function Vx(){if(Nx)return Ix;Nx=1;const{Agent:e}=Gw(),t=Fx(),n=qx(),r=Hx();return Ix=class extends e{constructor(e){super(e),r(this,e.proxyOptions)}async createConnection(e,r){const i=`${e.hostname}:${e.port||443}`,[a,s,o]=await this._getProxyStream(i);if(200!==s)throw new n(s,o);if(!this.proxyOptions.raw){const e=new t(a);return e.encrypted=!1,e._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},e}return r.socket=a,super.createConnection(e,r)}},Ix}function Kx(){if(Px)return Cx;Px=1;const{globalAgent:e}=Gw(),t=Vx(),n=Yx();return Cx=class extends t{async _getProxyStream(t){const{proxyOptions:r}=this,i={...n(this),...r.headers,":method":"CONNECT",":authority":t},a=await e.request(r.url,r,i),s=await(e=>new Promise((t,n)=>{e.once("error",n),e.once("response",r=>{e.off("error",n),t(r[":status"])})}))(a);return[a,s,""]}},Cx}function Gx(){if(Lx)return jx;Lx=1;const e=b,t=w,n=Vx(),r=Yx();class i extends n{async _getProxyStream(n){const{proxyOptions:i}=this,{url:a,headers:s}=this.proxyOptions;return(e=>new Promise((t,n)=>{e.once("error",n),e.once("connect",(r,i,a)=>{i.unshift(a),e.off("error",n),t([i,r.statusCode,r.statusMessage])})}))(("https:"===a.protocol?t:e).request({...i,hostname:a.hostname,port:a.port,path:n,headers:{...r(this),...s,host:n},method:"CONNECT"}).end())}}return jx={Http2OverHttp:i,Http2OverHttps:i}}var Wx=function(){if(Dx)return $x;Dx=1;const e=oe,{Agent:t,globalAgent:n}=Gw(),r=fx(),i=Ww(),a=Bx(),{HttpOverHttp2:s,HttpsOverHttp2:o}=function(){if(Rx)return Ox;Rx=1;const e=ce,t=b,n=w,r=Fx(),{globalAgent:i}=Gw(),a=qx(),s=Hx(),o=Yx(),c=(t,s,c)=>{(async()=>{try{const{proxyOptions:u}=t,{url:l,headers:p,raw:d}=u,f=await i.request(l,u,{...o(t),...p,":method":"CONNECT",":authority":`${s.host}:${s.port}`});f.once("error",c),f.once("response",i=>{const o=i[":status"];if(200!==o)return void c(new a(o,""));const u=t instanceof n.Agent;if(d&&u){s.socket=f;const t=e.connect(s);return t.once("close",()=>{f.destroy()}),void c(null,t)}const l=new r(f);l.encrypted=!1,l._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},c(null,l)})}catch(e){c(e)}})()};class u extends t.Agent{constructor(e){super(e),s(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}class l extends n.Agent{constructor(e){super(e),s(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}return Ox={HttpOverHttp2:u,HttpsOverHttp2:l}}(),c=Kx(),{Http2OverHttp:u,Http2OverHttps:l}=Gx(),p=px(),d=dx();return $x={...e,ClientRequest:r,IncomingMessage:i,Agent:t,globalAgent:n,request:(e,t,n)=>new r(e,t,n),get:(e,t,n)=>{const i=new r(e,t,n);return i.end(),i},auto:a,proxies:{HttpOverHttp2:s,HttpsOverHttp2:o,Http2OverHttp2:c,Http2OverHttp:u,Http2OverHttps:l},validateHeaderName:p,validateHeaderValue:d},$x}(),Jx=xe(Wx);const[Zx,Xx]=B.versions.node.split(".").map(Number);const Qx=new Map;let e_;const t_={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform:e=>"json"===e.request.options.responseType?e.body:JSON.parse(e.body),paginate({response:e}){const t=e.headers.link;if("string"!=typeof t||""===t.trim())return!1;const n=function(e){const t=[],n=e.split(",");for(const r of n){const[n,...i]=r.split(";"),a=n.trim();if("<"!==a[0]||">"!==a[a.length-1])throw new Error(`Invalid format of the Link header reference: ${a}`);const s=a.slice(1,-1),o={};if(0===i.length)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(const t of i){const n=t.trim(),r=n.indexOf("=");if(-1===r)throw new Error(`Failed to parse Link header: ${e}`);const i=n.slice(0,r).trim(),a=n.slice(r+1).trim();o[i]=a}t.push({reference:s,parameters:o})}return t}(t).find(e=>"next"===e.parameters.rel||'"next"'===e.parameters.rel);return!!n&&{url:new URL(n.reference,e.url)}},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},n_=e=>{const t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter(e=>"number"==typeof e);if(t.length>0)return Math.min(...t)},r_=(e,t,n)=>{const r=e.hooks?.init;if(r)for(const e of r)e(t,n)};class i_{constructor(e,t,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Kb.any([Bb.string,Bb.urlInstance,Bb.object,Bb.undefined],e),Kb.any([Bb.object,Bb.undefined],t),Kb.any([Bb.object,Bb.undefined],n),e instanceof i_||t instanceof i_)throw new TypeError("The defaults must be passed as the third argument");this._internals=(e=>{const{hooks:t,retry:n}=e,r={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...n,errorCodes:[...n.errorCodes],methods:[...n.methods],statusCodes:[...n.statusCodes]},timeout:{...e.timeout},hooks:{init:[...t.init],beforeRequest:[...t.beforeRequest],beforeError:[...t.beforeError],beforeRedirect:[...t.beforeRedirect],beforeRetry:[...t.beforeRetry],afterResponse:[...t.afterResponse]},searchParams:e.searchParams?new URLSearchParams(e.searchParams):void 0,pagination:{...e.pagination}};return void 0!==r.url&&(r.prefixUrl=""),r})(n?._internals??n??t_),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(Bb.plainObject(e))try{this.merge(e),this.merge(t)}finally{this.url=e.url}else try{this.merge(t)}finally{if(void 0!==t?.url){if(void 0!==e)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");this.url=t.url}else void 0!==e&&(this.url=e)}}catch(e){throw e.options=this,e}}merge(e){if(e)if(e instanceof i_)for(const t of e._init)this.merge(t);else{e=(e=>{const{hooks:t,retry:n}=e,r={...e};return Bb.object(e.context)&&(r.context={...e.context}),Bb.object(e.cacheOptions)&&(r.cacheOptions={...e.cacheOptions}),Bb.object(e.https)&&(r.https={...e.https}),Bb.object(e.cacheOptions)&&(r.cacheOptions={...r.cacheOptions}),Bb.object(e.agent)&&(r.agent={...e.agent}),Bb.object(e.headers)&&(r.headers={...e.headers}),Bb.object(n)&&(r.retry={...n},Bb.array(n.errorCodes)&&(r.retry.errorCodes=[...n.errorCodes]),Bb.array(n.methods)&&(r.retry.methods=[...n.methods]),Bb.array(n.statusCodes)&&(r.retry.statusCodes=[...n.statusCodes])),Bb.object(e.timeout)&&(r.timeout={...e.timeout}),Bb.object(t)&&(r.hooks={...t},Bb.array(t.init)&&(r.hooks.init=[...t.init]),Bb.array(t.beforeRequest)&&(r.hooks.beforeRequest=[...t.beforeRequest]),Bb.array(t.beforeError)&&(r.hooks.beforeError=[...t.beforeError]),Bb.array(t.beforeRedirect)&&(r.hooks.beforeRedirect=[...t.beforeRedirect]),Bb.array(t.beforeRetry)&&(r.hooks.beforeRetry=[...t.beforeRetry]),Bb.array(t.afterResponse)&&(r.hooks.afterResponse=[...t.afterResponse])),Bb.object(e.pagination)&&(r.pagination={...e.pagination}),r})(e),r_(this,e,this),r_(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let t=!1;for(const n in e){if("mutableDefaults"===n||"handlers"===n)continue;if("url"===n)continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);const r=e[n];void 0!==r&&(this[n]=r,t=!0)}t&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){Kb.any([Bb.function_,Bb.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){Kb.plainObject(e);for(const t in e){if(!(t in this._internals.agent))throw new TypeError(`Unexpected agent option: ${t}`);Kb.any([Bb.object,Bb.undefined],e[t])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){Kb.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){Kb.plainObject(e);for(const t in e){if(!(t in this._internals.timeout))throw new Error(`Unexpected timeout option: ${t}`);Kb.any([Bb.number,Bb.undefined],e[t])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(Kb.any([Bb.string,Bb.urlInstance],e),""!==e){if((e=e.toString()).endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){const{href:t}=this._internals.url;this._internals.url.href=e+t.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}else this._internals.prefixUrl=""}get body(){return this._internals.body}set body(e){Kb.any([Bb.string,Bb.buffer,Bb.nodeStream,Bb.generator,Bb.asyncGenerator,Xv,Bb.undefined],e),Bb.nodeStream(e)&&Kb.truthy(e.readable),void 0!==e&&(Kb.undefined(this._internals.form),Kb.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){Kb.any([Bb.plainObject,Bb.undefined],e),void 0!==e&&(Kb.undefined(this._internals.body),Kb.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){void 0!==e&&(Kb.undefined(this._internals.body),Kb.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(Kb.any([Bb.string,Bb.urlInstance,Bb.undefined],e),void 0===e)return void(this._internals.url=void 0);if(Bb.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");const t=`${this.prefixUrl}${e.toString()}`,n=new URL(t);if(this._internals.url=n,"unix:"===n.protocol&&(n.href=`http://unix${n.pathname}${n.search}`),"http:"!==n.protocol&&"https:"!==n.protocol){const e=new Error(`Unsupported protocol: ${n.protocol}`);throw e.code="ERR_UNSUPPORTED_PROTOCOL",e}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),"unix"===n.hostname){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");const e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(e?.groups){const{socketPath:t,path:n}=e.groups;this._unixOptions={socketPath:t,path:n,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(Kb.any([Bb.object,Bb.undefined],e),void 0===e)return void(this._internals.cookieJar=void 0);let{setCookie:t,getCookieString:n}=e;Kb.function_(t),Kb.function_(n),4===t.length&&0===n.length?(t=j(t.bind(e)),n=j(n.bind(e)),this._internals.cookieJar={setCookie:t,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){Kb.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){Kb.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(void 0===this._internals.searchParams&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(e){Kb.any([Bb.string,Bb.object,Bb.undefined],e);const t=this._internals.url;if(void 0===e)return this._internals.searchParams=void 0,void(t&&(t.search=""));const n=this.searchParams;let r;if(Bb.string(e))r=new URLSearchParams(e);else if(e instanceof URLSearchParams)r=e;else{!function(e){for(const t in e){const n=e[t];Kb.any([Bb.string,Bb.number,Bb.boolean,Bb.null_,Bb.undefined],n)}}(e),r=new URLSearchParams;for(const t in e){const i=e[t];null===i?r.append(t,""):void 0===i?n.delete(t):r.append(t,i)}}if(this._merging){for(const e of r.keys())n.delete(e);for(const[e,t]of r)n.append(e,t)}else t?t.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){Kb.any([Bb.function_,Bb.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){Kb.any([Bb.object,Bb.boolean,Bb.undefined],e),this._internals.dnsCache=!0===e?e_||(e_=new jw,e_):!1===e?void 0:e}get context(){return this._internals.context}set context(e){Kb.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){Kb.object(e);for(const t in e){if(!(t in this._internals.hooks))throw new Error(`Unexpected hook event: ${t}`);const n=t,r=e[n];if(Kb.any([Bb.array,Bb.undefined],r),r)for(const e of r)Kb.function_(e);if(this._merging)r&&this._internals.hooks[n].push(...r);else{if(!r)throw new Error(`Missing hook event: ${t}`);this._internals.hooks[t]=[...r]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){Kb.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){Kb.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){Kb.any([Bb.object,Bb.string,Bb.boolean,Bb.undefined],e),this._internals.cache=!0===e?Qx:!1===e?void 0:e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){Kb.boolean(e),this._internals.throwHttpErrors=e}get username(){const e=this._internals.url,t=e?e.username:this._internals.username;return decodeURIComponent(t)}set username(e){Kb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.username=n:this._internals.username=n}get password(){const e=this._internals.url,t=e?e.password:this._internals.password;return decodeURIComponent(t)}set password(e){Kb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){Kb.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){Kb.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){Kb.plainObject(e),this._merging?Object.assign(this._internals.headers,_v(e)):this._internals.headers=_v(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){Kb.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(void 0!==e&&4!==e&&6!==e)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){Kb.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){Kb.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(Kb.plainObject(e),Kb.any([Bb.function_,Bb.undefined],e.calculateDelay),Kb.any([Bb.number,Bb.undefined],e.maxRetryAfter),Kb.any([Bb.number,Bb.undefined],e.limit),Kb.any([Bb.array,Bb.undefined],e.methods),Kb.any([Bb.array,Bb.undefined],e.statusCodes),Kb.any([Bb.array,Bb.undefined],e.errorCodes),Kb.any([Bb.number,Bb.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(const t in e)if(!(t in this._internals.retry))throw new Error(`Unexpected retry option: ${t}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};const{retry:t}=this._internals;t.methods=[...new Set(t.methods.map(e=>e.toUpperCase()))],t.statusCodes=[...new Set(t.statusCodes)],t.errorCodes=[...new Set(t.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){Kb.any([Bb.string,Bb.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){Kb.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){Kb.any([Bb.function_,Bb.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){Kb.plainObject(e),Kb.any([Bb.boolean,Bb.undefined],e.shared),Kb.any([Bb.number,Bb.undefined],e.cacheHeuristic),Kb.any([Bb.number,Bb.undefined],e.immutableMinTimeToLive),Kb.any([Bb.boolean,Bb.undefined],e.ignoreCargoCult);for(const t in e)if(!(t in this._internals.cacheOptions))throw new Error(`Cache option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){Kb.plainObject(e),Kb.any([Bb.boolean,Bb.undefined],e.rejectUnauthorized),Kb.any([Bb.function_,Bb.undefined],e.checkServerIdentity),Kb.any([Bb.string,Bb.object,Bb.array,Bb.undefined],e.certificateAuthority),Kb.any([Bb.string,Bb.object,Bb.array,Bb.undefined],e.key),Kb.any([Bb.string,Bb.object,Bb.array,Bb.undefined],e.certificate),Kb.any([Bb.string,Bb.undefined],e.passphrase),Kb.any([Bb.string,Bb.buffer,Bb.array,Bb.undefined],e.pfx),Kb.any([Bb.array,Bb.undefined],e.alpnProtocols),Kb.any([Bb.string,Bb.undefined],e.ciphers),Kb.any([Bb.string,Bb.buffer,Bb.undefined],e.dhparam),Kb.any([Bb.string,Bb.undefined],e.signatureAlgorithms),Kb.any([Bb.string,Bb.undefined],e.minVersion),Kb.any([Bb.string,Bb.undefined],e.maxVersion),Kb.any([Bb.boolean,Bb.undefined],e.honorCipherOrder),Kb.any([Bb.number,Bb.undefined],e.tlsSessionLifetime),Kb.any([Bb.string,Bb.undefined],e.ecdhCurve),Kb.any([Bb.string,Bb.buffer,Bb.array,Bb.undefined],e.certificateRevocationLists);for(const t in e)if(!(t in this._internals.https))throw new Error(`HTTPS option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(null===e)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Kb.any([Bb.string,Bb.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){Kb.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){Kb.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(void 0!==e){if("text"!==e&&"buffer"!==e&&"json"!==e)throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}else this._internals.responseType="text"}get pagination(){return this._internals.pagination}set pagination(e){Kb.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){Kb.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){Kb.any([Bb.number,Bb.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){Kb.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,t){return L(this._internals,t)}createNativeRequestOptions(){const e=this._internals;let t;t="https:"===e.url.protocol?e.http2?e.agent:e.agent.https:e.agent.http;const{https:n}=e;let{pfx:r}=n;return Bb.array(r)&&Bb.plainObject(r[0])&&(r=r.map(e=>({buf:e.buffer,passphrase:e.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:n.alpnProtocols,ca:n.certificateAuthority,cert:n.certificate,key:n.key,passphrase:n.passphrase,pfx:n.pfx,rejectUnauthorized:n.rejectUnauthorized,checkServerIdentity:n.checkServerIdentity??Q,ciphers:n.ciphers,honorCipherOrder:n.honorCipherOrder,minVersion:n.minVersion,maxVersion:n.maxVersion,sigalgs:n.signatureAlgorithms,sessionTimeout:n.tlsSessionLifetime,dhparam:n.dhparam,ecdhCurve:n.ecdhCurve,crl:n.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:t,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?n_(e):void 0,h2session:e.h2session}}getRequestFunction(){const e=this._internals.url,{request:t}=this._internals;return!t&&e?this.getFallbackRequestFunction():t}getFallbackRequestFunction(){const e=this._internals.url;if(e){if("https:"===e.protocol){if(this._internals.http2){if(Zx<15||15===Zx&&Xx<10){const e=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw e.code="EUNSUPPORTED",e}return Jx.auto}return ee.request}return K.request}}freeze(){const e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}}const a_=e=>{const{statusCode:t}=e,n=e.request.options.followRedirect?299:399;return t>=200&&t<=n||304===t};class s_ extends Jb{constructor(e,t){const{options:n}=t.request;super(`${e.message} in "${n.url.toString()}"`,e,t.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}}const o_=(e,t,n,r)=>{const{rawBody:i}=e;try{if("text"===t)return i.toString(r);if("json"===t)return 0===i.length?"":n(i.toString(r));if("buffer"===t)return i}catch(t){throw new s_(t,e)}throw new s_({message:`Unknown body type '${t}'`,name:"Error"},e)};function c_(e){return"unix:"===e.protocol||"unix"===e.hostname}const{buffer:u_}=wv,l_=Bb.string(B.versions.brotli),p_=new Set(["GET","HEAD"]),d_=new class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,t){"object"==typeof e?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return"object"==typeof e?this.weakMap.get(e):this.map.get(e)}has(e){return"object"==typeof e?this.weakMap.has(e):this.map.has(e)}},f_=new Set([300,301,302,303,304,307,308]),h_=["socket","connect","continue","information","upgrade"],m_=()=>{};class y_ extends V{constructor(e,t,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=m_,this._triggerRead=!1,this._cancelTimeouts=m_,this._removeListeners=m_,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=m_,this.on("pipe",e=>{e?.headers&&Object.assign(this.options.headers,e.headers)}),this.on("newListener",e=>{if("retry"===e&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new i_(e,t,n),!this.options.url){if(""===this.options.prefixUrl)throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(e){const{options:t}=e;return t&&(this.options=t),void(this.flush=async()=>{this.flush=async()=>{},this.destroy(e)})}const{body:r}=this.options;if(Bb.nodeStream(r)&&r.once("error",e=>{this._flushed?this._beforeError(new ev(e,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new ev(e,this))}}),this.options.signal){const e=()=>{this.destroy(new iv(this))};this.options.signal.aborted?e():(this.options.signal.addEventListener("abort",e),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",e)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed)return void this._request?.destroy();for(const e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;const{response:t,options:n}=this,r=this.retryCount+("RetryError"===e.name?0:1);this._stopReading=!0,e instanceof Jb||(e=new Jb(e.message,e,this));const i=e;(async()=>{if(t?.readable&&!t.rawBody&&!this._request?.socket?.destroyed){t.setEncoding(this.readableEncoding);await this._setRawBody(t)&&(t.body=t.rawBody.toString())}if(0!==this.listenerCount("retry")){let a;try{let e;t&&"retry-after"in t.headers&&(e=Number(t.headers["retry-after"]),Number.isNaN(e)?(e=Date.parse(t.headers["retry-after"])-Date.now(),e<=0&&(e=1)):e*=1e3);const s=n.retry;a=await s.calculateDelay({attemptCount:r,retryOptions:s,error:i,retryAfter:e,computedValue:_w({attemptCount:r,retryOptions:s,error:i,retryAfter:e,computedValue:s.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(e){return void this._error(new Jb(e.message,e,this))}if(a){if(await new Promise(e=>{const t=setTimeout(e,a);this._stopRetry=()=>{clearTimeout(t),e()}}),this.destroyed)return;try{for(const e of this.options.hooks.beforeRetry)await e(i,this.retryCount+1)}catch(t){return void this._error(new Jb(t.message,e,this))}if(this.destroyed)return;return this.destroy(),void this.emit("retry",this.retryCount+1,e,e=>{const t=new y_(n.url,e,n);return t.retryCount=this.retryCount+1,B.nextTick(()=>{t.flush()}),t})}}this._error(i)})()}_read(){this._triggerRead=!0;const{response:e}=this;if(e&&!this._stopReading){let t;for(e.readableLength&&(this._triggerRead=!1);null!==(t=e.read());){this._downloadedSize+=t.length;const e=this.downloadProgress;e.percent<1&&this.emit("downloadProgress",e),this.push(t)}}}_write(e,t,n){const r=()=>{this._writeRequest(e,t,n)};this._requestInitialized?r():this._jobs.push(r)}_final(e){const t=()=>{this._request&&!this._request.destroyed?this._request.end(t=>{this._request._writableState?.errored||(t||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(t))}):e()};this._requestInitialized?t():this._jobs.push(t)}_destroy(e,t){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){const{body:e}=this.options;Bb.nodeStream(e)&&e.destroy()}this._request&&this._request.destroy(),null===e||Bb.undefined(e)||e instanceof Jb||(e=new Jb(e.message,e,this)),t(e)}pipe(e,t){return e instanceof G&&this._pipedServerResponses.add(e),super.pipe(e,t)}unpipe(e){return e instanceof G&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){const{options:e}=this,{headers:t}=e,n=!Bb.undefined(e.form),r=!Bb.undefined(e.json),i=!Bb.undefined(e.body),a=p_.has(e.method)&&!("GET"===e.method&&e.allowGetBody);if(this._cannotHaveBody=a,n||r||i){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);const r=!Bb.string(t["content-type"]);if(i){if(Xv(e.body)){const n=new yw(e.body);r&&(t["content-type"]=n.headers["Content-Type"]),"Content-Length"in n.headers&&(t["content-length"]=n.headers["Content-Length"]),e.body=n.encode()}gw(e.body)&&r&&(t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){r&&(t["content-type"]="application/x-www-form-urlencoded");const{form:n}=e;e.form=void 0,e.body=new URLSearchParams(n).toString()}else{r&&(t["content-type"]="application/json");const{json:n}=e;e.json=void 0,e.body=e.stringifyJson(n)}const s=await async function(e,t){return t&&"content-length"in t?Number(t["content-length"]):e?Bb.string(e)?F.byteLength(e):Bb.buffer(e)?e.length:gw(e)?j(e.getLength.bind(e))():void 0:0}(e.body,e.headers);Bb.undefined(t["content-length"])&&Bb.undefined(t["transfer-encoding"])&&!a&&!Bb.undefined(s)&&(t["content-length"]=String(s))}"json"!==e.responseType||"accept"in e.headers||(e.headers.accept="application/json"),this._bodySize=Number(t["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;const{options:t}=this,{url:n}=t;this._nativeResponse=e,t.decompress&&(e=Yv(e));const r=e.statusCode,i=e;i.statusMessage=i.statusMessage??K.STATUS_CODES[r],i.url=t.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=a_(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),e.once("error",t=>{this._aborted=!0,e.destroy(),this._beforeError(new nv(t,this))}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new nv({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const a=e.headers["set-cookie"];if(Bb.object(t.cookieJar)&&a){let e=a.map(async e=>t.cookieJar.setCookie(e,n.toString()));t.ignoreInvalidCookies&&(e=e.map(async e=>{try{await e}catch{}}));try{await Promise.all(e)}catch(e){return void this._beforeError(e)}}if(!this.isAborted){if(t.followRedirect&&e.headers.location&&f_.has(r)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=t.maxRedirects)return void this._beforeError(new Zb(this));this._request=void 0;const a=new i_(void 0,void 0,this.options),s=303===r&&"GET"!==a.method&&"HEAD"!==a.method,o=307!==r&&308!==r,c=a.methodRewriting&&o;(s||c)&&(a.method="GET",a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers["content-length"]);try{const t=F.from(e.headers.location,"binary").toString(),r=new URL(t,n);if(!c_(n)&&c_(r))return void this._beforeError(new Jb("Cannot redirect to UNIX socket",{},this));r.hostname!==n.hostname||r.port!==n.port?("host"in a.headers&&delete a.headers.host,"cookie"in a.headers&&delete a.headers.cookie,"authorization"in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username="",a.password="")):(r.username=a.username,r.password=a.password),this.redirectUrls.push(r),a.prefixUrl="",a.url=r;for(const e of a.hooks.beforeRedirect)await e(a,i);this.emit("redirect",a,i),this.options=a,await this._makeRequest()}catch(e){return void this._beforeError(e)}return}if(t.isStream&&t.throwHttpErrors&&!a_(i))this._beforeError(new Xb(i));else{if(e.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this._noPipe){return void(await this._setRawBody()&&this.emit("response",e))}this.emit("response",e);for(const n of this._pipedServerResponses)if(!n.headersSent){for(const r in e.headers){const i=!t.decompress||"content-encoding"!==r,a=e.headers[r];i&&n.setHeader(r,a)}n.statusCode=r}}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{const t=await u_(e);if(!this.isAborted)return this.response.rawBody=t,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this,{timeout:n,url:r}=t;(e=>{if(e.timings)return e.timings;const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const n=e=>{e.once(h,()=>{t.error=Date.now(),t.phases.total=t.error-t.start})};n(e);const r=()=>{t.abort=Date.now(),t.phases.total=t.abort-t.start};e.prependOnceListener("abort",r);const i=e=>{if(t.socket=Date.now(),t.phases.wait=t.socket-t.start,o.isProxy(e))return;const n=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",n),cv(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",n),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?i(e.socket):e.prependOnceListener("socket",i);const a=()=>{t.upload=Date.now(),t.phases.request=t.upload-(t.secureConnect??t.connect)};e.writableFinished?a():e.prependOnceListener("finish",a),e.prependOnceListener("response",i=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,i.timings=t,n(i),i.prependOnceListener("end",()=>{e.off("abort",r),i.off("aborted",r),t.phases.total||(t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start)}),i.prependOnceListener("aborted",r)})})(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=function(e,t,n){if(vw in e)return ww;e[vw]=!0;const r=[],{once:i,unhandleAll:a}=function(){const e=[];return{once(t,n,r){t.once(n,r),e.push({origin:t,event:n,fn:r})},unhandleAll(){for(const t of e){const{origin:e,event:n,fn:r}=t;e.removeListener(n,r)}e.length=0}}}(),s=(e,t,n)=>{const i=setTimeout(t,e,e,n);i.unref?.();const a=()=>{clearTimeout(i)};return r.push(a),a},{host:o,hostname:c}=n,u=(t,n)=>{e.destroy(new xw(t,n))},l=()=>{for(const e of r)e();a()};if(e.once("error",t=>{if(l(),0===e.listenerCount("error"))throw t}),void 0!==t.request){const n=s(t.request,u,"request");i(e,"response",e=>{i(e,"end",n)})}if(void 0!==t.socket){const{socket:n}=t,i=()=>{u(n,"socket")};e.setTimeout(n,i),r.push(()=>{e.removeListener("timeout",i)})}const p=void 0!==t.lookup,d=void 0!==t.connect,f=void 0!==t.secureConnect,h=void 0!==t.send;return(p||d||f||h)&&i(e,"socket",r=>{const{socketPath:a}=e;if(r.connecting){const e=Boolean(a??0!==Z.isIP(c??o??""));if(p&&!e&&void 0===r.address().address){const e=s(t.lookup,u,"lookup");i(r,"lookup",e)}if(d){const n=()=>s(t.connect,u,"connect");e?i(r,"connect",n()):i(r,"lookup",e=>{null===e&&i(r,"connect",n())})}f&&"https:"===n.protocol&&i(r,"connect",()=>{const e=s(t.secureConnect,u,"secureConnect");i(r,"secureConnect",e)})}if(h){const n=()=>s(t.send,u,"send");r.connecting?i(r,"connect",()=>{i(e,"upload-complete",n())}):i(e,"upload-complete",n())}}),void 0!==t.response&&i(e,"upload-complete",()=>{const n=s(t.response,u,"response");i(e,"response",n)}),void 0!==t.read&&i(e,"response",e=>{const n=s(t.read,u,"read");i(e,"end",n)}),l}(e,n,r);const i=t.cache?"cacheableResponse":"response";e.once(i,e=>{this._onResponse(e)}),e.once("error",t=>{this._aborted=!0,e.destroy(),t=t instanceof xw?new tv(t,this.timings,this):new Jb(t.message,t,this),this._beforeError(t)}),this._unproxyEvents=bw(e,this,h_),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise((t,n)=>{super.write(e,e=>{e?n(e):t()})})}_sendBody(){const{body:e}=this.options,t=0===this.redirectUrls.length?this:this._request??this;Bb.nodeStream(e)?e.pipe(t):Bb.generator(e)||Bb.asyncGenerator(e)?(async()=>{try{for await(const t of e)await this._asyncWrite(t);super.end()}catch(e){this._beforeError(e)}})():Bb.undefined(e)?(this._cannotHaveBody||this._noPipe)&&t.end():(this._writeRequest(e,void 0,()=>{}),t.end())}_prepareCache(e){if(!d_.has(e)){const t=new Cv((e,t)=>{const n=e._request(e,t);return Bb.promise(n)&&(n.once=(e,t)=>{if("error"===e)(async()=>{try{await n}catch(e){t(e)}})();else{if("abort"!==e)throw new Error(`Unknown HTTP2 promise event: ${e}`);(async()=>{try{(await n).once("abort",t)}catch{}})()}return n}),n},e);d_.set(e,t.request())}}async _createCacheableRequest(e,t){return new Promise((n,r)=>{let i;Object.assign(t,function(e){const t={protocol:e.protocol,hostname:Bb.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return Bb.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}(e));const a=d_.get(t.cache)(t,async e=>{if(e._readableState.autoDestroy=!1,i){const t=()=>{e.req&&(e.complete=e.req.res.complete)};e.prependOnceListener("end",t),t(),(await i).emit("cacheableResponse",e)}n(e)});a.once("error",r),a.once("request",async e=>{i=e,n(i)})})}async _makeRequest(){const{options:e}=this,{headers:t,username:n,password:r}=e,i=e.cookieJar;for(const e in t)if(Bb.undefined(t[e]))delete t[e];else if(Bb.null_(t[e]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(e.decompress&&Bb.undefined(t["accept-encoding"])&&(t["accept-encoding"]=l_?"gzip, deflate, br":"gzip, deflate"),n||r){const e=F.from(`${n}:${r}`).toString("base64");t.authorization=`Basic ${e}`}if(i){const n=await i.getCookieString(e.url.toString());Bb.nonEmptyString(n)&&(t.cookie=n)}let a;e.prefixUrl="";for(const t of e.hooks.beforeRequest){const n=await t(e);if(!Bb.undefined(n)){a=()=>n;break}}a||(a=e.getRequestFunction());const s=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=a,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));const o=e.cache?this._createCacheableRequest:a;try{let t=o(s,this._requestOptions);Bb.promise(t)&&(t=await t),Bb.undefined(t)&&(t=e.getFallbackRequestFunction()(s,this._requestOptions),Bb.promise(t)&&(t=await t)),!function(e){return e.writable&&!e.writableEnded}(t)?this.writable?(this.once("finish",()=>{this._onResponse(t)}),this._sendBody()):this._onResponse(t):this._onRequest(t)}catch(e){if(e instanceof Nv)throw new Qb(e,this);throw e}}async _error(e){try{if(e instanceof Xb&&!this.options.throwHttpErrors);else for(const t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Jb(t.message,t,this)}this.destroy(e)}_writeRequest(e,t,n){this._request&&!this._request.destroyed&&this._request.write(e,t,r=>{if(!r&&!this._request.destroyed){this._uploadedSize+=F.byteLength(e,t);const n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}n(r)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return e=this._responseSize?this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?1:0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return e=this._bodySize?this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?1:0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}}class g_ extends Jb{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}const b_=["request","response","redirect","uploadProgress","downloadProgress"];function v_(e){let t,n,r;const i=new z,a=new Wb((s,o,c)=>{c(()=>{t.destroy()}),c.shouldReject=!1,c(()=>{o(new g_(t))});const u=l=>{c(()=>{});const p=e??new y_(void 0,void 0,r);p.retryCount=l,p._noPipe=!0,t=p,p.once("response",async e=>{const t=(e.headers["content-encoding"]??"").toLowerCase(),r="gzip"===t||"deflate"===t||"br"===t,{options:i}=p;if(r&&!i.decompress)e.body=e.rawBody;else try{e.body=o_(e,i.responseType,i.parseJson,i.encoding)}catch(t){if(e.body=e.rawBody.toString(),a_(e))return void p._beforeError(t)}try{const t=i.hooks.afterResponse;for(const[n,r]of t.entries())if(e=await r(e,async e=>{throw i.merge(e),i.prefixUrl="",e.url&&(i.url=e.url),i.hooks.afterResponse=i.hooks.afterResponse.slice(0,n),new rv(p)}),!Bb.object(e)||!Bb.number(e.statusCode)||Bb.nullOrUndefined(e.body))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(e){return void p._beforeError(e)}n=e,a_(e)?(p.destroy(),s(p.options.resolveBodyOnly?e.body:e)):p._beforeError(new Xb(e))});const d=e=>{if(a.isCanceled)return;const{options:t}=p;if(e instanceof Xb&&!t.throwHttpErrors){const{response:t}=e;return p.destroy(),void s(p.options.resolveBodyOnly?t.body:t)}o(e)};p.once("error",d);const f=p.options?.body;p.once("retry",(t,n)=>{e=void 0;const i=p.options.body;if(f===i&&Bb.nodeStream(i))return n.message="Cannot retry with consumed body stream",void d(n);r=p.options,u(t)}),bw(p,i,b_),Bb.undefined(e)&&p.flush()};u(0)});a.on=(e,t)=>(i.on(e,t),a),a.off=(e,t)=>(i.off(e,t),a);const s=e=>{const t=(async()=>{await a;const{options:t}=n.request;return o_(n,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)),t};return a.json=()=>{if(t.options){const{headers:e}=t.options;t.writableFinished||"accept"in e||(e.accept="application/json")}return s("json")},a.buffer=()=>s("buffer"),a.text=()=>s("text"),a}const w_=async e=>new Promise(t=>{setTimeout(t,e)}),x_=e=>Bb.function_(e),__=["get","post","put","patch","head","delete"],T_=e=>{e={options:new i_(void 0,void 0,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults},Object.defineProperty(e,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});const t=(t,n,r=e.options)=>{const i=new y_(t,n,r);let a;const s=e=>(i.options=e,i._noPipe=!e.isStream,i.flush(),e.isStream?i:(a||(a=v_(i)),a));let o=0;const c=t=>{const n=(e.handlers[o++]??s)(t,c);if(Bb.promise(n)&&!i.options.isStream&&(a||(a=v_(i)),n!==a)){const e=Object.getOwnPropertyDescriptors(a);for(const t in e)t in n&&delete e[t];Object.defineProperties(n,e),n.cancel=a.cancel}return n};return c(i.options)};t.extend=(...t)=>{const n=new i_(void 0,void 0,e.options),r=[...e.handlers];let i;for(const e of t)x_(e)?(n.merge(e.defaults.options),r.push(...e.defaults.handlers),i=e.defaults.mutableDefaults):(n.merge(e),e.handlers&&r.push(...e.handlers),i=e.mutableDefaults);return T_({options:n,handlers:r,mutableDefaults:Boolean(i)})};const n=async function*(n,r){let i=new i_(n,r,e.options);i.resolveBodyOnly=!1;const{pagination:a}=i;Kb.function_(a.transform),Kb.function_(a.shouldContinue),Kb.function_(a.filter),Kb.function_(a.paginate),Kb.number(a.countLimit),Kb.number(a.requestLimit),Kb.number(a.backoff);const s=[];let{countLimit:o}=a,c=0;for(;c<a.requestLimit;){0!==c&&await w_(a.backoff);const e=await t(void 0,void 0,i),n=await a.transform(e),r=[];Kb.array(n);for(const e of n)if(a.filter({item:e,currentItems:r,allItems:s})){if(!a.shouldContinue({item:e,currentItems:r,allItems:s}))return;if(yield e,a.stackAllItems&&s.push(e),r.push(e),--o<=0)return}const u=a.paginate({response:e,currentItems:r,allItems:s});if(!1===u)return;u===e.request.options?i=e.request.options:(i.merge(u),Kb.any([Bb.urlInstance,Bb.undefined],u.url),void 0!==u.url&&(i.prefixUrl="",i.url=u.url)),c++}};(t.paginate=n).all=async(e,t)=>{const r=[];for await(const i of n(e,t))r.push(i);return r},t.paginate.each=n,t.stream=(e,n)=>t(e,{...n,isStream:!0});for(const e of __)t[e]=(n,r)=>t(n,{...r,method:e}),t.stream[e]=(n,r)=>t(n,{...r,method:e,isStream:!0});return e.mutableDefaults||(Object.freeze(e.handlers),e.options.freeze()),Object.defineProperty(t,"defaults",{value:e,writable:!1,configurable:!1,enumerable:!0}),t},E_={options:new i_,handlers:[],mutableDefaults:!1},S_=T_(E_),k_="[a-fA-F\\d:]",M_=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${k_})|(?<=${k_})(?=\\s|$))`:"",A_="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",O_="[a-fA-F\\d]{1,4}",R_=`\n(?:\n(?:${O_}:){7}(?:${O_}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${O_}:){6}(?:${A_}|:${O_}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${O_}:){5}(?::${A_}|(?::${O_}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${O_}:){4}(?:(?::${O_}){0,1}:${A_}|(?::${O_}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${O_}:){3}(?:(?::${O_}){0,2}:${A_}|(?::${O_}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${O_}:){2}(?:(?::${O_}){0,3}:${A_}|(?::${O_}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${O_}:){1}(?:(?::${O_}){0,4}:${A_}|(?::${O_}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${O_}){0,5}:${A_}|(?::${O_}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),I_=new RegExp(`(?:^${A_}$)|(?:^${R_}$)`),N_=new RegExp(`^${A_}$`),C_=new RegExp(`^${R_}$`),P_=e=>e&&e.exact?I_:new RegExp(`(?:${M_(e)}${A_}${M_(e)})|(?:${M_(e)}${R_}${M_(e)})`,"g");P_.v4=e=>e&&e.exact?N_:new RegExp(`${M_(e)}${A_}${M_(e)}`,"g"),P_.v6=e=>e&&e.exact?C_:new RegExp(`${M_(e)}${R_}${M_(e)}`,"g");const{toString:j_}=Object.prototype;const L_={global:"g",ignoreCase:"i",multiline:"m",dotAll:"s",sticky:"y",unicode:"u"};function $_(e,t={}){if(n=e,"[object RegExp]"!==j_.call(n))throw new TypeError("Expected a RegExp instance");var n;const r=Object.keys(L_).map(n=>("boolean"==typeof t[n]?t[n]:e[n])?L_[n]:"").join(""),i=new RegExp(t.source||e.source,r);return i.lastIndex="number"==typeof t.lastIndex?t.lastIndex:e.lastIndex,i}function D_(e,t,{timeout:n}={}){try{return function(e,{timeout:t}={}){const n=new pe.Script("returnValue = function_()"),r=(...r)=>{const i={function_:()=>e(...r)};return n.runInNewContext(i,{timeout:t}),i.returnValue};return Object.defineProperty(r,"name",{value:`functionTimeout(${e.name||"<anonymous>"})`,configurable:!0}),r}(()=>$_(e).test(t),{timeout:n})()}catch(e){if(function(e){return"ERR_SCRIPT_EXECUTION_TIMEOUT"===e?.code}(e))return!1;throw e}}const U_={timeout:400};function z_(e){return!(e.length>45)&&D_(P_.v6({exact:!0}),e,U_)}function B_(e){return!(e.length>15)&&D_(P_.v4({exact:!0}),e,U_)}class F_ extends Error{constructor(e){super("Could not get the public IP address",e),this.name="IpNotFoundError"}}const q_={timeout:5e3,onlyHttps:!1},H_=[{v4:{servers:["208.67.222.222","208.67.220.220","208.67.222.220","208.67.220.222"],name:"myip.opendns.com",type:"A"},v6:{servers:["2620:0:ccc::2","2620:0:ccd::2"],name:"myip.opendns.com",type:"AAAA"}},{v4:{servers:["216.239.32.10","216.239.34.10","216.239.36.10","216.239.38.10"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")},v6:{servers:["2001:4860:4802:32::a","2001:4860:4802:34::a","2001:4860:4802:36::a","2001:4860:4802:38::a"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")}}],Y_={v4:{dnsServers:H_.map(({v4:{servers:e,...t}})=>({servers:e,question:t})),httpsUrls:["https://icanhazip.com/","https://api.ipify.org/"]},v6:{dnsServers:H_.map(({v6:{servers:e,...t}})=>({servers:e,question:t})),httpsUrls:["https://icanhazip.com/","https://api6.ipify.org/"]}},V_=(e,t)=>{const n=Y_[e],r=Cb({retries:0,maxQueries:1,socket:$.createSocket("v6"===e?"udp6":"udp4"),timeout:t.timeout}),i=j(r.query.bind(r)),a=(async()=>{let t;for(const a of n.dnsServers){const{servers:n,question:s}=a;for(const a of n){if(r.destroyed)return;try{const{name:t,type:n,transform:o}=s,c=await i({questions:[{name:t,type:n}]},53,a),{answers:{0:{data:u}}}=c,l=("string"==typeof u?u:u.toString()).trim(),p=o?o(l):l;if(p&&("v6"===e?z_:B_)(p))return r.destroy(),p}catch(e){t=e}}}throw r.destroy(),new F_({cause:t})})();return a.cancel=()=>{r.destroy()},a},K_=(e,t)=>{let n;const r=(async()=>{try{const r={dnsLookupIpVersion:"v6"===e?6:4,retry:{limit:0},timeout:{request:t.timeout}},i=[...Y_[e].httpsUrls,...t.fallbackUrls??[]];let a;for(const t of i)try{const i=S_.get(t,r);n=i.cancel;const a=await i,s=a.body?.trim();if(s&&("v6"===e?z_:B_)(s))return s}catch(e){if(a=e,e instanceof g_)throw e}throw new F_({cause:a})}catch(e){if(!(e instanceof g_))throw e}})();return r.cancel=function(){return n.apply(this)},r},G_=(e,t)=>{let n;const r=(async()=>{let r;const i=V_(e,t);n=i.cancel;try{r=await i}catch{const i=K_(e,t);n=i.cancel,r=await i}return r})();return r.cancel=n,r},W_=function(e,t){return function(n){const r=e(n),i=t(n),a=(async()=>{try{const e=await i;return r.catch(()=>{}),r.cancel(),e}catch(e){if(!(e instanceof F_))throw e;try{return await r}catch(t){throw new AggregateError([t,e])}}})();return a.cancel=()=>{r.cancel(),i.cancel()},a}}(function(e){if(e={...q_,...e},!e.onlyHttps)return G_("v4",e);if(e.onlyHttps)return K_("v4",e);return V_("v4",e)},function(e){if(e={...q_,...e},!e.onlyHttps)return G_("v6",e);if(e.onlyHttps)return K_("v6",e);return V_("v6",e)});class J_{static create(e,t,n,r){if(t===Yl.EVM)return new ST(e,n,r);throw new Error(`Unsupported blockchain: ${t}`)}}class Z_{serviceLogger;env;pk;constructor(e,t,n){this.serviceLogger=e,this.env=t,this.pk=n}}var X_;!function(e){e.LOCAL="local",e.LOCAL_DOCKER="local-docker",e.TESTNET="testnet",e.STAGING="staging",e.PRODUCTION="production"}(X_||(X_={}));var Q_={address:"0x6da8eE7DF16BD92eb71F314f4b701C6c5b0b2721",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},eT={address:"0x6825142A0e85dDB3cBf872a26eE2beefaedbc465",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},tT={address:"0x6E7175c46C1e2aC0EEE92C22Fa18Df0D98da72C2",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},nT={address:"0x0165878A594ca255338adfa4d48449f69242Eb8F",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},rT={address:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},iT={address:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},aT={address:"0x8464135c8F25Da09e49BC8782676a84730C318bC",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"bytes32",name:"codeHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"inputSig",type:"string"},{indexed:!1,internalType:"bytes",name:"input",type:"bytes"}],name:"TaskRequested",type:"event"},{inputs:[{internalType:"address",name:"caller",type:"address"},{internalType:"bytes",name:"resultData",type:"bytes"}],name:"callback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"},{internalType:"string",name:"methodSignature",type:"string"},{internalType:"bytes",name:"input",type:"bytes"}],name:"requestExecution",outputs:[],stateMutability:"nonpayable",type:"function"}]},sT={address:"0xc84f349C46e046ca6dbd7e653700DF728FA496E4",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},oT={address:"0x712c0E7122CBa5b0087DED2D7F1beAE9d24e5f5A",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},cT={address:"0x84B5e1c533F3A4b24336a4cFFE546E09D56666Ce",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},uT={address:"0xdA5a5a58ee6fd52B3D0a60758695F7f0f2354F7a",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},lT={address:"0x26F9aD5E14518C4D4FD86EDA9753c28db5a85bEA",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},pT={address:"0xB0Cd8d3430C14ecc08c4ccff713d5b21b472f88C",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]};function dT(e){switch(e){case X_.LOCAL:return{url:"http://localhost:8545",chainId:"31337",registry:{address:iT.address,abi:iT.abi},taskRegistry:{address:rT.address,abi:rT.abi},authorization:{address:nT.address,abi:nT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.LOCAL_DOCKER:return{url:"http://hardhat-node:8545",chainId:"31337",registry:{address:iT.address,abi:iT.abi},taskRegistry:{address:rT.address,abi:rT.abi},authorization:{address:nT.address,abi:nT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.TESTNET:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",registry:{address:pT.address,abi:pT.abi},taskRegistry:{address:lT.address,abi:lT.abi},authorization:{address:uT.address,abi:uT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.STAGING:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",registry:{address:cT.address,abi:cT.abi},taskRegistry:{address:oT.address,abi:oT.abi},authorization:{address:sT.address,abi:sT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.PRODUCTION:return{url:process.env.RPC_URL||"https://api.avax.network/ext/bc/C/rpc",chainId:"43114",registry:{address:tT.address,abi:tT.abi},taskRegistry:{address:eT.address,abi:eT.abi},authorization:{address:Q_.address,abi:Q_.abi},watchTower:{address:aT.address,abi:aT.abi}};default:throw new Error(`Unsupported environment: ${e}`)}}let fT={delay:250,maxTry:240,until:null};function hT(e,t){const n=Object.assign(Object.assign({},Object.assign({},fT)),t);return Object.assign(Object.assign({},n),{currentTry:e,maxTry:n.maxTry||240,delay:mT(n.delay),until:n.until?n.until:()=>!0})}function mT(e){return void 0===e?()=>250:"function"==typeof e?e:()=>e}globalThis&&globalThis.__awaiter;class yT extends Error{constructor(e=void 0){super("function did not complete within allowed number of attempts"),this.lastResult=e,this.tooManyTries=!0}getLastResult(){return this.lastResult}}function gT(e){return!0===e.tooManyTries}var bT=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,o)}c((r=r.apply(e,t||[])).next())})};function vT(e,t){return bT(this,void 0,void 0,function*(){const n=hT(1,t);return yield wT(e,n)})}function wT(e,t){return bT(this,void 0,void 0,function*(){const n=t.currentTry<t.maxTry;try{const r=yield e();if(t.until(r))return t.onSuccessFunc&&t.onSuccessFunc(r,t.currentTry),r;throw n?new Error("function result failed to meet until() requirements"):new yT(r)}catch(r){if(!gT(r)&&n)return t.onError&&t.onError(r,t.currentTry),yield function(e,t,n){return bT(this,void 0,void 0,function*(){const r=t.delay({currentTry:t.currentTry,maxTry:t.maxTry,lastDelay:t.lastDelay,lastResult:n});yield function(e=6e4){return new Promise(t=>setTimeout(t,e))}(r);const i=Object.assign(Object.assign({},t),{currentTry:t.currentTry+1});return yield wT(e,i)})}(e,t);throw t.onMaxRetryFunc&&t.onMaxRetryFunc(r,t.currentTry),r}})}globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter;class xT{serviceLogger;provider;signer;contractAddress;nodeRegistryContract;constructor(e,t,n){this.serviceLogger=e;const r=dT(t);this.provider=n.provider,this.signer=n,this.contractAddress=r.registry.address,this.nodeRegistryContract=new de.Contract(this.contractAddress,r.registry.abi,this.signer)}async getChainId(){const{chainId:e}=await this.provider.getNetwork();return e.toString()}getRegistrationContractAddress(){return this.contractAddress}async registerNode(){await this.nodeRegistryContract.registerNode()}async getNodes(){return(await this.nodeRegistryContract.getNodes()).map(e=>({nodeAddress:e.nodeAddress,blockNumber:e.blockNumber,timestamp:e.timestamp}))}async getNodeCount(){return await this.nodeRegistryContract.getNodeCount()}async deRegister(){return await this.nodeRegistryContract.deRegister()}async deRegisterAddress(e){await this.nodeRegistryContract.deRegisterAddress(e)}async getNodeAtIndex(e){const t=await this.nodeRegistryContract.getNodeAtIndex(e);return{nodeAddress:t.nodeAddress,blockNumber:t.blockNumber,timestamp:t.timestamp}}async getNodeIndexByAddress(e){return await this.nodeRegistryContract.getNodeIndexByAddress(e)}async deRegisterAll(){await this.nodeRegistryContract.deRegisterAll()}async getBlockInfo(){const e=await this.provider.getBlock("latest");if(!e)throw"Couldn't get latest block information";if(!e.hash)throw"Couldn't get block hash";return{hash:e.hash,number:e.number,timestamp:e.timestamp}}async getBlockHash(){const e=await this.provider.getBlock("latest");return e?e.hash:null}async waitForBlocks(e){const t=(await vT(async()=>await this.provider.getBlock("latest"),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e})).number+e;await vT(async()=>await this.provider.getBlock("latest"),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e&&e.number>=t})}async sendSignedTransaction(e){if(!this.signer)throw"Private key wasn't provided";const t=await this.signer.sendTransaction({data:e}),n=await t.wait();if(n)return n.blockHash;throw new Error("Transaction receipt is null")}async signTransaction(e){if(!this.signer)throw"Private key wasn't provided";return await this.signer.signTransaction(e)}async estimateGas(e){try{return await this.provider.estimateGas(e)}catch(e){throw console.error("Error estimating gas:",e),e}}}class _T{serviceLogger;provider;signer;taskRegistryAddress;taskRegistryContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=dT(t);this.provider=n.provider,this.signer=n,this.taskRegistryAddress=r.taskRegistry.address,this.taskRegistryContract=new de.Contract(this.taskRegistryAddress,r.taskRegistry.abi,this.signer)}getTaskRegistryContractAddress(){return this.taskRegistryAddress}async getEIP712Domain(){return{name:"TaskRegistry",version:"1",chainId:Number(await this.provider.getNetwork().then(e=>e.chainId)),verifyingContract:this.taskRegistryAddress}}async registerTaskNamespace(e){if((await(await this.taskRegistryContract.registerTaskNamespace(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task namespace")}async nonces(e){return await this.taskRegistryContract.nonces(e)}async getNamespaceOwner(e){return await this.taskRegistryContract.namespaceOwners(e)}async registerTaskNamespaceWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskNamespaceWithSignature.estimateGas(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n}),i=await vT(async()=>{const t=await this.taskRegistryContract.registerTaskNamespaceWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task namespace")}async transferTaskNamespace(e,t){if((await(await this.taskRegistryContract.transferTaskNamespace(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error transferring task namespace")}async grantNamespaceAccess(e,t){if((await(await this.taskRegistryContract.grantNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting task namespace")}async revokeNamespaceAccess(e,t){if((await(await this.taskRegistryContract.revokeNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking task namespace")}async setTaskLabel(e,t,n,r){if(r.length>128)throw new Error("Label exceeds maximum length of 128 chars");if((await(await this.taskRegistryContract.setTaskLabel(e,t,n,r)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error setting task label")}async registerTask(e,t,n){if((await(await this.taskRegistryContract.registerTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task")}async registerTaskWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskWithSignature.estimateGas(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n}),i=await vT(async()=>{const t=await this.taskRegistryContract.registerTaskWithSignature(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task")}async getTask(e,t){const n=await this.taskRegistryContract.getTask(e,t);return{namespace:e,taskId:n[0][0],version:Number(n[2]),meta:n[0][1],nameSpaceOwner:n[1]}}async getTaskByLabel(e,t,n){const r=await this.taskRegistryContract.getTaskByLabel(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(r[2]),label:n,meta:r[0][1],nameSpaceOwner:r[1]}}async getTaskByVersion(e,t,n){const r=await this.taskRegistryContract.getTaskByVersion(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(n),meta:r[0][1],nameSpaceOwner:r[1]}}async disableTask(e,t,n){if((await(await this.taskRegistryContract.disableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error disabling task")}async enableTask(e,t,n){if((await(await this.taskRegistryContract.enableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error enabling task")}async isTaskRevoked(e){return await this.taskRegistryContract.isTaskRevoked(e)}async getLatestVersion(e,t){const n=Number(await this.taskRegistryContract.getLatestVersion(e,t));if(0==n)throw`Task (${t}) not found in namespace (${e})`;return n}async getLatestActiveVersion(e,t){return Number(await this.taskRegistryContract.getLatestActiveVersion(e,t))}}class TT{serviceLogger;provider;signer;authorizationAddress;authorizationContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=dT(t);this.provider=n.provider,this.signer=n,this.authorizationAddress=r.authorization.address,this.authorizationContract=new de.Contract(this.authorizationAddress,r.authorization.abi,this.signer)}getAuthorizationContractAddress(){return this.authorizationAddress}async getEIP712Domain(){return{name:"Authorization",version:"1",chainId:Number(await this.provider.getNetwork().then(e=>e.chainId)),verifyingContract:this.authorizationAddress}}async nonces(e){return await this.authorizationContract.nonces(e)}async grantAuthorization(e,t){if((await(await this.authorizationContract.grant(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization")}async grantAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);if((await vT(async()=>{const t=await this.authorizationContract.grantWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization with signature")}async revokeAuthorization(e,t){if((await(await this.authorizationContract.revoke(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization")}async revokeAuthorizationWithSignature(e){if((await vT(async()=>{const t=await this.authorizationContract.revokeWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta);return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization with signature")}async registerAuthorization(e){if((await(await this.authorizationContract.register(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering authorization")}async registerAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.authorizationContract.registerWithSignature.estimateGas(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n}),i=await vT(async()=>{const t=await this.authorizationContract.registerWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering authorization with signature")}async deRegisterAuthorization(e){if((await(await this.authorizationContract.deregister(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization")}async deRegisterAuthorizationWithSignature(e){if((await vT(async()=>{const t=await this.authorizationContract.deregisterWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta);return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization with signature")}async isAuthorized(e,t){return await this.authorizationContract.isAuthorized(e,t)}async getPayerAddress(e){return await this.authorizationContract.getPayer(e)}}class ET{provider;signer;constructor(e,t){this.provider=t.provider,this.signer=t}async signMeta(e,t,n){if(!function(e){return e&&"string"==typeof e.name&&"string"==typeof e.version&&"number"==typeof e.chainId&&"string"==typeof e.verifyingContract}(e))throw new Error("Invalid EIP712Domain");return await this.signer.signTypedData(e,t,n)}async getCurrentNonce(){return await this.signer.getNonce()}async reSyncNonceManager(){this.signer instanceof de.NonceManager&&this.signer.reset()}}class ST extends Z_{nodeRegistry;taskRegistry;authorization;utils;signer;constructor(e,t,n){if(super(e,t,n),void 0===n)throw new Error("Private key wasn't provided");const r=dT(t),i=new de.Network(t,r.chainId),a=new de.JsonRpcProvider(`${r.url}`,i,{staticNetwork:i}),s=new de.Wallet(n,a);this.signer=new de.NonceManager(s),this.nodeRegistry=new xT(this.serviceLogger,t,this.signer),this.taskRegistry=new _T(this.serviceLogger,t,this.signer),this.authorization=new TT(this.serviceLogger,t,this.signer),this.utils=new ET(t,this.signer)}}const kT=e=>{throw k.isAxiosError(e)?e.response?e.response.data.message.includes("Entitlement Validation Error")?ob.USER_NO_REGISTERED:`${e.response.data.message||e.response.data}`:e.request?`Server is not responding: ${e.message}\n${e.config?.method} - ${e.config?.url}`:e.message:e.message};function MT(e,t){if(e!==e.toLowerCase())throw new Error(`${t} must be lowercase.`)}function AT(e){return J_.create(null,Yl.EVM,e,ab("privateKey"))}function OT(e){if(!de.isAddress(e)||42!==e.length||!e.startsWith("0x"))throw new Error("Must be a valid ethereum address. (ENS not supported yet)")}async function RT(){try{return await W_({onlyHttps:!0})}catch{return"unknown"}}function IT(){return(new Date).toUTCString().replace(",","")}function NT(e,t,n,r,i){const a=ab("address"),s={distinct_id:a,user_ip:t,date_time:IT(),os_version:n,node_version:process.version,cli_version:r,namespace:e,wallet_address:a};return i&&(s.address_to=i),s}function CT(e,t,n,r,i,a,s){const o=ab("address");return{distinct_id:o,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,namespace:e,wallet_address:o,taskname:t,label:a,version:s}}function PT(e,t,n,r){const i=ab("address");return{distinct_id:i,user_ip:t,date_time:IT(),os_version:n,node_version:process.version,cli_version:r,api_key:e,wallet_address:i}}function jT(e){const t=nb(),n=null!==t;let r=0;switch(r=n&&(!n||t.privateKey&&t.address)?2:1,r){case 1:console.error(ob.USER_NO_REGISTERED),process.exit(1);break;case 2:e=rm.createSignedBody(e,t.privateKey,t.address)}return e}const LT=async(e,n)=>{const r=`./tmp.${S()}`;try{t.mkdirSync(r);const s=i.join(process.cwd(),n);if(!t.existsSync(s))throw"Task path doesn't exist";if(e===so.C||e===so.RUST||e===so.JS||e===so.PYTHON){const e="config.json",n=i.join(s,e);if(!t.existsSync(n)){const e={run:{limits:{call:"65536",frame:"524288",gas:"1099511627776",memory:"2048"}}};t.writeFileSync(n,JSON.stringify(e))}t.copyFileSync(n,i.join(r,e));const a="fs.tar",o=i.join(s,a);t.existsSync(o)&&t.copyFileSync(o,i.join(r,a))}const o=lm.createBuild(e);await o.build(n,r);const c=await async function(e,n){if(!t.existsSync(e))throw"Invalid source code path";const r=t.readdirSync(e);if(0===r.length)throw"No files found in directory";const i=new Jg;for(const n of r){const r=e+`/${n}`,s=t.readFileSync(r),o=a.basename(r);i.append("files",s,o)}i.append("lang",n);const s={files:r,lang:n},o=jT(s),c=await ub();return i.append("walletAddress",o.walletAddress),i.append("signature",JSON.stringify(o.signature)),i.append("fmpayload",JSON.stringify(s)),(await c.post("api/filesystem/pushLocal",i,{headers:{...i.getHeaders()}}).catch(e=>{kT(e)})).data}(r,e);return t.rmSync(r,{recursive:!0}),c}catch(e){throw t.rmSync(r,{recursive:!0}),e}},{parse:$T,stringify:DT}=JSON,UT=String,zT=(e,t)=>t,BT=(e,t,n)=>{const r=UT(t.push(n)-1);return e.set(n,r),r},FT=(e,t,n)=>{const r=zT,i=new Map,a=[],s=[];let o=+BT(i,a,r.call({"":e},"",e)),c=!o;for(;o<a.length;)c=!0,s[o]=DT(a[o++],u,n);return"["+s.join(",")+"]";function u(e,t){if(c)return c=!c,t;const n=r.call(this,e,t);switch(typeof n){case"object":if(null===n)return n;case"string":return i.get(n)||BT(i,a,n)}return n}},qT=e=>$T(FT(e));async function HT(e,t,n,r,i){const a=n.body,s=n.method.toLowerCase();let o,c={},u=0,l=0;const p={...r,"x-service-name":"truebit-api-adapter"};o=["post","put","patch"].includes(s)?e+t.path:`${e}${function(e,t){if(t)for(const n in t){const r=t[n];e=e.replace(new RegExp(`{${n}}`,"g"),r)}return e}(t.path,t.params||{})}`;const d=k.create({headers:{Connection:"keep-alive"},httpsAgent:new w.Agent({keepAlive:!0}).on("keylog",(e,t)=>{const n=t.getSession(),r=Buffer.from(n).toString("hex").toUpperCase();c={tlsCert:qT(t.getPeerCertificate(!0)),localCertificate:qT(t.getCertificate()),ephemeral:t.getEphemeralKeyInfo(),cipher:t.getCipher(),session:r,ticket:t.getTLSTicket(),localAddress:t.localAddress,sharedSigAlgs:t.getSharedSigalgs(),remoteAddress:t.remoteAddress,protocol:t.getProtocol()}}),maxContentLength:1/0,maxBodyLength:1/0});d.interceptors.request.use(e=>{const t=e.data?JSON.stringify(e.data):"";return u=(e.url?.length||0)+(t.length||0)+JSON.stringify(e.headers).length,e}),d.interceptors.response.use(e=>(l=JSON.stringify(e.data).length+JSON.stringify(e.headers).length,e));try{let e;switch(s){case"get":e=await d.get(o,{headers:p,timeout:i});break;case"patch":e=await d.patch(o,a,{headers:p,timeout:i});break;case"post":e=await d.post(o,a,{headers:p,timeout:i});break;case"put":e=await d.put(o,a,{headers:p,timeout:i});break;case"delete":e=await d.delete(o,{headers:p,timeout:i});break;default:throw new Error("Unsupported HTTP method")}return[e.data,JSON.stringify(c),bu.SUCCEED,u,l]}catch(e){let t,n;return n=e.response&&e.response.data?JSON.stringify(e.response.data):e.message,t=k.isAxiosError(e)&&e.response||{data:n,status:500,statusText:"",headers:{},config:{headers:{}}},[t.data,JSON.stringify(c),bu.FAILED,u,l]}}function YT(e){if(["local","testnet","staging"].includes(process.env.TRUEBIT_ENV))return[!0,""];try{const t=new URL(e),n=t.hostname;if(!["http:","https:"].includes(t.protocol))return[!1,"Only HTTP and HTTPS protocols are allowed"];if(le(n)){if(function(e){const t=e.split(".").map(Number);return 4===t.length&&!t.some(e=>isNaN(e)||e<0||e>255)&&(10===t[0]||172===t[0]&&t[1]>=16&&t[1]<=31||192===t[0]&&168===t[1]||127===t[0]||169===t[0]&&254===t[1])}(n))return[!1,"Internal IP addresses are not allowed"]}else{const e=[".local",".internal",".cluster.local","localhost","kubernetes","kubernetes.default","kubernetes.default.svc","kubernetes.default.svc.cluster.local"],t=n.toLowerCase();for(const n of e)if(t===n||t.endsWith(n))return[!1,"Internal domains are not allowed"]}return[!0,""]}catch(e){return[!1,"Invalid URL format"]}}function VT(e,t){const n=t.method;if(["POST","PUT","PATCH"].includes(n)){return{host:e,path:t.path,method:n,body:t.body,headers:{}}}if("GET"===n||"DELETE"===n){const r=t.path,i=t.params;return{host:e,path:r.replace(/{(\w+)}/g,(e,t)=>i?.[t]??""),method:n,headers:{}}}throw console.error("Unsupported method:",n),new Error("Api_Adapter create request error format")}async function KT(e,t){try{const n=await N(e),r=function(e){const t=e.servers;if(t&&t.length>0){const e=t[0];let n=e.url;return e.variables&&Object.keys(e.variables).forEach(t=>{const r=e.variables[t],i=r.default||r.enum&&r.enum[0];if(void 0===i)throw new Error(`No default value found for variable ${t}`);n=n.replace(`{${t}}`,i)}),n}throw new Error("No servers defined in OpenAPI document")}(n),[i,a]=YT(r);if(!i)return console.warn(`Manifest-based call blocked: ${a} - baseURL: ${r}`),["",`Security: ${a}`,bu.FAILED];const s=VT(r,t),[o,c]=n.request(s);return c?["",c,bu.FAILED]:[r,"",bu.SUCCEED]}catch(e){return console.log(e),["",e,bu.FAILED]}}class GT{tokens=[];authInputs;parse(e,t){const n=this.parseKeyValuePairs(t);if(0==e.length)return void(this.authInputs=n);const r=Object.keys(n);if(!e.every(e=>r.includes(e)))throw new Error(`Invalid authString: ${e} are required`);{const t={};for(const r of e)t[r]=n[r];this.authInputs=t}}parseKeyValuePairs(e){try{const t=e.split(","),n={};for(const e of t){const[t,r]=e.split(":");n[t.trim()]=r.trim()}return n}catch{throw new Error("Invalid auth string")}}}class WT extends GT{tokens=["accessKey","secretKey"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return he.sign(e,{accessKeyId:this.authInputs.accessKey,secretAccessKey:this.authInputs.secretKey}).headers||{}}}class JT extends GT{tokens=["username","password"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return{Authorization:`Basic ${btoa(`${this.authInputs.username}:${this.authInputs.password}`)}`}}}class ZT extends GT{tokens=[];constructor(e){super(),this.parse([],e)}authHeaders(e){return{...this.authInputs}}}var XT;!function(e){e.AWS_SIGNATURE="aws-signature",e.BASIC_AUTH="basic-auth",e.CUSTOM_HEADER="custom-header"}(XT||(XT={}));const QT=(e,t)=>{switch(e){case XT.AWS_SIGNATURE:return new WT(t);case XT.BASIC_AUTH:return new JT(t);case XT.CUSTOM_HEADER:return new ZT(t);default:throw new Error(`Invalid authentication method specified. Should be one of <${Object.values(XT)}>`)}},eE=async(e,n,r,i)=>{let a="";const s=t.readFileSync(n,"utf8"),o=JSON.parse(s).input,c=JSON.parse(s).executionTimeout,[u,l,p]=await async function(e){try{const t=JSON.parse(e);return[{path:t.path.toString(),method:t.method.toString(),body:t.body,params:t.params,headers:{}},"",bu.SUCCEED]}catch(e){return console.error("Invalid JSON format:",e),[null,"Api_Adapter create request input format",bu.FAILED]}}(JSON.stringify(o));if(a+=`${P.cyanBright("\nInput request :\n")}`,a+=JSON.stringify(u,null,2)+"\n",null===u)throw a+=`Invalid message input - ${P.red("FAIL")} \n`,new Error(`Invalid message input ${l}`);const[d,f,h]=await KT(e,u);let m,y,g;a+=`${P.cyanBright("\nBase URL = ")}${d} \n`;let b={};if(h!=bu.SUCCEED)throw console.info(`Axios call - ${P.red("ERROR")} `),console.log(a),new Error(`Invalid message input ${f}`);{a+=`${P.cyanBright("OpenAPI manifest check -")} ${P.green("OK")} \n`;const e=VT(d,u),t=new URL(d),n={host:t.host,path:t.pathname+u.path,method:u.method.toUpperCase(),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(u.body)||""};if(r&&(b=((e,t,n)=>QT(e,t).authHeaders(n))(r,i,n)),[m,y,g]=await HT(d,u,e,b,c),null===g)throw a+=`${P.cyanBright("OpenAPI manifest check -")} ${P.red("FAIL")} \n`,new Error(` Error in Axios ${m}`);a+=`${P.cyanBright("\nAPI Task response")}\n`,a+=P.green(JSON.stringify(m,null,2)),console.log(`API Task executed with status - ${P.green("OK")} `),console.log(a)}};const tE=e=>{const t=e.split("_");return n=t[t.length-1],!!/^[a-f0-9]{64}$/gi.test(n);var n};function nE(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e))throw new Error("Invalid API key format")}async function rE(e,t,n=null,r=ab("blockchainEnv")){let i;MT(e,"Namespace");const a=AT(r),s=ab("address");if(!s)throw`Please provide an address property in '${ib()}/.truebit/secret.json'`;return i=n?await a.taskRegistry.registerTaskNamespace(e):await async function(e,t,n,r){const i=await n.taskRegistry.getEIP712Domain(),a={RegisterTaskNamespaceMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},s=BigInt(await n.taskRegistry.nonces(e)),o={user:de.getAddress(e),namespace:t,nonce:s,deadline:Math.floor(Date.now()/1e3)+3600};let c=await n.utils.signMeta(i,a,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await n.utils.signMeta(i,a,o));const u=await async function(e,t,n,r,i,a){const s={user:e,namespace:t,nonce:BigInt(n),deadline:r,signatureMeta:i};try{const e=await cb(),t={...s};return t.nonce=String(s.nonce),await e.post("user/relayer/namespace",t,{params:{fromSetup:a}})}catch(e){throw k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,o.nonce,o.deadline,c,r);return 201==u.status}(s,e,a,t),i}async function iE(e,t,n,r,i){const a=await i.taskRegistry.getEIP712Domain(),s={Task:[{name:"taskId",type:"string"},{name:"meta",type:"string"},{name:"active",type:"bool"}],RegisterTaskMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"taskName",type:"string"},{name:"task",type:"Task"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},o={user:e,namespace:t,taskName:n,task:{taskId:r.taskId,meta:r.meta,active:r.active},nonce:BigInt(await i.taskRegistry.nonces(e)),deadline:Math.floor(Date.now()/1e3)+3600};let c=await i.utils.signMeta(a,s,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await i.utils.signMeta(a,s,o));const u=await async function(e,t,n,r,i,a,s){const o={user:e,namespace:t,taskName:n,task:r,nonce:BigInt(i),deadline:a,signatureMeta:s};try{const e=await cb(),t={...o};return t.nonce=String(o.nonce),await e.post("user/relayer/task",t)}catch(e){throw k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,n,r,o.nonce,o.deadline,c);return 201==u.status}async function aE(e,t,n,r,i){if(!tE(n))throw new Error("Invalid taskId");if(r)try{r=JSON.stringify(r)}catch{throw new Error("Meta information cannot be serialized as JSON")}let a=null;try{await async function(e){const t=await ub();return await t.post("api/filesystem/push",jT({taskId:e})).catch(kT)}(n);const s={taskId:n,meta:r||"",active:!0};await async function(e,t,n,r=null){const i=AT(ab("blockchainEnv"));let a=!1;try{if(r)a=await i.taskRegistry.registerTask(t,n,e);else{const r=ab("address");if(!r)throw Error(`Please provide an address property in '${ib()}/.truebit/secret.json'`);a=await iE(r,t,n,e,i)}}catch(e){const t=e.message,n=t.match(/execution reverted: "(.*?)" /)?.[1];throw n?new Error(`Trying to register a task -> ${n}`):new Error(`Trying to register a task -> ${t}`)}return a}(s,e,t,i),a=await async function(e,t){const n=AT(ab("blockchainEnv"));return await n.taskRegistry.getLatestVersion(e,t)}(e,t)}catch(e){if(e instanceof Error)throw e;if("string"==typeof e)throw new Error(e)}return a}function sE(e,n){if(console.log(`Task executed with status: ${n.status}`),n.output)if(console.log(`Task executed with result: ${n.output.result}`),n.output.metering){console.log("Task resource usage:");const r=n.output.metering,a=(e,t)=>{if(0==t)return"N/A";const n=e/t;return n<1?"Short":Number(n.toFixed(0))},s={Gas:{Unit:"Steps",Limits:r.limits.gas,Peak:"N/A","Last status":r.last.steps,Capacity:a(r.limits.gas,r.last.steps)},"Nested calls":{Unit:"Calls",Limits:r.limits.call,Peak:r.peak.call,"Last status":r.last.call,Capacity:a(r.limits.call,r.peak.call)},"Frame memory":{Unit:"Bytes",Limits:r.limits.frame,Peak:r.peak.frame,"Last status":r.last.frame,Capacity:a(r.limits.frame,r.peak.frame)},"System memory":{Unit:"64 Kb pages",Limits:r.limits.memory,Peak:r.peak.memory,"Last status":"𝚫 "+r.last.memoryGrowDelta,Capacity:a(r.limits.memory,r.peak.memory)}};if(console.table(s),e.updateConfig){const e=i.join(process.cwd(),"config.json");try{const n=t.readFileSync(e),i=JSON.parse(n.toString());i.run.limits.gas=String(r.last.steps),i.run.limits.call=String(r.peak.call),i.run.limits.frame=String(r.peak.frame),i.run.limits.memory=String(r.limits.memory),t.writeFileSync(e,JSON.stringify(i)),console.log("Task limits updated with last/peak values (--update-config)")}catch(t){console.log(`Error updating config file at '${e}': '${t}', (--update-config)`)}}}else console.log("No task resource usage reported.")}async function oE(){const e=nb(),t=null!==e,n=me.createInterface({input:process.stdin,output:process.stdout});let r=0;if(t&&e.privateKey&&e.address)r=1;else if(t){console.log(ob.SETUP_STEP1);switch((await(i="Press [Y] to proceed or [N] to skip: ",new Promise(e=>n.question(i,e)))).trim().toUpperCase()){case"Y":r=2;break;case"N":r=3;break;default:return console.log("Invalid input. Please enter Y or N."),void n.close()}}var i;switch(r){case 1:sb(),console.log(ob.SETUP_STEP1_SCENARIO1_P1);break;case 2:{sb();const e=de.Wallet.createRandom(),t=e.privateKey,n=e.address;rb({privateKey:t,address:n}),console.log("\nSetting up your new wallet..."),console.log(ob.SETUP_STEP1_SCENARIO2(n));break}case 3:sb(),console.log(ob.SETUP_STEP1_SCENARIO3),process.exit(1);break;default:console.log("An unexpected error occurred.")}n.close()}async function cE(e,t,n,r,i,a,s){console.log("Deploying the API Authentication Credentials");try{if(!function(e){try{new fe(e)}catch{return!1}return!0}(a))throw"Invalid private key provided";if(!de.isAddress(s))throw"Invalid address provided";if(QT(r,i),!tE(e))throw"Invalid taskId";const o=await ub();await o.post("api/api-credentials",jT({taskId:e,namespace:t,taskName:n,authString:i,method:r})).catch(kT),console.log("The credentials were deployed "+P.green("Successfully"))}catch(e){throw`There was an Error deploying credentials:\nCouldn't push api credentials to remote server: ${e}`}}async function uE(e,t,n=ab("blockchainEnv"),r=ab("address")){nE(e);const i=AT(n),a=await i.authorization.getEIP712Domain(),s=await i.authorization.nonces(r),o=Math.floor(Date.now()/1e3)+3600,c=de.keccak256(de.toUtf8Bytes(e)),u={user:r,apiKeyHash:c,nonce:Number(s),deadline:o},l=await i.utils.signMeta(a,{RegisterMeta:[{name:"user",type:"address"},{name:"apiKeyHash",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u),p=await async function(e,t,n,r,i){const a={user:e,apiKeyHash:t,deadline:n,signatureMeta:r};try{const e=await cb();return await e.post("user/relayer/auth",a,{params:{fromSetup:i}})}catch(e){throw k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(r,c,o,l,t);return 201==p.status?c:null}const lE="0x0000000000000000000000000000000000000000";async function pE(e){let t=!0;if(""===e)t=!1,console.log("An email address is required. Please provide your email address to proceed.");else{new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)?await async function(e){const t=await cb();try{return!0===(await t.get(`userexistence/${e}`)).data}catch(e){if(k.isAxiosError(e)&&404===e.response?.status&&"string"==typeof e.response?.data?.message&&e.response.data.message.includes("User not found"))return!1;throw e}}(e)&&(t=!1,console.log("The provided email address is already in use. Please enter a different email address.")):(t=!1,console.log("The email address provided is not valid. Please try again."))}return t}function dE(e){return"Y"===e||"N"===e}async function fE(){const e=await async function(){const e=AT(ab("blockchainEnv"));let t="";try{await vT(async()=>{t=S();const n=de.keccak256(de.toUtf8Bytes(t));return await e.authorization.getPayerAddress(n)===lE},{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw gT(e)?Error("Attempts to generate unique Api Key for the user exhausted."):e}return t}();try{if(!await uE(e,!0))throw Error("The API key could not been registered.")}catch(e){const t=e.message;if(t)throw Error(`There was an error registering the API key -> ${t}`)}return e}async function hE(){const e=await async function(){const e=AT(ab("blockchainEnv"));let t="";try{await vT(async()=>{t=E(4).toString("hex");return await e.taskRegistry.getNamespaceOwner(t)===lE},{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw gT(e)?Error("Attempts to generate unique namespace for the user exhausted."):e}return t}();try{if(!await rE(e,!0))throw Error("The namespace could not been registered.")}catch(e){const t=e.message,n=t?t.match(/execution reverted: "(.*?)" /)?.[1]:null;if(n)throw Error(`There was an error registering the namespace -> ${n}`);if(t)throw Error(`There was an error registering the namespace -> ${t}`)}return e}async function mE(e,t){try{const n={message:"I am a Truebit User"};if(!t)throw Error("Secret.json does not exists");const r=t.privateKey,i=t.address,a=rm.createSignedBody(n,r,i),s=await cb();return(await s.get(`user/${e}`,{headers:{"truebit-auth":JSON.stringify(a)}})).data}catch(e){if(k.isAxiosError(e)&&401===e.response?.status&&e.response?.data.message.includes("Entitlement Validation Error"))return null;if(k.isAxiosError(e)&&404==e.response?.status&&e.response?.data.message&&e.response?.data.message.includes("User not found"))return null;throw k.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}function yE(e){e.fullNameAnswer="",e.emailAddressAnswer="",e.companyNameAnswer="",e.jobPositionAnswer="",e.eulaAnswer="",e.confirmRegistration=""}async function gE(e,t,n){const r=nb(),i=null!==r;let a,s=0;const o=be({input:process.stdin,output:process.stdout,terminal:!0});switch(i&&(!function(e){return!de.isAddress(e)||42!==e.length||!e.startsWith("0x")}(r.address)?(a=await mE(r.address,r),s=a?2:3):s=1),s){case 1:console.log("The wallet set in the configuration must be a valid ethereum address. (ENS not supported yet)");break;case 2:console.log(ob.SETUP_STEP1_SCENARIO1_P2(a));break;case 3:{console.log(ob.SETUP_STEP2_SCENARIO3_P1),console.log();const i={user_ip:e,date_time:IT(),os_version:u.type+"_"+u.release,node_version:process.version,cli_version:t};await n.sendEventToMixpanel("user_registration_begin",i);const a={confirmRegistration:"",fullNameAnswer:"",emailAddressAnswer:"",companyNameAnswer:"",jobPositionAnswer:"",eulaAnswer:""};try{for(;"Y"!=a.confirmRegistration;){for(a.fullNameAnswer=(await o.question(P.bold(" 1. Full Name: "))).trim();""===a.fullNameAnswer;)console.log("Your full name is required. Please provide your first and last name to proceed."),a.fullNameAnswer=(await o.question(P.bold(" 1. Full Name: "))).trim();for(a.emailAddressAnswer=(await o.question(P.bold(" 2. Email Address: "))).trim();!await pE(a.emailAddressAnswer);)a.emailAddressAnswer=(await o.question(P.bold(" 2. Email Address: "))).trim();for(a.companyNameAnswer=(await o.question(P.bold(" 3. Company Name: "))).trim(),a.jobPositionAnswer=(await o.question(P.bold(" 4. Job Position: "))).trim();!dE(a.eulaAnswer);)a.eulaAnswer=(await o.question(P.bold(` 5. Accept EULA? [Y|N] (${ob.EULA_TERMS_LINK}): `))).toUpperCase();if("N"==a.eulaAnswer){console.log(ob.EULA_REGISTRATION_NO_ACCEPTED);break}for(;!dE(a.confirmRegistration);)console.log("\nIs the information provided above correct?"),a.confirmRegistration=(await o.question(P.bold("Press [Y] to confirm or [N] to edit: "))).toUpperCase();"N"==a.confirmRegistration&&(console.log("\nPlease provide the following information:"),yE(a))}}catch(e){if("AbortError"===e.name||e.message.includes("Ctrl+C")){const t=e.message,r=i;r.error_details=t,r.date_time=IT();const s={fullname:a.fullNameAnswer,email:a.emailAddressAnswer,company:a.companyNameAnswer,role:a.jobPositionAnswer};r.user_info=JSON.stringify(s),await n.sendEventToMixpanel("user_registration_failed",r),process.exit(0)}}if("N"==a.eulaAnswer)break;const s=i;console.log(),console.log("By completing registration, you'll be automatically subscribed to our newsletter."),console.log("To opt-out, please follow the steps described in our documentation portal."),console.log();const c=ye({text:P.bold("... registering your account."),stream:process.stdout}).start();try{const e=await hE(),t=await fE(),i={name:a.fullNameAnswer,email:a.emailAddressAnswer,walletAddress:r?.address,company:a.companyNameAnswer,jobDescription:a.jobPositionAnswer,EULA:rm.createSignedBody({ip:await RT(),date:(new Date).toISOString()},r.privateKey),defaultNamespace:e,defaultApiKey:t};await async function(e){try{const t=await cb();return await t.post("user/register",e)}catch(e){throw k.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}(i),c.stop(),console.log(ob.SETUP_STEP2_SCENARIO3_P2(a,r.address,e,t)),s.distinct_id=i.walletAddress,s.date_time=IT(),s.fullname=i.name,s.email=i.email,s.company=i.company,s.role=i.jobDescription,s.namespace=i.defaultNamespace,s.api_key=t,s.wallet_address=i.walletAddress,await n.sendEventToMixpanel("user_registration_success",s),await n.registerUserMixpanel(s.wallet_address,function(e){const t={apiKey:e.api_key,name:e.fullname,email:e.email,ip:e.user_ip,company:e.company,role:e.role,namespace:e.namespace,walletAddress:e.wallet_address};return t}(s))}catch(e){c.stop();const t=e.message,r=i;r.error_details=t,r.date_time=IT();const s={fullname:a.fullNameAnswer,email:a.emailAddressAnswer,company:a.companyNameAnswer,role:a.jobPositionAnswer};r.user_info=JSON.stringify(s),await n.sendEventToMixpanel("user_registration_failed",r);const o=t?t.match(/CreateUserValidation - (.*?.*)/)?.[1]:null;if(o)throw Error(o);if(t.includes("Sender doesn't have enough funds to send tx"))throw Error("We are currently experiencing technical difficulties. Please try again later.");console.error(ob.SETUP_STEP2_UNHANDLED_ERROR),process.exit(1)}finally{c.clear()}break}default:throw Error("An unexpected error occurred.")}o.close()}async function bE(e,n,r){const a=nb(),s=null!==a;let o=0;switch(o=s?s&&!a.eula?2:3:1,o){case 1:case 2:{const a=be({input:process.stdin,output:process.stdout,terminal:!0});let s="";const c={user_ip:e,date_time:IT(),os_version:u.type+"_"+u.release,node_version:process.version,cli_version:n};for(console.log(ob.EULA_INSTALLATION);!dE(s);)s=(await a.question(P.bold("\nHave you read, and do you accept the Terms of Use? [Y|N]: "))).toUpperCase(),await r.sendEventToMixpanel("TOS_shown",c);if("N"==s)throw c.date_time=IT(),await r.sendEventToMixpanel("TOS_rejected",c),ob.EULA_INSTALLATION_NO_ACCEPTED;c.date_time=IT(),await r.sendEventToMixpanel("TOS_accepted",c);const l=Math.round((new Date).getTime()).toString();if(1===o){!function(e=tb()){const n=ib(),r=i.join(n,".truebit"),a=i.join(r,"secret.json");t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),t.writeFileSync(a,JSON.stringify(e,null,2),{encoding:"utf8"})}({...tb(),eula:l})}else 2===o&&rb({eula:l});a.close()}}}async function vE(e=!1){const t=nb(),n=null!==t;let r=null,i=0;switch(n?!n||t.privateKey&&t.address?(r=await mE(t.address,t),i=r?4:3):i=2:i=1,i){case 1:case 2:case 3:console.log(ob.USER_NO_REGISTERED),process.exit(1);break;case 4:e&&console.log(`You are logged in as: ${r?.name} - ${r?.email}`)}}async function wE(e){try{return(await vT(async()=>{const t=await async function(){let e=ab("httpAdapterURL");return e||(e=tb().httpAdapterURL),k.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0})}();return await t.get("api/version",{params:{version:e}})},{delay:500,maxTry:10})).data}catch(e){throw gT(e)?new Error("Attempts to get platform version exhausted. The server is not responding."):k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}async function xE(e){let t=e;"test"==process.env.REGRESSION_ENV&&(t="1.0.0");(await wE(t)).shouldUpdate&&(console.error("Update Required"),console.log(""),console.log("To continue using Truebit Verify, please update the CLI to latest version by running: "),console.log("npm i -g @truebit/cli"),process.exit())}var _E,TE,EE,SE={},kE={exports:{}},ME={exports:{}};function AE(){if(TE)return _E;return TE=1,_E=function(e){function t(e){let r,i,a,s=null;function o(...e){if(!o.enabled)return;const n=o,i=Number(new Date),a=i-(r||i);n.diff=a,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if("%%"===r)return"%";s++;const a=t.formatters[i];if("function"==typeof a){const t=e[s];r=a.call(n,t),e.splice(s,1),s--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=n,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{s=e}}),"function"==typeof t.init&&t.init(o),o}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(i=r,a=n,r++):(n++,r++);else{if(-1===i)return!1;r=i+1,a++,n=a}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(r(e,n))return!1;for(const n of t.names)if(r(e,n))return!0;return!1},t.humanize=Kt(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},_E}var OE,RE,IE,NE,CE,PE,jE={exports:{}};function LE(){return RE?OE:(RE=1,OE=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function $E(){return CE||(CE=1,function(e,t){const n=y,r=s;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),a=` ${i};1m${r} `;n[0]=a+n[0].split("\n").join("\n"+a),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(NE)return IE;NE=1;const e=l,t=y,n=LE(),{env:r}=process;let i;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(t,a){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!a&&void 0===i)return 0;const s=i||0;if("dumb"===r.TERM)return s;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in r)||"codeship"===r.CI_NAME?1:s;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:s}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),IE={supportsColor:function(e){return a(s(e,e&&e.isTTY))},stdout:a(s(!0,t.isatty(1))),stderr:a(s(!0,t.isatty(2)))},IE}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e},{}),e.exports=AE()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(jE,jE.exports)),jE.exports}function DE(){return PE||(PE=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?kE.exports=(EE||(EE=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=AE()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ME,ME.exports)),ME.exports):kE.exports=$E()),kE.exports}var UE,zE,BE,FE={};function qE(){if(BE)return zE;BE=1;var e=zE&&zE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const t=f,n=e(DE()),r=e((UE||(UE=1,Object.defineProperty(FE,"__esModule",{value:!0}),FE.default=function(e){return function(t,n){return new Promise((r,i)=>{e.call(this,t,n,(e,t)=>{e?i(e):r(t)})})}}),FE)),i=n.default("agent-base");function a(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function s(e,t){return new s.Agent(e,t)}return function(e){class n extends t.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:a()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:a()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=a()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let s=!1,o=null;const c=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{o=null,s=!0;const e=new Error(`A "socket" was not created for HTTP request before ${c}ms`);e.code="ETIMEOUT",u(e)},p=e=>{s||(null!==o&&(clearTimeout(o),o=null),u(e))},d=t=>{if(s)return;if(null!=o&&(clearTimeout(o),o=null),r=t,Boolean(r)&&"function"==typeof r.addRequest)return i("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var r;if(t)return t.once("free",()=>{this.freeSocket(t,n)}),void e.onSocket(t);const a=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(a)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(i("Converting legacy callback function to promise"),this.promisifiedCallback=r.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof c&&c>0&&(o=setTimeout(l,c)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{i("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(d,p)}catch(e){Promise.reject(e).catch(p)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){i("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){i("Destroying agent %o",this.constructor.name)}}e.Agent=n,e.prototype=e.Agent.prototype}(s||(s={})),zE=s}var HE,YE,VE,KE,GE={};function WE(){if(HE)return GE;HE=1;var e=GE&&GE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(GE,"__esModule",{value:!0});const t=e(DE()).default("https-proxy-agent:parse-proxy-response");return GE.default=function(e){return new Promise((n,r)=>{let i=0;const a=[];function s(){const r=e.read();r?function(e){a.push(e),i+=e.length;const r=Buffer.concat(a,i);if(-1===r.indexOf("\r\n\r\n"))return t("have not received end of HTTP headers yet..."),void s();const o=r.toString("ascii",0,r.indexOf("\r\n")),c=+o.split(" ")[1];t("got proxy server response: %o",o),n({statusCode:c,buffered:r})}(r):e.once("readable",s)}function o(e){t("onclose had error %o",e)}function c(){t("onend")}function u(n){e.removeListener("end",c),e.removeListener("error",u),e.removeListener("close",o),e.removeListener("readable",s),t("onerror %o",n),r(n)}e.on("error",u),e.on("close",o),e.on("end",c),s()})},GE}function JE(){if(YE)return SE;YE=1;var e=SE&&SE.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,o)}c((r=r.apply(e,t||[])).next())})},t=SE&&SE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(SE,"__esModule",{value:!0});const n=t(ue),r=t(ce),i=t(C),a=t(M),s=t(DE()),o=qE(),c=t(WE()),u=s.default("https-proxy-agent:agent");class l extends o.Agent{constructor(e){let t;if(t="string"==typeof e?i.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");u("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(t,i){return e(this,void 0,void 0,function*(){const{proxy:e,secureProxy:s}=this;let o;s?(u("Creating `tls.Socket`: %o",e),o=r.default.connect(e)):(u("Creating `net.Socket`: %o",e),o=n.default.connect(e));const l=Object.assign({},e.headers);let d=`CONNECT ${`${i.host}:${i.port}`} HTTP/1.1\r\n`;e.auth&&(l["Proxy-Authorization"]=`Basic ${Buffer.from(e.auth).toString("base64")}`);let{host:f,port:h,secureEndpoint:m}=i;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(f+=`:${h}`),l.Host=f,l.Connection="close";for(const e of Object.keys(l))d+=`${e}: ${l[e]}\r\n`;const y=c.default(o);o.write(`${d}\r\n`);const{statusCode:g,buffered:b}=yield y;if(200===g){if(t.once("socket",p),i.secureEndpoint){const e=i.servername||i.host;if(!e)throw new Error('Could not determine "servername"');return u("Upgrading socket connection to TLS"),r.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(i,"host","hostname","path","port")),{socket:o,servername:e}))}return o}o.destroy();const v=new n.default.Socket;return v.readable=!0,t.once("socket",e=>{u("replaying proxy buffer for failed request"),a.default(e.listenerCount("data")>0),e.push(b),e.push(null)}),v})}}function p(e){e.resume()}return SE.default=l,SE}var ZE,XE={version:"0.18.1"},QE={};function eS(){return ZE||(ZE=1,QE.async_all=function(e,t,n){var r=e.length,i=null,a=[],s=function(e,t){e&&(i=i||[]).push(e),a.push(t),0===--r&&n(i,a)};if(0===r)n(i,a);else for(var o=0,c=e.length;o<c;o++)t(e[o],s)},QE.ensure_timestamp=function(e){if(!(e instanceof Date||"number"==typeof e))throw new Error("`time` property must be a Date or Unix timestamp and is only required for `import` endpoint");return e instanceof Date?e.getTime():e},QE.assert_logger=function(e){if("object"!=typeof e)throw new TypeError('"logger" must be a valid Logger object');["trace","debug","info","warn","error"].forEach(t=>{if("function"!=typeof e[t])throw new TypeError(`Logger object missing "${t}" method`)})}),QE}var tS,nS,rS={},iS={};function aS(){if(tS)return iS;tS=1;const e=s,{ensure_timestamp:t}=eS();function n(e,n){return n&&(n.$ignore_alias&&(e.$ignore_alias=n.$ignore_alias),n.$ignore_time&&(e.$ignore_time=n.$ignore_time),n.hasOwnProperty("$ip")&&(e.$ip=n.$ip),n.hasOwnProperty("$time")&&(e.$time=t(n.$time)),n.hasOwnProperty("$latitude")&&n.hasOwnProperty("$longitude")&&(e.$latitude=n.$latitude,e.$longitude=n.$longitude)),e}return iS.merge_modifiers=n,iS.ProfileHelpers=(t=Object)=>class extends t{get token(){return this.mixpanel.token}get config(){return this.mixpanel.config}_set(e,t,r,i,{identifiers:a,set_once:s=!1}){let o={};"object"==typeof e?("object"==typeof t?(i=r,r=t):i=t,o=e):(o[e]=t,"function"!=typeof r&&r||(i=r));let c={$token:this.token,...a};c[s?"$set_once":"$set"]=o,"ip"in o&&(c.$ip=o.ip,delete o.ip),o.$ignore_time&&(c.$ignore_time=o.$ignore_time,delete o.$ignore_time),c=n(c,r),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:c}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:c},i)}_delete_profile({identifiers:e,modifiers:t,callback:r}){let i={$delete:"",$token:this.token,...e};"function"==typeof t&&(r=t),i=n(i,t),this.config.debug&&this.mixpanel.config.logger.debug("Deleting profile",{identifiers:e}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:i},r)}_remove({identifiers:t,data:r,modifiers:i,callback:a}){let s={};if("object"!=typeof r||e.isArray(r))this.config.debug&&this.mixpanel.config.logger.error("Invalid value passed to #remove - data must be an object with scalar values");else{for(const[e,t]of Object.entries(r)){if("string"!=typeof t&&"number"!=typeof t)return void(this.config.debug&&this.mixpanel.config.logger.error("Invalid argument passed to #remove - values must be scalar",{key:e,value:t}));s[e]=t}0!==Object.keys(s).length&&("function"==typeof i&&(a=i),r=n(r={$remove:s,$token:this.token,...t},i),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:r}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:r},a))}}_union({identifiers:t,data:r,modifiers:i,callback:a}){let s={};if("object"!=typeof r||e.isArray(r))this.config.debug&&this.mixpanel.config.logger.error("Invalid value passed to #union - data must be an object with scalar or array values");else{for(const[t,n]of Object.entries(r))if(e.isArray(n)){var o=n.filter(function(e){return"string"==typeof e||"number"==typeof e});o.length>0&&(s[t]=o)}else"string"==typeof n||"number"==typeof n?s[t]=[n]:this.config.debug&&this.mixpanel.config.logger.error("Invalid argument passed to #union - values must be a scalar value or array",{key:t,value:n});0!==Object.keys(s).length&&("function"==typeof i&&(a=i),r=n(r={$union:s,$token:this.token,...t},i),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:r}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:r},a))}}_unset({identifiers:t,prop:r,modifiers:i,callback:a}){let s=[];if(e.isArray(r))s=r;else{if("string"!=typeof r)return void(this.config.debug&&this.mixpanel.config.logger.error("Invalid argument passed to #unset - must be a string or array",{prop:r}));s=[r]}let o={$unset:s,$token:this.token,...t};"function"==typeof i&&(a=i),o=n(o,i),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:o}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:o},a)}},iS}var sS,oS,cS,uS={};var lS=function(){if(cS)return oS;cS=1;const e=ve,t=d.Buffer,n=b,r=w,i=function(){if(KE)return VE;KE=1;const e=(VE&&VE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(JE());function t(t){return new e.default(t)}return function(t){t.HttpsProxyAgent=e.default,t.prototype=e.default.prototype}(t||(t={})),VE=t}(),a=C,s=XE,{async_all:o,ensure_timestamp:c,assert_logger:u}=eS(),{MixpanelGroups:l}=function(){if(nS)return rS;nS=1;const{ProfileHelpers:e}=aS();class t extends(e()){constructor(e){super(),this.mixpanel=e,this.endpoint="/groups"}set_once(e,t,n,r,i,a){const s={$group_key:e,$group_id:t};this._set(n,r,i,a,{identifiers:s,set_once:!0})}set(e,t,n,r,i,a){const s={$group_key:e,$group_id:t};this._set(n,r,i,a,{identifiers:s})}delete_group(e,t,n,r){const i={$group_key:e,$group_id:t};this._delete_profile({identifiers:i,modifiers:n,callback:r})}remove(e,t,n,r,i){const a={$group_key:e,$group_id:t};this._remove({identifiers:a,data:n,modifiers:r,callback:i})}union(e,t,n,r,i){const a={$group_key:e,$group_id:t};this._union({identifiers:a,data:n,modifiers:r,callback:i})}unset(e,t,n,r,i){const a={$group_key:e,$group_id:t};this._unset({identifiers:a,prop:n,modifiers:r,callback:i})}}return rS.MixpanelGroups=t,rS}(),{MixpanelPeople:p}=function(){if(sS)return uS;sS=1;const{merge_modifiers:e,ProfileHelpers:t}=aS();class n extends(t()){constructor(e){super(),this.mixpanel=e,this.endpoint="/engage"}set_once(e,t,n,r,i){const a={$distinct_id:e};this._set(t,n,r,i,{identifiers:a,set_once:!0})}set(e,t,n,r,i){const a={$distinct_id:e};this._set(t,n,r,i,{identifiers:a})}increment(t,n,r,i,a){var s={};if("object"==typeof n){"object"==typeof r?(a=i,i=r):a=r;for(const[e,t]of Object.entries(n))isNaN(parseFloat(t))?this.mixpanel.config.debug&&this.mixpanel.config.logger.error("Invalid increment value passed to mixpanel.people.increment - must be a number",{key:e,value:t}):s[e]=t}else"number"!=typeof r&&r?"function"==typeof r?(a=r,s[n]=1):(a=i,i="object"==typeof r?r:{},s[n]=1):(r=r||1,s[n]=r,"function"==typeof i&&(a=i));var o={$add:s,$token:this.mixpanel.token,$distinct_id:t};o=e(o,i),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Sending the following data to Mixpanel (Engage)",{data:o}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:o},a)}append(t,n,r,i,a){var s={};"object"==typeof n?("object"==typeof r?(a=i,i=r):a=r,Object.keys(n).forEach(function(e){s[e]=n[e]})):(s[n]=r,"function"==typeof i&&(a=i));var o={$append:s,$token:this.mixpanel.token,$distinct_id:t};o=e(o,i),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Sending the following data to Mixpanel (Engage)",{data:o}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:o},a)}track_charge(t,n,r,i,a){if("function"!=typeof r&&r?"function"!=typeof i&&i||(a=i||void 0,(r.$ignore_time||r.hasOwnProperty("$ip"))&&(i={},Object.keys(r).forEach(function(e){i[e]=r[e],delete r[e]}))):(a=r||void 0,r={}),"number"!=typeof n&&(n=parseFloat(n),isNaN(n)))this.mixpanel.config.logger.error("Invalid value passed to mixpanel.people.track_charge - must be a number");else{if(r.$amount=n,r.hasOwnProperty("$time")){var s=r.$time;"[object Date]"===Object.prototype.toString.call(s)&&(r.$time=s.toISOString())}var o={$append:{$transactions:r},$token:this.mixpanel.token,$distinct_id:t};o=e(o,i),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Sending the following data to Mixpanel (Engage)",{data:o}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:o},a)}}clear_charges(t,n,r){var i={$set:{$transactions:[]},$token:this.mixpanel.token,$distinct_id:t};"function"==typeof n&&(r=n),i=e(i,n),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Clearing this user's charges",{$distinct_id:t}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:i},r)}delete_user(e,t,n){const r={$distinct_id:e};this._delete_profile({identifiers:r,modifiers:t,callback:n})}remove(e,t,n,r){const i={$distinct_id:e};this._remove({identifiers:i,data:t,modifiers:n,callback:r})}union(e,t,n,r){const i={$distinct_id:e};this._union({identifiers:i,data:t,modifiers:n,callback:r})}unset(e,t,n,r){const i={$distinct_id:e};this._unset({identifiers:i,prop:t,modifiers:n,callback:r})}}return uS.MixpanelPeople=n,uS}(),f={test:!1,debug:!1,verbose:!1,host:"api.mixpanel.com",protocol:"https",path:"",keepAlive:!0,geolocate:!1,logger:console};return oS={init:function(d,h){if(!d)throw new Error("The Mixpanel Client needs a Mixpanel token: `init(token)`");const m={token:d,config:{...f}},{keepAlive:y}=m.config,g={http:n,https:r},b={http:new n.Agent({keepAlive:y}),https:new r.Agent({keepAlive:y})},v=process.env.HTTPS_PROXY||process.env.HTTP_PROXY,w=v?new i(Object.assign(a.parse(v),{keepAlive:y})):null;m.send_request=function(n,i){i=i||function(){};let a=t.from(JSON.stringify(n.data)).toString("base64");const s=n.endpoint,o=(n.method||"GET").toUpperCase();let c={ip:m.config.geolocate?1:0,verbose:m.config.verbose?1:0};const u=m.config.key,l=m.config.secret,p=g[m.config.protocol];let d,f={host:m.config.host,port:m.config.port,headers:{},method:o};if(!p)throw new Error("Mixpanel Initialization Error: Unsupported protocol "+m.config.protocol+". Supported protocols are: "+Object.keys(g));if("POST"===o?(a="data="+a,f.headers["Content-Type"]="application/x-www-form-urlencoded",f.headers["Content-Length"]=t.byteLength(a)):"GET"===o&&(c.data=a),l){if(p!==r)throw new Error("Must use HTTPS if authenticating with API Secret");const e=t.from(l+":").toString("base64");f.headers.Authorization="Basic "+e}else if(u)c.api_key=u;else if("/import"===s)throw new Error("The Mixpanel Client needs a Mixpanel API Secret when importing old events: `init(token, { secret: ... })`");f.agent=w||b[m.config.protocol],m.config.test&&(c.test=1),f.path=m.config.path+s+"?"+e.stringify(c),d=p.request(f,function(e){var t="";e.on("data",function(e){t+=e}),e.on("end",function(){var e;if(m.config.verbose)try{var n=JSON.parse(t);1!=n.status&&(e=new Error("Mixpanel Server Error: "+n.error))}catch(t){e=new Error("Could not parse response from Mixpanel")}else e="1"!==t?new Error("Mixpanel Server Error: "+t):void 0;i(e)})}),d.on("error",function(e){m.config.debug&&m.config.logger.error("Got Error: "+e.message),i(e)}),"POST"===o&&d.write(a),d.end()},m.send_event_request=function(e,t,n,r){n.token=m.token,n.mp_lib="node",n.$lib_version=s.version;var i={event:t,properties:n};m.config.debug&&m.config.logger.debug("Sending the following event to Mixpanel",{data:i}),m.send_request({method:"GET",endpoint:e,data:i},r)};var x=function(e,t){for(var n=[],r=0,i=e.length;r<i;)n.push(e.slice(r,r+=t));return n},_=function(e,t){var n=e.event_list,r=e.endpoint,i=e.max_batch_size?Math.min(50,e.max_batch_size):50,a=e.max_concurrent_requests||e.max_batch_size>50&&Math.ceil(e.max_batch_size/50),s=x(n,i),u=a?x(s,a):[s],l=s.length,p=u.length;function d(e,t){e.length>0&&(e=e.map(function(e){return e.properties,("/import"===r||e.properties.time)&&(e.properties.time=c(e.properties.time)),e.properties.token=e.properties.token||m.token,e}),m.send_request({method:"POST",endpoint:r,data:e},t))}!function e(n){var r=u[n];o(r,d,function(r,i){(n+=1)===p?t&&t(r,i):e(n)})}(0),m.config.debug&&m.config.logger.debug("Sending "+n.length+" events to Mixpanel in "+l+" batches of events and "+p+" batches of requests")};return m.track=function(e,t,n){t&&"function"!=typeof t||(n=t,t={}),t.time&&(t.time=c(t.time)),m.send_event_request("/track",e,t,n)},m.track_batch=function(e,t,n){"function"==typeof(t=t||{})&&(n=t,t={});var r={event_list:e,endpoint:"/track",max_concurrent_requests:t.max_concurrent_requests,max_batch_size:t.max_batch_size};_(r,n)},m.import=function(e,t,n,r){n&&"function"!=typeof n||(r=n,n={}),n.time=c(t),m.send_event_request("/import",e,n,r)},m.import_batch=function(e,t,n){var r;"function"!=typeof t&&t||(n=t,t={}),r={event_list:e,endpoint:"/import",max_concurrent_requests:t.max_concurrent_requests,max_batch_size:t.max_batch_size},_(r,n)},m.alias=function(e,t,n){var r={distinct_id:e,alias:t};m.track("$create_alias",r,n)},m.groups=new l(m),m.people=new p(m),m.set_config=function(e){if(e&&void 0!==e.logger&&u(e.logger),Object.assign(m.config,e),e.host){const[t,n]=e.host.split(":");m.config.host=t,n&&(m.config.port=Number(n))}},h&&m.set_config(h),m}},oS}(),pS=xe(lS);const dS="SUCCESS",fS="FAILED";X(!1);const hS=ge(import.meta.url),mS=JSON.parse(r(a.dirname(hS.resolve("@truebit/cli"))+"/../package.json","utf8")),yS=new class{mixpanelClient;constructor(e){this.mixpanelClient=pS.init(e)}async sendEventToMixpanel(e,t){if("test"!=process.env.EVENT_TEST)try{return await new Promise((n,r)=>{this.mixpanelClient.track(e,t,e=>{if(e)return r(e);n()})})}catch{}}async registerUserMixpanel(e,t){if("test"!=process.env.EVENT_TEST){let n;e&&(n=e,this.mixpanelClient.people.set(n,{$name:t.name,$email:t.email,$ip:t.ip,company:t.company,role:t.role,namespace:t.namespace,walletAddress:t.walletAddress,apiKey:t.apiKey}))}}}(function(){let e="ed9005372c18624701ec0998cd12bd22";return"local"!==process.env.TRUEBIT_ENV&&"staging"!==process.env.TRUEBIT_ENV&&"testnet"!==process.env.TRUEBIT_ENV||(e="6de18f3bc3d0865f3b4a3676ae16908d"),e}()),gS=await RT(),bS=u.type+"_"+u.release;process.on("unhandledRejection",(e,t)=>{console.error(`Unhandled Rejection at: \n${c(t,void 0,100)}, \nreason: ${e}`)}),async function(){try{await bE(gS,mS.version,yS)}catch(e){console.error(`${e}`),process.exit(1)}let t;await async function(e){if(!wu.satisfies(process.version,e)){const t=`Nodejs required version ${e} not satisfied with current version ${process.version}.`;console.log(t),process.exit(1)}}(mS.engines.node),ab("blockchainEnv")&&(t=ab("blockchainEnv"));const n=ab("RPC_URL");n&&(process.env.RPC_URL=n);const r=new A;r.showSuggestionAfterError(!0),r.description(e.green(R.textSync("Truebit Verify\nCLI"))+"\nA CLI to interact with Truebit Verify node\nBy accessing and using the Protocol, you hereby agree to our Terms of Use and our Privacy Policy. Patents pending.\nTerms of Use: https://www.truebit.io/terms\nPrivacy Policy: https://www.truebit.io/privacy-policy").name("truebit").version(mS.version).helpOption("-h, --help","Display help for command"),r.command("setup").description("Setup generate a secret.json in your home directory with your information").summary("Initialize user profile configuration").action(async()=>{try{await xE(mS.version),await async function(){console.log(P.bold("\nWelcome to Truebit Verify!"));const e=nb(),t=null!==e;if(!t||t&&(!e.privateKey||!e.address)){const e=be({input:process.stdin,output:process.stdout,terminal:!0});console.log(ob.SETUP_INTRODUCTION);let t="";for(;!dE(t);)t=(await e.question("Press [Y] to proceed or [N] to exit: ")).toUpperCase();e.close(),"N"==t&&(console.log(ob.SETUP_INTRODUCTION_NO_ACCEPTANCE),process.exit(1))}}(),await oE(),await gE(gS,mS.version,yS)}catch(e){console.error(`${e}`),process.exit(1)}}),r.command("start").description("Executes a task within the context of Truebit Verify node. The task should be already uploaded to local-storage.").summary("Run a Truebit Task").argument("<taskId>","Id of the task").argument("<input>","Input for task execution").option("--update-config","Automatically update resource limits in config.json according to peak usage report").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t,n)=>{const r=function(e,t,n,r,i){const a=ab("address");return{distinct_id:a,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,taskId:e,input:t,wallet_address:a}}(e,t,gS,bS,mS.version);try{await xE(mS.version);const i=await(async(e,t,n)=>{if(console.log("Executing the function Task"),!tE(t))throw"Invalid task id";const r={status:"",result:""},i=await ub(),a=await i.post("api/execution/",jT({taskId:t,input:n})).catch(kT),s=a.data.executionId;if(console.log(`Execution Id: ${s}`),a.data.payload)sE(e,a.data.payload),r.status=a.data.payload.status,r.result=a.data.payload.output?.result?a.data.payload.output?.result:"";else{const t=setInterval(async()=>{const n=await i.get(`api/execution/${s}`);n.data&&"running"!=n.data.status&&(sE(e,n.data),clearInterval(t)),r.status=n.data.status,r.result=n.data.output?.result?n.data.output?.result:""},1e3)}return r})(n,e,t);"failed"==i.status?(r.status=fS,r.error_details=i.result,await yS.sendEventToMixpanel("start",r)):(r.status=dS,await yS.sendEventToMixpanel("start",r))}catch(e){console.error(`Error: ${e}`),r.status=fS,r.error_details=e,await yS.sendEventToMixpanel("start",r)}}),r.command("deploy").description("Deploys and registers a new Truebit task specified by the --taskId parameter. Using the deploy command makes the Truebit task available for execution.").summary("Deploy and register a new Truebit Task").argument("<namespace>","Namespace to register the task in (lowercase)").argument("<taskName>","Name of the task (lowercase)").option("--taskId <taskId>","Id of the task <Required>").option("--meta <meta>","Meta information for the task (string between single quotes)").addOption(new O("--label <label>","Label for the task").hideHelp()).option("--norelay","Do not relay the transaction").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(t,n,r)=>{await xE(mS.version);let i=ye();const a=function(e,t,n,r,i,a,s){const o=ab("address");return{distinct_id:o,user_ip:i,date_time:IT(),os_version:a,node_version:process.version,cli_version:s,taskId:e,task_name:t,namespace:n,label:r,wallet_address:o}}(r.taskId,n,t,r.label,gS,bS,mS.version);try{if(MT(t,"Namespace"),MT(n,"TaskName"),r.label&&r.label.length>128)throw new Error("Label exceeds maximum length of 128 chars");if(!r.taskId)throw new Error("Task ID is required to register a task");let s="function";r.taskId.split("_")[0]=="API".toLowerCase()&&(s="API"),i=ye({text:`Deploying and registering the ${s} task`,stream:process.stdout}).start();const o=await aE(t,n,r.taskId,r.meta,r.norelay);a.version=o?.toString();let c=!1;r.label&&(c=await async function(e,t,n){const r=AT(ab("blockchainEnv")),i=await r.taskRegistry.getLatestVersion(e,t);return await r.taskRegistry.setTaskLabel(e,t,i,n)}(t,n,r.label)),i.stop(),o&&(console.log(e.green(`The ${s} task has been deployed successfully. The Task ${n} version '${o}' was registered successfully in namespace ${t}.`)),r.meta&&console.log(e.green(`Metadata associated to the task: ${r.meta}.`)),c&&console.log(e.green(`Label ${r.label} set successfully for task ${n} in namespace ${t}.`))),a.status=dS,await yS.sendEventToMixpanel("deploy",a)}catch(e){i.stop(),console.error(`${e}`),a.error_details=`${e}`,a.status=fS,await yS.sendEventToMixpanel("deploy",a)}i.clear()}),r.command("build").description("Compiles source code to obtain compiled and instrumented Truebit task and pushes it to the Truebit node.").summary("Create a Function Task").option("-l, --lang [programming-language]","Specify the programming language in which the task was developed").argument("<sourceCodePath>","Path of the task source code.").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t)=>{const n=function(e,t,n){const r=ab("address");return{distinct_id:r,user_ip:e,date_time:IT(),os_version:t,node_version:process.version,cli_version:n,wallet_address:r}}(gS,bS,mS.version);try{await xE(mS.version),t.lang=t.lang?t.lang:ab("defaultLanguage"),n.language=t.lang;if(!Object.values(so).includes(t.lang))throw`Invalid language provided, the current options are: ${Object.values(so)}`;console.log("Building the function task");const r=await LT(t.lang,e||"./");t.lang!=so.JS&&t.lang!=so.PYTHON?n.taskId=await async function(e){try{const t=await ub(),n=await t.post("api/instrumentation",jT({taskId:`${e}`})).catch(kT);if(!0===n.data.error?.status){if(!n.data.error.message)throw"Malformed instrumentation service error message";console.log(`Instrumentation failed: ${n.data.error?.message}`)}else{if(!n.data.payload||!n.data.payload.instrumentedTaskId)throw"Malformed instrumentation service success message";console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n.data.payload.instrumentedTaskId}`)}return n.data.payload.instrumentedTaskId}catch(e){throw console.error(e),e}}(r):(console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${r}`),n.taskId=r),n.status=dS,await yS.sendEventToMixpanel("build",n)}catch(e){n.error_details=e,n.status=fS,await yS.sendEventToMixpanel("build",n),console.error(`Error: ${e}`)}}),r.command("create-api").description("Create the Truebit API Task and upload the Manifest to the local storage. As a result, it returns the taskId").summary("Create an API Task").argument("<manifestPath>","Path of the manifest.").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async e=>{const t=function(e,t,n,r){const i=ab("address");return{distinct_id:i,user_ip:t,date_time:IT(),os_version:n,node_version:process.version,cli_version:r,manifest:e,wallet_address:i}}(e,gS,bS,mS.version);try{await xE(mS.version),console.log("Creating API task...");const n=await LT(oo.API,e||"./");console.log("Your API task is ready!"),console.log(`Use the following TaskId for execution or deployment: \n${n}`),t.status=dS,await yS.sendEventToMixpanel("create-api",t)}catch(e){console.error(`Error: ${e}`),t.status=fS,t.error_details=`${e}`,await yS.sendEventToMixpanel("create-api",t)}}),r.command("start-api").description("Start the Truebit API Task, verify with enforcer and request the api. As a result, it returns the API response").summary("Run an API Task").argument("<manifestPath>","Path of the manifest.").argument("<input>","Input request JSON file path").argument("[authType]",`Type of authentication needed for API task usage. One of: <${Object.values(XT)}>`).argument("[authString]",'Auth string is a comma separated value that represents auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t,n,r)=>{const i=function(e,t,n,r,i){const a=ab("address");return{distinct_id:a,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,manifest:e,authType:t,wallet_address:a}}(e,n,gS,bS,mS.version);try{await xE(mS.version),console.log("Executing the API Task"),n&&r?await eE(e,t,n,r):await eE(e,t,null,""),i.status=dS,await yS.sendEventToMixpanel("start-api",i)}catch(e){console.error(`${e}`),i.status=fS,i.error_details=`${e}`,await yS.sendEventToMixpanel("start-api",i)}}),r.command("status").description("Retrieves the status of a given execution id.").summary("Get execution status").argument("<executionId>","Execution Id").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async e=>{try{await xE(mS.version),await async function(e){try{console.log("Fetching execution status...");const t=await ub(),n=await t.get(`api/execution/${e}`).catch(kT);if(n.data.message)throw n.data.message;console.log("Task execution status: ",n.data.status),n.data.output&&console.log("Task execution output: ",n.data.output)}catch(t){console.error(`Couldn't fetch execution status for executionId ${e}: ${t}`)}}(e)}catch(e){console.error(`Error: ${e}`)}}),r.command("api-auth").description("Specify authentication for a truebit api task").summary("Set API Task authentication").argument("<namespace>","Namespace to register").argument("<taskname>","Taskname to register").argument("<taskId>","Id of the task").argument("<authType>",`Type of authentication need for api task usage. One of: <${Object.values(XT)}>`).argument("<authString>",'Auth string is a comma separated value that represent auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t,n,r,i)=>{const a=function(e,t,n,r,i,a,s){const o=ab("address");return{distinct_id:o,user_ip:i,date_time:IT(),os_version:a,node_version:process.version,cli_version:s,taskId:e,namespace:t,taskname:n,authType:r,wallet_address:o}}(n,e,t,r,gS,bS,mS.version);try{await xE(mS.version);const s=ab("privateKey"),o=ab("address");await cE(n,e,t,r,i,s,o),a.status=dS,await yS.sendEventToMixpanel("api-auth",a)}catch(e){console.error(`Error: ${e}`),a.status=fS,a.error_details=`${e}`,await yS.sendEventToMixpanel("api-auth",a)}});const i=r.command("namespace").description("The namespace command helps you group and manage different tasks under a single name, like an umbrella.\nThis name, called a namespace, can be anything that represents your tasks, such as the name of your company. Each task you create will be associated with a namespace.").summary("Manage Namespace operations").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}});i.command("register").argument("<namespace>","Namespace to register").description("Register a new namespace. The user who calls this command will become the owner of the registered namespace. Each namespace can have only one owner. The owner can grant access to other users using the grant command.").summary("Register a new namespace").option("--norelay","Do not relay the transaction").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,void 0);await xE(mS.version);const a=ye({text:`Registering namespace: ${e.cyan(n)} \n`,stream:process.stdout}).start();try{const s=await rE(n,!1,r.norelay,t);a.stop(),s&&console.log(e.green(`Namespace ${n} registered successfully`)),i.status=dS,await yS.sendEventToMixpanel("namespace_register",i)}catch(t){a.stop();const r=t.message,s=r.match(/execution reverted: "(.*?)" /)?.[1];s?(console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${s}`),i.error_details=`${s}`):(console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${r}`),i.error_details=`${r}`),i.status=fS,await yS.sendEventToMixpanel("namespace_register",i)}a.clear()}),i.command("transfer").argument("<namespace>","Namespace to transfer").argument("<address>","Address to transfer namespace to").description("Change the owner of a namespace. \nOnly the current owner can use this command to grant access.").summary("Transfer a namespace").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Transferring namespace: ${e.cyan(n)} to address: ${e.cyan(r)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.taskRegistry.transferTaskNamespace(n,r);a.stop(),o&&(console.log(e.green(`Namespace ${n} transferred successfully to ${r}`)),i.status=dS,await yS.sendEventToMixpanel("namespace_transfer",i))}catch(t){a.stop();const s=t.message,o=s.match(/execution reverted: "(.*?)" /)?.[1];o?(console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${o}`),i.error_details=`${o}`):(console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${s}`),i.error_details=`${s}`),i.status=fS,await yS.sendEventToMixpanel("namespace_transfer",i)}a.clear()}),i.command("grant").argument("<namespace>","Namespace to grant access to").argument("<address>","Address to grant access to").description("Give a user access to the namespace. \nOnly the current owner can use this command to grant access.").summary("Grant access to a namespace").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Granting access to namespace: ${e.cyan(n)} for address: ${e.cyan(r)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.taskRegistry.grantNamespaceAccess(n,r);a.stop(),o&&(console.log(e.green(`Access to namespace ${n} granted successfully to ${r}`)),i.status=dS,await yS.sendEventToMixpanel("namespace_permission_grant",i))}catch(t){a.stop();const s=t.message,o=s.match(/execution reverted: "(.*?)" /)?.[1];o?(console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${o}`),i.error_details=`${o}`):(console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${s}`),i.error_details=`${s}`),i.status=fS,await yS.sendEventToMixpanel("namespace_permission_grant",i)}a.clear()}),i.command("revoke").argument("<namespace>","Namespace to revoke access from").argument("<address>","Address to revoke access from").description("Take away a user's access to the namespace. \nOnly the current owner can use this command to revoke access.").summary("Revoke access to a namespace").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Revoking access to namespace: ${e.cyan(n)} from address: ${e.cyan(r)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.taskRegistry.revokeNamespaceAccess(n,r);a.stop(),o&&(console.log(e.green(`Access to namespace ${n} revoked successfully from ${r}`)),i.status=dS,await yS.sendEventToMixpanel("namespace_permission_revoke",i))}catch(t){a.stop();const s=t.message,o=s.match(/execution reverted: "(.*?)" /)?.[1];o?(console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${o}`),i.error_details=`${o}`):(console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${s}`),i.error_details=`${s}`),i.status=fS,await yS.sendEventToMixpanel("namespace_permission_revoke",i)}a.clear()});const a=r.command("task").description("Manages tasks within a specified namespace, facilitating the organization, tracking, and management of tasks across different projects or domains. This command serves as a gateway to various task-related operations such as registration, modification, and querying, thereby enhancing project management and operational efficiency.").summary("Manage Task operations").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}});a.command("label").description("Set label for a task in a namespace").summary("Assign a label to a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--label <label>","Label for the task <Required>").option("--ver <version>","Version of the task <Required>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Setting label: ${e.cyan(i.label)} for task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);if(!i.label)throw new Error(`${e.red("ERROR:")} Label is required to set a label for a task. Check -h for help`);if(!i.ver)throw new Error(`${e.red("ERROR:")} Version is required to set a label for a task. Check -h for help`);const c=await o.taskRegistry.setTaskLabel(n,r,i.ver,i.label);s.stop(),s.clear(),c&&(console.log(e.green(`Label ${i.label} set successfully for task ${r} in namespace ${n}`)),a.status=dS,await yS.sendEventToMixpanel("task_label",a))}catch(t){s.stop(),s.clear();const n=t.message;console.error(n);const r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Setting label for task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Setting label for task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_label",a)}}),a.command("disable").description("Disable task in a namespace --ver <version> or --label <label> can be used to disable specific task ").summary("Disable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to disable <Required>").option("--label <label>","Label for the task to disable <Required>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Disabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);let c;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await o.taskRegistry.getTaskByLabel(n,r,i.label);c=await o.taskRegistry.disableTask(n,r,e.version),s.stop(),s.clear()}else c=await o.taskRegistry.disableTask(n,r,i.ver),s.stop();c&&(console.log(e.green(`Task ${r} disabled successfully in namespace ${n}`)),a.status=dS,await yS.sendEventToMixpanel("task_disable",a))}catch(t){s.stop(),s.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Disabling task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Disabling task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_disable",a)}}),a.command("enable").description("Enable a task in a namespace --ver <version> or --label <label> can be used to enable specific task").summary("Enable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to enable <Required>").option("--label <label>","Label for the task to enable <Required>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Enabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);let c;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await o.taskRegistry.getTaskByLabel(n,r,i.label);c=await o.taskRegistry.enableTask(n,r,e.version),s.stop(),s.clear()}else c=await o.taskRegistry.enableTask(n,r,i.ver),s.stop(),s.clear();c&&(console.log(e.green(`Task ${r} enabled successfully in namespace ${n}`)),a.status=dS,await yS.sendEventToMixpanel("task_enable",a))}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Enabling task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Enabling task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_enable",a)}}),a.command("get-task").description("Get task information from a namespace and a taskName --ver or --label can be used to get specific task").summary("Retrieve information from a namespace and a taskName").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task <Optional>").option("--label <label>","Label for the task <Optional>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Getting latest task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);let c={meta:""};if(i.label&&i.ver)throw new Error(`${e.red("ERROR:")} Cannot have both version and label at the same time`);if(i.ver||i.label||(c=await o.taskRegistry.getTask(n,r)),!i.label&&i.ver&&(c=await o.taskRegistry.getTaskByVersion(n,r,i.ver)),i.label&&!i.ver&&(c=await o.taskRegistry.getTaskByLabel(n,r,i.label)),""!==c.meta){const e=JSON.parse(c.meta);c.meta=e}s.stop(),console.log(c),a.status=dS,await yS.sendEventToMixpanel("task_info",a)}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Getting task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Getting task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_info",a)}s.clear()});const s=r.command("auth").description("The auth command is responsible for managing the authorization for task execution. It allows the namespace owner to grant or deny access to addresses, ensuring that only authorized individuals can execute specific tasks.").summary("Manage authorization operations").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}});s.command("grant").description("The auth grant command is responsible for granting access to a specific address within a namespace. The grantee will have the ability to execute the tasks stored within that namespace.").summary("Grant authorization to a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be authorized").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Granting authorization to ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.authorization.grantAuthorization(n,r);a.stop(),o&&(console.log(e.green(`Authorization granted to ${r} in namespace ${n}`)),i.status=dS,await yS.sendEventToMixpanel("auth_permission_grant",i))}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Granting authorization -> : ${r}`),i.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Granting authorization -> : ${n}`),i.error_details=`${n}`),i.status=fS,await yS.sendEventToMixpanel("auth_permission_grant",i)}}),s.command("revoke").description("The auth revoke command is responsible for revoking access from a specific address within a namespace. This command ensures that the specified address can no longer execute the tasks stored within that namespace.").summary("Revoke authorization from a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be unauthorized").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Revoking authorization from ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const s=AT(t),o=await s.authorization.revokeAuthorization(n,r);a.stop(),o&&(console.log(e.green(`Authorization revoked from ${r} in namespace ${n}`)),i.status=dS,await yS.sendEventToMixpanel("auth_permission_revoke",i))}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Revoking authorization -> : ${r}`),i.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Revoking authorization -> : ${n}`),i.error_details=`${n}`),i.status=fS,await yS.sendEventToMixpanel("auth_permission_revoke",i)}a.clear()}),s.command("register").description("The auth register command is responsible for registering a specific API_KEY. Every execution made with this API_KEY will be charged to the user who registered it. This way, you can ensure that the user who registered the API_KEY is responsible for paying for all executions made with it.").summary("Register authorization with an API key hash").argument("<apiKey>","API key for authorization").option("--norelay","Do not relay the transaction").action(async(t,n)=>{const r=PT(t,gS,bS,mS.version);await xE(mS.version);const i=ye({text:`Registering authorization with API key hash ${e.cyan(t)}`,stream:process.stdout}).start();try{let a;if(a=n.norelay?await async function(e,t=ab("blockchainEnv")){nE(e);const n=AT(t),r=de.keccak256(de.toUtf8Bytes(e));return await n.authorization.registerAuthorization(r),r}(t):await uE(t,!1),i.stop(),!a)throw Error("The API key could not been registered.");console.log(e.green(`Authorization registered with API key ${t} with hash -> ${a}`)),r.status=dS,await yS.sendEventToMixpanel("auth_permission_register",r)}catch(t){i.stop(),i.clear();const n=t.message,a=n.match(/execution reverted: "(.*?)" /)?.[1];a?(console.error(`${e.red("ERROR:")} Registering authorization -> : ${a}`),r.error_details=`${a}`):(console.error(`${e.red("ERROR:")} Registering authorization -> : ${n}`),r.error_details=`${n}`),r.status=fS,await yS.sendEventToMixpanel("auth_permission_register",r)}i.clear()}),s.command("deregister").description('The auth deregister command will revoke access to a specific API_KEY. After deregistration, any execution attempt using this API_KEY will result in a "not authorized" message.').summary("Deregister authorization with an API key hash").argument("<apiKey>","API key hash for deregistration").action(async n=>{const r=PT(n,gS,bS,mS.version);await xE(mS.version);const i=ye({text:`Deregistering authorization with API key ${e.cyan(n)}`,stream:process.stdout}).start();try{nE(n);const a=de.keccak256(de.toUtf8Bytes(n)),s=AT(t),o=await s.authorization.deRegisterAuthorization(a);i.stop(),o&&(console.log(e.green(`Authorization deregistered with API key hash ${n} with hash -> ${a}`)),r.status=dS,await yS.sendEventToMixpanel("auth_permission_deregister",r))}catch(t){i.stop(),i.clear();const n=t.message,a=n.match(/execution reverted: "(.*?)" /)?.[1];a?(console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${a}`),r.error_details=`${a}`):(console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${n}`),r.error_details=`${n}`),r.status=fS,await yS.sendEventToMixpanel("auth_permission_deregister",r)}i.clear()}),s.command("check-authorization").description("The auth check-authorization command verifies if a specific address has permission to execute tasks in a particular namespace.").summary("Check if a grantee is authorized").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to check authorization for").action(async(n,r)=>{const i=function(e,t,n,r,i){const a=ab("address");return{distinct_id:a,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,namespace:e,address_check:t,wallet_address:a}}(n,r,gS,bS,mS.version);await xE(mS.version);const a=ye({text:`Checking authorization for ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const s=AT(t),o=await s.authorization.isAuthorized(n,r);a.stop(),console.log(e.green(`Grantee ${r} is ${o?"authorized":"not authorized"} in namespace ${n}`)),i.status=dS,await yS.sendEventToMixpanel("auth_check_permission",i)}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Checking authorization -> : ${r}`),i.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Checking authorization -> : ${n}`),i.error_details=`${n}`),i.status=fS,await yS.sendEventToMixpanel("auth_check_permission",i)}a.clear()}),s.command("get-payer").description("The auth get-payer command retrieves the payer address associated with a specific API_KEY.").summary("Get payer address from an API key hash").argument("<apiKey>","API key for payer address").action(async n=>{const r=PT(n,gS,bS,mS.version);await xE(mS.version);const i=ye({text:`Getting payer address for API key hash ${e.cyan(n)}`,stream:process.stdout}).start();try{const a=AT(t),s=de.keccak256(de.toUtf8Bytes(n)),o=await a.authorization.getPayerAddress(s);i.stop(),console.log(e.green(`Payer address for API key ${n} is ${o}`)),r.status=dS,await yS.sendEventToMixpanel("auth_permission_payer",r)}catch(t){i.stop(),i.clear();const n=t.message,a=n.match(/execution reverted: "(.*?)" /)?.[1];a?(console.error(`${e.red("ERROR:")} Getting payer address -> : ${a}`),r.error_details=`${a}`):(console.error(`${e.red("ERROR:")} Getting payer address -> : ${n}`),r.error_details=`${n}`),r.status=fS,await yS.sendEventToMixpanel("auth_permission_payer",r)}i.clear()}),s.command("new-apikey").description("Generate a new Api Key to be used for execution payment. The Api Key is a unique identifier for the payer.").summary("Generate a new Api Key").action(async()=>{const e={cli_version:mS.version,os_version:bS,user_ip:gS,date_time:IT(),wallet_address:ab("address")};await xE(mS.version);const t=S();console.log(`Api Key: ${t}`),e.status=dS,await yS.sendEventToMixpanel("auth_key_new",e)}),await r.parseAsync(process.argv)}().catch(e=>{console.error(e)});
25
+ ***************************************************************************** */!function(){return xl||(xl=1,function(e){!function(){var t="object"==typeof globalThis?globalThis:"object"==typeof we?we:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),n=r(e);function r(e,t){return function(n,r){Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0!==t.Reflect&&(n=r(t.Reflect,n)),function(e,t){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,o={__proto__:[]}instanceof Array,c=!s&&!o,u={create:s?function(){return pe(Object.create(null))}:o?function(){return pe({__proto__:null})}:function(){return pe({})},has:c?function(e,t){return n.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return n.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},l=Object.getPrototypeOf(Function),p="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:ce(),d="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:ue(),f="function"==typeof WeakMap?WeakMap:le(),h=r?Symbol.for("@reflect-metadata:registry"):void 0,m=ie(),y=ae(m);function g(e,t,n,r){if($(n)){if(!V(e))throw new TypeError;if(!G(t))throw new TypeError;return M(e,t)}if(!V(e))throw new TypeError;if(!z(t))throw new TypeError;if(!z(r)&&!$(r)&&!D(r))throw new TypeError;return D(r)&&(r=void 0),A(e,t,n=Y(n),r)}function b(e,t){function n(n,r){if(!z(n))throw new TypeError;if(!$(r)&&!W(r))throw new TypeError;C(e,t,n,r)}return n}function v(e,t,n,r){if(!z(n))throw new TypeError;return $(r)||(r=Y(r)),C(e,t,n,r)}function w(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),O(e,t,n)}function x(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),R(e,t,n)}function _(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),I(e,t,n)}function T(e,t,n){if(!z(t))throw new TypeError;return $(n)||(n=Y(n)),N(e,t,n)}function E(e,t){if(!z(e))throw new TypeError;return $(t)||(t=Y(t)),P(e,t)}function S(e,t){if(!z(e))throw new TypeError;return $(t)||(t=Y(t)),j(e,t)}function k(e,t,n){if(!z(t))throw new TypeError;if($(n)||(n=Y(n)),!z(t))throw new TypeError;$(n)||(n=Y(n));var r=oe(t,n,!1);return!$(r)&&r.OrdinaryDeleteMetadata(e,t,n)}function M(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!$(r)&&!D(r)){if(!G(r))throw new TypeError;t=r}}return t}function A(e,t,n,r){for(var i=e.length-1;i>=0;--i){var a=(0,e[i])(t,n,r);if(!$(a)&&!D(a)){if(!z(a))throw new TypeError;r=a}}return r}function O(e,t,n){if(R(e,t,n))return!0;var r=ne(t);return!D(r)&&O(e,r,n)}function R(e,t,n){var r=oe(t,n,!1);return!$(r)&&q(r.OrdinaryHasOwnMetadata(e,t,n))}function I(e,t,n){if(R(e,t,n))return N(e,t,n);var r=ne(t);return D(r)?void 0:I(e,r,n)}function N(e,t,n){var r=oe(t,n,!1);if(!$(r))return r.OrdinaryGetOwnMetadata(e,t,n)}function C(e,t,n,r){oe(n,r,!0).OrdinaryDefineOwnMetadata(e,t,n,r)}function P(e,t){var n=j(e,t),r=ne(e);if(null===r)return n;var i=P(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var a=new d,s=[],o=0,c=n;o<c.length;o++){var u=c[o];a.has(u)||(a.add(u),s.push(u))}for(var l=0,p=i;l<p.length;l++){u=p[l];a.has(u)||(a.add(u),s.push(u))}return s}function j(e,t){var n=oe(e,t,!1);return n?n.OrdinaryOwnMetadataKeys(e,t):[]}function L(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function $(e){return void 0===e}function D(e){return null===e}function U(e){return"symbol"==typeof e}function z(e){return"object"==typeof e?null!==e:"function"==typeof e}function B(e,t){switch(L(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var n="string",r=Z(e,i);if(void 0!==r){var a=r.call(e,n);if(z(a))throw new TypeError;return a}return F(e)}function F(e,t){var n,r,i=e.toString;if(K(i)&&!z(r=i.call(e)))return r;if(K(n=e.valueOf)&&!z(r=n.call(e)))return r;throw new TypeError}function q(e){return!!e}function H(e){return""+e}function Y(e){var t=B(e);return U(t)?t:H(t)}function V(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function K(e){return"function"==typeof e}function G(e){return"function"==typeof e}function W(e){switch(L(e)){case 3:case 4:return!0;default:return!1}}function J(e,t){return e===t||e!=e&&t!=t}function Z(e,t){var n=e[t];if(null!=n){if(!K(n))throw new TypeError;return n}}function X(e){var t=Z(e,a);if(!K(t))throw new TypeError;var n=t.call(e);if(!z(n))throw new TypeError;return n}function Q(e){return e.value}function ee(e){var t=e.next();return!t.done&&t}function te(e){var t=e.return;t&&t.call(e)}function ne(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===l)return t;if(t!==l)return t;var n=e.prototype,r=n&&Object.getPrototypeOf(n);if(null==r||r===Object.prototype)return t;var i=r.constructor;return"function"!=typeof i||i===e?t:i}function re(){var e,n,r,i;$(h)||void 0===t.Reflect||h in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=se(t.Reflect));var a=new f,s={registerProvider:o,getProvider:u,setProvider:m};return s;function o(t){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case $(n):n=t;break;case n===t:break;case $(r):r=t;break;case r===t:break;default:void 0===i&&(i=new d),i.add(t)}}function c(t,a){if(!$(n)){if(n.isProviderFor(t,a))return n;if(!$(r)){if(r.isProviderFor(t,a))return n;if(!$(i))for(var s=X(i);;){var o=ee(s);if(!o)return;var c=Q(o);if(c.isProviderFor(t,a))return te(s),c}}}if(!$(e)&&e.isProviderFor(t,a))return e}function u(e,t){var n,r=a.get(e);return $(r)||(n=r.get(t)),$(n)?($(n=c(e,t))||($(r)&&(r=new p,a.set(e,r)),r.set(t,n)),n):n}function l(e){if($(e))throw new TypeError;return n===e||r===e||!$(i)&&i.has(e)}function m(e,t,n){if(!l(n))throw new Error("Metadata provider not registered.");var r=u(e,t);if(r!==n){if(!$(r))return!1;var i=a.get(e);$(i)&&(i=new p,a.set(e,i)),i.set(t,n)}return!0}}function ie(){var e;return!$(h)&&z(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[h]),$(e)&&(e=re()),!$(h)&&z(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,h,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function ae(e){var t=new f,n={isProviderFor:function(e,n){var r=t.get(e);return!$(r)&&r.has(n)},OrdinaryDefineOwnMetadata:s,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:a,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:c};return m.registerProvider(n),n;function r(r,i,a){var s=t.get(r),o=!1;if($(s)){if(!a)return;s=new p,t.set(r,s),o=!0}var c=s.get(i);if($(c)){if(!a)return;if(c=new p,s.set(i,c),!e.setProvider(r,i,n))throw s.delete(i),o&&t.delete(r),new Error("Wrong provider for target.")}return c}function i(e,t,n){var i=r(t,n,!1);return!$(i)&&q(i.has(e))}function a(e,t,n){var i=r(t,n,!1);if(!$(i))return i.get(e)}function s(e,t,n,i){r(n,i,!0).set(e,t)}function o(e,t){var n=[],i=r(e,t,!1);if($(i))return n;for(var a=X(i.keys()),s=0;;){var o=ee(a);if(!o)return n.length=s,n;var c=Q(o);try{n[s]=c}catch(e){try{te(a)}finally{throw e}}s++}}function c(e,n,i){var a=r(n,i,!1);if($(a))return!1;if(!a.delete(e))return!1;if(0===a.size){var s=t.get(n);$(s)||(s.delete(i),0===s.size&&t.delete(s))}return!0}}function se(e){var t=e.defineMetadata,n=e.hasOwnMetadata,r=e.getOwnMetadata,i=e.getOwnMetadataKeys,a=e.deleteMetadata,s=new f;return{isProviderFor:function(e,t){var n=s.get(e);return!($(n)||!n.has(t))||!!i(e,t).length&&($(n)&&(n=new d,s.set(e,n)),n.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:n,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:a}}function oe(e,t,n){var r=m.getProvider(e,t);if(!$(r))return r;if(n){if(m.setProvider(e,t,y))return y;throw new Error("Illegal state.")}}function ce(){var e={},t=[],n=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var n=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}(),r=function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i<r;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,J(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new n(this._keys,this._values,i)},t.prototype.values=function(){return new n(this._keys,this._values,s)},t.prototype.entries=function(){return new n(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[a]=function(){return this.entries()},t.prototype._find=function(e,t){if(!J(this._cacheKey,e)){this._cacheIndex=-1;for(var n=0;n<this._keys.length;n++)if(J(this._keys[n],e)){this._cacheIndex=n;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();return r;function i(e,t){return e}function s(e,t){return t}function o(e,t){return[e,t]}}function ue(){return function(){function e(){this._map=new p}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}()}function le(){var e=16,t=u.create(),r=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=a(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=a(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return a(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=a(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do{e="@@WeakMap@@"+c()}while(u.has(t,e));return t[e]=!0,e}function a(e,t){if(!n.call(e,r)){if(!t)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function s(e,t){for(var n=0;n<t;++n)e[n]=255*Math.random()|0;return e}function o(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(t):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(t):s(t,e),t}return s(new Array(e),e)}function c(){var t=o(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var n="",r=0;r<e;++r){var i=t[r];4!==r&&6!==r&&8!==r||(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}}function pe(e){return e.__=void 0,delete e.__,e}e("decorate",g),e("metadata",b),e("defineMetadata",v),e("hasMetadata",w),e("hasOwnMetadata",x),e("getMetadata",_),e("getOwnMetadata",T),e("getMetadataKeys",E),e("getOwnMetadataKeys",S),e("deleteMetadata",k)}(n,t),void 0===t.Reflect&&(t.Reflect=e)}()}(e||(e={}))),Tl;var e}(),function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(_l||(_l={}));var El=function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,n){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?n===_l.CLASS_TO_CLASS||n===_l.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||n===_l.CLASS_TO_PLAIN))})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),n=t&&t.get(void 0),r=this._exposeMetadatas.get(e),i=r&&r.get(void 0);return n&&i||!n&&!i?"none":n?"excludeAll":"exposeAll"},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===_l.CLASS_TO_CLASS||t===_l.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===_l.CLASS_TO_PLAIN))}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||(!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===_l.CLASS_TO_CLASS||t===_l.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===_l.CLASS_TO_PLAIN))}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var n,r=e.get(t);r&&(n=Array.from(r.values()).filter(function(e){return void 0!==e.propertyName}));for(var i=[],a=0,s=this.getAncestors(t);a<s.length;a++){var o=s[a],c=e.get(o);if(c){var u=Array.from(c.values()).filter(function(e){return void 0!==e.propertyName});i.push.apply(i,u)}}return i.concat(n||[])},e.prototype.findMetadata=function(e,t,n){var r=e.get(t);if(r){var i=r.get(n);if(i)return i}for(var a=0,s=this.getAncestors(t);a<s.length;a++){var o=s[a],c=e.get(o);if(c){var u=c.get(n);if(u)return u}}},e.prototype.findMetadatas=function(e,t,n){var r,i=e.get(t);i&&(r=i.get(n));for(var a=[],s=0,o=this.getAncestors(t);s<o.length;s++){var c=o[s],u=e.get(c);u&&u.has(n)&&a.push.apply(a,u.get(n))}return a.slice().reverse().concat((r||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],n=Object.getPrototypeOf(e.prototype.constructor);void 0!==n.prototype;n=Object.getPrototypeOf(n.prototype.constructor))t.push(n);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}(),Sl=new El;function kl(e,t){return void 0===t&&(t={}),function(n,r){var i=Reflect.getMetadata("design:type",n,r);Sl.addTypeMetadata({target:n.constructor,propertyName:r,reflectedType:i,typeFunction:e,options:t})}}var Ml,Al,Ol,Rl=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Il=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.FAILED="failed",e.SUCCEED="succeed",e.RUNNING="running"}(Ml||(Ml={}));class Nl{iv;ephemPublicKey;ciphertext;mac;constructor(e,t,n,r){this.iv=e,this.ephemPublicKey=t,this.ciphertext=n,this.mac=r}}Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"iv",void 0),Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"ephemPublicKey",void 0),Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"ciphertext",void 0),Rl([Zu(),bl(),Il("design:type",String)],Nl.prototype,"mac",void 0);class Cl{v;r;s;constructor(e,t,n){this.v=e,this.r=t,this.s=n}}Rl([Zu(),hl(),Il("design:type",Number)],Cl.prototype,"v",void 0),Rl([Zu(),bl(),Il("design:type",String)],Cl.prototype,"r",void 0),Rl([Zu(),bl(),Il("design:type",String)],Cl.prototype,"s",void 0);class Pl{memoryGrowDelta;call;frame;steps;constructor(e,t,n,r){this.call=e,this.frame=t,this.steps=n,this.memoryGrowDelta=r}}Rl([hl(),Yu(),Il("design:type",Number)],Pl.prototype,"memoryGrowDelta",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Pl.prototype,"call",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Pl.prototype,"frame",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Pl.prototype,"steps",void 0);class jl{call;frame;gas;memory;constructor(e,t,n,r){this.call=e,this.frame=t,this.gas=n,this.memory=r}}Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"call",void 0),Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"frame",void 0),Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"gas",void 0),Rl([hl(),Zu(),Il("design:type",Number)],jl.prototype,"memory",void 0);class Ll{call;frame;memory;constructor(e,t,n){this.call=e,this.frame=t,this.memory=n}}Rl([hl(),Zu(),Il("design:type",Number)],Ll.prototype,"call",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Ll.prototype,"frame",void 0),Rl([hl(),Zu(),Il("design:type",Number)],Ll.prototype,"memory",void 0);class $l{protocol;constructor(e){this.protocol=e}}Rl([bl(),Zu(),Il("design:type",String)],$l.prototype,"protocol",void 0);class Dl{last;limits;peak;versions;constructor(e,t,n,r){this.last=e,this.limits=t,this.peak=n,this.versions=r}}Rl([Ku(),kl(()=>Pl),Il("design:type",Pl)],Dl.prototype,"last",void 0),Rl([Ku(),kl(()=>jl),Il("design:type",jl)],Dl.prototype,"limits",void 0),Rl([Ku(),kl(()=>Ll),Il("design:type",Ll)],Dl.prototype,"peak",void 0),Rl([Yu(),Ku(),kl(()=>$l),Il("design:type",$l)],Dl.prototype,"versions",void 0);class Ul{senderAddress;status;output;metering;constructor(e,t,n,r){this.senderAddress=e,this.status=t,this.output=n,this.metering=r}}Rl([Zu(),fl(),Il("design:type",String)],Ul.prototype,"senderAddress",void 0),Rl([Zu(),gl(Ml),Il("design:type",String)],Ul.prototype,"status",void 0),Rl([Yu(),bl(),Il("design:type",String)],Ul.prototype,"output",void 0),Rl([Yu(),Ku(),kl(()=>Dl),Il("design:type",Dl)],Ul.prototype,"metering",void 0);class zl{signature;clearTextSolution;constructor(e,t){this.signature=e,this.clearTextSolution=t}}Rl([Ku(),kl(()=>Cl),Il("design:type",Cl)],zl.prototype,"signature",void 0),Rl([Ku(),kl(()=>Ul),Il("design:type",Ul)],zl.prototype,"clearTextSolution",void 0);class Bl{blockNumber;selectionStrategy;setNodes;constructor(e,t,n){this.blockNumber=e,this.selectionStrategy=t,this.setNodes=n}}Rl([Zu(),Xu(0),Il("design:type",Number)],Bl.prototype,"blockNumber",void 0),Rl([Zu(),bl(),Il("design:type",String)],Bl.prototype,"selectionStrategy",void 0),Rl([Hu({name:"arrayNotEmpty",validator:{validate:function(e,t){return n=e,Array.isArray(n)&&n.length>0;var n},defaultMessage:qu(function(e){return e+"$property should not be empty"},Al)}},Al),Zu({each:!0}),fl({each:!0}),Il("design:type",Array)],Bl.prototype,"setNodes",void 0);class Fl{gas;call;frame;memory;constructor(e,t,n,r){this.gas=e,this.call=t,this.frame=n,this.memory=r}}Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"gas",void 0),Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"call",void 0),Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"frame",void 0),Rl([Zu(),bl(),Il("design:type",String)],Fl.prototype,"memory",void 0);class ql{reward;requiredSolutions;totalSolutions;executionTimeout;constructor(e,t,n,r){this.reward=e,this.requiredSolutions=t,this.totalSolutions=n,this.executionTimeout=r}}Rl([Zu(),bl(),Il("design:type",String)],ql.prototype,"reward",void 0),Rl([Xu(1),Zu(),hl(),Il("design:type",Number)],ql.prototype,"requiredSolutions",void 0),Rl([Xu(1),Zu(),hl(),Il("design:type",Number)],ql.prototype,"totalSolutions",void 0),Rl([Xu(1),Zu(),hl(),Il("design:type",Number)],ql.prototype,"executionTimeout",void 0);class Hl{request;response;constructor(e,t){this.request=e,this.response=t}}Rl([Zu(),hl(),Il("design:type",Number)],Hl.prototype,"request",void 0),Rl([Zu(),hl(),Il("design:type",Number)],Hl.prototype,"response",void 0),function(e){e.MINIO="minio",e.S3="s3"}(Ol||(Ol={}));var Yl,Vl=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Kl=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class Gl{msgType;messageId;payload;msgTimestamp=Date.now();constructor(e,t){this.msgType=this.constructor.name,this.messageId=t||S(),this.payload=e}}Vl([Zu(),bl(),Kl("design:type",String)],Gl.prototype,"msgType",void 0),Vl([Yu(),rl(),Kl("design:type",String)],Gl.prototype,"messageId",void 0),Vl([Ku(),Kl("design:type",Object)],Gl.prototype,"payload",void 0),Vl([vl(),Kl("design:type",Number)],Gl.prototype,"msgTimestamp",void 0);Vl([Zu(),bl(),Kl("design:type",String)],class extends Gl{error;constructor(e,t,n){super(t,n),this.error=e}}.prototype,"error",void 0);Vl([Zu(),bl(),Kl("design:type",String)],class extends Gl{error;constructor(e,t,n){super(t,n),this.error=e}}.prototype,"error",void 0),function(e){e.EVM="evm",e.AVALANCHE="avalanche"}(Yl||(Yl={}));var Wl,Jl=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},Zl=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};!function(e){e.TASK_CREATED="task_created",e.API_TASK_CREATED="api_task_created",e.NODE_OUTCOME="node_outcome",e.TASK_SOLVED="task_solved",e.API_OUTCOME="api_outcome",e.SOLUTIONS_REVEALED="solutions_revealed",e.EXECUTION_COMPLETED="execution_completed"}(Wl||(Wl={}));class Xl{type;executionId;message;msgHash;signature;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){this.type=e,this.executionId=t,this.message=r,this.msgHash=n,this.signature=i,this.timestamp=s,this.sequencerAddress=a}}Jl([Zu(),gl(Wl),Zl("design:type",String)],Xl.prototype,"type",void 0),Jl([rl(),Zu(),Zl("design:type",String)],Xl.prototype,"executionId",void 0),Jl([Ku(),Zl("design:type",Object)],Xl.prototype,"message",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],Xl.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],Xl.prototype,"signature",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Xl.prototype,"sequencerAddress",void 0),Jl([vl(),Zu(),Zl("design:type",Number)],Xl.prototype,"timestamp",void 0);class Ql{type="dispatch_task";taskId;executionId;msgHash;signature;limits;econParams;workers;dispatcherTimestamp;taskRequesterTimestamp;ledgerName;blockHash;blockNumber;chainId;nodeRegistryContractAddress;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;signedRequestBody;senderAddress;input;constructor(e,t,n,r,i,a,s,o,c,u,l,p,d,f,h,m,y,g,b,v,w,x){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=r,this.limits=i,this.econParams=a,this.workers=s,this.dispatcherTimestamp=o,this.taskRequesterTimestamp=c,this.ledgerName=u,this.blockHash=l,this.blockNumber=p,this.chainId=d,this.nodeRegistryContractAddress=f,this.taskRegistryContractAddress=h,this.taskAuthorizationContractAddress=m,this.taskRequesterAddress=y,this.taskPath=g,this.taskVersion=b,this.signedRequestBody=x,this.senderAddress=v,this.input=w}}Jl([Zu(),bl(),Zl("design:type",String)],Ql.prototype,"taskId",void 0),Jl([Zu(),rl(),Zl("design:type",String)],Ql.prototype,"executionId",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],Ql.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],Ql.prototype,"signature",void 0),Jl([Ku(),kl(()=>Fl),Zl("design:type",Fl)],Ql.prototype,"limits",void 0),Jl([Ku(),kl(()=>ql),Zl("design:type",ql)],Ql.prototype,"econParams",void 0),Jl([Ku(),kl(()=>Bl),Zl("design:type",Bl)],Ql.prototype,"workers",void 0),Jl([Zu(),wl(),Zl("design:type",Number)],Ql.prototype,"dispatcherTimestamp",void 0),Jl([Zu(),wl(),Zl("design:type",Number)],Ql.prototype,"taskRequesterTimestamp",void 0),Jl([Zu(),gl(Yl),Zl("design:type",String)],Ql.prototype,"ledgerName",void 0),Jl([Zu(),Zl("design:type",String)],Ql.prototype,"blockHash",void 0),Jl([Zu(),Xu(0),Zl("design:type",Number)],Ql.prototype,"blockNumber",void 0),Jl([Zu(),bl(),Zl("design:type",String)],Ql.prototype,"chainId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"nodeRegistryContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"taskRegistryContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"taskAuthorizationContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"taskRequesterAddress",void 0),Jl([Yu(),Zl("design:type",String)],Ql.prototype,"taskPath",void 0),Jl([Yu(),Xu(0),Zl("design:type",Number)],Ql.prototype,"taskVersion",void 0),Jl([Yu(),Zl("design:type",Object)],Ql.prototype,"signedRequestBody",void 0),Jl([Zu(),fl(),Zl("design:type",String)],Ql.prototype,"senderAddress",void 0),Jl([Yu(),zu(),Zl("design:type",String)],Ql.prototype,"input",void 0);class ep{type="dispatch_task";taskId;executionId;msgHash;signature;ledgerName;blockHash;blockNumber;chainId;taskRegistryContractAddress;taskAuthorizationContractAddress;taskRequesterAddress;taskPath;taskVersion;senderAddress;executionTimeout;input;constructor(e,t,n,r,i,a,s,o,c,u,l,p,d,f,h,m){this.taskId=e,this.executionId=t,this.msgHash=n,this.signature=r,this.executionTimeout=h,this.ledgerName=a,this.blockHash=s,this.blockNumber=o,this.chainId=c,this.taskRegistryContractAddress=u,this.taskAuthorizationContractAddress=l,this.taskRequesterAddress=p,this.taskPath=d,this.taskVersion=f,this.senderAddress=i,this.input=m}}Jl([Zu(),bl(),Zl("design:type",String)],ep.prototype,"taskId",void 0),Jl([Zu(),rl(),Zl("design:type",String)],ep.prototype,"executionId",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],ep.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],ep.prototype,"signature",void 0),Jl([Zu(),gl(Yl),Zl("design:type",String)],ep.prototype,"ledgerName",void 0),Jl([Zu(),Zl("design:type",String)],ep.prototype,"blockHash",void 0),Jl([Zu(),Xu(0),Zl("design:type",Number)],ep.prototype,"blockNumber",void 0),Jl([Zu(),bl(),Zl("design:type",String)],ep.prototype,"chainId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"taskRegistryContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"taskAuthorizationContractAddress",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"taskRequesterAddress",void 0),Jl([Yu(),Zl("design:type",String)],ep.prototype,"taskPath",void 0),Jl([Yu(),Xu(0),Zl("design:type",Number)],ep.prototype,"taskVersion",void 0),Jl([Zu(),fl(),Zl("design:type",String)],ep.prototype,"senderAddress",void 0),Jl([hl(),Zl("design:type",Number)],ep.prototype,"executionTimeout",void 0),Jl([Yu(),zu(),Zl("design:type",String)],ep.prototype,"input",void 0);class tp{executionId;senderAddress;encryptedSolution;msgHash;signature;constructor(e,t,n,r,i){this.executionId=e,this.signature=i,this.encryptedSolution=n,this.senderAddress=t,this.msgHash=r}}Jl([rl(),Zu(),Zl("design:type",String)],tp.prototype,"executionId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],tp.prototype,"senderAddress",void 0),Jl([Ku(),kl(()=>Nl),Zl("design:type",Nl)],tp.prototype,"encryptedSolution",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],tp.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],tp.prototype,"signature",void 0);class np{executionId;senderAddress;bodyResponse;msgHash;signature;tlsHandshakeHash;status;totalTransferredBytes;constructor(e,t,n,r,i,a,s,o){this.executionId=e,this.signature=i,this.bodyResponse=n,this.tlsHandshakeHash=a,this.senderAddress=t,this.msgHash=r,this.status=s,this.totalTransferredBytes=o}}Jl([rl(),Zu(),Zl("design:type",String)],np.prototype,"executionId",void 0),Jl([Zu(),fl(),Zl("design:type",String)],np.prototype,"senderAddress",void 0),Jl([Zu(),cl("sha256"),Zl("design:type",String)],np.prototype,"msgHash",void 0),Jl([Ku(),kl(()=>Cl),Zl("design:type",Cl)],np.prototype,"signature",void 0),Jl([Zu(),bl(),Zl("design:type",String)],np.prototype,"tlsHandshakeHash",void 0),Jl([Zu(),bl(),Zl("design:type",String)],np.prototype,"status",void 0),Jl([Ku(),kl(()=>Hl),Zl("design:type",Hl)],np.prototype,"totalTransferredBytes",void 0);var rp=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},ip=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class ap{executionId;msgHash;signature;limits;econParams;workers;senderAddress;input;constructor(e,t,n,r,i,a,s,o){this.executionId=e,this.msgHash=t,this.signature=n,this.limits=r,this.econParams=i,this.workers=a,this.senderAddress=s,this.input=o}}rp([rl(),Zu(),ip("design:type",String)],ap.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],ap.prototype,"msgHash",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],ap.prototype,"signature",void 0),rp([Ku(),kl(()=>Fl),ip("design:type",Fl)],ap.prototype,"limits",void 0),rp([Ku(),kl(()=>ql),ip("design:type",ql)],ap.prototype,"econParams",void 0),rp([Ku(),kl(()=>Bl),ip("design:type",Bl)],ap.prototype,"workers",void 0),rp([Zu(),bl(),ip("design:type",String)],ap.prototype,"senderAddress",void 0),rp([Zu(),bl(),ip("design:type",String)],ap.prototype,"input",void 0);class sp{executionId;limits;econParams;workers;input;constructor(e,t,n,r,i){this.executionId=e,this.limits=t,this.econParams=n,this.workers=r,this.input=i}}rp([rl(),Zu(),ip("design:type",String)],sp.prototype,"executionId",void 0),rp([Ku(),kl(()=>Fl),ip("design:type",Fl)],sp.prototype,"limits",void 0),rp([Ku(),kl(()=>ql),ip("design:type",ql)],sp.prototype,"econParams",void 0),rp([Ku(),kl(()=>Bl),ip("design:type",Bl)],sp.prototype,"workers",void 0);rp([Ku(),kl(()=>tp),ip("design:type",tp)],class extends Xl{message;constructor(e,t,n,r,i,a){super(Wl.NODE_OUTCOME,e,t,n,r,i,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=a,this.sequencerAddress=i,this.message=n}}.prototype,"message",void 0);rp([Ku(),kl(()=>np),ip("design:type",np)],class extends Xl{message;constructor(e,t,n,r,i,a){super(Wl.API_OUTCOME,e,t,n,r,i,a),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=a,this.sequencerAddress=i}}.prototype,"message",void 0);class op{type;executionId;transcriptHash;status;signature;signerAddress;timestamp;constructor(e,t,n,r,i,a){this.type=Wl.EXECUTION_COMPLETED,this.executionId=e,this.transcriptHash=t,this.status=n,this.signature=r,this.signerAddress=i,this.timestamp=a}}rp([Zu(),bl(),ip("design:type",String)],op.prototype,"type",void 0),rp([rl(),Zu(),ip("design:type",String)],op.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],op.prototype,"transcriptHash",void 0),rp([Zu(),gl(ku),ip("design:type",String)],op.prototype,"status",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],op.prototype,"signature",void 0),rp([Zu(),bl(),ip("design:type",String)],op.prototype,"signerAddress",void 0),rp([vl(),Zu(),ip("design:type",Number)],op.prototype,"timestamp",void 0);class cp{type;executionId;signature;clearTextSolutions;sequencerAddress;msgHash;timestamp;constructor(e,t,n,r,i,a){this.type=Wl.SOLUTIONS_REVEALED,this.executionId=e,this.signature=t,this.clearTextSolutions=n,this.sequencerAddress=r,this.msgHash=i,this.timestamp=a}}rp([rl(),Zu(),ip("design:type",String)],cp.prototype,"executionId",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],cp.prototype,"signature",void 0),rp([Ku({each:!0}),kl(()=>zl),ip("design:type",Array)],cp.prototype,"clearTextSolutions",void 0),rp([Zu(),fl(),ip("design:type",String)],cp.prototype,"sequencerAddress",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],cp.prototype,"msgHash",void 0),rp([vl(),Zu(),ip("design:type",Number)],cp.prototype,"timestamp",void 0);class up extends Xl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){super(Wl.TASK_CREATED,e,t,n,r,a,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=s,this.sequencerAddress=a,this.publicKey=i,this.message=n}}rp([Zu(),rl(),ip("design:type",String)],up.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],up.prototype,"msgHash",void 0),rp([Ku(),kl(()=>Ql),ip("design:type",Ql)],up.prototype,"message",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],up.prototype,"signature",void 0),rp([Zu(),bl(),ip("design:type",String)],up.prototype,"publicKey",void 0),rp([Zu(),fl(),ip("design:type",String)],up.prototype,"sequencerAddress",void 0),rp([vl(),Zu(),ip("design:type",Number)],up.prototype,"timestamp",void 0);class lp extends Xl{executionId;msgHash;message;signature;publicKey;sequencerAddress;timestamp;constructor(e,t,n,r,i,a,s){super(Wl.API_TASK_CREATED,e,t,n,r,a,s),this.message=n,this.executionId=e,this.msgHash=t,this.signature=r,this.timestamp=s,this.sequencerAddress=a,this.publicKey=i,this.message=n}}rp([Zu(),rl(),ip("design:type",String)],lp.prototype,"executionId",void 0),rp([Zu(),cl("sha256"),ip("design:type",String)],lp.prototype,"msgHash",void 0),rp([Ku(),kl(()=>ep),ip("design:type",ep)],lp.prototype,"message",void 0),rp([Ku(),kl(()=>Cl),ip("design:type",Cl)],lp.prototype,"signature",void 0),rp([Zu(),bl(),ip("design:type",String)],lp.prototype,"publicKey",void 0),rp([Zu(),fl(),ip("design:type",String)],lp.prototype,"sequencerAddress",void 0),rp([vl(),Zu(),ip("design:type",Number)],lp.prototype,"timestamp",void 0);var pp=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},dp=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class fp{executionId;msgHash;signature;senderAddress;encryptedSolution;constructor(e,t,n,r,i){this.executionId=e,this.msgHash=t,this.signature=n,this.senderAddress=r,this.encryptedSolution=i}}pp([rl(),Zu(),dp("design:type",String)],fp.prototype,"executionId",void 0),pp([Zu(),cl("sha256"),dp("design:type",String)],fp.prototype,"msgHash",void 0),pp([Ku(),kl(()=>Cl),dp("design:type",Cl)],fp.prototype,"signature",void 0),pp([Zu(),fl(),dp("design:type",String)],fp.prototype,"senderAddress",void 0),pp([Ku(),kl(()=>Nl),dp("design:type",Nl)],fp.prototype,"encryptedSolution",void 0);var hp=globalThis&&globalThis.__decorate||function(e,t,n,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},mp=globalThis&&globalThis.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class yp{input;checkpoint;taskId;constructor(e,t,n){this.taskId=e,this.checkpoint=t,this.input=n}}hp([Zu(),bl(),mp("design:type",String)],yp.prototype,"input",void 0),hp([Zu(),mp("design:type",Object)],yp.prototype,"checkpoint",void 0),hp([Zu(),bl(),mp("design:type",String)],yp.prototype,"taskId",void 0);class gp{input;taskId;constructor(e,t){this.taskId=e,this.input=t}}hp([Zu(),bl(),mp("design:type",String)],gp.prototype,"input",void 0),hp([Zu(),bl(),mp("design:type",String)],gp.prototype,"taskId",void 0);class bp{executionId;input;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.input=n}}hp([Zu(),rl(),mp("design:type",String)],bp.prototype,"executionId",void 0),hp([Zu(),bl(),mp("design:type",String)],bp.prototype,"input",void 0),hp([Zu(),bl(),mp("design:type",String)],bp.prototype,"taskId",void 0);class vp{instrumentationId;taskId;constructor(e,t){this.taskId=e,this.instrumentationId=t}}hp([Zu(),rl(),mp("design:type",String)],vp.prototype,"instrumentationId",void 0),hp([Zu(),bl(),mp("design:type",String)],vp.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class wp{checkpointHash;taskId;constructor(e,t){this.taskId=e,this.checkpointHash=t}}hp([Zu(),bl(),mp("design:type",String)],wp.prototype,"checkpointHash",void 0),hp([Zu(),bl(),mp("design:type",String)],wp.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e){this.taskId=e}}.prototype,"taskId",void 0);class xp{checkpointCount;taskId;constructor(e,t){this.taskId=e,this.checkpointCount=t}}hp([Zu(),hl(),mp("design:type",Number)],xp.prototype,"checkpointCount",void 0),hp([Zu(),bl(),mp("design:type",String)],xp.prototype,"taskId",void 0);hp([Zu(),bl(),mp("design:type",String)],class{taskId;constructor(e,t){this.taskId=t}}.prototype,"taskId",void 0);class _p{executionId;output;taskId;constructor(e,t,n){this.taskId=e,this.executionId=t,this.output=n}}hp([Zu(),rl(),mp("design:type",String)],_p.prototype,"executionId",void 0),hp([Yu(),bl(),mp("design:type",String)],_p.prototype,"output",void 0),hp([Zu(),bl(),mp("design:type",String)],_p.prototype,"taskId",void 0);class Tp{executionId;taskId;constructor(e,t,n){this.taskId=t,this.executionId=n}}hp([Zu(),rl(),mp("design:type",String)],Tp.prototype,"executionId",void 0),hp([Zu(),bl(),mp("design:type",String)],Tp.prototype,"taskId",void 0);class Ep{instrumentationId;output;taskId;instrumentedTaskId;constructor(e,t,n,r){this.taskId=e,this.instrumentationId=t,this.output=r,this.instrumentedTaskId=n}}hp([Zu(),rl(),mp("design:type",String)],Ep.prototype,"instrumentationId",void 0),hp([Zu(),bl(),mp("design:type",String)],Ep.prototype,"output",void 0),hp([Zu(),bl(),mp("design:type",String)],Ep.prototype,"taskId",void 0),hp([Zu(),bl(),mp("design:type",String)],Ep.prototype,"instrumentedTaskId",void 0);class Sp{instrumentationId;taskId;constructor(e,t,n){this.taskId=t,this.instrumentationId=n}}hp([Zu(),rl(),mp("design:type",String)],Sp.prototype,"instrumentationId",void 0),hp([Zu(),bl(),mp("design:type",String)],Sp.prototype,"taskId",void 0);var kp,Mp,Ap,Op={},Rp="6.6.1",Ip={},Np={exports:{}},Cp=Np.exports;function Pp(){return kp||(kp=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function o(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,a=Math.min(e.length,n),s=t;s<a;s++){var o=e.charCodeAt(s)-48;i*=r,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.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<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var p=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)p*=t;this.imuln(p),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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],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];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,p=67108863&c,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var h=u-f|0;l+=(s=(i=0|e.words[h])*(a=0|t.words[f])+p)/67108864|0,p=67108863&s}n.words[u]=0|p,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],c=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?u[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:u[d-m.length]+m+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")},i.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},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,c="le"===t,u=new e(a),l=this.clone();if(c){for(o=0;!l.isZero();o++)s=l.andln(255),l.iushrn(8),u[o]=s;for(;o<a;o++)u[o]=0}else{for(o=0;o<a-i;o++)u[o]=0;for(o=0;!l.isZero();o++)s=l.andln(255),l.iushrn(8),u[a-o-1]=s}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.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 n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var f=function(e,t,n){var r,i,a,s=e.words,o=t.words,c=n.words,u=0,l=0|s[0],p=8191&l,d=l>>>13,f=0|s[1],h=8191&f,m=f>>>13,y=0|s[2],g=8191&y,b=y>>>13,v=0|s[3],w=8191&v,x=v>>>13,_=0|s[4],T=8191&_,E=_>>>13,S=0|s[5],k=8191&S,M=S>>>13,A=0|s[6],O=8191&A,R=A>>>13,I=0|s[7],N=8191&I,C=I>>>13,P=0|s[8],j=8191&P,L=P>>>13,$=0|s[9],D=8191&$,U=$>>>13,z=0|o[0],B=8191&z,F=z>>>13,q=0|o[1],H=8191&q,Y=q>>>13,V=0|o[2],K=8191&V,G=V>>>13,W=0|o[3],J=8191&W,Z=W>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],pe=8191&le,de=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ye=(u+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;u=((a=Math.imul(d,F))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(h,B),i=(i=Math.imul(h,F))+Math.imul(m,B)|0,a=Math.imul(m,F);var ge=(u+(r=r+Math.imul(p,H)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,B),i=(i=Math.imul(g,F))+Math.imul(b,B)|0,a=Math.imul(b,F),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(p,K)|0)|0)+((8191&(i=(i=i+Math.imul(p,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,B),i=(i=Math.imul(w,F))+Math.imul(x,B)|0,a=Math.imul(x,F),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,H)|0,a=a+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,G)|0;var ve=(u+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,Z)|0)+Math.imul(d,J)|0))<<13)|0;u=((a=a+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(E,B)|0,a=Math.imul(E,F),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,H)|0,a=a+Math.imul(x,Y)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,G)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(M,B)|0,a=Math.imul(M,F),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(O,B),i=(i=Math.imul(O,F))+Math.imul(R,B)|0,a=Math.imul(R,F),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(p,ae)|0)|0)+((8191&(i=(i=i+Math.imul(p,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,F))+Math.imul(C,B)|0,a=Math.imul(C,F),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,Y)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(b,ne)|0,a=a+Math.imul(b,re)|0,r=r+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,se)|0;var Te=(u+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,B),i=(i=Math.imul(j,F))+Math.imul(L,B)|0,a=Math.imul(L,F),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,Y)|0,r=r+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,Z)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,a=a+Math.imul(x,re)|0,r=r+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,B),i=(i=Math.imul(D,F))+Math.imul(U,B)|0,a=Math.imul(U,F),r=r+Math.imul(j,H)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,G)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,r=r+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,r=r+Math.imul(h,pe)|0,i=(i=i+Math.imul(h,de)|0)+Math.imul(m,pe)|0,a=a+Math.imul(m,de)|0;var Se=(u+(r=r+Math.imul(p,he)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,he)|0))<<13)|0;u=((a=a+Math.imul(d,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,Y))+Math.imul(U,H)|0,a=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(L,K)|0,a=a+Math.imul(L,G)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,Z)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,r=r+Math.imul(g,pe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,pe)|0,a=a+Math.imul(b,de)|0;var ke=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(D,K),i=(i=Math.imul(D,G))+Math.imul(U,K)|0,a=Math.imul(U,G),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(R,ne)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,ue)|0,r=r+Math.imul(w,pe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(x,pe)|0,a=a+Math.imul(x,de)|0;var Me=(u+(r=r+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(D,J),i=(i=Math.imul(D,Z))+Math.imul(U,J)|0,a=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(C,ne)|0,a=a+Math.imul(C,re)|0,r=r+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,ue)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(E,pe)|0,a=a+Math.imul(E,de)|0;var Ae=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((a=a+Math.imul(x,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(U,Q)|0,a=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,a=a+Math.imul(L,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,se)|0,r=r+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(M,pe)|0,a=a+Math.imul(M,de)|0;var Oe=(u+(r=r+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(E,he)|0))<<13)|0;u=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(D,ne),i=(i=Math.imul(D,re))+Math.imul(U,ne)|0,a=Math.imul(U,re),r=r+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,se)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,r=r+Math.imul(O,pe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(R,pe)|0,a=a+Math.imul(R,de)|0;var Re=(u+(r=r+Math.imul(k,he)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(M,he)|0))<<13)|0;u=((a=a+Math.imul(M,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(D,ae),i=(i=Math.imul(D,se))+Math.imul(U,ae)|0,a=Math.imul(U,se),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,ue)|0,r=r+Math.imul(N,pe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,pe)|0,a=a+Math.imul(C,de)|0;var Ie=(u+(r=r+Math.imul(O,he)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,he)|0))<<13)|0;u=((a=a+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(D,ce),i=(i=Math.imul(D,ue))+Math.imul(U,ce)|0,a=Math.imul(U,ue),r=r+Math.imul(j,pe)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(L,pe)|0,a=a+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,he)|0))<<13)|0;u=((a=a+Math.imul(C,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(D,pe),i=(i=Math.imul(D,de))+Math.imul(U,pe)|0,a=Math.imul(U,de);var Ce=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((a=a+Math.imul(L,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Pe=(u+(r=Math.imul(D,he))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(U,he)|0))<<13)|0;return u=((a=Math.imul(U,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,c[0]=ye,c[1]=ge,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Te,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ae,c[13]=Oe,c[14]=Re,c[15]=Ie,c[16]=Ne,c[17]=Ce,c[18]=Pe,0!==u&&(c[19]=u,n.length++),n};function h(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(f=d),i.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?f(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var l=a-u,p=(0|e.words[l])*(0|t.words[u]),d=67108863&p;o=67108863&(d=d+o|0),i+=(s=(s=s+(p/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n.strip()}(this,e,t):h(this,e,t),n},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=i.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},m.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},m.prototype.permute=function(e,t,n,r,i,a){for(var s=0;s<a;s++)r[s]=t[e[s]],i[s]=n[e[s]]},m.prototype.transform=function(e,t,n,r,i,a){this.permute(a,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var o=s<<1,c=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),l=0;l<i;l+=o)for(var p=c,d=u,f=0;f<s;f++){var h=n[l+f],m=r[l+f],y=n[l+f+s],g=r[l+f+s],b=p*y-d*g;g=p*g+d*y,y=b,n[l+f]=h+y,r[l+f]=m+g,n[l+f+s]=h-y,r[l+f+s]=m-g,f!==o&&(b=c*p-u*d,d=c*d+u*p,p=b)}},m.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},m.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var a=0,s=0;s<t;s++)a+=0|e[s],r[2*s]=8191&a,a>>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===a),n(!(-8192&a))},m.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},m.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),c=new Array(r),u=new Array(r),l=new Array(r),p=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,u,r),this.transform(s,a,o,c,r,i),this.transform(u,a,l,p,r,i);for(var f=0;f<r;f++){var h=o[f]*l[f]-c[f]*p[f];c[f]=o[f]*p[f]+c[f]*l[f],o[f]=h}return this.conjugate(o,c,r),this.transform(o,c,d,a,r,i),this.conjugate(d,a,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),h(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<r;this.words[t]=c|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(a,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[a.length+p])+(0|r.words[a.length+p-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(a,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(a,1,p),r.isZero()||(r.negative^=1);o&&(o.words[p]=d)}return o&&o.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.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},i.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()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.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 a=new i(1),s=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(p)),a.iushrn(1),s.iushrn(1);for(var h=0,m=1;0===(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(p)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o),s.isub(c)):(r.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:r.iushln(u)}},i.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 a,s=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var p=0,d=1;0===(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new _(e)},i.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)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=i._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 T(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},r(b,g),b.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|a>>>22,a=s}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(v,g),r(w,g),r(x,g),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return y[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 n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.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 i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,a),d=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),h=s;0!==f.cmp(o);){for(var m=f,y=0;0!==m.cmp(o);y++)m=m.redSqr();n(y<h);var g=this.pow(p,new i(1).iushln(h-y-1));d=d.redMul(g),p=g.redSqr(),f=f.redMul(p),h=y}return d},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var a=n[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var p=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==p||0!==s?(s<<=1,s|=p,(4===++o||0===r&&0===l)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},_.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},i.mont=function(e){return new T(e)},r(T,_),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Np,Cp)),Np.exports}function jp(){if(Ap)return Mp;function e(e,t){if(!e)throw new Error(t||"Assertion failed")}return Ap=1,Mp=e,e.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},Mp}var Lp,$p,Dp={};function Up(){return Lp||(Lp=1,function(){var e=Dp;function t(e){return 1===e.length?"0"+e:e}function n(e){for(var n="",r=0;r<e.length;r++)n+=t(e[r].toString(16));return n}e.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var i=e.charCodeAt(r),a=i>>8,s=255&i;a?n.push(a,s):n.push(s)}return n},e.zero2=t,e.toHex=n,e.encode=function(e,t){return"hex"===t?n(e):e}}()),Dp}function zp(){return $p||($p=1,function(){var e=Ip,t=Pp(),n=jp(),r=Up();e.assert=n,e.toArray=r.toArray,e.zero2=r.zero2,e.toHex=r.toHex,e.encode=r.encode,e.getNAF=function(e,t,n){var r,i=new Array(Math.max(e.bitLength(),n)+1);for(r=0;r<i.length;r+=1)i[r]=0;var a=1<<t+1,s=e.clone();for(r=0;r<i.length;r++){var o,c=s.andln(a-1);s.isOdd()?(o=c>(a>>1)-1?(a>>1)-c:c,s.isubn(o)):o=0,i[r]=o,s.iushrn(1)}return i},e.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,a=0;e.cmpn(-i)>0||t.cmpn(-a)>0;){var s,o,c=e.andln(3)+i&3,u=t.andln(3)+a&3;3===c&&(c=-1),3===u&&(u=-1),s=1&c?3!==(r=e.andln(7)+i&7)&&5!==r||2!==u?c:-c:0,n[0].push(s),o=1&u?3!==(r=t.andln(7)+a&7)&&5!==r||2!==c?u:-u:0,n[1].push(o),2*i===s+1&&(i=1-i),2*a===o+1&&(a=1-a),e.iushrn(1),t.iushrn(1)}return n},e.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(e){return new t(e,"hex","le")}}()),Ip}var Bp,Fp={exports:{}};function qp(){if(Bp)return Fp.exports;var e;function t(e){this.rand=e}if(Bp=1,Fp.exports=function(n){return e||(e=new t(null)),e.generate(n)},Fp.exports.Rand=t,t.prototype.generate=function(e){return this._rand(e)},t.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?t.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(t.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var n=require("crypto");if("function"!=typeof n.randomBytes)throw new Error("Not supported");t.prototype._rand=function(e){return n.randomBytes(e)}}catch(e){}return Fp.exports}var Hp,Yp,Vp,Kp,Gp,Wp,Jp,Zp,Xp,Qp={};function ed(){if(Yp)return Hp;Yp=1;var e=Pp(),t=zp(),n=t.getNAF,r=t.getJSF,i=t.assert;function a(t,n){this.type=t,this.p=new e(n.p,16),this.red=n.prime?e.red(n.prime):e.mont(this.p),this.zero=new e(0).toRed(this.red),this.one=new e(1).toRed(this.red),this.two=new e(2).toRed(this.red),this.n=n.n&&new e(n.n,16),this.g=n.g&&this.pointFromJSON(n.g,n.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 s(e,t){this.curve=e,this.type=t,this.precomputed=null}return Hp=a,a.prototype.point=function(){throw new Error("Not implemented")},a.prototype.validate=function(){throw new Error("Not implemented")},a.prototype._fixedNafMul=function(e,t){i(e.precomputed);var r=e._getDoubles(),a=n(t,1,this._bitLength),s=(1<<r.step+1)-(r.step%2==0?2:1);s/=3;var o,c,u=[];for(o=0;o<a.length;o+=r.step){c=0;for(var l=o+r.step-1;l>=o;l--)c=(c<<1)+a[l];u.push(c)}for(var p=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=s;f>0;f--){for(o=0;o<u.length;o++)(c=u[o])===f?d=d.mixedAdd(r.points[o]):c===-f&&(d=d.mixedAdd(r.points[o].neg()));p=p.add(d)}return p.toP()},a.prototype._wnafMul=function(e,t){var r=4,a=e._getNAFPoints(r);r=a.wnd;for(var s=a.points,o=n(t,r,this._bitLength),c=this.jpoint(null,null,null),u=o.length-1;u>=0;u--){for(var l=0;u>=0&&0===o[u];u--)l++;if(u>=0&&l++,c=c.dblp(l),u<0)break;var p=o[u];i(0!==p),c="affine"===e.type?p>0?c.mixedAdd(s[p-1>>1]):c.mixedAdd(s[-p-1>>1].neg()):p>0?c.add(s[p-1>>1]):c.add(s[-p-1>>1].neg())}return"affine"===e.type?c.toP():c},a.prototype._wnafMulAdd=function(e,t,i,a,s){var o,c,u,l=this._wnafT1,p=this._wnafT2,d=this._wnafT3,f=0;for(o=0;o<a;o++){var h=(u=t[o])._getNAFPoints(e);l[o]=h.wnd,p[o]=h.points}for(o=a-1;o>=1;o-=2){var m=o-1,y=o;if(1===l[m]&&1===l[y]){var g=[t[m],null,null,t[y]];0===t[m].y.cmp(t[y].y)?(g[1]=t[m].add(t[y]),g[2]=t[m].toJ().mixedAdd(t[y].neg())):0===t[m].y.cmp(t[y].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[y]),g[2]=t[m].add(t[y].neg())):(g[1]=t[m].toJ().mixedAdd(t[y]),g[2]=t[m].toJ().mixedAdd(t[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=r(i[m],i[y]);for(f=Math.max(v[0].length,f),d[m]=new Array(f),d[y]=new Array(f),c=0;c<f;c++){var w=0|v[0][c],x=0|v[1][c];d[m][c]=b[3*(w+1)+(x+1)],d[y][c]=0,p[m]=g}}else d[m]=n(i[m],l[m],this._bitLength),d[y]=n(i[y],l[y],this._bitLength),f=Math.max(d[m].length,f),f=Math.max(d[y].length,f)}var _=this.jpoint(null,null,null),T=this._wnafT4;for(o=f;o>=0;o--){for(var E=0;o>=0;){var S=!0;for(c=0;c<a;c++)T[c]=0|d[c][o],0!==T[c]&&(S=!1);if(!S)break;E++,o--}if(o>=0&&E++,_=_.dblp(E),o<0)break;for(c=0;c<a;c++){var k=T[c];0!==k&&(k>0?u=p[c][k-1>>1]:k<0&&(u=p[c][-k-1>>1].neg()),_="affine"===u.type?_.mixedAdd(u):_.add(u))}}for(o=0;o<a;o++)p[o]=null;return s?_:_.toP()},a.BasePoint=s,s.prototype.eq=function(){throw new Error("Not implemented")},s.prototype.validate=function(){return this.curve.validate(this)},a.prototype.decodePoint=function(e,n){e=t.toArray(e,n);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?i(e[e.length-1]%2==0):7===e[0]&&i(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},s.prototype.encodeCompressed=function(e){return this.encode(e,!0)},s.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},s.prototype.encode=function(e,n){return t.encode(this._encode(n),e)},s.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},s.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},s.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)r=r.dbl();n.push(r)}return{step:e,points:n}},s.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},s.prototype._getBeta=function(){return null},s.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t},Hp}function td(){return Xp||(Xp=1,function(e){var t=e;t.base=ed(),t.short=function(){if(Kp)return Vp;Kp=1;var e=zp(),t=Pp(),n=ur(),r=ed(),i=e.assert;function a(e){r.call(this,"short",e),this.a=new t(e.a,16).toRed(this.red),this.b=new t(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 s(e,n,i,a){r.BasePoint.call(this,e,"affine"),null===n&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new t(n,16),this.y=new t(i,16),a&&(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 o(e,n,i,a){r.BasePoint.call(this,e,"jacobian"),null===n&&null===i&&null===a?(this.x=this.curve.one,this.y=this.curve.one,this.z=new t(0)):(this.x=new t(n,16),this.y=new t(i,16),this.z=new t(a,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}return n(a,r),Vp=a,a.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var n,r;if(e.beta)n=new t(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);n=(n=a[0].cmp(a[1])<0?a[0]:a[1]).toRed(this.red)}if(e.lambda)r=new t(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(n))?r=s[0]:(r=s[1],i(0===this.g.mul(r).x.cmp(this.g.x.redMul(n))))}return{beta:n,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new t(e.a,16),b:new t(e.b,16)}}):this._getEndoBasis(r)}}},a.prototype._getEndoRoots=function(e){var n=e===this.p?this.red:t.mont(e),r=new t(2).toRed(n).redInvm(),i=r.redNeg(),a=new t(3).toRed(n).redNeg().redSqrt().redMul(r);return[i.redAdd(a).fromRed(),i.redSub(a).fromRed()]},a.prototype._getEndoBasis=function(e){for(var n,r,i,a,s,o,c,u,l,p=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,f=this.n.clone(),h=new t(1),m=new t(0),y=new t(0),g=new t(1),b=0;0!==d.cmpn(0);){var v=f.div(d);u=f.sub(v.mul(d)),l=y.sub(v.mul(h));var w=g.sub(v.mul(m));if(!i&&u.cmp(p)<0)n=c.neg(),r=h,i=u.neg(),a=l;else if(i&&2===++b)break;c=u,f=d,d=u,y=h,h=l,g=m,m=w}s=u.neg(),o=l;var x=i.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(x)>=0&&(s=n,o=r),i.negative&&(i=i.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:i,b:a},{a:s,b:o}]},a.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),s=i.mul(n.a),o=a.mul(r.a),c=i.mul(n.b),u=a.mul(r.b);return{k1:e.sub(s).sub(o),k2:c.add(u).neg()}},a.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=i.fromRed().isOdd();return(n&&!a||!n&&a)&&(i=i.redNeg()),this.point(e,i)},a.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},a.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var s=this._endoSplit(t[a]),o=e[a],c=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),c=c.neg(!0)),r[2*a]=o,r[2*a+1]=c,i[2*a]=s.k1,i[2*a+1]=s.k2}for(var u=this._wnafMulAdd(1,r,i,2*a,n),l=0;l<2*a;l++)r[l]=null,i[l]=null;return u},n(s,r.BasePoint),a.prototype.point=function(e,t,n){return new s(this,e,t,n)},a.prototype.pointFromJSON=function(e,t){return s.fromJSON(this,e,t)},s.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},s.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},s.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function i(t){return e.point(t[0],t[1],n)}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(i))}},r},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return this.inf},s.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 n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},s.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,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},s.prototype.getX=function(){return this.x.fromRed()},s.prototype.getY=function(){return this.y.fromRed()},s.prototype.mul=function(e){return e=new t(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)},s.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},s.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},s.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))},s.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},s.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(o,r.BasePoint),a.prototype.jpoint=function(e,t,n){return new o(this,e,t,n)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(n.redMul(this.z)),o=r.redSub(i),c=a.redSub(s);if(0===o.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),l=u.redMul(o),p=r.redMul(u),d=c.redSqr().redIAdd(l).redISub(p).redISub(p),f=c.redMul(p.redISub(d)).redISub(a.redMul(l)),h=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(d,f,h)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),s=n.redSub(r),o=i.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),p=o.redSqr().redIAdd(u).redISub(l).redISub(l),d=o.redMul(l.redISub(p)).redISub(i.redMul(u)),f=this.z.redMul(s);return this.curve.jpoint(p,d,f)},o.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 n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,a=this.x,s=this.y,o=this.z,c=o.redSqr().redSqr(),u=s.redAdd(s);for(t=0;t<e;t++){var l=a.redSqr(),p=u.redSqr(),d=p.redSqr(),f=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(c)),h=a.redMul(p),m=f.redSqr().redISub(h.redAdd(h)),y=h.redISub(m),g=f.redMul(y);g=g.redIAdd(g).redISub(d);var b=u.redMul(o);t+1<e&&(c=c.redMul(d)),a=m,o=b,u=g}return this.curve.jpoint(a,u.redMul(i),o)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r),c=o.redSqr().redISub(s).redISub(s),u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=o.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),f=this.x.redAdd(p).redSqr().redISub(l).redISub(d);f=f.redIAdd(f);var h=l.redAdd(l).redIAdd(l),m=h.redSqr(),y=d.redIAdd(d);y=(y=y.redIAdd(y)).redIAdd(y),e=m.redISub(f).redISub(f),t=h.redMul(f.redISub(e)).redISub(y),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},o.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),c=o.redSqr().redISub(s).redISub(s);e=c;var u=a.redIAdd(a);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(s.redISub(c)).redISub(u),n=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),p=this.y.redSqr(),d=this.x.redMul(p),f=this.x.redSub(l).redMul(this.x.redAdd(l));f=f.redAdd(f).redIAdd(f);var h=d.redIAdd(d),m=(h=h.redIAdd(h)).redAdd(h);e=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(p).redISub(l);var y=p.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),t=f.redMul(h.redISub(e)).redISub(y)}return this.curve.jpoint(e,t,n)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),a=t.redSqr(),s=n.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(s),l=o.redSqr().redISub(u.redAdd(u)),p=u.redISub(l),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=o.redMul(p).redISub(d),h=n.redAdd(n).redMul(r);return this.curve.jpoint(l,f,h)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),c=r.redIAdd(r);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(c),l=t.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var p=this.x.redMul(o).redISub(l);p=(p=p.redIAdd(p)).redIAdd(p);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(o)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(o);return this.curve.jpoint(p,d,f)},o.prototype.mul=function(e,n){return e=new t(e,n),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),i=n.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)},o.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Vp}(),t.mont=function(){if(Wp)return Gp;Wp=1;var e=Pp(),t=ur(),n=ed(),r=zp();function i(t){n.call(this,"mont",t),this.a=new e(t.a,16).toRed(this.red),this.b=new e(t.b,16).toRed(this.red),this.i4=new e(4).toRed(this.red).redInvm(),this.two=new e(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function a(t,r,i){n.BasePoint.call(this,t,"projective"),null===r&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new e(r,16),this.z=new e(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return t(i,n),Gp=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},t(a,n.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(r.toArray(e,t),1)},i.prototype.point=function(e,t){return new a(this,e,t)},i.prototype.pointFromJSON=function(e){return a.fromJSON(this,e)},a.prototype.precompute=function(){},a.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},a.fromJSON=function(e,t){return new a(e,t[0],t[1]||e.one)},a.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},a.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),i=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},a.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z).redMul(n),s=i.redMul(r),o=t.z.redMul(a.redAdd(s).redSqr()),c=t.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,c)},a.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},a.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},a.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},a.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},a.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Gp}(),t.edwards=function(){if(Zp)return Jp;Zp=1;var e=zp(),t=Pp(),n=ur(),r=ed(),i=e.assert;function a(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,r.call(this,"edwards",e),this.a=new t(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new t(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new t(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),i(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function s(e,n,i,a,s){r.BasePoint.call(this,e,"projective"),null===n&&null===i&&null===a?(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 t(n,16),this.y=new t(i,16),this.z=a?new t(a,16):this.curve.one,this.t=s&&new t(s,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()))))}return n(a,r),Jp=a,a.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},a.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},a.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},a.prototype.pointFromX=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=i.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var c=o.fromRed().isOdd();return(n&&!c||!n&&c)&&(o=o.redNeg()),this.point(e,o)},a.prototype.pointFromY=function(e,n){(e=new t(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),i=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=i.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(n)throw new Error("invalid point");return this.point(this.zero,e)}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==n&&(o=o.redNeg()),this.point(o,e)},a.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(i)},n(s,r.BasePoint),a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},a.prototype.point=function(e,t,n,r){return new s(this,e,t,n,r)},s.fromJSON=function(e,t){return new s(e,t[0],t[1],t[2])},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},s.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=r.redAdd(t),s=a.redSub(n),o=r.redSub(t),c=i.redMul(s),u=a.redMul(o),l=i.redMul(o),p=s.redMul(a);return this.curve.point(c,u,p,l)},s.prototype._projDbl=function(){var e,t,n,r,i,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(o)).redAdd(c);this.zOne?(e=s.redSub(o).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(r.redSub(c)),n=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),a=u.redSub(i).redISub(i),e=s.redSub(o).redISub(c).redMul(a),t=u.redMul(r.redSub(c)),n=u.redMul(a))}else r=o.redAdd(c),i=this.curve._mulC(this.z).redSqr(),a=r.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(r)).redMul(a),t=this.curve._mulC(r).redMul(o.redISub(c)),n=r.redMul(a);return this.curve.point(e,t,n)},s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},s.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(t),s=i.redSub(r),o=i.redAdd(r),c=n.redAdd(t),u=a.redMul(s),l=o.redMul(c),p=a.redMul(c),d=s.redMul(o);return this.curve.point(u,l,d,p)},s.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),i=r.redSqr(),a=this.x.redMul(e.x),s=this.y.redMul(e.y),o=this.curve.d.redMul(a).redMul(s),c=i.redSub(o),u=i.redAdd(o),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(s),p=r.redMul(c).redMul(l);return this.curve.twisted?(t=r.redMul(u).redMul(s.redSub(this.curve._mulA(a))),n=c.redMul(u)):(t=r.redMul(u).redMul(s.redSub(a)),n=this.curve._mulC(c).redMul(u)),this.curve.point(p,t,n)},s.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},s.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},s.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},s.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},s.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},s.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()},s.prototype.getY=function(){return this.normalize(),this.y.fromRed()},s.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},s.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},s.prototype.toP=s.prototype.normalize,s.prototype.mixedAdd=s.prototype.add,Jp}()}(Qp)),Qp}var nd,rd={},id={},ad={};function sd(){if(nd)return ad;nd=1;var e=jp(),t=ur();function n(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function r(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function a(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}return ad.inherits=t,ad.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),a=0;a<e.length;a+=2)r.push(parseInt(e[a]+e[a+1],16))}else for(var i=0,a=0;a<e.length;a++){var s=e.charCodeAt(a);s<128?r[i++]=s:s<2048?(r[i++]=s>>6|192,r[i++]=63&s|128):n(e,a)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++a)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(a=0;a<e.length;a++)r[a]=0|e[a];return r},ad.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=i(e[n].toString(16));return t},ad.htonl=r,ad.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var s=e[i];"little"===t&&(s=r(s)),n+=a(s.toString(16))}return n},ad.zero2=i,ad.zero8=a,ad.join32=function(t,n,r,i){var a=r-n;e(a%4==0);for(var s=new Array(a/4),o=0,c=n;o<s.length;o++,c+=4){var u;u="big"===i?t[c]<<24|t[c+1]<<16|t[c+2]<<8|t[c+3]:t[c+3]<<24|t[c+2]<<16|t[c+1]<<8|t[c],s[o]=u>>>0}return s},ad.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var a=e[r];"big"===t?(n[i]=a>>>24,n[i+1]=a>>>16&255,n[i+2]=a>>>8&255,n[i+3]=255&a):(n[i+3]=a>>>24,n[i+2]=a>>>16&255,n[i+1]=a>>>8&255,n[i]=255&a)}return n},ad.rotr32=function(e,t){return e>>>t|e<<32-t},ad.rotl32=function(e,t){return e<<t|e>>>32-t},ad.sum32=function(e,t){return e+t>>>0},ad.sum32_3=function(e,t,n){return e+t+n>>>0},ad.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},ad.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},ad.sum64=function(e,t,n,r){var i=e[t],a=r+e[t+1]>>>0,s=(a<r?1:0)+n+i;e[t]=s>>>0,e[t+1]=a},ad.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},ad.sum64_lo=function(e,t,n,r){return t+r>>>0},ad.sum64_4_hi=function(e,t,n,r,i,a,s,o){var c=0,u=t;return c+=(u=u+r>>>0)<t?1:0,c+=(u=u+a>>>0)<a?1:0,e+n+i+s+(c+=(u=u+o>>>0)<o?1:0)>>>0},ad.sum64_4_lo=function(e,t,n,r,i,a,s,o){return t+r+a+o>>>0},ad.sum64_5_hi=function(e,t,n,r,i,a,s,o,c,u){var l=0,p=t;return l+=(p=p+r>>>0)<t?1:0,l+=(p=p+a>>>0)<a?1:0,l+=(p=p+o>>>0)<o?1:0,e+n+i+s+c+(l+=(p=p+u>>>0)<u?1:0)>>>0},ad.sum64_5_lo=function(e,t,n,r,i,a,s,o,c,u){return t+r+a+o+u>>>0},ad.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},ad.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},ad.shr64_hi=function(e,t,n){return e>>>n},ad.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},ad}var od,cd={};function ud(){if(od)return cd;od=1;var e=sd(),t=jp();function n(){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}return cd.BlockHash=n,n.prototype.update=function(t,n){if(t=e.toArray(t,n),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),t(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,a=8;a<this.padLength;a++)r[i++]=0;return r},cd}var ld,pd,dd,fd,hd,md,yd,gd,bd,vd,wd,xd,_d={},Td={};function Ed(){if(ld)return Td;ld=1;var e=sd().rotr32;function t(e,t,n){return e&t^~e&n}function n(e,t,n){return e&t^e&n^t&n}function r(e,t,n){return e^t^n}return Td.ft_1=function(e,i,a,s){return 0===e?t(i,a,s):1===e||3===e?r(i,a,s):2===e?n(i,a,s):void 0},Td.ch32=t,Td.maj32=n,Td.p32=r,Td.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},Td.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},Td.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},Td.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10},Td}function Sd(){if(hd)return fd;hd=1;var e=sd(),t=ud(),n=Ed(),r=jp(),i=e.sum32,a=e.sum32_4,s=e.sum32_5,o=n.ch32,c=n.maj32,u=n.s0_256,l=n.s1_256,p=n.g0_256,d=n.g1_256,f=t.BlockHash,h=[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;f.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}return e.inherits(m,f),fd=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.W,f=0;f<16;f++)n[f]=e[t+f];for(;f<n.length;f++)n[f]=a(d(n[f-2]),n[f-7],p(n[f-15]),n[f-16]);var h=this.h[0],m=this.h[1],y=this.h[2],g=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],x=this.h[7];for(r(this.k.length===n.length),f=0;f<n.length;f++){var _=s(x,l(b),o(b,v,w),this.k[f],n[f]),T=i(u(h),c(h,m,y));x=w,w=v,v=b,b=i(g,_),g=y,y=m,m=h,h=i(_,T)}this.h[0]=i(this.h[0],h),this.h[1]=i(this.h[1],m),this.h[2]=i(this.h[2],y),this.h[3]=i(this.h[3],g),this.h[4]=i(this.h[4],b),this.h[5]=i(this.h[5],v),this.h[6]=i(this.h[6],w),this.h[7]=i(this.h[7],x)},m.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},fd}function kd(){if(bd)return gd;bd=1;var e=sd(),t=ud(),n=jp(),r=e.rotr64_hi,i=e.rotr64_lo,a=e.shr64_hi,s=e.shr64_lo,o=e.sum64,c=e.sum64_hi,u=e.sum64_lo,l=e.sum64_4_hi,p=e.sum64_4_lo,d=e.sum64_5_hi,f=e.sum64_5_lo,h=t.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 y(){if(!(this instanceof y))return new y;h.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 g(e,t,n,r,i){var a=e&n^~e&i;return a<0&&(a+=4294967296),a}function b(e,t,n,r,i,a){var s=t&r^~t&a;return s<0&&(s+=4294967296),s}function v(e,t,n,r,i){var a=e&n^e&i^n&i;return a<0&&(a+=4294967296),a}function w(e,t,n,r,i,a){var s=t&r^t&a^r&a;return s<0&&(s+=4294967296),s}function x(e,t){var n=r(e,t,28)^r(t,e,2)^r(t,e,7);return n<0&&(n+=4294967296),n}function _(e,t){var n=i(e,t,28)^i(t,e,2)^i(t,e,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=r(e,t,14)^r(e,t,18)^r(t,e,9);return n<0&&(n+=4294967296),n}function E(e,t){var n=i(e,t,14)^i(e,t,18)^i(t,e,9);return n<0&&(n+=4294967296),n}function S(e,t){var n=r(e,t,1)^r(e,t,8)^a(e,t,7);return n<0&&(n+=4294967296),n}function k(e,t){var n=i(e,t,1)^i(e,t,8)^s(e,t,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=r(e,t,19)^r(t,e,29)^a(e,t,6);return n<0&&(n+=4294967296),n}function A(e,t){var n=i(e,t,19)^i(t,e,29)^s(e,t,6);return n<0&&(n+=4294967296),n}return e.inherits(y,h),gd=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var i=M(n[r-4],n[r-3]),a=A(n[r-4],n[r-3]),s=n[r-14],o=n[r-13],c=S(n[r-30],n[r-29]),u=k(n[r-30],n[r-29]),d=n[r-32],f=n[r-31];n[r]=l(i,a,s,o,c,u,d,f),n[r+1]=p(i,a,s,o,c,u,d,f)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,i=this.h[0],a=this.h[1],s=this.h[2],l=this.h[3],p=this.h[4],h=this.h[5],m=this.h[6],y=this.h[7],S=this.h[8],k=this.h[9],M=this.h[10],A=this.h[11],O=this.h[12],R=this.h[13],I=this.h[14],N=this.h[15];n(this.k.length===r.length);for(var C=0;C<r.length;C+=2){var P=I,j=N,L=T(S,k),$=E(S,k),D=g(S,k,M,A,O),U=b(S,k,M,A,O,R),z=this.k[C],B=this.k[C+1],F=r[C],q=r[C+1],H=d(P,j,L,$,D,U,z,B,F,q),Y=f(P,j,L,$,D,U,z,B,F,q);P=x(i,a),j=_(i,a),L=v(i,a,s,l,p),$=w(i,a,s,l,p,h);var V=c(P,j,L,$),K=u(P,j,L,$);I=O,N=R,O=M,R=A,M=S,A=k,S=c(m,y,H,Y),k=u(y,y,H,Y),m=p,y=h,p=s,h=l,s=i,l=a,i=c(H,Y,V,K),a=u(H,Y,V,K)}o(this.h,0,i,a),o(this.h,2,s,l),o(this.h,4,p,h),o(this.h,6,m,y),o(this.h,8,S,k),o(this.h,10,M,A),o(this.h,12,O,R),o(this.h,14,I,N)},y.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},gd}function Md(){return xd||(xd=1,_d.sha1=function(){if(dd)return pd;dd=1;var e=sd(),t=ud(),n=Ed(),r=e.rotl32,i=e.sum32,a=e.sum32_5,s=n.ft_1,o=t.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function u(){if(!(this instanceof u))return new u;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return e.inherits(u,o),pd=u,u.blockSize=512,u.outSize=160,u.hmacStrength=80,u.padLength=64,u.prototype._update=function(e,t){for(var n=this.W,o=0;o<16;o++)n[o]=e[t+o];for(;o<n.length;o++)n[o]=r(n[o-3]^n[o-8]^n[o-14]^n[o-16],1);var u=this.h[0],l=this.h[1],p=this.h[2],d=this.h[3],f=this.h[4];for(o=0;o<n.length;o++){var h=~~(o/20),m=a(r(u,5),s(h,l,p,d),f,n[o],c[h]);f=d,d=p,p=r(l,30),l=u,u=m}this.h[0]=i(this.h[0],u),this.h[1]=i(this.h[1],l),this.h[2]=i(this.h[2],p),this.h[3]=i(this.h[3],d),this.h[4]=i(this.h[4],f)},u.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")},pd}(),_d.sha224=function(){if(yd)return md;yd=1;var e=sd(),t=Sd();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return e.inherits(n,t),md=n,n.blockSize=512,n.outSize=224,n.hmacStrength=192,n.padLength=64,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")},md}(),_d.sha256=Sd(),_d.sha384=function(){if(wd)return vd;wd=1;var e=sd(),t=kd();function n(){if(!(this instanceof n))return new n;t.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return e.inherits(n,t),vd=n,n.blockSize=1024,n.outSize=384,n.hmacStrength=192,n.padLength=128,n.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")},vd}(),_d.sha512=kd()),_d}var Ad,Od,Rd,Id,Nd,Cd,Pd,jd,Ld,$d,Dd,Ud,zd,Bd,Fd,qd,Hd,Yd,Vd,Kd,Gd,Wd,Jd={};function Zd(){return Id||(Id=1,function(){var e=id;e.utils=sd(),e.common=ud(),e.sha=Md(),e.ripemd=function(){if(Ad)return Jd;Ad=1;var e=sd(),t=ud(),n=e.rotl32,r=e.sum32,i=e.sum32_3,a=e.sum32_4,s=t.BlockHash;function o(){if(!(this instanceof o))return new o;s.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function u(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function l(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}e.inherits(o,s),Jd.ripemd160=o,o.blockSize=512,o.outSize=160,o.hmacStrength=192,o.padLength=64,o.prototype._update=function(e,t){for(var s=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],b=s,v=o,w=m,x=y,_=g,T=0;T<80;T++){var E=r(n(a(s,c(T,o,m,y),e[p[T]+t],u(T)),f[T]),g);s=g,g=y,y=n(m,10),m=o,o=E,E=r(n(a(b,c(79-T,v,w,x),e[d[T]+t],l(T)),h[T]),_),b=_,_=x,x=n(w,10),w=v,v=E}E=i(this.h[1],m,x),this.h[1]=i(this.h[2],y,_),this.h[2]=i(this.h[3],g,b),this.h[3]=i(this.h[4],s,v),this.h[4]=i(this.h[0],o,w),this.h[0]=E},o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.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],d=[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],f=[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],h=[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];return Jd}(),e.hmac=function(){if(Rd)return Od;Rd=1;var e=sd(),t=jp();function n(t,r,i){if(!(this instanceof n))return new n(t,r,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,i))}return Od=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),t(e.length<=this.blockSize);for(var n=e.length;n<this.blockSize;n++)e.push(0);for(n=0;n<e.length;n++)e[n]^=54;for(this.inner=(new this.Hash).update(e),n=0;n<e.length;n++)e[n]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},Od}(),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160}()),id}function Xd(){return Pd||(Pd=1,function(e){var t,n=e,r=Zd(),i=td(),a=zp().assert;function s(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.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 o(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new s(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=s,o("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),o("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),o("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),o("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),o("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),o("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),o("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=Cd?Nd:(Cd=1,Nd={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"]]}})}catch(e){t=void 0}o("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(rd)),rd}function Qd(){if(Fd)return Bd;Fd=1;var e=Pp(),t=function(){if(Ld)return jd;Ld=1;var e=Zd(),t=Up(),n=jp();function r(e){if(!(this instanceof r))return new r(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 i=t.toArray(e.entropy,e.entropyEnc||"hex"),a=t.toArray(e.nonce,e.nonceEnc||"hex"),s=t.toArray(e.pers,e.persEnc||"hex");n(i.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(i,a,s)}return jd=r,r.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new e.hmac(this.hash,this.K)},r.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,r,i,a){"string"!=typeof r&&(a=i,i=r,r=null),e=t.toArray(e,r),i=t.toArray(i,a),n(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1},r.prototype.generate=function(e,n,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(i=r,r=n,n=null),r&&(r=t.toArray(r,i||"hex"),this._update(r));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var s=a.slice(0,e);return this._update(r),this._reseed++,t.encode(s,n)},jd}(),n=zp(),r=Xd(),i=qp(),a=n.assert,s=function(){if(Dd)return $d;Dd=1;var e=Pp(),t=zp().assert;function n(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)}return $d=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.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"}},n.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},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(t,n){this.priv=new e(t,n||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,n){if(e.x||e.y)return"mont"===this.ec.curve.type?t(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||t(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,n)},n.prototype.derive=function(e){return e.validate()||t(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},n.prototype.verify=function(e,t,n){return this.ec.verify(e,t,this,void 0,n)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},$d}(),o=function(){if(zd)return Ud;zd=1;var e=Pp(),t=zp(),n=t.assert;function r(t,i){if(t instanceof r)return t;this._importDER(t,i)||(n(t.r&&t.s,"Signature without r or s"),this.r=new e(t.r,16),this.s=new e(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function i(){this.place=0}function a(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;if(0===e[t.place])return!1;for(var i=0,a=0,s=t.place;a<r;a++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function s(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function o(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}return Ud=r,r.prototype._importDER=function(n,r){n=t.toArray(n,r);var s=new i;if(48!==n[s.place++])return!1;var o=a(n,s);if(!1===o)return!1;if(o+s.place!==n.length)return!1;if(2!==n[s.place++])return!1;var c=a(n,s);if(!1===c)return!1;if(128&n[s.place])return!1;var u=n.slice(s.place,c+s.place);if(s.place+=c,2!==n[s.place++])return!1;var l=a(n,s);if(!1===l)return!1;if(n.length!==l+s.place)return!1;if(128&n[s.place])return!1;var p=n.slice(s.place,l+s.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===p[0]){if(!(128&p[1]))return!1;p=p.slice(1)}return this.r=new e(u),this.s=new e(p),this.recoveryParam=null,!0},r.prototype.toDER=function(e){var n=this.r.toArray(),r=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&r[0]&&(r=[0].concat(r)),n=s(n),r=s(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];o(i,n.length),(i=i.concat(n)).push(2),o(i,r.length);var a=i.concat(r),c=[48];return o(c,a.length),c=c.concat(a),t.encode(c,e)},Ud}();function c(e){if(!(this instanceof c))return new c(e);"string"==typeof e&&(a(Object.prototype.hasOwnProperty.call(r,e),"Unknown curve "+e),e=r[e]),e instanceof r.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}return Bd=c,c.prototype.keyPair=function(e){return new s(this,e)},c.prototype.keyFromPrivate=function(e,t){return s.fromPrivate(this,e,t)},c.prototype.keyFromPublic=function(e,t){return s.fromPublic(this,e,t)},c.prototype.genKeyPair=function(n){n||(n={});for(var r=new t({hash:this.hash,pers:n.pers,persEnc:n.persEnc||"utf8",entropy:n.entropy||i(this.hash.hmacStrength),entropyEnc:n.entropy&&n.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),s=this.n.sub(new e(2));;){var o=new e(r.generate(a));if(!(o.cmp(s)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(t,n,r){var i;if(e.isBN(t)||"number"==typeof t)i=(t=new e(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new e(t,16);else{var a=t.toString();i=a.length+1>>>1,t=new e(a,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!n&&t.cmp(this.n)>=0?t.sub(this.n):t},c.prototype.sign=function(n,r,i,s){if("object"==typeof i&&(s=i,i=null),s||(s={}),"string"!=typeof n&&"number"!=typeof n&&!e.isBN(n)){a("object"==typeof n&&n&&"number"==typeof n.length,"Expected message to be an array-like, a hex string, or a BN instance"),a(n.length>>>0===n.length);for(var c=0;c<n.length;c++)a((255&n[c])===n[c])}r=this.keyFromPrivate(r,i),n=this._truncateToN(n,!1,s.msgBitLength),a(!n.isNeg(),"Can not sign a negative message");var u=this.n.byteLength(),l=r.getPrivate().toArray("be",u),p=n.toArray("be",u);a(new e(p).eq(n),"Can not sign message");for(var d=new t({hash:this.hash,entropy:l,nonce:p,pers:s.pers,persEnc:s.persEnc||"utf8"}),f=this.n.sub(new e(1)),h=0;;h++){var m=s.k?s.k(h):new e(d.generate(this.n.byteLength()));if(!((m=this._truncateToN(m,!0)).cmpn(1)<=0||m.cmp(f)>=0)){var y=this.g.mul(m);if(!y.isInfinity()){var g=y.getX(),b=g.umod(this.n);if(0!==b.cmpn(0)){var v=m.invm(this.n).mul(b.mul(r.getPrivate()).iadd(n));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(y.getY().isOdd()?1:0)|(0!==g.cmp(b)?2:0);return s.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new o({r:b,s:v,recoveryParam:w})}}}}}},c.prototype.verify=function(e,t,n,r,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),n=this.keyFromPublic(n,r);var a=(t=new o(t,"hex")).r,s=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var c,u=s.invm(this.n),l=u.mul(e).umod(this.n),p=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(c=this.g.jmulAdd(l,n.getPublic(),p)).isInfinity()&&c.eqXToP(a):!(c=this.g.mulAdd(l,n.getPublic(),p)).isInfinity()&&0===c.getX().umod(this.n).cmp(a)},c.prototype.recoverPubKey=function(t,n,r,i){a((3&r)===r,"The recovery param is more than two bits"),n=new o(n,i);var s=this.n,c=new e(t),u=n.r,l=n.s,p=1&r,d=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");u=d?this.curve.pointFromX(u.add(this.curve.n),p):this.curve.pointFromX(u,p);var f=n.r.invm(s),h=s.sub(c).mul(f).umod(s),m=l.mul(f).umod(s);return this.g.mulAdd(h,u,m)},c.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new o(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(n))return i}throw new Error("Unable to find valid recovery factor")},Bd}function ef(){if(Gd)return Kd;Gd=1;var e=Zd(),t=Xd(),n=zp(),r=n.assert,i=n.parseBytes,a=function(){if(Hd)return qd;Hd=1;var e=zp(),t=e.assert,n=e.parseBytes,r=e.cachedProperty;function i(e,t){this.eddsa=e,this._secret=n(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=n(t.pub)}return i.fromPublic=function(e,t){return t instanceof i?t:new i(e,{pub:t})},i.fromSecret=function(e,t){return t instanceof i?t:new i(e,{secret:t})},i.prototype.secret=function(){return this._secret},r(i,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),r(i,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),r(i,"privBytes",function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r}),r(i,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),r(i,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),r(i,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),i.prototype.sign=function(e){return t(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},i.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},i.prototype.getSecret=function(n){return t(this._secret,"KeyPair is public only"),e.encode(this.secret(),n)},i.prototype.getPublic=function(t){return e.encode(this.pubBytes(),t)},qd=i}(),s=function(){if(Vd)return Yd;Vd=1;var e=Pp(),t=zp(),n=t.assert,r=t.cachedProperty,i=t.parseBytes;function a(t,r){this.eddsa=t,"object"!=typeof r&&(r=i(r)),Array.isArray(r)&&(n(r.length===2*t.encodingLength,"Signature has invalid size"),r={R:r.slice(0,t.encodingLength),S:r.slice(t.encodingLength)}),n(r.R&&r.S,"Signature without R or S"),t.isPoint(r.R)&&(this._R=r.R),r.S instanceof e&&(this._S=r.S),this._Rencoded=Array.isArray(r.R)?r.R:r.Rencoded,this._Sencoded=Array.isArray(r.S)?r.S:r.Sencoded}return r(a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),r(a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),r(a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),r(a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},a.prototype.toHex=function(){return t.encode(this.toBytes(),"hex").toUpperCase()},Yd=a}();function o(n){if(r("ed25519"===n,"only tested with ed25519 so far"),!(this instanceof o))return new o(n);n=t[n].curve,this.curve=n,this.g=n.g,this.g.precompute(n.n.bitLength()+1),this.pointClass=n.point().constructor,this.encodingLength=Math.ceil(n.n.bitLength()/8),this.hash=e.sha512}return Kd=o,o.prototype.sign=function(e,t){e=i(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),a=this.g.mul(r),s=this.encodePoint(a),o=this.hashInt(s,n.pubBytes(),e).mul(n.priv()),c=r.add(o).umod(this.curve.n);return this.makeSignature({R:a,S:c,Rencoded:s})},o.prototype.verify=function(e,t,n){if(e=i(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var r=this.keyFromPublic(n),a=this.hashInt(t.Rencoded(),r.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(r.pub().mul(a)).eq(s)},o.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return n.intFromLE(e.digest()).umod(this.curve.n)},o.prototype.keyFromPublic=function(e){return a.fromPublic(this,e)},o.prototype.keyFromSecret=function(e){return a.fromSecret(this,e)},o.prototype.makeSignature=function(e){return e instanceof s?e:new s(this,e)},o.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},o.prototype.decodePoint=function(e){var t=(e=n.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),i=!!(128&e[t]),a=n.intFromLE(r);return this.curve.pointFromY(a,i)},o.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},o.prototype.decodeInt=function(e){return n.intFromLE(e)},o.prototype.isPoint=function(e){return e instanceof this.pointClass},Kd}function tf(){return Wd||(Wd=1,function(){var e=Op;e.version=Rp,e.utils=zp(),e.rand=qp(),e.curve=td(),e.curves=Xd(),e.ec=Qd(),e.eddsa=ef()}()),Op}const nf=new(tf().ec)("secp256k1"),rf=globalThis.crypto||globalThis.msCrypto||{};rf.subtle||rf.webkitSubtle;const af=Buffer.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),sf=Buffer.alloc(32,0);function of(e,t){if(!e)throw new Error(t)}function cf(e){return t=e,!(!Buffer.isBuffer(t)||32!==t.length)&&(e.compare(sf)>0&&e.compare(af)<0);var t}function uf(e){if(void 0===rf.getRandomValues)return Buffer.from(rf.randomBytes(e));const t=new Uint8Array(e);return rf.getRandomValues(t),Buffer.from(t)}var lf,pf={},df={},ff={},hf={exports:{}},mf=hf.exports;function yf(){return lf||(lf=1,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function i(e,t,n){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:require("buffer").Buffer}catch(e){}function s(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 o(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,i){for(var a=0,s=0,o=Math.min(e.length,r),c=t;c<o;c++){var u=e.charCodeAt(c)-48;a*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),a+=s}return a}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.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<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,s,o=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},i.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)i=o(e,t,r)<<a,this.words[s]|=67108863&i,a>=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},i.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var a=e.length-n,s=a%r,o=Math.min(a,a-s)+n,u=0,l=n;l<o;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var p=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)p*=t;this.imuln(p),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){i.prototype.inspect=l}else i.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","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"],d=[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],f=[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,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],a=0|t.words[0],s=i*a,o=67108863&s,c=s/67108864|0;n.words[0]=o;for(var u=1;u<r;u++){for(var l=c>>>26,p=67108863&c,d=Math.min(u,t.length-1),f=Math.max(0,u-e.length+1);f<=d;f++){var h=u-f|0;l+=(s=(i=0|e.words[h])*(a=0|t.words[f])+p)/67108864|0,p=67108863&s}n.words[u]=0|p,c=0|l}return 0!==c?n.words[u]=0|c:n.length--,n._strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,a=0,s=0;s<this.length;s++){var o=this.words[s],c=(16777215&(o<<i|a)).toString(16);a=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?p[6-c.length]+c+r:c+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=d[e],l=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?m+r:p[u-m.length]+m+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")},i.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},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,a);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},i.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===a?(n<e.length&&(e[n++]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,a=0;i<this.length;i++){var s=this.words[i]<<a|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===a?(n>=0&&(e[n--]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 8191&t||(n+=13,t>>>=13),127&t||(n+=7,t>>>=7),15&t||(n+=4,t>>>=4),3&t||(n+=2,t>>>=2),1&t||n++,n},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)t=(0|n.words[a])+(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<n.length;a++)t=(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.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 n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var a=0,s=0;s<r.length;s++)a=(t=(0|n.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;for(;0!==a&&s<n.length;s++)a=(t=(0|n.words[s])+a)>>26,this.words[s]=67108863&t;if(0===a&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,n){var r,i,a,s=e.words,o=t.words,c=n.words,u=0,l=0|s[0],p=8191&l,d=l>>>13,f=0|s[1],h=8191&f,m=f>>>13,y=0|s[2],g=8191&y,b=y>>>13,v=0|s[3],w=8191&v,x=v>>>13,_=0|s[4],T=8191&_,E=_>>>13,S=0|s[5],k=8191&S,M=S>>>13,A=0|s[6],O=8191&A,R=A>>>13,I=0|s[7],N=8191&I,C=I>>>13,P=0|s[8],j=8191&P,L=P>>>13,$=0|s[9],D=8191&$,U=$>>>13,z=0|o[0],B=8191&z,F=z>>>13,q=0|o[1],H=8191&q,Y=q>>>13,V=0|o[2],K=8191&V,G=V>>>13,W=0|o[3],J=8191&W,Z=W>>>13,X=0|o[4],Q=8191&X,ee=X>>>13,te=0|o[5],ne=8191&te,re=te>>>13,ie=0|o[6],ae=8191&ie,se=ie>>>13,oe=0|o[7],ce=8191&oe,ue=oe>>>13,le=0|o[8],pe=8191&le,de=le>>>13,fe=0|o[9],he=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ye=(u+(r=Math.imul(p,B))|0)+((8191&(i=(i=Math.imul(p,F))+Math.imul(d,B)|0))<<13)|0;u=((a=Math.imul(d,F))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(h,B),i=(i=Math.imul(h,F))+Math.imul(m,B)|0,a=Math.imul(m,F);var ge=(u+(r=r+Math.imul(p,H)|0)|0)+((8191&(i=(i=i+Math.imul(p,Y)|0)+Math.imul(d,H)|0))<<13)|0;u=((a=a+Math.imul(d,Y)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,B),i=(i=Math.imul(g,F))+Math.imul(b,B)|0,a=Math.imul(b,F),r=r+Math.imul(h,H)|0,i=(i=i+Math.imul(h,Y)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,Y)|0;var be=(u+(r=r+Math.imul(p,K)|0)|0)+((8191&(i=(i=i+Math.imul(p,G)|0)+Math.imul(d,K)|0))<<13)|0;u=((a=a+Math.imul(d,G)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,B),i=(i=Math.imul(w,F))+Math.imul(x,B)|0,a=Math.imul(x,F),r=r+Math.imul(g,H)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(b,H)|0,a=a+Math.imul(b,Y)|0,r=r+Math.imul(h,K)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(m,K)|0,a=a+Math.imul(m,G)|0;var ve=(u+(r=r+Math.imul(p,J)|0)|0)+((8191&(i=(i=i+Math.imul(p,Z)|0)+Math.imul(d,J)|0))<<13)|0;u=((a=a+Math.imul(d,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(T,B),i=(i=Math.imul(T,F))+Math.imul(E,B)|0,a=Math.imul(E,F),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,H)|0,a=a+Math.imul(x,Y)|0,r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(b,K)|0,a=a+Math.imul(b,G)|0,r=r+Math.imul(h,J)|0,i=(i=i+Math.imul(h,Z)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,Z)|0;var we=(u+(r=r+Math.imul(p,Q)|0)|0)+((8191&(i=(i=i+Math.imul(p,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((a=a+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,F))+Math.imul(M,B)|0,a=Math.imul(M,F),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(E,H)|0,a=a+Math.imul(E,Y)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(x,K)|0,a=a+Math.imul(x,G)|0,r=r+Math.imul(g,J)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,J)|0,a=a+Math.imul(b,Z)|0,r=r+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0;var xe=(u+(r=r+Math.imul(p,ne)|0)|0)+((8191&(i=(i=i+Math.imul(p,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((a=a+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(O,B),i=(i=Math.imul(O,F))+Math.imul(R,B)|0,a=Math.imul(R,F),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,Y)|0,r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(E,K)|0,a=a+Math.imul(E,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,Z)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(b,Q)|0,a=a+Math.imul(b,ee)|0,r=r+Math.imul(h,ne)|0,i=(i=i+Math.imul(h,re)|0)+Math.imul(m,ne)|0,a=a+Math.imul(m,re)|0;var _e=(u+(r=r+Math.imul(p,ae)|0)|0)+((8191&(i=(i=i+Math.imul(p,se)|0)+Math.imul(d,ae)|0))<<13)|0;u=((a=a+Math.imul(d,se)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,F))+Math.imul(C,B)|0,a=Math.imul(C,F),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,Y)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(M,K)|0,a=a+Math.imul(M,G)|0,r=r+Math.imul(T,J)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(b,ne)|0,a=a+Math.imul(b,re)|0,r=r+Math.imul(h,ae)|0,i=(i=i+Math.imul(h,se)|0)+Math.imul(m,ae)|0,a=a+Math.imul(m,se)|0;var Te=(u+(r=r+Math.imul(p,ce)|0)|0)+((8191&(i=(i=i+Math.imul(p,ue)|0)+Math.imul(d,ce)|0))<<13)|0;u=((a=a+Math.imul(d,ue)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,B),i=(i=Math.imul(j,F))+Math.imul(L,B)|0,a=Math.imul(L,F),r=r+Math.imul(N,H)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(C,H)|0,a=a+Math.imul(C,Y)|0,r=r+Math.imul(O,K)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,K)|0,a=a+Math.imul(R,G)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(M,J)|0,a=a+Math.imul(M,Z)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,a=a+Math.imul(x,re)|0,r=r+Math.imul(g,ae)|0,i=(i=i+Math.imul(g,se)|0)+Math.imul(b,ae)|0,a=a+Math.imul(b,se)|0,r=r+Math.imul(h,ce)|0,i=(i=i+Math.imul(h,ue)|0)+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0;var Ee=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,de)|0)+Math.imul(d,pe)|0))<<13)|0;u=((a=a+Math.imul(d,de)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,B),i=(i=Math.imul(D,F))+Math.imul(U,B)|0,a=Math.imul(U,F),r=r+Math.imul(j,H)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,Y)|0,r=r+Math.imul(N,K)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(C,K)|0,a=a+Math.imul(C,G)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,Z)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(E,ne)|0,a=a+Math.imul(E,re)|0,r=r+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(x,ae)|0,a=a+Math.imul(x,se)|0,r=r+Math.imul(g,ce)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,r=r+Math.imul(h,pe)|0,i=(i=i+Math.imul(h,de)|0)+Math.imul(m,pe)|0,a=a+Math.imul(m,de)|0;var Se=(u+(r=r+Math.imul(p,he)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(d,he)|0))<<13)|0;u=((a=a+Math.imul(d,me)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,Y))+Math.imul(U,H)|0,a=Math.imul(U,Y),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(L,K)|0,a=a+Math.imul(L,G)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,Z)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(M,ne)|0,a=a+Math.imul(M,re)|0,r=r+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,se)|0)+Math.imul(E,ae)|0,a=a+Math.imul(E,se)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,r=r+Math.imul(g,pe)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(b,pe)|0,a=a+Math.imul(b,de)|0;var ke=(u+(r=r+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;u=((a=a+Math.imul(m,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(D,K),i=(i=Math.imul(D,G))+Math.imul(U,K)|0,a=Math.imul(U,G),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,Z)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,ee)|0,r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(R,ne)|0,a=a+Math.imul(R,re)|0,r=r+Math.imul(k,ae)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(M,ae)|0,a=a+Math.imul(M,se)|0,r=r+Math.imul(T,ce)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(E,ce)|0,a=a+Math.imul(E,ue)|0,r=r+Math.imul(w,pe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(x,pe)|0,a=a+Math.imul(x,de)|0;var Me=(u+(r=r+Math.imul(g,he)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(b,he)|0))<<13)|0;u=((a=a+Math.imul(b,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(D,J),i=(i=Math.imul(D,Z))+Math.imul(U,J)|0,a=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(C,ne)|0,a=a+Math.imul(C,re)|0,r=r+Math.imul(O,ae)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(R,ae)|0,a=a+Math.imul(R,se)|0,r=r+Math.imul(k,ce)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(M,ce)|0,a=a+Math.imul(M,ue)|0,r=r+Math.imul(T,pe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(E,pe)|0,a=a+Math.imul(E,de)|0;var Ae=(u+(r=r+Math.imul(w,he)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(x,he)|0))<<13)|0;u=((a=a+Math.imul(x,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(U,Q)|0,a=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(L,ne)|0,a=a+Math.imul(L,re)|0,r=r+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(C,ae)|0,a=a+Math.imul(C,se)|0,r=r+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,ue)|0)+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,r=r+Math.imul(k,pe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(M,pe)|0,a=a+Math.imul(M,de)|0;var Oe=(u+(r=r+Math.imul(T,he)|0)|0)+((8191&(i=(i=i+Math.imul(T,me)|0)+Math.imul(E,he)|0))<<13)|0;u=((a=a+Math.imul(E,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(D,ne),i=(i=Math.imul(D,re))+Math.imul(U,ne)|0,a=Math.imul(U,re),r=r+Math.imul(j,ae)|0,i=(i=i+Math.imul(j,se)|0)+Math.imul(L,ae)|0,a=a+Math.imul(L,se)|0,r=r+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(C,ce)|0,a=a+Math.imul(C,ue)|0,r=r+Math.imul(O,pe)|0,i=(i=i+Math.imul(O,de)|0)+Math.imul(R,pe)|0,a=a+Math.imul(R,de)|0;var Re=(u+(r=r+Math.imul(k,he)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(M,he)|0))<<13)|0;u=((a=a+Math.imul(M,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(D,ae),i=(i=Math.imul(D,se))+Math.imul(U,ae)|0,a=Math.imul(U,se),r=r+Math.imul(j,ce)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(L,ce)|0,a=a+Math.imul(L,ue)|0,r=r+Math.imul(N,pe)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(C,pe)|0,a=a+Math.imul(C,de)|0;var Ie=(u+(r=r+Math.imul(O,he)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(R,he)|0))<<13)|0;u=((a=a+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(D,ce),i=(i=Math.imul(D,ue))+Math.imul(U,ce)|0,a=Math.imul(U,ue),r=r+Math.imul(j,pe)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(L,pe)|0,a=a+Math.imul(L,de)|0;var Ne=(u+(r=r+Math.imul(N,he)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(C,he)|0))<<13)|0;u=((a=a+Math.imul(C,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(D,pe),i=(i=Math.imul(D,de))+Math.imul(U,pe)|0,a=Math.imul(U,de);var Ce=(u+(r=r+Math.imul(j,he)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(L,he)|0))<<13)|0;u=((a=a+Math.imul(L,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Pe=(u+(r=Math.imul(D,he))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(U,he)|0))<<13)|0;return u=((a=Math.imul(U,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,c[0]=ye,c[1]=ge,c[2]=be,c[3]=ve,c[4]=we,c[5]=xe,c[6]=_e,c[7]=Te,c[8]=Ee,c[9]=Se,c[10]=ke,c[11]=Me,c[12]=Ae,c[13]=Oe,c[14]=Re,c[15]=Ie,c[16]=Ne,c[17]=Ce,c[18]=Pe,0!==u&&(c[19]=u,n.length++),n};function y(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,a=0;a<n.length-1;a++){var s=i;i=0;for(var o=67108863&r,c=Math.min(a,t.length-1),u=Math.max(0,a-e.length+1);u<=c;u++){var l=a-u,p=(0|e.words[l])*(0|t.words[u]),d=67108863&p;o=67108863&(d=d+o|0),i+=(s=(s=s+(p/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[a]=o,r=s,s=i}return 0!==r?n.words[a]=r:n.length--,n._strip()}function g(e,t,n){return y(e,t,n)}Math.imul||(m=h),i.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):n<63?h(this,e,t):n<1024?y(this,e,t):g(this,e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),g(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,s=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var a=n.sqr();r<t.length;r++,a=a.sqr())0!==t[r]&&(n=n.mul(a));return n},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var o=this.words[t]&a,c=(0|this.words[t])-o<<r;this.words[t]=c|s,s=o>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,c=r;if(i-=s,i=Math.max(0,i),c){for(var u=0;u<s;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&o}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var i,a,s=e.length+r;this._expand(s);var o=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+o;var c=(0|e.words[i])*t;o=((a-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)o=(a=(0|this.words[i+r])+o)>>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i<this.length;i++)o=(a=-(0|this.words[i])+o)>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),a=e,s=0|a.words[a.length-1];0!=(n=26-this._countBits(s))&&(a=a.ushln(n),r.iushln(n),s=0|a.words[a.length-1]);var o,c=r.length-a.length;if("mod"!==t){(o=new i(null)).length=c+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var l=r.clone()._ishlnsubmul(a,1,c);0===l.negative&&(r=l,o&&(o.words[c]=1));for(var p=c-1;p>=0;p--){var d=67108864*(0|r.words[a.length+p])+(0|r.words[a.length+p-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(a,d,p);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(a,1,p),r.isZero()||(r.negative^=1);o&&(o.words[p]=d)}return o&&o._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:o||null,mod:r}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(a=o.div.neg()),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:a,mod:s}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(a=o.div.neg()),{div:a,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:o.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var a,s,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),a=n.cmp(r);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.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 a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.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 a=new i(1),s=new i(0),o=new i(0),c=new i(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var d=0,f=1;0===(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(p)),a.iushrn(1),s.iushrn(1);for(var h=0,m=1;0===(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(o.isOdd()||c.isOdd())&&(o.iadd(l),c.isub(p)),o.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(o),s.isub(c)):(r.isub(t),o.isub(a),c.isub(s))}return{a:o,b:c,gcd:r.iushln(u)}},i.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 a,s=new i(1),o=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,l=1;0===(t.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(t.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var p=0,d=1;0===(r.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(r.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(c),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(o)):(r.isub(t),o.isub(s))}return(a=0===t.cmpn(1)?s:o).cmpn(0)<0&&a.iadd(e),a},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var a=t;t=n,n=a}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,s=r;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new E(e)},i.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)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},r(w,v),w.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|a>>>22,a=s}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(x,v),r(_,v),r(T,v),T.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return b[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.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")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,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 i(1)).iushrn(2);return this.pow(e,r)}for(var a=this.m.subn(1),s=0;!a.isZero()&&0===a.andln(1);)s++,a.iushrn(1);n(!a.isZero());var o=new i(1).toRed(this),c=o.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,a),d=this.pow(e,a.addn(1).iushrn(1)),f=this.pow(e,a),h=s;0!==f.cmp(o);){for(var m=f,y=0;0!==m.cmp(o);y++)m=m.redSqr();n(y<h);var g=this.pow(p,new i(1).iushln(h-y-1));d=d.redMul(g),p=g.redSqr(),f=f.redMul(p),h=y}return d},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new i(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var a=n[0],s=0,o=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],l=c-1;l>=0;l--){var p=u>>l&1;a!==n[0]&&(a=this.sqr(a)),0!==p||0!==s?(s<<=1,s|=p,(4===++o||0===r&&0===l)&&(a=this.mul(a,n[s]),o=0,s=0)):o=0}c=26}return a},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new S(e)},r(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=n.isub(r).iushrn(this.shift),s=a;return a.cmp(this.m)>=0?s=a.isub(this.m):a.cmpn(0)<0&&(s=a.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(hf,mf)),hf.exports}var gf,bf,vf,wf={};function xf(){if(gf)return wf;gf=1;var e=wf&&wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wf,"__esModule",{value:!0}),wf.getLength=wf.decode=wf.encode=void 0;const t=e(yf());function n(e,t){if("0"===e[0]&&"0"===e[1])throw new Error("invalid RLP: extra zeros");return parseInt(e,t)}function r(e,t){if(e<56)return Buffer.from([e+t]);{const n=s(e),r=s(t+55+n.length/2);return Buffer.from(r+n,"hex")}}function i(e){let t,r,a,s,o;const c=[],u=e[0];if(u<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(u<=183){if(t=u-127,a=128===u?Buffer.from([]):e.slice(1,t),2===t&&a[0]<128)throw new Error("invalid rlp encoding: byte must be less 0x80");return{data:a,remainder:e.slice(t)}}if(u<=191){if(r=u-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=n(e.slice(1,r).toString("hex"),16),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");if(a=e.slice(r,t+r),a.length<t)throw new Error("invalid RLP: not enough bytes for string");return{data:a,remainder:e.slice(t+r)}}if(u<=247){for(t=u-191,s=e.slice(1,t);s.length;)o=i(s),c.push(o.data),s=o.remainder;return{data:c,remainder:e.slice(t)}}{r=u-246,t=n(e.slice(1,r).toString("hex"),16);const a=r+t;if(a>e.length)throw new Error("invalid rlp: total length is larger than the data");if(s=e.slice(r,a),0===s.length)throw new Error("invalid rlp, List has a invalid length");for(;s.length;)o=i(s),c.push(o.data),s=o.remainder;return{data:c,remainder:e.slice(a)}}}function a(e){return"0x"===e.slice(0,2)}function s(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function o(e){if(!Buffer.isBuffer(e)){if("string"==typeof e)return a(e)?Buffer.from((n="string"!=typeof(r=e)?r:a(r)?r.slice(2):r).length%2?`0${n}`:n,"hex"):Buffer.from(e);if("number"==typeof e||"bigint"==typeof e)return e?function(e){const t=s(e);return Buffer.from(t,"hex")}(e):Buffer.from([]);if(null==e)return Buffer.from([]);if(e instanceof Uint8Array)return Buffer.from(e);if(t.default.isBN(e))return Buffer.from(e.toArray());throw new Error("invalid type")}var n,r;return e}return wf.encode=function e(t){if(Array.isArray(t)){const n=[];for(let r=0;r<t.length;r++)n.push(e(t[r]));const i=Buffer.concat(n);return Buffer.concat([r(i.length,192),i])}{const e=o(t);return 1===e.length&&e[0]<128?e:Buffer.concat([r(e.length,128),e])}},wf.decode=function(e,t=!1){if(!e||0===e.length)return Buffer.from([]);const n=i(o(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid remainder");return n.data},wf.getLength=function(e){if(!e||0===e.length)return Buffer.from([]);const t=o(e),r=t[0];if(r<=127)return t.length;if(r<=183)return r-127;if(r<=191)return r-182;if(r<=247)return r-191;{const e=r-246;return e+n(t.slice(1,e).toString("hex"),16)}},wf}function _f(){if(bf)return ff;bf=1;var e=ff&&ff.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=ff&&ff.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=ff&&ff.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},r=ff&&ff.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ff,"__esModule",{value:!0}),ff.rlp=ff.BN=void 0;const i=r(yf());ff.BN=i.default;const a=n(xf());return ff.rlp=a,ff}function Tf(){return vf||(vf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=d,n=_f();e.MAX_UINT64=new n.BN("ffffffffffffffff",16),e.MAX_INTEGER=new n.BN("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),e.TWO_POW256=new n.BN("10000000000000000000000000000000000000000000000000000000000000000",16),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex")}(df)),df}var Ef,Sf,kf,Mf,Af,Of,Rf,If,Nf,Cf,Pf,jf,Lf={},$f={},Df={exports:{}},Uf={exports:{}};function zf(){if(kf)return Uf.exports;kf=1;const e="function"==typeof __webpack_require__?__non_webpack_require__:Xs;return"function"==typeof e.addon?Uf.exports=e.addon.bind(e):Uf.exports=function(){if(Sf)return Ef;Sf=1;var e=n,t=a,r=l,i="function"==typeof __webpack_require__?__non_webpack_require__:Xs,s=process.config&&process.config.variables||{},o=!!process.env.PREBUILDS_ONLY,c=process.versions.modules,u=process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",p=process.env.npm_config_arch||r.arch(),d=process.env.npm_config_platform||r.platform(),f=process.env.LIBC||(function(t){return"linux"===t&&e.existsSync("/etc/alpine-release")}(d)?"musl":"glibc"),h=process.env.ARM_VERSION||("arm64"===p?"8":s.arm_version)||"",m=(process.versions.uv||"").split(".")[0];function y(e){return i(y.resolve(e))}function g(t){try{return e.readdirSync(t)}catch(e){return[]}}function b(e,n){var r=g(e).filter(n);return r[0]&&t.join(e,r[0])}function v(e){return/\.node$/.test(e)}function w(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function x(e,t){return function(n){return null!=n&&n.platform===e&&n.architectures.includes(t)}}function _(e,t){return e.architectures.length-t.architectures.length}function T(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var i=t[r];if("node"===i||"electron"===i||"node-webkit"===i)n.runtime=i;else if("napi"===i)n.napi=!0;else if("abi"===i.slice(0,3))n.abi=i.slice(3);else if("uv"===i.slice(0,2))n.uv=i.slice(2);else if("armv"===i.slice(0,4))n.armv=i.slice(4);else{if("glibc"!==i&&"musl"!==i)continue;n.libc=i}n.specificity++}return n}}function E(e,t){return function(n){return!(null==n||n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n)||n.abi&&n.abi!==t&&!n.napi||n.uv&&n.uv!==m||n.armv&&n.armv!==h||n.libc&&n.libc!==f)}}function S(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}return Ef=y,y.resolve=y.path=function(e){e=t.resolve(e||".");try{var n=i(t.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[n+"_PREBUILD"]&&(e=process.env[n+"_PREBUILD"])}catch(e){}if(!o){var r=b(t.join(e,"build/Release"),v);if(r)return r;var a=b(t.join(e,"build/Debug"),v);if(a)return a}var s=k(e);if(s)return s;var l=k(t.dirname(process.execPath));if(l)return l;var y=["platform="+d,"arch="+p,"runtime="+u,"abi="+c,"uv="+m,h?"armv="+h:"","libc="+f,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+y+"\n loaded from: "+e+"\n");function k(e){var n=g(t.join(e,"prebuilds")).map(w).filter(x(d,p)).sort(_)[0];if(n){var r=t.join(e,"prebuilds",n.name),i=g(r).map(T).filter(E(u,c)).sort(S(u))[0];return i?t.join(r,i.file):void 0}}},y.parseTags=T,y.matchTags=E,y.compareTags=S,y.parseTuple=w,y.matchTuple=x,y.compareTuples=_,Ef}(),Uf.exports}function Bf(){if(Af)return Mf;Af=1;const e="Impossible case. Please create issue.",t="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",r="Unknow error on context randomization",i="Private Key is invalid",a="Public Key could not be parsed",s="Public Key serialization error",o="The sum of the public keys is not valid",c="Signature could not be parsed",u="The nonce generation function failed, or the private key was invalid",l="Public key could not be recover",p="Scalar was invalid (zero or overflow)";function d(e,t){if(!e)throw new Error(t)}function f(e,t,n){if(d(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==n)if(Array.isArray(n)){const r=`Expected ${e} to be an Uint8Array with length [${n.join(", ")}]`;d(n.includes(t.length),r)}else{const r=`Expected ${e} to be an Uint8Array with length ${n}`;d(t.length===n,r)}}function h(e){d("Boolean"===y(e),"Expected compressed to be a Boolean")}function m(e=e=>new Uint8Array(e),t){return"function"==typeof e&&(e=e(t)),f("output",e,t),e}function y(e){return Object.prototype.toString.call(e).slice(8,-1)}return Mf=g=>({contextRandomize(e){if(d(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&f("seed",e,32),1===g.contextRandomize(e))throw new Error(r)},privateKeyVerify:e=>(f("private key",e,32),0===g.privateKeyVerify(e)),privateKeyNegate(t){switch(f("private key",t,32),g.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(f("private key",e,32),f("tweak",n,32),g.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(t)}},privateKeyTweakMul(e,t){switch(f("private key",e,32),f("tweak",t,32),g.privateKeyTweakMul(e,t)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(f("public key",e,[33,65]),0===g.publicKeyVerify(e)),publicKeyCreate(e,t=!0,n){switch(f("private key",e,32),h(t),n=m(n,t?33:65),g.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(s)}},publicKeyConvert(e,t=!0,n){switch(f("public key",e,[33,65]),h(t),n=m(n,t?33:65),g.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(s)}},publicKeyNegate(t,n=!0,r){switch(f("public key",t,[33,65]),h(n),r=m(r,n?33:65),g.publicKeyNegate(r,t)){case 0:return r;case 1:throw new Error(a);case 2:throw new Error(e);case 3:throw new Error(s)}},publicKeyCombine(e,t=!0,n){d(Array.isArray(e),"Expected public keys to be an Array"),d(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)f("public key",t,[33,65]);switch(h(t),n=m(n,t?33:65),g.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(a);case 2:throw new Error(o);case 3:throw new Error(s)}},publicKeyTweakAdd(e,n,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",n,32),h(r),i=m(i,r?33:65),g.publicKeyTweakAdd(i,e,n)){case 0:return i;case 1:throw new Error(a);case 2:throw new Error(t)}},publicKeyTweakMul(e,t,r=!0,i){switch(f("public key",e,[33,65]),f("tweak",t,32),h(r),i=m(i,r?33:65),g.publicKeyTweakMul(i,e,t)){case 0:return i;case 1:throw new Error(a);case 2:throw new Error(n)}},signatureNormalize(e){switch(f("signature",e,64),g.signatureNormalize(e)){case 0:return e;case 1:throw new Error(c)}},signatureExport(t,n){f("signature",t,64);const r={output:n=m(n,72),outputlen:72};switch(g.signatureExport(r,t)){case 0:return n.slice(0,r.outputlen);case 1:throw new Error(c);case 2:throw new Error(e)}},signatureImport(t,n){switch(f("signature",t),n=m(n,64),g.signatureImport(n,t)){case 0:return n;case 1:throw new Error(c);case 2:throw new Error(e)}},ecdsaSign(t,n,r={},i){f("message",t,32),f("private key",n,32),d("Object"===y(r),"Expected options to be an Object"),void 0!==r.data&&f("options.data",r.data),void 0!==r.noncefn&&d("Function"===y(r.noncefn),"Expected options.noncefn to be a Function");const a={signature:i=m(i,64),recid:null};switch(g.ecdsaSign(a,t,n,r.data,r.noncefn)){case 0:return a;case 1:throw new Error(u);case 2:throw new Error(e)}},ecdsaVerify(e,t,n){switch(f("signature",e,64),f("message",t,32),f("public key",n,[33,65]),g.ecdsaVerify(e,t,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(c);case 2:throw new Error(a)}},ecdsaRecover(t,n,r,i=!0,a){switch(f("signature",t,64),d("Number"===y(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),f("message",r,32),h(i),a=m(a,i?33:65),g.ecdsaRecover(a,t,n,r)){case 0:return a;case 1:throw new Error(c);case 2:throw new Error(l);case 3:throw new Error(e)}},ecdh(e,t,n={},r){switch(f("public key",e,[33,65]),f("private key",t,32),d("Object"===y(n),"Expected options to be an Object"),void 0!==n.data&&f("options.data",n.data),void 0!==n.hashfn?(d("Function"===y(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&f("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&f("options.ybuf",n.ybuf,32),f("output",r)):r=m(r,32),g.ecdh(r,e,t,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return r;case 1:throw new Error(a);case 2:throw new Error(p)}}}),Mf}function Ff(){if(Nf)return If;Nf=1;const e=new(0,tf().ec)("secp256k1"),t=e.curve,n=t.n.constructor;function r(r){const i=r[0];switch(i){case 2:case 3:return 33!==r.length?null:function(r,i){let a=new n(i);if(a.cmp(t.p)>=0)return null;a=a.toRed(t.red);let s=a.redSqr().redIMul(a).redIAdd(t.b).redSqrt();3===r!==s.isOdd()&&(s=s.redNeg());const o=a.redSqr().redIMul(a);return s.redSqr().redISub(o.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:a,y:s}}):null}(i,r.subarray(1,33));case 4:case 6:case 7:return 65!==r.length?null:function(r,i,a){let s=new n(i),o=new n(a);if(s.cmp(t.p)>=0||o.cmp(t.p)>=0)return null;if(s=s.toRed(t.red),o=o.toRed(t.red),(6===r||7===r)&&o.isOdd()!==(7===r))return null;const c=s.redSqr().redIMul(s);return o.redSqr().redISub(c.redIAdd(t.b)).isZero()?e.keyPair({pub:{x:s,y:o}}):null}(i,r.subarray(1,33),r.subarray(33,65));default:return null}}function i(e,t){const n=t.encode(null,33===e.length);for(let t=0;t<e.length;++t)e[t]=n[t]}return If={contextRandomize:()=>0,privateKeyVerify(e){const r=new n(e);return r.cmp(t.n)<0&&!r.isZero()?0:1},privateKeyNegate(e){const r=new n(e),i=t.n.sub(r).umod(t.n).toArrayLike(Uint8Array,"be",32);return e.set(i),0},privateKeyTweakAdd(e,r){const i=new n(r);if(i.cmp(t.n)>=0)return 1;if(i.iadd(new n(e)),i.cmp(t.n)>=0&&i.isub(t.n),i.isZero())return 1;const a=i.toArrayLike(Uint8Array,"be",32);return e.set(a),0},privateKeyTweakMul(e,r){let i=new n(r);if(i.cmp(t.n)>=0||i.isZero())return 1;i.imul(new n(e)),i.cmp(t.n)>=0&&(i=i.umod(t.n));const a=i.toArrayLike(Uint8Array,"be",32);return e.set(a),0},publicKeyVerify:e=>null===r(e)?1:0,publicKeyCreate(r,a){const s=new n(a);if(s.cmp(t.n)>=0||s.isZero())return 1;return i(r,e.keyFromPrivate(a).getPublic()),0},publicKeyConvert(e,t){const n=r(t);if(null===n)return 1;return i(e,n.getPublic()),0},publicKeyNegate(e,t){const n=r(t);if(null===n)return 1;const a=n.getPublic();return a.y=a.y.redNeg(),i(e,a),0},publicKeyCombine(e,t){const n=new Array(t.length);for(let e=0;e<t.length;++e)if(n[e]=r(t[e]),null===n[e])return 1;let a=n[0].getPublic();for(let e=1;e<n.length;++e)a=a.add(n[e].pub);return a.isInfinity()?2:(i(e,a),0)},publicKeyTweakAdd(e,a,s){const o=r(a);if(null===o)return 1;if((s=new n(s)).cmp(t.n)>=0)return 2;const c=o.getPublic().add(t.g.mul(s));return c.isInfinity()?2:(i(e,c),0)},publicKeyTweakMul(e,a,s){const o=r(a);if(null===o)return 1;if((s=new n(s)).cmp(t.n)>=0||s.isZero())return 2;return i(e,o.getPublic().mul(s)),0},signatureNormalize(r){const i=new n(r.subarray(0,32)),a=new n(r.subarray(32,64));return i.cmp(t.n)>=0||a.cmp(t.n)>=0?1:(1===a.cmp(e.nh)&&r.set(t.n.sub(a).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(e,r){const i=r.subarray(0,32),a=r.subarray(32,64);if(new n(i).cmp(t.n)>=0)return 1;if(new n(a).cmp(t.n)>=0)return 1;const{output:s}=e;let o=s.subarray(4,37);o[0]=0,o.set(i,1);let c=33,u=0;for(;c>1&&0===o[u]&&!(128&o[u+1]);--c,++u);if(o=o.subarray(u),128&o[0])return 1;if(c>1&&0===o[0]&&!(128&o[1]))return 1;let l=s.subarray(39,72);l[0]=0,l.set(a,1);let p=33,d=0;for(;p>1&&0===l[d]&&!(128&l[d+1]);--p,++d);return l=l.subarray(d),128&l[0]||p>1&&0===l[0]&&!(128&l[1])?1:(e.outputlen=6+c+p,s[0]=48,s[1]=e.outputlen-2,s[2]=2,s[3]=o.length,s.set(o,4),s[4+c]=2,s[5+c]=l.length,s.set(l,6+c),0)},signatureImport(e,r){if(r.length<8)return 1;if(r.length>72)return 1;if(48!==r[0])return 1;if(r[1]!==r.length-2)return 1;if(2!==r[2])return 1;const i=r[3];if(0===i)return 1;if(5+i>=r.length)return 1;if(2!==r[4+i])return 1;const a=r[5+i];if(0===a)return 1;if(6+i+a!==r.length)return 1;if(128&r[4])return 1;if(i>1&&0===r[4]&&!(128&r[5]))return 1;if(128&r[i+6])return 1;if(a>1&&0===r[i+6]&&!(128&r[i+7]))return 1;let s=r.subarray(4,4+i);if(33===s.length&&0===s[0]&&(s=s.subarray(1)),s.length>32)return 1;let o=r.subarray(6+i);if(33===o.length&&0===o[0]&&(o=o.slice(1)),o.length>32)throw new Error("S length is too long");let c=new n(s);c.cmp(t.n)>=0&&(c=new n(0));let u=new n(r.subarray(6+i));return u.cmp(t.n)>=0&&(u=new n(0)),e.set(c.toArrayLike(Uint8Array,"be",32),0),e.set(u.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(r,i,a,s,o){if(o){const e=o;o=t=>{const r=e(i,a,null,s,t);if(!(r instanceof Uint8Array&&32===r.length))throw new Error("This is the way");return new n(r)}}const c=new n(a);if(c.cmp(t.n)>=0||c.isZero())return 1;let u;try{u=e.sign(i,a,{canonical:!0,k:o,pers:s})}catch(e){return 1}return r.signature.set(u.r.toArrayLike(Uint8Array,"be",32),0),r.signature.set(u.s.toArrayLike(Uint8Array,"be",32),32),r.recid=u.recoveryParam,0},ecdsaVerify(i,a,s){const o={r:i.subarray(0,32),s:i.subarray(32,64)},c=new n(o.r),u=new n(o.s);if(c.cmp(t.n)>=0||u.cmp(t.n)>=0)return 1;if(1===u.cmp(e.nh)||c.isZero()||u.isZero())return 3;const l=r(s);if(null===l)return 2;const p=l.getPublic();return e.verify(a,o,p)?0:3},ecdsaRecover(r,a,s,o){const c={r:a.slice(0,32),s:a.slice(32,64)},u=new n(c.r),l=new n(c.s);if(u.cmp(t.n)>=0||l.cmp(t.n)>=0)return 1;if(u.isZero()||l.isZero())return 2;let p;try{p=e.recoverPubKey(o,c,s)}catch(e){return 2}return i(r,p),0},ecdh(i,a,s,o,c,u,l){const p=r(a);if(null===p)return 1;const d=new n(s);if(d.cmp(t.n)>=0||d.isZero())return 2;const f=p.getPublic().mul(d);if(void 0===c){const t=f.encode(null,!0),n=e.hash().update(t).digest();for(let e=0;e<32;++e)i[e]=n[e]}else{u||(u=new Uint8Array(32));const e=f.getX().toArray("be",32);for(let t=0;t<32;++t)u[t]=e[t];l||(l=new Uint8Array(32));const t=f.getY().toArray("be",32);for(let e=0;e<32;++e)l[e]=t[e];const n=c(u,l,o);if(!(n instanceof Uint8Array&&n.length===i.length))return 2;i.set(n)}return 0}},If}function qf(){if(jf)return Df.exports;jf=1;try{Df.exports=function(){if(Rf)return Of;Rf=1;const e=zf()(__dirname);return Of=Bf()(new e.Secp256k1)}()}catch(e){Df.exports=Pf?Cf:(Pf=1,Cf=Bf()(Ff()))}return Df.exports}var Hf,Yf,Vf,Kf,Gf={};function Wf(){return Yf?Hf:(Yf=1,Hf=T.randomBytes)}function Jf(){if(Vf)return Gf;Vf=1,Object.defineProperty(Gf,"__esModule",{value:!0});var e=Wf();return Gf.getRandomBytes=function(t){return new Promise(function(n,r){e(t,function(e,t){e?r(e):n(t)})})},Gf.getRandomBytesSync=function(t){return e(t)},Gf}function Zf(){return Kf||(Kf=1,function(e){var t=$f&&$f.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,o)}c((r=r.apply(e,t||[])).next())})},n=$f&&$f.__generator||function(e,t){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var r=qf(),i=Jf();e.createPrivateKey=function(){return t(this,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return[4,i.getRandomBytes(32)];case 1:return e=t.sent(),r.privateKeyVerify(e)?[2,e]:[3,0];case 2:return[2]}})})},e.createPrivateKeySync=function(){for(;;){var e=i.getRandomBytesSync(32);if(r.privateKeyVerify(e))return e}},function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(qf())}($f)),$f}var Xf,Qf={};function eh(){if(Xf)return Qf;function e(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}Xf=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.isHexString=Qf.getKeys=Qf.fromAscii=Qf.fromUtf8=Qf.toAscii=Qf.arrayContainsArray=Qf.getBinarySize=Qf.padToEven=Qf.stripHexPrefix=Qf.isHexPrefixed=void 0,Qf.isHexPrefixed=e;function t(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}return Qf.stripHexPrefix=t=>{if("string"!=typeof t)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof t);return e(t)?t.slice(2):t},Qf.padToEven=t,Qf.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', recieved "+typeof e);return Buffer.byteLength(e,"utf8")},Qf.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[n?"some":"every"](t=>e.indexOf(t)>=0)},Qf.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},Qf.fromUtf8=function(e){return`0x${t(Buffer.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},Qf.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},Qf.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let a=e[i][t];if(n&&!a)a="";else if("string"!=typeof a)throw new Error("invalid abi - expected type 'string', received "+typeof a);r.push(a)}return r},Qf.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)},Qf}var th,nh,rh={},ih={};function ah(){if(th)return ih;th=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.assertIsString=ih.assertIsArray=ih.assertIsBuffer=ih.assertIsHexString=void 0;const e=eh();ih.assertIsHexString=function(t){if(!(0,e.isHexString)(t)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`)}};ih.assertIsBuffer=function(e){if(!Buffer.isBuffer(e)){throw new Error(`This method only supports Buffer but input was: ${e}`)}};ih.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};return ih.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}},ih}function sh(){return nh||(nh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToHex=e.bufferToInt=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=_f(),n=eh(),r=ah();e.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};e.intToBuffer=function(t){const r=(0,e.intToHex)(t);return Buffer.from((0,n.padToEven)(r.slice(2)),"hex")};e.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(t,n,r){const i=(0,e.zeros)(n);return r?t.length<n?(t.copy(i),i):t.slice(0,n):t.length<n?(t.copy(i,n-t.length),i):t.slice(-n)};e.setLengthLeft=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!1)};e.setLengthRight=function(e,t){return(0,r.assertIsBuffer)(e),i(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};e.unpadBuffer=function(e){return(0,r.assertIsBuffer)(e),a(e)};e.unpadArray=function(e){return(0,r.assertIsArray)(e),a(e)};e.unpadHexString=function(e){return(0,r.assertIsHexString)(e),e=(0,n.stripHexPrefix)(e),a(e)};e.toBuffer=function(r){if(null==r)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(r))return Buffer.from(r);if(Array.isArray(r)||r instanceof Uint8Array)return Buffer.from(r);if("string"==typeof r){if(!(0,n.isHexString)(r))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${r}`);return Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(r)),"hex")}if("number"==typeof r)return(0,e.intToBuffer)(r);if(t.BN.isBN(r)){if(r.isNeg())throw new Error(`Cannot convert negative BN to buffer. Given: ${r}`);return r.toArrayLike(Buffer)}if(r.toArray)return Buffer.from(r.toArray());if(r.toBuffer)return Buffer.from(r.toBuffer());throw new Error("invalid type")};e.bufferToInt=function(n){return new t.BN((0,e.toBuffer)(n)).toNumber()};e.bufferToHex=function(t){return"0x"+(t=(0,e.toBuffer)(t)).toString("hex")};e.fromSigned=function(e){return new t.BN(e).fromTwos(256)};e.toUnsigned=function(e){return Buffer.from(e.toTwos(256).toArray())};e.addHexPrefix=function(e){return"string"!=typeof e||(0,n.isHexPrefixed)(e)?e:"0x"+e};e.toUtf8=function(e){if((e=(0,n.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Buffer.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")};e.baToJSON=function(t){if(Buffer.isBuffer(t))return`0x${t.toString("hex")}`;if(t instanceof Array){const n=[];for(let r=0;r<t.length;r++)n.push((0,e.baToJSON)(t[r]));return n}};e.validateNoLeadingZeroes=function(e){for(const[t,n]of Object.entries(e))if(void 0!==n&&n.length>0&&0===n[0])throw new Error(`${t} cannot have leading zeroes, received: ${n.toString("hex")}`)},e.arrToBufArr=function e(t){return Array.isArray(t)?t.map(t=>e(t)):Buffer.from(t)},e.bufArrToArr=function e(t){return Array.isArray(t)?t.map(t=>e(t)):Uint8Array.from(null!=t?t:[])}}(rh)),rh}var oh,ch={},uh={},lh={};function ph(){if(oh)return lh;return oh=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.createHashFunction=function(e){return function(t){var n=e();return n.update(t),Buffer.from(n.digest())}},lh}var dh,fh,hh,mh,yh,gh,bh,vh,wh={exports:{}};function xh(){if(gh)return yh;gh=1;const e=function(){if(fh)return dh;fh=1;const{Transform:e}=Hi();return dh=t=>class n extends e{constructor(e,n,r,i,a){super(a),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=a,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},dh}(),t=function(){if(mh)return hh;mh=1;const{Transform:e}=Hi();return hh=t=>class n extends e{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(e,t,n){let r=null;try{this.update(e,t)}catch(e){r=e}n(r)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(e);return void 0!==t&&(n=n.toString(t)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}},hh}();return yh=function(n){const r=e(n),i=t(n);return function(e,t){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new r(1152,448,null,224,t);case"keccak256":return new r(1088,512,null,256,t);case"keccak384":return new r(832,768,null,384,t);case"keccak512":return new r(576,1024,null,512,t);case"sha3-224":return new r(1152,448,6,224,t);case"sha3-256":return new r(1088,512,6,256,t);case"sha3-384":return new r(832,768,6,384,t);case"sha3-512":return new r(576,1024,6,512,t);case"shake128":return new i(1344,256,31,t);case"shake256":return new i(1088,512,31,t);default:throw new Error("Invald algorithm: "+e)}}},yh}var _h,Th,Eh,Sh,kh,Mh,Ah,Oh,Rh,Ih,Nh={};function Ch(){if(Eh)return Th;Eh=1;const e=function(){if(_h)return Nh;_h=1;const e=[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];return Nh.p1600=function(t){for(let n=0;n<24;++n){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],a=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],o=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],u=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],p=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=p^(a<<1|s>>>31),h=d^(s<<1|a>>>31);const m=t[0]^f,y=t[1]^h,g=t[10]^f,b=t[11]^h,v=t[20]^f,w=t[21]^h,x=t[30]^f,_=t[31]^h,T=t[40]^f,E=t[41]^h;f=r^(o<<1|c>>>31),h=i^(c<<1|o>>>31);const S=t[2]^f,k=t[3]^h,M=t[12]^f,A=t[13]^h,O=t[22]^f,R=t[23]^h,I=t[32]^f,N=t[33]^h,C=t[42]^f,P=t[43]^h;f=a^(u<<1|l>>>31),h=s^(l<<1|u>>>31);const j=t[4]^f,L=t[5]^h,$=t[14]^f,D=t[15]^h,U=t[24]^f,z=t[25]^h,B=t[34]^f,F=t[35]^h,q=t[44]^f,H=t[45]^h;f=o^(p<<1|d>>>31),h=c^(d<<1|p>>>31);const Y=t[6]^f,V=t[7]^h,K=t[16]^f,G=t[17]^h,W=t[26]^f,J=t[27]^h,Z=t[36]^f,X=t[37]^h,Q=t[46]^f,ee=t[47]^h;f=u^(r<<1|i>>>31),h=l^(i<<1|r>>>31);const te=t[8]^f,ne=t[9]^h,re=t[18]^f,ie=t[19]^h,ae=t[28]^f,se=t[29]^h,oe=t[38]^f,ce=t[39]^h,ue=t[48]^f,le=t[49]^h,pe=m,de=y,fe=b<<4|g>>>28,he=g<<4|b>>>28,me=v<<3|w>>>29,ye=w<<3|v>>>29,ge=_<<9|x>>>23,be=x<<9|_>>>23,ve=T<<18|E>>>14,we=E<<18|T>>>14,xe=S<<1|k>>>31,_e=k<<1|S>>>31,Te=A<<12|M>>>20,Ee=M<<12|A>>>20,Se=O<<10|R>>>22,ke=R<<10|O>>>22,Me=N<<13|I>>>19,Ae=I<<13|N>>>19,Oe=C<<2|P>>>30,Re=P<<2|C>>>30,Ie=L<<30|j>>>2,Ne=j<<30|L>>>2,Ce=$<<6|D>>>26,Pe=D<<6|$>>>26,je=z<<11|U>>>21,Le=U<<11|z>>>21,$e=B<<15|F>>>17,De=F<<15|B>>>17,Ue=H<<29|q>>>3,ze=q<<29|H>>>3,Be=Y<<28|V>>>4,Fe=V<<28|Y>>>4,qe=G<<23|K>>>9,He=K<<23|G>>>9,Ye=W<<25|J>>>7,Ve=J<<25|W>>>7,Ke=Z<<21|X>>>11,Ge=X<<21|Z>>>11,We=ee<<24|Q>>>8,Je=Q<<24|ee>>>8,Ze=te<<27|ne>>>5,Xe=ne<<27|te>>>5,Qe=re<<20|ie>>>12,et=ie<<20|re>>>12,tt=se<<7|ae>>>25,nt=ae<<7|se>>>25,rt=oe<<8|ce>>>24,it=ce<<8|oe>>>24,at=ue<<14|le>>>18,st=le<<14|ue>>>18;t[0]=pe^~Te&je,t[1]=de^~Ee&Le,t[10]=Be^~Qe&me,t[11]=Fe^~et&ye,t[20]=xe^~Ce&Ye,t[21]=_e^~Pe&Ve,t[30]=Ze^~fe&Se,t[31]=Xe^~he&ke,t[40]=Ie^~qe&tt,t[41]=Ne^~He&nt,t[2]=Te^~je&Ke,t[3]=Ee^~Le&Ge,t[12]=Qe^~me&Me,t[13]=et^~ye&Ae,t[22]=Ce^~Ye&rt,t[23]=Pe^~Ve&it,t[32]=fe^~Se&$e,t[33]=he^~ke&De,t[42]=qe^~tt&ge,t[43]=He^~nt&be,t[4]=je^~Ke&at,t[5]=Le^~Ge&st,t[14]=me^~Me&Ue,t[15]=ye^~Ae&ze,t[24]=Ye^~rt&ve,t[25]=Ve^~it&we,t[34]=Se^~$e&We,t[35]=ke^~De&Je,t[44]=tt^~ge&Oe,t[45]=nt^~be&Re,t[6]=Ke^~at&pe,t[7]=Ge^~st&de,t[16]=Me^~Ue&Be,t[17]=Ae^~ze&Fe,t[26]=rt^~ve&xe,t[27]=it^~we&_e,t[36]=$e^~We&Ze,t[37]=De^~Je&Xe,t[46]=ge^~Oe&Ie,t[47]=be^~Re&Ne,t[8]=at^~pe&Te,t[9]=st^~de&Ee,t[18]=Ue^~Be&Qe,t[19]=ze^~Fe&et,t[28]=ve^~xe&Ce,t[29]=we^~_e&Pe,t[38]=We^~Ze&fe,t[39]=Je^~Xe&he,t[48]=Oe^~Ie&qe,t[49]=Re^~Ne&He,t[0]^=e[2*n],t[1]^=e[2*n+1]}},Nh}();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(t){for(let n=0;n<t.length;++n)this.state[~~(this.count/4)]^=t[n]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,128&t&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(t);for(let r=0;r<t;++r)n[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Th=t}function Ph(){if(Mh)return wh.exports;Mh=1;try{wh.exports=function(){if(vh)return bh;vh=1;const e=zf()(__dirname);if("function"!=typeof e)throw new Error("Native add-on failed to load");return bh=xh()(e)}()}catch(e){wh.exports=kh?Sh:(kh=1,Sh=xh()(Ch()))}return wh.exports}function jh(){if(Ah)return uh;Ah=1,Object.defineProperty(uh,"__esModule",{value:!0});var e=ph(),t=Ph();return uh.keccak224=e.createHashFunction(function(){return t("keccak224")}),uh.keccak256=e.createHashFunction(function(){return t("keccak256")}),uh.keccak384=e.createHashFunction(function(){return t("keccak384")}),uh.keccak512=e.createHashFunction(function(){return t("keccak512")}),uh}function Lh(){return Rh?Oh:(Rh=1,Oh=T.createHash)}function $h(){return Ih||(Ih=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rlphash=e.ripemd160FromArray=e.ripemd160FromString=e.ripemd160=e.sha256FromArray=e.sha256FromString=e.sha256=e.keccakFromArray=e.keccakFromHexString=e.keccakFromString=e.keccak256=e.keccak=void 0;const t=jh(),n=Lh(),r=_f(),i=sh(),a=ah();e.keccak=function(e,n=256){switch((0,a.assertIsBuffer)(e),n){case 224:return(0,t.keccak224)(e);case 256:return(0,t.keccak256)(e);case 384:return(0,t.keccak384)(e);case 512:return(0,t.keccak512)(e);default:throw new Error(`Invald algorithm: keccak${n}`)}};e.keccak256=function(t){return(0,e.keccak)(t)};e.keccakFromString=function(t,n=256){(0,a.assertIsString)(t);const r=Buffer.from(t,"utf8");return(0,e.keccak)(r,n)};e.keccakFromHexString=function(t,n=256){return(0,a.assertIsHexString)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};e.keccakFromArray=function(t,n=256){return(0,a.assertIsArray)(t),(0,e.keccak)((0,i.toBuffer)(t),n)};const s=function(e){return e=(0,i.toBuffer)(e),n("sha256").update(e).digest()};e.sha256=function(e){return(0,a.assertIsBuffer)(e),s(e)};e.sha256FromString=function(e){return(0,a.assertIsString)(e),s(e)};e.sha256FromArray=function(e){return(0,a.assertIsArray)(e),s(e)};const o=function(e,t){e=(0,i.toBuffer)(e);const r=n("rmd160").update(e).digest();return!0===t?(0,i.setLengthLeft)(r,32):r};e.ripemd160=function(e,t){return(0,a.assertIsBuffer)(e),o(e,t)};e.ripemd160FromString=function(e,t){return(0,a.assertIsString)(e),o(e,t)};e.ripemd160FromArray=function(e,t){return(0,a.assertIsArray)(e),o(e,t)};e.rlphash=function(t){return(0,e.keccak)(r.rlp.encode(t))}}(ch)),ch}var Dh,Uh,zh={};function Bh(){return Dh||(Dh=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=e.bnToRlp=e.bnToUnpaddedBuffer=e.bnToHex=void 0;const t=_f(),n=eh(),r=sh();function i(e){return(0,r.unpadBuffer)(e.toArrayLike(Buffer))}var a;e.bnToHex=function(e){return`0x${e.toString(16)}`},e.bnToUnpaddedBuffer=i,e.bnToRlp=function(e){return i(e)},function(e){e[e.Number=0]="Number",e[e.BN=1]="BN",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(a=e.TypeOutput||(e.TypeOutput={})),e.toType=function(e,i){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,n.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const s=(0,r.toBuffer)(e);if(i===a.Buffer)return s;if(i===a.BN)return new t.BN(s);if(i===a.Number){const e=new t.BN(s),n=new t.BN(Number.MAX_SAFE_INTEGER.toString());if(e.gt(n))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return e.toNumber()}return`0x${s.toString("hex")}`}}(zh)),zh}function Fh(){return Uh||(Uh=1,function(e){var t=Lf&&Lf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const n=t(M),r=_f(),i=Zf(),a=eh(),s=Tf(),o=sh(),c=$h(),u=ah(),l=Bh();class p{constructor(e=new r.BN(0),t=new r.BN(0),n=s.KECCAK256_RLP,i=s.KECCAK256_NULL){this.nonce=e,this.balance=t,this.stateRoot=n,this.codeHash=i,this._validate()}static fromAccountData(e){const{nonce:t,balance:n,stateRoot:i,codeHash:a}=e;return new p(t?new r.BN((0,o.toBuffer)(t)):void 0,n?new r.BN((0,o.toBuffer)(n)):void 0,i?(0,o.toBuffer)(i):void 0,a?(0,o.toBuffer)(a):void 0)}static fromRlpSerializedAccount(e){const t=r.rlp.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,n,i,a]=e;return new p(new r.BN(t),new r.BN(n),i,a)}_validate(){if(this.nonce.lt(new r.BN(0)))throw new Error("nonce must be greater than zero");if(this.balance.lt(new r.BN(0)))throw new Error("balance must be greater than zero");if(32!==this.stateRoot.length)throw new Error("stateRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,l.bnToUnpaddedBuffer)(this.nonce),(0,l.bnToUnpaddedBuffer)(this.balance),this.stateRoot,this.codeHash]}serialize(){return r.rlp.encode(this.raw())}isContract(){return!this.codeHash.equals(s.KECCAK256_NULL)}isEmpty(){return this.balance.isZero()&&this.nonce.isZero()&&this.codeHash.equals(s.KECCAK256_NULL)}}e.Account=p;e.isValidAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};e.toChecksumAddress=function(e,t){(0,u.assertIsHexString)(e);const n=(0,a.stripHexPrefix)(e).toLowerCase();let r="";if(t){r=(0,l.toType)(t,l.TypeOutput.BN).toString()+"0x"}const i=(0,c.keccakFromString)(r+n).toString("hex");let s="0x";for(let e=0;e<n.length;e++)parseInt(i[e],16)>=8?s+=n[e].toUpperCase():s+=n[e];return s};e.isValidChecksumAddress=function(t,n){return(0,e.isValidAddress)(t)&&(0,e.toChecksumAddress)(t,n)===t};e.generateAddress=function(e,t){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t);const n=new r.BN(t);return n.isZero()?(0,c.rlphash)([e,null]).slice(-20):(0,c.rlphash)([e,Buffer.from(n.toArray())]).slice(-20)};e.generateAddress2=function(e,t,r){(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),(0,n.default)(20===e.length),(0,n.default)(32===t.length);return(0,c.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,c.keccak256)(r)])).slice(-20)};e.isValidPrivate=function(e){return(0,i.privateKeyVerify)(e)};e.isValidPublic=function(e,t=!1){return(0,u.assertIsBuffer)(e),64===e.length?(0,i.publicKeyVerify)(Buffer.concat([Buffer.from([4]),e])):!!t&&(0,i.publicKeyVerify)(e)};e.pubToAddress=function(e,t=!1){return(0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),(0,n.default)(64===e.length),(0,c.keccak)(e).slice(-20)},e.publicToAddress=e.pubToAddress;e.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from((0,i.publicKeyCreate)(e,!1)).slice(1)};e.privateToAddress=function(t){return(0,e.publicToAddress)((0,e.privateToPublic)(t))};e.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from((0,i.publicKeyConvert)(e,!1).slice(1))),e};e.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bufferToHex)(e)};e.isZeroAddress=function(t){try{(0,u.assertIsString)(t)}catch(e){return!1}return(0,e.zeroAddress)()===t}}(Lf)),Lf}var qh,Hh={};var Yh,Vh={};var Kh,Gh,Wh={};var Jh,Zh,Xh,Qh,em,tm=(Gh||(Gh=1,function(e){var t=pf&&pf.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=pf&&pf.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.isHexString=e.getKeys=e.fromAscii=e.fromUtf8=e.toAscii=e.arrayContainsArray=e.getBinarySize=e.padToEven=e.stripHexPrefix=e.isHexPrefixed=void 0,n(Tf(),e),n(Fh(),e),n(function(){if(qh)return Hh;qh=1;var e=Hh&&Hh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.Address=void 0;const t=e(M),n=_f(),r=sh(),i=Fh();class a{constructor(e){(0,t.default)(20===e.length,"Invalid address length"),this.buf=e}static zero(){return new a((0,r.zeros)(20))}static fromString(e){return(0,t.default)((0,i.isValidAddress)(e),"Invalid address"),new a((0,r.toBuffer)(e))}static fromPublicKey(e){(0,t.default)(Buffer.isBuffer(e),"Public key should be Buffer");const n=(0,i.pubToAddress)(e);return new a(n)}static fromPrivateKey(e){(0,t.default)(Buffer.isBuffer(e),"Private key should be Buffer");const n=(0,i.privateToAddress)(e);return new a(n)}static generate(e,r){return(0,t.default)(n.BN.isBN(r)),new a((0,i.generateAddress)(e.buf,r.toArrayLike(Buffer)))}static generate2(e,n,r){return(0,t.default)(Buffer.isBuffer(n)),(0,t.default)(Buffer.isBuffer(r)),new a((0,i.generateAddress2)(e.buf,n,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(a.zero())}isPrecompileOrSystemAddress(){const e=new n.BN(this.buf),t=new n.BN(0),r=new n.BN("ffff","hex");return e.gte(t)&&e.lte(r)}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}return Hh.Address=a,Hh}(),e),n($h(),e),n(function(){if(Yh)return Vh;Yh=1,Object.defineProperty(Vh,"__esModule",{value:!0}),Vh.hashPersonalMessage=Vh.isValidSignature=Vh.fromRpcSig=Vh.toCompactSig=Vh.toRpcSig=Vh.ecrecover=Vh.ecsign=void 0;const e=Zf(),t=_f(),n=sh(),r=$h(),i=ah(),a=Bh();function s(e,t){const n=(0,a.toType)(e,a.TypeOutput.BN);if(n.eqn(0)||n.eqn(1))return(0,a.toType)(e,a.TypeOutput.BN);if(!t)return n.subn(27);const r=(0,a.toType)(t,a.TypeOutput.BN);return n.sub(r.muln(2).addn(35))}function o(e){const n=new t.BN(e);return n.eqn(0)||n.eqn(1)}return Vh.ecsign=function(t,n,r){const{signature:i,recid:s}=(0,e.ecdsaSign)(t,n),o=Buffer.from(i.slice(0,32)),c=Buffer.from(i.slice(32,64));if(!r||"number"==typeof r){if(r&&!Number.isSafeInteger(r))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");return{r:o,s:c,v:r?s+(2*r+35):s+27}}return{r:o,s:c,v:(0,a.toType)(r,a.TypeOutput.BN).muln(2).addn(35).addn(s).toArrayLike(Buffer)}},Vh.ecrecover=function(t,r,i,a,c){const u=Buffer.concat([(0,n.setLengthLeft)(i,32),(0,n.setLengthLeft)(a,32)],64),l=s(r,c);if(!o(l))throw new Error("Invalid signature v value");const p=(0,e.ecdsaRecover)(u,l.toNumber(),t);return Buffer.from((0,e.publicKeyConvert)(p,!1).slice(1))},Vh.toRpcSig=function(e,t,r,i){if(!o(s(e,i)))throw new Error("Invalid signature v value");return(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(r,32),(0,n.toBuffer)(e)]))},Vh.toCompactSig=function(e,t,r,i){if(!o(s(e,i)))throw new Error("Invalid signature v value");const c=(0,a.toType)(e,a.TypeOutput.Number);let u=r;return(c>28&&c%2==1||1===c||28===c)&&(u=Buffer.from(r),u[0]|=128),(0,n.bufferToHex)(Buffer.concat([(0,n.setLengthLeft)(t,32),(0,n.setLengthLeft)(u,32)]))},Vh.fromRpcSig=function(e){const t=(0,n.toBuffer)(e);let r,i,a;if(t.length>=65)r=t.slice(0,32),i=t.slice(32,64),a=(0,n.bufferToInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),i=t.slice(32,64),a=(0,n.bufferToInt)(t.slice(32,33))>>7,i[0]&=127}return a<27&&(a+=27),{v:a,r:r,s:i}},Vh.isValidSignature=function(e,n,r,i=!0,a){const c=new t.BN("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),u=new t.BN("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==n.length||32!==r.length)return!1;if(!o(s(e,a)))return!1;const l=new t.BN(n),p=new t.BN(r);return!(l.isZero()||l.gt(u)||p.isZero()||p.gt(u)||i&&1===p.cmp(c))},Vh.hashPersonalMessage=function(e){(0,i.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return(0,r.keccak)(Buffer.concat([t,e]))},Vh}(),e),n(sh(),e),n(function(){if(Kh)return Wh;Kh=1;var e=Wh&&Wh.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wh,"__esModule",{value:!0}),Wh.defineProperties=void 0;const t=e(M),n=eh(),r=_f(),i=sh();return Wh.defineProperties=function(e,a,s){if(e.raw=[],e._fields=[],e.toJSON=function(t=!1){if(t){const t={};return e._fields.forEach(n=>{t[n]=`0x${e[n].toString("hex")}`}),t}return(0,i.baToJSON)(e.raw)},e.serialize=function(){return r.rlp.encode(e.raw)},a.forEach((n,r)=>{function a(){return e.raw[r]}function s(a){"00"!==(a=(0,i.toBuffer)(a)).toString("hex")||n.allowZero||(a=Buffer.allocUnsafe(0)),n.allowLess&&n.length?(a=(0,i.unpadBuffer)(a),(0,t.default)(n.length>=a.length,`The field ${n.name} must not have more ${n.length} bytes`)):n.allowZero&&0===a.length||!n.length||(0,t.default)(n.length===a.length,`The field ${n.name} must have byte length of ${n.length}`),e.raw[r]=a}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:a,set:s}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:s,get:a})}),s)if("string"==typeof s&&(s=Buffer.from((0,n.stripHexPrefix)(s),"hex")),Buffer.isBuffer(s)&&(s=r.rlp.decode(s)),Array.isArray(s)){if(s.length>e._fields.length)throw new Error("wrong number of fields in data");s.forEach((t,n)=>{e[e._fields[n]]=(0,i.toBuffer)(t)})}else{if("object"!=typeof s)throw new Error("invalid data");{const t=Object.keys(s);a.forEach(n=>{-1!==t.indexOf(n.name)&&(e[n.name]=s[n.name]),-1!==t.indexOf(n.alias)&&(e[n.alias]=s[n.alias])})}}},Wh}(),e),n(_f(),e),n(Bh(),e);var r=eh();Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return r.isHexPrefixed}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return r.stripHexPrefix}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return r.padToEven}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return r.getBinarySize}}),Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return r.arrayContainsArray}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return r.toAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return r.fromUtf8}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return r.fromAscii}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return r.getKeys}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return r.isHexString}})}(pf)),pf);class nm{static hash(e){const t=Buffer.from(e,"utf8");return tm.keccak256(t)}static hashRandomBits(e){if(!this.isValidSHA256(e.blockHash.replace("0x",""))||e.taskRequesterTimestamp<=0||e.dispatcherTimestamp<=0)throw`Invalid inputs for hashRandomBits:\n blockHash: ${e.blockHash},\n taskRequesterTimestamp: ${e.taskRequesterTimestamp},\n dispatcherTimestamp: ${e.dispatcherTimestamp}\n `;const t=e.taskRequesterTimestamp.toString()+e.dispatcherTimestamp.toString()+e.blockHash,n=Buffer.from(t,"utf8");return tm.keccak256(n)}static hashMessage(e={}){let t=JSON.parse(JSON.stringify(e));t.payload&&(t=t.payload),delete t.type,delete t.msgHash,delete t.signature;const n=Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}),r=Buffer.from(JSON.stringify(n),"utf-8");return tm.keccak256(r)}static computeFileSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static computeStringSHA256(e){const t=_.createHash("sha256");return t.update(e),t.digest("hex")}static isValidSHA256(e){return/^[a-f0-9]{64}$/gi.test(e)}}class rm{static sign(e,t){const n=tm.toBuffer("0x"+t);if(!tm.isValidPrivate(n))throw"Invalid private key when trying to sign msg";return tm.ecsign(e,n)}static getAddressFromPrivateKey(e){const t=tm.toBuffer("0x"+e);if(!tm.isValidPrivate(t))throw"Invalid private key when trying to get the address";const n=tm.privateToPublic(t);return"0x"+tm.pubToAddress(n).toString("hex")}static verifySignature(e,t,n){const r=tm.ecrecover(e,t.v,t.r,t.s);return"0x"+tm.pubToAddress(r).toString("hex").toLowerCase()===n.toLowerCase()}static serializeSignature(e){return JSON.stringify({v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")})}static deserializeSignature(e){const t=JSON.parse(e);return{v:t.v,r:Buffer.from(t.r,"hex"),s:Buffer.from(t.s,"hex")}}static ECDSASignatureToHex(e){return{v:e.v,r:e.r.toString("hex"),s:e.s.toString("hex")}}static SignatureHexToECDSA(e){return{v:e.v,r:Buffer.from(e.r,"hex"),s:Buffer.from(e.s,"hex")}}static isValidSignature(e){const t=rm.SignatureHexToECDSA(e);return tm.isValidSignature(t.v,t.r,t.s)}static generateAddress(){const e=function(){let e=uf(32);for(;!cf(e);)e=uf(32);return e}(),t=tm.privateToPublic(e),n=function(e){return of(32===e.length,"Bad private key"),of(cf(e),"Bad private key"),Buffer.from(nf.keyFromPrivate(e).getPublic("array"))}(e),r=tm.pubToAddress(t),i=tm.bufferToHex(e).replace("0x",""),a=tm.bufferToHex(n).replace("0x","");return{addressHex:tm.bufferToHex(r),privateKeyHex:i,publicKeyHex:a}}static createSignedBody(e,t,n){!e.walletAddress&&n&&(e.walletAddress=n);const r=nm.hashMessage(e);let i;i="0"===t[0]&&"x"===t[1]?t.slice(2):t;const a=rm.sign(r,i);return e.signature=rm.ECDSASignatureToHex(a),e}}!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(Jh||(Jh={}));class im{constructor(){}}class am extends im{async build(e,n){const r=i.join(process.cwd(),e,"main.js");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/main.js`))}}class sm extends im{async build(e,n){const r=i.join(process.cwd(),e,"task.py");if(!t.existsSync(r))throw`File doesn't exist: ${r} `;t.copyFileSync(r,i.join(process.cwd(),`${n}/task.py`))}}class om extends im{async build(e,n){const r=i.join(process.cwd(),e),a=i.join(r,"task.wasm");if(t.existsSync(a)&&t.rmSync(a),await new Promise((e,t)=>{I(`cd ${r} && sh compile.sh`,(n,r,i)=>{n&&t(i),e(r)})}),!t.existsSync(a))throw`File doesn't exist: ${a}`;t.copyFileSync(a,i.join(process.cwd(),`${n}/task.wasm`))}}class cm extends im{async build(e,n){await new Promise((t,n)=>{I("rustc --version",(r,a,s)=>{r&&n(`Rust ${s.split("error: ")[1]}`);const o=a.split(" ")[1];"1.81.0"!==o?n(`Rust version detected is: ${o}. Version must be 1.81`):I(`cargo build --manifest-path ${i.join(process.cwd(),e,"Cargo.toml")} --target wasm32-wasip1`,(e,r,i)=>{e&&n(`Cargo ${i.split("error: ")[1]}`),t(r)})})});const r=e.split("/"),a=r[r.length-1]||r[r.length-2];if(!t.existsSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`)))throw`File doesn't exist: ${i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`)}. Please check that your Cargo.toml file has the same name of the directory of the task. `;t.copyFileSync(i.join(process.cwd(),e,`/target/wasm32-wasip1/debug/${a}.wasm`),i.join(process.cwd(),`${n}/task.wasm`))}}class um extends im{async build(e,n){const r=i.join(process.cwd(),e);if(!t.existsSync(r))throw`File doesn't exist: ${r}`;try{const e=t.readFileSync(r,"utf-8"),[n,i,a]=await N(JSON.parse(e),{fullResult:!0});if(void 0!==i)throw console.error(i),new Error(i);void 0!==a&&console.warn(a),void 0!==n&&console.log("OpenAPI manifest is valid!")}catch{throw"Error validating OpenAPI manifest"}t.copyFileSync(r,i.join(process.cwd(),`${n}/manifest.json`))}}class lm{static createBuild(e){switch(e){case so.RUST:return new cm;case so.C:return new om;case so.JS:return new am;case oo.API:return new um;case so.PYTHON:return new sm;default:throw"Invalid language"}}}function pm(){if(em)return Qh;em=1;var e=s,t=p.Stream,n=function(){if(Xh)return Zh;Xh=1;var e=p.Stream;function t(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}return Zh=t,s.inherits(t,e),t.create=function(e,t){var n=new this;for(var r in t=t||{})n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n},Object.defineProperty(t.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}}),t.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)},t.prototype.resume=function(){this._released||this.release(),this.source.resume()},t.prototype.pause=function(){this.source.pause()},t.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]},t.prototype.pipe=function(){var t=e.prototype.pipe.apply(this,arguments);return this.resume(),t},t.prototype._handleEmit=function(e){this._released?this.emit.apply(this,e):("data"===e[0]&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e))},t.prototype._checkIfMaxDataSizeExceeded=function(){if(!(this._maxDataSizeExceeded||this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},Zh}();function r(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2097152,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}return Qh=r,e.inherits(r,t),r.create=function(e){var t=new this;for(var n in e=e||{})t[n]=e[n];return t},r.isStreamLike=function(e){return"function"!=typeof e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e&&!Buffer.isBuffer(e)},r.prototype.append=function(e){if(r.isStreamLike(e)){if(!(e instanceof n)){var t=n.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this},r.prototype.pipe=function(e,n){return t.prototype.pipe.call(this,e,n),this.resume(),e},r.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop)this._pendingNext=!0;else{this._insideLoop=!0;try{do{this._pendingNext=!1,this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=!1}}},r.prototype._realGetNext=function(){var e=this._streams.shift();void 0!==e?"function"==typeof e?e(function(e){r.isStreamLike(e)&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e)}.bind(this)):this._pipeNext(e):this.end()},r.prototype._pipeNext=function(e){if(this._currentStream=e,r.isStreamLike(e))return e.on("end",this._getNext.bind(this)),void e.pipe(this,{end:!1});var t=e;this.write(t),this._getNext()},r.prototype._handleErrors=function(e){var t=this;e.on("error",function(e){t._emitError(e)})},r.prototype.write=function(e){this.emit("data",e)},r.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.pause&&this._currentStream.pause(),this.emit("pause"))},r.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&"function"==typeof this._currentStream.resume&&this._currentStream.resume(),this.emit("resume")},r.prototype.end=function(){this._reset(),this.emit("end")},r.prototype.destroy=function(){this._reset(),this.emit("close")},r.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null},r.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}},r.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)},r.prototype._emitError=function(e){this._reset(),this.emit("error",e)},Qh}var dm,fm,hm,mm,ym,gm,bm,vm,wm,xm,_m,Tm,Em,Sm,km,Mm,Am,Om={},Rm={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}};function Im(){return hm||(hm=1,function(e){var t=fm?dm:(fm=1,dm=Rm),n=a.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,i=/^text\//i;function s(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),a=n&&t[n[1].toLowerCase()];return a&&a.charset?a.charset:!(!n||!i.test(n[1]))&&"UTF-8"}e.charset=s,e.charsets={lookup:s},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var r=e.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=r.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var r=n("x."+t).toLowerCase().substr(1);if(!r)return!1;return e.types[r]||!1},e.types=Object.create(null),function(e,n){var r=["nginx","apache",void 0,"iana"];Object.keys(t).forEach(function(i){var a=t[i],s=a.extensions;if(s&&s.length){e[i]=s;for(var o=0;o<s.length;o++){var c=s[o];if(n[c]){var u=r.indexOf(t[n[c]].source),l=r.indexOf(a.source);if("application/octet-stream"!==n[c]&&(u>l||u===l&&"application/"===n[c].substr(0,12)))continue}n[c]=i}}})}(e.extensions,e.types)}(Om)),Om}function Nm(){if(bm)return gm;bm=1;var e=ym?mm:(ym=1,mm=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)});return gm=function(t){var n=!1;return e(function(){n=!0}),function(r,i){n?t(r,i):e(function(){t(r,i)})}}}function Cm(){if(wm)return vm;function e(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}return wm=1,vm=function(t){Object.keys(t.jobs).forEach(e.bind(t)),t.jobs={}},vm}function Pm(){if(_m)return xm;_m=1;var e=Nm(),t=Cm();return xm=function(n,r,i,a){var s=i.keyedList?i.keyedList[i.index]:i.index;i.jobs[s]=function(t,n,r,i){var a;a=2==t.length?t(r,e(i)):t(r,n,e(i));return a}(r,s,n[s],function(e,n){s in i.jobs&&(delete i.jobs[s],e?t(i):i.results[s]=n,a(e,i.results))})},xm}function jm(){if(Em)return Tm;return Em=1,Tm=function(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&r.keyedList.sort(n?t:function(n,r){return t(e[n],e[r])});return r}}function Lm(){if(km)return Sm;km=1;var e=Cm(),t=Nm();return Sm=function(n){if(!Object.keys(this.jobs).length)return;this.index=this.size,e(this),t(n)(null,this.results)}}function $m(){if(Am)return Mm;Am=1;var e=Pm(),t=jm(),n=Lm();return Mm=function(r,i,a){var s=t(r);for(;s.index<(s.keyedList||r).length;)e(r,i,s,function(e,t){e?a(e,t):0!==Object.keys(s.jobs).length||a(null,s.results)}),s.index++;return n.bind(s,a)},Mm}var Dm,Um,zm,Bm,Fm,qm,Hm,Ym,Vm,Km,Gm,Wm,Jm,Zm,Xm,Qm,ey,ty,ny,ry,iy,ay,sy,oy,cy,uy,ly,py,dy,fy,hy,my,yy,gy,by,vy,wy,xy,_y,Ty,Ey,Sy,ky,My,Ay,Oy,Ry,Iy,Ny,Cy,Py,jy,Ly,$y,Dy,Uy,zy,By,Fy,qy,Hy,Yy,Vy,Ky,Gy,Wy,Jy,Zy,Xy,Qy,eg,tg,ng,rg,ig,ag,sg,og,cg,ug,lg,pg={exports:{}};function dg(){if(Dm)return pg.exports;Dm=1;var e=Pm(),t=jm(),n=Lm();function r(e,t){return e<t?-1:e>t?1:0}return pg.exports=function(r,i,a,s){var o=t(r,a);return e(r,i,o,function t(n,a){n?s(n,a):(o.index++,o.index<(o.keyedList||r).length?e(r,i,o,t):s(null,o.results))}),n.bind(o,s)},pg.exports.ascending=r,pg.exports.descending=function(e,t){return-1*r(e,t)},pg.exports}function fg(){if(zm)return Um;zm=1;var e=dg();return Um=function(t,n,r){return e(t,n,null,r)},Um}function hg(){return Fm?Bm:(Fm=1,Bm={parallel:$m(),serial:fg(),serialOrdered:dg()})}function mg(){return Hm?qm:(Hm=1,qm=Object)}function yg(){return Vm?Ym:(Vm=1,Ym=Error)}function gg(){return Gm?Km:(Gm=1,Km=EvalError)}function bg(){return Jm?Wm:(Jm=1,Wm=RangeError)}function vg(){return Xm?Zm:(Xm=1,Zm=ReferenceError)}function wg(){return ey?Qm:(ey=1,Qm=SyntaxError)}function xg(){return ny?ty:(ny=1,ty=TypeError)}function _g(){return iy?ry:(iy=1,ry=URIError)}function Tg(){return sy?ay:(sy=1,ay=Math.abs)}function Eg(){return cy?oy:(cy=1,oy=Math.floor)}function Sg(){return ly?uy:(ly=1,uy=Math.max)}function kg(){return dy?py:(dy=1,py=Math.min)}function Mg(){return hy?fy:(hy=1,fy=Math.pow)}function Ag(){return yy?my:(yy=1,my=Math.round)}function Og(){return by?gy:(by=1,gy=Number.isNaN||function(e){return e!=e})}function Rg(){if(wy)return vy;wy=1;var e=Og();return vy=function(t){return e(t)||0===t?t:t<0?-1:1}}function Ig(){return _y?xy:(_y=1,xy=Object.getOwnPropertyDescriptor)}function Ng(){if(Ey)return Ty;Ey=1;var e=Ig();if(e)try{e([],"length")}catch(t){e=null}return Ty=e}function Cg(){if(ky)return Sy;ky=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}return Sy=e}function Pg(){return Ay?My:(Ay=1,My=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=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(n))return!1;for(var r 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 i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0})}function jg(){if(Ry)return Oy;Ry=1;var e="undefined"!=typeof Symbol&&Symbol,t=Pg();return Oy=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function Lg(){return Ny?Iy:(Ny=1,Iy="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function $g(){return Py?Cy:(Py=1,Cy=mg().getPrototypeOf||null)}function Dg(){if(Ly)return jy;Ly=1;var e=Object.prototype.toString,t=Math.max,n=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n};return jy=function(r){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var a,s=function(e,t){for(var n=[],r=t,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n}(arguments,1),o=t(0,i.length-s.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(a=Function("binder","return function ("+function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n}(c,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(r,n(s,arguments))}),i.prototype){var l=function(){};l.prototype=i.prototype,a.prototype=new l,l.prototype=null}return a},jy}function Ug(){if(Dy)return $y;Dy=1;var e=Dg();return $y=Function.prototype.bind||e}function zg(){return zy?Uy:(zy=1,Uy=Function.prototype.call)}function Bg(){return Fy?By:(Fy=1,By=Function.prototype.apply)}function Fg(){if(Vy)return Yy;Vy=1;var e=Ug(),t=Bg(),n=zg(),r=Hy?qy:(Hy=1,qy="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Yy=r||e.call(n,t)}function qg(){if(Jy)return Wy;Jy=1;var e,t=function(){if(Gy)return Ky;Gy=1;var e=Ug(),t=xg(),n=zg(),r=Fg();return Ky=function(i){if(i.length<1||"function"!=typeof i[0])throw new t("a function is required");return r(e,n,i)}}(),n=Ng();try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var r=!!e&&n&&n(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Wy=r&&"function"==typeof r.get?t([r.get]):"function"==typeof a&&function(e){return a(null==e?e:i(e))}}function Hg(){if(Xy)return Zy;Xy=1;var e=Lg(),t=$g(),n=qg();return Zy=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function Yg(){if(eg)return Qy;eg=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Ug();return Qy=n.call(e,t)}function Vg(){if(ng)return tg;var e;ng=1;var t=mg(),n=yg(),r=gg(),i=bg(),a=vg(),s=wg(),o=xg(),c=_g(),u=Tg(),l=Eg(),p=Sg(),d=kg(),f=Mg(),h=Ag(),m=Rg(),y=Function,g=function(e){try{return y('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=Ng(),v=Cg(),w=function(){throw new o},x=b?function(){try{return w}catch(e){try{return b(arguments,"callee").get}catch(e){return w}}}():w,_=jg()(),T=Hg(),E=$g(),S=Lg(),k=Bg(),M=zg(),A={},O="undefined"!=typeof Uint8Array&&T?T(Uint8Array):e,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":"undefined"==typeof Atomics?e:Atomics,"%BigInt%":"undefined"==typeof BigInt?e:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?e:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":"undefined"==typeof Float16Array?e:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?e:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":A,"%Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):e,"%JSON%":"object"==typeof JSON?JSON:e,"%Map%":"undefined"==typeof Map?e:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&_&&T?T((new Map)[Symbol.iterator]()):e,"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?e:Promise,"%Proxy%":"undefined"==typeof Proxy?e:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?e:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?e:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&_&&T?T((new Set)[Symbol.iterator]()):e,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):e,"%Symbol%":_?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":x,"%TypedArray%":O,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?e:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?e:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":k,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":E,"%Math.abs%":u,"%Math.floor%":l,"%Math.max%":p,"%Math.min%":d,"%Math.pow%":f,"%Math.round%":h,"%Math.sign%":m,"%Reflect.getPrototypeOf%":S};if(T)try{null.error}catch(e){var I=T(T(e));R["%Error.prototype%"]=I}var N=function e(t){var n;if("%AsyncFunction%"===t)n=g("async function () {}");else if("%GeneratorFunction%"===t)n=g("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=g("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&T&&(n=T(i.prototype))}return R[t]=n,n},C={__proto__:null,"%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"]},P=Ug(),j=Yg(),L=P.call(M,Array.prototype.concat),$=P.call(k,Array.prototype.splice),D=P.call(M,String.prototype.replace),U=P.call(M,String.prototype.slice),z=P.call(M,RegExp.prototype.exec),B=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,q=function(e,t){var n,r=e;if(j(C,r)&&(r="%"+(n=C[r])[0]+"%"),j(R,r)){var i=R[r];if(i===A&&(i=N(r)),void 0===i&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new s("intrinsic "+e+" does not exist!")};return tg=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===z(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=U(e,0,1),n=U(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return D(e,B,function(e,t,n,i){r[r.length]=n?D(i,F,"$1"):t||e}),r}(e),r=n.length>0?n[0]:"",i=q("%"+r+"%",t),a=i.name,c=i.value,u=!1,l=i.alias;l&&(r=l[0],$(n,L([0,1],l)));for(var p=1,d=!0;p<n.length;p+=1){var f=n[p],h=U(f,0,1),m=U(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===m||"'"===m||"`"===m)&&h!==m)throw new s("property names with quotes must have matching quotes");if("constructor"!==f&&d||(u=!0),j(R,a="%"+(r+="."+f)+"%"))c=R[a];else if(null!=c){if(!(f in c)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&p+1>=n.length){var y=b(c,f);c=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:c[f]}else d=j(c,f),c=c[f];d&&!u&&(R[a]=c)}}return c},tg}function Kg(){if(sg)return ag;sg=1;var e=Vg()("%Object.defineProperty%",!0),t=function(){if(ig)return rg;ig=1;var e=Pg();return rg=function(){return e()&&!!Symbol.toStringTag}}()(),n=Yg(),r=xg(),i=t?Symbol.toStringTag:null;return ag=function(t,a){var s=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==s&&"boolean"!=typeof s||void 0!==o&&"boolean"!=typeof o)throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!i||!s&&n(t,i)||(e?e(t,i,{configurable:!o,enumerable:!1,value:a,writable:!1}):t[i]=a)},ag}function Gg(){return cg||(cg=1,og=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}),og}var Wg=function(){if(lg)return ug;lg=1;var e=pm(),t=s,r=a,i=b,o=w,c=C.parse,u=n,l=p.Stream,d=T,f=Im(),h=hg(),m=Kg(),y=Yg(),g=Gg();function v(t){if(!(this instanceof v))return new v(t);for(var n in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],e.call(this),t=t||{})this[n]=t[n]}return t.inherits(v,e),v.LINE_BREAK="\r\n",v.DEFAULT_CONTENT_TYPE="application/octet-stream",v.prototype.append=function(t,n,r){"string"==typeof(r=r||{})&&(r={filename:r});var i=e.prototype.append.bind(this);if("number"!=typeof n&&null!=n||(n=String(n)),Array.isArray(n))this._error(new Error("Arrays are not supported."));else{var a=this._multiPartHeader(t,n,r),s=this._multiPartFooter();i(a),i(n),i(s),this._trackLength(a,n,r)}},v.prototype._trackLength=function(e,t,n){var r=0;null!=n.knownLength?r+=Number(n.knownLength):Buffer.isBuffer(t)?r=t.length:"string"==typeof t&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+v.LINE_BREAK.length,t&&(t.path||t.readable&&y(t,"httpVersion")||t instanceof l)&&(n.knownLength||this._valuesToMeasure.push(t))},v.prototype._lengthRetriever=function(e,t){y(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):u.stat(e.path,function(n,r){if(n)t(n);else{var i=r.size-(e.start?e.start:0);t(null,i)}}):y(e,"httpVersion")?t(null,Number(e.headers["content-length"])):y(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")},v.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var r,i=this._getContentDisposition(t,n),a=this._getContentType(t,n),s="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(a||[])};for(var c in"object"==typeof n.header&&g(o,n.header),o)if(y(o,c)){if(null==(r=o[c]))continue;Array.isArray(r)||(r=[r]),r.length&&(s+=c+": "+r.join("; ")+v.LINE_BREAK)}return"--"+this.getBoundary()+v.LINE_BREAK+s+v.LINE_BREAK},v.prototype._getContentDisposition=function(e,t){var n;if("string"==typeof t.filepath?n=r.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=r.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&y(e,"httpVersion")&&(n=r.basename(e.client._httpMessage.path||"")),n)return'filename="'+n+'"'},v.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=f.lookup(e.name)),!n&&e&&e.path&&(n=f.lookup(e.path)),!n&&e&&e.readable&&y(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=f.lookup(t.filepath||t.filename)),!n&&e&&"object"==typeof e&&(n=v.DEFAULT_CONTENT_TYPE),n},v.prototype._multiPartFooter=function(){return function(e){var t=v.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},v.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+v.LINE_BREAK},v.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)y(e,t)&&(n[t.toLowerCase()]=e[t]);return n},v.prototype.setBoundary=function(e){if("string"!=typeof e)throw new TypeError("FormData boundary must be a string");this._boundary=e},v.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},v.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(v.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},v.prototype._generateBoundary=function(){this._boundary="--------------------------"+d.randomBytes(12).toString("hex")},v.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},v.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},v.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?h.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){n?e(n):(r.forEach(function(e){t+=e}),e(null,t))}):process.nextTick(e.bind(this,null,t))},v.prototype.submit=function(e,t){var n,r,a={method:"post"};return"string"==typeof e?(e=c(e),r=g({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},a)):(r=g(e,a)).port||(r.port="https:"===r.protocol?443:80),r.headers=this.getHeaders(e.headers),n="https:"===r.protocol?o.request(r):i.request(r),this.getLength(function(e,r){if(e&&"Unknown stream"!==e)this._error(e);else if(r&&n.setHeader("Content-Length",r),this.pipe(n),t){var i,a=function(e,r){return n.removeListener("error",a),n.removeListener("response",i),t.call(this,e,r)};i=a.bind(this,null),n.on("error",a),n.on("response",i)}}.bind(this)),n},v.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},v.prototype.toString=function(){return"[object FormData]"},m(v,"FormData"),ug=v}(),Jg=xe(Wg);const Zg={httpAdapterURL:"https://worker01-prod.truebit.network/http-adapter/",hubURL:"https://run.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"production",eula:"",RPC_URL:""},Xg={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"local",eula:"",RPC_URL:""},Qg={httpAdapterURL:"http://localhost:3000/",hubURL:"http://localhost:5000/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"testnet",eula:"",RPC_URL:""},eb={httpAdapterURL:"https://worker01-staging.truebit.network/http-adapter/",hubURL:"https://staging.truebit.network/",defaultLanguage:"rs",privateKey:"",address:"",blockchainEnv:"staging",eula:"",RPC_URL:""};function tb(){let e=Zg;return"local"===process.env.TRUEBIT_ENV?e=Xg:"staging"===process.env.TRUEBIT_ENV?e=eb:"testnet"===process.env.TRUEBIT_ENV&&(e=Qg),e}function nb(){const e=ib(),n=i.join(e,".truebit","secret.json");if(!t.existsSync(n))return null;const r=t.readFileSync(n,{encoding:"utf8"});try{return JSON.parse(r)}catch(e){return console.error("Error parsing secret config file:",e),null}}function rb(e){const n=ib(),r=i.join(n,".truebit","secret.json");if(!t.existsSync(r))return;const a=t.readFileSync(r,{encoding:"utf8"});try{const n={...JSON.parse(a),...e};t.writeFileSync(r,JSON.stringify(n,null,2),{encoding:"utf8"})}catch(e){console.error("Error updating secret config file:",e)}}function ib(){return process.env.TRUEBIT_PATH||(process.env.TRUEBIT_PATH=u.homedir()),process.env.TRUEBIT_PATH}function ab(e){const t=nb();return t&&e in t?t[e]:void 0}function sb(){const e=nb();if(!e)return void console.error("Secret config file does not exist.");let t=!1;const n=["privateKey","address"];for(const r of n)r in e||(e[r]="",t=!0);const r=["httpAdapterURL","hubURL","defaultLanguage","blockchainEnv"];for(const n of r)n in e&&""!==e[n]||(e[n]=tb()[n],t=!0);t&&(rb(e),console.log("Configuration has been updated with default values for missing properties."))}class ob{static EULA_TERMS_LINK="https://truebit.io/terms/";static SETUP_INTRODUCTION=`\nYour all-in-one solution to develop, build, test, and deploy tasks seamlessly.\nLet's get started by setting up your account and configuring your wallet.\nWe'll guide you through each step to ensure a smooth experience.\n\n${P.bold("**Important: Private Key Information")}\n\nTruebit Verify employs a private key system to secure your account:\n\n - A unique private key will be automatically generated for you.\n - This key serves as your secure identifier within Truebit Verify.\n - It's used internally to authenticate your actions.\n - You won't need to manage this key directly.\n\nWe are committed to ensuring the security of your private key and safeguarding your account.\nReady to begin?`;static SETUP_INTRODUCTION_NO_ACCEPTANCE=`\n${P.bold("Account Setup Required")}\n\nYou need an account to access platform features.\n\n${P.bold("To get started:")}\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\n${P.bold("Need assistance?")}\nUse the 'truebit -h' command for more information.`;static SETUP_STEP1=`\n${P.bold("Step 1: Create an Account")}\n\nIt appears you're a new user without a wallet configured locally.\n\nWould you like to create a new wallet now?`;static SETUP_STEP1_SCENARIO1_P1=`\nYour configuration file has been detected and will not be overwritten.\nTo make any modifications, edit the file located at: ${ib()}/.truebit/secret.json\n\nEnsure this file is kept secure, as it contains your credentials for using Truebit Verify.`;static SETUP_STEP1_SCENARIO1_P2(e){return`\nYour account setup appears to be complete.\n\nAccount Details:\n\n - Name: ${e.name}\n - Email: ${e.email}\n - Company: ${e.company}\n - Job Description: ${e.jobDescription}\n - Wallet Address: ${e.walletAddress}\n - Namespace: ${e.defaultNamespace} // API Key: ${e.defaultApiKey}\n\nRun 'truebit -h' to explore available commands and start your journey.`}static SETUP_STEP1_SCENARIO2(e){return`\nYour new wallet address is: ${e}\n\nYour wallet information has been securely stored in ${ib()}/.truebit/secret.json\nPlease keep this file safe, as it contains your credentials for using Truebit Verify.`}static SETUP_STEP1_SCENARIO3=`\n${P.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to create a new wallet at this time.\n\n - A wallet is required for full access to Truebit Verify features.\n - Without a wallet, your functionality on the platform will be limited.\n - You can create a wallet at any time by running the truebit setup command again.\n\nRun 'truebit setup' to get started.`;static SETUP_STEP2_SCENARIO3_P1=`\n${P.bold("Step 2: Create an Account")}\n\nYour wallet is now set up. Let's proceed with creating your Truebit Verify account.\n\nPlease provide the following information:`;static SETUP_STEP2_SCENARIO3_P2(e,t,n,r){return`\n${P.bold("Account Registration Complete")}\n\nThanks for registering with Truebit Verify!\n\nCongratulations! Your Truebit Verify account has been successfully created.\n\nAccount Summary:\n\n ${P.bold("- Name: ")+e.fullNameAnswer}\n ${P.bold("- Email: ")+e.emailAddressAnswer}\n ${P.bold("- Company: ")+e.companyNameAnswer}\n ${P.bold("- Job Description: ")+e.jobPositionAnswer}\n ${P.bold("- Wallet Address: ")+t}\n ${P.bold("- Namespace: ")+n} // ${P.bold("API Key: ")+r}\n\nRun 'truebit -h' to begin your journey.`}static SETUP_STEP2_UNHANDLED_ERROR=P.bold("\nSomething went wrong with the user registration:\n \nAccount registration interrupted.\n\nPlease run 'truebit setup' again.");static EULA_INSTALLATION=`\nWelcome to Truebit Verify!\n\nBefore completing your Truebit Verify installation, you must review the Terms of Use at: ${ob.EULA_TERMS_LINK}`;static EULA_INSTALLATION_NO_ACCEPTED="Installation cancelled because you have not accepted the Terms of Use.";static EULA_REGISTRATION_NO_ACCEPTED=`\n${P.bold("(!) Important Notice (!)")}\n\nYou’ve chosen not to accept the End User License Agreement (EULA) at this time.\n\n - Accepting the EULA is required for full access to Truebit Verify features.\n\nRun 'truebit setup' to get started`;static USER_NO_REGISTERED="You need to set up your Truebit Verify account to access platform features.\n\nTo get started:\n\n 1. Run the setup command: $ truebit setup\n 2. Follow the prompts to create your account.\n 3. Once setup is complete, you'll have full access to all Truebit Verify features.\n\nNeed assistance?\nUse the 'truebit -h' command for additional information."}async function cb(){const e=ab("hubURL");if(e)return k.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw ob.USER_NO_REGISTERED}async function ub(){const e=ab("httpAdapterURL");if(e)return k.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0});throw ob.USER_NO_REGISTERED}var lb,pb={},db={};function fb(){return lb||(lb=1,db.toString=function(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e},db.toType=function(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}),db}var hb,mb={};function yb(){return hb||(hb=1,mb.toString=function(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e},mb.toRcode=function(e){switch(e.toUpperCase()){case"NOERROR":return 0;case"FORMERR":return 1;case"SERVFAIL":return 2;case"NXDOMAIN":return 3;case"NOTIMP":return 4;case"REFUSED":return 5;case"YXDOMAIN":return 6;case"YXRRSET":return 7;case"NXRRSET":return 8;case"NOTAUTH":return 9;case"NOTZONE":return 10;case"RCODE_11":return 11;case"RCODE_12":return 12;case"RCODE_13":return 13;case"RCODE_14":return 14;case"RCODE_15":return 15}return 0}),mb}var gb,bb={};function vb(){return gb||(gb=1,bb.toString=function(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e},bb.toOpcode=function(e){switch(e.toUpperCase()){case"QUERY":return 0;case"IQUERY":return 1;case"STATUS":return 2;case"OPCODE_3":return 3;case"NOTIFY":return 4;case"UPDATE":return 5;case"OPCODE_6":return 6;case"OPCODE_7":return 7;case"OPCODE_8":return 8;case"OPCODE_9":return 9;case"OPCODE_10":return 10;case"OPCODE_11":return 11;case"OPCODE_12":return 12;case"OPCODE_13":return 13;case"OPCODE_14":return 14;case"OPCODE_15":return 15}return 0}),bb}var wb,xb={};function _b(){return wb||(wb=1,xb.toString=function(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e},xb.toClass=function(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}),xb}var Tb,Eb={};function Sb(){return Tb||(Tb=1,Eb.toString=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:`OPTION_${e}`},Eb.toCode=function(e){if("number"==typeof e)return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}const t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}),Eb}var kb,Mb,Ab,Ob,Rb={exports:{}};function Ib(){return Mb||(Mb=1,function(e){const t=d.Buffer,n=fb(),r=yb(),i=vb(),a=_b(),s=Sb(),o=(kb||(kb=1,function(e){var t=function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decode=function(e,t,n){if(t=~~t,(n=n||e.length-t)===r.size)return r.decode(e,t,n);if(n===i.size)return i.decode(e,t,n);throw Error(`Invalid buffer size needs to be ${r.size} for v4 or ${i.size} for v6.`)},e.encode=function(e,t,n){n=~~n;const s=a(e);return"function"==typeof t&&(t=t(n+s)),s===r.size?r.encode(e,t,n):i.encode(e,t,n)},e.familyOf=function(e){return a(e)===r.size?1:2},e.name=void 0,e.sizeOf=a,e.v6=e.v4=void 0;const t=/^(\d{1,3}\.){3,3}\d{1,3}$/,n=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,r={name:"v4",size:4,isFormat:e=>t.test(e),encode(e,t,n){n=~~n,t=t||new Uint8Array(n+4);const r=e.length;let i=0;for(let a=0;a<r;){const r=e.charCodeAt(a++);46===r?(t[n++]=i,i=0):i=10*i+(r-48)}return t[n]=i,t},decode:(e,t)=>(t=~~t,`${e[t++]}.${e[t++]}.${e[t++]}.${e[t]}`)};e.v4=r;const i={name:"v6",size:16,isFormat:e=>e.length>0&&n.test(e),encode(e,t,n){let r=16+(n=~~n),i=-1,a=0,s=0,o=!0,c=!1;t=t||new Uint8Array(n+16);for(let u=0;u<e.length;u++){let l=e.charCodeAt(u);58===l?(o?-1!==i?(n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2):n<r&&(i=n):(!0===c?(n<r&&(t[n]=s),n++):(n<r&&(t[n]=a>>8),n<r-1&&(t[n+1]=255&a),n+=2),a=0,s=0),o=!0,c=!1):46===l?(n<r&&(t[n]=s),n++,s=0,a=0,o=!1,c=!0):(o=!1,l>=97?l-=87:l>=65?l-=55:(l-=48,s=10*s+l),a=(a<<4)+l)}if(!1===o)!0===c?(n<r&&(t[n]=s),n++):(n<r&&(t[n]=a>>8),n<r-1&&(t[n+1]=255&a),n+=2);else if(0===i)n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2;else if(-1!==i){n+=2;for(let e=Math.min(n-1,r-1);e>=i+2;e--)t[e]=t[e-2];t[i]=0,t[i+1]=0,i=n}if(i!==n&&-1!==i)for(n>r-2&&(n=r-2);r>i;)t[--r]=n<r&&n>i?t[--n]:0;else for(;n<r;)t[n++]=0;return t},decode(e,t){t=~~t;let n="";for(let r=0;r<16;r+=2)0!==r&&(n+=":"),n+=(e[t+r]<<8|e[t+r+1]).toString(16);return n.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};function a(e){if(r.isFormat(e))return r.size;if(i.isFormat(e))return i.size;throw Error(`Invalid ip address: ${e}`)}return e.v6=i,e.name="ip","default"in e?e.default:e}({});e.exports=t}(Rb)),Rb.exports),c=32768,u=e.name={};u.encode=function(e,n,r,{mail:i=!1}={}){n||(n=t.alloc(u.encodingLength(e))),r||(r=0);const a=r,s=e.replace(/^\.|\.$/gm,"");if(s.length){let e=[];if(i){let t="";s.split(".").forEach(n=>{n.endsWith("\\")?t+=(t.length?".":"")+n.slice(0,-1):0===e.length&&t.length?e.push(t+"."+n):e.push(n)})}else e=s.split(".");for(let t=0;t<e.length;t++){const i=n.write(e[t],r+1);n[r]=i,r+=i+1}}return n[r++]=0,u.encode.bytes=r-a,n},u.encode.bytes=0,u.decode=function(e,t,{mail:n=!1}={}){t||(t=0);const r=[];let i=t,a=0,s=0,o=!1;for(;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");const c=e[t++];if(s+=o?0:1,0===c)break;if(192&c){if(192&~c)throw new Error("Cannot decode name (bad label)");{if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");const n=e.readUInt16BE(t-1)-49152;if(n>=i)throw new Error("Cannot decode name (bad pointer)");t=n,i=n,s+=o?0:1,o=!0}}else{if(t+c>e.length)throw new Error("Cannot decode name (buffer overflow)");if(a+=c+1,a>254)throw new Error("Cannot decode name (name too long)");let i=e.toString("utf-8",t,t+c);n&&(i=i.replace(/\./g,"\\.")),r.push(i),t+=c,s+=o?0:c}}return u.decode.bytes=s,0===r.length?".":r.join(".")},u.decode.bytes=0,u.encodingLength=function(e){return"."===e||".."===e?1:t.byteLength(e.replace(/^\.|\.$/gm,""))+2};const l={encode:function(e,n,r){n||(n=t.alloc(l.encodingLength(e))),r||(r=0);const i=n.write(e,r+1);return n[r]=i,l.encode.bytes=i+1,n}};l.encode.bytes=0,l.decode=function(e,t){t||(t=0);const n=e[t],r=e.toString("utf-8",t+1,t+1+n);return l.decode.bytes=n+1,r},l.decode.bytes=0,l.encodingLength=function(e){return t.byteLength(e)+1};const p={encode:function(e,t,n){t||(t=p.encodingLength(e)),n||(n=0);const r=32767&(e.flags||0),i="response"===e.type?32768:0;return t.writeUInt16BE(e.id||0,n),t.writeUInt16BE(r|i,n+2),t.writeUInt16BE(e.questions.length,n+4),t.writeUInt16BE(e.answers.length,n+6),t.writeUInt16BE(e.authorities.length,n+8),t.writeUInt16BE(e.additionals.length,n+10),t}};p.encode.bytes=12,p.decode=function(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");const n=e.readUInt16BE(t+2);return{id:e.readUInt16BE(t),type:32768&n?"response":"query",flags:32767&n,flag_qr:1==(n>>15&1),opcode:i.toString(n>>11&15),flag_aa:1==(n>>10&1),flag_tc:1==(n>>9&1),flag_rd:1==(n>>8&1),flag_ra:1==(n>>7&1),flag_z:1==(n>>6&1),flag_ad:1==(n>>5&1),flag_cd:1==(n>>4&1),rcode:r.toString(15&n),questions:new Array(e.readUInt16BE(t+4)),answers:new Array(e.readUInt16BE(t+6)),authorities:new Array(e.readUInt16BE(t+8)),additionals:new Array(e.readUInt16BE(t+10))}},p.decode.bytes=12,p.encodingLength=function(){return 12};const f=e.unknown={};f.encode=function(e,n,r){return n||(n=t.alloc(f.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.length,r),e.copy(n,r+2),f.encode.bytes=e.length+2,n},f.encode.bytes=0,f.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=e.slice(t+2,t+2+n);return f.decode.bytes=n+2,r},f.decode.bytes=0,f.encodingLength=function(e){return e.length+2};const h=e.ns={};h.encode=function(e,n,r){return n||(n=t.alloc(h.encodingLength(e))),r||(r=0),u.encode(e,n,r+2),n.writeUInt16BE(u.encode.bytes,r),h.encode.bytes=u.encode.bytes+2,n},h.encode.bytes=0,h.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=u.decode(e,t+2);return h.decode.bytes=n+2,r},h.decode.bytes=0,h.encodingLength=function(e){return u.encodingLength(e)+2};const m=e.soa={};m.encode=function(e,n,r){n||(n=t.alloc(m.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.mname,n,r),r+=u.encode.bytes,u.encode(e.rname,n,r,{mail:!0}),r+=u.encode.bytes,n.writeUInt32BE(e.serial||0,r),r+=4,n.writeUInt32BE(e.refresh||0,r),r+=4,n.writeUInt32BE(e.retry||0,r),r+=4,n.writeUInt32BE(e.expire||0,r),r+=4,n.writeUInt32BE(e.minimum||0,r),r+=4,n.writeUInt16BE(r-i-2,i),m.encode.bytes=r-i,n},m.encode.bytes=0,m.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mname=u.decode(e,t),t+=u.decode.bytes,r.rname=u.decode(e,t,{mail:!0}),t+=u.decode.bytes,r.serial=e.readUInt32BE(t),t+=4,r.refresh=e.readUInt32BE(t),t+=4,r.retry=e.readUInt32BE(t),t+=4,r.expire=e.readUInt32BE(t),t+=4,r.minimum=e.readUInt32BE(t),t+=4,m.decode.bytes=t-n,r},m.decode.bytes=0,m.encodingLength=function(e){return 22+u.encodingLength(e.mname)+u.encodingLength(e.rname)};const y=e.txt={};y.encode=function(e,n,r){Array.isArray(e)||(e=[e]);for(let n=0;n<e.length;n++)if("string"==typeof e[n]&&(e[n]=t.from(e[n])),!t.isBuffer(e[n]))throw new Error("Must be a Buffer");n||(n=t.alloc(y.encodingLength(e))),r||(r=0);const i=r;return r+=2,e.forEach(function(e){n[r++]=e.length,e.copy(n,r,0,e.length),r+=e.length}),n.writeUInt16BE(r-i-2,i),y.encode.bytes=r-i,n},y.encode.bytes=0,y.decode=function(e,t){t||(t=0);const n=t;let r=e.readUInt16BE(t);t+=2;let i=[];for(;r>0;){const n=e[t++];if(--r,r<n)throw new Error("Buffer overflow");i.push(e.slice(t,t+n)),t+=n,r-=n}return y.decode.bytes=t-n,i},y.decode.bytes=0,y.encodingLength=function(e){Array.isArray(e)||(e=[e]);let n=2;return e.forEach(function(e){n+="string"==typeof e?t.byteLength(e)+1:e.length+1}),n};const g=e.null={};g.encode=function(e,n,r){n||(n=t.alloc(g.encodingLength(e))),r||(r=0),"string"==typeof e&&(e=t.from(e)),e||(e=t.alloc(0));const i=r;r+=2;const a=e.length;return e.copy(n,r,0,a),r+=a,n.writeUInt16BE(r-i-2,i),g.encode.bytes=r-i,n},g.encode.bytes=0,g.decode=function(e,t){t||(t=0);const n=t,r=e.readUInt16BE(t);t+=2;const i=e.slice(t,t+r);return t+=r,g.decode.bytes=t-n,i},g.decode.bytes=0,g.encodingLength=function(e){return e?(t.isBuffer(e)?e.length:t.byteLength(e))+2:2};const b=e.hinfo={};b.encode=function(e,n,r){n||(n=t.alloc(b.encodingLength(e))),r||(r=0);const i=r;return r+=2,l.encode(e.cpu,n,r),r+=l.encode.bytes,l.encode(e.os,n,r),r+=l.encode.bytes,n.writeUInt16BE(r-i-2,i),b.encode.bytes=r-i,n},b.encode.bytes=0,b.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.cpu=l.decode(e,t),t+=l.decode.bytes,r.os=l.decode(e,t),t+=l.decode.bytes,b.decode.bytes=t-n,r},b.decode.bytes=0,b.encodingLength=function(e){return l.encodingLength(e.cpu)+l.encodingLength(e.os)+2};const v=e.ptr={},w=e.cname=v,x=e.dname=v;v.encode=function(e,n,r){return n||(n=t.alloc(v.encodingLength(e))),r||(r=0),u.encode(e,n,r+2),n.writeUInt16BE(u.encode.bytes,r),v.encode.bytes=u.encode.bytes+2,n},v.encode.bytes=0,v.decode=function(e,t){t||(t=0);const n=u.decode(e,t+2);return v.decode.bytes=u.decode.bytes+2,n},v.decode.bytes=0,v.encodingLength=function(e){return u.encodingLength(e)+2};const _=e.srv={};_.encode=function(e,n,r){n||(n=t.alloc(_.encodingLength(e))),r||(r=0),n.writeUInt16BE(e.priority||0,r+2),n.writeUInt16BE(e.weight||0,r+4),n.writeUInt16BE(e.port||0,r+6),u.encode(e.target,n,r+8);const i=u.encode.bytes+6;return n.writeUInt16BE(i,r),_.encode.bytes=i+2,n},_.encode.bytes=0,_.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r={};return r.priority=e.readUInt16BE(t+2),r.weight=e.readUInt16BE(t+4),r.port=e.readUInt16BE(t+6),r.target=u.decode(e,t+8),_.decode.bytes=n+2,r},_.decode.bytes=0,_.encodingLength=function(e){return 8+u.encodingLength(e.target)};const T=e.caa={};T.ISSUER_CRITICAL=128,T.encode=function(e,n,r){const i=T.encodingLength(e);return n||(n=t.alloc(T.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=T.ISSUER_CRITICAL),n.writeUInt16BE(i-2,r),r+=2,n.writeUInt8(e.flags||0,r),r+=1,l.encode(e.tag,n,r),r+=l.encode.bytes,n.write(e.value,r),r+=t.byteLength(e.value),T.encode.bytes=i,n},T.encode.bytes=0,T.decode=function(e,t){t||(t=0);const n=e.readUInt16BE(t),r=t+=2,i={};return i.flags=e.readUInt8(t),t+=1,i.tag=l.decode(e,t),t+=l.decode.bytes,i.value=e.toString("utf-8",t,r+n),i.issuerCritical=!!(i.flags&T.ISSUER_CRITICAL),T.decode.bytes=n+2,i},T.decode.bytes=0,T.encodingLength=function(e){return l.encodingLength(e.tag)+l.encodingLength(e.value)+2};const E=e.mx={};E.encode=function(e,n,r){n||(n=t.alloc(E.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,u.encode(e.exchange,n,r),r+=u.encode.bytes,n.writeUInt16BE(r-i-2,i),E.encode.bytes=r-i,n},E.encode.bytes=0,E.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.preference=e.readUInt16BE(t),t+=2,r.exchange=u.decode(e,t),t+=u.decode.bytes,E.decode.bytes=t-n,r},E.encodingLength=function(e){return 4+u.encodingLength(e.exchange)};const S=e.a={};S.encode=function(e,n,r){return n||(n=t.alloc(S.encodingLength(e))),r||(r=0),n.writeUInt16BE(4,r),r+=2,o.v4.encode(e,n,r),S.encode.bytes=6,n},S.encode.bytes=0,S.decode=function(e,t){t||(t=0),t+=2;const n=o.v4.decode(e,t);return S.decode.bytes=6,n},S.decode.bytes=0,S.encodingLength=function(){return 6};const k=e.aaaa={};k.encode=function(e,n,r){return n||(n=t.alloc(k.encodingLength(e))),r||(r=0),n.writeUInt16BE(16,r),r+=2,o.v6.encode(e,n,r),k.encode.bytes=18,n},k.encode.bytes=0,k.decode=function(e,t){t||(t=0),t+=2;const n=o.v6.decode(e,t);return k.decode.bytes=18,n},k.decode.bytes=0,k.encodingLength=function(){return 18};const M=e.option={};M.encode=function(e,n,r){n||(n=t.alloc(M.encodingLength(e))),r||(r=0);const i=r,a=s.toCode(e.code);if(n.writeUInt16BE(a,r),r+=2,e.data)n.writeUInt16BE(e.data.length,r),r+=2,e.data.copy(n,r),r+=e.data.length;else switch(a){case 8:const i=e.sourcePrefixLength||0,a=e.family||o.familyOf(e.ip),s=o.encode(e.ip,t.alloc),c=Math.ceil(i/8);n.writeUInt16BE(c+4,r),r+=2,n.writeUInt16BE(a,r),r+=2,n.writeUInt8(i,r++),n.writeUInt8(e.scopePrefixLength||0,r++),s.copy(n,r,0,c),r+=c;break;case 11:e.timeout?(n.writeUInt16BE(2,r),r+=2,n.writeUInt16BE(e.timeout,r),r+=2):(n.writeUInt16BE(0,r),r+=2);break;case 12:const u=e.length||0;n.writeUInt16BE(u,r),r+=2,n.fill(0,r,r+u),r+=u;break;case 14:const l=2*e.tags.length;n.writeUInt16BE(l,r),r+=2;for(const t of e.tags)n.writeUInt16BE(t,r),r+=2;break;default:throw new Error(`Unknown roption code: ${e.code}`)}return M.encode.bytes=r-i,n},M.encode.bytes=0,M.decode=function(e,n){n||(n=0);const r={};r.code=e.readUInt16BE(n),r.type=s.toString(r.code),n+=2;const i=e.readUInt16BE(n);switch(n+=2,r.data=e.slice(n,n+i),r.code){case 8:r.family=e.readUInt16BE(n),n+=2,r.sourcePrefixLength=e.readUInt8(n++),r.scopePrefixLength=e.readUInt8(n++);const a=t.alloc(1===r.family?4:16);e.copy(a,0,n,n+i-4),r.ip=o.decode(a);break;case 11:i>0&&(r.timeout=e.readUInt16BE(n),n+=2);break;case 14:r.tags=[];for(let t=0;t<i;t+=2)r.tags.push(e.readUInt16BE(n)),n+=2}return M.decode.bytes=i+4,r},M.decode.bytes=0,M.encodingLength=function(e){if(e.data)return e.data.length+4;switch(s.toCode(e.code)){case 8:const t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8;case 11:return"number"==typeof e.timeout?6:4;case 12:return e.length+4;case 14:return 4+2*e.tags.length}throw new Error(`Unknown roption code: ${e.code}`)};const A=e.opt={};A.encode=function(e,n,r){n||(n=t.alloc(A.encodingLength(e))),r||(r=0);const i=r,a=F(e,M);return n.writeUInt16BE(a,r),r=q(e,M,n,r+2),A.encode.bytes=r-i,n},A.encode.bytes=0,A.decode=function(e,t){t||(t=0);const n=t,r=[];let i=e.readUInt16BE(t);t+=2;let a=0;for(;i>0;)r[a++]=M.decode(e,t),t+=M.decode.bytes,i-=M.decode.bytes;return A.decode.bytes=t-n,r},A.decode.bytes=0,A.encodingLength=function(e){return 2+F(e||[],M)};const O=e.dnskey={};O.PROTOCOL_DNSSEC=3,O.ZONE_KEY=128,O.SECURE_ENTRYPOINT=32768,O.encode=function(e,n,r){n||(n=t.alloc(O.encodingLength(e))),r||(r=0);const i=r,a=e.key;if(!t.isBuffer(a))throw new Error("Key must be a Buffer");return r+=2,n.writeUInt16BE(e.flags,r),r+=2,n.writeUInt8(O.PROTOCOL_DNSSEC,r),r+=1,n.writeUInt8(e.algorithm,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,O.encode.bytes=r-i,n.writeUInt16BE(O.encode.bytes-2,i),n},O.encode.bytes=0,O.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);if(t+=2,r.flags=e.readUInt16BE(t),t+=2,e.readUInt8(t)!==O.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,r.algorithm=e.readUInt8(t),t+=1,r.key=e.slice(t,n+i+2),t+=r.key.length,O.decode.bytes=t-n,r},O.decode.bytes=0,O.encodingLength=function(e){return 6+t.byteLength(e.key)};const R=e.rrsig={};R.encode=function(e,r,i){r||(r=t.alloc(R.encodingLength(e))),i||(i=0);const a=i,s=e.signature;if(!t.isBuffer(s))throw new Error("Signature must be a Buffer");return i+=2,r.writeUInt16BE(n.toType(e.typeCovered),i),i+=2,r.writeUInt8(e.algorithm,i),i+=1,r.writeUInt8(e.labels,i),i+=1,r.writeUInt32BE(e.originalTTL,i),i+=4,r.writeUInt32BE(e.expiration,i),i+=4,r.writeUInt32BE(e.inception,i),i+=4,r.writeUInt16BE(e.keyTag,i),i+=2,u.encode(e.signersName,r,i),i+=u.encode.bytes,s.copy(r,i,0,s.length),i+=s.length,R.encode.bytes=i-a,r.writeUInt16BE(R.encode.bytes-2,a),r},R.encode.bytes=0,R.decode=function(e,t){t||(t=0);const r=t;var i={},a=e.readUInt16BE(t);return t+=2,i.typeCovered=n.toString(e.readUInt16BE(t)),t+=2,i.algorithm=e.readUInt8(t),t+=1,i.labels=e.readUInt8(t),t+=1,i.originalTTL=e.readUInt32BE(t),t+=4,i.expiration=e.readUInt32BE(t),t+=4,i.inception=e.readUInt32BE(t),t+=4,i.keyTag=e.readUInt16BE(t),t+=2,i.signersName=u.decode(e,t),t+=u.decode.bytes,i.signature=e.slice(t,r+a+2),t+=i.signature.length,R.decode.bytes=t-r,i},R.decode.bytes=0,R.encodingLength=function(e){return 20+u.encodingLength(e.signersName)+t.byteLength(e.signature)};const I=e.rp={};I.encode=function(e,n,r){n||(n=t.alloc(I.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.mbox||".",n,r,{mail:!0}),r+=u.encode.bytes,u.encode(e.txt||".",n,r),r+=u.encode.bytes,I.encode.bytes=r-i,n.writeUInt16BE(I.encode.bytes-2,i),n},I.encode.bytes=0,I.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.mbox=u.decode(e,t,{mail:!0})||".",t+=u.decode.bytes,r.txt=u.decode(e,t)||".",t+=u.decode.bytes,I.decode.bytes=t-n,r},I.decode.bytes=0,I.encodingLength=function(e){return 2+u.encodingLength(e.mbox||".")+u.encodingLength(e.txt||".")};const N={encode:function(e,r,i){r||(r=t.alloc(N.encodingLength(e))),i||(i=0);const a=i;for(var s=[],o=0;o<e.length;o++){var c=n.toType(e[o]);void 0===s[c>>8]&&(s[c>>8]=[]),s[c>>8][c>>3&31]|=1<<7-(7&c)}for(o=0;o<s.length;o++)if(void 0!==s[o]){var u=t.from(s[o]);r.writeUInt8(o,i),i+=1,r.writeUInt8(u.length,i),i+=1,u.copy(r,i),i+=u.length}return N.encode.bytes=i-a,r}};N.encode.bytes=0,N.decode=function(e,t,r){t||(t=0);const i=t;for(var a=[];t-i<r;){var s=e.readUInt8(t);t+=1;var o=e.readUInt8(t);t+=1;for(var c=0;c<o;c++)for(var u=e.readUInt8(t+c),l=0;l<8;l++)if(u&1<<7-l){var p=n.toString(s<<8|c<<3|l);a.push(p)}t+=o}return N.decode.bytes=t-i,a},N.decode.bytes=0,N.encodingLength=function(e){for(var t=[],r=0;r<e.length;r++){var i=n.toType(e[r]);t[i>>8]=Math.max(t[i>>8]||0,255&i)}var a=0;for(r=0;r<t.length;r++)void 0!==t[r]&&(a+=2+Math.ceil((t[r]+1)/8));return a};const C=e.nsec={};C.encode=function(e,n,r){n||(n=t.alloc(C.encodingLength(e))),r||(r=0);const i=r;return r+=2,u.encode(e.nextDomain,n,r),r+=u.encode.bytes,N.encode(e.rrtypes,n,r),r+=N.encode.bytes,C.encode.bytes=r-i,n.writeUInt16BE(C.encode.bytes-2,i),n},C.encode.bytes=0,C.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.nextDomain=u.decode(e,t),t+=u.decode.bytes,r.rrtypes=N.decode(e,t,i-(t-n)),t+=N.decode.bytes,C.decode.bytes=t-n,r},C.decode.bytes=0,C.encodingLength=function(e){return 2+u.encodingLength(e.nextDomain)+N.encodingLength(e.rrtypes)};const P=e.nsec3={};P.encode=function(e,n,r){n||(n=t.alloc(P.encodingLength(e))),r||(r=0);const i=r,a=e.salt;if(!t.isBuffer(a))throw new Error("salt must be a Buffer");const s=e.nextDomain;if(!t.isBuffer(s))throw new Error("nextDomain must be a Buffer");return r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.flags,r),r+=1,n.writeUInt16BE(e.iterations,r),r+=2,n.writeUInt8(a.length,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,n.writeUInt8(s.length,r),r+=1,s.copy(n,r,0,s.length),r+=s.length,N.encode(e.rrtypes,n,r),r+=N.encode.bytes,P.encode.bytes=r-i,n.writeUInt16BE(P.encode.bytes-2,i),n},P.encode.bytes=0,P.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);t+=2,r.algorithm=e.readUInt8(t),t+=1,r.flags=e.readUInt8(t),t+=1,r.iterations=e.readUInt16BE(t),t+=2;const a=e.readUInt8(t);t+=1,r.salt=e.slice(t,t+a),t+=a;const s=e.readUInt8(t);return t+=1,r.nextDomain=e.slice(t,t+s),t+=s,r.rrtypes=N.decode(e,t,i-(t-n)),t+=N.decode.bytes,P.decode.bytes=t-n,r},P.decode.bytes=0,P.encodingLength=function(e){return 8+e.salt.length+e.nextDomain.length+N.encodingLength(e.rrtypes)};const j=e.ds={};j.encode=function(e,n,r){n||(n=t.alloc(j.encodingLength(e))),r||(r=0);const i=r,a=e.digest;if(!t.isBuffer(a))throw new Error("Digest must be a Buffer");return r+=2,n.writeUInt16BE(e.keyTag,r),r+=2,n.writeUInt8(e.algorithm,r),r+=1,n.writeUInt8(e.digestType,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,j.encode.bytes=r-i,n.writeUInt16BE(j.encode.bytes-2,i),n},j.encode.bytes=0,j.decode=function(e,t){t||(t=0);const n=t;var r={},i=e.readUInt16BE(t);return t+=2,r.keyTag=e.readUInt16BE(t),t+=2,r.algorithm=e.readUInt8(t),t+=1,r.digestType=e.readUInt8(t),t+=1,r.digest=e.slice(t,n+i+2),t+=r.digest.length,j.decode.bytes=t-n,r},j.decode.bytes=0,j.encodingLength=function(e){return 6+t.byteLength(e.digest)};const L=e.sshfp={};L.getFingerprintLengthForHashType=function(e){switch(e){case 1:return 20;case 2:return 32}},L.encode=function(e,n,r){n||(n=t.alloc(L.encodingLength(e))),r||(r=0);const i=r;n[r+=2]=e.algorithm,n[r+=1]=e.hash,r+=1;const a=t.from(e.fingerprint.toUpperCase(),"hex");if(a.length!==L.getFingerprintLengthForHashType(e.hash))throw new Error("Invalid fingerprint length");return a.copy(n,r),r+=a.byteLength,L.encode.bytes=r-i,n.writeUInt16BE(L.encode.bytes-2,i),n},L.encode.bytes=0,L.decode=function(e,t){t||(t=0);const n=t,r={};t+=2,r.algorithm=e[t],t+=1,r.hash=e[t],t+=1;const i=L.getFingerprintLengthForHashType(r.hash);return r.fingerprint=e.slice(t,t+i).toString("hex").toUpperCase(),t+=i,L.decode.bytes=t-n,r},L.decode.bytes=0,L.encodingLength=function(e){return 4+t.from(e.fingerprint,"hex").byteLength};const $=e.naptr={};$.encode=function(e,n,r){n||(n=t.alloc($.encodingLength(e))),r||(r=0);const i=r;return r+=2,n.writeUInt16BE(e.order||0,r),r+=2,n.writeUInt16BE(e.preference||0,r),r+=2,l.encode(e.flags,n,r),r+=l.encode.bytes,l.encode(e.services,n,r),r+=l.encode.bytes,l.encode(e.regexp,n,r),r+=l.encode.bytes,u.encode(e.replacement,n,r),r+=u.encode.bytes,$.encode.bytes=r-i,n.writeUInt16BE($.encode.bytes-2,i),n},$.encode.bytes=0,$.decode=function(e,t){t||(t=0);const n=t,r={};return t+=2,r.order=e.readUInt16BE(t),t+=2,r.preference=e.readUInt16BE(t),t+=2,r.flags=l.decode(e,t),t+=l.decode.bytes,r.services=l.decode(e,t),t+=l.decode.bytes,r.regexp=l.decode(e,t),t+=l.decode.bytes,r.replacement=u.decode(e,t),t+=u.decode.bytes,$.decode.bytes=t-n,r},$.decode.bytes=0,$.encodingLength=function(e){return l.encodingLength(e.flags)+l.encodingLength(e.services)+l.encodingLength(e.regexp)+u.encodingLength(e.replacement)+6};const D=e.tlsa={};D.encode=function(e,n,r){n||(n=t.alloc(D.encodingLength(e))),r||(r=0);const i=r,a=e.certificate;if(!t.isBuffer(a))throw new Error("Certificate must be a Buffer");return r+=2,n.writeUInt8(e.usage,r),r+=1,n.writeUInt8(e.selector,r),r+=1,n.writeUInt8(e.matchingType,r),r+=1,a.copy(n,r,0,a.length),r+=a.length,D.encode.bytes=r-i,n.writeUInt16BE(D.encode.bytes-2,i),n},D.encode.bytes=0,D.decode=function(e,t){t||(t=0);const n=t,r={},i=e.readUInt16BE(t);return t+=2,r.usage=e.readUInt8(t),t+=1,r.selector=e.readUInt8(t),t+=1,r.matchingType=e.readUInt8(t),t+=1,r.certificate=e.slice(t,n+i+2),t+=r.certificate.length,D.decode.bytes=t-n,r},D.decode.bytes=0,D.encodingLength=function(e){return 5+t.byteLength(e.certificate)};const U=e.record=function(e){switch(e.toUpperCase()){case"A":return S;case"PTR":return v;case"CNAME":return w;case"DNAME":return x;case"TXT":return y;case"NULL":return g;case"AAAA":return k;case"SRV":return _;case"HINFO":return b;case"CAA":return T;case"NS":return h;case"SOA":return m;case"MX":return E;case"OPT":return A;case"DNSKEY":return O;case"RRSIG":return R;case"RP":return I;case"NSEC":return C;case"NSEC3":return P;case"SSHFP":return L;case"DS":return j;case"NAPTR":return $;case"TLSA":return D}return f},z=e.answer={};z.encode=function(e,r,i){r||(r=t.alloc(z.encodingLength(e))),i||(i=0);const s=i;if(u.encode(e.name,r,i),i+=u.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),"OPT"===e.type.toUpperCase()){if("."!==e.name)throw new Error("OPT name must be root.");r.writeUInt16BE(e.udpPayloadSize||4096,i+2),r.writeUInt8(e.extendedRcode||0,i+4),r.writeUInt8(e.ednsVersion||0,i+5),r.writeUInt16BE(e.flags||0,i+6),i+=8,A.encode(e.options||[],r,i),i+=A.encode.bytes}else{let t=a.toClass(void 0===e.class?"IN":e.class);e.flush&&(t|=c),r.writeUInt16BE(t,i+2),r.writeUInt32BE(e.ttl||0,i+4),i+=8;const n=U(e.type);n.encode(e.data,r,i),i+=n.encode.bytes}return z.encode.bytes=i-s,r},z.encode.bytes=0,z.decode=function(e,t){t||(t=0);const r={},i=t;if(r.name=u.decode(e,t),t+=u.decode.bytes,r.type=n.toString(e.readUInt16BE(t)),"OPT"===r.type)r.udpPayloadSize=e.readUInt16BE(t+2),r.extendedRcode=e.readUInt8(t+4),r.ednsVersion=e.readUInt8(t+5),r.flags=e.readUInt16BE(t+6),r.flag_do=1==(r.flags>>15&1),r.options=A.decode(e,t+8),t+=8+A.decode.bytes;else{const n=e.readUInt16BE(t+2);r.ttl=e.readUInt32BE(t+4),r.class=a.toString(-32769&n),r.flush=!!(n&c);const i=U(r.type);r.data=i.decode(e,t+8),t+=8+i.decode.bytes}return z.decode.bytes=t-i,r},z.decode.bytes=0,z.encodingLength=function(e){const t=null!==e.data&&void 0!==e.data?e.data:e.options;return u.encodingLength(e.name)+8+U(e.type).encodingLength(t)};const B=e.question={};function F(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t.encodingLength(e[r]);return n}function q(e,t,n,r){for(let i=0;i<e.length;i++)t.encode(e[i],n,r),r+=t.encode.bytes;return r}function H(e,t,n,r){for(let i=0;i<e.length;i++)e[i]=t.decode(n,r),r+=t.decode.bytes;return r}B.encode=function(e,r,i){r||(r=t.alloc(B.encodingLength(e))),i||(i=0);const s=i;return u.encode(e.name,r,i),i+=u.encode.bytes,r.writeUInt16BE(n.toType(e.type),i),i+=2,r.writeUInt16BE(a.toClass(void 0===e.class?"IN":e.class),i),i+=2,B.encode.bytes=i-s,e},B.encode.bytes=0,B.decode=function(e,t){t||(t=0);const r=t,i={};i.name=u.decode(e,t),t+=u.decode.bytes,i.type=n.toString(e.readUInt16BE(t)),t+=2,i.class=a.toString(e.readUInt16BE(t)),t+=2;return!!(32768&i.class)&&(i.class&=-32769),B.decode.bytes=t-r,i},B.decode.bytes=0,B.encodingLength=function(e){return u.encodingLength(e.name)+4},e.AUTHORITATIVE_ANSWER=1024,e.TRUNCATED_RESPONSE=512,e.RECURSION_DESIRED=256,e.RECURSION_AVAILABLE=128,e.AUTHENTIC_DATA=32,e.CHECKING_DISABLED=16,e.DNSSEC_OK=32768,e.encode=function(n,r,i){const a=!r;a&&(r=t.alloc(e.encodingLength(n))),i||(i=0);const s=i;return n.questions||(n.questions=[]),n.answers||(n.answers=[]),n.authorities||(n.authorities=[]),n.additionals||(n.additionals=[]),p.encode(n,r,i),i+=p.encode.bytes,i=q(n.questions,B,r,i),i=q(n.answers,z,r,i),i=q(n.authorities,z,r,i),i=q(n.additionals,z,r,i),e.encode.bytes=i-s,a&&e.encode.bytes!==r.length?r.slice(0,e.encode.bytes):r},e.encode.bytes=0,e.decode=function(t,n){n||(n=0);const r=n,i=p.decode(t,n);return n+=p.decode.bytes,n=H(i.questions,B,t,n),n=H(i.answers,z,t,n),n=H(i.authorities,z,t,n),n=H(i.additionals,z,t,n),e.decode.bytes=n-r,i},e.decode.bytes=0,e.encodingLength=function(e){return p.encodingLength(e)+F(e.questions||[],B)+F(e.answers||[],z)+F(e.authorities||[],z)+F(e.additionals||[],z)},e.streamEncode=function(n){const r=e.encode(n),i=t.alloc(2);i.writeUInt16BE(r.byteLength);const a=t.concat([i,r]);return e.streamEncode.bytes=a.byteLength,a},e.streamEncode.bytes=0,e.streamDecode=function(t){const n=t.readUInt16BE(0);if(t.byteLength<n+2)return null;const r=e.decode(t.slice(2));return e.streamDecode.bytes=e.decode.bytes,r},e.streamDecode.bytes=0}(pb)),pb}var Nb=function(){if(Ob)return Ab;Ob=1;const e=D,t=s,n=Ib(),r=f;function i(t){if(!(this instanceof i))return new i(t);t||(t={}),r.EventEmitter.call(this);const n=this;function a(){n._ontimeoutCheck()}function s(){n._interval=setInterval(a,n.timeoutChecks),n.emit("listening")}this.retries=void 0!==t.retries?t.retries:5,this.timeout=t.timeout||7500,this.timeoutChecks=t.timeoutChecks||this.timeout/10,this.destroyed=!1,this.inflight=0,this.maxQueries=t.maxQueries||1e4,this.maxRedirects=t.maxRedirects||0,this.socket=t.socket||e.createSocket("udp4"),this._id=Math.ceil(Math.random()*this.maxQueries),this._queries=new Array(this.maxQueries).fill(null),this._interval=null,this.socket.on("error",function(e){"EACCES"===e.code||"EADDRINUSE"===e.code?n.emit("error",e):n.emit("warning",e)}),this.socket.on("message",function(e,t){n._onmessage(e,t)}),!function(e){try{return 0!==e.address().port}catch(e){return!1}}(this.socket)?this.socket.on("listening",s):s(),this.socket.on("close",function(){n.emit("close")})}function a(){}return Ab=i,t.inherits(i,r.EventEmitter),i.RECURSION_DESIRED=i.prototype.RECURSION_DESIRED=n.RECURSION_DESIRED,i.RECURSION_AVAILABLE=i.prototype.RECURSION_AVAILABLE=n.RECURSION_AVAILABLE,i.TRUNCATED_RESPONSE=i.prototype.TRUNCATED_RESPONSE=n.TRUNCATED_RESPONSE,i.AUTHORITATIVE_ANSWER=i.prototype.AUTHORITATIVE_ANSWER=n.AUTHORITATIVE_ANSWER,i.AUTHENTIC_DATA=i.prototype.AUTHENTIC_DATA=n.AUTHENTIC_DATA,i.CHECKING_DISABLED=i.prototype.CHECKING_DISABLED=n.CHECKING_DISABLED,i.prototype.address=function(){return this.socket.address()},i.prototype.bind=function(...e){const t=e.length>0&&e[e.length-1];"function"==typeof t?(this.once("listening",t),this.socket.bind(...e.slice(0,-1))):this.socket.bind(...e)},i.prototype.destroy=function(e){if(e&&this.once("close",e),!this.destroyed){this.destroyed=!0,clearInterval(this._interval),this.socket.close();for(let e=0;e<this.maxQueries;e++){const t=this._queries[e];t&&(t.callback(new Error("Socket destroyed")),this._queries[e]=null)}this.inflight=0}},i.prototype._ontimeoutCheck=function(){const e=Date.now();for(let t=0;t<this.maxQueries;t++){const n=this._queries[t];!n||e-n.firstTry<(n.tries+1)*this.timeout||(n.tries>this.retries?(this._queries[t]=null,this.inflight--,this.emit("timeout",n.query,n.port,n.host),n.callback(new Error("Query timed out"))):(n.tries++,this.socket.send(n.buffer,0,n.buffer.length,n.port,Array.isArray(n.host)?n.host[Math.floor(n.host.length*Math.random())]:n.host||"127.0.0.1")))}},i.prototype._shouldRedirect=function(e,t){if(this.maxRedirects<=0||!e||1!==e.query.questions.length||t.answers.filter(e=>"A"===e.type).length>0)return!1;if(e.redirects>this.maxRedirects)return!1;const r=t.answers.filter(e=>"CNAME"===e.type);if(0===r.length)return!1;const i=this._getNextEmptyId();return-1===i?(e.callback(new Error("Query array is full!")),!0):(e.query={id:i+1,flags:n.RECURSION_DESIRED,questions:[{type:"A",name:r[0].data}]},e.redirects++,e.firstTry=Date.now(),e.tries=0,e.buffer=n.encode(e.query),this._queries[i]=e,this.socket.send(e.buffer,0,e.buffer.length,e.port,Array.isArray(e.host)?e.host[Math.floor(e.host.length*Math.random())]:e.host||"127.0.0.1"),!0)},i.prototype._onmessage=function(e,t){let r;try{r=n.decode(e)}catch(e){return void this.emit("warning",e)}if("response"===r.type&&r.id){const e=this._queries[r.id-1];e&&(this._queries[r.id-1]=null,this.inflight--,this._shouldRedirect(e,r)||e.callback(null,r))}this.emit(r.type,r,t.port,t.address)},i.prototype.unref=function(){this.socket.unref()},i.prototype.ref=function(){this.socket.ref()},i.prototype.response=function(e,t,r,i){if(this.destroyed)return;t.type="response",t.id=e.id;const a=n.encode(t);this.socket.send(a,0,a.length,r,i)},i.prototype.cancel=function(e){const t=this._queries[e];t&&(this._queries[e]=null,this.inflight--,t.callback(new Error("Query cancelled")))},i.prototype.setRetries=function(e,t){const n=this._queries[e];n&&(n.firstTry=n.firstTry-this.timeout*(t-n.retries),n.retries=this.retries-t)},i.prototype._getNextEmptyId=function(){let e=-1;for(let t=this.maxQueries;t>0;t--){const n=(this._id+t)%this.maxQueries;if(null===this._queries[n]){e=n,this._id=(n+1)%this.maxQueries;break}}return e},i.prototype.query=function(e,t,r,s){if(this.destroyed)return s(new Error("Socket destroyed")),0;this.inflight++,e.type="query",e.flags="number"==typeof e.flags?e.flags:i.RECURSION_DESIRED;const o=this._getNextEmptyId();if(-1===o)return s(new Error("Query array is full!")),0;e.id=o+1;const c=n.encode(e);return this._queries[o]={callback:s||a,redirects:0,firstTry:Date.now(),query:e,tries:0,buffer:c,port:t,host:r},this.socket.send(c,0,c.length,t,Array.isArray(r)?r[Math.floor(r.length*Math.random())]:r||"127.0.0.1"),o},Ab}(),Cb=xe(Nb);const Pb=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];const jb=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...Pb];const Lb=["null","undefined","string","number","bigint","boolean","symbol"];function $b(e){return t=>typeof t===e}const{toString:Db}=Object.prototype,Ub=e=>{const t=Db.call(e).slice(8,-1);return/HTML\w+Element/.test(t)&&Bb.domElement(e)?"HTMLElement":(n=t,jb.includes(n)?t:void 0);var n},zb=e=>t=>Ub(t)===e;function Bb(e){if(null===e)return"null";switch(typeof e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"NaN":"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol"}if(Bb.observable(e))return"Observable";if(Bb.array(e))return"Array";if(Bb.buffer(e))return"Buffer";const t=Ub(e);if(t)return t;if(e instanceof String||e instanceof Boolean||e instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Bb.undefined=$b("undefined"),Bb.string=$b("string");const Fb=$b("number");Bb.number=e=>Fb(e)&&!Bb.nan(e),Bb.positiveNumber=e=>Bb.number(e)&&e>0,Bb.negativeNumber=e=>Bb.number(e)&&e<0,Bb.bigint=$b("bigint"),Bb.function_=$b("function"),Bb.null_=e=>null===e,Bb.class_=e=>Bb.function_(e)&&e.toString().startsWith("class "),Bb.boolean=e=>!0===e||!1===e,Bb.symbol=$b("symbol"),Bb.numericString=e=>Bb.string(e)&&!Bb.emptyStringOrWhitespace(e)&&!Number.isNaN(Number(e)),Bb.array=(e,t)=>!!Array.isArray(e)&&(!Bb.function_(t)||e.every(e=>t(e))),Bb.buffer=e=>e?.constructor?.isBuffer?.(e)??!1,Bb.blob=e=>zb("Blob")(e),Bb.nullOrUndefined=e=>Bb.null_(e)||Bb.undefined(e),Bb.object=e=>!Bb.null_(e)&&("object"==typeof e||Bb.function_(e)),Bb.iterable=e=>Bb.function_(e?.[Symbol.iterator]),Bb.asyncIterable=e=>Bb.function_(e?.[Symbol.asyncIterator]),Bb.generator=e=>Bb.iterable(e)&&Bb.function_(e?.next)&&Bb.function_(e?.throw),Bb.asyncGenerator=e=>Bb.asyncIterable(e)&&Bb.function_(e.next)&&Bb.function_(e.throw),Bb.nativePromise=e=>zb("Promise")(e);Bb.promise=e=>Bb.nativePromise(e)||(e=>Bb.function_(e?.then)&&Bb.function_(e?.catch))(e),Bb.generatorFunction=zb("GeneratorFunction"),Bb.asyncGeneratorFunction=e=>"AsyncGeneratorFunction"===Ub(e),Bb.asyncFunction=e=>"AsyncFunction"===Ub(e),Bb.boundFunction=e=>Bb.function_(e)&&!e.hasOwnProperty("prototype"),Bb.regExp=zb("RegExp"),Bb.date=zb("Date"),Bb.error=zb("Error"),Bb.map=e=>zb("Map")(e),Bb.set=e=>zb("Set")(e),Bb.weakMap=e=>zb("WeakMap")(e),Bb.weakSet=e=>zb("WeakSet")(e),Bb.weakRef=e=>zb("WeakRef")(e),Bb.int8Array=zb("Int8Array"),Bb.uint8Array=zb("Uint8Array"),Bb.uint8ClampedArray=zb("Uint8ClampedArray"),Bb.int16Array=zb("Int16Array"),Bb.uint16Array=zb("Uint16Array"),Bb.int32Array=zb("Int32Array"),Bb.uint32Array=zb("Uint32Array"),Bb.float32Array=zb("Float32Array"),Bb.float64Array=zb("Float64Array"),Bb.bigInt64Array=zb("BigInt64Array"),Bb.bigUint64Array=zb("BigUint64Array"),Bb.arrayBuffer=zb("ArrayBuffer"),Bb.sharedArrayBuffer=zb("SharedArrayBuffer"),Bb.dataView=zb("DataView"),Bb.enumCase=(e,t)=>Object.values(t).includes(e),Bb.directInstanceOf=(e,t)=>Object.getPrototypeOf(e)===t.prototype,Bb.urlInstance=e=>zb("URL")(e),Bb.urlString=e=>{if(!Bb.string(e))return!1;try{return new URL(e),!0}catch{return!1}},Bb.truthy=e=>Boolean(e),Bb.falsy=e=>!e,Bb.nan=e=>Number.isNaN(e),Bb.primitive=e=>{return Bb.null_(e)||(t=typeof e,Lb.includes(t));var t},Bb.integer=e=>Number.isInteger(e),Bb.safeInteger=e=>Number.isSafeInteger(e),Bb.plainObject=e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Bb.typedArray=e=>{return t=Ub(e),Pb.includes(t);var t};Bb.arrayLike=e=>!Bb.nullOrUndefined(e)&&!Bb.function_(e)&&(e=>Bb.safeInteger(e)&&e>=0)(e.length),Bb.tupleLike=(e,t)=>!(!Bb.array(t)||!Bb.array(e)||t.length!==e.length)&&t.every((t,n)=>t(e[n])),Bb.inRange=(e,t)=>{if(Bb.number(t))return e>=Math.min(0,t)&&e<=Math.max(t,0);if(Bb.array(t)&&2===t.length)return e>=Math.min(...t)&&e<=Math.max(...t);throw new TypeError(`Invalid range: ${JSON.stringify(t)}`)};const qb=["innerHTML","ownerDocument","style","attributes","nodeValue"];Bb.domElement=e=>Bb.object(e)&&1===e.nodeType&&Bb.string(e.nodeName)&&!Bb.plainObject(e)&&qb.every(t=>t in e),Bb.observable=e=>!!e&&(e===e[Symbol.observable]?.()||e===e["@@observable"]?.()),Bb.nodeStream=e=>Bb.object(e)&&Bb.function_(e.pipe)&&!Bb.observable(e),Bb.infinite=e=>e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY;const Hb=e=>t=>Bb.integer(t)&&Math.abs(t%2)===e;Bb.evenInteger=Hb(0),Bb.oddInteger=Hb(1),Bb.emptyArray=e=>Bb.array(e)&&0===e.length,Bb.nonEmptyArray=e=>Bb.array(e)&&e.length>0,Bb.emptyString=e=>Bb.string(e)&&0===e.length;Bb.emptyStringOrWhitespace=e=>Bb.emptyString(e)||(e=>Bb.string(e)&&!/\S/.test(e))(e),Bb.nonEmptyString=e=>Bb.string(e)&&e.length>0,Bb.nonEmptyStringAndNotWhitespace=e=>Bb.string(e)&&!Bb.emptyStringOrWhitespace(e),Bb.emptyObject=e=>Bb.object(e)&&!Bb.map(e)&&!Bb.set(e)&&0===Object.keys(e).length,Bb.nonEmptyObject=e=>Bb.object(e)&&!Bb.map(e)&&!Bb.set(e)&&Object.keys(e).length>0,Bb.emptySet=e=>Bb.set(e)&&0===e.size,Bb.nonEmptySet=e=>Bb.set(e)&&e.size>0,Bb.emptyMap=e=>Bb.map(e)&&0===e.size,Bb.nonEmptyMap=e=>Bb.map(e)&&e.size>0,Bb.propertyKey=e=>Bb.any([Bb.string,Bb.number,Bb.symbol],e),Bb.formData=e=>zb("FormData")(e),Bb.urlSearchParams=e=>zb("URLSearchParams")(e);const Yb=(e,t,n)=>{if(!Bb.function_(t))throw new TypeError(`Invalid predicate: ${JSON.stringify(t)}`);if(0===n.length)throw new TypeError("Invalid number of values");return e.call(n,t)};Bb.any=(e,...t)=>(Bb.array(e)?e:[e]).some(e=>Yb(Array.prototype.some,e,t)),Bb.all=(e,...t)=>Yb(Array.prototype.every,e,t);const Vb=(e,t,n,r={})=>{if(!e){const{multipleValues:e}=r,i=e?`received values of types ${[...new Set(n.map(e=>`\`${Bb(e)}\``))].join(", ")}`:`received value of type \`${Bb(n)}\``;throw new TypeError(`Expected value which is \`${t}\`, ${i}.`)}},Kb={undefined:e=>Vb(Bb.undefined(e),"undefined",e),string:e=>Vb(Bb.string(e),"string",e),number:e=>Vb(Bb.number(e),"number",e),positiveNumber:e=>Vb(Bb.positiveNumber(e),"positive number",e),negativeNumber:e=>Vb(Bb.negativeNumber(e),"negative number",e),bigint:e=>Vb(Bb.bigint(e),"bigint",e),function_:e=>Vb(Bb.function_(e),"Function",e),null_:e=>Vb(Bb.null_(e),"null",e),class_:e=>Vb(Bb.class_(e),"Class",e),boolean:e=>Vb(Bb.boolean(e),"boolean",e),symbol:e=>Vb(Bb.symbol(e),"symbol",e),numericString:e=>Vb(Bb.numericString(e),"string with a number",e),array:(e,t)=>{Vb(Bb.array(e),"Array",e),t&&e.forEach(t)},buffer:e=>Vb(Bb.buffer(e),"Buffer",e),blob:e=>Vb(Bb.blob(e),"Blob",e),nullOrUndefined:e=>Vb(Bb.nullOrUndefined(e),"null or undefined",e),object:e=>Vb(Bb.object(e),"Object",e),iterable:e=>Vb(Bb.iterable(e),"Iterable",e),asyncIterable:e=>Vb(Bb.asyncIterable(e),"AsyncIterable",e),generator:e=>Vb(Bb.generator(e),"Generator",e),asyncGenerator:e=>Vb(Bb.asyncGenerator(e),"AsyncGenerator",e),nativePromise:e=>Vb(Bb.nativePromise(e),"native Promise",e),promise:e=>Vb(Bb.promise(e),"Promise",e),generatorFunction:e=>Vb(Bb.generatorFunction(e),"GeneratorFunction",e),asyncGeneratorFunction:e=>Vb(Bb.asyncGeneratorFunction(e),"AsyncGeneratorFunction",e),asyncFunction:e=>Vb(Bb.asyncFunction(e),"AsyncFunction",e),boundFunction:e=>Vb(Bb.boundFunction(e),"Function",e),regExp:e=>Vb(Bb.regExp(e),"RegExp",e),date:e=>Vb(Bb.date(e),"Date",e),error:e=>Vb(Bb.error(e),"Error",e),map:e=>Vb(Bb.map(e),"Map",e),set:e=>Vb(Bb.set(e),"Set",e),weakMap:e=>Vb(Bb.weakMap(e),"WeakMap",e),weakSet:e=>Vb(Bb.weakSet(e),"WeakSet",e),weakRef:e=>Vb(Bb.weakRef(e),"WeakRef",e),int8Array:e=>Vb(Bb.int8Array(e),"Int8Array",e),uint8Array:e=>Vb(Bb.uint8Array(e),"Uint8Array",e),uint8ClampedArray:e=>Vb(Bb.uint8ClampedArray(e),"Uint8ClampedArray",e),int16Array:e=>Vb(Bb.int16Array(e),"Int16Array",e),uint16Array:e=>Vb(Bb.uint16Array(e),"Uint16Array",e),int32Array:e=>Vb(Bb.int32Array(e),"Int32Array",e),uint32Array:e=>Vb(Bb.uint32Array(e),"Uint32Array",e),float32Array:e=>Vb(Bb.float32Array(e),"Float32Array",e),float64Array:e=>Vb(Bb.float64Array(e),"Float64Array",e),bigInt64Array:e=>Vb(Bb.bigInt64Array(e),"BigInt64Array",e),bigUint64Array:e=>Vb(Bb.bigUint64Array(e),"BigUint64Array",e),arrayBuffer:e=>Vb(Bb.arrayBuffer(e),"ArrayBuffer",e),sharedArrayBuffer:e=>Vb(Bb.sharedArrayBuffer(e),"SharedArrayBuffer",e),dataView:e=>Vb(Bb.dataView(e),"DataView",e),enumCase:(e,t)=>Vb(Bb.enumCase(e,t),"EnumCase",e),urlInstance:e=>Vb(Bb.urlInstance(e),"URL",e),urlString:e=>Vb(Bb.urlString(e),"string with a URL",e),truthy:e=>Vb(Bb.truthy(e),"truthy",e),falsy:e=>Vb(Bb.falsy(e),"falsy",e),nan:e=>Vb(Bb.nan(e),"NaN",e),primitive:e=>Vb(Bb.primitive(e),"primitive",e),integer:e=>Vb(Bb.integer(e),"integer",e),safeInteger:e=>Vb(Bb.safeInteger(e),"integer",e),plainObject:e=>Vb(Bb.plainObject(e),"plain object",e),typedArray:e=>Vb(Bb.typedArray(e),"TypedArray",e),arrayLike:e=>Vb(Bb.arrayLike(e),"array-like",e),tupleLike:(e,t)=>Vb(Bb.tupleLike(e,t),"tuple-like",e),domElement:e=>Vb(Bb.domElement(e),"HTMLElement",e),observable:e=>Vb(Bb.observable(e),"Observable",e),nodeStream:e=>Vb(Bb.nodeStream(e),"Node.js Stream",e),infinite:e=>Vb(Bb.infinite(e),"infinite number",e),emptyArray:e=>Vb(Bb.emptyArray(e),"empty array",e),nonEmptyArray:e=>Vb(Bb.nonEmptyArray(e),"non-empty array",e),emptyString:e=>Vb(Bb.emptyString(e),"empty string",e),emptyStringOrWhitespace:e=>Vb(Bb.emptyStringOrWhitespace(e),"empty string or whitespace",e),nonEmptyString:e=>Vb(Bb.nonEmptyString(e),"non-empty string",e),nonEmptyStringAndNotWhitespace:e=>Vb(Bb.nonEmptyStringAndNotWhitespace(e),"non-empty string and not whitespace",e),emptyObject:e=>Vb(Bb.emptyObject(e),"empty object",e),nonEmptyObject:e=>Vb(Bb.nonEmptyObject(e),"non-empty object",e),emptySet:e=>Vb(Bb.emptySet(e),"empty set",e),nonEmptySet:e=>Vb(Bb.nonEmptySet(e),"non-empty set",e),emptyMap:e=>Vb(Bb.emptyMap(e),"empty map",e),nonEmptyMap:e=>Vb(Bb.nonEmptyMap(e),"non-empty map",e),propertyKey:e=>Vb(Bb.propertyKey(e),"PropertyKey",e),formData:e=>Vb(Bb.formData(e),"FormData",e),urlSearchParams:e=>Vb(Bb.urlSearchParams(e),"URLSearchParams",e),evenInteger:e=>Vb(Bb.evenInteger(e),"even integer",e),oddInteger:e=>Vb(Bb.oddInteger(e),"odd integer",e),directInstanceOf:(e,t)=>Vb(Bb.directInstanceOf(e,t),"T",e),inRange:(e,t)=>Vb(Bb.inRange(e,t),"in range",e),any:(e,...t)=>Vb(Bb.any(e,...t),"predicate returns truthy for any value",t,{multipleValues:!0}),all:(e,...t)=>Vb(Bb.all(e,...t),"predicate returns truthy for all values",t,{multipleValues:!0})};Object.defineProperties(Bb,{class:{value:Bb.class_},function:{value:Bb.function_},null:{value:Bb.null_}}),Object.defineProperties(Kb,{class:{value:Kb.class_},function:{value:Kb.function_},null:{value:Kb.null_}});let Gb=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}};class Wb{static fn(e){return(...t)=>new Wb((n,r,i)=>{t.push(i),e(...t).then(n,r)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((t,n)=>{this._reject=n;const r=e=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(e)};Object.defineProperties(r,{shouldReject:{get:()=>this._rejectOnCancel,set:e=>{this._rejectOnCancel=e}}}),e(e=>{this._isCanceled&&r.shouldReject||(this._isPending=!1,t(e))},e=>{this._isPending=!1,n(e)},r)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(this._isPending&&!this._isCanceled){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(const e of this._cancelHandlers)e()}catch(e){return void this._reject(e)}this._rejectOnCancel&&this._reject(new Gb(e))}}get isCanceled(){return this._isCanceled}}Object.setPrototypeOf(Wb.prototype,Promise.prototype);let Jb=class extends Error{constructor(e,t,n){var r;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=t.code??"ERR_GOT_REQUEST_ERROR",this.input=t.input,r=n,Bb.object(r)&&"_onResponse"in r?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n.response}),this.options=n.options):this.options=n,this.timings=this.request?.timings,Bb.string(t.stack)&&Bb.string(this.stack)){const e=this.stack.indexOf(this.message)+this.message.length,n=this.stack.slice(e).split("\n").reverse(),r=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split("\n").reverse();for(;r.length>0&&r[0]===n[0];)n.shift();this.stack=`${this.stack.slice(0,e)}${n.reverse().join("\n")}${r.reverse().join("\n")}`}}};class Zb extends Jb{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}}class Xb extends Jb{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}}let Qb=class extends Jb{constructor(e,t){super(e.message,e,t),this.name="CacheError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_CACHE_ACCESS":this.code}};class ev extends Jb{constructor(e,t){super(e.message,e,t),this.name="UploadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_UPLOAD":this.code}}let tv=class extends Jb{constructor(e,t,n){super(e.message,e,n),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.event=e.event,this.timings=t}};class nv extends Jb{constructor(e,t){super(e.message,e,t),this.name="ReadError",this.code="ERR_GOT_REQUEST_ERROR"===this.code?"ERR_READING_RESPONSE_STREAM":this.code}}class rv extends Jb{constructor(e){super("Retrying",{},e),this.name="RetryError",this.code="ERR_RETRYING"}}class iv extends Jb{constructor(e){super("This operation was aborted.",{},e),this.code="ERR_ABORTED",this.name="AbortError"}}var av,sv={exports:{}};var ov=(av||(av=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=(e,t)=>{let n;n="function"==typeof t?{connect:t}:t;const r="function"==typeof n.connect,i="function"==typeof n.secureConnect,a="function"==typeof n.close,s=()=>{r&&n.connect(),function(e){return e.encrypted}(e)&&i&&(e.authorized?n.secureConnect():e.authorizationError||e.once("secureConnect",n.secureConnect)),a&&e.once("close",n.close)};e.writable&&!e.connecting?s():e.connecting?e.once("connect",s):e.destroyed&&a&&n.close(e._hadError)};t.default=n,e.exports=n,e.exports.default=n}(sv,sv.exports)),sv.exports),cv=xe(ov);const uv=(e,t)=>t.some(t=>t instanceof RegExp?t.test(e):t===e),lv=new Set(["https:","http:","file:"]);function pv(e,t){if("string"!=typeof(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t}).defaultProtocol||t.defaultProtocol.endsWith(":")||(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return((e,{stripHash:t})=>{const n=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!n)throw new Error(`Invalid URL: ${e}`);let{type:r,data:i,hash:a}=n.groups;const s=r.split(";");a=t?"":a;let o=!1;"base64"===s[s.length-1]&&(s.pop(),o=!0);const c=s.shift()?.toLowerCase()??"",u=s.map(e=>{let[t,n=""]=e.split("=").map(e=>e.trim());return"charset"===t&&(n=n.toLowerCase(),"us-ascii"===n)?"":`${t}${n?`=${n}`:""}`}).filter(Boolean),l=[...u];return o&&l.push("base64"),(l.length>0||c&&"text/plain"!==c)&&l.unshift(c),`data:${l.join(";")},${o?i.trim():i}${a?`#${a}`:""}`})(e,t);if((e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!lv.has(t)}catch{return!1}})(e))return e;const n=e.startsWith("//");!n&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const r=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===r.protocol&&(r.protocol="http:"),t.forceHttps&&"http:"===r.protocol&&(r.protocol="https:"),t.stripAuthentication&&(r.username="",r.password=""),t.stripHash?r.hash="":t.stripTextFragment&&(r.hash=r.hash.replace(/#?:~:text.*?$/i,"")),r.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,n="";for(;;){const i=e.exec(r.pathname);if(!i)break;const a=i[0],s=i.index;n+=r.pathname.slice(t,s).replace(/\/{2,}/g,"/"),n+=a,t=s+a.length}n+=r.pathname.slice(t,r.pathname.length).replace(/\/{2,}/g,"/"),r.pathname=n}if(r.pathname)try{r.pathname=decodeURI(r.pathname).replace(/\\/g,"%5C")}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=r.pathname.split("/");const n=e[e.length-1];uv(n,t.removeDirectoryIndex)&&(e=e.slice(0,-1),r.pathname=e.slice(1).join("/")+"/")}if(r.hostname&&(r.hostname=r.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(r.hostname)&&(r.hostname=r.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const e of[...r.searchParams.keys()])uv(e,t.removeQueryParameters)&&r.searchParams.delete(e);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(r.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const e of[...r.searchParams.keys()])uv(e,t.keepQueryParameters)||r.searchParams.delete(e);if(t.sortQueryParameters){r.searchParams.sort();try{r.search=decodeURIComponent(r.search)}catch{}}t.removeTrailingSlash&&(r.pathname=r.pathname.replace(/\/$/,"")),t.removeExplicitPort&&r.port&&(r.port="");const i=e;return e=r.toString(),t.removeSingleSlash||"/"!==r.pathname||i.endsWith("/")||""!==r.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===r.pathname)&&""===r.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),n&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}var dv,fv,hv,mv={exports:{}};function yv(){if(fv)return dv;fv=1;const{PassThrough:e}=p;return dv=t=>{t={...t};const{array:n}=t;let{encoding:r}=t;const i="buffer"===r;let a=!1;n?a=!(r||i):r=r||"utf8",i&&(r=null);const s=new e({objectMode:a});r&&s.setEncoding(r);let o=0;const c=[];return s.on("data",e=>{c.push(e),a?o=c.length:o+=e.length}),s.getBufferedValue=()=>n?c:i?Buffer.concat(c,o):c.join(""),s.getBufferedLength=()=>o,s},dv}var gv,bv,vv=function(){if(hv)return mv.exports;hv=1;const{constants:e}=d,t=p,{promisify:n}=s,r=yv(),i=n(t.pipeline);class a extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function o(t,n){if(!t)throw new Error("Expected a stream");n={maxBuffer:1/0,...n};const{maxBuffer:s}=n,o=r(n);return await new Promise((n,r)=>{const c=t=>{t&&o.getBufferedLength()<=e.MAX_LENGTH&&(t.bufferedData=o.getBufferedValue()),r(t)};(async()=>{try{await i(t,o),n()}catch(e){c(e)}})(),o.on("data",()=>{o.getBufferedLength()>s&&c(new a)})}),o.getBufferedValue()}return mv.exports=o,mv.exports.buffer=(e,t)=>o(e,{...t,encoding:"buffer"}),mv.exports.array=(e,t)=>o(e,{...t,array:!0}),mv.exports.MaxBufferError=a,mv.exports}(),wv=xe(vv);var xv=xe(function(){if(bv)return gv;bv=1;const e=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),t=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),r={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},i={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function a(e){const t=parseInt(e,10);return isFinite(t)?t:0}function s(e){const t={};if(!e)return t;const n=e.trim().split(/,/);for(const e of n){const[n,r]=e.split(/=/,2);t[n.trim()]=void 0===r||r.trim().replace(/^"|"$/g,"")}return t}function o(e){let t=[];for(const n in e){const r=e[n];t.push(!0===r?n:n+"="+r)}if(t.length)return t.join(", ")}return gv=class{constructor(e,t,{shared:n,cacheHeuristic:r,immutableMinTimeToLive:i,ignoreCargoCult:a,_fromObject:c}={}){if(c)this._fromObject(c);else{if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=!1!==n,this._ignoreCargoCult=!!a,this._cacheHeuristic=void 0!==r?r:.1,this._immutableMinTtl=void 0!==i?i:864e5,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=s(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=s(e.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":o(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),null==t.headers["cache-control"]&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}}now(){return Date.now()}storable(){return!(this._reqcc["no-store"]||!("GET"===this._method||"HEAD"===this._method||"POST"===this._method&&this._hasExplicitExpiration())||!t.has(this._status)||this._rescc["no-store"]||this._isShared&&this._rescc.private||this._isShared&&!this._noAuthorization&&!this._allowsStoringAuthenticated()||!(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||e.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){return!this.evaluateRequest(e).revalidation}_evaluateRequestHitResult(e){return{response:{headers:this.responseHeaders()},revalidation:e}}_evaluateRequestRevalidation(e,t){return{synchronous:t,headers:this.revalidationHeaders(e)}}_evaluateRequestMissResult(e){return{response:void 0,revalidation:this._evaluateRequestRevalidation(e,!0)}}evaluateRequest(e){if(this._assertRequestHasHeaders(e),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(e);if(!this._requestMatches(e,!1))return this._evaluateRequestMissResult(e);const t=s(e.headers["cache-control"]);if(t["no-cache"]||/no-cache/.test(e.headers.pragma))return this._evaluateRequestMissResult(e);if(t["max-age"]&&this.age()>a(t["max-age"]))return this._evaluateRequestMissResult(e);if(t["min-fresh"]&&this.maxAge()-this.age()<a(t["min-fresh"]))return this._evaluateRequestMissResult(e);if(this.stale()){return"max-stale"in t&&(!0===t["max-stale"]||t["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(e,!1)):this._evaluateRequestMissResult(e)}return this._evaluateRequestHitResult(void 0)}_requestMatches(e,t){return!(this._url&&this._url!==e.url||this._host!==e.headers.host||e.method&&this._method!==e.method&&(!t||"HEAD"!==e.method)||!this._varyMatches(e))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(e){if(!this._resHeaders.vary)return!0;if("*"===this._resHeaders.vary)return!1;const t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(const n of t)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){const t={};for(const n in e)r[n]||(t[n]=e[n]);if(e.connection){const n=e.connection.trim().split(/\s*,\s*/);for(const e of n)delete t[e]}if(t.warning){const e=t.warning.split(/,/).filter(e=>!/^\s*1[0-9][0-9]/.test(e));e.length?t.warning=e.join(",").trim():delete t.warning}return t}responseHeaders(){const e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>86400&&!this._hasExplicitExpiration()&&this.maxAge()>86400&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){const e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){return this._ageValue()+(this.now()-this._responseTime)/1e3}_ageValue(){return a(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"])return 0;if(this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable)return 0;if("*"===this._resHeaders.vary)return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return a(this._rescc["s-maxage"])}if(this._rescc["max-age"])return a(this._rescc["max-age"]);const e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){const n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||n<t?0:Math.max(e,(n-t)/1e3)}if(this._resHeaders["last-modified"]){const n=Date.parse(this._resHeaders["last-modified"]);if(isFinite(n)&&t>n)return Math.max(e,(t-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){const e=this.maxAge()-this.age(),t=e+a(this._rescc["stale-if-error"]),n=e+a(this._rescc["stale-while-revalidate"]);return Math.round(1e3*Math.max(0,e,t,n))}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+a(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){const e=a(this._rescc["stale-while-revalidate"]);return e>0&&this.maxAge()+e>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||1!==e.v)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=void 0!==e.imm?e.imm:864e5,this._ignoreCargoCult=!!e.icc,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);const t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag);if(t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&"GET"!=this._method){if(delete t["if-modified-since"],t["if-none-match"]){const e=t["if-none-match"].split(/,/).filter(e=>!/^\s*W\//.test(e));e.length?t["if-none-match"]=e.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&function(e){return!e||n.has(e.status)}(t))return{policy:this,modified:!1,matches:!0};if(!t||!t.headers)throw Error("Response headers missing");let r=!1;void 0!==t.status&&304!=t.status?r=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?r=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?r=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?r=this._resHeaders["last-modified"]===t.headers["last-modified"]:this._resHeaders.etag||this._resHeaders["last-modified"]||t.headers.etag||t.headers["last-modified"]||(r=!0);const a={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!r)return{policy:new this.constructor(e,t,a),modified:304!=t.status,matches:!1};const s={};for(const e in this._resHeaders)s[e]=e in t.headers&&!i[e]?t.headers[e]:this._resHeaders[e];const o=Object.assign({},t,{status:this._status,method:this._method,headers:s});return{policy:new this.constructor(e,o,a),modified:!1,matches:!0}}}}());function _v(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLowerCase(),t]))}class Tv extends H{statusCode;headers;body;url;constructor({statusCode:e,headers:t,body:n,url:r}){if("number"!=typeof e)throw new TypeError("Argument `statusCode` should be a number");if("object"!=typeof t)throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Uint8Array))throw new TypeError("Argument `body` should be a buffer");if("string"!=typeof r)throw new TypeError("Argument `url` should be a string");super({read(){this.push(n),this.push(null)}}),this.statusCode=e,this.headers=_v(t),this.body=n,this.url=r}}var Ev,Sv,kv,Mv={};var Av=function(){if(kv)return Sv;kv=1;const e=f,t=(Ev||(Ev=1,Mv.stringify=function e(t){if(void 0===t)return t;if(t&&Buffer.isBuffer(t))return JSON.stringify(":base64:"+t.toString("base64"));if(t&&t.toJSON&&(t=t.toJSON()),t&&"object"==typeof t){var n="",r=Array.isArray(t);n=r?"[":"{";var i=!0;for(var a in t){var s="function"==typeof t[a]||!r&&void 0===t[a];Object.hasOwnProperty.call(t,a)&&!s&&(i||(n+=","),i=!1,r?null==t[a]?n+="null":n+=e(t[a]):void 0!==t[a]&&(n+=e(a)+":"+e(t[a])))}return n+(r?"]":"}")}return"string"==typeof t?JSON.stringify(/^:/.test(t)?":"+t:t):void 0===t?"null":JSON.stringify(t)},Mv.parse=function(e){return JSON.parse(e,function(e,t){return"string"==typeof t?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t})}),Mv),n=["sqlite","postgres","mysql","mongo","redis","tiered"];return Sv=class extends e{constructor(e,{emitErrors:n=!0,...r}={}){if(super(),this.opts={namespace:"keyv",serialize:t.stringify,deserialize:t.parse,..."string"==typeof e?{uri:e}:e,...r},!this.opts.store){const e={...this.opts};this.opts.store=(e=>{const t={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(e.adapter||e.uri)return new(Xs(t[e.adapter||/^[^:+]*/.exec(e.uri)[0]]))(e);return new Map})(e)}if(this.opts.compression){const e=this.opts.compression;this.opts.serialize=e.serialize.bind(e),this.opts.deserialize=e.deserialize.bind(e)}"function"==typeof this.opts.store.on&&n&&this.opts.store.on("error",e=>this.emit("error",e)),this.opts.store.namespace=this.opts.namespace;const i=e=>async function*(){for await(const[t,n]of"function"==typeof e?e(this.opts.store.namespace):e){const e=await this.opts.deserialize(n);this.opts.store.namespace&&!t.includes(this.opts.store.namespace)||("number"==typeof e.expires&&Date.now()>e.expires?this.delete(t):yield[this._getKeyUnprefix(t),e.value])}};"function"==typeof this.opts.store[Symbol.iterator]&&this.opts.store instanceof Map?this.iterator=i(this.opts.store):"function"==typeof this.opts.store.iterator&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=i(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return n.includes(this.opts.store.opts.dialect)||n.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(e=>`${this.opts.namespace}:${e}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){const{store:n}=this.opts,r=Array.isArray(e),i=r?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(r&&void 0===n.getMany){const e=[];for(const r of i)e.push(Promise.resolve().then(()=>n.get(r)).then(e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e).then(e=>{if(null!=e)return"number"==typeof e.expires&&Date.now()>e.expires?this.delete(r).then(()=>{}):t&&t.raw?e:e.value}));return Promise.allSettled(e).then(e=>{const t=[];for(const n of e)t.push(n.value);return t})}return Promise.resolve().then(()=>r?n.getMany(i):n.get(i)).then(e=>"string"==typeof e||this.opts.compression?this.opts.deserialize(e):e).then(n=>{if(null!=n)return r?n.map((n,r)=>{if("string"==typeof n&&(n=this.opts.deserialize(n)),null!=n){if(!("number"==typeof n.expires&&Date.now()>n.expires))return t&&t.raw?n:n.value;this.delete(e[r]).then(()=>{})}}):"number"==typeof n.expires&&Date.now()>n.expires?this.delete(e).then(()=>{}):t&&t.raw?n:n.value})}set(e,t,n){const r=this._getKeyPrefix(e);void 0===n&&(n=this.opts.ttl),0===n&&(n=void 0);const{store:i}=this.opts;return Promise.resolve().then(()=>{const e="number"==typeof n?Date.now()+n:null;return"symbol"==typeof t&&this.emit("error","symbol cannot be serialized"),t={value:t,expires:e},this.opts.serialize(t)}).then(e=>i.set(r,e,n)).then(()=>!0)}delete(e){const{store:t}=this.opts;if(Array.isArray(e)){const n=this._getKeyPrefixArray(e);if(void 0===t.deleteMany){const e=[];for(const r of n)e.push(t.delete(r));return Promise.allSettled(e).then(e=>e.every(e=>!0===e.value))}return Promise.resolve().then(()=>t.deleteMany(n))}const n=this._getKeyPrefix(e);return Promise.resolve().then(()=>t.delete(n))}clear(){const{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){const t=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>{if("function"==typeof n.has)return n.has(t);return void 0!==await n.get(t)})}disconnect(){const{store:e}=this.opts;if("function"==typeof e.disconnect)return e.disconnect()}},Sv}(),Ov=xe(Av);const Rv=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];class Iv extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Nv extends Error{constructor(e){super(e.message),Object.assign(this,e)}}class Cv{constructor(e,t){this.hooks=new Map,this.request=()=>(e,t)=>{let n;if("string"==typeof e)n=$v(W.parse(e)),e={};else if(e instanceof W.URL)n=$v(W.parse(e.toString())),e={};else{const[t,...r]=(e.path??"").split("?"),i=r.length>0?`?${r.join("?")}`:"";n=$v({...e,pathname:t,search:i})}(e={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...e,...Lv(n)}).headers=Object.fromEntries(Pv(e.headers).map(([e,t])=>[e.toLowerCase(),t]));const r=new U,i=pv(W.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1});let a=`${e.method}:${i}`;e.body&&void 0!==e.method&&["POST","PATCH","PUT"].includes(e.method)&&(e.body instanceof q.Readable?e.cache=!1:a+=`:${J.createHash("md5").update(e.body).digest("hex")}`);let s=!1,o=!1;const c=e=>{o=!0;let n=!1,i=()=>{};const c=new Promise(e=>{i=()=>{n||(n=!0,e())}}),u=async n=>{if(s){n.status=n.statusCode;const t=xv.fromObject(s.cachePolicy).revalidatedPolicy(e,n);if(!t.modified){n.resume(),await new Promise(e=>{n.once("end",e)});const e=Dv(t.policy.responseHeaders());(n=new Tv({statusCode:s.statusCode,headers:e,body:s.body,url:s.url})).cachePolicy=t.policy,n.fromCache=!0}}let i;n.fromCache||(n.cachePolicy=new xv(e,n,e),n.fromCache=!1),e.cache&&n.cachePolicy.storable()?(i=jv(n),(async()=>{try{const t=wv.buffer(n);await Promise.race([c,new Promise(e=>n.once("end",e)),new Promise(e=>n.once("close",e))]);const r=await t;let i={url:n.url,statusCode:n.fromCache?s.statusCode:n.statusCode,body:r,cachePolicy:n.cachePolicy.toObject()},o=e.strictTtl?n.cachePolicy.timeToLive():void 0;if(e.maxTtl&&(o=o?Math.min(o,e.maxTtl):e.maxTtl),this.hooks.size>0)for(const e of this.hooks.keys())i=await this.runHook(e,i,n);await this.cache.set(a,i,o)}catch(e){r.emit("error",new Nv(e))}})()):e.cache&&s&&(async()=>{try{await this.cache.delete(a)}catch(e){r.emit("error",new Nv(e))}})(),r.emit("response",i??n),"function"==typeof t&&t(i??n)};try{const t=this.cacheRequest(e,u);t.once("error",i),t.once("abort",i),t.once("destroy",i),r.emit("request",t)}catch(e){r.emit("error",new Iv(e))}};return(async()=>{const n=async e=>{await Promise.resolve();const n=e.cache?await this.cache.get(a):void 0;if(void 0===n&&!e.forceRefresh)return void c(e);const i=xv.fromObject(n.cachePolicy);if(i.satisfiesWithoutRevalidation(e)&&!e.forceRefresh){const e=Dv(i.responseHeaders()),a=new Tv({statusCode:n.statusCode,headers:e,body:n.body,url:n.url});a.cachePolicy=i,a.fromCache=!0,r.emit("response",a),"function"==typeof t&&t(a)}else i.satisfiesWithoutRevalidation(e)&&Date.now()>=i.timeToLive()&&e.forceRefresh?(await this.cache.delete(a),e.headers=i.revalidationHeaders(e),c(e)):(s=n,e.headers=i.revalidationHeaders(e),c(e))},i=e=>r.emit("error",new Nv(e));if(this.cache instanceof Ov){const e=this.cache;e.once("error",i),r.on("error",()=>e.removeListener("error",i)),r.on("response",()=>e.removeListener("error",i))}try{await n(e)}catch(t){e.automaticFailover&&!o&&c(e),r.emit("error",new Nv(t))}})(),r},this.addHook=(e,t)=>{this.hooks.has(e)||this.hooks.set(e,t)},this.removeHook=e=>this.hooks.delete(e),this.getHook=e=>this.hooks.get(e),this.runHook=async(e,...t)=>this.hooks.get(e)?.(...t),this.cache=t instanceof Ov?t:new Ov("string"==typeof t?{uri:t,namespace:"cacheable-request"}:{store:t,namespace:"cacheable-request"}),this.request=this.request.bind(this),this.cacheRequest=e}}const Pv=Object.entries,jv=e=>{const t=new Y({autoDestroy:!1});return function(e,t){if(t._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const n=new Set([...Object.keys(e),...Rv]),r={};for(const i of n)i in t||(r[i]={get(){const t=e[i];return"function"==typeof t?t.bind(e):t},set(t){e[i]=t},enumerable:!0,configurable:!1});Object.defineProperties(t,r),e.once("aborted",()=>{t.destroy(),t.emit("aborted")}),e.once("close",()=>{e.complete&&t.readable?t.once("end",()=>{t.emit("close")}):t.emit("close")})}(e,t),e.pipe(t)},Lv=e=>{const t={...e};return t.path=`${e.pathname||"/"}${e.search||""}`,delete t.pathname,delete t.search,t},$v=e=>({protocol:e.protocol,auth:e.auth,hostname:e.hostname||e.host||"localhost",port:e.port,pathname:e.pathname,search:e.search}),Dv=e=>{const t=[];for(const n of Object.keys(e))t[n.toLowerCase()]=e[n];return t};var Uv,zv,Bv,Fv;function qv(){if(zv)return Uv;zv=1;const e=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];return Uv=(t,n)=>{if(n._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");const r=new Set(Object.keys(t).concat(e)),i={};for(const e of r)e in n||(i[e]={get(){const n=t[e];return"function"==typeof n?n.bind(t):n},set(n){t[e]=n},enumerable:!0,configurable:!1});return Object.defineProperties(n,i),t.once("aborted",()=>{n.destroy(),n.emit("aborted")}),t.once("close",()=>{t.complete&&n.readable?n.once("end",()=>{n.emit("close")}):n.emit("close")}),n}}var Hv=function(){if(Fv)return Bv;Fv=1;const{Transform:e,PassThrough:t}=p,n=m,r=qv();return Bv=i=>{const a=(i.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(a))return i;const s="br"===a;if(s&&"function"!=typeof n.createBrotliDecompress)return i.destroy(new Error("Brotli is not supported on Node.js < 12")),i;let o=!0;const c=new e({transform(e,t,n){o=!1,n(null,e)},flush(e){e()}}),u=new t({autoDestroy:!1,destroy(e,t){i.destroy(),t(e)}}),l=s?n.createBrotliDecompress():n.createUnzip();return l.once("error",e=>{!o||i.readable?u.destroy(e):u.end()}),r(i,u),i.pipe(c).pipe(l).pipe(u),u}}(),Yv=xe(Hv);const Vv=e=>"function"==typeof e;const Kv=e=>{if(Vv(e[Symbol.asyncIterator]))return e;if(Vv(e.getReader))return async function*(e){const t=e.getReader();for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}(e);throw new TypeError("Unsupported data source: Expected either ReadableStream or async iterable.")},Gv="abcdefghijklmnopqrstuvwxyz0123456789";const Wv=e=>String(e).replace(/\r|\n/g,(e,t,n)=>"\r"===e&&"\n"!==n[t+1]||"\n"===e&&"\r"!==n[t-1]?"\r\n":e);function Jv(e){if("object"!==(e=>Object.prototype.toString.call(e).slice(8,-1).toLowerCase())(e))return!1;const t=Object.getPrototypeOf(e);if(null==t)return!0;return(t.constructor&&t.constructor.toString())===Object.toString()}function Zv(e,t){if("string"==typeof t)for(const[n,r]of Object.entries(e))if(t.toLowerCase()===n.toLowerCase())return r}const Xv=e=>Boolean(e&&Vv(e.constructor)&&"FormData"===e[Symbol.toStringTag]&&Vv(e.append)&&Vv(e.getAll)&&Vv(e.entries)&&Vv(e[Symbol.iterator])),Qv=e=>String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22"),ew=e=>Boolean(e&&"object"==typeof e&&Vv(e.constructor)&&"File"===e[Symbol.toStringTag]&&Vv(e.stream)&&null!=e.name);var tw,nw,rw,iw,aw,sw,ow,cw,uw,lw,pw,dw=globalThis&&globalThis.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},fw=globalThis&&globalThis.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const hw={enableAdditionalHeaders:!1},mw={writable:!1,configurable:!1};class yw{constructor(e,t,n){if(tw.add(this),nw.set(this,"\r\n"),rw.set(this,void 0),iw.set(this,void 0),aw.set(this,"-".repeat(2)),sw.set(this,new TextEncoder),ow.set(this,void 0),cw.set(this,void 0),uw.set(this,void 0),!Xv(e))throw new TypeError("Expected first argument to be a FormData instance.");let r;if(Jv(t)?n=t:r=t,r||(r=function(){let e=16,t="";for(;e--;)t+=Gv[36*Math.random()|0];return t}()),"string"!=typeof r)throw new TypeError("Expected boundary argument to be a string.");if(n&&!Jv(n))throw new TypeError("Expected options argument to be an object.");dw(this,cw,Array.from(e.entries()),"f"),dw(this,uw,{...hw,...n},"f"),dw(this,rw,fw(this,sw,"f").encode(fw(this,nw,"f")),"f"),dw(this,iw,fw(this,rw,"f").byteLength,"f"),this.boundary=`form-data-boundary-${r}`,this.contentType=`multipart/form-data; boundary=${this.boundary}`,dw(this,ow,fw(this,sw,"f").encode(`${fw(this,aw,"f")}${this.boundary}${fw(this,aw,"f")}${fw(this,nw,"f").repeat(2)}`),"f");const i={"Content-Type":this.contentType},a=fw(this,tw,"m",pw).call(this);a&&(this.contentLength=a,i["Content-Length"]=a),this.headers=(e=>new Proxy(e,{get:(e,t)=>Zv(e,t),has:(e,t)=>void 0!==Zv(e,t)}))(Object.freeze(i)),Object.defineProperties(this,{boundary:mw,contentType:mw,contentLength:mw,headers:mw})}getContentLength(){return null==this.contentLength?void 0:Number(this.contentLength)}*values(){for(const[e,t]of fw(this,cw,"f")){const n=ew(t)?t:fw(this,sw,"f").encode(Wv(t));yield fw(this,tw,"m",lw).call(this,e,n),yield n,yield fw(this,rw,"f")}yield fw(this,ow,"f")}async*encode(){for(const e of this.values())ew(e)?yield*Kv(e.stream()):yield e}[(nw=new WeakMap,rw=new WeakMap,iw=new WeakMap,aw=new WeakMap,sw=new WeakMap,ow=new WeakMap,cw=new WeakMap,uw=new WeakMap,tw=new WeakSet,lw=function(e,t){let n="";n+=`${fw(this,aw,"f")}${this.boundary}${fw(this,nw,"f")}`,n+=`Content-Disposition: form-data; name="${Qv(e)}"`,ew(t)&&(n+=`; filename="${Qv(t.name)}"${fw(this,nw,"f")}`,n+=`Content-Type: ${t.type||"application/octet-stream"}`);const r=ew(t)?t.size:t.byteLength;return!0!==fw(this,uw,"f").enableAdditionalHeaders||null==r||isNaN(r)||(n+=`${fw(this,nw,"f")}Content-Length: ${ew(t)?t.size:t.byteLength}`),fw(this,sw,"f").encode(`${n}${fw(this,nw,"f").repeat(2)}`)},pw=function(){let e=0;for(const[t,n]of fw(this,cw,"f")){const r=ew(n)?n:fw(this,sw,"f").encode(Wv(n)),i=ew(r)?r.size:r.byteLength;if(null==i||isNaN(i))return;e+=fw(this,tw,"m",lw).call(this,t,r).byteLength,e+=i,e+=fw(this,iw,"f")}return String(e+fw(this,ow,"f").byteLength)},Symbol.iterator)](){return this.values()}[Symbol.asyncIterator](){return this.encode()}}function gw(e){return Bb.nodeStream(e)&&Bb.function_(e.getBoundary)}function bw(e,t,n){const r={};for(const i of n){const n=(...e)=>{t.emit(i,...e)};r[i]=n,e.on(i,n)}return()=>{for(const[t,n]of Object.entries(r))e.off(t,n)}}const vw=Symbol("reentry"),ww=()=>{};class xw extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name="TimeoutError",this.code="ETIMEDOUT"}}const _w=({attemptCount:e,retryOptions:t,error:n,retryAfter:r,computedValue:i})=>{if("RetryError"===n.name)return 1;if(e>t.limit)return 0;const a=t.methods.includes(n.options.method),s=t.errorCodes.includes(n.code),o=n.response&&t.statusCodes.includes(n.response.statusCode);if(!a||!s&&!o)return 0;if(n.response){if(r)return r>i?0:r;if(413===n.response.statusCode)return 0}const c=Math.random()*t.noise;return Math.min(2**(e-1)*1e3,t.backoffLimit)+c},{Resolver:Tw}=te,Ew=Symbol("cacheableLookupCreateConnection"),Sw=Symbol("cacheableLookupInstance"),kw=Symbol("expires"),Mw="number"==typeof ie,Aw=e=>{if(!e||"function"!=typeof e.createConnection)throw new Error("Expected an Agent instance as the first argument")},Ow=()=>{let e=!1,t=!1;for(const n of Object.values(se.networkInterfaces()))for(const r of n)if(!r.internal&&("IPv6"===r.family?t=!0:e=!0,e&&t))return{has4:e,has6:t};return{has4:e,has6:t}},Rw=e=>e.catch(e=>{if("ENODATA"===e.code||"ENOTFOUND"===e.code||"ENOENT"===e.code)return[];throw e}),Iw={ttl:!0},Nw={all:!0},Cw={all:!0,family:4},Pw={all:!0,family:6};class jw{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:n=3600,errorTtl:r=.15,resolver:i=new Tw,lookup:a=ne}={}){if(this.maxTtl=t,this.errorTtl=r,this._cache=e,this._resolver=i,this._dnsLookup=a&&j(a),this.stats={cache:0,query:0},this._resolver instanceof Tw?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=j(this._resolver.resolve4.bind(this._resolver)),this._resolve6=j(this._resolver.resolve6.bind(this._resolver))),this._iface=Ow(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,this.fallbackDuration=n,n>0){const e=setInterval(()=>{this._hostnamesToFallback.clear()},1e3*n);e.unref&&e.unref(),this._fallbackInterval=e}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,n){if("function"==typeof t?(n=t,t={}):"number"==typeof t&&(t={family:t}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(e=>{t.all?n(null,e):n(null,e.address,e.family,e.expires,e.ttl,e.source)},n)}async lookupAsync(e,t={}){"number"==typeof t&&(t={family:t});let n=await this.query(e);if(6===t.family){const e=n.filter(e=>6===e.family);t.hints&re&&(Mw&&t.hints&ie||0===e.length)?(e=>{for(const t of e)6!==t.family&&(t.address=`::ffff:${t.address}`,t.family=6)})(n):n=e}else 4===t.family&&(n=n.filter(e=>4===e.family));if(t.hints&ae){const{_iface:e}=this;n=n.filter(t=>6===t.family?e.has6:e.has4)}if(0===n.length){const t=new Error(`cacheableLookup ENOTFOUND ${e}`);throw t.code="ENOTFOUND",t.hostname=e,t}return t.all?n:n[0]}async query(e){let t="cache",n=await this._cache.get(e);if(n&&this.stats.cache++,!n){const r=this._pending[e];if(r)this.stats.cache++,n=await r;else{t="query";const r=this.queryAndCache(e);this._pending[e]=r,this.stats.query++;try{n=await r}finally{delete this._pending[e]}}}return n=n.map(e=>({...e,source:t})),n}async _resolve(e){const[t,n]=await Promise.all([Rw(this._resolve4(e,Iw)),Rw(this._resolve6(e,Iw))]);let r=0,i=0,a=0;const s=Date.now();for(const e of t)e.family=4,e.expires=s+1e3*e.ttl,r=Math.max(r,e.ttl);for(const e of n)e.family=6,e.expires=s+1e3*e.ttl,i=Math.max(i,e.ttl);return a=t.length>0?n.length>0?Math.min(r,i):r:i,{entries:[...t,...n],cacheTtl:a}}async _lookup(e){try{const[t,n]=await Promise.all([Rw(this._dnsLookup(e,Cw)),Rw(this._dnsLookup(e,Pw))]);return{entries:[...t,...n],cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,n){if(this.maxTtl>0&&n>0){n=1e3*Math.min(n,this.maxTtl),t[kw]=Date.now()+n;try{await this._cache.set(e,t,n)}catch(e){this.lookupAsync=async()=>{const t=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw t.cause=e,t}}r=this._cache,Symbol.iterator in r&&this._tick(n)}var r}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Nw);let t=await this._resolve(e);0===t.entries.length&&this._dnsLookup&&(t=await this._lookup(e),0!==t.entries.length&&this.fallbackDuration>0&&this._hostnamesToFallback.add(e));const n=0===t.entries.length?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,n),t.entries}_tick(e){const t=this._nextRemovalTime;(!t||e<t)&&(clearTimeout(this._removalTimeout),this._nextRemovalTime=e,this._removalTimeout=setTimeout(()=>{this._nextRemovalTime=!1;let e=1/0;const t=Date.now();for(const[n,r]of this._cache){const i=r[kw];t>=i?this._cache.delete(n):i<e&&(e=i)}e!==1/0&&this._tick(e-t)},e),this._removalTimeout.unref&&this._removalTimeout.unref())}install(e){if(Aw(e),Ew in e)throw new Error("CacheableLookup has been already installed");e[Ew]=e.createConnection,e[Sw]=this,e.createConnection=(t,n)=>("lookup"in t||(t.lookup=this.lookup),e[Ew](t,n))}uninstall(e){if(Aw(e),e[Ew]){if(e[Sw]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Ew],delete e[Ew],delete e[Sw]}}updateInterfaceInfo(){const{_iface:e}=this;this._iface=Ow(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){e?this._cache.delete(e):this._cache.clear()}}var Lw,$w,Dw,Uw,zw,Bw,Fw,qw,Hw,Yw;function Vw(){if($w)return Lw;$w=1;class e{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,"function"==typeof this.onEviction)for(const[e,t]of this.oldCache.entries())this.onEviction(e,t);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}}return Lw=e}function Kw(){return Uw||(Uw=1,Dw=e=>{if(0!==e.listenerCount("error"))return e;e.__destroy=e._destroy,e._destroy=(...t)=>{const n=t.pop();e.__destroy(...t,async e=>{await Promise.resolve(),n(e)})};const t=t=>{Promise.resolve().then(()=>{e.emit("error",t)})};return e.once("error",t),Promise.resolve().then(()=>{e.off("error",t)}),e}),Dw}function Gw(){if(Bw)return zw;Bw=1;const{URL:e}=C,t=f,n=ce,r=oe,i=Vw(),a=Kw(),s=Symbol("currentStreamCount"),o=Symbol("request"),c=Symbol("cachedOriginSet"),u=Symbol("gracefullyClosing"),l=Symbol("length"),p=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],d=(e,t)=>e.remoteSettings.maxConcurrentStreams>t.remoteSettings.maxConcurrentStreams,h=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];r[c].length>0&&r[c].length<t[c].length&&r[c].every(e=>t[c].includes(e))&&r[s]+t[s]<=t.remoteSettings.maxConcurrentStreams&&y(r)}},m=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(t[c].length>0&&t[c].length<r[c].length&&t[c].every(e=>r[c].includes(e))&&t[s]+r[s]<=r.remoteSettings.maxConcurrentStreams)return y(t),!0}return!1},y=e=>{e[u]=!0,0===e[s]&&e.close()};class g extends t{constructor({timeout:e=0,maxSessions:t=Number.POSITIVE_INFINITY,maxEmptySessions:n=10,maxCachedTlsSessions:r=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxEmptySessions=n,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:33554432},this.tlsSessionCache=new i({maxSize:r})}get protocol(){return"https:"}normalizeOptions(e){let t="";for(let n=0;n<p.length;n++){const r=p[n];t+=":",e&&void 0!==e[r]&&(t+=e[r])}return t}_processQueue(){if(this._sessionCount>=this.maxSessions)this.closeEmptySessions(this.maxSessions-this._sessionCount+1);else for(const e in this.queue)for(const t in this.queue[e]){const n=this.queue[e][t];n.completed||(n.completed=!0,n())}}_isBetterSession(e,t){return e>t}_accept(e,t,n,r){let i=0;for(;i<t.length&&e[s]<e.remoteSettings.maxConcurrentStreams;)t[i].resolve(e),i++;t.splice(0,i),t.length>0&&(this.getSession(n,r,t),t.length=0)}getSession(t,n,i){return new Promise((a,p)=>{Array.isArray(i)&&i.length>0?(i=[...i],a()):i=[{resolve:a,reject:p}];try{if("string"==typeof t)t=new e(t);else if(!(t instanceof e))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(n){const{servername:e}=n,{hostname:r}=t;if(e&&r!==e)throw new Error(`Origin ${r} differs from servername ${e}`)}}catch(e){for(let t=0;t<i.length;t++)i[t].reject(e);return}const f=this.normalizeOptions(n),y=t.origin;if(f in this.sessions){const e=this.sessions[f];let t,r=-1,a=-1;for(let n=0;n<e.length;n++){const i=e[n],o=i.remoteSettings.maxConcurrentStreams;if(o<r)break;if(!i[c].includes(y))continue;const l=i[s];l>=o||i[u]||i.destroyed||(t||(r=o),this._isBetterSession(l,a)&&(t=i,a=l))}if(t)return void this._accept(t,i,y,n)}if(f in this.queue){if(y in this.queue[f])return void this.queue[f][y].listeners.push(...i)}else this.queue[f]={[l]:0};const g=()=>{f in this.queue&&this.queue[f][y]===b&&(delete this.queue[f][y],0===--this.queue[f][l]&&delete this.queue[f])},b=async()=>{this._sessionCount++;const e=`${y}:${f}`;let a,p=!1;try{const v={...n};void 0===v.settings&&(v.settings=this.settings),void 0===v.session&&(v.session=this.tlsSessionCache.get(e));const w=v.createConnection||this.createConnection;a=await w.call(this,t,v),v.createConnection=()=>a;const x=r.connect(t,v);x[s]=0,x[u]=!1;const _=()=>{const{socket:e}=x;let t;return!1===e.servername?(e.servername=e.remoteAddress,t=x.originSet,e.servername=!1):t=x.originSet,t},T=()=>x[s]<x.remoteSettings.maxConcurrentStreams;x.socket.once("session",t=>{this.tlsSessionCache.set(e,t)}),x.once("error",t=>{for(let e=0;e<i.length;e++)i[e].reject(t);this.tlsSessionCache.delete(e)}),x.setTimeout(this.timeout,()=>{x.destroy()}),x.once("close",()=>{if(this._sessionCount--,p){this._emptySessionCount--;const e=this.sessions[f];1===e.length?delete this.sessions[f]:e.splice(e.indexOf(x),1)}else{g();const e=new Error("Session closed without receiving a SETTINGS frame");e.code="HTTP2WRAPPER_NOSETTINGS";for(let t=0;t<i.length;t++)i[t].reject(e)}this._processQueue()});const E=()=>{const e=this.queue[f];if(!e)return;const t=x[c];for(let n=0;n<t.length;n++){const r=t[n];if(r in e){const{listeners:t,completed:n}=e[r];let i=0;for(;i<t.length&&T();)t[i].resolve(x),i++;if(e[r].listeners.splice(0,i),0===e[r].listeners.length&&!n&&(delete e[r],0===--e[l])){delete this.queue[f];break}if(!T())break}}};x.on("origin",()=>{x[c]=_()||[],x[u]=!1,m(this.sessions[f],x),!x[u]&&T()&&(E(),T()&&h(this.sessions[f],x))}),x.once("remoteSettings",()=>{if(b.destroyed){const e=new Error("Agent has been destroyed");for(let t=0;t<i.length;t++)i[t].reject(e);return void x.destroy()}if(x.setLocalWindowSize&&x.setLocalWindowSize(4194304),x[c]=_()||[],x.socket.encrypted){const e=x[c][0];if(e!==y){const t=new Error(`Requested origin ${y} does not match server ${e}`);for(let e=0;e<i.length;e++)i[e].reject(t);return void x.destroy()}}g();{const e=this.sessions;if(f in e){const t=e[f];t.splice(((e,t,n)=>{let r=0,i=e.length;for(;r<i;){const a=r+i>>>1;n(e[a],t)?r=a+1:i=a}return r})(t,x,d),0,x)}else e[f]=[x]}p=!0,this._emptySessionCount++,this.emit("session",x),this._accept(x,i,y,n),0===x[s]&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),x.on("remoteSettings",()=>{T()&&(E(),T()&&h(this.sessions[f],x))})}),x[o]=x.request,x.request=(e,t)=>{if(x[u])throw new Error("The session is gracefully closing. No new streams are allowed.");const n=x[o](e,t);return x.ref(),0===x[s]++&&this._emptySessionCount--,n.once("close",()=>{0===--x[s]&&(this._emptySessionCount++,x.unref(),this._emptySessionCount>this.maxEmptySessions||x[u])?x.close():x.destroyed||x.closed||T()&&!m(this.sessions[f],x)&&(h(this.sessions[f],x),E(),0===x[s]&&this._processQueue())}),n}}catch(e){g(),this._sessionCount--;for(let t=0;t<i.length;t++)i[t].reject(e)}};b.listeners=i,b.completed=!1,b.destroyed=!1,this.queue[f][y]=b,this.queue[f][l]++,this._processQueue()})}request(e,t,n,r){return new Promise((i,s)=>{this.getSession(e,t,[{reject:s,resolve:e=>{try{const t=e.request(n,r);a(t),i(t)}catch(e){s(e)}}}])})}async createConnection(e,t){return g.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];const r=e.port||443,i=e.hostname;void 0===t.servername&&(t.servername=i);const a=n.connect(r,i,t);return t.socket&&(a._peername={family:void 0,address:void 0,port:r}),a}closeEmptySessions(e=Number.POSITIVE_INFINITY){let t=0;const{sessions:n}=this;for(const r in n){const i=n[r];for(let n=0;n<i.length;n++){const r=i[n];if(0===r[s]&&(t++,r.close(),t>=e))return t}}return t}destroy(e){const{sessions:t,queue:n}=this;for(const n in t){const r=t[n];for(let t=0;t<r.length;t++)r[t].destroy(e)}for(const e in n){const t=n[e];for(const e in t)t[e].destroyed=!0}this.queue={},this.tlsSessionCache.clear()}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}}return g.kCurrentStreamCount=s,g.kGracefullyClosing=u,zw={Agent:g,globalAgent:new g}}function Ww(){if(qw)return Fw;qw=1;const{Readable:e}=p;return Fw=class extends e{constructor(e,t){super({emitClose:!1,autoDestroy:!0,highWaterMark:t}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1}get connection(){return this.socket}set connection(e){this.socket=e}_destroy(e,t){this.readableEnded||(this.aborted=!0),t(),this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}},Fw}function Jw(){return Yw?Hw:(Yw=1,Hw=(e,t,n)=>{for(const r of n)e.on(r,(...e)=>t.emit(r,...e))})}var Zw,Xw,Qw,ex,tx,nx,rx,ix,ax,sx,ox,cx={exports:{}};function ux(){return Zw||(Zw=1,function(e){const t=(t,n,r)=>{e.exports[n]=class extends t{constructor(...e){super("string"==typeof r?r:r(e)),this.name=`${super.name} [${n}]`,this.code=n}}};t(TypeError,"ERR_INVALID_ARG_TYPE",e=>{const t=e[0].includes(".")?"property":"argument";let n=e[1];const r=Array.isArray(n);return r&&(n=`${n.slice(0,-1).join(", ")} or ${n.slice(-1)}`),`The "${e[0]}" ${t} must be ${r?"one of":"of"} type ${n}. Received ${typeof e[2]}`}),t(TypeError,"ERR_INVALID_PROTOCOL",e=>`Protocol "${e[0]}" not supported. Expected "${e[1]}"`),t(Error,"ERR_HTTP_HEADERS_SENT",e=>`Cannot ${e[0]} headers after they are sent to the client`),t(TypeError,"ERR_INVALID_HTTP_TOKEN",e=>`${e[0]} must be a valid HTTP token [${e[1]}]`),t(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",e=>`Invalid value "${e[0]} for header "${e[1]}"`),t(TypeError,"ERR_INVALID_CHAR",e=>`Invalid character in ${e[0]} [${e[1]}]`),t(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)")}(cx)),cx.exports}function lx(){return Qw?Xw:(Qw=1,Xw=e=>{switch(e){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}})}function px(){if(tx)return ex;tx=1;const{ERR_INVALID_HTTP_TOKEN:e}=ux(),t=lx(),n=/^[\^`\-\w!#$%&*+.|~]+$/;return ex=r=>{if("string"!=typeof r||!n.test(r)&&!t(r))throw new e("Header name",r)}}function dx(){if(rx)return nx;rx=1;const{ERR_HTTP_INVALID_HEADER_VALUE:e,ERR_INVALID_CHAR:t}=ux(),n=/[^\t\u0020-\u007E\u0080-\u00FF]/;return nx=(r,i)=>{if(void 0===i)throw new e(i,r);if(n.test(i))throw new t("header content",r)}}function fx(){if(ox)return sx;ox=1;const{URL:e,urlToHttpOptions:t}=C,n=oe,{Writable:r}=p,{Agent:i,globalAgent:a}=Gw(),s=Ww(),o=Jw(),{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_PROTOCOL:u,ERR_HTTP_HEADERS_SENT:l}=ux(),d=px(),f=dx(),h=function(){if(ax)return ix;ax=1;const{ERR_HTTP2_NO_SOCKET_MANIPULATION:e}=ux(),t={has(e,t){const n=void 0===e.session?e:e.session.socket;return t in e||t in n},get(t,n){switch(n){case"on":case"once":case"end":case"emit":case"destroy":return t[n].bind(t);case"writable":case"destroyed":return t[n];case"readable":return!t.destroyed&&t.readable;case"setTimeout":{const{session:e}=t;return void 0!==e?e.setTimeout.bind(e):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new e;default:{const e=void 0===t.session?t:t.session.socket,r=e[n];return"function"==typeof r?r.bind(e):r}}},getPrototypeOf:e=>void 0!==e.session?Reflect.getPrototypeOf(e.session.socket):Reflect.getPrototypeOf(e),set(t,n,r){switch(n){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[n]=r,!0;case"setTimeout":{const{session:e}=t;return void 0===e?t.setTimeout=r:e.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new e;default:return(void 0===t.session?t:t.session.socket)[n]=r,!0}}};return ix=t}(),{HTTP2_HEADER_STATUS:m,HTTP2_HEADER_METHOD:y,HTTP2_HEADER_PATH:g,HTTP2_HEADER_AUTHORITY:b,HTTP2_METHOD_CONNECT:v}=n.constants,w=Symbol("headers"),x=Symbol("origin"),_=Symbol("session"),T=Symbol("options"),E=Symbol("flushedHeaders"),S=Symbol("jobs"),k=Symbol("pendingAgentPromise");return sx=class extends r{constructor(n,r,s){if(super({autoDestroy:!1,emitClose:!1}),n="string"==typeof n?t(new e(n)):n instanceof e?t(n):{...n},"function"==typeof r||void 0===r?(s=r,r=n):r=Object.assign(n,r),r.h2session){if(this[_]=r.h2session,this[_].destroyed)throw new Error("The session has been closed already");this.protocol=this[_].socket.encrypted?"https:":"http:"}else if(!1===r.agent)this.agent=new i({maxEmptySessions:0});else if(void 0===r.agent||null===r.agent)this.agent=a;else{if("function"!=typeof r.agent.request)throw new c("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);this.agent=r.agent}if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new u(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;const{timeout:o}=r;r.timeout=void 0,this[w]=Object.create(null),this[S]=[],this[k]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",("CONNECT"!==this.method||"/"!==r.path&&void 0!==r.path)&&(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;const{headers:l}=r;if(l)for(const e in l)this.setHeader(e,l[e]);r.auth&&!("authorization"in this[w])&&(this[w].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[T]=r,this[x]=new e(`${this.protocol}//${r.servername||r.host}:${r.port}`);const p=r._reuseSocket;p&&(r.createConnection=(...e)=>p.destroyed?this.agent.createConnection(...e):p,this.agent.getSession(this[x],this[T]).catch(()=>{})),o&&this.setTimeout(o),s&&this.once("response",s),this[E]=!1}get method(){return this[w][y]}set method(e){e&&(this[w][y]=e.toUpperCase())}get path(){const e="CONNECT"===this.method?b:g;return this[w][e]}set path(e){if(e){const t="CONNECT"===this.method?b:g;this[w][t]=e}}get host(){return this[x].hostname}set host(e){}get _mustNotHaveABody(){return"GET"===this.method||"HEAD"===this.method||"DELETE"===this.method}_write(e,t,n){if(this._mustNotHaveABody)return void n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));this.flushHeaders();const r=()=>this._request.write(e,t,n);this._request?r():this[S].push(r)}_final(e){this.flushHeaders();const t=()=>{this._mustNotHaveABody||"CONNECT"===this.method?e():this._request.end(e)};this._request?t():this[S].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}async _destroy(e,t){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close")});try{await this[k]}catch(t){this.aborted&&(e=t)}t(e)}async flushHeaders(){if(this[E]||this.destroyed)return;this[E]=!0;const e=this.method===v,t=t=>{if(this._request=t,this.destroyed)return void t.destroy();e||o(t,this,["timeout","continue"]),t.once("error",e=>{this.destroy(e)}),t.once("aborted",()=>{const{res:e}=this;e?(e.aborted=!0,e.emit("aborted"),e.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"))});const n=(n,r,i)=>{const a=new s(this.socket,t.readableHighWaterMark);this.res=a,a.url=`${this[x].origin}${this.path}`,a.req=this,a.statusCode=n[m],a.headers=n,a.rawHeaders=i,a.once("end",()=>{a.complete=!0,a.socket=null,a.connection=null}),e?(a.upgrade=!0,this.emit("connect",a,t,Buffer.alloc(0))?this.emit("close"):t.destroy()):(t.on("data",e=>{a._dumped||a.push(e)||t.pause()}),t.once("end",()=>{this.aborted||a.push(null)}),this.emit("response",a)||a._dump())};t.once("response",n),t.once("headers",e=>this.emit("information",{statusCode:e[m]})),t.once("trailers",(e,t,r)=>{const{res:i}=this;null!==i?(i.trailers=e,i.rawTrailers=r):n(e,0,r)}),t.once("close",()=>{const{aborted:e,res:t}=this;if(t){e&&(t.aborted=!0,t.emit("aborted"),t.destroy());const n=()=>{t.emit("close"),this.destroy(),this.emit("close")};return void(t.readable?t.once("end",n):n())}if(!this.destroyed)return this.destroy(new Error("The HTTP/2 stream has been early terminated")),void this.emit("close");this.destroy(),this.emit("close")}),this.socket=new Proxy(t,h);for(const e of this[S])e();this[S].length=0,this.emit("socket",this.socket)};if(b in this[w]||e||(this[w][b]=this[x].host),this[_])try{t(this[_].request(this[w]))}catch(e){this.destroy(e)}else{this.reusedSocket=!0;try{const e=this.agent.request(this[x],this[T],this[w]);this[k]=e,t(await e),this[k]=!1}catch(e){this[k]=!1,this.destroy(e)}}}get connection(){return this.socket}set connection(e){this.socket=e}getHeaderNames(){return Object.keys(this[w])}hasHeader(e){if("string"!=typeof e)throw new c("name","string",e);return Boolean(this[w][e.toLowerCase()])}getHeader(e){if("string"!=typeof e)throw new c("name","string",e);return this[w][e.toLowerCase()]}get headersSent(){return this[E]}removeHeader(e){if("string"!=typeof e)throw new c("name","string",e);if(this.headersSent)throw new l("remove");delete this[w][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new l("set");d(e),f(e,t);const n=e.toLowerCase();if("connection"===n){if("keep-alive"===t.toLowerCase())return;throw new Error(`Invalid 'connection' header: ${t}`)}"host"===n&&"CONNECT"===this.method?this[w][b]=t:this[w][n]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){const n=()=>this._request.setTimeout(e,t);return this._request?n():this[S].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}},sx}var hx,mx,yx,gx,bx,vx,wx,xx,_x,Tx,Ex,Sx,kx,Mx,Ax,Ox,Rx,Ix,Nx,Cx,Px,jx,Lx,$x,Dx,Ux={exports:{}};function zx(){if(gx)return yx;gx=1;const{isIP:e}=ue,t=M;return yx=n=>{const r=(e=>{if("["===e[0]){const n=e.indexOf("]");return t(-1!==n),e.slice(1,n)}const n=e.indexOf(":");return-1===n?e:e.slice(0,n)})(n);return e(r)?"":r}}function Bx(){if(bx)return Ux.exports;bx=1;const{URL:e,urlToHttpOptions:t}=C,n=b,r=w,i=function(){if(mx)return hx;mx=1;const e=ce;return hx=(t={},n=e.connect)=>new Promise((e,r)=>{let i,a=!1;const s=async()=>{await c,i.off("timeout",o),i.off("error",r),t.resolveSocket?(e({alpnProtocol:i.alpnProtocol,socket:i,timeout:a}),a&&(await Promise.resolve(),i.emit("timeout"))):(i.destroy(),e({alpnProtocol:i.alpnProtocol,timeout:a}))},o=async()=>{a=!0,s()},c=(async()=>{try{i=await n(t,s),i.on("error",r),i.once("timeout",o)}catch(e){r(e)}})()}),hx}(),a=Vw(),{Agent:s,globalAgent:o}=Gw(),c=fx(),u=zx(),l=Kw(),p=new a({maxSize:100}),d=new Map,f=(e,t=new Map,n=void 0)=>async r=>{const a=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!e.has(a)){if(t.has(a)){return{alpnProtocol:(await t.get(a)).alpnProtocol}}const{path:s}=r;r.path=r.socketPath;const o=i(r,n);t.set(a,o);try{const n=await o;return e.set(a,n.alpnProtocol),t.delete(a),r.path=s,n}catch(e){throw t.delete(a),r.path=s,e}}return{alpnProtocol:e.get(a)}},h=f(p,d);return Ux.exports=async(i,a,p)=>{if(i="string"==typeof i?t(new e(i)):i instanceof e?t(i):{...i},"function"==typeof a||void 0===a?(p=a,a=i):a=Object.assign(i,a),a.ALPNProtocols=a.ALPNProtocols||["h2","http/1.1"],!Array.isArray(a.ALPNProtocols)||0===a.ALPNProtocols.length)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");a.protocol=a.protocol||"https:";const d="https:"===a.protocol;a.host=a.hostname||a.host||"localhost",a.session=a.tlsSession,a.servername=a.servername||u(a.headers&&a.headers.host||a.host),a.port=a.port||(d?443:80),a._defaultAgent=d?r.globalAgent:n.globalAgent;const f=a.resolveProtocol||h;let{agent:m}=a;if(void 0!==m&&!1!==m&&"Object"!==m.constructor.name)throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(d){a.resolveSocket=!0;let{socket:e,alpnProtocol:t,timeout:n}=await f(a);if(n){e&&e.destroy();const t=new Error(`Timed out resolving ALPN: ${a.timeout} ms`);throw t.code="ETIMEDOUT",t.ms=a.timeout,t}e&&a.createConnection&&(e.destroy(),e=void 0),delete a.resolveSocket;const i="h2"===t;if(m&&(m=i?m.http2:m.https,a.agent=m),void 0===m&&(m=i?o:r.globalAgent),e)if(!1===m)e.destroy();else{const t=(i?s:r.Agent).prototype.createConnection;m.createConnection===t?i?a._reuseSocket=e:((e,t,n)=>{t._httpMessage={shouldKeepAlive:!0};const r=()=>{e.emit("free",t,n)};t.on("free",r);const i=()=>{e.removeSocket(t,n)};t.on("close",i);const a=()=>{const{freeSockets:n}=e;for(const e of Object.values(n))if(e.includes(t))return void t.destroy()};t.on("timeout",a);const s=()=>{e.removeSocket(t,n),t.off("close",i),t.off("free",r),t.off("timeout",a),t.off("agentRemove",s)};t.on("agentRemove",s),e.emit("free",t,n)})(m,e,a):e.destroy()}if(i)return l(new c(a,p))}else m&&(a.agent=m.http);return a.headers&&(a.headers={...a.headers},a.headers[":authority"]&&(a.headers.host||(a.headers.host=a.headers[":authority"]),delete a.headers[":authority"]),delete a.headers[":method"],delete a.headers[":scheme"],delete a.headers[":path"]),l(n.request(a,p))},Ux.exports.protocolCache=p,Ux.exports.resolveProtocol=h,Ux.exports.createResolveProtocol=f,Ux.exports}function Fx(){if(wx)return vx;wx=1;const e=p,t=new ce.TLSSocket(new e.PassThrough)._handle._parentWrap.constructor;return vx=t}function qx(){if(_x)return xx;_x=1;class e extends Error{constructor(e,t=""){super(`The proxy server rejected the request with status code ${e} (${t||"empty status message"})`),this.statusCode=e,this.statusMessage=t}}return xx=e}function Hx(){if(kx)return Sx;kx=1;const{URL:e}=C,t=(Ex||(Ex=1,Tx=(e,t,n)=>{const r=n.some(e=>"string"==typeof e?typeof t===e:t instanceof e);if(!r){const r=n.map(e=>"string"==typeof e?e:e.name);throw new TypeError(`Expected '${e}' to be a type of ${r.join(" or ")}, got ${typeof t}`)}}),Tx);return Sx=(n,r)=>{t("proxyOptions",r,["object"]),t("proxyOptions.headers",r.headers,["object","undefined"]),t("proxyOptions.raw",r.raw,["boolean","undefined"]),t("proxyOptions.url",r.url,[e,"string"]);const i=new e(r.url);n.proxyOptions={raw:!0,...r,headers:{...r.headers},url:i}}}function Yx(){return Ax?Mx:(Ax=1,Mx=e=>{const{username:t,password:n}=e.proxyOptions.url;if(t||n){const e=`${t}:${n}`,r=`Basic ${Buffer.from(e).toString("base64")}`;return{"proxy-authorization":r,authorization:r}}return{}})}function Vx(){if(Nx)return Ix;Nx=1;const{Agent:e}=Gw(),t=Fx(),n=qx(),r=Hx();return Ix=class extends e{constructor(e){super(e),r(this,e.proxyOptions)}async createConnection(e,r){const i=`${e.hostname}:${e.port||443}`,[a,s,o]=await this._getProxyStream(i);if(200!==s)throw new n(s,o);if(!this.proxyOptions.raw){const e=new t(a);return e.encrypted=!1,e._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},e}return r.socket=a,super.createConnection(e,r)}},Ix}function Kx(){if(Px)return Cx;Px=1;const{globalAgent:e}=Gw(),t=Vx(),n=Yx();return Cx=class extends t{async _getProxyStream(t){const{proxyOptions:r}=this,i={...n(this),...r.headers,":method":"CONNECT",":authority":t},a=await e.request(r.url,r,i),s=await(e=>new Promise((t,n)=>{e.once("error",n),e.once("response",r=>{e.off("error",n),t(r[":status"])})}))(a);return[a,s,""]}},Cx}function Gx(){if(Lx)return jx;Lx=1;const e=b,t=w,n=Vx(),r=Yx();class i extends n{async _getProxyStream(n){const{proxyOptions:i}=this,{url:a,headers:s}=this.proxyOptions;return(e=>new Promise((t,n)=>{e.once("error",n),e.once("connect",(r,i,a)=>{i.unshift(a),e.off("error",n),t([i,r.statusCode,r.statusMessage])})}))(("https:"===a.protocol?t:e).request({...i,hostname:a.hostname,port:a.port,path:n,headers:{...r(this),...s,host:n},method:"CONNECT"}).end())}}return jx={Http2OverHttp:i,Http2OverHttps:i}}var Wx=function(){if(Dx)return $x;Dx=1;const e=oe,{Agent:t,globalAgent:n}=Gw(),r=fx(),i=Ww(),a=Bx(),{HttpOverHttp2:s,HttpsOverHttp2:o}=function(){if(Rx)return Ox;Rx=1;const e=ce,t=b,n=w,r=Fx(),{globalAgent:i}=Gw(),a=qx(),s=Hx(),o=Yx(),c=(t,s,c)=>{(async()=>{try{const{proxyOptions:u}=t,{url:l,headers:p,raw:d}=u,f=await i.request(l,u,{...o(t),...p,":method":"CONNECT",":authority":`${s.host}:${s.port}`});f.once("error",c),f.once("response",i=>{const o=i[":status"];if(200!==o)return void c(new a(o,""));const u=t instanceof n.Agent;if(d&&u){s.socket=f;const t=e.connect(s);return t.once("close",()=>{f.destroy()}),void c(null,t)}const l=new r(f);l.encrypted=!1,l._handle.getpeername=e=>{e.family=void 0,e.address=void 0,e.port=void 0},c(null,l)})}catch(e){c(e)}})()};class u extends t.Agent{constructor(e){super(e),s(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}class l extends n.Agent{constructor(e){super(e),s(this,e.proxyOptions)}createConnection(e,t){c(this,e,t)}}return Ox={HttpOverHttp2:u,HttpsOverHttp2:l}}(),c=Kx(),{Http2OverHttp:u,Http2OverHttps:l}=Gx(),p=px(),d=dx();return $x={...e,ClientRequest:r,IncomingMessage:i,Agent:t,globalAgent:n,request:(e,t,n)=>new r(e,t,n),get:(e,t,n)=>{const i=new r(e,t,n);return i.end(),i},auto:a,proxies:{HttpOverHttp2:s,HttpsOverHttp2:o,Http2OverHttp2:c,Http2OverHttp:u,Http2OverHttps:l},validateHeaderName:p,validateHeaderValue:d},$x}(),Jx=xe(Wx);const[Zx,Xx]=B.versions.node.split(".").map(Number);const Qx=new Map;let e_;const t_={request:void 0,agent:{http:void 0,https:void 0,http2:void 0},h2session:void 0,decompress:!0,timeout:{connect:void 0,lookup:void 0,read:void 0,request:void 0,response:void 0,secureConnect:void 0,send:void 0,socket:void 0},prefixUrl:"",body:void 0,form:void 0,json:void 0,cookieJar:void 0,ignoreInvalidCookies:!1,searchParams:void 0,dnsLookup:void 0,dnsCache:void 0,context:{},hooks:{init:[],beforeRequest:[],beforeError:[],beforeRedirect:[],beforeRetry:[],afterResponse:[]},followRedirect:!0,maxRedirects:10,cache:void 0,throwHttpErrors:!0,username:"",password:"",http2:!1,allowGetBody:!1,headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},methodRewriting:!1,dnsLookupIpVersion:void 0,parseJson:JSON.parse,stringifyJson:JSON.stringify,retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:e})=>e,backoffLimit:Number.POSITIVE_INFINITY,noise:100},localAddress:void 0,method:"GET",createConnection:void 0,cacheOptions:{shared:void 0,cacheHeuristic:void 0,immutableMinTimeToLive:void 0,ignoreCargoCult:void 0},https:{alpnProtocols:void 0,rejectUnauthorized:void 0,checkServerIdentity:void 0,certificateAuthority:void 0,key:void 0,certificate:void 0,passphrase:void 0,pfx:void 0,ciphers:void 0,honorCipherOrder:void 0,minVersion:void 0,maxVersion:void 0,signatureAlgorithms:void 0,tlsSessionLifetime:void 0,dhparam:void 0,ecdhCurve:void 0,certificateRevocationLists:void 0},encoding:void 0,resolveBodyOnly:!1,isStream:!1,responseType:"text",url:void 0,pagination:{transform:e=>"json"===e.request.options.responseType?e.body:JSON.parse(e.body),paginate({response:e}){const t=e.headers.link;if("string"!=typeof t||""===t.trim())return!1;const n=function(e){const t=[],n=e.split(",");for(const r of n){const[n,...i]=r.split(";"),a=n.trim();if("<"!==a[0]||">"!==a[a.length-1])throw new Error(`Invalid format of the Link header reference: ${a}`);const s=a.slice(1,-1),o={};if(0===i.length)throw new Error(`Unexpected end of Link header parameters: ${i.join(";")}`);for(const t of i){const n=t.trim(),r=n.indexOf("=");if(-1===r)throw new Error(`Failed to parse Link header: ${e}`);const i=n.slice(0,r).trim(),a=n.slice(r+1).trim();o[i]=a}t.push({reference:s,parameters:o})}return t}(t).find(e=>"next"===e.parameters.rel||'"next"'===e.parameters.rel);return!!n&&{url:new URL(n.reference,e.url)}},filter:()=>!0,shouldContinue:()=>!0,countLimit:Number.POSITIVE_INFINITY,backoff:0,requestLimit:1e4,stackAllItems:!1},setHost:!0,maxHeaderSize:void 0,signal:void 0,enableUnixSockets:!1},n_=e=>{const t=[e.timeout.socket,e.timeout.connect,e.timeout.lookup,e.timeout.request,e.timeout.secureConnect].filter(e=>"number"==typeof e);if(t.length>0)return Math.min(...t)},r_=(e,t,n)=>{const r=e.hooks?.init;if(r)for(const e of r)e(t,n)};class i_{constructor(e,t,n){if(Object.defineProperty(this,"_unixOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_internals",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_merging",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_init",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Kb.any([Bb.string,Bb.urlInstance,Bb.object,Bb.undefined],e),Kb.any([Bb.object,Bb.undefined],t),Kb.any([Bb.object,Bb.undefined],n),e instanceof i_||t instanceof i_)throw new TypeError("The defaults must be passed as the third argument");this._internals=(e=>{const{hooks:t,retry:n}=e,r={...e,context:{...e.context},cacheOptions:{...e.cacheOptions},https:{...e.https},agent:{...e.agent},headers:{...e.headers},retry:{...n,errorCodes:[...n.errorCodes],methods:[...n.methods],statusCodes:[...n.statusCodes]},timeout:{...e.timeout},hooks:{init:[...t.init],beforeRequest:[...t.beforeRequest],beforeError:[...t.beforeError],beforeRedirect:[...t.beforeRedirect],beforeRetry:[...t.beforeRetry],afterResponse:[...t.afterResponse]},searchParams:e.searchParams?new URLSearchParams(e.searchParams):void 0,pagination:{...e.pagination}};return void 0!==r.url&&(r.prefixUrl=""),r})(n?._internals??n??t_),this._init=[...n?._init??[]],this._merging=!1,this._unixOptions=void 0;try{if(Bb.plainObject(e))try{this.merge(e),this.merge(t)}finally{this.url=e.url}else try{this.merge(t)}finally{if(void 0!==t?.url){if(void 0!==e)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");this.url=t.url}else void 0!==e&&(this.url=e)}}catch(e){throw e.options=this,e}}merge(e){if(e)if(e instanceof i_)for(const t of e._init)this.merge(t);else{e=(e=>{const{hooks:t,retry:n}=e,r={...e};return Bb.object(e.context)&&(r.context={...e.context}),Bb.object(e.cacheOptions)&&(r.cacheOptions={...e.cacheOptions}),Bb.object(e.https)&&(r.https={...e.https}),Bb.object(e.cacheOptions)&&(r.cacheOptions={...r.cacheOptions}),Bb.object(e.agent)&&(r.agent={...e.agent}),Bb.object(e.headers)&&(r.headers={...e.headers}),Bb.object(n)&&(r.retry={...n},Bb.array(n.errorCodes)&&(r.retry.errorCodes=[...n.errorCodes]),Bb.array(n.methods)&&(r.retry.methods=[...n.methods]),Bb.array(n.statusCodes)&&(r.retry.statusCodes=[...n.statusCodes])),Bb.object(e.timeout)&&(r.timeout={...e.timeout}),Bb.object(t)&&(r.hooks={...t},Bb.array(t.init)&&(r.hooks.init=[...t.init]),Bb.array(t.beforeRequest)&&(r.hooks.beforeRequest=[...t.beforeRequest]),Bb.array(t.beforeError)&&(r.hooks.beforeError=[...t.beforeError]),Bb.array(t.beforeRedirect)&&(r.hooks.beforeRedirect=[...t.beforeRedirect]),Bb.array(t.beforeRetry)&&(r.hooks.beforeRetry=[...t.beforeRetry]),Bb.array(t.afterResponse)&&(r.hooks.afterResponse=[...t.afterResponse])),Bb.object(e.pagination)&&(r.pagination={...e.pagination}),r})(e),r_(this,e,this),r_(e,e,this),this._merging=!0,"isStream"in e&&(this.isStream=e.isStream);try{let t=!1;for(const n in e){if("mutableDefaults"===n||"handlers"===n)continue;if("url"===n)continue;if(!(n in this))throw new Error(`Unexpected option: ${n}`);const r=e[n];void 0!==r&&(this[n]=r,t=!0)}t&&this._init.push(e)}finally{this._merging=!1}}}get request(){return this._internals.request}set request(e){Kb.any([Bb.function_,Bb.undefined],e),this._internals.request=e}get agent(){return this._internals.agent}set agent(e){Kb.plainObject(e);for(const t in e){if(!(t in this._internals.agent))throw new TypeError(`Unexpected agent option: ${t}`);Kb.any([Bb.object,Bb.undefined],e[t])}this._merging?Object.assign(this._internals.agent,e):this._internals.agent={...e}}get h2session(){return this._internals.h2session}set h2session(e){this._internals.h2session=e}get decompress(){return this._internals.decompress}set decompress(e){Kb.boolean(e),this._internals.decompress=e}get timeout(){return this._internals.timeout}set timeout(e){Kb.plainObject(e);for(const t in e){if(!(t in this._internals.timeout))throw new Error(`Unexpected timeout option: ${t}`);Kb.any([Bb.number,Bb.undefined],e[t])}this._merging?Object.assign(this._internals.timeout,e):this._internals.timeout={...e}}get prefixUrl(){return this._internals.prefixUrl}set prefixUrl(e){if(Kb.any([Bb.string,Bb.urlInstance],e),""!==e){if((e=e.toString()).endsWith("/")||(e+="/"),this._internals.prefixUrl&&this._internals.url){const{href:t}=this._internals.url;this._internals.url.href=e+t.slice(this._internals.prefixUrl.length)}this._internals.prefixUrl=e}else this._internals.prefixUrl=""}get body(){return this._internals.body}set body(e){Kb.any([Bb.string,Bb.buffer,Bb.nodeStream,Bb.generator,Bb.asyncGenerator,Xv,Bb.undefined],e),Bb.nodeStream(e)&&Kb.truthy(e.readable),void 0!==e&&(Kb.undefined(this._internals.form),Kb.undefined(this._internals.json)),this._internals.body=e}get form(){return this._internals.form}set form(e){Kb.any([Bb.plainObject,Bb.undefined],e),void 0!==e&&(Kb.undefined(this._internals.body),Kb.undefined(this._internals.json)),this._internals.form=e}get json(){return this._internals.json}set json(e){void 0!==e&&(Kb.undefined(this._internals.body),Kb.undefined(this._internals.form)),this._internals.json=e}get url(){return this._internals.url}set url(e){if(Kb.any([Bb.string,Bb.urlInstance,Bb.undefined],e),void 0===e)return void(this._internals.url=void 0);if(Bb.string(e)&&e.startsWith("/"))throw new Error("`url` must not start with a slash");const t=`${this.prefixUrl}${e.toString()}`,n=new URL(t);if(this._internals.url=n,"unix:"===n.protocol&&(n.href=`http://unix${n.pathname}${n.search}`),"http:"!==n.protocol&&"https:"!==n.protocol){const e=new Error(`Unsupported protocol: ${n.protocol}`);throw e.code="ERR_UNSUPPORTED_PROTOCOL",e}if(this._internals.username&&(n.username=this._internals.username,this._internals.username=""),this._internals.password&&(n.password=this._internals.password,this._internals.password=""),this._internals.searchParams&&(n.search=this._internals.searchParams.toString(),this._internals.searchParams=void 0),"unix"===n.hostname){if(!this._internals.enableUnixSockets)throw new Error("Using UNIX domain sockets but option `enableUnixSockets` is not enabled");const e=/(?<socketPath>.+?):(?<path>.+)/.exec(`${n.pathname}${n.search}`);if(e?.groups){const{socketPath:t,path:n}=e.groups;this._unixOptions={socketPath:t,path:n,host:""}}else this._unixOptions=void 0;return}this._unixOptions=void 0}get cookieJar(){return this._internals.cookieJar}set cookieJar(e){if(Kb.any([Bb.object,Bb.undefined],e),void 0===e)return void(this._internals.cookieJar=void 0);let{setCookie:t,getCookieString:n}=e;Kb.function_(t),Kb.function_(n),4===t.length&&0===n.length?(t=j(t.bind(e)),n=j(n.bind(e)),this._internals.cookieJar={setCookie:t,getCookieString:n}):this._internals.cookieJar=e}get signal(){return this._internals.signal}set signal(e){Kb.object(e),this._internals.signal=e}get ignoreInvalidCookies(){return this._internals.ignoreInvalidCookies}set ignoreInvalidCookies(e){Kb.boolean(e),this._internals.ignoreInvalidCookies=e}get searchParams(){return this._internals.url?this._internals.url.searchParams:(void 0===this._internals.searchParams&&(this._internals.searchParams=new URLSearchParams),this._internals.searchParams)}set searchParams(e){Kb.any([Bb.string,Bb.object,Bb.undefined],e);const t=this._internals.url;if(void 0===e)return this._internals.searchParams=void 0,void(t&&(t.search=""));const n=this.searchParams;let r;if(Bb.string(e))r=new URLSearchParams(e);else if(e instanceof URLSearchParams)r=e;else{!function(e){for(const t in e){const n=e[t];Kb.any([Bb.string,Bb.number,Bb.boolean,Bb.null_,Bb.undefined],n)}}(e),r=new URLSearchParams;for(const t in e){const i=e[t];null===i?r.append(t,""):void 0===i?n.delete(t):r.append(t,i)}}if(this._merging){for(const e of r.keys())n.delete(e);for(const[e,t]of r)n.append(e,t)}else t?t.search=n.toString():this._internals.searchParams=n}get searchParameters(){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}set searchParameters(e){throw new Error("The `searchParameters` option does not exist. Use `searchParams` instead.")}get dnsLookup(){return this._internals.dnsLookup}set dnsLookup(e){Kb.any([Bb.function_,Bb.undefined],e),this._internals.dnsLookup=e}get dnsCache(){return this._internals.dnsCache}set dnsCache(e){Kb.any([Bb.object,Bb.boolean,Bb.undefined],e),this._internals.dnsCache=!0===e?e_||(e_=new jw,e_):!1===e?void 0:e}get context(){return this._internals.context}set context(e){Kb.object(e),this._merging?Object.assign(this._internals.context,e):this._internals.context={...e}}get hooks(){return this._internals.hooks}set hooks(e){Kb.object(e);for(const t in e){if(!(t in this._internals.hooks))throw new Error(`Unexpected hook event: ${t}`);const n=t,r=e[n];if(Kb.any([Bb.array,Bb.undefined],r),r)for(const e of r)Kb.function_(e);if(this._merging)r&&this._internals.hooks[n].push(...r);else{if(!r)throw new Error(`Missing hook event: ${t}`);this._internals.hooks[t]=[...r]}}}get followRedirect(){return this._internals.followRedirect}set followRedirect(e){Kb.boolean(e),this._internals.followRedirect=e}get followRedirects(){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}set followRedirects(e){throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.")}get maxRedirects(){return this._internals.maxRedirects}set maxRedirects(e){Kb.number(e),this._internals.maxRedirects=e}get cache(){return this._internals.cache}set cache(e){Kb.any([Bb.object,Bb.string,Bb.boolean,Bb.undefined],e),this._internals.cache=!0===e?Qx:!1===e?void 0:e}get throwHttpErrors(){return this._internals.throwHttpErrors}set throwHttpErrors(e){Kb.boolean(e),this._internals.throwHttpErrors=e}get username(){const e=this._internals.url,t=e?e.username:this._internals.username;return decodeURIComponent(t)}set username(e){Kb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.username=n:this._internals.username=n}get password(){const e=this._internals.url,t=e?e.password:this._internals.password;return decodeURIComponent(t)}set password(e){Kb.string(e);const t=this._internals.url,n=encodeURIComponent(e);t?t.password=n:this._internals.password=n}get http2(){return this._internals.http2}set http2(e){Kb.boolean(e),this._internals.http2=e}get allowGetBody(){return this._internals.allowGetBody}set allowGetBody(e){Kb.boolean(e),this._internals.allowGetBody=e}get headers(){return this._internals.headers}set headers(e){Kb.plainObject(e),this._merging?Object.assign(this._internals.headers,_v(e)):this._internals.headers=_v(e)}get methodRewriting(){return this._internals.methodRewriting}set methodRewriting(e){Kb.boolean(e),this._internals.methodRewriting=e}get dnsLookupIpVersion(){return this._internals.dnsLookupIpVersion}set dnsLookupIpVersion(e){if(void 0!==e&&4!==e&&6!==e)throw new TypeError(`Invalid DNS lookup IP version: ${e}`);this._internals.dnsLookupIpVersion=e}get parseJson(){return this._internals.parseJson}set parseJson(e){Kb.function_(e),this._internals.parseJson=e}get stringifyJson(){return this._internals.stringifyJson}set stringifyJson(e){Kb.function_(e),this._internals.stringifyJson=e}get retry(){return this._internals.retry}set retry(e){if(Kb.plainObject(e),Kb.any([Bb.function_,Bb.undefined],e.calculateDelay),Kb.any([Bb.number,Bb.undefined],e.maxRetryAfter),Kb.any([Bb.number,Bb.undefined],e.limit),Kb.any([Bb.array,Bb.undefined],e.methods),Kb.any([Bb.array,Bb.undefined],e.statusCodes),Kb.any([Bb.array,Bb.undefined],e.errorCodes),Kb.any([Bb.number,Bb.undefined],e.noise),e.noise&&Math.abs(e.noise)>100)throw new Error(`The maximum acceptable retry noise is +/- 100ms, got ${e.noise}`);for(const t in e)if(!(t in this._internals.retry))throw new Error(`Unexpected retry option: ${t}`);this._merging?Object.assign(this._internals.retry,e):this._internals.retry={...e};const{retry:t}=this._internals;t.methods=[...new Set(t.methods.map(e=>e.toUpperCase()))],t.statusCodes=[...new Set(t.statusCodes)],t.errorCodes=[...new Set(t.errorCodes)]}get localAddress(){return this._internals.localAddress}set localAddress(e){Kb.any([Bb.string,Bb.undefined],e),this._internals.localAddress=e}get method(){return this._internals.method}set method(e){Kb.string(e),this._internals.method=e.toUpperCase()}get createConnection(){return this._internals.createConnection}set createConnection(e){Kb.any([Bb.function_,Bb.undefined],e),this._internals.createConnection=e}get cacheOptions(){return this._internals.cacheOptions}set cacheOptions(e){Kb.plainObject(e),Kb.any([Bb.boolean,Bb.undefined],e.shared),Kb.any([Bb.number,Bb.undefined],e.cacheHeuristic),Kb.any([Bb.number,Bb.undefined],e.immutableMinTimeToLive),Kb.any([Bb.boolean,Bb.undefined],e.ignoreCargoCult);for(const t in e)if(!(t in this._internals.cacheOptions))throw new Error(`Cache option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.cacheOptions,e):this._internals.cacheOptions={...e}}get https(){return this._internals.https}set https(e){Kb.plainObject(e),Kb.any([Bb.boolean,Bb.undefined],e.rejectUnauthorized),Kb.any([Bb.function_,Bb.undefined],e.checkServerIdentity),Kb.any([Bb.string,Bb.object,Bb.array,Bb.undefined],e.certificateAuthority),Kb.any([Bb.string,Bb.object,Bb.array,Bb.undefined],e.key),Kb.any([Bb.string,Bb.object,Bb.array,Bb.undefined],e.certificate),Kb.any([Bb.string,Bb.undefined],e.passphrase),Kb.any([Bb.string,Bb.buffer,Bb.array,Bb.undefined],e.pfx),Kb.any([Bb.array,Bb.undefined],e.alpnProtocols),Kb.any([Bb.string,Bb.undefined],e.ciphers),Kb.any([Bb.string,Bb.buffer,Bb.undefined],e.dhparam),Kb.any([Bb.string,Bb.undefined],e.signatureAlgorithms),Kb.any([Bb.string,Bb.undefined],e.minVersion),Kb.any([Bb.string,Bb.undefined],e.maxVersion),Kb.any([Bb.boolean,Bb.undefined],e.honorCipherOrder),Kb.any([Bb.number,Bb.undefined],e.tlsSessionLifetime),Kb.any([Bb.string,Bb.undefined],e.ecdhCurve),Kb.any([Bb.string,Bb.buffer,Bb.array,Bb.undefined],e.certificateRevocationLists);for(const t in e)if(!(t in this._internals.https))throw new Error(`HTTPS option \`${t}\` does not exist`);this._merging?Object.assign(this._internals.https,e):this._internals.https={...e}}get encoding(){return this._internals.encoding}set encoding(e){if(null===e)throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Kb.any([Bb.string,Bb.undefined],e),this._internals.encoding=e}get resolveBodyOnly(){return this._internals.resolveBodyOnly}set resolveBodyOnly(e){Kb.boolean(e),this._internals.resolveBodyOnly=e}get isStream(){return this._internals.isStream}set isStream(e){Kb.boolean(e),this._internals.isStream=e}get responseType(){return this._internals.responseType}set responseType(e){if(void 0!==e){if("text"!==e&&"buffer"!==e&&"json"!==e)throw new Error(`Invalid \`responseType\` option: ${e}`);this._internals.responseType=e}else this._internals.responseType="text"}get pagination(){return this._internals.pagination}set pagination(e){Kb.object(e),this._merging?Object.assign(this._internals.pagination,e):this._internals.pagination=e}get auth(){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}set auth(e){throw new Error("Parameter `auth` is deprecated. Use `username` / `password` instead.")}get setHost(){return this._internals.setHost}set setHost(e){Kb.boolean(e),this._internals.setHost=e}get maxHeaderSize(){return this._internals.maxHeaderSize}set maxHeaderSize(e){Kb.any([Bb.number,Bb.undefined],e),this._internals.maxHeaderSize=e}get enableUnixSockets(){return this._internals.enableUnixSockets}set enableUnixSockets(e){Kb.boolean(e),this._internals.enableUnixSockets=e}toJSON(){return{...this._internals}}[Symbol.for("nodejs.util.inspect.custom")](e,t){return L(this._internals,t)}createNativeRequestOptions(){const e=this._internals;let t;t="https:"===e.url.protocol?e.http2?e.agent:e.agent.https:e.agent.http;const{https:n}=e;let{pfx:r}=n;return Bb.array(r)&&Bb.plainObject(r[0])&&(r=r.map(e=>({buf:e.buffer,passphrase:e.passphrase}))),{...e.cacheOptions,...this._unixOptions,ALPNProtocols:n.alpnProtocols,ca:n.certificateAuthority,cert:n.certificate,key:n.key,passphrase:n.passphrase,pfx:n.pfx,rejectUnauthorized:n.rejectUnauthorized,checkServerIdentity:n.checkServerIdentity??Q,ciphers:n.ciphers,honorCipherOrder:n.honorCipherOrder,minVersion:n.minVersion,maxVersion:n.maxVersion,sigalgs:n.signatureAlgorithms,sessionTimeout:n.tlsSessionLifetime,dhparam:n.dhparam,ecdhCurve:n.ecdhCurve,crl:n.certificateRevocationLists,lookup:e.dnsLookup??e.dnsCache?.lookup,family:e.dnsLookupIpVersion,agent:t,setHost:e.setHost,method:e.method,maxHeaderSize:e.maxHeaderSize,localAddress:e.localAddress,headers:e.headers,createConnection:e.createConnection,timeout:e.http2?n_(e):void 0,h2session:e.h2session}}getRequestFunction(){const e=this._internals.url,{request:t}=this._internals;return!t&&e?this.getFallbackRequestFunction():t}getFallbackRequestFunction(){const e=this._internals.url;if(e){if("https:"===e.protocol){if(this._internals.http2){if(Zx<15||15===Zx&&Xx<10){const e=new Error("To use the `http2` option, install Node.js 15.10.0 or above");throw e.code="EUNSUPPORTED",e}return Jx.auto}return ee.request}return K.request}}freeze(){const e=this._internals;Object.freeze(e),Object.freeze(e.hooks),Object.freeze(e.hooks.afterResponse),Object.freeze(e.hooks.beforeError),Object.freeze(e.hooks.beforeRedirect),Object.freeze(e.hooks.beforeRequest),Object.freeze(e.hooks.beforeRetry),Object.freeze(e.hooks.init),Object.freeze(e.https),Object.freeze(e.cacheOptions),Object.freeze(e.agent),Object.freeze(e.headers),Object.freeze(e.timeout),Object.freeze(e.retry),Object.freeze(e.retry.errorCodes),Object.freeze(e.retry.methods),Object.freeze(e.retry.statusCodes)}}const a_=e=>{const{statusCode:t}=e,n=e.request.options.followRedirect?299:399;return t>=200&&t<=n||304===t};class s_ extends Jb{constructor(e,t){const{options:n}=t.request;super(`${e.message} in "${n.url.toString()}"`,e,t.request),this.name="ParseError",this.code="ERR_BODY_PARSE_FAILURE"}}const o_=(e,t,n,r)=>{const{rawBody:i}=e;try{if("text"===t)return i.toString(r);if("json"===t)return 0===i.length?"":n(i.toString(r));if("buffer"===t)return i}catch(t){throw new s_(t,e)}throw new s_({message:`Unknown body type '${t}'`,name:"Error"},e)};function c_(e){return"unix:"===e.protocol||"unix"===e.hostname}const{buffer:u_}=wv,l_=Bb.string(B.versions.brotli),p_=new Set(["GET","HEAD"]),d_=new class{constructor(){Object.defineProperty(this,"weakMap",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"map",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.weakMap=new WeakMap,this.map=new Map}set(e,t){"object"==typeof e?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return"object"==typeof e?this.weakMap.get(e):this.map.get(e)}has(e){return"object"==typeof e?this.weakMap.has(e):this.map.has(e)}},f_=new Set([300,301,302,303,304,307,308]),h_=["socket","connect","continue","information","upgrade"],m_=()=>{};class y_ extends V{constructor(e,t,n){super({autoDestroy:!1,highWaterMark:0}),Object.defineProperty(this,"constructor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_noPipe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requestUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"redirectUrls",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"retryCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopRetry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downloadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_uploadedSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_stopReading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pipedServerResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_responseSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_bodySize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_unproxyEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isFromCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cannotHaveBody",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_triggerRead",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_cancelTimeouts",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_removeListeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_nativeResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_flushed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_aborted",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_requestInitialized",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._downloadedSize=0,this._uploadedSize=0,this._stopReading=!1,this._pipedServerResponses=new Set,this._cannotHaveBody=!1,this._unproxyEvents=m_,this._triggerRead=!1,this._cancelTimeouts=m_,this._removeListeners=m_,this._jobs=[],this._flushed=!1,this._requestInitialized=!1,this._aborted=!1,this.redirectUrls=[],this.retryCount=0,this._stopRetry=m_,this.on("pipe",e=>{e?.headers&&Object.assign(this.options.headers,e.headers)}),this.on("newListener",e=>{if("retry"===e&&this.listenerCount("retry")>0)throw new Error("A retry listener has been attached already.")});try{if(this.options=new i_(e,t,n),!this.options.url){if(""===this.options.prefixUrl)throw new TypeError("Missing `url` property");this.options.url=""}this.requestUrl=this.options.url}catch(e){const{options:t}=e;return t&&(this.options=t),void(this.flush=async()=>{this.flush=async()=>{},this.destroy(e)})}const{body:r}=this.options;if(Bb.nodeStream(r)&&r.once("error",e=>{this._flushed?this._beforeError(new ev(e,this)):this.flush=async()=>{this.flush=async()=>{},this._beforeError(new ev(e,this))}}),this.options.signal){const e=()=>{this.destroy(new iv(this))};this.options.signal.aborted?e():(this.options.signal.addEventListener("abort",e),this._removeListeners=()=>{this.options.signal?.removeEventListener("abort",e)})}}async flush(){if(!this._flushed){this._flushed=!0;try{if(await this._finalizeBody(),this.destroyed)return;if(await this._makeRequest(),this.destroyed)return void this._request?.destroy();for(const e of this._jobs)e();this._jobs.length=0,this._requestInitialized=!0}catch(e){this._beforeError(e)}}}_beforeError(e){if(this._stopReading)return;const{response:t,options:n}=this,r=this.retryCount+("RetryError"===e.name?0:1);this._stopReading=!0,e instanceof Jb||(e=new Jb(e.message,e,this));const i=e;(async()=>{if(t?.readable&&!t.rawBody&&!this._request?.socket?.destroyed){t.setEncoding(this.readableEncoding);await this._setRawBody(t)&&(t.body=t.rawBody.toString())}if(0!==this.listenerCount("retry")){let a;try{let e;t&&"retry-after"in t.headers&&(e=Number(t.headers["retry-after"]),Number.isNaN(e)?(e=Date.parse(t.headers["retry-after"])-Date.now(),e<=0&&(e=1)):e*=1e3);const s=n.retry;a=await s.calculateDelay({attemptCount:r,retryOptions:s,error:i,retryAfter:e,computedValue:_w({attemptCount:r,retryOptions:s,error:i,retryAfter:e,computedValue:s.maxRetryAfter??n.timeout.request??Number.POSITIVE_INFINITY})})}catch(e){return void this._error(new Jb(e.message,e,this))}if(a){if(await new Promise(e=>{const t=setTimeout(e,a);this._stopRetry=()=>{clearTimeout(t),e()}}),this.destroyed)return;try{for(const e of this.options.hooks.beforeRetry)await e(i,this.retryCount+1)}catch(t){return void this._error(new Jb(t.message,e,this))}if(this.destroyed)return;return this.destroy(),void this.emit("retry",this.retryCount+1,e,e=>{const t=new y_(n.url,e,n);return t.retryCount=this.retryCount+1,B.nextTick(()=>{t.flush()}),t})}}this._error(i)})()}_read(){this._triggerRead=!0;const{response:e}=this;if(e&&!this._stopReading){let t;for(e.readableLength&&(this._triggerRead=!1);null!==(t=e.read());){this._downloadedSize+=t.length;const e=this.downloadProgress;e.percent<1&&this.emit("downloadProgress",e),this.push(t)}}}_write(e,t,n){const r=()=>{this._writeRequest(e,t,n)};this._requestInitialized?r():this._jobs.push(r)}_final(e){const t=()=>{this._request&&!this._request.destroyed?this._request.end(t=>{this._request._writableState?.errored||(t||(this._bodySize=this._uploadedSize,this.emit("uploadProgress",this.uploadProgress),this._request.emit("upload-complete")),e(t))}):e()};this._requestInitialized?t():this._jobs.push(t)}_destroy(e,t){if(this._stopReading=!0,this.flush=async()=>{},this._stopRetry(),this._cancelTimeouts(),this._removeListeners(),this.options){const{body:e}=this.options;Bb.nodeStream(e)&&e.destroy()}this._request&&this._request.destroy(),null===e||Bb.undefined(e)||e instanceof Jb||(e=new Jb(e.message,e,this)),t(e)}pipe(e,t){return e instanceof G&&this._pipedServerResponses.add(e),super.pipe(e,t)}unpipe(e){return e instanceof G&&this._pipedServerResponses.delete(e),super.unpipe(e),this}async _finalizeBody(){const{options:e}=this,{headers:t}=e,n=!Bb.undefined(e.form),r=!Bb.undefined(e.json),i=!Bb.undefined(e.body),a=p_.has(e.method)&&!("GET"===e.method&&e.allowGetBody);if(this._cannotHaveBody=a,n||r||i){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);const r=!Bb.string(t["content-type"]);if(i){if(Xv(e.body)){const n=new yw(e.body);r&&(t["content-type"]=n.headers["Content-Type"]),"Content-Length"in n.headers&&(t["content-length"]=n.headers["Content-Length"]),e.body=n.encode()}gw(e.body)&&r&&(t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`)}else if(n){r&&(t["content-type"]="application/x-www-form-urlencoded");const{form:n}=e;e.form=void 0,e.body=new URLSearchParams(n).toString()}else{r&&(t["content-type"]="application/json");const{json:n}=e;e.json=void 0,e.body=e.stringifyJson(n)}const s=await async function(e,t){return t&&"content-length"in t?Number(t["content-length"]):e?Bb.string(e)?F.byteLength(e):Bb.buffer(e)?e.length:gw(e)?j(e.getLength.bind(e))():void 0:0}(e.body,e.headers);Bb.undefined(t["content-length"])&&Bb.undefined(t["transfer-encoding"])&&!a&&!Bb.undefined(s)&&(t["content-length"]=String(s))}"json"!==e.responseType||"accept"in e.headers||(e.headers.accept="application/json"),this._bodySize=Number(t["content-length"])||void 0}async _onResponseBase(e){if(this.isAborted)return;const{options:t}=this,{url:n}=t;this._nativeResponse=e,t.decompress&&(e=Yv(e));const r=e.statusCode,i=e;i.statusMessage=i.statusMessage??K.STATUS_CODES[r],i.url=t.url.toString(),i.requestUrl=this.requestUrl,i.redirectUrls=this.redirectUrls,i.request=this,i.isFromCache=this._nativeResponse.fromCache??!1,i.ip=this.ip,i.retryCount=this.retryCount,i.ok=a_(i),this._isFromCache=i.isFromCache,this._responseSize=Number(e.headers["content-length"])||void 0,this.response=i,e.once("end",()=>{this._responseSize=this._downloadedSize,this.emit("downloadProgress",this.downloadProgress)}),e.once("error",t=>{this._aborted=!0,e.destroy(),this._beforeError(new nv(t,this))}),e.once("aborted",()=>{this._aborted=!0,this._beforeError(new nv({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);const a=e.headers["set-cookie"];if(Bb.object(t.cookieJar)&&a){let e=a.map(async e=>t.cookieJar.setCookie(e,n.toString()));t.ignoreInvalidCookies&&(e=e.map(async e=>{try{await e}catch{}}));try{await Promise.all(e)}catch(e){return void this._beforeError(e)}}if(!this.isAborted){if(t.followRedirect&&e.headers.location&&f_.has(r)){if(e.resume(),this._cancelTimeouts(),this._unproxyEvents(),this.redirectUrls.length>=t.maxRedirects)return void this._beforeError(new Zb(this));this._request=void 0;const a=new i_(void 0,void 0,this.options),s=303===r&&"GET"!==a.method&&"HEAD"!==a.method,o=307!==r&&308!==r,c=a.methodRewriting&&o;(s||c)&&(a.method="GET",a.body=void 0,a.json=void 0,a.form=void 0,delete a.headers["content-length"]);try{const t=F.from(e.headers.location,"binary").toString(),r=new URL(t,n);if(!c_(n)&&c_(r))return void this._beforeError(new Jb("Cannot redirect to UNIX socket",{},this));r.hostname!==n.hostname||r.port!==n.port?("host"in a.headers&&delete a.headers.host,"cookie"in a.headers&&delete a.headers.cookie,"authorization"in a.headers&&delete a.headers.authorization,(a.username||a.password)&&(a.username="",a.password="")):(r.username=a.username,r.password=a.password),this.redirectUrls.push(r),a.prefixUrl="",a.url=r;for(const e of a.hooks.beforeRedirect)await e(a,i);this.emit("redirect",a,i),this.options=a,await this._makeRequest()}catch(e){return void this._beforeError(e)}return}if(t.isStream&&t.throwHttpErrors&&!a_(i))this._beforeError(new Xb(i));else{if(e.on("readable",()=>{this._triggerRead&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this._noPipe){return void(await this._setRawBody()&&this.emit("response",e))}this.emit("response",e);for(const n of this._pipedServerResponses)if(!n.headersSent){for(const r in e.headers){const i=!t.decompress||"content-encoding"!==r,a=e.headers[r];i&&n.setHeader(r,a)}n.statusCode=r}}}}async _setRawBody(e=this){if(e.readableEnded)return!1;try{const t=await u_(e);if(!this.isAborted)return this.response.rawBody=t,!0}catch{}return!1}async _onResponse(e){try{await this._onResponseBase(e)}catch(e){this._beforeError(e)}}_onRequest(e){const{options:t}=this,{timeout:n,url:r}=t;(e=>{if(e.timings)return e.timings;const t={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};e.timings=t;const n=e=>{e.once(h,()=>{t.error=Date.now(),t.phases.total=t.error-t.start})};n(e);const r=()=>{t.abort=Date.now(),t.phases.total=t.abort-t.start};e.prependOnceListener("abort",r);const i=e=>{if(t.socket=Date.now(),t.phases.wait=t.socket-t.start,o.isProxy(e))return;const n=()=>{t.lookup=Date.now(),t.phases.dns=t.lookup-t.socket};e.prependOnceListener("lookup",n),cv(e,{connect:()=>{t.connect=Date.now(),void 0===t.lookup&&(e.removeListener("lookup",n),t.lookup=t.connect,t.phases.dns=t.lookup-t.socket),t.phases.tcp=t.connect-t.lookup},secureConnect:()=>{t.secureConnect=Date.now(),t.phases.tls=t.secureConnect-t.connect}})};e.socket?i(e.socket):e.prependOnceListener("socket",i);const a=()=>{t.upload=Date.now(),t.phases.request=t.upload-(t.secureConnect??t.connect)};e.writableFinished?a():e.prependOnceListener("finish",a),e.prependOnceListener("response",i=>{t.response=Date.now(),t.phases.firstByte=t.response-t.upload,i.timings=t,n(i),i.prependOnceListener("end",()=>{e.off("abort",r),i.off("aborted",r),t.phases.total||(t.end=Date.now(),t.phases.download=t.end-t.response,t.phases.total=t.end-t.start)}),i.prependOnceListener("aborted",r)})})(e),this.options.http2&&e.setTimeout(0),this._cancelTimeouts=function(e,t,n){if(vw in e)return ww;e[vw]=!0;const r=[],{once:i,unhandleAll:a}=function(){const e=[];return{once(t,n,r){t.once(n,r),e.push({origin:t,event:n,fn:r})},unhandleAll(){for(const t of e){const{origin:e,event:n,fn:r}=t;e.removeListener(n,r)}e.length=0}}}(),s=(e,t,n)=>{const i=setTimeout(t,e,e,n);i.unref?.();const a=()=>{clearTimeout(i)};return r.push(a),a},{host:o,hostname:c}=n,u=(t,n)=>{e.destroy(new xw(t,n))},l=()=>{for(const e of r)e();a()};if(e.once("error",t=>{if(l(),0===e.listenerCount("error"))throw t}),void 0!==t.request){const n=s(t.request,u,"request");i(e,"response",e=>{i(e,"end",n)})}if(void 0!==t.socket){const{socket:n}=t,i=()=>{u(n,"socket")};e.setTimeout(n,i),r.push(()=>{e.removeListener("timeout",i)})}const p=void 0!==t.lookup,d=void 0!==t.connect,f=void 0!==t.secureConnect,h=void 0!==t.send;return(p||d||f||h)&&i(e,"socket",r=>{const{socketPath:a}=e;if(r.connecting){const e=Boolean(a??0!==Z.isIP(c??o??""));if(p&&!e&&void 0===r.address().address){const e=s(t.lookup,u,"lookup");i(r,"lookup",e)}if(d){const n=()=>s(t.connect,u,"connect");e?i(r,"connect",n()):i(r,"lookup",e=>{null===e&&i(r,"connect",n())})}f&&"https:"===n.protocol&&i(r,"connect",()=>{const e=s(t.secureConnect,u,"secureConnect");i(r,"secureConnect",e)})}if(h){const n=()=>s(t.send,u,"send");r.connecting?i(r,"connect",()=>{i(e,"upload-complete",n())}):i(e,"upload-complete",n())}}),void 0!==t.response&&i(e,"upload-complete",()=>{const n=s(t.response,u,"response");i(e,"response",n)}),void 0!==t.read&&i(e,"response",e=>{const n=s(t.read,u,"read");i(e,"end",n)}),l}(e,n,r);const i=t.cache?"cacheableResponse":"response";e.once(i,e=>{this._onResponse(e)}),e.once("error",t=>{this._aborted=!0,e.destroy(),t=t instanceof xw?new tv(t,this.timings,this):new Jb(t.message,t,this),this._beforeError(t)}),this._unproxyEvents=bw(e,this,h_),this._request=e,this.emit("uploadProgress",this.uploadProgress),this._sendBody(),this.emit("request",e)}async _asyncWrite(e){return new Promise((t,n)=>{super.write(e,e=>{e?n(e):t()})})}_sendBody(){const{body:e}=this.options,t=0===this.redirectUrls.length?this:this._request??this;Bb.nodeStream(e)?e.pipe(t):Bb.generator(e)||Bb.asyncGenerator(e)?(async()=>{try{for await(const t of e)await this._asyncWrite(t);super.end()}catch(e){this._beforeError(e)}})():Bb.undefined(e)?(this._cannotHaveBody||this._noPipe)&&t.end():(this._writeRequest(e,void 0,()=>{}),t.end())}_prepareCache(e){if(!d_.has(e)){const t=new Cv((e,t)=>{const n=e._request(e,t);return Bb.promise(n)&&(n.once=(e,t)=>{if("error"===e)(async()=>{try{await n}catch(e){t(e)}})();else{if("abort"!==e)throw new Error(`Unknown HTTP2 promise event: ${e}`);(async()=>{try{(await n).once("abort",t)}catch{}})()}return n}),n},e);d_.set(e,t.request())}}async _createCacheableRequest(e,t){return new Promise((n,r)=>{let i;Object.assign(t,function(e){const t={protocol:e.protocol,hostname:Bb.string(e.hostname)&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,host:e.host,hash:e.hash,search:e.search,pathname:e.pathname,href:e.href,path:`${e.pathname||""}${e.search||""}`};return Bb.string(e.port)&&e.port.length>0&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username||""}:${e.password||""}`),t}(e));const a=d_.get(t.cache)(t,async e=>{if(e._readableState.autoDestroy=!1,i){const t=()=>{e.req&&(e.complete=e.req.res.complete)};e.prependOnceListener("end",t),t(),(await i).emit("cacheableResponse",e)}n(e)});a.once("error",r),a.once("request",async e=>{i=e,n(i)})})}async _makeRequest(){const{options:e}=this,{headers:t,username:n,password:r}=e,i=e.cookieJar;for(const e in t)if(Bb.undefined(t[e]))delete t[e];else if(Bb.null_(t[e]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${e}\` header`);if(e.decompress&&Bb.undefined(t["accept-encoding"])&&(t["accept-encoding"]=l_?"gzip, deflate, br":"gzip, deflate"),n||r){const e=F.from(`${n}:${r}`).toString("base64");t.authorization=`Basic ${e}`}if(i){const n=await i.getCookieString(e.url.toString());Bb.nonEmptyString(n)&&(t.cookie=n)}let a;e.prefixUrl="";for(const t of e.hooks.beforeRequest){const n=await t(e);if(!Bb.undefined(n)){a=()=>n;break}}a||(a=e.getRequestFunction());const s=e.url;this._requestOptions=e.createNativeRequestOptions(),e.cache&&(this._requestOptions._request=a,this._requestOptions.cache=e.cache,this._requestOptions.body=e.body,this._prepareCache(e.cache));const o=e.cache?this._createCacheableRequest:a;try{let t=o(s,this._requestOptions);Bb.promise(t)&&(t=await t),Bb.undefined(t)&&(t=e.getFallbackRequestFunction()(s,this._requestOptions),Bb.promise(t)&&(t=await t)),!function(e){return e.writable&&!e.writableEnded}(t)?this.writable?(this.once("finish",()=>{this._onResponse(t)}),this._sendBody()):this._onResponse(t):this._onRequest(t)}catch(e){if(e instanceof Nv)throw new Qb(e,this);throw e}}async _error(e){try{if(e instanceof Xb&&!this.options.throwHttpErrors);else for(const t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new Jb(t.message,t,this)}this.destroy(e)}_writeRequest(e,t,n){this._request&&!this._request.destroyed&&this._request.write(e,t,r=>{if(!r&&!this._request.destroyed){this._uploadedSize+=F.byteLength(e,t);const n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}n(r)})}get ip(){return this.socket?.remoteAddress}get isAborted(){return this._aborted}get socket(){return this._request?.socket??void 0}get downloadProgress(){let e;return e=this._responseSize?this._downloadedSize/this._responseSize:this._responseSize===this._downloadedSize?1:0,{percent:e,transferred:this._downloadedSize,total:this._responseSize}}get uploadProgress(){let e;return e=this._bodySize?this._uploadedSize/this._bodySize:this._bodySize===this._uploadedSize?1:0,{percent:e,transferred:this._uploadedSize,total:this._bodySize}}get timings(){return this._request?.timings}get isFromCache(){return this._isFromCache}get reusedSocket(){return this._request?.reusedSocket}}class g_ extends Jb{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}}const b_=["request","response","redirect","uploadProgress","downloadProgress"];function v_(e){let t,n,r;const i=new z,a=new Wb((s,o,c)=>{c(()=>{t.destroy()}),c.shouldReject=!1,c(()=>{o(new g_(t))});const u=l=>{c(()=>{});const p=e??new y_(void 0,void 0,r);p.retryCount=l,p._noPipe=!0,t=p,p.once("response",async e=>{const t=(e.headers["content-encoding"]??"").toLowerCase(),r="gzip"===t||"deflate"===t||"br"===t,{options:i}=p;if(r&&!i.decompress)e.body=e.rawBody;else try{e.body=o_(e,i.responseType,i.parseJson,i.encoding)}catch(t){if(e.body=e.rawBody.toString(),a_(e))return void p._beforeError(t)}try{const t=i.hooks.afterResponse;for(const[n,r]of t.entries())if(e=await r(e,async e=>{throw i.merge(e),i.prefixUrl="",e.url&&(i.url=e.url),i.hooks.afterResponse=i.hooks.afterResponse.slice(0,n),new rv(p)}),!Bb.object(e)||!Bb.number(e.statusCode)||Bb.nullOrUndefined(e.body))throw new TypeError("The `afterResponse` hook returned an invalid value")}catch(e){return void p._beforeError(e)}n=e,a_(e)?(p.destroy(),s(p.options.resolveBodyOnly?e.body:e)):p._beforeError(new Xb(e))});const d=e=>{if(a.isCanceled)return;const{options:t}=p;if(e instanceof Xb&&!t.throwHttpErrors){const{response:t}=e;return p.destroy(),void s(p.options.resolveBodyOnly?t.body:t)}o(e)};p.once("error",d);const f=p.options?.body;p.once("retry",(t,n)=>{e=void 0;const i=p.options.body;if(f===i&&Bb.nodeStream(i))return n.message="Cannot retry with consumed body stream",void d(n);r=p.options,u(t)}),bw(p,i,b_),Bb.undefined(e)&&p.flush()};u(0)});a.on=(e,t)=>(i.on(e,t),a),a.off=(e,t)=>(i.off(e,t),a);const s=e=>{const t=(async()=>{await a;const{options:t}=n.request;return o_(n,e,t.parseJson,t.encoding)})();return Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)),t};return a.json=()=>{if(t.options){const{headers:e}=t.options;t.writableFinished||"accept"in e||(e.accept="application/json")}return s("json")},a.buffer=()=>s("buffer"),a.text=()=>s("text"),a}const w_=async e=>new Promise(t=>{setTimeout(t,e)}),x_=e=>Bb.function_(e),__=["get","post","put","patch","head","delete"],T_=e=>{e={options:new i_(void 0,void 0,e.options),handlers:[...e.handlers],mutableDefaults:e.mutableDefaults},Object.defineProperty(e,"mutableDefaults",{enumerable:!0,configurable:!1,writable:!1});const t=(t,n,r=e.options)=>{const i=new y_(t,n,r);let a;const s=e=>(i.options=e,i._noPipe=!e.isStream,i.flush(),e.isStream?i:(a||(a=v_(i)),a));let o=0;const c=t=>{const n=(e.handlers[o++]??s)(t,c);if(Bb.promise(n)&&!i.options.isStream&&(a||(a=v_(i)),n!==a)){const e=Object.getOwnPropertyDescriptors(a);for(const t in e)t in n&&delete e[t];Object.defineProperties(n,e),n.cancel=a.cancel}return n};return c(i.options)};t.extend=(...t)=>{const n=new i_(void 0,void 0,e.options),r=[...e.handlers];let i;for(const e of t)x_(e)?(n.merge(e.defaults.options),r.push(...e.defaults.handlers),i=e.defaults.mutableDefaults):(n.merge(e),e.handlers&&r.push(...e.handlers),i=e.mutableDefaults);return T_({options:n,handlers:r,mutableDefaults:Boolean(i)})};const n=async function*(n,r){let i=new i_(n,r,e.options);i.resolveBodyOnly=!1;const{pagination:a}=i;Kb.function_(a.transform),Kb.function_(a.shouldContinue),Kb.function_(a.filter),Kb.function_(a.paginate),Kb.number(a.countLimit),Kb.number(a.requestLimit),Kb.number(a.backoff);const s=[];let{countLimit:o}=a,c=0;for(;c<a.requestLimit;){0!==c&&await w_(a.backoff);const e=await t(void 0,void 0,i),n=await a.transform(e),r=[];Kb.array(n);for(const e of n)if(a.filter({item:e,currentItems:r,allItems:s})){if(!a.shouldContinue({item:e,currentItems:r,allItems:s}))return;if(yield e,a.stackAllItems&&s.push(e),r.push(e),--o<=0)return}const u=a.paginate({response:e,currentItems:r,allItems:s});if(!1===u)return;u===e.request.options?i=e.request.options:(i.merge(u),Kb.any([Bb.urlInstance,Bb.undefined],u.url),void 0!==u.url&&(i.prefixUrl="",i.url=u.url)),c++}};(t.paginate=n).all=async(e,t)=>{const r=[];for await(const i of n(e,t))r.push(i);return r},t.paginate.each=n,t.stream=(e,n)=>t(e,{...n,isStream:!0});for(const e of __)t[e]=(n,r)=>t(n,{...r,method:e}),t.stream[e]=(n,r)=>t(n,{...r,method:e,isStream:!0});return e.mutableDefaults||(Object.freeze(e.handlers),e.options.freeze()),Object.defineProperty(t,"defaults",{value:e,writable:!1,configurable:!1,enumerable:!0}),t},E_={options:new i_,handlers:[],mutableDefaults:!1},S_=T_(E_),k_="[a-fA-F\\d:]",M_=e=>e&&e.includeBoundaries?`(?:(?<=\\s|^)(?=${k_})|(?<=${k_})(?=\\s|$))`:"",A_="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",O_="[a-fA-F\\d]{1,4}",R_=`\n(?:\n(?:${O_}:){7}(?:${O_}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${O_}:){6}(?:${A_}|:${O_}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${O_}:){5}(?::${A_}|(?::${O_}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${O_}:){4}(?:(?::${O_}){0,1}:${A_}|(?::${O_}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${O_}:){3}(?:(?::${O_}){0,2}:${A_}|(?::${O_}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${O_}:){2}(?:(?::${O_}){0,3}:${A_}|(?::${O_}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${O_}:){1}(?:(?::${O_}){0,4}:${A_}|(?::${O_}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${O_}){0,5}:${A_}|(?::${O_}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),I_=new RegExp(`(?:^${A_}$)|(?:^${R_}$)`),N_=new RegExp(`^${A_}$`),C_=new RegExp(`^${R_}$`),P_=e=>e&&e.exact?I_:new RegExp(`(?:${M_(e)}${A_}${M_(e)})|(?:${M_(e)}${R_}${M_(e)})`,"g");P_.v4=e=>e&&e.exact?N_:new RegExp(`${M_(e)}${A_}${M_(e)}`,"g"),P_.v6=e=>e&&e.exact?C_:new RegExp(`${M_(e)}${R_}${M_(e)}`,"g");const{toString:j_}=Object.prototype;const L_={global:"g",ignoreCase:"i",multiline:"m",dotAll:"s",sticky:"y",unicode:"u"};function $_(e,t={}){if(n=e,"[object RegExp]"!==j_.call(n))throw new TypeError("Expected a RegExp instance");var n;const r=Object.keys(L_).map(n=>("boolean"==typeof t[n]?t[n]:e[n])?L_[n]:"").join(""),i=new RegExp(t.source||e.source,r);return i.lastIndex="number"==typeof t.lastIndex?t.lastIndex:e.lastIndex,i}function D_(e,t,{timeout:n}={}){try{return function(e,{timeout:t}={}){const n=new pe.Script("returnValue = function_()"),r=(...r)=>{const i={function_:()=>e(...r)};return n.runInNewContext(i,{timeout:t}),i.returnValue};return Object.defineProperty(r,"name",{value:`functionTimeout(${e.name||"<anonymous>"})`,configurable:!0}),r}(()=>$_(e).test(t),{timeout:n})()}catch(e){if(function(e){return"ERR_SCRIPT_EXECUTION_TIMEOUT"===e?.code}(e))return!1;throw e}}const U_={timeout:400};function z_(e){return!(e.length>45)&&D_(P_.v6({exact:!0}),e,U_)}function B_(e){return!(e.length>15)&&D_(P_.v4({exact:!0}),e,U_)}class F_ extends Error{constructor(e){super("Could not get the public IP address",e),this.name="IpNotFoundError"}}const q_={timeout:5e3,onlyHttps:!1},H_=[{v4:{servers:["208.67.222.222","208.67.220.220","208.67.222.220","208.67.220.222"],name:"myip.opendns.com",type:"A"},v6:{servers:["2620:0:ccc::2","2620:0:ccd::2"],name:"myip.opendns.com",type:"AAAA"}},{v4:{servers:["216.239.32.10","216.239.34.10","216.239.36.10","216.239.38.10"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")},v6:{servers:["2001:4860:4802:32::a","2001:4860:4802:34::a","2001:4860:4802:36::a","2001:4860:4802:38::a"],name:"o-o.myaddr.l.google.com",type:"TXT",transform:e=>e.replaceAll('"',"")}}],Y_={v4:{dnsServers:H_.map(({v4:{servers:e,...t}})=>({servers:e,question:t})),httpsUrls:["https://icanhazip.com/","https://api.ipify.org/"]},v6:{dnsServers:H_.map(({v6:{servers:e,...t}})=>({servers:e,question:t})),httpsUrls:["https://icanhazip.com/","https://api6.ipify.org/"]}},V_=(e,t)=>{const n=Y_[e],r=Cb({retries:0,maxQueries:1,socket:$.createSocket("v6"===e?"udp6":"udp4"),timeout:t.timeout}),i=j(r.query.bind(r)),a=(async()=>{let t;for(const a of n.dnsServers){const{servers:n,question:s}=a;for(const a of n){if(r.destroyed)return;try{const{name:t,type:n,transform:o}=s,c=await i({questions:[{name:t,type:n}]},53,a),{answers:{0:{data:u}}}=c,l=("string"==typeof u?u:u.toString()).trim(),p=o?o(l):l;if(p&&("v6"===e?z_:B_)(p))return r.destroy(),p}catch(e){t=e}}}throw r.destroy(),new F_({cause:t})})();return a.cancel=()=>{r.destroy()},a},K_=(e,t)=>{let n;const r=(async()=>{try{const r={dnsLookupIpVersion:"v6"===e?6:4,retry:{limit:0},timeout:{request:t.timeout}},i=[...Y_[e].httpsUrls,...t.fallbackUrls??[]];let a;for(const t of i)try{const i=S_.get(t,r);n=i.cancel;const a=await i,s=a.body?.trim();if(s&&("v6"===e?z_:B_)(s))return s}catch(e){if(a=e,e instanceof g_)throw e}throw new F_({cause:a})}catch(e){if(!(e instanceof g_))throw e}})();return r.cancel=function(){return n.apply(this)},r},G_=(e,t)=>{let n;const r=(async()=>{let r;const i=V_(e,t);n=i.cancel;try{r=await i}catch{const i=K_(e,t);n=i.cancel,r=await i}return r})();return r.cancel=n,r},W_=function(e,t){return function(n){const r=e(n),i=t(n),a=(async()=>{try{const e=await i;return r.catch(()=>{}),r.cancel(),e}catch(e){if(!(e instanceof F_))throw e;try{return await r}catch(t){throw new AggregateError([t,e])}}})();return a.cancel=()=>{r.cancel(),i.cancel()},a}}(function(e){if(e={...q_,...e},!e.onlyHttps)return G_("v4",e);if(e.onlyHttps)return K_("v4",e);return V_("v4",e)},function(e){if(e={...q_,...e},!e.onlyHttps)return G_("v6",e);if(e.onlyHttps)return K_("v6",e);return V_("v6",e)});class J_{static create(e,t,n,r){if(t===Yl.EVM)return new ST(e,n,r);throw new Error(`Unsupported blockchain: ${t}`)}}class Z_{serviceLogger;env;pk;constructor(e,t,n){this.serviceLogger=e,this.env=t,this.pk=n}}var X_;!function(e){e.LOCAL="local",e.LOCAL_DOCKER="local-docker",e.TESTNET="testnet",e.STAGING="staging",e.PRODUCTION="production"}(X_||(X_={}));var Q_={address:"0x6da8eE7DF16BD92eb71F314f4b701C6c5b0b2721",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},eT={address:"0x6825142A0e85dDB3cBf872a26eE2beefaedbc465",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},tT={address:"0x6E7175c46C1e2aC0EEE92C22Fa18Df0D98da72C2",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},nT={address:"0x0165878A594ca255338adfa4d48449f69242Eb8F",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},rT={address:"0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},iT={address:"0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},aT={address:"0x8464135c8F25Da09e49BC8782676a84730C318bC",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"bytes32",name:"codeHash",type:"bytes32"},{indexed:!1,internalType:"string",name:"inputSig",type:"string"},{indexed:!1,internalType:"bytes",name:"input",type:"bytes"}],name:"TaskRequested",type:"event"},{inputs:[{internalType:"address",name:"caller",type:"address"},{internalType:"bytes",name:"resultData",type:"bytes"}],name:"callback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"},{internalType:"string",name:"methodSignature",type:"string"},{internalType:"bytes",name:"input",type:"bytes"}],name:"requestExecution",outputs:[],stateMutability:"nonpayable",type:"function"}]},sT={address:"0xc84f349C46e046ca6dbd7e653700DF728FA496E4",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},oT={address:"0x712c0E7122CBa5b0087DED2D7F1beAE9d24e5f5A",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},cT={address:"0x84B5e1c533F3A4b24336a4cFFE546E09D56666Ce",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},uT={address:"0xdA5a5a58ee6fd52B3D0a60758695F7f0f2354F7a",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Deregistered",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Granted",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"}],name:"Registered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"address",name:"grantee",type:"address"}],name:"Revoked",type:"event"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"deregister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"deregisterWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"getPayer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grant",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"grantWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"isAuthorized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"apiKeyHash",type:"string"}],name:"register",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"apiKeyHash",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"revokeWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_taskRegistry",type:"address"}],name:"setTaskRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"taskRegistry",outputs:[{internalType:"contract ITaskRegistry",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},lT={address:"0x26F9aD5E14518C4D4FD86EDA9753c28db5a85bEA",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"ECDSAInvalidSignature",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"}],name:"ECDSAInvalidSignatureLength",type:"error"},{inputs:[{internalType:"bytes32",name:"s",type:"bytes32"}],name:"ECDSAInvalidSignatureS",type:"error"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessGranted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"grantee",type:"address"}],name:"AccessRevoked",type:"event"},{anonymous:!1,inputs:[],name:"EIP712DomainChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaNamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"nonce",type:"uint256"}],name:"MetaTaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"oldOwner",type:"address"},{indexed:!1,internalType:"address",name:"newOwner",type:"address"}],name:"NamespaceOwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NamespaceRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskDisabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"cid",type:"string"},{indexed:!1,internalType:"address",name:"sender",type:"address"}],name:"TaskIdRevoked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"}],name:"TaskRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"string",name:"namespace",type:"string"},{indexed:!0,internalType:"string",name:"taskName",type:"string"},{indexed:!1,internalType:"uint256",name:"version",type:"uint256"},{indexed:!1,internalType:"string",name:"label",type:"string"}],name:"VersionLabelSet",type:"event"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"disableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"disableTaskByLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{internalType:"bytes1",name:"fields",type:"bytes1"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"version",type:"string"},{internalType:"uint256",name:"chainId",type:"uint256"},{internalType:"address",name:"verifyingContract",type:"address"},{internalType:"bytes32",name:"salt",type:"bytes32"},{internalType:"uint256[]",name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"enableTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestActiveVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getLatestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"}],name:"getTask",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"string",name:"label",type:"string"}],name:"getTaskByLabel",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"}],name:"getTaskByVersion",outputs:[{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"",type:"tuple"},{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"grantNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"input",type:"string"}],name:"isAsciiString",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"isTaskRevoked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"str",type:"string"}],name:"isValidName",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"labeledVersions",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],name:"latestVersion",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"address",name:"",type:"address"}],name:"namespaceGrantees",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"namespaceOwners",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"}],name:"registerTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"}],name:"registerTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskNamespaceWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{components:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],internalType:"struct TaskRegistry.Task",name:"task",type:"tuple"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"registerTaskWithSignature",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeNamespaceAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"taskId",type:"string"}],name:"revokeTask",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"}],name:"revokedTaskId",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"string",name:"taskName",type:"string"},{internalType:"uint256",name:"version",type:"uint256"},{internalType:"string",name:"label",type:"string"}],name:"setTaskLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint256",name:"",type:"uint256"}],name:"tasks",outputs:[{internalType:"string",name:"taskId",type:"string"},{internalType:"string",name:"meta",type:"string"},{internalType:"bool",name:"active",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"namespace",type:"string"},{internalType:"address",name:"newOwner",type:"address"}],name:"transferTaskNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]},pT={address:"0xB0Cd8d3430C14ecc08c4ccff713d5b21b472f88C",abi:[{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"previousAdmin",type:"address"},{indexed:!1,internalType:"address",name:"newAdmin",type:"address"}],name:"AdminChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"beacon",type:"address"}],name:"BeaconUpgraded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"admin",outputs:[{internalType:"address",name:"admin_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newAdmin",type:"address"}],name:"changeAdmin",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"implementation",outputs:[{internalType:"address",name:"implementation_",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"}],name:"upgradeTo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newImplementation",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"},{inputs:[],name:"InvalidInitialization",type:"error"},{inputs:[],name:"NotInitializing",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"OwnableInvalidOwner",type:"error"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"OwnableUnauthorizedAccount",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"}],name:"DeRegistered",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint64",name:"version",type:"uint64"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"id",type:"address"},{indexed:!1,internalType:"uint256",name:"index",type:"uint256"}],name:"Registered",type:"event"},{inputs:[],name:"deRegister",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"id",type:"address"}],name:"deRegisterAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"deRegisterAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getNodeAtIndex",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodeCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"node",type:"address"}],name:"getNodeIndexByAddress",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNodes",outputs:[{components:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct NodeRegistry.Registration[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nodeIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"registerNode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"registeredNodes",outputs:[{internalType:"address",name:"nodeAddress",type:"address"},{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"uint256",name:"timestamp",type:"uint256"}],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"},{inputs:[{internalType:"address",name:"_logic",type:"address"},{internalType:"address",name:"admin_",type:"address"},{internalType:"bytes",name:"_data",type:"bytes"}],stateMutability:"payable",type:"constructor"}]};function dT(e){switch(e){case X_.LOCAL:return{url:"http://localhost:8545",chainId:"31337",registry:{address:iT.address,abi:iT.abi},taskRegistry:{address:rT.address,abi:rT.abi},authorization:{address:nT.address,abi:nT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.LOCAL_DOCKER:return{url:"http://hardhat-node:8545",chainId:"31337",registry:{address:iT.address,abi:iT.abi},taskRegistry:{address:rT.address,abi:rT.abi},authorization:{address:nT.address,abi:nT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.TESTNET:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",registry:{address:pT.address,abi:pT.abi},taskRegistry:{address:lT.address,abi:lT.abi},authorization:{address:uT.address,abi:uT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.STAGING:return{url:process.env.RPC_URL||"https://api.avax-test.network/ext/bc/C/rpc",chainId:"43113",registry:{address:cT.address,abi:cT.abi},taskRegistry:{address:oT.address,abi:oT.abi},authorization:{address:sT.address,abi:sT.abi},watchTower:{address:aT.address,abi:aT.abi}};case X_.PRODUCTION:return{url:process.env.RPC_URL||"https://api.avax.network/ext/bc/C/rpc",chainId:"43114",registry:{address:tT.address,abi:tT.abi},taskRegistry:{address:eT.address,abi:eT.abi},authorization:{address:Q_.address,abi:Q_.abi},watchTower:{address:aT.address,abi:aT.abi}};default:throw new Error(`Unsupported environment: ${e}`)}}let fT={delay:250,maxTry:240,until:null};function hT(e,t){const n=Object.assign(Object.assign({},Object.assign({},fT)),t);return Object.assign(Object.assign({},n),{currentTry:e,maxTry:n.maxTry||240,delay:mT(n.delay),until:n.until?n.until:()=>!0})}function mT(e){return void 0===e?()=>250:"function"==typeof e?e:()=>e}globalThis&&globalThis.__awaiter;class yT extends Error{constructor(e=void 0){super("function did not complete within allowed number of attempts"),this.lastResult=e,this.tooManyTries=!0}getLastResult(){return this.lastResult}}function gT(e){return!0===e.tooManyTries}var bT=globalThis&&globalThis.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,o)}c((r=r.apply(e,t||[])).next())})};function vT(e,t){return bT(this,void 0,void 0,function*(){const n=hT(1,t);return yield wT(e,n)})}function wT(e,t){return bT(this,void 0,void 0,function*(){const n=t.currentTry<t.maxTry;try{const r=yield e();if(t.until(r))return t.onSuccessFunc&&t.onSuccessFunc(r,t.currentTry),r;throw n?new Error("function result failed to meet until() requirements"):new yT(r)}catch(r){if(!gT(r)&&n)return t.onError&&t.onError(r,t.currentTry),yield function(e,t,n){return bT(this,void 0,void 0,function*(){const r=t.delay({currentTry:t.currentTry,maxTry:t.maxTry,lastDelay:t.lastDelay,lastResult:n});yield function(e=6e4){return new Promise(t=>setTimeout(t,e))}(r);const i=Object.assign(Object.assign({},t),{currentTry:t.currentTry+1});return yield wT(e,i)})}(e,t);throw t.onMaxRetryFunc&&t.onMaxRetryFunc(r,t.currentTry),r}})}globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter,globalThis&&globalThis.__awaiter;class xT{serviceLogger;provider;signer;contractAddress;nodeRegistryContract;constructor(e,t,n){this.serviceLogger=e;const r=dT(t);this.provider=n.provider,this.signer=n,this.contractAddress=r.registry.address,this.nodeRegistryContract=new de.Contract(this.contractAddress,r.registry.abi,this.signer)}async getChainId(){const{chainId:e}=await this.provider.getNetwork();return e.toString()}getRegistrationContractAddress(){return this.contractAddress}async registerNode(){await this.nodeRegistryContract.registerNode()}async getNodes(){return(await this.nodeRegistryContract.getNodes()).map(e=>({nodeAddress:e.nodeAddress,blockNumber:e.blockNumber,timestamp:e.timestamp}))}async getNodeCount(){return await this.nodeRegistryContract.getNodeCount()}async deRegister(){return await this.nodeRegistryContract.deRegister()}async deRegisterAddress(e){await this.nodeRegistryContract.deRegisterAddress(e)}async getNodeAtIndex(e){const t=await this.nodeRegistryContract.getNodeAtIndex(e);return{nodeAddress:t.nodeAddress,blockNumber:t.blockNumber,timestamp:t.timestamp}}async getNodeIndexByAddress(e){return await this.nodeRegistryContract.getNodeIndexByAddress(e)}async deRegisterAll(){await this.nodeRegistryContract.deRegisterAll()}async getBlockInfo(){const e=await this.provider.getBlock("latest");if(!e)throw"Couldn't get latest block information";if(!e.hash)throw"Couldn't get block hash";return{hash:e.hash,number:e.number,timestamp:e.timestamp}}async getBlockHash(){const e=await this.provider.getBlock("latest");return e?e.hash:null}async waitForBlocks(e){const t=(await vT(async()=>await this.provider.getBlock("latest"),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e})).number+e;await vT(async()=>await this.provider.getBlock("latest"),{delay:2e3,maxTry:Number.MAX_SAFE_INTEGER,until:e=>null!=e&&e.number>=t})}async sendSignedTransaction(e){if(!this.signer)throw"Private key wasn't provided";const t=await this.signer.sendTransaction({data:e}),n=await t.wait();if(n)return n.blockHash;throw new Error("Transaction receipt is null")}async signTransaction(e){if(!this.signer)throw"Private key wasn't provided";return await this.signer.signTransaction(e)}async estimateGas(e){try{return await this.provider.estimateGas(e)}catch(e){throw console.error("Error estimating gas:",e),e}}}class _T{serviceLogger;provider;signer;taskRegistryAddress;taskRegistryContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=dT(t);this.provider=n.provider,this.signer=n,this.taskRegistryAddress=r.taskRegistry.address,this.taskRegistryContract=new de.Contract(this.taskRegistryAddress,r.taskRegistry.abi,this.signer)}getTaskRegistryContractAddress(){return this.taskRegistryAddress}async getEIP712Domain(){return{name:"TaskRegistry",version:"1",chainId:Number(await this.provider.getNetwork().then(e=>e.chainId)),verifyingContract:this.taskRegistryAddress}}async registerTaskNamespace(e){if((await(await this.taskRegistryContract.registerTaskNamespace(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task namespace")}async nonces(e){return await this.taskRegistryContract.nonces(e)}async getNamespaceOwner(e){return await this.taskRegistryContract.namespaceOwners(e)}async registerTaskNamespaceWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskNamespaceWithSignature.estimateGas(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n}),i=await vT(async()=>{const t=await this.taskRegistryContract.registerTaskNamespaceWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task namespace")}async transferTaskNamespace(e,t){if((await(await this.taskRegistryContract.transferTaskNamespace(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error transferring task namespace")}async grantNamespaceAccess(e,t){if((await(await this.taskRegistryContract.grantNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting task namespace")}async revokeNamespaceAccess(e,t){if((await(await this.taskRegistryContract.revokeNamespaceAccess(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking task namespace")}async setTaskLabel(e,t,n,r){if(r.length>128)throw new Error("Label exceeds maximum length of 128 chars");if((await(await this.taskRegistryContract.setTaskLabel(e,t,n,r)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error setting task label")}async registerTask(e,t,n){if((await(await this.taskRegistryContract.registerTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering task")}async registerTaskWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.taskRegistryContract.registerTaskWithSignature.estimateGas(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n}),i=await vT(async()=>{const t=await this.taskRegistryContract.registerTaskWithSignature(e.user,e.namespace,e.taskName,e.task,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering task")}async getTask(e,t){const n=await this.taskRegistryContract.getTask(e,t);return{namespace:e,taskId:n[0][0],version:Number(n[2]),meta:n[0][1],nameSpaceOwner:n[1]}}async getTaskByLabel(e,t,n){const r=await this.taskRegistryContract.getTaskByLabel(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(r[2]),label:n,meta:r[0][1],nameSpaceOwner:r[1]}}async getTaskByVersion(e,t,n){const r=await this.taskRegistryContract.getTaskByVersion(e,t,n);return{namespace:e,taskId:r[0][0],version:Number(n),meta:r[0][1],nameSpaceOwner:r[1]}}async disableTask(e,t,n){if((await(await this.taskRegistryContract.disableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error disabling task")}async enableTask(e,t,n){if((await(await this.taskRegistryContract.enableTask(e,t,n)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error enabling task")}async isTaskRevoked(e){return await this.taskRegistryContract.isTaskRevoked(e)}async getLatestVersion(e,t){const n=Number(await this.taskRegistryContract.getLatestVersion(e,t));if(0==n)throw`Task (${t}) not found in namespace (${e})`;return n}async getLatestActiveVersion(e,t){return Number(await this.taskRegistryContract.getLatestActiveVersion(e,t))}}class TT{serviceLogger;provider;signer;authorizationAddress;authorizationContract;transactionSuccess=1;constructor(e,t,n){this.serviceLogger=e;const r=dT(t);this.provider=n.provider,this.signer=n,this.authorizationAddress=r.authorization.address,this.authorizationContract=new de.Contract(this.authorizationAddress,r.authorization.abi,this.signer)}getAuthorizationContractAddress(){return this.authorizationAddress}async getEIP712Domain(){return{name:"Authorization",version:"1",chainId:Number(await this.provider.getNetwork().then(e=>e.chainId)),verifyingContract:this.authorizationAddress}}async nonces(e){return await this.authorizationContract.nonces(e)}async grantAuthorization(e,t){if((await(await this.authorizationContract.grant(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization")}async grantAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);if((await vT(async()=>{const t=await this.authorizationContract.grantWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta,{gasPrice:n});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error granting authorization with signature")}async revokeAuthorization(e,t){if((await(await this.authorizationContract.revoke(e,t)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization")}async revokeAuthorizationWithSignature(e){if((await vT(async()=>{const t=await this.authorizationContract.revokeWithSignature(e.user,e.namespace,e.deadline,e.signatureMeta);return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error revoking authorization with signature")}async registerAuthorization(e){if((await(await this.authorizationContract.register(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error registering authorization")}async registerAuthorizationWithSignature(e){const t=await this.provider.getFeeData();let n=null;t.gasPrice&&(n=2n*t.gasPrice);const r=2n*await this.authorizationContract.registerWithSignature.estimateGas(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n}),i=await vT(async()=>{const t=await this.authorizationContract.registerWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta,{gasPrice:n,gasLimit:r});return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)});if(i.status==this.transactionSuccess)return i;throw new Error("Error registering authorization with signature")}async deRegisterAuthorization(e){if((await(await this.authorizationContract.deregister(e)).wait()).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization")}async deRegisterAuthorizationWithSignature(e){if((await vT(async()=>{const t=await this.authorizationContract.deregisterWithSignature(e.user,e.apiKeyHash,e.deadline,e.signatureMeta);return await t.wait()},{delay:1e3,maxTry:10,until:e=>!e.messages||!e.messages.includes("Nonce too")&&!e.messages.includes("replacement transaction underpriced")||(this.serviceLogger&&this.serviceLogger.error(`${e.messages}`),this.signer instanceof de.NonceManager&&this.signer.reset(),!1)})).status==this.transactionSuccess)return!0;throw new Error("Error deregistering authorization with signature")}async isAuthorized(e,t){return await this.authorizationContract.isAuthorized(e,t)}async getPayerAddress(e){return await this.authorizationContract.getPayer(e)}}class ET{provider;signer;constructor(e,t){this.provider=t.provider,this.signer=t}async signMeta(e,t,n){if(!function(e){return e&&"string"==typeof e.name&&"string"==typeof e.version&&"number"==typeof e.chainId&&"string"==typeof e.verifyingContract}(e))throw new Error("Invalid EIP712Domain");return await this.signer.signTypedData(e,t,n)}async getCurrentNonce(){return await this.signer.getNonce()}async reSyncNonceManager(){this.signer instanceof de.NonceManager&&this.signer.reset()}}class ST extends Z_{nodeRegistry;taskRegistry;authorization;utils;signer;constructor(e,t,n){if(super(e,t,n),void 0===n)throw new Error("Private key wasn't provided");const r=dT(t),i=new de.Network(t,r.chainId),a=new de.JsonRpcProvider(`${r.url}`,i,{staticNetwork:i}),s=new de.Wallet(n,a);this.signer=new de.NonceManager(s),this.nodeRegistry=new xT(this.serviceLogger,t,this.signer),this.taskRegistry=new _T(this.serviceLogger,t,this.signer),this.authorization=new TT(this.serviceLogger,t,this.signer),this.utils=new ET(t,this.signer)}}const kT=e=>{throw k.isAxiosError(e)?e.response?e.response.data.message.includes("Entitlement Validation Error")?ob.USER_NO_REGISTERED:`${e.response.data.message||e.response.data}`:e.request?`Server is not responding: ${e.message}\n${e.config?.method} - ${e.config?.url}`:e.message:e.message};function MT(e,t){if(e!==e.toLowerCase())throw new Error(`${t} must be lowercase.`)}function AT(e){return J_.create(null,Yl.EVM,e,ab("privateKey"))}function OT(e){if(!de.isAddress(e)||42!==e.length||!e.startsWith("0x"))throw new Error("Must be a valid ethereum address. (ENS not supported yet)")}async function RT(){try{return await W_({onlyHttps:!0})}catch{return"unknown"}}function IT(){return(new Date).toUTCString().replace(",","")}function NT(e,t,n,r,i){const a=ab("address"),s={distinct_id:a,user_ip:t,date_time:IT(),os_version:n,node_version:process.version,cli_version:r,namespace:e,wallet_address:a};return i&&(s.address_to=i),s}function CT(e,t,n,r,i,a,s){const o=ab("address");return{distinct_id:o,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,namespace:e,wallet_address:o,taskname:t,label:a,version:s}}function PT(e,t,n,r){const i=ab("address");return{distinct_id:i,user_ip:t,date_time:IT(),os_version:n,node_version:process.version,cli_version:r,api_key:e,wallet_address:i}}function jT(e){const t=nb(),n=null!==t;let r=0;switch(r=n&&(!n||t.privateKey&&t.address)?2:1,r){case 1:console.error(ob.USER_NO_REGISTERED),process.exit(1);break;case 2:e=rm.createSignedBody(e,t.privateKey,t.address)}return e}const LT=async(e,n)=>{const r=`./tmp.${S()}`;try{t.mkdirSync(r);const s=i.join(process.cwd(),n);if(!t.existsSync(s))throw"Task path doesn't exist";if(e===so.C||e===so.RUST||e===so.JS||e===so.PYTHON){const e="config.json",n=i.join(s,e);if(!t.existsSync(n)){const e={run:{limits:{call:"65536",frame:"524288",gas:"1099511627776",memory:"1024"}}};t.writeFileSync(n,JSON.stringify(e))}t.copyFileSync(n,i.join(r,e));const a="fs.tar",o=i.join(s,a);t.existsSync(o)&&t.copyFileSync(o,i.join(r,a))}const o=lm.createBuild(e);await o.build(n,r);const c=await async function(e,n){if(!t.existsSync(e))throw"Invalid source code path";const r=t.readdirSync(e);if(0===r.length)throw"No files found in directory";const i=new Jg;for(const n of r){const r=e+`/${n}`,s=t.readFileSync(r),o=a.basename(r);i.append("files",s,o)}i.append("lang",n);const s={files:r,lang:n},o=jT(s),c=await ub();return i.append("walletAddress",o.walletAddress),i.append("signature",JSON.stringify(o.signature)),i.append("fmpayload",JSON.stringify(s)),(await c.post("api/filesystem/pushLocal",i,{headers:{...i.getHeaders()}}).catch(e=>{kT(e)})).data}(r,e);return t.rmSync(r,{recursive:!0}),c}catch(e){throw t.rmSync(r,{recursive:!0}),e}},{parse:$T,stringify:DT}=JSON,UT=String,zT=(e,t)=>t,BT=(e,t,n)=>{const r=UT(t.push(n)-1);return e.set(n,r),r},FT=(e,t,n)=>{const r=zT,i=new Map,a=[],s=[];let o=+BT(i,a,r.call({"":e},"",e)),c=!o;for(;o<a.length;)c=!0,s[o]=DT(a[o++],u,n);return"["+s.join(",")+"]";function u(e,t){if(c)return c=!c,t;const n=r.call(this,e,t);switch(typeof n){case"object":if(null===n)return n;case"string":return i.get(n)||BT(i,a,n)}return n}},qT=e=>$T(FT(e));async function HT(e,t,n,r,i){const a=n.body,s=n.method.toLowerCase();let o,c={},u=0,l=0;const p={...r,"x-service-name":"truebit-api-adapter"};o=["post","put","patch"].includes(s)?e+t.path:`${e}${function(e,t){if(t)for(const n in t){const r=t[n];e=e.replace(new RegExp(`{${n}}`,"g"),r)}return e}(t.path,t.params||{})}`;const d=k.create({headers:{Connection:"keep-alive"},httpsAgent:new w.Agent({keepAlive:!0}).on("keylog",(e,t)=>{const n=t.getSession(),r=Buffer.from(n).toString("hex").toUpperCase();c={tlsCert:qT(t.getPeerCertificate(!0)),localCertificate:qT(t.getCertificate()),ephemeral:t.getEphemeralKeyInfo(),cipher:t.getCipher(),session:r,ticket:t.getTLSTicket(),localAddress:t.localAddress,sharedSigAlgs:t.getSharedSigalgs(),remoteAddress:t.remoteAddress,protocol:t.getProtocol()}}),maxContentLength:1/0,maxBodyLength:1/0});d.interceptors.request.use(e=>{const t=e.data?JSON.stringify(e.data):"";return u=(e.url?.length||0)+(t.length||0)+JSON.stringify(e.headers).length,e}),d.interceptors.response.use(e=>(l=JSON.stringify(e.data).length+JSON.stringify(e.headers).length,e));try{let e;switch(s){case"get":e=await d.get(o,{headers:p,timeout:i});break;case"patch":e=await d.patch(o,a,{headers:p,timeout:i});break;case"post":e=await d.post(o,a,{headers:p,timeout:i});break;case"put":e=await d.put(o,a,{headers:p,timeout:i});break;case"delete":e=await d.delete(o,{headers:p,timeout:i});break;default:throw new Error("Unsupported HTTP method")}return[e.data,JSON.stringify(c),bu.SUCCEED,u,l]}catch(e){let t,n;return n=e.response&&e.response.data?JSON.stringify(e.response.data):e.message,t=k.isAxiosError(e)&&e.response||{data:n,status:500,statusText:"",headers:{},config:{headers:{}}},[t.data,JSON.stringify(c),bu.FAILED,u,l]}}function YT(e){if(["local","testnet","staging"].includes(process.env.TRUEBIT_ENV))return[!0,""];try{const t=new URL(e),n=t.hostname;if(!["http:","https:"].includes(t.protocol))return[!1,"Only HTTP and HTTPS protocols are allowed"];if(le(n)){if(function(e){const t=e.split(".").map(Number);return 4===t.length&&!t.some(e=>isNaN(e)||e<0||e>255)&&(10===t[0]||172===t[0]&&t[1]>=16&&t[1]<=31||192===t[0]&&168===t[1]||127===t[0]||169===t[0]&&254===t[1])}(n))return[!1,"Internal IP addresses are not allowed"]}else{const e=[".local",".internal",".cluster.local","localhost","kubernetes","kubernetes.default","kubernetes.default.svc","kubernetes.default.svc.cluster.local"],t=n.toLowerCase();for(const n of e)if(t===n||t.endsWith(n))return[!1,"Internal domains are not allowed"]}return[!0,""]}catch(e){return[!1,"Invalid URL format"]}}function VT(e,t){const n=t.method;if(["POST","PUT","PATCH"].includes(n)){return{host:e,path:t.path,method:n,body:t.body,headers:{}}}if("GET"===n||"DELETE"===n){const r=t.path,i=t.params;return{host:e,path:r.replace(/{(\w+)}/g,(e,t)=>i?.[t]??""),method:n,headers:{}}}throw console.error("Unsupported method:",n),new Error("Api_Adapter create request error format")}async function KT(e,t){try{const n=await N(e),r=function(e){const t=e.servers;if(t&&t.length>0){const e=t[0];let n=e.url;return e.variables&&Object.keys(e.variables).forEach(t=>{const r=e.variables[t],i=r.default||r.enum&&r.enum[0];if(void 0===i)throw new Error(`No default value found for variable ${t}`);n=n.replace(`{${t}}`,i)}),n}throw new Error("No servers defined in OpenAPI document")}(n),[i,a]=YT(r);if(!i)return console.warn(`Manifest-based call blocked: ${a} - baseURL: ${r}`),["",`Security: ${a}`,bu.FAILED];const s=VT(r,t),[o,c]=n.request(s);return c?["",c,bu.FAILED]:[r,"",bu.SUCCEED]}catch(e){return console.log(e),["",e,bu.FAILED]}}class GT{tokens=[];authInputs;parse(e,t){const n=this.parseKeyValuePairs(t);if(0==e.length)return void(this.authInputs=n);const r=Object.keys(n);if(!e.every(e=>r.includes(e)))throw new Error(`Invalid authString: ${e} are required`);{const t={};for(const r of e)t[r]=n[r];this.authInputs=t}}parseKeyValuePairs(e){try{const t=e.split(","),n={};for(const e of t){const[t,r]=e.split(":");n[t.trim()]=r.trim()}return n}catch{throw new Error("Invalid auth string")}}}class WT extends GT{tokens=["accessKey","secretKey"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return he.sign(e,{accessKeyId:this.authInputs.accessKey,secretAccessKey:this.authInputs.secretKey}).headers||{}}}class JT extends GT{tokens=["username","password"];constructor(e){super(),this.parse(this.tokens,e)}authHeaders(e){return{Authorization:`Basic ${btoa(`${this.authInputs.username}:${this.authInputs.password}`)}`}}}class ZT extends GT{tokens=[];constructor(e){super(),this.parse([],e)}authHeaders(e){return{...this.authInputs}}}var XT;!function(e){e.AWS_SIGNATURE="aws-signature",e.BASIC_AUTH="basic-auth",e.CUSTOM_HEADER="custom-header"}(XT||(XT={}));const QT=(e,t)=>{switch(e){case XT.AWS_SIGNATURE:return new WT(t);case XT.BASIC_AUTH:return new JT(t);case XT.CUSTOM_HEADER:return new ZT(t);default:throw new Error(`Invalid authentication method specified. Should be one of <${Object.values(XT)}>`)}},eE=async(e,n,r,i)=>{let a="";const s=t.readFileSync(n,"utf8"),o=JSON.parse(s).input,c=JSON.parse(s).executionTimeout,[u,l,p]=await async function(e){try{const t=JSON.parse(e);return[{path:t.path.toString(),method:t.method.toString(),body:t.body,params:t.params,headers:{}},"",bu.SUCCEED]}catch(e){return console.error("Invalid JSON format:",e),[null,"Api_Adapter create request input format",bu.FAILED]}}(JSON.stringify(o));if(a+=`${P.cyanBright("\nInput request :\n")}`,a+=JSON.stringify(u,null,2)+"\n",null===u)throw a+=`Invalid message input - ${P.red("FAIL")} \n`,new Error(`Invalid message input ${l}`);const[d,f,h]=await KT(e,u);let m,y,g;a+=`${P.cyanBright("\nBase URL = ")}${d} \n`;let b={};if(h!=bu.SUCCEED)throw console.info(`Axios call - ${P.red("ERROR")} `),console.log(a),new Error(`Invalid message input ${f}`);{a+=`${P.cyanBright("OpenAPI manifest check -")} ${P.green("OK")} \n`;const e=VT(d,u),t=new URL(d),n={host:t.host,path:t.pathname+u.path,method:u.method.toUpperCase(),headers:{"Content-Type":"application/json; charset=utf-8"},body:JSON.stringify(u.body)||""};if(r&&(b=((e,t,n)=>QT(e,t).authHeaders(n))(r,i,n)),[m,y,g]=await HT(d,u,e,b,c),null===g)throw a+=`${P.cyanBright("OpenAPI manifest check -")} ${P.red("FAIL")} \n`,new Error(` Error in Axios ${m}`);a+=`${P.cyanBright("\nAPI Task response")}\n`,a+=P.green(JSON.stringify(m,null,2)),console.log(`API Task executed with status - ${P.green("OK")} `),console.log(a)}};const tE=e=>{const t=e.split("_");return n=t[t.length-1],!!/^[a-f0-9]{64}$/gi.test(n);var n};function nE(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(e))throw new Error("Invalid API key format")}async function rE(e,t,n=null,r=ab("blockchainEnv")){let i;MT(e,"Namespace");const a=AT(r),s=ab("address");if(!s)throw`Please provide an address property in '${ib()}/.truebit/secret.json'`;return i=n?await a.taskRegistry.registerTaskNamespace(e):await async function(e,t,n,r){const i=await n.taskRegistry.getEIP712Domain(),a={RegisterTaskNamespaceMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},s=BigInt(await n.taskRegistry.nonces(e)),o={user:de.getAddress(e),namespace:t,nonce:s,deadline:Math.floor(Date.now()/1e3)+3600};let c=await n.utils.signMeta(i,a,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await n.utils.signMeta(i,a,o));const u=await async function(e,t,n,r,i,a){const s={user:e,namespace:t,nonce:BigInt(n),deadline:r,signatureMeta:i};try{const e=await cb(),t={...s};return t.nonce=String(s.nonce),await e.post("user/relayer/namespace",t,{params:{fromSetup:a}})}catch(e){throw k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,o.nonce,o.deadline,c,r);return 201==u.status}(s,e,a,t),i}async function iE(e,t,n,r,i){const a=await i.taskRegistry.getEIP712Domain(),s={Task:[{name:"taskId",type:"string"},{name:"meta",type:"string"},{name:"active",type:"bool"}],RegisterTaskMeta:[{name:"user",type:"address"},{name:"namespace",type:"string"},{name:"taskName",type:"string"},{name:"task",type:"Task"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},o={user:e,namespace:t,taskName:n,task:{taskId:r.taskId,meta:r.meta,active:r.active},nonce:BigInt(await i.taskRegistry.nonces(e)),deadline:Math.floor(Date.now()/1e3)+3600};let c=await i.utils.signMeta(a,s,o);Date.now()/1e3>=o.deadline&&(o.deadline=Math.floor(Date.now()/1e3)+7200,c=await i.utils.signMeta(a,s,o));const u=await async function(e,t,n,r,i,a,s){const o={user:e,namespace:t,taskName:n,task:r,nonce:BigInt(i),deadline:a,signatureMeta:s};try{const e=await cb(),t={...o};return t.nonce=String(o.nonce),await e.post("user/relayer/task",t)}catch(e){throw k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(e,t,n,r,o.nonce,o.deadline,c);return 201==u.status}async function aE(e,t,n,r,i){if(!tE(n))throw new Error("Invalid taskId");if(r)try{r=JSON.stringify(r)}catch{throw new Error("Meta information cannot be serialized as JSON")}let a=null;try{await async function(e){const t=await ub();return await t.post("api/filesystem/push",jT({taskId:e})).catch(kT)}(n);const s={taskId:n,meta:r||"",active:!0};await async function(e,t,n,r=null){const i=AT(ab("blockchainEnv"));let a=!1;try{if(r)a=await i.taskRegistry.registerTask(t,n,e);else{const r=ab("address");if(!r)throw Error(`Please provide an address property in '${ib()}/.truebit/secret.json'`);a=await iE(r,t,n,e,i)}}catch(e){const t=e.message,n=t.match(/execution reverted: "(.*?)" /)?.[1];throw n?new Error(`Trying to register a task -> ${n}`):new Error(`Trying to register a task -> ${t}`)}return a}(s,e,t,i),a=await async function(e,t){const n=AT(ab("blockchainEnv"));return await n.taskRegistry.getLatestVersion(e,t)}(e,t)}catch(e){if(e instanceof Error)throw e;if("string"==typeof e)throw new Error(e)}return a}function sE(e,n){if(console.log(`Task executed with status: ${n.status}`),n.output)if(console.log(`Task executed with result: ${n.output.result}`),n.output.metering){console.log("Task resource usage:");const r=n.output.metering,a=(e,t)=>{if(0==t)return"N/A";const n=e/t;return n<1?"Short":Number(n.toFixed(0))},s={Gas:{Unit:"Steps",Limits:r.limits.gas,Peak:"N/A","Last status":r.last.steps,Capacity:a(r.limits.gas,r.last.steps)},"Nested calls":{Unit:"Calls",Limits:r.limits.call,Peak:r.peak.call,"Last status":r.last.call,Capacity:a(r.limits.call,r.peak.call)},"Frame memory":{Unit:"Bytes",Limits:r.limits.frame,Peak:r.peak.frame,"Last status":r.last.frame,Capacity:a(r.limits.frame,r.peak.frame)},"System memory":{Unit:"64 Kb pages",Limits:r.limits.memory,Peak:r.peak.memory,"Last status":"𝚫 "+r.last.memoryGrowDelta,Capacity:a(r.limits.memory,r.peak.memory)}};if(console.table(s),e.updateConfig){const e=i.join(process.cwd(),"config.json");try{const n=t.readFileSync(e),i=JSON.parse(n.toString());i.run.limits.gas=String(r.last.steps),i.run.limits.call=String(r.peak.call),i.run.limits.frame=String(r.peak.frame),i.run.limits.memory=String(r.limits.memory),t.writeFileSync(e,JSON.stringify(i)),console.log("Task limits updated with last/peak values (--update-config)")}catch(t){console.log(`Error updating config file at '${e}': '${t}', (--update-config)`)}}}else console.log("No task resource usage reported.")}async function oE(){const e=nb(),t=null!==e,n=me.createInterface({input:process.stdin,output:process.stdout});let r=0;if(t&&e.privateKey&&e.address)r=1;else if(t){console.log(ob.SETUP_STEP1);switch((await(i="Press [Y] to proceed or [N] to skip: ",new Promise(e=>n.question(i,e)))).trim().toUpperCase()){case"Y":r=2;break;case"N":r=3;break;default:return console.log("Invalid input. Please enter Y or N."),void n.close()}}var i;switch(r){case 1:sb(),console.log(ob.SETUP_STEP1_SCENARIO1_P1);break;case 2:{sb();const e=de.Wallet.createRandom(),t=e.privateKey,n=e.address;rb({privateKey:t,address:n}),console.log("\nSetting up your new wallet..."),console.log(ob.SETUP_STEP1_SCENARIO2(n));break}case 3:sb(),console.log(ob.SETUP_STEP1_SCENARIO3),process.exit(1);break;default:console.log("An unexpected error occurred.")}n.close()}async function cE(e,t,n,r,i,a,s){console.log("Deploying the API Authentication Credentials");try{if(!function(e){try{new fe(e)}catch{return!1}return!0}(a))throw"Invalid private key provided";if(!de.isAddress(s))throw"Invalid address provided";if(QT(r,i),!tE(e))throw"Invalid taskId";const o=await ub();await o.post("api/api-credentials",jT({taskId:e,namespace:t,taskName:n,authString:i,method:r})).catch(kT),console.log("The credentials were deployed "+P.green("Successfully"))}catch(e){throw`There was an Error deploying credentials:\nCouldn't push api credentials to remote server: ${e}`}}async function uE(e,t,n=ab("blockchainEnv"),r=ab("address")){nE(e);const i=AT(n),a=await i.authorization.getEIP712Domain(),s=await i.authorization.nonces(r),o=Math.floor(Date.now()/1e3)+3600,c=de.keccak256(de.toUtf8Bytes(e)),u={user:r,apiKeyHash:c,nonce:Number(s),deadline:o},l=await i.utils.signMeta(a,{RegisterMeta:[{name:"user",type:"address"},{name:"apiKeyHash",type:"string"},{name:"nonce",type:"uint256"},{name:"deadline",type:"uint256"}]},u),p=await async function(e,t,n,r,i){const a={user:e,apiKeyHash:t,deadline:n,signatureMeta:r};try{const e=await cb();return await e.post("user/relayer/auth",a,{params:{fromSetup:i}})}catch(e){throw k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}(r,c,o,l,t);return 201==p.status?c:null}const lE="0x0000000000000000000000000000000000000000";async function pE(e){let t=!0;if(""===e)t=!1,console.log("An email address is required. Please provide your email address to proceed.");else{new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/).test(e)?await async function(e){const t=await cb();try{return!0===(await t.get(`userexistence/${e}`)).data}catch(e){if(k.isAxiosError(e)&&404===e.response?.status&&"string"==typeof e.response?.data?.message&&e.response.data.message.includes("User not found"))return!1;throw e}}(e)&&(t=!1,console.log("The provided email address is already in use. Please enter a different email address.")):(t=!1,console.log("The email address provided is not valid. Please try again."))}return t}function dE(e){return"Y"===e||"N"===e}async function fE(){const e=await async function(){const e=AT(ab("blockchainEnv"));let t="";try{await vT(async()=>{t=S();const n=de.keccak256(de.toUtf8Bytes(t));return await e.authorization.getPayerAddress(n)===lE},{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw gT(e)?Error("Attempts to generate unique Api Key for the user exhausted."):e}return t}();try{if(!await uE(e,!0))throw Error("The API key could not been registered.")}catch(e){const t=e.message;if(t)throw Error(`There was an error registering the API key -> ${t}`)}return e}async function hE(){const e=await async function(){const e=AT(ab("blockchainEnv"));let t="";try{await vT(async()=>{t=E(4).toString("hex");return await e.taskRegistry.getNamespaceOwner(t)===lE},{delay:500,maxTry:5,until:e=>!0===e})}catch(e){throw gT(e)?Error("Attempts to generate unique namespace for the user exhausted."):e}return t}();try{if(!await rE(e,!0))throw Error("The namespace could not been registered.")}catch(e){const t=e.message,n=t?t.match(/execution reverted: "(.*?)" /)?.[1]:null;if(n)throw Error(`There was an error registering the namespace -> ${n}`);if(t)throw Error(`There was an error registering the namespace -> ${t}`)}return e}async function mE(e,t){try{const n={message:"I am a Truebit User"};if(!t)throw Error("Secret.json does not exists");const r=t.privateKey,i=t.address,a=rm.createSignedBody(n,r,i),s=await cb();return(await s.get(`user/${e}`,{headers:{"truebit-auth":JSON.stringify(a)}})).data}catch(e){if(k.isAxiosError(e)&&401===e.response?.status&&e.response?.data.message.includes("Entitlement Validation Error"))return null;if(k.isAxiosError(e)&&404==e.response?.status&&e.response?.data.message&&e.response?.data.message.includes("User not found"))return null;throw k.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}function yE(e){e.fullNameAnswer="",e.emailAddressAnswer="",e.companyNameAnswer="",e.jobPositionAnswer="",e.eulaAnswer="",e.confirmRegistration=""}async function gE(e,t,n){const r=nb(),i=null!==r;let a,s=0;const o=be({input:process.stdin,output:process.stdout,terminal:!0});switch(i&&(!function(e){return!de.isAddress(e)||42!==e.length||!e.startsWith("0x")}(r.address)?(a=await mE(r.address,r),s=a?2:3):s=1),s){case 1:console.log("The wallet set in the configuration must be a valid ethereum address. (ENS not supported yet)");break;case 2:console.log(ob.SETUP_STEP1_SCENARIO1_P2(a));break;case 3:{console.log(ob.SETUP_STEP2_SCENARIO3_P1),console.log();const i={user_ip:e,date_time:IT(),os_version:u.type+"_"+u.release,node_version:process.version,cli_version:t};await n.sendEventToMixpanel("user_registration_begin",i);const a={confirmRegistration:"",fullNameAnswer:"",emailAddressAnswer:"",companyNameAnswer:"",jobPositionAnswer:"",eulaAnswer:""};try{for(;"Y"!=a.confirmRegistration;){for(a.fullNameAnswer=(await o.question(P.bold(" 1. Full Name: "))).trim();""===a.fullNameAnswer;)console.log("Your full name is required. Please provide your first and last name to proceed."),a.fullNameAnswer=(await o.question(P.bold(" 1. Full Name: "))).trim();for(a.emailAddressAnswer=(await o.question(P.bold(" 2. Email Address: "))).trim();!await pE(a.emailAddressAnswer);)a.emailAddressAnswer=(await o.question(P.bold(" 2. Email Address: "))).trim();for(a.companyNameAnswer=(await o.question(P.bold(" 3. Company Name: "))).trim(),a.jobPositionAnswer=(await o.question(P.bold(" 4. Job Position: "))).trim();!dE(a.eulaAnswer);)a.eulaAnswer=(await o.question(P.bold(` 5. Accept EULA? [Y|N] (${ob.EULA_TERMS_LINK}): `))).toUpperCase();if("N"==a.eulaAnswer){console.log(ob.EULA_REGISTRATION_NO_ACCEPTED);break}for(;!dE(a.confirmRegistration);)console.log("\nIs the information provided above correct?"),a.confirmRegistration=(await o.question(P.bold("Press [Y] to confirm or [N] to edit: "))).toUpperCase();"N"==a.confirmRegistration&&(console.log("\nPlease provide the following information:"),yE(a))}}catch(e){if("AbortError"===e.name||e.message.includes("Ctrl+C")){const t=e.message,r=i;r.error_details=t,r.date_time=IT();const s={fullname:a.fullNameAnswer,email:a.emailAddressAnswer,company:a.companyNameAnswer,role:a.jobPositionAnswer};r.user_info=JSON.stringify(s),await n.sendEventToMixpanel("user_registration_failed",r),process.exit(0)}}if("N"==a.eulaAnswer)break;const s=i;console.log(),console.log("By completing registration, you'll be automatically subscribed to our newsletter."),console.log("To opt-out, please follow the steps described in our documentation portal."),console.log();const c=ye({text:P.bold("... registering your account."),stream:process.stdout}).start();try{const e=await hE(),t=await fE(),i={name:a.fullNameAnswer,email:a.emailAddressAnswer,walletAddress:r?.address,company:a.companyNameAnswer,jobDescription:a.jobPositionAnswer,EULA:rm.createSignedBody({ip:await RT(),date:(new Date).toISOString()},r.privateKey),defaultNamespace:e,defaultApiKey:t};await async function(e){try{const t=await cb();return await t.post("user/register",e)}catch(e){throw k.isAxiosError(e)?e.response?Error(`The server responding with an error -> ${e.response.data.message||e.response.status+" - "+e.response.statusText}`):e.request?Error(`The server is not responding -> ${e.message}`):Error(`There was an error in the communication with the server -> ${e.message}`):"string"==typeof e?Error(`There was an error in the communication with the server -> ${e}`):Error("There was an error in the communication with the server.")}}(i),c.stop(),console.log(ob.SETUP_STEP2_SCENARIO3_P2(a,r.address,e,t)),s.distinct_id=i.walletAddress,s.date_time=IT(),s.fullname=i.name,s.email=i.email,s.company=i.company,s.role=i.jobDescription,s.namespace=i.defaultNamespace,s.api_key=t,s.wallet_address=i.walletAddress,await n.sendEventToMixpanel("user_registration_success",s),await n.registerUserMixpanel(s.wallet_address,function(e){const t={apiKey:e.api_key,name:e.fullname,email:e.email,ip:e.user_ip,company:e.company,role:e.role,namespace:e.namespace,walletAddress:e.wallet_address};return t}(s))}catch(e){c.stop();const t=e.message,r=i;r.error_details=t,r.date_time=IT();const s={fullname:a.fullNameAnswer,email:a.emailAddressAnswer,company:a.companyNameAnswer,role:a.jobPositionAnswer};r.user_info=JSON.stringify(s),await n.sendEventToMixpanel("user_registration_failed",r);const o=t?t.match(/CreateUserValidation - (.*?.*)/)?.[1]:null;if(o)throw Error(o);if(t.includes("Sender doesn't have enough funds to send tx"))throw Error("We are currently experiencing technical difficulties. Please try again later.");console.error(ob.SETUP_STEP2_UNHANDLED_ERROR),process.exit(1)}finally{c.clear()}break}default:throw Error("An unexpected error occurred.")}o.close()}async function bE(e,n,r){const a=nb(),s=null!==a;let o=0;switch(o=s?s&&!a.eula?2:3:1,o){case 1:case 2:{const a=be({input:process.stdin,output:process.stdout,terminal:!0});let s="";const c={user_ip:e,date_time:IT(),os_version:u.type+"_"+u.release,node_version:process.version,cli_version:n};for(console.log(ob.EULA_INSTALLATION);!dE(s);)s=(await a.question(P.bold("\nHave you read, and do you accept the Terms of Use? [Y|N]: "))).toUpperCase(),await r.sendEventToMixpanel("TOS_shown",c);if("N"==s)throw c.date_time=IT(),await r.sendEventToMixpanel("TOS_rejected",c),ob.EULA_INSTALLATION_NO_ACCEPTED;c.date_time=IT(),await r.sendEventToMixpanel("TOS_accepted",c);const l=Math.round((new Date).getTime()).toString();if(1===o){!function(e=tb()){const n=ib(),r=i.join(n,".truebit"),a=i.join(r,"secret.json");t.existsSync(r)||t.mkdirSync(r,{recursive:!0}),t.writeFileSync(a,JSON.stringify(e,null,2),{encoding:"utf8"})}({...tb(),eula:l})}else 2===o&&rb({eula:l});a.close()}}}async function vE(e=!1){const t=nb(),n=null!==t;let r=null,i=0;switch(n?!n||t.privateKey&&t.address?(r=await mE(t.address,t),i=r?4:3):i=2:i=1,i){case 1:case 2:case 3:console.log(ob.USER_NO_REGISTERED),process.exit(1);break;case 4:e&&console.log(`You are logged in as: ${r?.name} - ${r?.email}`)}}async function wE(e){try{return(await vT(async()=>{const t=await async function(){let e=ab("httpAdapterURL");return e||(e=tb().httpAdapterURL),k.create({headers:{Connection:"keep-alive"},httpAgent:new v({keepAlive:!0}),httpsAgent:new x({keepAlive:!0}),baseURL:e,timeout:12e4,maxContentLength:1/0,maxBodyLength:1/0})}();return await t.get("api/version",{params:{version:e}})},{delay:500,maxTry:10})).data}catch(e){throw gT(e)?new Error("Attempts to get platform version exhausted. The server is not responding."):k.isAxiosError(e)?e.response?new Error(`The server responding with an error - ${e.response.status+" - "+e.response.statusText+" - "+e.response.data.message}.`):e.request?new Error(`The server is not responding - ${e.message}.`):new Error(`There was an error in the communication with the server - ${e.message}.`):"string"==typeof e?new Error(`There was an error in the communication with the server -> ${e}`):new Error("There was an error in the communication with the server.")}}async function xE(e){let t=e;"test"==process.env.REGRESSION_ENV&&(t="1.0.0");(await wE(t)).shouldUpdate&&(console.error("Update Required"),console.log(""),console.log("To continue using Truebit Verify, please update the CLI to latest version by running: "),console.log("npm i -g @truebit/cli"),process.exit())}var _E,TE,EE,SE={},kE={exports:{}},ME={exports:{}};function AE(){if(TE)return _E;return TE=1,_E=function(e){function t(e){let r,i,a,s=null;function o(...e){if(!o.enabled)return;const n=o,i=Number(new Date),a=i-(r||i);n.diff=a,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if("%%"===r)return"%";s++;const a=t.formatters[i];if("function"==typeof a){const t=e[s];r=a.call(n,t),e.splice(s,1),s--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return o.namespace=e,o.useColors=t.useColors(),o.color=t.selectColor(e),o.extend=n,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{s=e}}),"function"==typeof t.init&&t.init(o),o}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(i=r,a=n,r++):(n++,r++);else{if(-1===i)return!1;r=i+1,a++,n=a}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(r(e,n))return!1;for(const n of t.names)if(r(e,n))return!0;return!1},t.humanize=Kt(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},_E}var OE,RE,IE,NE,CE,PE,jE={exports:{}};function LE(){return RE?OE:(RE=1,OE=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function $E(){return CE||(CE=1,function(e,t){const n=y,r=s;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),a=` ${i};1m${r} `;n[0]=a+n[0].split("\n").join("\n"+a),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(NE)return IE;NE=1;const e=l,t=y,n=LE(),{env:r}=process;let i;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(t,a){if(0===i)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!a&&void 0===i)return 0;const s=i||0;if("dumb"===r.TERM)return s;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in r)||"codeship"===r.CI_NAME?1:s;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:s}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?i=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(i=1),"FORCE_COLOR"in r&&(i="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),IE={supportsColor:function(e){return a(s(e,e&&e.isTTY))},stdout:a(s(!0,t.isatty(1))),stderr:a(s(!0,t.isatty(2)))},IE}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e},{}),e.exports=AE()(t);const{formatters:i}=e.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(jE,jE.exports)),jE.exports}function DE(){return PE||(PE=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?kE.exports=(EE||(EE=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=AE()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ME,ME.exports)),ME.exports):kE.exports=$E()),kE.exports}var UE,zE,BE,FE={};function qE(){if(BE)return zE;BE=1;var e=zE&&zE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const t=f,n=e(DE()),r=e((UE||(UE=1,Object.defineProperty(FE,"__esModule",{value:!0}),FE.default=function(e){return function(t,n){return new Promise((r,i)=>{e.call(this,t,n,(e,t)=>{e?i(e):r(t)})})}}),FE)),i=n.default("agent-base");function a(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function s(e,t){return new s.Agent(e,t)}return function(e){class n extends t.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:a()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:a()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=a()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let s=!1,o=null;const c=n.timeout||this.timeout,u=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},l=()=>{o=null,s=!0;const e=new Error(`A "socket" was not created for HTTP request before ${c}ms`);e.code="ETIMEOUT",u(e)},p=e=>{s||(null!==o&&(clearTimeout(o),o=null),u(e))},d=t=>{if(s)return;if(null!=o&&(clearTimeout(o),o=null),r=t,Boolean(r)&&"function"==typeof r.addRequest)return i("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var r;if(t)return t.once("free",()=>{this.freeSocket(t,n)}),void e.onSocket(t);const a=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);u(a)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(i("Converting legacy callback function to promise"),this.promisifiedCallback=r.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof c&&c>0&&(o=setTimeout(l,c)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{i("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(d,p)}catch(e){Promise.reject(e).catch(p)}}else u(new Error("`callback` is not defined"))}freeSocket(e,t){i("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){i("Destroying agent %o",this.constructor.name)}}e.Agent=n,e.prototype=e.Agent.prototype}(s||(s={})),zE=s}var HE,YE,VE,KE,GE={};function WE(){if(HE)return GE;HE=1;var e=GE&&GE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(GE,"__esModule",{value:!0});const t=e(DE()).default("https-proxy-agent:parse-proxy-response");return GE.default=function(e){return new Promise((n,r)=>{let i=0;const a=[];function s(){const r=e.read();r?function(e){a.push(e),i+=e.length;const r=Buffer.concat(a,i);if(-1===r.indexOf("\r\n\r\n"))return t("have not received end of HTTP headers yet..."),void s();const o=r.toString("ascii",0,r.indexOf("\r\n")),c=+o.split(" ")[1];t("got proxy server response: %o",o),n({statusCode:c,buffered:r})}(r):e.once("readable",s)}function o(e){t("onclose had error %o",e)}function c(){t("onend")}function u(n){e.removeListener("end",c),e.removeListener("error",u),e.removeListener("close",o),e.removeListener("readable",s),t("onerror %o",n),r(n)}e.on("error",u),e.on("close",o),e.on("end",c),s()})},GE}function JE(){if(YE)return SE;YE=1;var e=SE&&SE.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{c(r.next(e))}catch(e){a(e)}}function o(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,o)}c((r=r.apply(e,t||[])).next())})},t=SE&&SE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(SE,"__esModule",{value:!0});const n=t(ue),r=t(ce),i=t(C),a=t(M),s=t(DE()),o=qE(),c=t(WE()),u=s.default("https-proxy-agent:agent");class l extends o.Agent{constructor(e){let t;if(t="string"==typeof e?i.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");u("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(t,i){return e(this,void 0,void 0,function*(){const{proxy:e,secureProxy:s}=this;let o;s?(u("Creating `tls.Socket`: %o",e),o=r.default.connect(e)):(u("Creating `net.Socket`: %o",e),o=n.default.connect(e));const l=Object.assign({},e.headers);let d=`CONNECT ${`${i.host}:${i.port}`} HTTP/1.1\r\n`;e.auth&&(l["Proxy-Authorization"]=`Basic ${Buffer.from(e.auth).toString("base64")}`);let{host:f,port:h,secureEndpoint:m}=i;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(f+=`:${h}`),l.Host=f,l.Connection="close";for(const e of Object.keys(l))d+=`${e}: ${l[e]}\r\n`;const y=c.default(o);o.write(`${d}\r\n`);const{statusCode:g,buffered:b}=yield y;if(200===g){if(t.once("socket",p),i.secureEndpoint){const e=i.servername||i.host;if(!e)throw new Error('Could not determine "servername"');return u("Upgrading socket connection to TLS"),r.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(i,"host","hostname","path","port")),{socket:o,servername:e}))}return o}o.destroy();const v=new n.default.Socket;return v.readable=!0,t.once("socket",e=>{u("replaying proxy buffer for failed request"),a.default(e.listenerCount("data")>0),e.push(b),e.push(null)}),v})}}function p(e){e.resume()}return SE.default=l,SE}var ZE,XE={version:"0.18.1"},QE={};function eS(){return ZE||(ZE=1,QE.async_all=function(e,t,n){var r=e.length,i=null,a=[],s=function(e,t){e&&(i=i||[]).push(e),a.push(t),0===--r&&n(i,a)};if(0===r)n(i,a);else for(var o=0,c=e.length;o<c;o++)t(e[o],s)},QE.ensure_timestamp=function(e){if(!(e instanceof Date||"number"==typeof e))throw new Error("`time` property must be a Date or Unix timestamp and is only required for `import` endpoint");return e instanceof Date?e.getTime():e},QE.assert_logger=function(e){if("object"!=typeof e)throw new TypeError('"logger" must be a valid Logger object');["trace","debug","info","warn","error"].forEach(t=>{if("function"!=typeof e[t])throw new TypeError(`Logger object missing "${t}" method`)})}),QE}var tS,nS,rS={},iS={};function aS(){if(tS)return iS;tS=1;const e=s,{ensure_timestamp:t}=eS();function n(e,n){return n&&(n.$ignore_alias&&(e.$ignore_alias=n.$ignore_alias),n.$ignore_time&&(e.$ignore_time=n.$ignore_time),n.hasOwnProperty("$ip")&&(e.$ip=n.$ip),n.hasOwnProperty("$time")&&(e.$time=t(n.$time)),n.hasOwnProperty("$latitude")&&n.hasOwnProperty("$longitude")&&(e.$latitude=n.$latitude,e.$longitude=n.$longitude)),e}return iS.merge_modifiers=n,iS.ProfileHelpers=(t=Object)=>class extends t{get token(){return this.mixpanel.token}get config(){return this.mixpanel.config}_set(e,t,r,i,{identifiers:a,set_once:s=!1}){let o={};"object"==typeof e?("object"==typeof t?(i=r,r=t):i=t,o=e):(o[e]=t,"function"!=typeof r&&r||(i=r));let c={$token:this.token,...a};c[s?"$set_once":"$set"]=o,"ip"in o&&(c.$ip=o.ip,delete o.ip),o.$ignore_time&&(c.$ignore_time=o.$ignore_time,delete o.$ignore_time),c=n(c,r),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:c}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:c},i)}_delete_profile({identifiers:e,modifiers:t,callback:r}){let i={$delete:"",$token:this.token,...e};"function"==typeof t&&(r=t),i=n(i,t),this.config.debug&&this.mixpanel.config.logger.debug("Deleting profile",{identifiers:e}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:i},r)}_remove({identifiers:t,data:r,modifiers:i,callback:a}){let s={};if("object"!=typeof r||e.isArray(r))this.config.debug&&this.mixpanel.config.logger.error("Invalid value passed to #remove - data must be an object with scalar values");else{for(const[e,t]of Object.entries(r)){if("string"!=typeof t&&"number"!=typeof t)return void(this.config.debug&&this.mixpanel.config.logger.error("Invalid argument passed to #remove - values must be scalar",{key:e,value:t}));s[e]=t}0!==Object.keys(s).length&&("function"==typeof i&&(a=i),r=n(r={$remove:s,$token:this.token,...t},i),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:r}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:r},a))}}_union({identifiers:t,data:r,modifiers:i,callback:a}){let s={};if("object"!=typeof r||e.isArray(r))this.config.debug&&this.mixpanel.config.logger.error("Invalid value passed to #union - data must be an object with scalar or array values");else{for(const[t,n]of Object.entries(r))if(e.isArray(n)){var o=n.filter(function(e){return"string"==typeof e||"number"==typeof e});o.length>0&&(s[t]=o)}else"string"==typeof n||"number"==typeof n?s[t]=[n]:this.config.debug&&this.mixpanel.config.logger.error("Invalid argument passed to #union - values must be a scalar value or array",{key:t,value:n});0!==Object.keys(s).length&&("function"==typeof i&&(a=i),r=n(r={$union:s,$token:this.token,...t},i),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:r}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:r},a))}}_unset({identifiers:t,prop:r,modifiers:i,callback:a}){let s=[];if(e.isArray(r))s=r;else{if("string"!=typeof r)return void(this.config.debug&&this.mixpanel.config.logger.error("Invalid argument passed to #unset - must be a string or array",{prop:r}));s=[r]}let o={$unset:s,$token:this.token,...t};"function"==typeof i&&(a=i),o=n(o,i),this.config.debug&&this.mixpanel.config.logger.debug(`Sending the following data to Mixpanel (${this.endpoint})`,{data:o}),this.mixpanel.send_request({method:"GET",endpoint:this.endpoint,data:o},a)}},iS}var sS,oS,cS,uS={};var lS=function(){if(cS)return oS;cS=1;const e=ve,t=d.Buffer,n=b,r=w,i=function(){if(KE)return VE;KE=1;const e=(VE&&VE.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(JE());function t(t){return new e.default(t)}return function(t){t.HttpsProxyAgent=e.default,t.prototype=e.default.prototype}(t||(t={})),VE=t}(),a=C,s=XE,{async_all:o,ensure_timestamp:c,assert_logger:u}=eS(),{MixpanelGroups:l}=function(){if(nS)return rS;nS=1;const{ProfileHelpers:e}=aS();class t extends(e()){constructor(e){super(),this.mixpanel=e,this.endpoint="/groups"}set_once(e,t,n,r,i,a){const s={$group_key:e,$group_id:t};this._set(n,r,i,a,{identifiers:s,set_once:!0})}set(e,t,n,r,i,a){const s={$group_key:e,$group_id:t};this._set(n,r,i,a,{identifiers:s})}delete_group(e,t,n,r){const i={$group_key:e,$group_id:t};this._delete_profile({identifiers:i,modifiers:n,callback:r})}remove(e,t,n,r,i){const a={$group_key:e,$group_id:t};this._remove({identifiers:a,data:n,modifiers:r,callback:i})}union(e,t,n,r,i){const a={$group_key:e,$group_id:t};this._union({identifiers:a,data:n,modifiers:r,callback:i})}unset(e,t,n,r,i){const a={$group_key:e,$group_id:t};this._unset({identifiers:a,prop:n,modifiers:r,callback:i})}}return rS.MixpanelGroups=t,rS}(),{MixpanelPeople:p}=function(){if(sS)return uS;sS=1;const{merge_modifiers:e,ProfileHelpers:t}=aS();class n extends(t()){constructor(e){super(),this.mixpanel=e,this.endpoint="/engage"}set_once(e,t,n,r,i){const a={$distinct_id:e};this._set(t,n,r,i,{identifiers:a,set_once:!0})}set(e,t,n,r,i){const a={$distinct_id:e};this._set(t,n,r,i,{identifiers:a})}increment(t,n,r,i,a){var s={};if("object"==typeof n){"object"==typeof r?(a=i,i=r):a=r;for(const[e,t]of Object.entries(n))isNaN(parseFloat(t))?this.mixpanel.config.debug&&this.mixpanel.config.logger.error("Invalid increment value passed to mixpanel.people.increment - must be a number",{key:e,value:t}):s[e]=t}else"number"!=typeof r&&r?"function"==typeof r?(a=r,s[n]=1):(a=i,i="object"==typeof r?r:{},s[n]=1):(r=r||1,s[n]=r,"function"==typeof i&&(a=i));var o={$add:s,$token:this.mixpanel.token,$distinct_id:t};o=e(o,i),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Sending the following data to Mixpanel (Engage)",{data:o}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:o},a)}append(t,n,r,i,a){var s={};"object"==typeof n?("object"==typeof r?(a=i,i=r):a=r,Object.keys(n).forEach(function(e){s[e]=n[e]})):(s[n]=r,"function"==typeof i&&(a=i));var o={$append:s,$token:this.mixpanel.token,$distinct_id:t};o=e(o,i),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Sending the following data to Mixpanel (Engage)",{data:o}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:o},a)}track_charge(t,n,r,i,a){if("function"!=typeof r&&r?"function"!=typeof i&&i||(a=i||void 0,(r.$ignore_time||r.hasOwnProperty("$ip"))&&(i={},Object.keys(r).forEach(function(e){i[e]=r[e],delete r[e]}))):(a=r||void 0,r={}),"number"!=typeof n&&(n=parseFloat(n),isNaN(n)))this.mixpanel.config.logger.error("Invalid value passed to mixpanel.people.track_charge - must be a number");else{if(r.$amount=n,r.hasOwnProperty("$time")){var s=r.$time;"[object Date]"===Object.prototype.toString.call(s)&&(r.$time=s.toISOString())}var o={$append:{$transactions:r},$token:this.mixpanel.token,$distinct_id:t};o=e(o,i),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Sending the following data to Mixpanel (Engage)",{data:o}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:o},a)}}clear_charges(t,n,r){var i={$set:{$transactions:[]},$token:this.mixpanel.token,$distinct_id:t};"function"==typeof n&&(r=n),i=e(i,n),this.mixpanel.config.debug&&this.mixpanel.config.logger.debug("Clearing this user's charges",{$distinct_id:t}),this.mixpanel.send_request({method:"GET",endpoint:"/engage",data:i},r)}delete_user(e,t,n){const r={$distinct_id:e};this._delete_profile({identifiers:r,modifiers:t,callback:n})}remove(e,t,n,r){const i={$distinct_id:e};this._remove({identifiers:i,data:t,modifiers:n,callback:r})}union(e,t,n,r){const i={$distinct_id:e};this._union({identifiers:i,data:t,modifiers:n,callback:r})}unset(e,t,n,r){const i={$distinct_id:e};this._unset({identifiers:i,prop:t,modifiers:n,callback:r})}}return uS.MixpanelPeople=n,uS}(),f={test:!1,debug:!1,verbose:!1,host:"api.mixpanel.com",protocol:"https",path:"",keepAlive:!0,geolocate:!1,logger:console};return oS={init:function(d,h){if(!d)throw new Error("The Mixpanel Client needs a Mixpanel token: `init(token)`");const m={token:d,config:{...f}},{keepAlive:y}=m.config,g={http:n,https:r},b={http:new n.Agent({keepAlive:y}),https:new r.Agent({keepAlive:y})},v=process.env.HTTPS_PROXY||process.env.HTTP_PROXY,w=v?new i(Object.assign(a.parse(v),{keepAlive:y})):null;m.send_request=function(n,i){i=i||function(){};let a=t.from(JSON.stringify(n.data)).toString("base64");const s=n.endpoint,o=(n.method||"GET").toUpperCase();let c={ip:m.config.geolocate?1:0,verbose:m.config.verbose?1:0};const u=m.config.key,l=m.config.secret,p=g[m.config.protocol];let d,f={host:m.config.host,port:m.config.port,headers:{},method:o};if(!p)throw new Error("Mixpanel Initialization Error: Unsupported protocol "+m.config.protocol+". Supported protocols are: "+Object.keys(g));if("POST"===o?(a="data="+a,f.headers["Content-Type"]="application/x-www-form-urlencoded",f.headers["Content-Length"]=t.byteLength(a)):"GET"===o&&(c.data=a),l){if(p!==r)throw new Error("Must use HTTPS if authenticating with API Secret");const e=t.from(l+":").toString("base64");f.headers.Authorization="Basic "+e}else if(u)c.api_key=u;else if("/import"===s)throw new Error("The Mixpanel Client needs a Mixpanel API Secret when importing old events: `init(token, { secret: ... })`");f.agent=w||b[m.config.protocol],m.config.test&&(c.test=1),f.path=m.config.path+s+"?"+e.stringify(c),d=p.request(f,function(e){var t="";e.on("data",function(e){t+=e}),e.on("end",function(){var e;if(m.config.verbose)try{var n=JSON.parse(t);1!=n.status&&(e=new Error("Mixpanel Server Error: "+n.error))}catch(t){e=new Error("Could not parse response from Mixpanel")}else e="1"!==t?new Error("Mixpanel Server Error: "+t):void 0;i(e)})}),d.on("error",function(e){m.config.debug&&m.config.logger.error("Got Error: "+e.message),i(e)}),"POST"===o&&d.write(a),d.end()},m.send_event_request=function(e,t,n,r){n.token=m.token,n.mp_lib="node",n.$lib_version=s.version;var i={event:t,properties:n};m.config.debug&&m.config.logger.debug("Sending the following event to Mixpanel",{data:i}),m.send_request({method:"GET",endpoint:e,data:i},r)};var x=function(e,t){for(var n=[],r=0,i=e.length;r<i;)n.push(e.slice(r,r+=t));return n},_=function(e,t){var n=e.event_list,r=e.endpoint,i=e.max_batch_size?Math.min(50,e.max_batch_size):50,a=e.max_concurrent_requests||e.max_batch_size>50&&Math.ceil(e.max_batch_size/50),s=x(n,i),u=a?x(s,a):[s],l=s.length,p=u.length;function d(e,t){e.length>0&&(e=e.map(function(e){return e.properties,("/import"===r||e.properties.time)&&(e.properties.time=c(e.properties.time)),e.properties.token=e.properties.token||m.token,e}),m.send_request({method:"POST",endpoint:r,data:e},t))}!function e(n){var r=u[n];o(r,d,function(r,i){(n+=1)===p?t&&t(r,i):e(n)})}(0),m.config.debug&&m.config.logger.debug("Sending "+n.length+" events to Mixpanel in "+l+" batches of events and "+p+" batches of requests")};return m.track=function(e,t,n){t&&"function"!=typeof t||(n=t,t={}),t.time&&(t.time=c(t.time)),m.send_event_request("/track",e,t,n)},m.track_batch=function(e,t,n){"function"==typeof(t=t||{})&&(n=t,t={});var r={event_list:e,endpoint:"/track",max_concurrent_requests:t.max_concurrent_requests,max_batch_size:t.max_batch_size};_(r,n)},m.import=function(e,t,n,r){n&&"function"!=typeof n||(r=n,n={}),n.time=c(t),m.send_event_request("/import",e,n,r)},m.import_batch=function(e,t,n){var r;"function"!=typeof t&&t||(n=t,t={}),r={event_list:e,endpoint:"/import",max_concurrent_requests:t.max_concurrent_requests,max_batch_size:t.max_batch_size},_(r,n)},m.alias=function(e,t,n){var r={distinct_id:e,alias:t};m.track("$create_alias",r,n)},m.groups=new l(m),m.people=new p(m),m.set_config=function(e){if(e&&void 0!==e.logger&&u(e.logger),Object.assign(m.config,e),e.host){const[t,n]=e.host.split(":");m.config.host=t,n&&(m.config.port=Number(n))}},h&&m.set_config(h),m}},oS}(),pS=xe(lS);const dS="SUCCESS",fS="FAILED";X(!1);const hS=ge(import.meta.url),mS=JSON.parse(r(a.dirname(hS.resolve("@truebit/cli"))+"/../package.json","utf8")),yS=new class{mixpanelClient;constructor(e){this.mixpanelClient=pS.init(e)}async sendEventToMixpanel(e,t){if("test"!=process.env.EVENT_TEST)try{return await new Promise((n,r)=>{this.mixpanelClient.track(e,t,e=>{if(e)return r(e);n()})})}catch{}}async registerUserMixpanel(e,t){if("test"!=process.env.EVENT_TEST){let n;e&&(n=e,this.mixpanelClient.people.set(n,{$name:t.name,$email:t.email,$ip:t.ip,company:t.company,role:t.role,namespace:t.namespace,walletAddress:t.walletAddress,apiKey:t.apiKey}))}}}(function(){let e="ed9005372c18624701ec0998cd12bd22";return"local"!==process.env.TRUEBIT_ENV&&"staging"!==process.env.TRUEBIT_ENV&&"testnet"!==process.env.TRUEBIT_ENV||(e="6de18f3bc3d0865f3b4a3676ae16908d"),e}()),gS=await RT(),bS=u.type+"_"+u.release;process.on("unhandledRejection",(e,t)=>{console.error(`Unhandled Rejection at: \n${c(t,void 0,100)}, \nreason: ${e}`)}),async function(){try{await bE(gS,mS.version,yS)}catch(e){console.error(`${e}`),process.exit(1)}let t;await async function(e){if(!wu.satisfies(process.version,e)){const t=`Nodejs required version ${e} not satisfied with current version ${process.version}.`;console.log(t),process.exit(1)}}(mS.engines.node),ab("blockchainEnv")&&(t=ab("blockchainEnv"));const n=ab("RPC_URL");n&&(process.env.RPC_URL=n);const r=new A;r.showSuggestionAfterError(!0),r.description(e.green(R.textSync("Truebit Verify\nCLI"))+"\nA CLI to interact with Truebit Verify node\nBy accessing and using the Protocol, you hereby agree to our Terms of Use and our Privacy Policy. Patents pending.\nTerms of Use: https://www.truebit.io/terms\nPrivacy Policy: https://www.truebit.io/privacy-policy").name("truebit").version(mS.version).helpOption("-h, --help","Display help for command"),r.command("setup").description("Setup generate a secret.json in your home directory with your information").summary("Initialize user profile configuration").action(async()=>{try{await xE(mS.version),await async function(){console.log(P.bold("\nWelcome to Truebit Verify!"));const e=nb(),t=null!==e;if(!t||t&&(!e.privateKey||!e.address)){const e=be({input:process.stdin,output:process.stdout,terminal:!0});console.log(ob.SETUP_INTRODUCTION);let t="";for(;!dE(t);)t=(await e.question("Press [Y] to proceed or [N] to exit: ")).toUpperCase();e.close(),"N"==t&&(console.log(ob.SETUP_INTRODUCTION_NO_ACCEPTANCE),process.exit(1))}}(),await oE(),await gE(gS,mS.version,yS)}catch(e){console.error(`${e}`),process.exit(1)}}),r.command("start").description("Executes a task within the context of Truebit Verify node. The task should be already uploaded to local-storage.").summary("Run a Truebit Task").argument("<taskId>","Id of the task").argument("<input>","Input for task execution").option("--update-config","Automatically update resource limits in config.json according to peak usage report").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t,n)=>{const r=function(e,t,n,r,i){const a=ab("address");return{distinct_id:a,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,taskId:e,input:t,wallet_address:a}}(e,t,gS,bS,mS.version);try{await xE(mS.version);const i=await(async(e,t,n)=>{if(console.log("Executing the function Task"),!tE(t))throw"Invalid task id";const r={status:"",result:""},i=await ub(),a=await i.post("api/execution/",jT({taskId:t,input:n})).catch(kT),s=a.data.executionId;if(console.log(`Execution Id: ${s}`),a.data.payload)sE(e,a.data.payload),r.status=a.data.payload.status,r.result=a.data.payload.output?.result?a.data.payload.output?.result:"";else{const t=setInterval(async()=>{const n=await i.get(`api/execution/${s}`);n.data&&"running"!=n.data.status&&(sE(e,n.data),clearInterval(t)),r.status=n.data.status,r.result=n.data.output?.result?n.data.output?.result:""},1e3)}return r})(n,e,t);"failed"==i.status?(r.status=fS,r.error_details=i.result,await yS.sendEventToMixpanel("start",r)):(r.status=dS,await yS.sendEventToMixpanel("start",r))}catch(e){console.error(`Error: ${e}`),r.status=fS,r.error_details=e,await yS.sendEventToMixpanel("start",r)}}),r.command("deploy").description("Deploys and registers a new Truebit task specified by the --taskId parameter. Using the deploy command makes the Truebit task available for execution.").summary("Deploy and register a new Truebit Task").argument("<namespace>","Namespace to register the task in (lowercase)").argument("<taskName>","Name of the task (lowercase)").option("--taskId <taskId>","Id of the task <Required>").option("--meta <meta>","Meta information for the task (string between single quotes)").addOption(new O("--label <label>","Label for the task").hideHelp()).option("--norelay","Do not relay the transaction").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(t,n,r)=>{await xE(mS.version);let i=ye();const a=function(e,t,n,r,i,a,s){const o=ab("address");return{distinct_id:o,user_ip:i,date_time:IT(),os_version:a,node_version:process.version,cli_version:s,taskId:e,task_name:t,namespace:n,label:r,wallet_address:o}}(r.taskId,n,t,r.label,gS,bS,mS.version);try{if(MT(t,"Namespace"),MT(n,"TaskName"),r.label&&r.label.length>128)throw new Error("Label exceeds maximum length of 128 chars");if(!r.taskId)throw new Error("Task ID is required to register a task");let s="function";r.taskId.split("_")[0]=="API".toLowerCase()&&(s="API"),i=ye({text:`Deploying and registering the ${s} task`,stream:process.stdout}).start();const o=await aE(t,n,r.taskId,r.meta,r.norelay);a.version=o?.toString();let c=!1;r.label&&(c=await async function(e,t,n){const r=AT(ab("blockchainEnv")),i=await r.taskRegistry.getLatestVersion(e,t);return await r.taskRegistry.setTaskLabel(e,t,i,n)}(t,n,r.label)),i.stop(),o&&(console.log(e.green(`The ${s} task has been deployed successfully. The Task ${n} version '${o}' was registered successfully in namespace ${t}.`)),r.meta&&console.log(e.green(`Metadata associated to the task: ${r.meta}.`)),c&&console.log(e.green(`Label ${r.label} set successfully for task ${n} in namespace ${t}.`))),a.status=dS,await yS.sendEventToMixpanel("deploy",a)}catch(e){i.stop(),console.error(`${e}`),a.error_details=`${e}`,a.status=fS,await yS.sendEventToMixpanel("deploy",a)}i.clear()}),r.command("build").description("Compiles source code to obtain compiled and instrumented Truebit task and pushes it to the Truebit node.").summary("Create a Function Task").option("-l, --lang [programming-language]","Specify the programming language in which the task was developed").argument("<sourceCodePath>","Path of the task source code.").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t)=>{const n=function(e,t,n){const r=ab("address");return{distinct_id:r,user_ip:e,date_time:IT(),os_version:t,node_version:process.version,cli_version:n,wallet_address:r}}(gS,bS,mS.version);try{await xE(mS.version),t.lang=t.lang?t.lang:ab("defaultLanguage"),n.language=t.lang;if(!Object.values(so).includes(t.lang))throw`Invalid language provided, the current options are: ${Object.values(so)}`;console.log("Building the function task");const r=await LT(t.lang,e||"./");t.lang!=so.JS&&t.lang!=so.PYTHON?n.taskId=await async function(e){try{const t=await ub(),n=await t.post("api/instrumentation",jT({taskId:`${e}`})).catch(kT);if(!0===n.data.error?.status){if(!n.data.error.message)throw"Malformed instrumentation service error message";console.log(`Instrumentation failed: ${n.data.error?.message}`)}else{if(!n.data.payload||!n.data.payload.instrumentedTaskId)throw"Malformed instrumentation service success message";console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${n.data.payload.instrumentedTaskId}`)}return n.data.payload.instrumentedTaskId}catch(e){throw console.error(e),e}}(r):(console.log("Your function task is ready."),console.log(`Use the following TaskId for execution or deployment:\n${r}`),n.taskId=r),n.status=dS,await yS.sendEventToMixpanel("build",n)}catch(e){n.error_details=e,n.status=fS,await yS.sendEventToMixpanel("build",n),console.error(`Error: ${e}`)}}),r.command("create-api").description("Create the Truebit API Task and upload the Manifest to the local storage. As a result, it returns the taskId").summary("Create an API Task").argument("<manifestPath>","Path of the manifest.").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async e=>{const t=function(e,t,n,r){const i=ab("address");return{distinct_id:i,user_ip:t,date_time:IT(),os_version:n,node_version:process.version,cli_version:r,manifest:e,wallet_address:i}}(e,gS,bS,mS.version);try{await xE(mS.version),console.log("Creating API task...");const n=await LT(oo.API,e||"./");console.log("Your API task is ready!"),console.log(`Use the following TaskId for execution or deployment: \n${n}`),t.status=dS,await yS.sendEventToMixpanel("create-api",t)}catch(e){console.error(`Error: ${e}`),t.status=fS,t.error_details=`${e}`,await yS.sendEventToMixpanel("create-api",t)}}),r.command("start-api").description("Start the Truebit API Task, verify with enforcer and request the api. As a result, it returns the API response").summary("Run an API Task").argument("<manifestPath>","Path of the manifest.").argument("<input>","Input request JSON file path").argument("[authType]",`Type of authentication needed for API task usage. One of: <${Object.values(XT)}>`).argument("[authString]",'Auth string is a comma separated value that represents auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t,n,r)=>{const i=function(e,t,n,r,i){const a=ab("address");return{distinct_id:a,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,manifest:e,authType:t,wallet_address:a}}(e,n,gS,bS,mS.version);try{await xE(mS.version),console.log("Executing the API Task"),n&&r?await eE(e,t,n,r):await eE(e,t,null,""),i.status=dS,await yS.sendEventToMixpanel("start-api",i)}catch(e){console.error(`${e}`),i.status=fS,i.error_details=`${e}`,await yS.sendEventToMixpanel("start-api",i)}}),r.command("status").description("Retrieves the status of a given execution id.").summary("Get execution status").argument("<executionId>","Execution Id").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async e=>{try{await xE(mS.version),await async function(e){try{console.log("Fetching execution status...");const t=await ub(),n=await t.get(`api/execution/${e}`).catch(kT);if(n.data.message)throw n.data.message;console.log("Task execution status: ",n.data.status),n.data.output&&console.log("Task execution output: ",n.data.output)}catch(t){console.error(`Couldn't fetch execution status for executionId ${e}: ${t}`)}}(e)}catch(e){console.error(`Error: ${e}`)}}),r.command("api-auth").description("Specify authentication for a truebit api task").summary("Set API Task authentication").argument("<namespace>","Namespace to register").argument("<taskname>","Taskname to register").argument("<taskId>","Id of the task").argument("<authType>",`Type of authentication need for api task usage. One of: <${Object.values(XT)}>`).argument("<authString>",'Auth string is a comma separated value that represent auth method.\n\n\tExamples:\r\n\t\tAWS_SIGNATURE = "accessKey:<accesskey>,secretKey:<secretkey>"\r\n\t\tBASIC_AUTH = "username:<username>,password:<password>"\r\n\t\tCUSTOM_HEADER = "<customheader>"').hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}}).action(async(e,t,n,r,i)=>{const a=function(e,t,n,r,i,a,s){const o=ab("address");return{distinct_id:o,user_ip:i,date_time:IT(),os_version:a,node_version:process.version,cli_version:s,taskId:e,namespace:t,taskname:n,authType:r,wallet_address:o}}(n,e,t,r,gS,bS,mS.version);try{await xE(mS.version);const s=ab("privateKey"),o=ab("address");await cE(n,e,t,r,i,s,o),a.status=dS,await yS.sendEventToMixpanel("api-auth",a)}catch(e){console.error(`Error: ${e}`),a.status=fS,a.error_details=`${e}`,await yS.sendEventToMixpanel("api-auth",a)}});const i=r.command("namespace").description("The namespace command helps you group and manage different tasks under a single name, like an umbrella.\nThis name, called a namespace, can be anything that represents your tasks, such as the name of your company. Each task you create will be associated with a namespace.").summary("Manage Namespace operations").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}});i.command("register").argument("<namespace>","Namespace to register").description("Register a new namespace. The user who calls this command will become the owner of the registered namespace. Each namespace can have only one owner. The owner can grant access to other users using the grant command.").summary("Register a new namespace").option("--norelay","Do not relay the transaction").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,void 0);await xE(mS.version);const a=ye({text:`Registering namespace: ${e.cyan(n)} \n`,stream:process.stdout}).start();try{const s=await rE(n,!1,r.norelay,t);a.stop(),s&&console.log(e.green(`Namespace ${n} registered successfully`)),i.status=dS,await yS.sendEventToMixpanel("namespace_register",i)}catch(t){a.stop();const r=t.message,s=r.match(/execution reverted: "(.*?)" /)?.[1];s?(console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${s}`),i.error_details=`${s}`):(console.error(`${e.red("ERROR:")} registering namespace -> ${e.yellow(n)}: ${r}`),i.error_details=`${r}`),i.status=fS,await yS.sendEventToMixpanel("namespace_register",i)}a.clear()}),i.command("transfer").argument("<namespace>","Namespace to transfer").argument("<address>","Address to transfer namespace to").description("Change the owner of a namespace. \nOnly the current owner can use this command to grant access.").summary("Transfer a namespace").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Transferring namespace: ${e.cyan(n)} to address: ${e.cyan(r)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.taskRegistry.transferTaskNamespace(n,r);a.stop(),o&&(console.log(e.green(`Namespace ${n} transferred successfully to ${r}`)),i.status=dS,await yS.sendEventToMixpanel("namespace_transfer",i))}catch(t){a.stop();const s=t.message,o=s.match(/execution reverted: "(.*?)" /)?.[1];o?(console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${o}`),i.error_details=`${o}`):(console.error(`${e.red("ERROR:")} transferring namespace -> ${e.yellow(n)} to ${e.yellow(r)}: ${s}`),i.error_details=`${s}`),i.status=fS,await yS.sendEventToMixpanel("namespace_transfer",i)}a.clear()}),i.command("grant").argument("<namespace>","Namespace to grant access to").argument("<address>","Address to grant access to").description("Give a user access to the namespace. \nOnly the current owner can use this command to grant access.").summary("Grant access to a namespace").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Granting access to namespace: ${e.cyan(n)} for address: ${e.cyan(r)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.taskRegistry.grantNamespaceAccess(n,r);a.stop(),o&&(console.log(e.green(`Access to namespace ${n} granted successfully to ${r}`)),i.status=dS,await yS.sendEventToMixpanel("namespace_permission_grant",i))}catch(t){a.stop();const s=t.message,o=s.match(/execution reverted: "(.*?)" /)?.[1];o?(console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${o}`),i.error_details=`${o}`):(console.error(`${e.red("ERROR:")} granting access to namespace -> ${e.yellow(n)} for ${e.yellow(r)}: ${s}`),i.error_details=`${s}`),i.status=fS,await yS.sendEventToMixpanel("namespace_permission_grant",i)}a.clear()}),i.command("revoke").argument("<namespace>","Namespace to revoke access from").argument("<address>","Address to revoke access from").description("Take away a user's access to the namespace. \nOnly the current owner can use this command to revoke access.").summary("Revoke access to a namespace").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Revoking access to namespace: ${e.cyan(n)} from address: ${e.cyan(r)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.taskRegistry.revokeNamespaceAccess(n,r);a.stop(),o&&(console.log(e.green(`Access to namespace ${n} revoked successfully from ${r}`)),i.status=dS,await yS.sendEventToMixpanel("namespace_permission_revoke",i))}catch(t){a.stop();const s=t.message,o=s.match(/execution reverted: "(.*?)" /)?.[1];o?(console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${o}`),i.error_details=`${o}`):(console.error(`${e.red("ERROR:")} revoking access to namespace -> ${e.yellow(n)} from ${e.yellow(r)}: ${s}`),i.error_details=`${s}`),i.status=fS,await yS.sendEventToMixpanel("namespace_permission_revoke",i)}a.clear()});const a=r.command("task").description("Manages tasks within a specified namespace, facilitating the organization, tracking, and management of tasks across different projects or domains. This command serves as a gateway to various task-related operations such as registration, modification, and querying, thereby enhancing project management and operational efficiency.").summary("Manage Task operations").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}});a.command("label").description("Set label for a task in a namespace").summary("Assign a label to a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--label <label>","Label for the task <Required>").option("--ver <version>","Version of the task <Required>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Setting label: ${e.cyan(i.label)} for task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);if(!i.label)throw new Error(`${e.red("ERROR:")} Label is required to set a label for a task. Check -h for help`);if(!i.ver)throw new Error(`${e.red("ERROR:")} Version is required to set a label for a task. Check -h for help`);const c=await o.taskRegistry.setTaskLabel(n,r,i.ver,i.label);s.stop(),s.clear(),c&&(console.log(e.green(`Label ${i.label} set successfully for task ${r} in namespace ${n}`)),a.status=dS,await yS.sendEventToMixpanel("task_label",a))}catch(t){s.stop(),s.clear();const n=t.message;console.error(n);const r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Setting label for task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Setting label for task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_label",a)}}),a.command("disable").description("Disable task in a namespace --ver <version> or --label <label> can be used to disable specific task ").summary("Disable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to disable <Required>").option("--label <label>","Label for the task to disable <Required>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Disabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);let c;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await o.taskRegistry.getTaskByLabel(n,r,i.label);c=await o.taskRegistry.disableTask(n,r,e.version),s.stop(),s.clear()}else c=await o.taskRegistry.disableTask(n,r,i.ver),s.stop();c&&(console.log(e.green(`Task ${r} disabled successfully in namespace ${n}`)),a.status=dS,await yS.sendEventToMixpanel("task_disable",a))}catch(t){s.stop(),s.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Disabling task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Disabling task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_disable",a)}}),a.command("enable").description("Enable a task in a namespace --ver <version> or --label <label> can be used to enable specific task").summary("Enable a registered task.").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task to enable <Required>").option("--label <label>","Label for the task to enable <Required>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Enabling task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);let c;if(!i.ver&&!i.label)throw new Error(`${e.red("ERROR:")} Version or label is required to enable a task`);if(i.ver&&i.label)throw new Error(`${e.red("ERROR:")} Cannot provide both version and label`);if(i.label){const e=await o.taskRegistry.getTaskByLabel(n,r,i.label);c=await o.taskRegistry.enableTask(n,r,e.version),s.stop(),s.clear()}else c=await o.taskRegistry.enableTask(n,r,i.ver),s.stop(),s.clear();c&&(console.log(e.green(`Task ${r} enabled successfully in namespace ${n}`)),a.status=dS,await yS.sendEventToMixpanel("task_enable",a))}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Enabling task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Enabling task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_enable",a)}}),a.command("get-task").description("Get task information from a namespace and a taskName --ver or --label can be used to get specific task").summary("Retrieve information from a namespace and a taskName").argument("<namespace>","Namespace of the task").argument("<taskName>","Name of the task").option("--ver <version>","Version of the task <Optional>").option("--label <label>","Label for the task <Optional>").action(async(n,r,i)=>{const a=CT(n,r,gS,bS,mS.version,i.label,i.ver);await xE(mS.version);const s=ye({text:`Getting latest task: ${e.cyan(r)} in namespace: ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const o=AT(t);let c={meta:""};if(i.label&&i.ver)throw new Error(`${e.red("ERROR:")} Cannot have both version and label at the same time`);if(i.ver||i.label||(c=await o.taskRegistry.getTask(n,r)),!i.label&&i.ver&&(c=await o.taskRegistry.getTaskByVersion(n,r,i.ver)),i.label&&!i.ver&&(c=await o.taskRegistry.getTaskByLabel(n,r,i.label)),""!==c.meta){const e=JSON.parse(c.meta);c.meta=e}s.stop(),console.log(c),a.status=dS,await yS.sendEventToMixpanel("task_info",a)}catch(t){s.stop();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Getting task -> : ${r}`),a.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Getting task -> : ${n}`),a.error_details=`${n}`),a.status=fS,await yS.sendEventToMixpanel("task_info",a)}s.clear()});const s=r.command("auth").description("The auth command is responsible for managing the authorization for task execution. It allows the namespace owner to grant or deny access to addresses, ensuring that only authorized individuals can execute specific tasks.").summary("Manage authorization operations").hook("preAction",async()=>{try{await vE()}catch(e){console.error(`${e}`),process.exit(1)}});s.command("grant").description("The auth grant command is responsible for granting access to a specific address within a namespace. The grantee will have the ability to execute the tasks stored within that namespace.").summary("Grant authorization to a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be authorized").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Granting authorization to ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace"),OT(r);const s=AT(t),o=await s.authorization.grantAuthorization(n,r);a.stop(),o&&(console.log(e.green(`Authorization granted to ${r} in namespace ${n}`)),i.status=dS,await yS.sendEventToMixpanel("auth_permission_grant",i))}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Granting authorization -> : ${r}`),i.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Granting authorization -> : ${n}`),i.error_details=`${n}`),i.status=fS,await yS.sendEventToMixpanel("auth_permission_grant",i)}}),s.command("revoke").description("The auth revoke command is responsible for revoking access from a specific address within a namespace. This command ensures that the specified address can no longer execute the tasks stored within that namespace.").summary("Revoke authorization from a grantee").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to be unauthorized").action(async(n,r)=>{const i=NT(n,gS,bS,mS.version,r);await xE(mS.version);const a=ye({text:`Revoking authorization from ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const s=AT(t),o=await s.authorization.revokeAuthorization(n,r);a.stop(),o&&(console.log(e.green(`Authorization revoked from ${r} in namespace ${n}`)),i.status=dS,await yS.sendEventToMixpanel("auth_permission_revoke",i))}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Revoking authorization -> : ${r}`),i.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Revoking authorization -> : ${n}`),i.error_details=`${n}`),i.status=fS,await yS.sendEventToMixpanel("auth_permission_revoke",i)}a.clear()}),s.command("register").description("The auth register command is responsible for registering a specific API_KEY. Every execution made with this API_KEY will be charged to the user who registered it. This way, you can ensure that the user who registered the API_KEY is responsible for paying for all executions made with it.").summary("Register authorization with an API key hash").argument("<apiKey>","API key for authorization").option("--norelay","Do not relay the transaction").action(async(t,n)=>{const r=PT(t,gS,bS,mS.version);await xE(mS.version);const i=ye({text:`Registering authorization with API key hash ${e.cyan(t)}`,stream:process.stdout}).start();try{let a;if(a=n.norelay?await async function(e,t=ab("blockchainEnv")){nE(e);const n=AT(t),r=de.keccak256(de.toUtf8Bytes(e));return await n.authorization.registerAuthorization(r),r}(t):await uE(t,!1),i.stop(),!a)throw Error("The API key could not been registered.");console.log(e.green(`Authorization registered with API key ${t} with hash -> ${a}`)),r.status=dS,await yS.sendEventToMixpanel("auth_permission_register",r)}catch(t){i.stop(),i.clear();const n=t.message,a=n.match(/execution reverted: "(.*?)" /)?.[1];a?(console.error(`${e.red("ERROR:")} Registering authorization -> : ${a}`),r.error_details=`${a}`):(console.error(`${e.red("ERROR:")} Registering authorization -> : ${n}`),r.error_details=`${n}`),r.status=fS,await yS.sendEventToMixpanel("auth_permission_register",r)}i.clear()}),s.command("deregister").description('The auth deregister command will revoke access to a specific API_KEY. After deregistration, any execution attempt using this API_KEY will result in a "not authorized" message.').summary("Deregister authorization with an API key hash").argument("<apiKey>","API key hash for deregistration").action(async n=>{const r=PT(n,gS,bS,mS.version);await xE(mS.version);const i=ye({text:`Deregistering authorization with API key ${e.cyan(n)}`,stream:process.stdout}).start();try{nE(n);const a=de.keccak256(de.toUtf8Bytes(n)),s=AT(t),o=await s.authorization.deRegisterAuthorization(a);i.stop(),o&&(console.log(e.green(`Authorization deregistered with API key hash ${n} with hash -> ${a}`)),r.status=dS,await yS.sendEventToMixpanel("auth_permission_deregister",r))}catch(t){i.stop(),i.clear();const n=t.message,a=n.match(/execution reverted: "(.*?)" /)?.[1];a?(console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${a}`),r.error_details=`${a}`):(console.error(`${e.red("ERROR:")} Deregistering authorization -> : ${n}`),r.error_details=`${n}`),r.status=fS,await yS.sendEventToMixpanel("auth_permission_deregister",r)}i.clear()}),s.command("check-authorization").description("The auth check-authorization command verifies if a specific address has permission to execute tasks in a particular namespace.").summary("Check if a grantee is authorized").argument("<namespace>","Namespace of the task").argument("<grantee>","Grantee to check authorization for").action(async(n,r)=>{const i=function(e,t,n,r,i){const a=ab("address");return{distinct_id:a,user_ip:n,date_time:IT(),os_version:r,node_version:process.version,cli_version:i,namespace:e,address_check:t,wallet_address:a}}(n,r,gS,bS,mS.version);await xE(mS.version);const a=ye({text:`Checking authorization for ${e.cyan(r)} in namespace ${e.cyan(n)}`,stream:process.stdout}).start();try{MT(n,"Namespace");const s=AT(t),o=await s.authorization.isAuthorized(n,r);a.stop(),console.log(e.green(`Grantee ${r} is ${o?"authorized":"not authorized"} in namespace ${n}`)),i.status=dS,await yS.sendEventToMixpanel("auth_check_permission",i)}catch(t){a.stop(),a.clear();const n=t.message,r=n.match(/execution reverted: "(.*?)" /)?.[1];r?(console.error(`${e.red("ERROR:")} Checking authorization -> : ${r}`),i.error_details=`${r}`):(console.error(`${e.red("ERROR:")} Checking authorization -> : ${n}`),i.error_details=`${n}`),i.status=fS,await yS.sendEventToMixpanel("auth_check_permission",i)}a.clear()}),s.command("get-payer").description("The auth get-payer command retrieves the payer address associated with a specific API_KEY.").summary("Get payer address from an API key hash").argument("<apiKey>","API key for payer address").action(async n=>{const r=PT(n,gS,bS,mS.version);await xE(mS.version);const i=ye({text:`Getting payer address for API key hash ${e.cyan(n)}`,stream:process.stdout}).start();try{const a=AT(t),s=de.keccak256(de.toUtf8Bytes(n)),o=await a.authorization.getPayerAddress(s);i.stop(),console.log(e.green(`Payer address for API key ${n} is ${o}`)),r.status=dS,await yS.sendEventToMixpanel("auth_permission_payer",r)}catch(t){i.stop(),i.clear();const n=t.message,a=n.match(/execution reverted: "(.*?)" /)?.[1];a?(console.error(`${e.red("ERROR:")} Getting payer address -> : ${a}`),r.error_details=`${a}`):(console.error(`${e.red("ERROR:")} Getting payer address -> : ${n}`),r.error_details=`${n}`),r.status=fS,await yS.sendEventToMixpanel("auth_permission_payer",r)}i.clear()}),s.command("new-apikey").description("Generate a new Api Key to be used for execution payment. The Api Key is a unique identifier for the payer.").summary("Generate a new Api Key").action(async()=>{const e={cli_version:mS.version,os_version:bS,user_ip:gS,date_time:IT(),wallet_address:ab("address")};await xE(mS.version);const t=S();console.log(`Api Key: ${t}`),e.status=dS,await yS.sendEventToMixpanel("auth_key_new",e)}),await r.parseAsync(process.argv)}().catch(e=>{console.error(e)});
26
26
  //# sourceMappingURL=index.mjs.map