@metamask/snaps-execution-environments 2.0.1 → 3.1.0

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/browserify/iframe/bundle.js +5 -5
  3. package/dist/browserify/node-process/bundle.js +4 -4
  4. package/dist/browserify/node-thread/bundle.js +4 -4
  5. package/dist/browserify/offscreen/bundle.js +4 -4
  6. package/dist/browserify/worker-executor/bundle.js +5 -5
  7. package/dist/browserify/worker-pool/bundle.js +4 -4
  8. package/dist/cjs/common/BaseSnapExecutor.js +37 -27
  9. package/dist/cjs/common/BaseSnapExecutor.js.map +1 -1
  10. package/dist/cjs/common/commands.js +1 -0
  11. package/dist/cjs/common/commands.js.map +1 -1
  12. package/dist/cjs/common/endowments/console.js.map +1 -1
  13. package/dist/cjs/common/endowments/index.js +2 -1
  14. package/dist/cjs/common/endowments/index.js.map +1 -1
  15. package/dist/cjs/common/endowments/interval.js +2 -1
  16. package/dist/cjs/common/endowments/interval.js.map +1 -1
  17. package/dist/cjs/common/endowments/timeout.js +2 -1
  18. package/dist/cjs/common/endowments/timeout.js.map +1 -1
  19. package/dist/cjs/common/globalEvents.js +2 -1
  20. package/dist/cjs/common/globalEvents.js.map +1 -1
  21. package/dist/cjs/common/globalObject.js.map +1 -1
  22. package/dist/cjs/common/utils.js +7 -21
  23. package/dist/cjs/common/utils.js.map +1 -1
  24. package/dist/cjs/common/validation.js +3 -2
  25. package/dist/cjs/common/validation.js.map +1 -1
  26. package/dist/esm/common/BaseSnapExecutor.js +37 -27
  27. package/dist/esm/common/BaseSnapExecutor.js.map +1 -1
  28. package/dist/esm/common/commands.js +1 -0
  29. package/dist/esm/common/commands.js.map +1 -1
  30. package/dist/esm/common/endowments/console.js.map +1 -1
  31. package/dist/esm/common/endowments/index.js +2 -1
  32. package/dist/esm/common/endowments/index.js.map +1 -1
  33. package/dist/esm/common/endowments/interval.js +2 -1
  34. package/dist/esm/common/endowments/interval.js.map +1 -1
  35. package/dist/esm/common/endowments/timeout.js +2 -1
  36. package/dist/esm/common/endowments/timeout.js.map +1 -1
  37. package/dist/esm/common/globalEvents.js +2 -1
  38. package/dist/esm/common/globalEvents.js.map +1 -1
  39. package/dist/esm/common/globalObject.js.map +1 -1
  40. package/dist/esm/common/utils.js +7 -25
  41. package/dist/esm/common/utils.js.map +1 -1
  42. package/dist/esm/common/validation.js +3 -2
  43. package/dist/esm/common/validation.js.map +1 -1
  44. package/dist/types/common/endowments/index.d.ts +1 -1
  45. package/dist/types/common/utils.d.ts +0 -9
  46. package/package.json +21 -23
@@ -12544,17 +12544,17 @@ module.exports = {
12544
12544
 
12545
12545
  })()
12546
12546
 
12547
- LavaPack.loadBundle([[1,{"./Substream":2,"end-of-stream":89,once:125,"readable-stream":13},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectMultiplex=void 0;const i=e("readable-stream"),s=n(e("end-of-stream")),o=n(e("once")),a=e("./Substream"),u=Symbol("IGNORE_SUBSTREAM");class c extends i.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new a.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=o.default(t);s.default(e,{readable:!1},r),s.default(e,{writable:!1},r)}(this,(e=>t.destroy(e||undefined))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=u}_read(){return undefined}_write(e,t,r){const{name:n,data:i}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const s=this._substreams[n];return s?(s!==u&&s.push(i),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}r.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[2,{"readable-stream":13},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Substream=void 0;const n=e("readable-stream");class i extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){return undefined}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}r.Substream=i}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/Substream.js"}],[3,{"./ObjectMultiplex":1},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./ObjectMultiplex");t.exports=n.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/index.js"}],[4,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}}},{package:"@metamask/object-multiplex>readable-stream>isarray",file:"../../node_modules/@metamask/object-multiplex/node_modules/isarray/index.js"}],[5,{"./_stream_readable":7,"./_stream_writable":9,"core-util-is":84,inherits:100,"process-nextick-args":126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=f;var s=Object.create(e("core-util-is"));s.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");s.inherits(f,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_duplex.js"}],[6,{"./_stream_transform":8,"core-util-is":84,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=s;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_passthrough.js"}],[7,{"./_stream_duplex":5,"./internal/streams/BufferList":10,"./internal/streams/destroy":11,"./internal/streams/stream":12,_process:127,"core-util-is":84,events:95,inherits:100,isarray:4,"process-nextick-args":126,"safe-buffer":14,"string_decoder/":15,util:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");t.exports=w;var i,s=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var f=e("util"),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var h,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(i=i||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var s=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function w(t){if(i=i||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function y(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,o)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?v(e,o,t,!1):T(e,o)):v(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function v(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),y(this,e,t,!1,r)},w.prototype.unshift=function(e){return y(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return h||(h=e("string_decoder/").StringDecoder),this._readableState.decoder=new h(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(j,e,t))}function j(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function x(e){d("readable nexttick read 0"),e.read(0)}function R(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function c(t,r){d("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",w),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",c),i.removeListener("end",l),i.removeListener("end",y),i.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){d("onend"),e.end()}a.endEmitted?n.nextTick(u):i.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(i);e.on("drain",f);var h=!1;var p=!1;function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==C(a.pipes,e))&&!h&&(d("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,p=!0),i.pause())}function g(t){d("onerror",t),y(),e.removeListener("error",g),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",w),y()}function w(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),i.unpipe(e)}return i.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",b),e.once("finish",w),e.emit("pipe",i),a.flowing||(d("pipe resume"),i.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=C(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):n.nextTick(x,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(R,e,t))}(this,e)),this},w.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&i!==undefined)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)this[i]===undefined&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_readable.js"}],[8,{"./_stream_duplex":5,"core-util-is":84,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_transform.js"}],[9,{"./_stream_duplex":5,"./internal/streams/destroy":11,"./internal/streams/stream":12,_process:127,"core-util-is":84,inherits:100,"process-nextick-args":126,"safe-buffer":14,timers:83,"util-deprecate":193},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r,n){(function(){var i=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=b;var o,a=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:i.nextTick;b.WritableState=g;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,p=e("./internal/streams/destroy");function m(){}function g(t,r){o=o||e("./_stream_duplex"),t=t||{};var n=r instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(i.nextTick(s,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,s);else{var o=_(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?a(y,e,r,o,s):y(e,r,o,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(o=o||e("./_stream_duplex"),!(h.call(b,this)||this instanceof o))return new b(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function w(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function y(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,w(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(w(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===b&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,f.isBuffer(n)||n instanceof d);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,a,n,i,s);return u}(this,s,a,e,t,r)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=p.destroy,b.prototype._undestroy=p.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),e("timers").setImmediate)}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_writable.js"}],[10,{"safe-buffer":14,util:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[11,{"process-nextick-args":126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[12,{events:95},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("events").EventEmitter}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/stream-browser.js"}],[13,{"./lib/_stream_duplex.js":5,"./lib/_stream_passthrough.js":6,"./lib/_stream_readable.js":7,"./lib/_stream_transform.js":8,"./lib/_stream_writable.js":9},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/readable-browser.js"}],[14,{buffer:82},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/object-multiplex>readable-stream>safe-buffer",file:"../../node_modules/@metamask/object-multiplex/node_modules/safe-buffer/index.js"}],[15,{"safe-buffer":14},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/object-multiplex>readable-stream>string_decoder",file:"../../node_modules/@metamask/object-multiplex/node_modules/string_decoder/lib/string_decoder.js"}],[16,{"readable-stream":143},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePostMessageStream=void 0;const n=e("readable-stream"),i=()=>undefined,s="SYN",o="ACK";class a extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(s,null,i),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===s?(this._haveSyn=!0,this._write(o,null,i)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,i),this.uncork())}_read(){return undefined}_write(e,t,r){e!==o&&e!==s&&this._log(e,!0),this._postMessage(e),r()}_setLogger(e){this._log=e}}r.BasePostMessageStream=a}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[17,{"../BasePostMessageStream":16,"../utils":21},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerParentPostMessageStream=void 0;const n=e("../BasePostMessageStream"),i=e("../utils");class s extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=i.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}r.WebWorkerParentPostMessageStream=s}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[18,{"../BasePostMessageStream":16,"../utils":21},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerPostMessageStream=void 0;const n=e("../BasePostMessageStream"),i=e("../utils");class s extends n.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=i.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}r.WebWorkerPostMessageStream=s}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[19,{"./BasePostMessageStream":16,"./WebWorker/WebWorkerParentPostMessageStream":17,"./WebWorker/WebWorkerPostMessageStream":18,"./runtime/BrowserRuntimePostMessageStream":20,"./window/WindowPostMessageStream":22},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e("./window/WindowPostMessageStream"),r),i(e("./WebWorker/WebWorkerPostMessageStream"),r),i(e("./WebWorker/WebWorkerParentPostMessageStream"),r),i(e("./runtime/BrowserRuntimePostMessageStream"),r),i(e("./BasePostMessageStream"),r)}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/browser.js"}],[20,{"../BasePostMessageStream":16,"../utils":21},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRuntimePostMessageStream=void 0;const a=e("../BasePostMessageStream"),u=e("../utils");class c extends a.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),i.set(this,void 0),s(this,n,e,"f"),s(this,i,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,i,"f"),data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&e.target===o(this,n,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}r.BrowserRuntimePostMessageStream=c,n=new WeakMap,i=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[21,{"@metamask/utils":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValidStreamMessage=r.DEDICATED_WORKER_NAME=void 0;const n=e("@metamask/utils");r.DEDICATED_WORKER_NAME="dedicatedWorker",r.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js"}],[22,{"../BasePostMessageStream":16,"../utils":21,"@metamask/utils":31},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i;Object.defineProperty(r,"__esModule",{value:!0}),r.WindowPostMessageStream=void 0;const s=e("@metamask/utils"),o=e("../BasePostMessageStream"),a=e("../utils"),u=null===(n=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===n?void 0:n.get;(0,s.assert)(u,"MessageEvent.prototype.source getter is not defined.");const c=null===(i=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===i?void 0:i.get;(0,s.assert)(c,"MessageEvent.prototype.origin getter is not defined.");class l extends o.BasePostMessageStream{constructor({name:e,target:t,targetOrigin:r=location.origin,targetWindow:n=window}){if(super(),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=e,this._target=t,this._targetOrigin=r,this._targetWindow=n,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&c.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,a.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}r.WindowPostMessageStream=l}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[23,{superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function i(e,t){return r=e,Boolean("string"==typeof(null===(i=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name))?new e({message:t}):e({message:t});var r,n,i}class s extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=s,r.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",o=s){try{(0,n.assert)(e,t)}catch(e){throw i(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js"}],[24,{"./assert":23,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),i=e("./assert");r.base64=(e,t={})=>{var r,s;const o=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(s=t.characterSet)&&void 0!==s?s:"base64";let u,c;return"base64"===a?u=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===a),u=String.raw`[-_A-Za-z0-9]`),c=o?new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,n.pattern)(e,c)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js"}],[25,{"./assert":23,"./hex":30,buffer:82},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),i=e("./hex"),s=48,o=58,a=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function f(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,i.add0x)(r.join(""))}function d(e){l(e);const t=f(e);return BigInt(t)}function h(e){var t;if("0x"===(null===(t=null==e?void 0:e.toLowerCase)||void 0===t?void 0:t.call(e)))return new Uint8Array;(0,i.assertIsHexString)(e);const r=(0,i.remove0x)(e).toLowerCase(),n=r.length%2==0?r:`0${r}`,u=new Uint8Array(n.length/2);for(let e=0;e<u.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),i=t-(t<o?s:a),c=r-(r<o?s:a);u[e]=16*i+c}return u}function p(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?h(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=c,r.assertIsBytes=l,r.bytesToHex=f,r.bytesToBigInt=d,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=d(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=h,r.bigIntToBytes=p,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const i=new Uint8Array(t);for(let e=0;e<i.length;e++)i[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return i.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=b(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js"}],[26,{"./base64":24,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),i=e("./base64");r.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js"}],[27,{"./assert":23,"./bytes":25,"./hex":30,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),i=e("./assert"),s=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),s.hexToBytes)),f=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),s.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,f)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js"}],[28,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class a{constructor(e){n.set(this,void 0),s(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return o(this,n,"f").get(e)}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=a;class u{constructor(e){i.set(this,void 0),s(this,i,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return o(this,i,"f")[Symbol.iterator]()}entries(){return o(this,i,"f").entries()}forEach(e,t){return o(this,i,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return o(this,i,"f").has(e)}keys(){return o(this,i,"f").keys()}values(){return o(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=u,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(u),Object.freeze(u.prototype)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js"}],[29,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js"}],[30,{"./assert":23,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),i=e("./assert");function s(e){return(0,n.is)(e,r.HexStruct)}function o(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=s,r.isStrictHexString=o,r.assertIsHexString=function(e){(0,i.assert)(s(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,i.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js"}],[31,{"./assert":23,"./base64":24,"./bytes":25,"./checksum":26,"./coercers":27,"./collections":28,"./encryption-types":29,"./hex":30,"./json":32,"./keyring":33,"./logging":34,"./misc":35,"./number":36,"./opaque":37,"./time":38,"./transaction-types":39,"./versions":40},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e("./assert"),r),i(e("./base64"),r),i(e("./bytes"),r),i(e("./checksum"),r),i(e("./coercers"),r),i(e("./collections"),r),i(e("./encryption-types"),r),i(e("./hex"),r),i(e("./json"),r),i(e("./keyring"),r),i(e("./logging"),r),i(e("./misc"),r),i(e("./number"),r),i(e("./opaque"),r),i(e("./time"),r),i(e("./transaction-types"),r),i(e("./versions"),r)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js"}],[32,{"./assert":23,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),i=e("./assert");r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.define)("Json",((e,t)=>{function n(e,r){const n=[...r.validator(e,t)];return!(n.length>0)||n}try{const t=n(e,r.UnsafeJsonStruct);return!0!==t?t:n(JSON.parse(JSON.stringify(e)),r.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),r.isValidJson=function(e){return(0,n.is)(e,r.JsonStruct)},r.getJsonSize=function(e){(0,i.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js"}],[33,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js"}],[34,{debug:86},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const i=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return i.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js"}],[35,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){var t;return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(null!==(t=e.match(r.ESCAPE_CHARACTERS_REGEXP))&&void 0!==t?t:[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js"}],[36,{"./assert":23,"./hex":30},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),i=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js"}],[37,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js"}],[38,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js"}],[39,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js"}],[40,{"./assert":23,semver:172,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),i=e("superstruct"),s=e("./assert");r.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,i.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,i.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js"}],[41,{"./messages":49,"./utils":53,"@metamask/safe-event-emitter":54,"eth-rpc-errors":93,"fast-deep-equal":97,"json-rpc-engine":108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseProvider=void 0;const i=n(e("@metamask/safe-event-emitter")),s=e("eth-rpc-errors"),o=n(e("fast-deep-equal")),a=e("json-rpc-engine"),u=n(e("./messages")),c=e("./utils");class l extends i.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),this._log=e,this.setMaxListeners(t),this._state={...l._defaultState},this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const n=new a.JsonRpcEngine;r.forEach((e=>n.push(e))),this._rpcEngine=n}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw s.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw s.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestMethod(),data:e});if(r!==undefined&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw s.ethErrors.rpc.invalidRequest({message:u.default.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},(0,c.getRpcPromiseCallback)(e,n))}))}_initializeState(e){if(this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:i}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:i}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result??[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(u.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new s.EthereumRpcError(1013,t??u.default.errors.disconnected()),this._log.debug(r)):(r=new s.EthereumRpcError(1011,t??u.default.errors.permanentlyDisconnected()),this._log.error(r),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){(0,c.isValidChainId)(e)?(this._handleConnect(e),e!==this.chainId&&(this.chainId=e,this._state.initialized&&this.emit("chainChanged",this.chainId))):this._log.error(u.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}if(!(0,o.default)(this._state.accounts,r)&&(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,this.selectedAddress!==r[0]&&(this.selectedAddress=r[0]||null),this._state.initialized)){const e=[...r];this.emit("accountsChanged",e)}}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e??[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}r.BaseProvider=l,l._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/BaseProvider.js"}],[42,{"./StreamProvider":43,"./messages":49,"./siteMetadata":52,"./utils":53,"eth-rpc-errors":93},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=void 0;const i=e("eth-rpc-errors"),s=n(e("./messages")),o=e("./siteMetadata"),a=e("./StreamProvider"),u=e("./utils");r.MetaMaskInpageProviderStreamName="metamask-provider";class c extends a.AbstractStreamProvider{constructor(e,{jsonRpcStreamName:t=r.MetaMaskInpageProviderStreamName,logger:n=console,maxEventListeners:i=100,shouldSendMetadata:s}={}){if(super(e,{jsonRpcStreamName:t,logger:n,maxEventListeners:i,rpcMiddleware:(0,u.getDefaultExternalMiddleware)(n)}),this._sentWarnings={enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},this._initializeStateAsync(),this.networkVersion=null,this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;u.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),s)if("complete"===document.readyState)(0,o.sendSiteMetadata)(this._rpcEngine,this._log);else{const e=()=>{(0,o.sendSiteMetadata)(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),this.networkVersion&&!e&&(this.networkVersion=null)}_warnOfDeprecation(e){!1===this._sentWarnings?.events[e]&&(this._log.warn(s.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}async enable(){return this._sentWarnings.enable||(this._log.warn(s.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},(0,u.getRpcPromiseCallback)(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(s.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},(0,u.getRpcPromiseCallback)(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress??null;break;case"eth_uninstallFilter":this._rpcRequest(e,u.NOOP),t=!0;break;case"net_version":t=this.networkVersion??null;break;default:throw new Error(s.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw i.ethErrors.rpc.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,(0,u.getRpcPromiseCallback)(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(s.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...r))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==this.networkVersion&&(this.networkVersion=t,this._state.initialized&&this.emit("networkChanged",this.networkVersion))}}r.MetaMaskInpageProvider=c}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/MetaMaskInpageProvider.js"}],[43,{"./BaseProvider":41,"./messages":49,"./utils":53,"@metamask/object-multiplex":3,"is-stream":102,"json-rpc-middleware-stream":112,pump:128},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.AbstractStreamProvider=void 0;const i=n(e("@metamask/object-multiplex")),s=e("is-stream"),o=e("json-rpc-middleware-stream"),a=n(e("pump")),u=e("./BaseProvider"),c=n(e("./messages")),l=e("./utils");class f extends u.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r=console,maxEventListeners:n=100,rpcMiddleware:u=[]}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:u}),!(0,s.duplex)(e))throw new Error(c.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const f=new i.default;(0,a.default)(e,f,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=(0,o.createStreamMiddleware)({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),(0,a.default)(this._jsonRpcConnection.stream,f.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):l.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(c.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;t?.stack&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:undefined)}_handleChainChanged({chainId:e,networkVersion:t}={}){(0,l.isValidChainId)(e)&&(0,l.isValidNetworkVersion)(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(c.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}r.AbstractStreamProvider=f;r.StreamProvider=class extends f{async initialize(){return this._initializeStateAsync()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/StreamProvider.js"}],[44,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC20=r.ERC1155=r.ERC721=void 0,r.ERC721="ERC721",r.ERC1155="ERC1155",r.ERC20="ERC20"}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/constants.js"}],[45,{"../MetaMaskInpageProvider":42,"../StreamProvider":43,"../utils":53,"./external-extension-config.json":46,"detect-browser":88,"extension-port-stream":96},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createExternalExtensionProvider=void 0;const i=e("detect-browser"),s=n(e("extension-port-stream")),o=n(e("./external-extension-config.json")),a=e("../MetaMaskInpageProvider"),u=e("../StreamProvider"),c=e("../utils"),l=(0,i.detect)();r.createExternalExtensionProvider=function(e="stable"){let t;try{const r=function(e){return("firefox"===l?.name?o.default.firefoxIds:o.default.chromeIds)[e]??e}(e),n=chrome.runtime.connect(r),i=new s.default(n);t=new u.StreamProvider(i,{jsonRpcStreamName:a.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:(0,c.getDefaultExternalMiddleware)(console)}),t.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return t}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/createExternalExtensionProvider.js"}],[46,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={chromeIds:{stable:"nkbihfbeogaeaoehlefnkodbefgpgknn",beta:"pbbkamfgmaedccnfkmjcofcecjhfgldn",flask:"ljfoeinjpaedjfecbmggjgodbgkmjkjk"},firefoxIds:{stable:"webextension@metamask.io",beta:"webextension-beta@metamask.io",flask:"webextension-flask@metamask.io"}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/external-extension-config.json"}],[47,{"./BaseProvider":41,"./MetaMaskInpageProvider":42,"./StreamProvider":43,"./extension-provider/createExternalExtensionProvider":45,"./initializeInpageProvider":48,"./shimWeb3":51},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.shimWeb3=r.setGlobalProvider=r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=r.initializeProvider=r.createExternalExtensionProvider=r.BaseProvider=void 0;const n=e("./BaseProvider");Object.defineProperty(r,"BaseProvider",{enumerable:!0,get:function(){return n.BaseProvider}});const i=e("./extension-provider/createExternalExtensionProvider");Object.defineProperty(r,"createExternalExtensionProvider",{enumerable:!0,get:function(){return i.createExternalExtensionProvider}});const s=e("./initializeInpageProvider");Object.defineProperty(r,"initializeProvider",{enumerable:!0,get:function(){return s.initializeProvider}}),Object.defineProperty(r,"setGlobalProvider",{enumerable:!0,get:function(){return s.setGlobalProvider}});const o=e("./MetaMaskInpageProvider");Object.defineProperty(r,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return o.MetaMaskInpageProvider}}),Object.defineProperty(r,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return o.MetaMaskInpageProviderStreamName}});const a=e("./shimWeb3");Object.defineProperty(r,"shimWeb3",{enumerable:!0,get:function(){return a.shimWeb3}});const u=e("./StreamProvider");Object.defineProperty(r,"StreamProvider",{enumerable:!0,get:function(){return u.StreamProvider}})}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/index.js"}],[48,{"./MetaMaskInpageProvider":42,"./shimWeb3":51},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setGlobalProvider=r.initializeProvider=void 0;const n=e("./MetaMaskInpageProvider"),i=e("./shimWeb3");function s(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}r.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:o=100,shouldSendMetadata:a=!0,shouldSetOnWindow:u=!0,shouldShimWeb3:c=!1}){const l=new n.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:o,shouldSendMetadata:a}),f=new Proxy(l,{deleteProperty:()=>!0});return u&&s(f),c&&(0,i.shimWeb3)(f,r),f},r.setGlobalProvider=s}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/initializeInpageProvider.js"}],[49,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",walletWatchAssetNFTExperimental:"MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};r.default=n}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/messages.js"}],[50,{"../constants":44,"../messages":49},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRpcWarningMiddleware=void 0;const i=e("../constants"),s=n(e("../messages"));r.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1,walletWatchAssetNFTExperimental:!1};return(r,n,o)=>{t.ethDecryptDeprecation||"eth_decrypt"!==r.method?t.ethGetEncryptionPublicKeyDeprecation||"eth_getEncryptionPublicKey"!==r.method?!t.walletWatchAssetNFTExperimental&&"wallet_watchAsset"===r.method&&[i.ERC721,i.ERC1155].includes(r.params?.type||"")&&(e.warn(s.default.warnings.rpc.walletWatchAssetNFTExperimental),t.walletWatchAssetNFTExperimental=!0):(e.warn(s.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0):(e.warn(s.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0),o()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/middleware/createRpcWarningMiddleware.js"}],[51,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimWeb3=void 0,r.shimWeb3=function(e,t=console){let r=!1,n=!1;if(!window.web3){const i="__isMetaMaskShim__";let s={currentProvider:e};Object.defineProperty(s,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),s=new Proxy(s,{get:(s,o,...a)=>("currentProvider"!==o||r?"currentProvider"===o||o===i||n||(n=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(s,o,...a)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:s,enumerable:!1,configurable:!0,writable:!0})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/shimWeb3.js"}],[52,{"./messages":49,"./utils":53},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendSiteMetadata=void 0;const i=n(e("./messages")),s=e("./utils");function o(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function a(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const e of Array.from(r))if(e&&await u(e.href))return e.href;return null}async function u(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}r.sendSiteMetadata=async function(e,t){try{const t=await async function(){return{name:o(window),icon:await a(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},s.NOOP)}catch(e){t.error({message:i.default.errors.sendSiteMetadata(),originalError:e})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/siteMetadata.js"}],[53,{"./middleware/createRpcWarningMiddleware":50,"eth-rpc-errors":93,"json-rpc-engine":108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NOOP=r.isValidNetworkVersion=r.isValidChainId=r.getRpcPromiseCallback=r.getDefaultExternalMiddleware=r.EMITTED_NOTIFICATIONS=void 0;const n=e("eth-rpc-errors"),i=e("json-rpc-engine"),s=e("./middleware/createRpcWarningMiddleware");r.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);r.getDefaultExternalMiddleware=(e=console)=>{return[(0,i.createIdRemapMiddleware)(),(t=e,(e,r,i)=>{"string"==typeof e.method&&e.method||(r.error=n.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),i((e=>{const{error:n}=r;return n?(t.error(`MetaMask - RPC Error: ${n.message}`,n),e()):e()}))}),(0,s.createRpcWarningMiddleware)(e)];var t};r.getRpcPromiseCallback=(e,t,r=!0)=>(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)};r.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");r.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;r.NOOP=()=>undefined}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/utils.js"}],[54,{events:95},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class s extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const s=n[e];if(s===undefined)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let n=0;n<e;n+=1)i(r[n],this,t)}return!0}}r.default=s}}},{package:"@metamask/providers>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/providers/node_modules/@metamask/safe-event-emitter/index.js"}],[55,{events:95},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class s extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const s=n[e];if(s===undefined)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let n=0;n<e;n+=1)i(r[n],this,t)}return!0}}r.default=s}}},{package:"json-rpc-engine>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/safe-event-emitter/index.js"}],[56,{superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{AssertionError:function(){return s},assert:function(){return o},assertStruct:function(){return a},assertExhaustive:function(){return u}});const n=e("superstruct");function i(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class s extends Error{constructor(e){var t,r,n;super(e.message),n="ERR_ASSERTION",(r="code")in(t=this)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n}}function o(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}}function a(e,t,r="Assertion failed",o=s){try{(0,n.assert)(e,t)}catch(e){throw i(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}}function u(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/assert.js"}],[57,{"./assert":56,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"base64",{enumerable:!0,get:function(){return s}});const n=e("superstruct"),i=e("./assert"),s=(e,t={})=>{const r=t.paddingRequired??!1,s=t.characterSet??"base64";let o,a;return"base64"===s?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),o=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,n.pattern)(e,a)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/base64.js"}],[58,{"./assert":56,"./hex":64,buffer:82},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{isBytes:function(){return c},assertIsBytes:function(){return l},bytesToHex:function(){return f},bytesToBigInt:function(){return d},bytesToSignedBigInt:function(){return h},bytesToNumber:function(){return p},bytesToString:function(){return m},hexToBytes:function(){return g},bigIntToBytes:function(){return b},signedBigIntToBytes:function(){return w},numberToBytes:function(){return y},stringToBytes:function(){return v},valueToBytes:function(){return _},concatBytes:function(){return S},createDataView:function(){return E}});const n=e("./assert"),i=e("./hex"),s=48,o=58,a=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function f(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,i.add0x)(r.join(""))}function d(e){l(e);const t=f(e);return BigInt(t)}function h(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)}function p(e){l(e);const t=d(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}function m(e){return l(e),(new TextDecoder).decode(e)}function g(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,i.assertIsHexString)(e);const t=(0,i.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),u=t-(t<o?s:a),c=i-(i<o?s:a);n[e]=16*u+c}return n}function b(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return g(e.toString(16))}function w(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const i=new Uint8Array(t);for(let e=0;e<i.length;e++)i[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return i.reverse()}function y(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return g(e.toString(16))}function v(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function _(e){if("bigint"==typeof e)return b(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?g(e):v(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}function S(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=_(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n}function E(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/bytes.js"}],[59,{superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{CAIP_CHAIN_ID_REGEX:function(){return i},CAIP_NAMESPACE_REGEX:function(){return s},CAIP_REFERENCE_REGEX:function(){return o},CAIP_ACCOUNT_ID_REGEX:function(){return a},CAIP_ACCOUNT_ADDRESS_REGEX:function(){return u},CaipChainIdStruct:function(){return c},CaipNamespaceStruct:function(){return l},CaipReferenceStruct:function(){return f},CaipAccountIdStruct:function(){return d},CaipAccountAddressStruct:function(){return h},isCaipChainId:function(){return p},isCaipNamespace:function(){return m},isCaipReference:function(){return g},isCaipAccountId:function(){return b},isCaipAccountAddress:function(){return w},parseCaipChainId:function(){return y},parseCaipAccountId:function(){return v}});const n=e("superstruct"),i=RegExp("^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$","u"),s=/^[-a-z0-9]{3,8}$/u,o=/^[-_a-zA-Z0-9]{1,32}$/u,a=RegExp("^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$","u"),u=/^[-.%a-zA-Z0-9]{1,128}$/u,c=(0,n.pattern)((0,n.string)(),i),l=(0,n.pattern)((0,n.string)(),s),f=(0,n.pattern)((0,n.string)(),o),d=(0,n.pattern)((0,n.string)(),a),h=(0,n.pattern)((0,n.string)(),u);function p(e){return(0,n.is)(e,c)}function m(e){return(0,n.is)(e,l)}function g(e){return(0,n.is)(e,f)}function b(e){return(0,n.is)(e,d)}function w(e){return(0,n.is)(e,h)}function y(e){const t=i.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}function v(e){const t=a.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/caip-types.js"}],[60,{"./base64":57,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ChecksumStruct",{enumerable:!0,get:function(){return s}});const n=e("superstruct"),i=e("./base64"),s=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/checksum.js"}],[61,{"./assert":56,"./bytes":58,"./hex":64,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{createNumber:function(){return d},createBigInt:function(){return h},createBytes:function(){return p},createHex:function(){return m}});const n=e("superstruct"),i=e("./assert"),s=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),s.hexToBytes)),f=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),s.bytesToHex);function d(e){try{const t=(0,n.create)(e,u);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}}function h(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}}function p(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}function m(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,f)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/coercers.js"}],[62,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,n(e,t,"get"))}function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,n(e,t,"set"),r),r}Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{FrozenMap:function(){return c},FrozenSet:function(){return d}});var a=new WeakMap;let u=Symbol.iterator;class c{get size(){return i(this,a).size}[u](){return i(this,a)[Symbol.iterator]()}entries(){return i(this,a).entries()}forEach(e,t){return i(this,a).forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return i(this,a).get(e)}has(e){return i(this,a).has(e)}keys(){return i(this,a).keys()}values(){return i(this,a).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}constructor(e){s(this,a,{writable:!0,value:void 0}),o(this,a,new Map(e)),Object.freeze(this)}}var l=new WeakMap;let f=Symbol.iterator;class d{get size(){return i(this,l).size}[f](){return i(this,l)[Symbol.iterator]()}entries(){return i(this,l).entries()}forEach(e,t){return i(this,l).forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return i(this,l).has(e)}keys(){return i(this,l).keys()}values(){return i(this,l).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}constructor(e){s(this,l,{writable:!0,value:void 0}),o(this,l,new Set(e)),Object.freeze(this)}}Object.freeze(c),Object.freeze(c.prototype),Object.freeze(d),Object.freeze(d.prototype)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/collections.js"}],[63,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/encryption-types.js"}],[64,{"./assert":56,"./bytes":58,"@noble/hashes/sha3":78,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{HexStruct:function(){return a},StrictHexStruct:function(){return u},HexAddressStruct:function(){return c},HexChecksumAddressStruct:function(){return l},isHexString:function(){return f},isStrictHexString:function(){return d},assertIsHexString:function(){return h},assertIsStrictHexString:function(){return p},isValidHexAddress:function(){return m},getChecksumAddress:function(){return g},isValidChecksumAddress:function(){return b},add0x:function(){return w},remove0x:function(){return y}});const n=e("@noble/hashes/sha3"),i=e("superstruct"),s=e("./assert"),o=e("./bytes"),a=(0,i.pattern)((0,i.string)(),/^(?:0x)?[0-9a-f]+$/iu),u=(0,i.pattern)((0,i.string)(),/^0x[0-9a-f]+$/iu),c=(0,i.pattern)((0,i.string)(),/^0x[0-9a-f]{40}$/u),l=(0,i.pattern)((0,i.string)(),/^0x[0-9a-fA-F]{40}$/u);function f(e){return(0,i.is)(e,a)}function d(e){return(0,i.is)(e,u)}function h(e){(0,s.assert)(f(e),"Value must be a hexadecimal string.")}function p(e){(0,s.assert)(d(e),'Value must be a hexadecimal string, starting with "0x".')}function m(e){return(0,i.is)(e,c)||b(e)}function g(e){(0,s.assert)((0,i.is)(e,l),"Invalid hex address.");const t=y(e.toLowerCase()),r=y((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=r[t];return(0,s.assert)((0,i.is)(n,(0,i.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function b(e){return!!(0,i.is)(e,l)&&g(e)===e}function w(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function y(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/hex.js"}],[65,{"./assert":56,"./base64":57,"./bytes":58,"./caip-types":59,"./checksum":60,"./coercers":61,"./collections":62,"./encryption-types":63,"./hex":64,"./json":66,"./keyring":67,"./logging":68,"./misc":69,"./number":70,"./opaque":71,"./time":72,"./transaction-types":73,"./versions":74},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){return Object.keys(e).forEach((function(r){"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})),e}Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert"),r),n(e("./base64"),r),n(e("./bytes"),r),n(e("./caip-types"),r),n(e("./checksum"),r),n(e("./coercers"),r),n(e("./collections"),r),n(e("./encryption-types"),r),n(e("./hex"),r),n(e("./json"),r),n(e("./keyring"),r),n(e("./logging"),r),n(e("./misc"),r),n(e("./number"),r),n(e("./opaque"),r),n(e("./time"),r),n(e("./transaction-types"),r),n(e("./versions"),r)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/index.js"}],[66,{"./assert":56,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{UnsafeJsonStruct:function(){return s},JsonStruct:function(){return o},isValidJson:function(){return a},getSafeJson:function(){return u},getJsonSize:function(){return c},jsonrpc2:function(){return l},JsonRpcVersionStruct:function(){return f},JsonRpcIdStruct:function(){return d},JsonRpcErrorStruct:function(){return h},JsonRpcParamsStruct:function(){return p},JsonRpcRequestStruct:function(){return m},JsonRpcNotificationStruct:function(){return g},isJsonRpcNotification:function(){return b},assertIsJsonRpcNotification:function(){return w},isJsonRpcRequest:function(){return y},assertIsJsonRpcRequest:function(){return v},PendingJsonRpcResponseStruct:function(){return _},JsonRpcSuccessStruct:function(){return S},JsonRpcFailureStruct:function(){return E},JsonRpcResponseStruct:function(){return k},isPendingJsonRpcResponse:function(){return T},assertIsPendingJsonRpcResponse:function(){return j},isJsonRpcResponse:function(){return x},assertIsJsonRpcResponse:function(){return R},isJsonRpcSuccess:function(){return M},assertIsJsonRpcSuccess:function(){return O},isJsonRpcFailure:function(){return P},assertIsJsonRpcFailure:function(){return A},isJsonRpcError:function(){return C},assertIsJsonRpcError:function(){return I},getJsonRpcIdValidator:function(){return N}});const n=e("superstruct"),i=e("./assert"),s=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>s))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>s)))]),o=(0,n.coerce)(s,(0,n.any)(),(e=>((0,i.assertStruct)(e,s),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t))))));function a(e){try{return u(e),!0}catch{return!1}}function u(e){return(0,n.create)(e,o)}function c(e){(0,i.assertStruct)(e,o,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength}const l="2.0",f=(0,n.literal)(l),d=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),h=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(o),stack:(0,n.optional)((0,n.string)())}),p=(0,n.union)([(0,n.record)((0,n.string)(),o),(0,n.array)(o)]),m=(0,n.object)({id:d,jsonrpc:f,method:(0,n.string)(),params:(0,n.optional)(p)}),g=(0,n.object)({jsonrpc:f,method:(0,n.string)(),params:(0,n.optional)(p)});function b(e){return(0,n.is)(e,g)}function w(e,t){(0,i.assertStruct)(e,g,"Invalid JSON-RPC notification",t)}function y(e){return(0,n.is)(e,m)}function v(e,t){(0,i.assertStruct)(e,m,"Invalid JSON-RPC request",t)}const _=(0,n.object)({id:d,jsonrpc:f,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(h)}),S=(0,n.object)({id:d,jsonrpc:f,result:o}),E=(0,n.object)({id:d,jsonrpc:f,error:h}),k=(0,n.union)([S,E]);function T(e){return(0,n.is)(e,_)}function j(e,t){(0,i.assertStruct)(e,_,"Invalid pending JSON-RPC response",t)}function x(e){return(0,n.is)(e,k)}function R(e,t){(0,i.assertStruct)(e,k,"Invalid JSON-RPC response",t)}function M(e){return(0,n.is)(e,S)}function O(e,t){(0,i.assertStruct)(e,S,"Invalid JSON-RPC success response",t)}function P(e){return(0,n.is)(e,E)}function A(e,t){(0,i.assertStruct)(e,E,"Invalid JSON-RPC failure response",t)}function C(e){return(0,n.is)(e,h)}function I(e,t){(0,i.assertStruct)(e,h,"Invalid JSON-RPC error",t)}function N(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/json.js"}],[67,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/keyring.js"}],[68,{debug:86},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{createProjectLogger:function(){return s},createModuleLogger:function(){return o}});function n(e){return e&&e.__esModule?e:{default:e}}const i=(0,n(e("debug")).default)("metamask");function s(e){return i.extend(e)}function o(e,t){return e.extend(t)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/logging.js"}],[69,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){return Array.isArray(e)&&e.length>0}function i(e){return null===e||e===undefined}function s(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{JsonSize:function(){return u},isNonEmptyArray:function(){return n},isNullOrUndefined:function(){return i},isObject:function(){return s},hasProperty:function(){return o},getKnownPropertyNames:function(){return a},ESCAPE_CHARACTERS_REGEXP:function(){return c},isPlainObject:function(){return l},isASCII:function(){return f},calculateStringSize:function(){return d},calculateNumberSize:function(){return h}});const o=(e,t)=>Object.hasOwnProperty.call(e,t);function a(e){return Object.getOwnPropertyNames(e)}var u;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(u||(u={}));const c=/"|\\|\n|\r|\t/gu;function l(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}function f(e){return e.charCodeAt(0)<=127}function d(e){return e.split("").reduce(((e,t)=>f(t)?e+1:e+2),0)+(e.match(c)??[]).length}function h(e){return e.toString().length}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/misc.js"}],[70,{"./assert":56,"./hex":64},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{numberToHex:function(){return s},bigIntToHex:function(){return o},hexToNumber:function(){return a},hexToBigInt:function(){return u}});const n=e("./assert"),i=e("./hex"),s=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),o=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),a=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},u=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/number.js"}],[71,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/opaque.js"}],[72,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{Duration:function(){return n},inMilliseconds:function(){return s},timeSince:function(){return o}}),function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(n||(n={}));const i=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};function s(e,t){return i(e,"count"),e*t}function o(e){return i(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/time.js"}],[73,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/transaction-types.js"}],[74,{"./assert":56,semver:172,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{VersionStruct:function(){return o},VersionRangeStruct:function(){return a},isValidSemVerVersion:function(){return u},isValidSemVerRange:function(){return c},assertIsSemVerVersion:function(){return l},assertIsSemVerRange:function(){return f},gtVersion:function(){return d},gtRange:function(){return h},satisfiesVersionRange:function(){return p}});const n=e("semver"),i=e("superstruct"),s=e("./assert"),o=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),a=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`));function u(e){return(0,i.is)(e,o)}function c(e){return(0,i.is)(e,a)}function l(e){(0,s.assertStruct)(e,o)}function f(e){(0,s.assertStruct)(e,a)}function d(e,t){return(0,n.gt)(e,t)}function h(e,t){return(0,n.gtr)(e,t)}function p(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/versions.js"}],[75,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function s(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){s(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(r,"__esModule",{value:!0}),r.output=r.exists=r.hash=r.bytes=r.bool=r.number=void 0,r.number=n,r.bool=i,r.bytes=s,r.hash=o,r.exists=a,r.output=u;const c={number:n,bool:i,bytes:s,hash:o,exists:a,output:u};r.default=c}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_assert.js"}],[76,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.add5L=r.add5H=r.add4H=r.add4L=r.add3H=r.add3L=r.add=r.rotlBL=r.rotlBH=r.rotlSL=r.rotlSH=r.rotr32L=r.rotr32H=r.rotrBL=r.rotrBH=r.rotrSL=r.rotrSH=r.shrSL=r.shrSH=r.toBig=r.split=r.fromBig=void 0;const n=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&n),l:Number(e>>i&n)}:{h:0|Number(e>>i&n),l:0|Number(e&n)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=s(e[i],t);[r[i],n[i]]=[o,a]}return[r,n]}r.fromBig=s,r.split=o;const a=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);r.toBig=a;const u=(e,t,r)=>e>>>r;r.shrSH=u;const c=(e,t,r)=>e<<32-r|t>>>r;r.shrSL=c;const l=(e,t,r)=>e>>>r|t<<32-r;r.rotrSH=l;const f=(e,t,r)=>e<<32-r|t>>>r;r.rotrSL=f;const d=(e,t,r)=>e<<64-r|t>>>r-32;r.rotrBH=d;const h=(e,t,r)=>e>>>r-32|t<<64-r;r.rotrBL=h;const p=(e,t)=>t;r.rotr32H=p;const m=(e,t)=>e;r.rotr32L=m;const g=(e,t,r)=>e<<r|t>>>32-r;r.rotlSH=g;const b=(e,t,r)=>t<<r|e>>>32-r;r.rotlSL=b;const w=(e,t,r)=>t<<r-32|e>>>64-r;r.rotlBH=w;const y=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}r.rotlBL=y,r.add=v;const _=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);r.add3L=_;const S=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;r.add3H=S;const E=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);r.add4L=E;const k=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;r.add4H=k;const T=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);r.add5L=T;const j=(e,t,r,n,i,s)=>t+r+n+i+s+(e/2**32|0)|0;r.add5H=j;const x={fromBig:s,split:o,toBig:a,shrSH:u,shrSL:c,rotrSH:l,rotrSL:f,rotrBH:d,rotrBL:h,rotr32H:p,rotr32L:m,rotlSH:g,rotlSL:b,rotlBH:w,rotlBL:y,add:v,add3L:_,add3H:S,add4L:E,add4H:k,add5H:j,add5L:T};r.default=x}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_u64.js"}],[77,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.crypto=void 0,r.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:undefined}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/crypto.js"}],[78,{"./_assert.js":75,"./_u64.js":76,"./utils.js":79},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shake256=r.shake128=r.keccak_512=r.keccak_384=r.keccak_256=r.keccak_224=r.sha3_512=r.sha3_384=r.sha3_256=r.sha3_224=r.Keccak=r.keccakP=void 0;const n=e("./_assert.js"),i=e("./_u64.js"),s=e("./utils.js"),[o,a,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],o.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)t=(t<<l^(t>>d)*p)%h,t&f&&(i^=l<<(l<<BigInt(e))-l);u.push(i)}const[m,g]=(0,i.split)(u,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),w=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function y(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,s=r[i],o=r[i+1],a=b(s,o,1)^r[n],u=w(s,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],s=b(t,i,n),u=w(t,i,n),c=o[r];t=e[c],i=e[c+1],e[c]=s,e[c+1]=u}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=g[n]}r.fill(0)}r.keccakP=y;class v extends s.Hash{constructor(e,t,r,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}keccak(){y(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,s.toBytes)(e)).length;for(let n=0;n<i;){const s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new v(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}r.Keccak=v;const _=(e,t,r)=>(0,s.wrapConstructor)((()=>new v(t,e,r)));r.sha3_224=_(6,144,28),r.sha3_256=_(6,136,32),r.sha3_384=_(6,104,48),r.sha3_512=_(6,72,64),r.keccak_224=_(1,144,28),r.keccak_256=_(1,136,32),r.keccak_384=_(1,104,48),r.keccak_512=_(1,72,64);const S=(e,t,r)=>(0,s.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,n.dkLen===undefined?r:n.dkLen,!0)));r.shake128=S(31,168,16),r.shake256=S(31,136,32)}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/sha3.js"}],[79,{"@noble/hashes/crypto":77},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
12547
+ LavaPack.loadBundle([[1,{"@metamask/rpc-errors":79,"@metamask/safe-event-emitter":81,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s,o,a,u,c,l,d,f,h,p,m,g=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},b=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},w=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const y=e("@metamask/rpc-errors"),v=w(e("@metamask/safe-event-emitter")),_=e("@metamask/utils");class S extends v.default{constructor({notificationHandler:e}={}){super(),n.add(this),s.set(this,!1),o.set(this,void 0),a.set(this,void 0),g(this,o,[],"f"),g(this,a,e,"f")}destroy(){b(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),g(this,o,[],"f"),g(this,s,!0,"f")}push(e){b(this,n,"m",u).call(this),b(this,o,"f").push(e)}handle(e,t){if(b(this,n,"m",u).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?b(this,n,"m",c).call(this,e,t):b(this,n,"m",c).call(this,e):t?b(this,n,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return b(this,n,"m",u).call(this),async(e,t,r,n)=>{try{const[s,a,u]=await b(S,i,"m",f).call(S,e,t,b(this,o,"f"));return a?(await b(S,i,"m",p).call(S,u),n(s)):r((async e=>{try{await b(S,i,"m",p).call(S,u)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _promiseHandle(e){return new Promise(((t,r)=>{b(this,n,"m",l).call(this,e,((e,n)=>{e&&n===undefined&&r(e),t(n)})).catch(r)}))}}function E(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=S,i=S,s=new WeakMap,o=new WeakMap,a=new WeakMap,n=new WeakSet,u=function(){if(b(this,s,"f"))throw new Error("This engine is destroyed and can no longer be used.")},c=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new y.JsonRpcError(y.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const r=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>e!==undefined));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}},l=async function(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new y.JsonRpcError(y.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:null,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new y.JsonRpcError(y.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return b(this,a,"f")&&!(0,_.isJsonRpcRequest)(e)?t(null):t(r,{id:e.id??null,jsonrpc:"2.0",error:r})}if(b(this,a,"f")&&!(0,_.isJsonRpcRequest)(e)){try{await b(this,a,"f").call(this,e)}catch(r){return t(r)}return t(null)}let r=null;const n={...e},s={id:n.id,jsonrpc:n.jsonrpc};try{await b(S,i,"m",d).call(S,n,s,b(this,o,"f"))}catch(e){r=e}return r&&(delete s.result,s.error||(s.error=(0,y.serializeError)(r))),t(r,s)},d=async function(e,t,r){const[n,s,o]=await b(S,i,"m",f).call(S,e,t,r);if(b(S,i,"m",m).call(S,e,t,s),await b(S,i,"m",p).call(S,o),n)throw n},f=async function(e,t,r){const n=[];let s=null,o=!1;for(const a of r)if([s,o]=await b(S,i,"m",h).call(S,e,t,a,n),o)break;return[s,o,n.reverse()]},h=async function(e,t,r,n){return new Promise((i=>{const s=e=>{const r=e||t.error;r&&(t.error=(0,y.serializeError)(r)),i([r,!0])},o=r=>{t.error?s(t.error):(r&&("function"!=typeof r&&s(new y.JsonRpcError(y.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${E(e)}`,{request:e})),n.push(r)),i([null,!1]))};try{r(e,t,o,s)}catch(e){s(e)}}))},p=async function(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))},m=function(e,t,r){if(!(0,_.hasProperty)(t,"result")&&!(0,_.hasProperty)(t,"error"))throw new y.JsonRpcError(y.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${E(e)}`,{request:e});if(!r)throw new y.JsonRpcError(y.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${E(e)}`,{request:e})}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/JsonRpcEngine.js"}],[2,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return async(t,r,n,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,s()})),await o};try{await e(t,r,c),u?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/createAsyncMiddleware.js"}],[3,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,n,i)=>{const s=e[t.method];return s===undefined?n():"function"==typeof s?s(t,r,n,i):(r.result=s,i())}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[4,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const n=4294967295;let i=Math.floor(Math.random()*n);r.getUniqueId=function(){return i=(i+1)%n,i}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/getUniqueId.js"}],[5,{"./getUniqueId":4},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const n=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,i)=>{const s=e.id,o=(0,n.getUniqueId)();e.id=o,t.id=o,r((r=>{e.id=s,t.id=s,r()}))}}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/idRemapMiddleware.js"}],[6,{"./JsonRpcEngine":1,"./createAsyncMiddleware":2,"./createScaffoldMiddleware":3,"./getUniqueId":4,"./idRemapMiddleware":5,"./mergeMiddleware":7},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e("./createAsyncMiddleware"),r),i(e("./createScaffoldMiddleware"),r),i(e("./getUniqueId"),r),i(e("./idRemapMiddleware"),r),i(e("./JsonRpcEngine"),r),i(e("./mergeMiddleware"),r)}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/index.js"}],[7,{"./JsonRpcEngine":1},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const n=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"@metamask/json-rpc-engine",file:"../../node_modules/@metamask/json-rpc-engine/dist/mergeMiddleware.js"}],[8,{"./Substream":9,"end-of-stream":115,once:124,"readable-stream":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ObjectMultiplex=void 0;const i=e("readable-stream"),s=n(e("end-of-stream")),o=n(e("once")),a=e("./Substream"),u=Symbol("IGNORE_SUBSTREAM");class c extends i.Duplex{constructor(e={}){super(Object.assign(Object.assign({},e),{objectMode:!0})),this._substreams={}}createStream(e){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const t=new a.Substream({parent:this,name:e});return this._substreams[e]=t,function(e,t){const r=o.default(t);s.default(e,{readable:!1},r),s.default(e,{writable:!1},r)}(this,(e=>t.destroy(e||undefined))),t}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=u}_read(){return undefined}_write(e,t,r){const{name:n,data:i}=e;if(!n)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),r();const s=this._substreams[n];return s?(s!==u&&s.push(i),r()):(console.warn(`ObjectMultiplex - orphaned data for stream "${n}"`),r())}}r.ObjectMultiplex=c}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.js"}],[9,{"readable-stream":20},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Substream=void 0;const n=e("readable-stream");class i extends n.Duplex{constructor({parent:e,name:t}){super({objectMode:!0}),this._parent=e,this._name=t}_read(){return undefined}_write(e,t,r){this._parent.push({name:this._name,data:e}),r()}}r.Substream=i}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/Substream.js"}],[10,{"./ObjectMultiplex":8},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./ObjectMultiplex");t.exports=n.ObjectMultiplex}}},{package:"@metamask/object-multiplex",file:"../../node_modules/@metamask/object-multiplex/dist/index.js"}],[11,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}}},{package:"@metamask/object-multiplex>readable-stream>isarray",file:"../../node_modules/@metamask/object-multiplex/node_modules/isarray/index.js"}],[12,{"./_stream_readable":14,"./_stream_writable":16,"core-util-is":110,inherits:121,"process-nextick-args":125},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var s=Object.create(e("core-util-is"));s.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");s.inherits(d,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=a.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_duplex.js"}],[13,{"./_stream_transform":15,"core-util-is":110,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=s;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_passthrough.js"}],[14,{"./_stream_duplex":12,"./internal/streams/BufferList":17,"./internal/streams/destroy":18,"./internal/streams/stream":19,_process:126,"core-util-is":110,events:116,inherits:121,isarray:11,"process-nextick-args":125,"safe-buffer":21,"string_decoder/":22,util:107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");t.exports=w;var i,s=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var d=e("util"),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var h,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(i=i||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var s=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function w(t){if(i=i||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function y(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,o)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?v(e,o,t,!1):T(e,o)):v(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function v(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),y(this,e,t,!1,r)},w.prototype.unshift=function(e){return y(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return h||(h=e("string_decoder/").StringDecoder),this._readableState.decoder=new h(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){f("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){f("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function c(t,r){f("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",b),e.removeListener("finish",w),e.removeListener("drain",d),e.removeListener("error",g),e.removeListener("unpipe",c),i.removeListener("end",l),i.removeListener("end",y),i.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){f("onend"),e.end()}a.endEmitted?n.nextTick(u):i.once("end",u),e.on("unpipe",c);var d=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(i);e.on("drain",d);var h=!1;var p=!1;function m(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==A(a.pipes,e))&&!h&&(f("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,p=!0),i.pause())}function g(t){f("onerror",t),y(),e.removeListener("error",g),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",w),y()}function w(){f("onfinish"),e.removeListener("close",b),y()}function y(){f("unpipe"),i.unpipe(e)}return i.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",b),e.once("finish",w),e.emit("pipe",i),a.flowing||(f("pipe resume"),i.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=A(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):n.nextTick(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t))}(this,e)),this},w.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&i!==undefined)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)this[i]===undefined&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_readable.js"}],[15,{"./_stream_duplex":12,"core-util-is":110,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_transform.js"}],[16,{"./_stream_duplex":12,"./internal/streams/destroy":18,"./internal/streams/stream":19,_process:126,"core-util-is":110,inherits:121,"process-nextick-args":125,"safe-buffer":21,timers:109,"util-deprecate":191},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r,n){(function(){var i=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=b;var o,a=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:i.nextTick;b.WritableState=g;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,f=global.Uint8Array||function(){};var h,p=e("./internal/streams/destroy");function m(){}function g(t,r){o=o||e("./_stream_duplex"),t=t||{};var n=r instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(i.nextTick(s,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,s);else{var o=_(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?a(y,e,r,o,s):y(e,r,o,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(o=o||e("./_stream_duplex"),!(h.call(b,this)||this instanceof o))return new b(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function w(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function y(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,w(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(w(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===b&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,d.isBuffer(n)||n instanceof f);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,a,n,i,s);return u}(this,s,a,e,t,r)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=p.destroy,b.prototype._undestroy=p.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),e("timers").setImmediate)}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/_stream_writable.js"}],[17,{"safe-buffer":21,util:107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[18,{"process-nextick-args":125},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[19,{events:116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("events").EventEmitter}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/lib/internal/streams/stream-browser.js"}],[20,{"./lib/_stream_duplex.js":12,"./lib/_stream_passthrough.js":13,"./lib/_stream_readable.js":14,"./lib/_stream_transform.js":15,"./lib/_stream_writable.js":16},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")}}},{package:"@metamask/object-multiplex>readable-stream",file:"../../node_modules/@metamask/object-multiplex/node_modules/readable-stream/readable-browser.js"}],[21,{buffer:108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/object-multiplex>readable-stream>safe-buffer",file:"../../node_modules/@metamask/object-multiplex/node_modules/safe-buffer/index.js"}],[22,{"safe-buffer":21},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/object-multiplex>readable-stream>string_decoder",file:"../../node_modules/@metamask/object-multiplex/node_modules/string_decoder/lib/string_decoder.js"}],[23,{"readable-stream":141},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BasePostMessageStream=void 0;const n=e("readable-stream"),i=()=>undefined,s="SYN",o="ACK";class a extends n.Duplex{constructor(){super({objectMode:!0}),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(s,null,i),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===s?(this._haveSyn=!0,this._write(o,null,i)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,i),this.uncork())}_read(){return undefined}_write(e,t,r){e!==o&&e!==s&&this._log(e,!0),this._postMessage(e),r()}_setLogger(e){this._log=e}}r.BasePostMessageStream=a}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.js"}],[24,{"../BasePostMessageStream":23,"../utils":28},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerParentPostMessageStream=void 0;const n=e("../BasePostMessageStream"),i=e("../utils");class s extends n.BasePostMessageStream{constructor({worker:e}){super(),this._target=i.DEDICATED_WORKER_NAME,this._worker=e,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}r.WebWorkerParentPostMessageStream=s}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerParentPostMessageStream.js"}],[25,{"../BasePostMessageStream":23,"../utils":28},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerPostMessageStream=void 0;const n=e("../BasePostMessageStream"),i=e("../utils");class s extends n.BasePostMessageStream{constructor(){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(),this._name=i.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){return undefined}}r.WebWorkerPostMessageStream=s}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/WebWorker/WebWorkerPostMessageStream.js"}],[26,{"./BasePostMessageStream":23,"./WebWorker/WebWorkerParentPostMessageStream":24,"./WebWorker/WebWorkerPostMessageStream":25,"./runtime/BrowserRuntimePostMessageStream":27,"./window/WindowPostMessageStream":29},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e("./window/WindowPostMessageStream"),r),i(e("./WebWorker/WebWorkerPostMessageStream"),r),i(e("./WebWorker/WebWorkerParentPostMessageStream"),r),i(e("./runtime/BrowserRuntimePostMessageStream"),r),i(e("./BasePostMessageStream"),r)}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/browser.js"}],[27,{"../BasePostMessageStream":23,"../utils":28},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRuntimePostMessageStream=void 0;const a=e("../BasePostMessageStream"),u=e("../utils");class c extends a.BasePostMessageStream{constructor({name:e,target:t}){super(),n.set(this,void 0),i.set(this,void 0),s(this,n,e,"f"),s(this,i,t,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,i,"f"),data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&e.target===o(this,n,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}r.BrowserRuntimePostMessageStream=c,n=new WeakMap,i=new WeakMap}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/runtime/BrowserRuntimePostMessageStream.js"}],[28,{"@metamask/utils":38},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isValidStreamMessage=r.DEDICATED_WORKER_NAME=void 0;const n=e("@metamask/utils");r.DEDICATED_WORKER_NAME="dedicatedWorker",r.isValidStreamMessage=function(e){return(0,n.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/utils.js"}],[29,{"../BasePostMessageStream":23,"../utils":28,"@metamask/utils":38},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i;Object.defineProperty(r,"__esModule",{value:!0}),r.WindowPostMessageStream=void 0;const s=e("@metamask/utils"),o=e("../BasePostMessageStream"),a=e("../utils"),u=null===(n=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===n?void 0:n.get;(0,s.assert)(u,"MessageEvent.prototype.source getter is not defined.");const c=null===(i=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===i?void 0:i.get;(0,s.assert)(c,"MessageEvent.prototype.origin getter is not defined.");class l extends o.BasePostMessageStream{constructor({name:e,target:t,targetOrigin:r=location.origin,targetWindow:n=window}){if(super(),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=e,this._target=t,this._targetOrigin=r,this._targetWindow=n,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&c.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,a.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}r.WindowPostMessageStream=l}}},{package:"@metamask/post-message-stream",file:"../../node_modules/@metamask/post-message-stream/dist/window/WindowPostMessageStream.js"}],[30,{superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.assertExhaustive=r.assertStruct=r.assert=r.AssertionError=void 0;const n=e("superstruct");function i(e,t){return r=e,Boolean("string"==typeof(null===(i=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name))?new e({message:t}):e({message:t});var r,n,i}class s extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}r.AssertionError=s,r.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},r.assertStruct=function(e,t,r="Assertion failed",o=s){try{(0,n.assert)(e,t)}catch(e){throw i(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}},r.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/assert.js"}],[31,{"./assert":30,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.base64=void 0;const n=e("superstruct"),i=e("./assert");r.base64=(e,t={})=>{var r,s;const o=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(s=t.characterSet)&&void 0!==s?s:"base64";let u,c;return"base64"===a?u=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===a),u=String.raw`[-_A-Za-z0-9]`),c=o?new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,n.pattern)(e,c)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/base64.js"}],[32,{"./assert":30,"./hex":37,buffer:108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.createDataView=r.concatBytes=r.valueToBytes=r.stringToBytes=r.numberToBytes=r.signedBigIntToBytes=r.bigIntToBytes=r.hexToBytes=r.bytesToString=r.bytesToNumber=r.bytesToSignedBigInt=r.bytesToBigInt=r.bytesToHex=r.assertIsBytes=r.isBytes=void 0;const n=e("./assert"),i=e("./hex"),s=48,o=58,a=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,i.add0x)(r.join(""))}function f(e){l(e);const t=d(e);return BigInt(t)}function h(e){var t;if("0x"===(null===(t=null==e?void 0:e.toLowerCase)||void 0===t?void 0:t.call(e)))return new Uint8Array;(0,i.assertIsHexString)(e);const r=(0,i.remove0x)(e).toLowerCase(),n=r.length%2==0?r:`0${r}`,u=new Uint8Array(n.length/2);for(let e=0;e<u.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),i=t-(t<o?s:a),c=r-(r<o?s:a);u[e]=16*i+c}return u}function p(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return h(e.toString(16))}function m(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return h(e.toString(16))}function g(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?h(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}r.isBytes=c,r.assertIsBytes=l,r.bytesToHex=d,r.bytesToBigInt=f,r.bytesToSignedBigInt=function(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},r.bytesToNumber=function(e){l(e);const t=f(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},r.bytesToString=function(e){return l(e),(new TextDecoder).decode(e)},r.hexToBytes=h,r.bigIntToBytes=p,r.signedBigIntToBytes=function(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const i=new Uint8Array(t);for(let e=0;e<i.length;e++)i[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return i.reverse()},r.numberToBytes=m,r.stringToBytes=g,r.valueToBytes=b,r.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=b(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},r.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/bytes.js"}],[33,{"./base64":31,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ChecksumStruct=void 0;const n=e("superstruct"),i=e("./base64");r.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/checksum.js"}],[34,{"./assert":30,"./bytes":32,"./hex":37,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createHex=r.createBytes=r.createBigInt=r.createNumber=void 0;const n=e("superstruct"),i=e("./assert"),s=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),s.hexToBytes)),d=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),s.bytesToHex);r.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},r.createBigInt=function(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},r.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},r.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/coercers.js"}],[35,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(r,"__esModule",{value:!0}),r.FrozenSet=r.FrozenMap=void 0;class a{constructor(e){n.set(this,void 0),s(this,n,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return o(this,n,"f")[Symbol.iterator]()}entries(){return o(this,n,"f").entries()}forEach(e,t){return o(this,n,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return o(this,n,"f").get(e)}has(e){return o(this,n,"f").has(e)}keys(){return o(this,n,"f").keys()}values(){return o(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}r.FrozenMap=a;class u{constructor(e){i.set(this,void 0),s(this,i,new Set(e),"f"),Object.freeze(this)}get size(){return o(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return o(this,i,"f")[Symbol.iterator]()}entries(){return o(this,i,"f").entries()}forEach(e,t){return o(this,i,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return o(this,i,"f").has(e)}keys(){return o(this,i,"f").keys()}values(){return o(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}r.FrozenSet=u,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(u),Object.freeze(u.prototype)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/collections.js"}],[36,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/encryption-types.js"}],[37,{"./assert":30,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.remove0x=r.add0x=r.assertIsStrictHexString=r.assertIsHexString=r.isStrictHexString=r.isHexString=r.StrictHexStruct=r.HexStruct=void 0;const n=e("superstruct"),i=e("./assert");function s(e){return(0,n.is)(e,r.HexStruct)}function o(e){return(0,n.is)(e,r.StrictHexStruct)}r.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),r.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),r.isHexString=s,r.isStrictHexString=o,r.assertIsHexString=function(e){(0,i.assert)(s(e),"Value must be a hexadecimal string.")},r.assertIsStrictHexString=function(e){(0,i.assert)(o(e),'Value must be a hexadecimal string, starting with "0x".')},r.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},r.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/hex.js"}],[38,{"./assert":30,"./base64":31,"./bytes":32,"./checksum":33,"./coercers":34,"./collections":35,"./encryption-types":36,"./hex":37,"./json":39,"./keyring":40,"./logging":41,"./misc":42,"./number":43,"./opaque":44,"./time":45,"./transaction-types":46,"./versions":47},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e("./assert"),r),i(e("./base64"),r),i(e("./bytes"),r),i(e("./checksum"),r),i(e("./coercers"),r),i(e("./collections"),r),i(e("./encryption-types"),r),i(e("./hex"),r),i(e("./json"),r),i(e("./keyring"),r),i(e("./logging"),r),i(e("./misc"),r),i(e("./number"),r),i(e("./opaque"),r),i(e("./time"),r),i(e("./transaction-types"),r),i(e("./versions"),r)}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/index.js"}],[39,{"./assert":30,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getJsonRpcIdValidator=r.assertIsJsonRpcError=r.isJsonRpcError=r.assertIsJsonRpcFailure=r.isJsonRpcFailure=r.assertIsJsonRpcSuccess=r.isJsonRpcSuccess=r.assertIsJsonRpcResponse=r.isJsonRpcResponse=r.assertIsPendingJsonRpcResponse=r.isPendingJsonRpcResponse=r.JsonRpcResponseStruct=r.JsonRpcFailureStruct=r.JsonRpcSuccessStruct=r.PendingJsonRpcResponseStruct=r.assertIsJsonRpcRequest=r.isJsonRpcRequest=r.assertIsJsonRpcNotification=r.isJsonRpcNotification=r.JsonRpcNotificationStruct=r.JsonRpcRequestStruct=r.JsonRpcParamsStruct=r.JsonRpcErrorStruct=r.JsonRpcIdStruct=r.JsonRpcVersionStruct=r.jsonrpc2=r.getJsonSize=r.isValidJson=r.JsonStruct=r.UnsafeJsonStruct=void 0;const n=e("superstruct"),i=e("./assert");r.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>r.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>r.UnsafeJsonStruct)))]),r.JsonStruct=(0,n.define)("Json",((e,t)=>{function n(e,r){const n=[...r.validator(e,t)];return!(n.length>0)||n}try{const t=n(e,r.UnsafeJsonStruct);return!0!==t?t:n(JSON.parse(JSON.stringify(e)),r.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),r.isValidJson=function(e){return(0,n.is)(e,r.JsonStruct)},r.getJsonSize=function(e){(0,i.assertStruct)(e,r.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},r.jsonrpc2="2.0",r.JsonRpcVersionStruct=(0,n.literal)(r.jsonrpc2),r.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),r.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(r.JsonStruct),stack:(0,n.optional)((0,n.string)())}),r.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),r.JsonStruct),(0,n.array)(r.JsonStruct)])),r.JsonRpcRequestStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,method:(0,n.string)(),params:r.JsonRpcParamsStruct}),r.JsonRpcNotificationStruct=(0,n.omit)(r.JsonRpcRequestStruct,["id"]),r.isJsonRpcNotification=function(e){return(0,n.is)(e,r.JsonRpcNotificationStruct)},r.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,r.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},r.isJsonRpcRequest=function(e){return(0,n.is)(e,r.JsonRpcRequestStruct)},r.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,r.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},r.PendingJsonRpcResponseStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(r.JsonRpcErrorStruct)}),r.JsonRpcSuccessStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,result:r.JsonStruct}),r.JsonRpcFailureStruct=(0,n.object)({id:r.JsonRpcIdStruct,jsonrpc:r.JsonRpcVersionStruct,error:r.JsonRpcErrorStruct}),r.JsonRpcResponseStruct=(0,n.union)([r.JsonRpcSuccessStruct,r.JsonRpcFailureStruct]),r.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,r.PendingJsonRpcResponseStruct)},r.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,r.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},r.isJsonRpcResponse=function(e){return(0,n.is)(e,r.JsonRpcResponseStruct)},r.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,r.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},r.isJsonRpcSuccess=function(e){return(0,n.is)(e,r.JsonRpcSuccessStruct)},r.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,r.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},r.isJsonRpcFailure=function(e){return(0,n.is)(e,r.JsonRpcFailureStruct)},r.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,r.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},r.isJsonRpcError=function(e){return(0,n.is)(e,r.JsonRpcErrorStruct)},r.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,r.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},r.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},e);return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/json.js"}],[40,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/keyring.js"}],[41,{debug:112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createModuleLogger=r.createProjectLogger=void 0;const i=(0,n(e("debug")).default)("metamask");r.createProjectLogger=function(e){return i.extend(e)},r.createModuleLogger=function(e,t){return e.extend(t)}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/logging.js"}],[42,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.calculateNumberSize=r.calculateStringSize=r.isASCII=r.isPlainObject=r.ESCAPE_CHARACTERS_REGEXP=r.JsonSize=r.hasProperty=r.isObject=r.isNullOrUndefined=r.isNonEmptyArray=void 0,r.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},r.isNullOrUndefined=function(e){return null===e||e===undefined},r.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function n(e){return e.charCodeAt(0)<=127}r.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(r.JsonSize||(r.JsonSize={})),r.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,r.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},r.isASCII=n,r.calculateStringSize=function(e){var t;return e.split("").reduce(((e,t)=>n(t)?e+1:e+2),0)+(null!==(t=e.match(r.ESCAPE_CHARACTERS_REGEXP))&&void 0!==t?t:[]).length},r.calculateNumberSize=function(e){return e.toString().length}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/misc.js"}],[43,{"./assert":30,"./hex":37},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hexToBigInt=r.hexToNumber=r.bigIntToHex=r.numberToHex=void 0;const n=e("./assert"),i=e("./hex");r.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));r.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));r.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};r.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/number.js"}],[44,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/opaque.js"}],[45,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.timeSince=r.inMilliseconds=r.Duration=void 0,function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(r.Duration||(r.Duration={}));const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};r.inMilliseconds=function(e,t){return n(e,"count"),e*t},r.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/time.js"}],[46,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/transaction-types.js"}],[47,{"./assert":30,semver:170,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.satisfiesVersionRange=r.gtRange=r.gtVersion=r.assertIsSemVerRange=r.assertIsSemVerVersion=r.isValidSemVerRange=r.isValidSemVerVersion=r.VersionRangeStruct=r.VersionStruct=void 0;const n=e("semver"),i=e("superstruct"),s=e("./assert");r.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),r.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),r.isValidSemVerVersion=function(e){return(0,i.is)(e,r.VersionStruct)},r.isValidSemVerRange=function(e){return(0,i.is)(e,r.VersionRangeStruct)},r.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,r.VersionStruct)},r.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,r.VersionRangeStruct)},r.gtVersion=function(e,t){return(0,n.gt)(e,t)},r.gtRange=function(e,t){return(0,n.gtr)(e,t)},r.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/post-message-stream>@metamask/utils",file:"../../node_modules/@metamask/post-message-stream/node_modules/@metamask/utils/dist/versions.js"}],[48,{"./messages":56,"./utils":60,"@metamask/json-rpc-engine":6,"@metamask/rpc-errors":79,"@metamask/safe-event-emitter":81,"fast-deep-equal":118},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.BaseProvider=void 0;const u=e("@metamask/json-rpc-engine"),c=e("@metamask/rpc-errors"),l=a(e("@metamask/safe-event-emitter")),d=a(e("fast-deep-equal")),f=a(e("./messages")),h=e("./utils");class p extends l.default{constructor({logger:e=console,maxEventListeners:t=100,rpcMiddleware:r=[]}={}){super(),n.set(this,void 0),i.set(this,void 0),this._log=e,this.setMaxListeners(t),this._state={...p._defaultState},s(this,i,null,"f"),s(this,n,null,"f"),this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this.request=this.request.bind(this);const o=new u.JsonRpcEngine;r.forEach((e=>o.push(e))),this._rpcEngine=o}get chainId(){return o(this,n,"f")}get selectedAddress(){return o(this,i,"f")}isConnected(){return this._state.isConnected}async request(e){if(!e||"object"!=typeof e||Array.isArray(e))throw c.rpcErrors.invalidRequest({message:f.default.errors.invalidRequestArgs(),data:e});const{method:t,params:r}=e;if("string"!=typeof t||0===t.length)throw c.rpcErrors.invalidRequest({message:f.default.errors.invalidRequestMethod(),data:e});if(r!==undefined&&!Array.isArray(r)&&("object"!=typeof r||null===r))throw c.rpcErrors.invalidRequest({message:f.default.errors.invalidRequestParams(),data:e});return new Promise(((e,n)=>{this._rpcRequest({method:t,params:r},(0,h.getRpcPromiseCallback)(e,n))}))}_initializeState(e){if(this._state.initialized)throw new Error("Provider already initialized.");if(e){const{accounts:t,chainId:r,isUnlocked:n,networkVersion:i}=e;this._handleConnect(r),this._handleChainChanged({chainId:r,networkVersion:i}),this._handleUnlockStateChanged({accounts:t,isUnlocked:n}),this._handleAccountsChanged(t)}this._state.initialized=!0,this.emit("_initialized")}_rpcRequest(e,t){let r=t;return Array.isArray(e)||(e.jsonrpc||(e.jsonrpc="2.0"),"eth_accounts"!==e.method&&"eth_requestAccounts"!==e.method||(r=(r,n)=>{this._handleAccountsChanged(n.result??[],"eth_accounts"===e.method),t(r,n)})),this._rpcEngine.handle(e,r)}_handleConnect(e){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:e}),this._log.debug(f.default.info.connected(e)))}_handleDisconnect(e,t){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!e){let r;this._state.isConnected=!1,e?(r=new c.JsonRpcError(1013,t??f.default.errors.disconnected()),this._log.debug(r)):(r=new c.JsonRpcError(1011,t??f.default.errors.permanentlyDisconnected()),this._log.error(r),s(this,n,null,"f"),this._state.accounts=null,s(this,i,null,"f"),this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",r)}}_handleChainChanged({chainId:e}={}){(0,h.isValidChainId)(e)?(this._handleConnect(e),e!==o(this,n,"f")&&(s(this,n,e,"f"),this._state.initialized&&this.emit("chainChanged",o(this,n,"f")))):this._log.error(f.default.errors.invalidNetworkParams(),{chainId:e})}_handleAccountsChanged(e,t=!1){let r=e;Array.isArray(e)||(this._log.error("MetaMask: Received invalid accounts parameter. Please report this bug.",e),r=[]);for(const t of e)if("string"!=typeof t){this._log.error("MetaMask: Received non-string account. Please report this bug.",e),r=[];break}if(!(0,d.default)(this._state.accounts,r)&&(t&&null!==this._state.accounts&&this._log.error("MetaMask: 'eth_accounts' unexpectedly updated accounts. Please report this bug.",r),this._state.accounts=r,o(this,i,"f")!==r[0]&&s(this,i,r[0]||null,"f"),this._state.initialized)){const e=[...r];this.emit("accountsChanged",e)}}_handleUnlockStateChanged({accounts:e,isUnlocked:t}={}){"boolean"==typeof t?t!==this._state.isUnlocked&&(this._state.isUnlocked=t,this._handleAccountsChanged(e??[])):this._log.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.")}}r.BaseProvider=p,n=new WeakMap,i=new WeakMap,p._defaultState={accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/BaseProvider.js"}],[49,{"./StreamProvider":50,"./messages":56,"./siteMetadata":59,"./utils":60,"@metamask/rpc-errors":79},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},s=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=void 0;const a=e("@metamask/rpc-errors"),u=o(e("./messages")),c=e("./siteMetadata"),l=e("./StreamProvider"),d=e("./utils");r.MetaMaskInpageProviderStreamName="metamask-provider";class f extends l.AbstractStreamProvider{constructor(e,{jsonRpcStreamName:t=r.MetaMaskInpageProviderStreamName,logger:s=console,maxEventListeners:o=100,shouldSendMetadata:a}={}){if(super(e,{jsonRpcStreamName:t,logger:s,maxEventListeners:o,rpcMiddleware:(0,d.getDefaultExternalMiddleware)(s)}),this._sentWarnings={chainId:!1,networkVersion:!1,selectedAddress:!1,enable:!1,experimentalMethods:!1,send:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}},n.set(this,void 0),this._initializeStateAsync(),i(this,n,null,"f"),this.isMetaMask=!0,this._sendSync=this._sendSync.bind(this),this.enable=this.enable.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._metamask=this._getExperimentalApi(),this._jsonRpcConnection.events.on("notification",(e=>{const{method:t}=e;d.EMITTED_NOTIFICATIONS.includes(t)&&(this.emit("data",e),this.emit("notification",e.params.result))})),a)if("complete"===document.readyState)(0,c.sendSiteMetadata)(this._rpcEngine,this._log);else{const e=()=>{(0,c.sendSiteMetadata)(this._rpcEngine,this._log),window.removeEventListener("DOMContentLoaded",e)};window.addEventListener("DOMContentLoaded",e)}}get chainId(){return this._sentWarnings.chainId||(this._log.warn(u.default.warnings.chainIdDeprecation),this._sentWarnings.chainId=!0),super.chainId}get networkVersion(){return this._sentWarnings.networkVersion||(this._log.warn(u.default.warnings.networkVersionDeprecation),this._sentWarnings.networkVersion=!0),s(this,n,"f")}get selectedAddress(){return this._sentWarnings.selectedAddress||(this._log.warn(u.default.warnings.selectedAddressDeprecation),this._sentWarnings.selectedAddress=!0),super.selectedAddress}sendAsync(e,t){this._rpcRequest(e,t)}addListener(e,t){return this._warnOfDeprecation(e),super.addListener(e,t)}on(e,t){return this._warnOfDeprecation(e),super.on(e,t)}once(e,t){return this._warnOfDeprecation(e),super.once(e,t)}prependListener(e,t){return this._warnOfDeprecation(e),super.prependListener(e,t)}prependOnceListener(e,t){return this._warnOfDeprecation(e),super.prependOnceListener(e,t)}_handleDisconnect(e,t){super._handleDisconnect(e,t),s(this,n,"f")&&!e&&i(this,n,null,"f")}_warnOfDeprecation(e){!1===this._sentWarnings?.events[e]&&(this._log.warn(u.default.warnings.events[e]),this._sentWarnings.events[e]=!0)}async enable(){return this._sentWarnings.enable||(this._log.warn(u.default.warnings.enableDeprecation),this._sentWarnings.enable=!0),new Promise(((e,t)=>{try{this._rpcRequest({method:"eth_requestAccounts",params:[]},(0,d.getRpcPromiseCallback)(e,t))}catch(e){t(e)}}))}send(e,t){return this._sentWarnings.send||(this._log.warn(u.default.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof e||t&&!Array.isArray(t)?e&&"object"==typeof e&&"function"==typeof t?this._rpcRequest(e,t):this._sendSync(e):new Promise(((r,n)=>{try{this._rpcRequest({method:e,params:t},(0,d.getRpcPromiseCallback)(r,n,!1))}catch(e){n(e)}}))}_sendSync(e){let t;switch(e.method){case"eth_accounts":t=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":t=this.selectedAddress??null;break;case"eth_uninstallFilter":this._rpcRequest(e,d.NOOP),t=!0;break;case"net_version":t=s(this,n,"f")??null;break;default:throw new Error(u.default.errors.unsupportedSync(e.method))}return{id:e.id,jsonrpc:e.jsonrpc,result:t}}_getExperimentalApi(){return new Proxy({isUnlocked:async()=>(this._state.initialized||await new Promise((e=>{this.on("_initialized",(()=>e()))})),this._state.isUnlocked),requestBatch:async e=>{if(!Array.isArray(e))throw a.rpcErrors.invalidRequest({message:"Batch requests must be made with an array of request objects.",data:e});return new Promise(((t,r)=>{this._rpcRequest(e,(0,d.getRpcPromiseCallback)(t,r))}))}},{get:(e,t,...r)=>(this._sentWarnings.experimentalMethods||(this._log.warn(u.default.warnings.experimentalMethods),this._sentWarnings.experimentalMethods=!0),Reflect.get(e,t,...r))})}_handleChainChanged({chainId:e,networkVersion:t}={}){super._handleChainChanged({chainId:e,networkVersion:t}),this._state.isConnected&&t!==s(this,n,"f")&&(i(this,n,t,"f"),this._state.initialized&&this.emit("networkChanged",s(this,n,"f")))}}r.MetaMaskInpageProvider=f,n=new WeakMap}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/MetaMaskInpageProvider.js"}],[50,{"./BaseProvider":48,"./messages":56,"./utils":60,"@metamask/object-multiplex":10,"is-stream":123,"json-rpc-middleware-stream":64,stream:188},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.AbstractStreamProvider=void 0;const i=n(e("@metamask/object-multiplex")),s=e("is-stream"),o=e("json-rpc-middleware-stream"),a=e("stream"),u=e("./BaseProvider"),c=n(e("./messages")),l=e("./utils");class d extends u.BaseProvider{constructor(e,{jsonRpcStreamName:t,logger:r=console,maxEventListeners:n=100,rpcMiddleware:u=[]}){if(super({logger:r,maxEventListeners:n,rpcMiddleware:u}),!(0,s.duplex)(e))throw new Error(c.default.errors.invalidDuplexStream());this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this);const d=new i.default;(0,a.pipeline)(e,d,e,this._handleStreamDisconnect.bind(this,"MetaMask")),this._jsonRpcConnection=(0,o.createStreamMiddleware)({retryOnMessage:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}),(0,a.pipeline)(this._jsonRpcConnection.stream,d.createStream(t),this._jsonRpcConnection.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider")),this._rpcEngine.push(this._jsonRpcConnection.middleware),this._jsonRpcConnection.events.on("notification",(t=>{const{method:r,params:n}=t;"metamask_accountsChanged"===r?this._handleAccountsChanged(n):"metamask_unlockStateChanged"===r?this._handleUnlockStateChanged(n):"metamask_chainChanged"===r?this._handleChainChanged(n):l.EMITTED_NOTIFICATIONS.includes(r)?this.emit("message",{type:r,data:n}):"METAMASK_STREAM_FAILURE"===r&&e.destroy(new Error(c.default.errors.permanentlyDisconnected()))}))}async _initializeStateAsync(){let e;try{e=await this.request({method:"metamask_getProviderState"})}catch(e){this._log.error("MetaMask: Failed to get initial state. Please report this bug.",e)}this._initializeState(e)}_handleStreamDisconnect(e,t){let r=`MetaMask: Lost connection to "${e}".`;t?.stack&&(r+=`\n${t.stack}`),this._log.warn(r),this.listenerCount("error")>0&&this.emit("error",r),this._handleDisconnect(!1,t?t.message:undefined)}_handleChainChanged({chainId:e,networkVersion:t}={}){(0,l.isValidChainId)(e)&&(0,l.isValidNetworkVersion)(t)?"loading"===t?this._handleDisconnect(!0):super._handleChainChanged({chainId:e}):this._log.error(c.default.errors.invalidNetworkParams(),{chainId:e,networkVersion:t})}}r.AbstractStreamProvider=d;r.StreamProvider=class extends d{async initialize(){return this._initializeStateAsync()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/StreamProvider.js"}],[51,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ERC20=r.ERC1155=r.ERC721=void 0,r.ERC721="ERC721",r.ERC1155="ERC1155",r.ERC20="ERC20"}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/constants.js"}],[52,{"../MetaMaskInpageProvider":49,"../StreamProvider":50,"../utils":60,"./external-extension-config.json":53,"detect-browser":114,"extension-port-stream":117},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createExternalExtensionProvider=void 0;const i=e("detect-browser"),s=n(e("extension-port-stream")),o=n(e("./external-extension-config.json")),a=e("../MetaMaskInpageProvider"),u=e("../StreamProvider"),c=e("../utils"),l=(0,i.detect)();r.createExternalExtensionProvider=function(e="stable"){let t;try{const r=function(e){return("firefox"===l?.name?o.default.firefoxIds:o.default.chromeIds)[e]??e}(e),n=chrome.runtime.connect(r),i=new s.default(n);t=new u.StreamProvider(i,{jsonRpcStreamName:a.MetaMaskInpageProviderStreamName,logger:console,rpcMiddleware:(0,c.getDefaultExternalMiddleware)(console)}),t.initialize()}catch(e){throw console.dir("MetaMask connect error.",e),e}return t}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/createExternalExtensionProvider.js"}],[53,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports={chromeIds:{stable:"nkbihfbeogaeaoehlefnkodbefgpgknn",beta:"pbbkamfgmaedccnfkmjcofcecjhfgldn",flask:"ljfoeinjpaedjfecbmggjgodbgkmjkjk"},firefoxIds:{stable:"webextension@metamask.io",beta:"webextension-beta@metamask.io",flask:"webextension-flask@metamask.io"}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/extension-provider/external-extension-config.json"}],[54,{"./BaseProvider":48,"./MetaMaskInpageProvider":49,"./StreamProvider":50,"./extension-provider/createExternalExtensionProvider":52,"./initializeInpageProvider":55,"./shimWeb3":58},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.StreamProvider=r.shimWeb3=r.setGlobalProvider=r.MetaMaskInpageProvider=r.MetaMaskInpageProviderStreamName=r.initializeProvider=r.createExternalExtensionProvider=r.BaseProvider=void 0;const n=e("./BaseProvider");Object.defineProperty(r,"BaseProvider",{enumerable:!0,get:function(){return n.BaseProvider}});const i=e("./extension-provider/createExternalExtensionProvider");Object.defineProperty(r,"createExternalExtensionProvider",{enumerable:!0,get:function(){return i.createExternalExtensionProvider}});const s=e("./initializeInpageProvider");Object.defineProperty(r,"initializeProvider",{enumerable:!0,get:function(){return s.initializeProvider}}),Object.defineProperty(r,"setGlobalProvider",{enumerable:!0,get:function(){return s.setGlobalProvider}});const o=e("./MetaMaskInpageProvider");Object.defineProperty(r,"MetaMaskInpageProvider",{enumerable:!0,get:function(){return o.MetaMaskInpageProvider}}),Object.defineProperty(r,"MetaMaskInpageProviderStreamName",{enumerable:!0,get:function(){return o.MetaMaskInpageProviderStreamName}});const a=e("./shimWeb3");Object.defineProperty(r,"shimWeb3",{enumerable:!0,get:function(){return a.shimWeb3}});const u=e("./StreamProvider");Object.defineProperty(r,"StreamProvider",{enumerable:!0,get:function(){return u.StreamProvider}})}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/index.js"}],[55,{"./MetaMaskInpageProvider":49,"./shimWeb3":58},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.setGlobalProvider=r.initializeProvider=void 0;const n=e("./MetaMaskInpageProvider"),i=e("./shimWeb3");function s(e){window.ethereum=e,window.dispatchEvent(new Event("ethereum#initialized"))}r.initializeProvider=function({connectionStream:e,jsonRpcStreamName:t,logger:r=console,maxEventListeners:o=100,shouldSendMetadata:a=!0,shouldSetOnWindow:u=!0,shouldShimWeb3:c=!1}){const l=new n.MetaMaskInpageProvider(e,{jsonRpcStreamName:t,logger:r,maxEventListeners:o,shouldSendMetadata:a}),d=new Proxy(l,{deleteProperty:()=>!0,get:(e,t)=>e[t]});return u&&s(d),c&&(0,i.shimWeb3)(d,r),d},r.setGlobalProvider=s}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/initializeInpageProvider.js"}],[56,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n={errors:{disconnected:()=>"MetaMask: Disconnected from chain. Attempting to connect.",permanentlyDisconnected:()=>"MetaMask: Disconnected from MetaMask background. Page reload required.",sendSiteMetadata:()=>"MetaMask: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:e=>`MetaMask: The MetaMask Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidNetworkParams:()=>"MetaMask: Received invalid network parameters. Please report this bug.",invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`MetaMask: Connected to chain with ID "${e}".`},warnings:{chainIdDeprecation:"MetaMask: 'ethereum.chainId' is deprecated and may be removed in the future. Please use the 'eth_chainId' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",networkVersionDeprecation:"MetaMask: 'ethereum.networkVersion' is deprecated and may be removed in the future. Please use the 'net_version' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",selectedAddressDeprecation:"MetaMask: 'ethereum.selectedAddress' is deprecated and may be removed in the future. Please use the 'eth_accounts' RPC method instead.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/discussions/23",enableDeprecation:"MetaMask: 'ethereum.enable()' is deprecated and may be removed in the future. Please use the 'eth_requestAccounts' RPC method instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1102",sendDeprecation:"MetaMask: 'ethereum.send(...)' is deprecated and may be removed in the future. Please use 'ethereum.sendAsync(...)' or 'ethereum.request(...)' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193",events:{close:"MetaMask: The event 'close' is deprecated and may be removed in the future. Please use 'disconnect' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#disconnect",data:"MetaMask: The event 'data' is deprecated and will be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message",networkChanged:"MetaMask: The event 'networkChanged' is deprecated and may be removed in the future. Use 'chainChanged' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#chainchanged",notification:"MetaMask: The event 'notification' is deprecated and may be removed in the future. Use 'message' instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message"},rpc:{ethDecryptDeprecation:"MetaMask: The RPC method 'eth_decrypt' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",ethGetEncryptionPublicKeyDeprecation:"MetaMask: The RPC method 'eth_getEncryptionPublicKey' is deprecated and may be removed in the future.\nFor more information, see: https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686",walletWatchAssetNFTExperimental:"MetaMask: The RPC method 'wallet_watchAsset' is experimental for ERC721/ERC1155 assets and may change in the future.\nFor more information, see: https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md and https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle"},experimentalMethods:"MetaMask: 'ethereum._metamask' exposes non-standard, experimental methods. They may be removed or changed without warning."}};r.default=n}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/messages.js"}],[57,{"../constants":51,"../messages":56},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRpcWarningMiddleware=void 0;const i=e("../constants"),s=n(e("../messages"));r.createRpcWarningMiddleware=function(e){const t={ethDecryptDeprecation:!1,ethGetEncryptionPublicKeyDeprecation:!1,walletWatchAssetNFTExperimental:!1};return(r,n,o)=>{t.ethDecryptDeprecation||"eth_decrypt"!==r.method?t.ethGetEncryptionPublicKeyDeprecation||"eth_getEncryptionPublicKey"!==r.method?!t.walletWatchAssetNFTExperimental&&"wallet_watchAsset"===r.method&&[i.ERC721,i.ERC1155].includes(r.params?.type||"")&&(e.warn(s.default.warnings.rpc.walletWatchAssetNFTExperimental),t.walletWatchAssetNFTExperimental=!0):(e.warn(s.default.warnings.rpc.ethGetEncryptionPublicKeyDeprecation),t.ethGetEncryptionPublicKeyDeprecation=!0):(e.warn(s.default.warnings.rpc.ethDecryptDeprecation),t.ethDecryptDeprecation=!0),o()}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/middleware/createRpcWarningMiddleware.js"}],[58,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shimWeb3=void 0,r.shimWeb3=function(e,t=console){let r=!1,n=!1;if(!window.web3){const i="__isMetaMaskShim__";let s={currentProvider:e};Object.defineProperty(s,i,{value:!0,enumerable:!0,configurable:!1,writable:!1}),s=new Proxy(s,{get:(s,o,...a)=>("currentProvider"!==o||r?"currentProvider"===o||o===i||n||(n=!0,t.error("MetaMask no longer injects web3. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),e.request({method:"metamask_logWeb3ShimUsage"}).catch((e=>{t.debug("MetaMask: Failed to log web3 shim usage.",e)}))):(r=!0,t.warn("You are accessing the MetaMask window.web3.currentProvider shim. This property is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3")),Reflect.get(s,o,...a)),set:(...e)=>(t.warn("You are accessing the MetaMask window.web3 shim. This object is deprecated; use window.ethereum instead. For details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-web3"),Reflect.set(...e))}),Object.defineProperty(window,"web3",{value:s,enumerable:!1,configurable:!0,writable:!0})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/shimWeb3.js"}],[59,{"./messages":56,"./utils":60},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.sendSiteMetadata=void 0;const i=n(e("./messages")),s=e("./utils");function o(e){const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const n=t.querySelector('head > meta[name="title"]');return n?n.content:t.title&&t.title.length>0?t.title:window.location.hostname}async function a(e){const{document:t}=e,r=t.querySelectorAll('head > link[rel~="icon"]');for(const e of Array.from(r))if(e&&await u(e.href))return e.href;return null}async function u(e){return new Promise(((t,r)=>{try{const r=document.createElement("img");r.onload=()=>t(!0),r.onerror=()=>t(!1),r.src=e}catch(e){r(e)}}))}r.sendSiteMetadata=async function(e,t){try{const t=await async function(){return{name:o(window),icon:await a(window)}}();e.handle({jsonrpc:"2.0",id:1,method:"metamask_sendDomainMetadata",params:t},s.NOOP)}catch(e){t.error({message:i.default.errors.sendSiteMetadata(),originalError:e})}}}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/siteMetadata.js"}],[60,{"./middleware/createRpcWarningMiddleware":57,"@metamask/json-rpc-engine":6,"@metamask/rpc-errors":79},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NOOP=r.isValidNetworkVersion=r.isValidChainId=r.getRpcPromiseCallback=r.getDefaultExternalMiddleware=r.EMITTED_NOTIFICATIONS=void 0;const n=e("@metamask/json-rpc-engine"),i=e("@metamask/rpc-errors"),s=e("./middleware/createRpcWarningMiddleware");r.EMITTED_NOTIFICATIONS=Object.freeze(["eth_subscription"]);r.getDefaultExternalMiddleware=(e=console)=>{return[(0,n.createIdRemapMiddleware)(),(t=e,(e,r,n)=>{"string"==typeof e.method&&e.method||(r.error=i.rpcErrors.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),n((e=>{const{error:n}=r;return n?(t.error(`MetaMask - RPC Error: ${n.message}`,n),e()):e()}))}),(0,s.createRpcWarningMiddleware)(e)];var t};r.getRpcPromiseCallback=(e,t,r=!0)=>(n,i)=>{n||i.error?t(n||i.error):!r||Array.isArray(i)?e(i):e(i.result)};r.isValidChainId=e=>Boolean(e)&&"string"==typeof e&&e.startsWith("0x");r.isValidNetworkVersion=e=>Boolean(e)&&"string"==typeof e;r.NOOP=()=>undefined}}},{package:"@metamask/providers",file:"../../node_modules/@metamask/providers/dist/utils.js"}],[61,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>isarray",file:"../../node_modules/@metamask/providers/node_modules/isarray/index.js"}],[62,{"readable-stream":73},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");r.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>undefined,write:function(e,n,i){t.handle(e,((e,t)=>{r.push(t)})),i()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/@metamask/providers/node_modules/json-rpc-middleware-stream/dist/createEngineStream.js"}],[63,{"@metamask/safe-event-emitter":81,"readable-stream":73},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const i=n(e("@metamask/safe-event-emitter")),s=e("readable-stream");r.default=function(e={}){const t={},r=new s.Duplex({objectMode:!0,read:()=>undefined,write:function(r,i,s){let a=null;try{!r.id?function(r){(null==e?void 0:e.retryOnMessage)&&r.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:r=0})=>{if(e.id){if(r>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=r+1,o(e)}}));n.emit("notification",r)}(r):function(e){const r=t[e.id];if(!r)return void console.warn(`StreamMiddleware - Unknown response id "${e.id}"`);delete t[e.id],Object.assign(r.res,e),setTimeout(r.end)}(r)}catch(e){a=e}s(a)}}),n=new i.default;return{events:n,middleware:(e,r,n,i)=>{t[e.id]={req:e,res:r,next:n,end:i},o(e)},stream:r};function o(e){r.push(e)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/@metamask/providers/node_modules/json-rpc-middleware-stream/dist/createStreamMiddleware.js"}],[64,{"./createEngineStream":62,"./createStreamMiddleware":63},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createStreamMiddleware=r.createEngineStream=void 0;const i=n(e("./createEngineStream"));r.createEngineStream=i.default;const s=n(e("./createStreamMiddleware"));r.createStreamMiddleware=s.default}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/@metamask/providers/node_modules/json-rpc-middleware-stream/dist/index.js"}],[65,{"./_stream_readable":67,"./_stream_writable":69,"core-util-is":110,inherits:121,"process-nextick-args":125},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=d;var s=Object.create(e("core-util-is"));s.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");s.inherits(d,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];d.prototype[l]||(d.prototype[l]=a.prototype[l])}function d(e){if(!(this instanceof d))return new d(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),d.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/_stream_duplex.js"}],[66,{"./_stream_transform":68,"core-util-is":110,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=s;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/_stream_passthrough.js"}],[67,{"./_stream_duplex":65,"./internal/streams/BufferList":70,"./internal/streams/destroy":71,"./internal/streams/stream":72,_process:126,"core-util-is":110,events:116,inherits:121,isarray:61,"process-nextick-args":125,"safe-buffer":74,"string_decoder/":75,util:107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");t.exports=w;var i,s=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var d=e("util"),f=void 0;f=d&&d.debuglog?d.debuglog("stream"):function(){};var h,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(i=i||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var s=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function w(t){if(i=i||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function y(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,o)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?v(e,o,t,!1):T(e,o)):v(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function v(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),y(this,e,t,!1,r)},w.prototype.unshift=function(e){return y(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return h||(h=e("string_decoder/").StringDecoder),this._readableState.decoder=new h(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){f("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(f("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function j(e){f("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(f("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return f("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",i=!0),t.ended||t.reading?f("reading or ended",i=!1):i&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function c(t,r){f("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",b),e.removeListener("finish",w),e.removeListener("drain",d),e.removeListener("error",g),e.removeListener("unpipe",c),i.removeListener("end",l),i.removeListener("end",y),i.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||d())}function l(){f("onend"),e.end()}a.endEmitted?n.nextTick(u):i.once("end",u),e.on("unpipe",c);var d=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(i);e.on("drain",d);var h=!1;var p=!1;function m(t){f("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==A(a.pipes,e))&&!h&&(f("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,p=!0),i.pause())}function g(t){f("onerror",t),y(),e.removeListener("error",g),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",w),y()}function w(){f("onfinish"),e.removeListener("close",b),y()}function y(){f("unpipe"),i.unpipe(e)}return i.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",b),e.once("finish",w),e.emit("pipe",i),a.flowing||(f("pipe resume"),i.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=A(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):n.nextTick(j,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t))}(this,e)),this},w.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(f("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&i!==undefined)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)this[i]===undefined&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){f("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/_stream_readable.js"}],[68,{"./_stream_duplex":65,"core-util-is":110,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/_stream_transform.js"}],[69,{"./_stream_duplex":65,"./internal/streams/destroy":71,"./internal/streams/stream":72,_process:126,"core-util-is":110,inherits:121,"process-nextick-args":125,"safe-buffer":74,timers:109,"util-deprecate":191},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r,n){(function(){var i=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=b;var o,a=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:i.nextTick;b.WritableState=g;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,f=global.Uint8Array||function(){};var h,p=e("./internal/streams/destroy");function m(){}function g(t,r){o=o||e("./_stream_duplex"),t=t||{};var n=r instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(i.nextTick(s,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,s);else{var o=_(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?a(y,e,r,o,s):y(e,r,o,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(o=o||e("./_stream_duplex"),!(h.call(b,this)||this instanceof o))return new b(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function w(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function y(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,w(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(w(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===b&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,d.isBuffer(n)||n instanceof f);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,a,n,i,s);return u}(this,s,a,e,t,r)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=p.destroy,b.prototype._undestroy=p.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),e("timers").setImmediate)}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/_stream_writable.js"}],[70,{"safe-buffer":74,util:107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[71,{"process-nextick-args":125},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[72,{events:116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("events").EventEmitter}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/lib/internal/streams/stream-browser.js"}],[73,{"./lib/_stream_duplex.js":65,"./lib/_stream_passthrough.js":66,"./lib/_stream_readable.js":67,"./lib/_stream_transform.js":68,"./lib/_stream_writable.js":69},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/@metamask/providers/node_modules/readable-stream/readable-browser.js"}],[74,{buffer:108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer",file:"../../node_modules/@metamask/providers/node_modules/safe-buffer/index.js"}],[75,{"safe-buffer":74},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder",file:"../../node_modules/@metamask/providers/node_modules/string_decoder/lib/string_decoder.js"}],[76,{"./utils":80,"@metamask/utils":91,"fast-safe-stringify":119},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.JsonRpcError=void 0;const i=e("@metamask/utils"),s=n(e("fast-safe-stringify")),o=e("./utils");class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,r!==undefined&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data,(0,i.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,s.default)(this.serialize(),u,2)}}r.JsonRpcError=a;function u(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/classes.js"}],[77,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/error-constants.js"}],[78,{"./classes":76,"./error-constants":77,"./utils":80},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.providerErrors=r.rpcErrors=void 0;const n=e("./classes"),i=e("./error-constants"),s=e("./utils");function o(e,t){const[r,i]=u(t);return new n.JsonRpcError(e,r??(0,s.getMessageFromCode)(e),i)}function a(e,t){const[r,i]=u(t);return new n.EthereumProviderError(e,r??(0,s.getMessageFromCode)(e),i)}function u(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??undefined,r]}}return[]}r.rpcErrors={parse:e=>o(i.errorCodes.rpc.parse,e),invalidRequest:e=>o(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(i.errorCodes.rpc.methodNotFound,e),internal:e=>o(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(i.errorCodes.rpc.limitExceeded,e)},r.providerErrors={userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/errors.js"}],[79,{"./classes":76,"./error-constants":77,"./errors":78,"./utils":80},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorCodes=r.providerErrors=r.rpcErrors=r.getMessageFromCode=r.serializeError=r.serializeCause=r.EthereumProviderError=r.JsonRpcError=void 0;var n=e("./classes");Object.defineProperty(r,"JsonRpcError",{enumerable:!0,get:function(){return n.JsonRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});var i=e("./utils");Object.defineProperty(r,"serializeCause",{enumerable:!0,get:function(){return i.serializeCause}}),Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var s=e("./errors");Object.defineProperty(r,"rpcErrors",{enumerable:!0,get:function(){return s.rpcErrors}}),Object.defineProperty(r,"providerErrors",{enumerable:!0,get:function(){return s.providerErrors}});var o=e("./error-constants");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/index.js"}],[80,{"./error-constants":77,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeCause=r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=e("@metamask/utils"),i=e("./error-constants"),s=i.errorCodes.rpc.internal,o={code:s,message:a(s)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(u(e)){const t=e.toString();if((0,n.hasProperty)(i.errorValues,t))return i.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function u(e){return Number.isInteger(e)}function c(e){return Array.isArray(e)?e.map((e=>(0,n.isValidJson)(e)?e:(0,n.isObject)(e)?l(e):null)):(0,n.isObject)(e)?l(e):(0,n.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const i=e[r];return(0,n.isValidJson)(i)&&(t[r]=i),t}),{})}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=a,r.isValidCode=u,r.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const i=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,n.isJsonRpcError)(e))return e;const r=c(e),i={...t,data:{cause:r}};return i}(e,t);return r||delete i.stack,i},r.serializeCause=c}}},{package:"@metamask/rpc-errors",file:"../../node_modules/@metamask/rpc-errors/dist/utils.js"}],[81,{events:116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("events");function i(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}class s extends n.EventEmitter{emit(e,...t){let r="error"===e;const n=this._events;if(n!==undefined)r=r&&n.error===undefined;else if(!r)return!1;if(r){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const r=new Error("Unhandled error."+(e?` (${e.message})`:""));throw r.context=e,r}const s=n[e];if(s===undefined)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,r=function(e){const t=e.length,r=new Array(t);for(let n=0;n<t;n+=1)r[n]=e[n];return r}(s);for(let n=0;n<e;n+=1)i(r[n],this,t)}return!0}}r.default=s}}},{package:"@metamask/providers>@metamask/safe-event-emitter",file:"../../node_modules/@metamask/safe-event-emitter/index.js"}],[82,{superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{AssertionError:function(){return s},assert:function(){return o},assertStruct:function(){return a},assertExhaustive:function(){return u}});const n=e("superstruct");function i(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}class s extends Error{constructor(e){var t,r,n;super(e.message),n="ERR_ASSERTION",(r="code")in(t=this)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n}}function o(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}}function a(e,t,r="Assertion failed",o=s){try{(0,n.assert)(e,t)}catch(e){throw i(o,`${r}: ${function(e){const t=function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}(e)}.`)}}function u(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/assert.js"}],[83,{"./assert":82,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"base64",{enumerable:!0,get:function(){return s}});const n=e("superstruct"),i=e("./assert"),s=(e,t={})=>{const r=t.paddingRequired??!1,s=t.characterSet??"base64";let o,a;return"base64"===s?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),o=String.raw`[-_A-Za-z0-9]`),a=r?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,n.pattern)(e,a)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/base64.js"}],[84,{"./assert":82,"./hex":90,buffer:108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{isBytes:function(){return c},assertIsBytes:function(){return l},bytesToHex:function(){return d},bytesToBigInt:function(){return f},bytesToSignedBigInt:function(){return h},bytesToNumber:function(){return p},bytesToString:function(){return m},hexToBytes:function(){return g},bigIntToBytes:function(){return b},signedBigIntToBytes:function(){return w},numberToBytes:function(){return y},stringToBytes:function(){return v},valueToBytes:function(){return _},concatBytes:function(){return S},createDataView:function(){return E}});const n=e("./assert"),i=e("./hex"),s=48,o=58,a=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function l(e){(0,n.assert)(c(e),"Value must be a Uint8Array.")}function d(e){if(l(e),0===e.length)return"0x";const t=u(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,i.add0x)(r.join(""))}function f(e){l(e);const t=d(e);return BigInt(t)}function h(e){l(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)}function p(e){l(e);const t=f(e);return(0,n.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}function m(e){return l(e),(new TextDecoder).decode(e)}function g(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,i.assertIsHexString)(e);const t=(0,i.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),u=t-(t<o?s:a),c=i-(i<o?s:a);n[e]=16*u+c}return n}function b(e){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return g(e.toString(16))}function w(e,t){(0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)("number"==typeof t,"Byte length must be a number."),(0,n.assert)(t>0,"Byte length must be greater than 0."),(0,n.assert)(function(e,t){(0,n.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const i=new Uint8Array(t);for(let e=0;e<i.length;e++)i[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return i.reverse()}function y(e){(0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return g(e.toString(16))}function v(e){return(0,n.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function _(e){if("bigint"==typeof e)return b(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?g(e):v(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}function S(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const i=_(e[n]);t[n]=i,r+=i.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n}function E(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/bytes.js"}],[85,{superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{CAIP_CHAIN_ID_REGEX:function(){return i},CAIP_NAMESPACE_REGEX:function(){return s},CAIP_REFERENCE_REGEX:function(){return o},CAIP_ACCOUNT_ID_REGEX:function(){return a},CAIP_ACCOUNT_ADDRESS_REGEX:function(){return u},CaipChainIdStruct:function(){return c},CaipNamespaceStruct:function(){return l},CaipReferenceStruct:function(){return d},CaipAccountIdStruct:function(){return f},CaipAccountAddressStruct:function(){return h},isCaipChainId:function(){return p},isCaipNamespace:function(){return m},isCaipReference:function(){return g},isCaipAccountId:function(){return b},isCaipAccountAddress:function(){return w},parseCaipChainId:function(){return y},parseCaipAccountId:function(){return v}});const n=e("superstruct"),i=RegExp("^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$","u"),s=/^[-a-z0-9]{3,8}$/u,o=/^[-_a-zA-Z0-9]{1,32}$/u,a=RegExp("^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$","u"),u=/^[-.%a-zA-Z0-9]{1,128}$/u,c=(0,n.pattern)((0,n.string)(),i),l=(0,n.pattern)((0,n.string)(),s),d=(0,n.pattern)((0,n.string)(),o),f=(0,n.pattern)((0,n.string)(),a),h=(0,n.pattern)((0,n.string)(),u);function p(e){return(0,n.is)(e,c)}function m(e){return(0,n.is)(e,l)}function g(e){return(0,n.is)(e,d)}function b(e){return(0,n.is)(e,f)}function w(e){return(0,n.is)(e,h)}function y(e){const t=i.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}function v(e){const t=a.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/caip-types.js"}],[86,{"./base64":83,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ChecksumStruct",{enumerable:!0,get:function(){return s}});const n=e("superstruct"),i=e("./base64"),s=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/checksum.js"}],[87,{"./assert":82,"./bytes":84,"./hex":90,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{createNumber:function(){return f},createBigInt:function(){return h},createBytes:function(){return p},createHex:function(){return m}});const n=e("superstruct"),i=e("./assert"),s=e("./bytes"),o=e("./hex"),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),o.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([o.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([o.StrictHexStruct]),s.hexToBytes)),d=(0,n.coerce)(o.StrictHexStruct,(0,n.instance)(Uint8Array),s.bytesToHex);function f(e){try{const t=(0,n.create)(e,u);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}}function h(e){try{return(0,n.create)(e,c)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}}function p(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}function m(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,d)}catch(e){if(e instanceof n.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/coercers.js"}],[88,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,n(e,t,"get"))}function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,n(e,t,"set"),r),r}Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{FrozenMap:function(){return c},FrozenSet:function(){return f}});var a=new WeakMap;let u=Symbol.iterator;class c{get size(){return i(this,a).size}[u](){return i(this,a)[Symbol.iterator]()}entries(){return i(this,a).entries()}forEach(e,t){return i(this,a).forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return i(this,a).get(e)}has(e){return i(this,a).has(e)}keys(){return i(this,a).keys()}values(){return i(this,a).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}constructor(e){s(this,a,{writable:!0,value:void 0}),o(this,a,new Map(e)),Object.freeze(this)}}var l=new WeakMap;let d=Symbol.iterator;class f{get size(){return i(this,l).size}[d](){return i(this,l)[Symbol.iterator]()}entries(){return i(this,l).entries()}forEach(e,t){return i(this,l).forEach(((r,n,i)=>e.call(t,r,n,this)))}has(e){return i(this,l).has(e)}keys(){return i(this,l).keys()}values(){return i(this,l).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}constructor(e){s(this,l,{writable:!0,value:void 0}),o(this,l,new Set(e)),Object.freeze(this)}}Object.freeze(c),Object.freeze(c.prototype),Object.freeze(f),Object.freeze(f.prototype)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/collections.js"}],[89,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/encryption-types.js"}],[90,{"./assert":82,"./bytes":84,"@noble/hashes/sha3":104,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{HexStruct:function(){return a},StrictHexStruct:function(){return u},HexAddressStruct:function(){return c},HexChecksumAddressStruct:function(){return l},isHexString:function(){return d},isStrictHexString:function(){return f},assertIsHexString:function(){return h},assertIsStrictHexString:function(){return p},isValidHexAddress:function(){return m},getChecksumAddress:function(){return g},isValidChecksumAddress:function(){return b},add0x:function(){return w},remove0x:function(){return y}});const n=e("@noble/hashes/sha3"),i=e("superstruct"),s=e("./assert"),o=e("./bytes"),a=(0,i.pattern)((0,i.string)(),/^(?:0x)?[0-9a-f]+$/iu),u=(0,i.pattern)((0,i.string)(),/^0x[0-9a-f]+$/iu),c=(0,i.pattern)((0,i.string)(),/^0x[0-9a-f]{40}$/u),l=(0,i.pattern)((0,i.string)(),/^0x[0-9a-fA-F]{40}$/u);function d(e){return(0,i.is)(e,a)}function f(e){return(0,i.is)(e,u)}function h(e){(0,s.assert)(d(e),"Value must be a hexadecimal string.")}function p(e){(0,s.assert)(f(e),'Value must be a hexadecimal string, starting with "0x".')}function m(e){return(0,i.is)(e,c)||b(e)}function g(e){(0,s.assert)((0,i.is)(e,l),"Invalid hex address.");const t=y(e.toLowerCase()),r=y((0,o.bytesToHex)((0,n.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=r[t];return(0,s.assert)((0,i.is)(n,(0,i.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function b(e){return!!(0,i.is)(e,l)&&g(e)===e}function w(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function y(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/hex.js"}],[91,{"./assert":82,"./base64":83,"./bytes":84,"./caip-types":85,"./checksum":86,"./coercers":87,"./collections":88,"./encryption-types":89,"./hex":90,"./json":92,"./keyring":93,"./logging":94,"./misc":95,"./number":96,"./opaque":97,"./time":98,"./transaction-types":99,"./versions":100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){return Object.keys(e).forEach((function(r){"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})})),e}Object.defineProperty(r,"__esModule",{value:!0}),n(e("./assert"),r),n(e("./base64"),r),n(e("./bytes"),r),n(e("./caip-types"),r),n(e("./checksum"),r),n(e("./coercers"),r),n(e("./collections"),r),n(e("./encryption-types"),r),n(e("./hex"),r),n(e("./json"),r),n(e("./keyring"),r),n(e("./logging"),r),n(e("./misc"),r),n(e("./number"),r),n(e("./opaque"),r),n(e("./time"),r),n(e("./transaction-types"),r),n(e("./versions"),r)}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/index.js"}],[92,{"./assert":82,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{UnsafeJsonStruct:function(){return s},JsonStruct:function(){return o},isValidJson:function(){return a},getSafeJson:function(){return u},getJsonSize:function(){return c},jsonrpc2:function(){return l},JsonRpcVersionStruct:function(){return d},JsonRpcIdStruct:function(){return f},JsonRpcErrorStruct:function(){return h},JsonRpcParamsStruct:function(){return p},JsonRpcRequestStruct:function(){return m},JsonRpcNotificationStruct:function(){return g},isJsonRpcNotification:function(){return b},assertIsJsonRpcNotification:function(){return w},isJsonRpcRequest:function(){return y},assertIsJsonRpcRequest:function(){return v},PendingJsonRpcResponseStruct:function(){return _},JsonRpcSuccessStruct:function(){return S},JsonRpcFailureStruct:function(){return E},JsonRpcResponseStruct:function(){return k},isPendingJsonRpcResponse:function(){return T},assertIsPendingJsonRpcResponse:function(){return R},isJsonRpcResponse:function(){return j},assertIsJsonRpcResponse:function(){return x},isJsonRpcSuccess:function(){return M},assertIsJsonRpcSuccess:function(){return O},isJsonRpcFailure:function(){return P},assertIsJsonRpcFailure:function(){return C},isJsonRpcError:function(){return A},assertIsJsonRpcError:function(){return I},getJsonRpcIdValidator:function(){return N}});const n=e("superstruct"),i=e("./assert"),s=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",(e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e))),(0,n.string)(),(0,n.array)((0,n.lazy)((()=>s))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>s)))]),o=(0,n.coerce)(s,(0,n.any)(),(e=>((0,i.assertStruct)(e,s),JSON.parse(JSON.stringify(e,((e,t)=>"__proto__"===e||"constructor"===e?undefined:t))))));function a(e){try{return u(e),!0}catch{return!1}}function u(e){return(0,n.create)(e,o)}function c(e){(0,i.assertStruct)(e,o,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength}const l="2.0",d=(0,n.literal)(l),f=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),h=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(o),stack:(0,n.optional)((0,n.string)())}),p=(0,n.union)([(0,n.record)((0,n.string)(),o),(0,n.array)(o)]),m=(0,n.object)({id:f,jsonrpc:d,method:(0,n.string)(),params:(0,n.optional)(p)}),g=(0,n.object)({jsonrpc:d,method:(0,n.string)(),params:(0,n.optional)(p)});function b(e){return(0,n.is)(e,g)}function w(e,t){(0,i.assertStruct)(e,g,"Invalid JSON-RPC notification",t)}function y(e){return(0,n.is)(e,m)}function v(e,t){(0,i.assertStruct)(e,m,"Invalid JSON-RPC request",t)}const _=(0,n.object)({id:f,jsonrpc:d,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(h)}),S=(0,n.object)({id:f,jsonrpc:d,result:o}),E=(0,n.object)({id:f,jsonrpc:d,error:h}),k=(0,n.union)([S,E]);function T(e){return(0,n.is)(e,_)}function R(e,t){(0,i.assertStruct)(e,_,"Invalid pending JSON-RPC response",t)}function j(e){return(0,n.is)(e,k)}function x(e,t){(0,i.assertStruct)(e,k,"Invalid JSON-RPC response",t)}function M(e){return(0,n.is)(e,S)}function O(e,t){(0,i.assertStruct)(e,S,"Invalid JSON-RPC success response",t)}function P(e){return(0,n.is)(e,E)}function C(e,t){(0,i.assertStruct)(e,E,"Invalid JSON-RPC failure response",t)}function A(e){return(0,n.is)(e,h)}function I(e,t){(0,i.assertStruct)(e,h,"Invalid JSON-RPC error",t)}function N(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/json.js"}],[93,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/keyring.js"}],[94,{debug:112},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{createProjectLogger:function(){return s},createModuleLogger:function(){return o}});function n(e){return e&&e.__esModule?e:{default:e}}const i=(0,n(e("debug")).default)("metamask");function s(e){return i.extend(e)}function o(e,t){return e.extend(t)}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/logging.js"}],[95,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){return Array.isArray(e)&&e.length>0}function i(e){return null===e||e===undefined}function s(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{JsonSize:function(){return u},isNonEmptyArray:function(){return n},isNullOrUndefined:function(){return i},isObject:function(){return s},hasProperty:function(){return o},getKnownPropertyNames:function(){return a},ESCAPE_CHARACTERS_REGEXP:function(){return c},isPlainObject:function(){return l},isASCII:function(){return d},calculateStringSize:function(){return f},calculateNumberSize:function(){return h}});const o=(e,t)=>Object.hasOwnProperty.call(e,t);function a(e){return Object.getOwnPropertyNames(e)}var u;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(u||(u={}));const c=/"|\\|\n|\r|\t/gu;function l(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}function d(e){return e.charCodeAt(0)<=127}function f(e){return e.split("").reduce(((e,t)=>d(t)?e+1:e+2),0)+(e.match(c)??[]).length}function h(e){return e.toString().length}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/misc.js"}],[96,{"./assert":82,"./hex":90},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{numberToHex:function(){return s},bigIntToHex:function(){return o},hexToNumber:function(){return a},hexToBigInt:function(){return u}});const n=e("./assert"),i=e("./hex"),s=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),o=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),a=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},u=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/number.js"}],[97,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/opaque.js"}],[98,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{Duration:function(){return n},inMilliseconds:function(){return s},timeSince:function(){return o}}),function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(n||(n={}));const i=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};function s(e,t){return i(e,"count"),e*t}function o(e){return i(e,"timestamp"),Date.now()-e}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/time.js"}],[99,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0})}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/transaction-types.js"}],[100,{"./assert":82,semver:170,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(r,{VersionStruct:function(){return o},VersionRangeStruct:function(){return a},isValidSemVerVersion:function(){return u},isValidSemVerRange:function(){return c},assertIsSemVerVersion:function(){return l},assertIsSemVerRange:function(){return d},gtVersion:function(){return f},gtRange:function(){return h},satisfiesVersionRange:function(){return p}});const n=e("semver"),i=e("superstruct"),s=e("./assert"),o=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),a=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`));function u(e){return(0,i.is)(e,o)}function c(e){return(0,i.is)(e,a)}function l(e){(0,s.assertStruct)(e,o)}function d(e){(0,s.assertStruct)(e,a)}function f(e,t){return(0,n.gt)(e,t)}function h(e,t){return(0,n.gtr)(e,t)}function p(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}}}},{package:"@metamask/utils",file:"../../node_modules/@metamask/utils/dist/cjs/versions.js"}],[101,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function s(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(e.outputLen),n(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){s(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(r,"__esModule",{value:!0}),r.output=r.exists=r.hash=r.bytes=r.bool=r.number=void 0,r.number=n,r.bool=i,r.bytes=s,r.hash=o,r.exists=a,r.output=u;const c={number:n,bool:i,bytes:s,hash:o,exists:a,output:u};r.default=c}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_assert.js"}],[102,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.add5L=r.add5H=r.add4H=r.add4L=r.add3H=r.add3L=r.add=r.rotlBL=r.rotlBH=r.rotlSL=r.rotlSH=r.rotr32L=r.rotr32H=r.rotrBL=r.rotrBH=r.rotrSL=r.rotrSH=r.shrSL=r.shrSH=r.toBig=r.split=r.fromBig=void 0;const n=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&n),l:Number(e>>i&n)}:{h:0|Number(e>>i&n),l:0|Number(e&n)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=s(e[i],t);[r[i],n[i]]=[o,a]}return[r,n]}r.fromBig=s,r.split=o;const a=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);r.toBig=a;const u=(e,t,r)=>e>>>r;r.shrSH=u;const c=(e,t,r)=>e<<32-r|t>>>r;r.shrSL=c;const l=(e,t,r)=>e>>>r|t<<32-r;r.rotrSH=l;const d=(e,t,r)=>e<<32-r|t>>>r;r.rotrSL=d;const f=(e,t,r)=>e<<64-r|t>>>r-32;r.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;r.rotrBL=h;const p=(e,t)=>t;r.rotr32H=p;const m=(e,t)=>e;r.rotr32L=m;const g=(e,t,r)=>e<<r|t>>>32-r;r.rotlSH=g;const b=(e,t,r)=>t<<r|e>>>32-r;r.rotlSL=b;const w=(e,t,r)=>t<<r-32|e>>>64-r;r.rotlBH=w;const y=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}r.rotlBL=y,r.add=v;const _=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);r.add3L=_;const S=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;r.add3H=S;const E=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);r.add4L=E;const k=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;r.add4H=k;const T=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);r.add5L=T;const R=(e,t,r,n,i,s)=>t+r+n+i+s+(e/2**32|0)|0;r.add5H=R;const j={fromBig:s,split:o,toBig:a,shrSH:u,shrSL:c,rotrSH:l,rotrSL:d,rotrBH:f,rotrBL:h,rotr32H:p,rotr32L:m,rotlSH:g,rotlSL:b,rotlBH:w,rotlBL:y,add:v,add3L:_,add3H:S,add4L:E,add4H:k,add5H:R,add5L:T};r.default=j}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/_u64.js"}],[103,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.crypto=void 0,r.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:undefined}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/crypto.js"}],[104,{"./_assert.js":101,"./_u64.js":102,"./utils.js":105},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.shake256=r.shake128=r.keccak_512=r.keccak_384=r.keccak_256=r.keccak_224=r.sha3_512=r.sha3_384=r.sha3_256=r.sha3_224=r.Keccak=r.keccakP=void 0;const n=e("./_assert.js"),i=e("./_u64.js"),s=e("./utils.js"),[o,a,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),d=BigInt(2),f=BigInt(7),h=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],o.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)t=(t<<l^(t>>f)*p)%h,t&d&&(i^=l<<(l<<BigInt(e))-l);u.push(i)}const[m,g]=(0,i.split)(u,!0),b=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),w=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function y(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,s=r[i],o=r[i+1],a=b(s,o,1)^r[n],u=w(s,o,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],s=b(t,i,n),u=w(t,i,n),c=o[r];t=e[c],i=e[c+1],e[c]=s,e[c+1]=u}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=g[n]}r.fill(0)}r.keccakP=y;class v extends s.Hash{constructor(e,t,r,i=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.u32)(this.state)}keccak(){y(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,s.toBytes)(e)).length;for(let n=0;n<i;){const s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:s}=this;return e||(e=new v(t,r,n,s,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}r.Keccak=v;const _=(e,t,r)=>(0,s.wrapConstructor)((()=>new v(t,e,r)));r.sha3_224=_(6,144,28),r.sha3_256=_(6,136,32),r.sha3_384=_(6,104,48),r.sha3_512=_(6,72,64),r.keccak_224=_(1,144,28),r.keccak_256=_(1,136,32),r.keccak_384=_(1,104,48),r.keccak_512=_(1,72,64);const S=(e,t,r)=>(0,s.wrapXOFConstructorWithOpts)(((n={})=>new v(t,e,n.dkLen===undefined?r:n.dkLen,!0)));r.shake128=S(31,168,16),r.shake256=S(31,136,32)}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/sha3.js"}],[105,{"@noble/hashes/crypto":103},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
12548
12548
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
12549
- Object.defineProperty(r,"__esModule",{value:!0}),r.randomBytes=r.wrapXOFConstructorWithOpts=r.wrapConstructorWithOpts=r.wrapConstructor=r.checkOpts=r.Hash=r.concatBytes=r.toBytes=r.utf8ToBytes=r.asyncLoop=r.nextTick=r.hexToBytes=r.bytesToHex=r.isLE=r.rotr=r.createView=r.u32=r.u8=void 0;const n=e("@noble/hashes/crypto"),i=e=>e instanceof Uint8Array;r.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);r.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));r.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(r.rotr=(e,t)=>e<<32-t|e>>>t,r.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!r.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));r.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t},r.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),s=Number.parseInt(i,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");r[t]=s}return r};function o(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=o(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}r.nextTick=async()=>{},r.asyncLoop=async function(e,t,n){let i=Date.now();for(let s=0;s<e;s++){n(s);const e=Date.now()-i;e>=0&&e<t||(await(0,r.nextTick)(),i+=e)}},r.utf8ToBytes=o,r.toBytes=a,r.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};r.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;r.checkOpts=function(e,t){if(t!==undefined&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},r.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},r.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/utils.js"}],[80,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){r.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=u(e),o=n[0],a=n[1],c=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),l=0,f=a>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,u=r-i;a<u;a+=o)s.push(c(e,a,a+o>u?u:a+o));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],i[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,s,o=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63}}},{package:"browserify>buffer>base64-js",file:"../../node_modules/base64-js/index.js"}],[81,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"browserify>browser-resolve",file:"../../node_modules/browser-resolve/empty.js"}],[82,{"base64-js":80,buffer:82,ieee754:99},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function s(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=s(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=t===undefined&&r===undefined?new Uint8Array(e):r===undefined?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=o.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(e.length!==undefined)return"number"!=typeof e.length||W(e.length)?s(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|f(e))}function l(e){for(var t=e.length<0?0:0|f(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. '+"Received type "+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function h(e,t,r){var n=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((r===undefined||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return x(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),W(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var s,o=1,a=e.length,u=t.length;if(n!==undefined&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*o}else-1!==l&&(s-=s-l),l=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){for(var f=!0,d=0;d<u;d++)if(c(e,s+d)!==c(t,d)){f=!1;break}if(f)return s}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(W(a))return o;e[r+o]=a}return o}function w(e,t,r,n){return D($(t,e.length-r),e,r,n)}function y(e,t,r,n){return D(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return y(e,t,r,n)}function _(e,t,r,n){return D(B(t),e,r,n)}function S(e,t,r,n){return D(function(e,t){for(var r,n,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function E(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,o,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(s=e[i+1]))&&(u=(31&c)<<6|63&s)>127&&(l=u);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(u=(15&c)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by "+"`buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){return o.isBuffer(this)?this.buffer:undefined}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){return o.isBuffer(this)?this.byteOffset:undefined}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return a(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?s(e):t!==undefined?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(t===undefined)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(F(s,Uint8Array)&&(s=o.from(s)),!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=d,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):h.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. '+"Received type "+typeof e);if(t===undefined&&(t=0),r===undefined&&(r=e?e.length:0),n===undefined&&(n=0),i===undefined&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){s=c[f],a=l[f];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(t===undefined)n="utf8",r=this.length,t=0;else if(r===undefined&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,n===undefined&&(n="utf8")):(n=r,r=undefined)}var i=this.length-t;if((r===undefined||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=L(e[s]);return i}function M(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function A(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,i,s){return t=+t,r>>>=0,s||A(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function I(e,t,r,i,s){return t=+t,r>>>=0,s||A(e,0,r,8),n.write(e,t,r,i,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=t===undefined?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<r&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var s=i-1;s>=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),n!==undefined&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=r===undefined?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var N=/[^+/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){var r;t=t||Infinity;for(var n=e.length,i=null,s=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function W(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"browserify>buffer",file:"../../node_modules/browserify/node_modules/buffer/index.js"}],[83,{"process/browser.js":127,timers:83},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=u++,n=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,i((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)}}},{package:"browserify>timers-browserify",file:"../../node_modules/browserify/node_modules/timers-browserify/main.js"}],[84,{"../../is-buffer/index.js":101},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this)}).call(this,{isBuffer:e("../../is-buffer/index.js")})}}},{package:"browserify>readable-stream>core-util-is",file:"../../node_modules/core-util-is/lib/util.js"}],[85,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=1e3,i=60*n,s=60*i,o=24*s,a=7*o,u=365.25*o;function c(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*u;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*s;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=s)return c(e,t,s,"hour");if(t>=i)return c(e,t,i,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=s)return Math.round(e/s)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}},{package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js"}],[86,{"./common":87,_process:127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(n){(function(){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),e.splice(i,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e},r.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;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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.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`."))}})(),r.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"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))}}},{package:"eslint>debug",file:"../../node_modules/debug/src/browser.js"}],[87,{ms:85},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(t){function r(e){let t,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(t||i);n.diff=s,n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,i)=>{if("%%"===t)return"%";o++;const s=r.formatters[i];if("function"==typeof s){const r=e[o];t=s.call(n,r),e.splice(o,1),o--}return t})),r.formatArgs.call(n,e);(n.log||r.log).apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=n,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==r.namespaces&&(i=r.namespaces,s=r.enabled(e)),s),set:e=>{o=e}}),"function"==typeof r.init&&r.init(a),a}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(i),...r.skips.map(i).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.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(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/common.js"}],[88,{_process:127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){var t=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.getNodeVersion=r.detectOS=r.parseUserAgent=r.browserName=r.detect=r.ReactNativeInfo=r.BotInfo=r.SearchBotDeviceInfo=r.NodeInfo=r.BrowserInfo=void 0;var n=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"};r.BrowserInfo=n;var i=function(t){this.version=t,this.type="node",this.name="node",this.os=e.platform};r.NodeInfo=i;var s=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"};r.SearchBotDeviceInfo=s;var o=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null};r.BotInfo=o;var a=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null};r.ReactNativeInfo=a;var u=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,c=3,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],f=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function d(e){return""!==e&&l.reduce((function(t,r){var n=r[0],i=r[1];if(t)return t;var s=i.exec(e);return!!s&&[n,s]}),!1)}function h(e){var r=d(e);if(!r)return null;var i=r[0],a=r[1];if("searchbot"===i)return new o;var l=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);l?l.length<c&&(l=t(t([],l,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(c-l.length),!0)):l=[];var f=l.join("."),h=p(e),m=u.exec(e);return m&&m[1]?new s(i,f,h,m[1]):new n(i,f,h)}function p(e){for(var t=0,r=f.length;t<r;t++){var n=f[t],i=n[0];if(n[1].exec(e))return i}return null}function m(){return void 0!==e&&e.version?new i(e.version.slice(1)):null}r.detect=function(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new a:"undefined"!=typeof navigator?h(navigator.userAgent):m()},r.browserName=function(e){var t=d(e);return t?t[0]:null},r.parseUserAgent=h,r.detectOS=p,r.getNodeVersion=m}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/providers>detect-browser",file:"../../node_modules/detect-browser/index.js"}],[89,{_process:127,once:125},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("once"),i=function(){},s=function(e,t,o){if("function"==typeof t)return s(e,null,t);t||(t={}),o=n(o||i);var a=e._writableState,u=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,f=!1,d=function(){e.writable||h()},h=function(){l=!1,c||o.call(e)},p=function(){c=!1,l||o.call(e)},m=function(t){o.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){o.call(e,t)},b=function(){r.nextTick(w)},w=function(){if(!f)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:o.call(e,new Error("premature close"))},y=function(){e.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!a&&(e.on("end",d),e.on("close",d)):(e.on("complete",h),e.on("abort",b),e.req?y():e.on("request",y)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",m),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",g),e.on("close",b),function(){f=!0,e.removeListener("complete",h),e.removeListener("abort",b),e.removeListener("request",y),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",m),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",b)}};t.exports=s}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/object-multiplex>end-of-stream",file:"../../node_modules/end-of-stream/index.js"}],[90,{"fast-safe-stringify":98},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.EthereumProviderError=r.EthereumRpcError=void 0;const n=e("fast-safe-stringify");class i extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a nonempty string.');super(t),this.code=e,r!==undefined&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return this.data!==undefined&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),s,2)}}r.EthereumRpcError=i;function s(e,t){return"[Circular]"===t?undefined:t}r.EthereumProviderError=class extends i{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/classes.js"}],[91,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.errorValues=r.errorCodes=void 0,r.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},r.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/error-constants.js"}],[92,{"./classes":90,"./error-constants":91,"./utils":94},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ethErrors=void 0;const n=e("./classes"),i=e("./utils"),s=e("./error-constants");function o(e,t){const[r,s]=u(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),s)}function a(e,t){const[r,s]=u(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),s)}function u(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t||undefined,r]}}return[]}r.ethErrors={rpc:{parse:e=>o(s.errorCodes.rpc.parse,e),invalidRequest:e=>o(s.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(s.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(s.errorCodes.rpc.methodNotFound,e),internal:e=>o(s.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(s.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(s.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(s.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(s.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(s.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(s.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(s.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(s.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(s.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(s.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(s.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:i}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,i)}}}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/errors.js"}],[93,{"./classes":90,"./error-constants":91,"./errors":92,"./utils":94},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getMessageFromCode=r.serializeError=r.EthereumProviderError=r.EthereumRpcError=r.ethErrors=r.errorCodes=void 0;const n=e("./classes");Object.defineProperty(r,"EthereumRpcError",{enumerable:!0,get:function(){return n.EthereumRpcError}}),Object.defineProperty(r,"EthereumProviderError",{enumerable:!0,get:function(){return n.EthereumProviderError}});const i=e("./utils");Object.defineProperty(r,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(r,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=e("./errors");Object.defineProperty(r,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=e("./error-constants");Object.defineProperty(r,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/index.js"}],[94,{"./classes":90,"./error-constants":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.serializeError=r.isValidCode=r.getMessageFromCode=r.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=e("./error-constants"),i=e("./classes"),s=n.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",a={code:s,message:u(s)};function u(e,t=o){if(Number.isInteger(e)){const t=e.toString();if(d(n.errorValues,t))return n.errorValues[t].message;if(l(e))return r.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function f(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",r.getMessageFromCode=u,r.isValidCode=c,r.serializeError=function(e,{fallbackError:t=a,shouldIncludeStack:r=!1}={}){var n,s;if(!t||!Number.isInteger(t.code)||"string"!=typeof t.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();const o={};if(e&&"object"==typeof e&&!Array.isArray(e)&&d(e,"code")&&c(e.code)){const t=e;o.code=t.code,t.message&&"string"==typeof t.message?(o.message=t.message,d(t,"data")&&(o.data=t.data)):(o.message=u(o.code),o.data={originalError:f(e)})}else{o.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;o.message=r&&"string"==typeof r?r:t.message,o.data={originalError:f(e)}}const l=null===(s=e)||void 0===s?void 0:s.stack;return r&&e&&l&&"string"==typeof l&&(o.stack=l),o}}}},{package:"eth-rpc-errors",file:"../../node_modules/eth-rpc-errors/dist/utils.js"}],[95,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,r)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=undefined,a.prototype._eventsCount=0,a.prototype._maxListeners=undefined;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return e._maxListeners===undefined?a.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,s,o,a;if(c(r),(s=e._events)===undefined?(s=e._events=Object.create(null),e._eventsCount=0):(s.newListener!==undefined&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),o===undefined)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,a=u,console&&console.warn&&console.warn(a)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:undefined,target:e,type:t,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(n===undefined)return[];var i=n[t];return i===undefined?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):g(i,i.length)}function m(e){var t=this._events;if(t!==undefined){var r=t[e];if("function"==typeof r)return 1;if(r!==undefined)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.init=function(){this._events!==undefined&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||undefined},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(i!==undefined)n=n&&i.error===undefined;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[e];if(u===undefined)return!1;if("function"==typeof u)s(u,this,t);else{var c=u.length,l=g(u,c);for(r=0;r<c;++r)s(l[r],this,t)}return!0},a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,s,o;if(c(t),(n=this._events)===undefined)return this;if((r=n[e])===undefined)return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),n.removeListener!==undefined&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if((r=this._events)===undefined)return this;if(r.removeListener===undefined)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):r[e]!==undefined&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t!==undefined)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}}},{package:"browserify>events",file:"../../node_modules/events/events.js"}],[96,{buffer:82,stream:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){const n=e("stream");t.exports=class extends n.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect()))}_onMessage(e){if(r.isBuffer(e)){const t=r.from(e);this.push(t)}else this.push(e)}_onDisconnect(){this.destroy()}_read(){return undefined}_write(e,t,n){try{if(r.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._port.postMessage(t)}else this._port.postMessage(e)}catch(e){return n(new Error("PortDuplexStream - disconnected"))}return n()}}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/providers>extension-port-stream",file:"../../node_modules/extension-port-stream/dist/index.js"}],[97,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}}}},{package:"eslint>fast-deep-equal",file:"../../node_modules/fast-deep-equal/index.js"}],[98,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=u,u.default=u,u.stable=d,u.stableStringify=d;var n="[...]",i="[Circular]",s=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function u(e,t,r,n){var i;void 0===n&&(n=a()),l(e,"",0,[],undefined,0,n);try{i=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var u=s.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function c(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==undefined?i.configurable?(Object.defineProperty(n,r,{value:e}),s.push([n,r,t,i])):o.push([t,r,e]):(n[r]=e,s.push([n,r,t]))}function l(e,t,r,s,o,a,u){var f;if(a+=1,"object"==typeof e&&null!==e){for(f=0;f<s.length;f++)if(s[f]===e)return void c(i,e,t,o);if(void 0!==u.depthLimit&&a>u.depthLimit)return void c(n,e,t,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void c(n,e,t,o);if(s.push(e),Array.isArray(e))for(f=0;f<e.length;f++)l(e[f],f,f,s,e,a,u);else{var d=Object.keys(e);for(f=0;f<d.length;f++){var h=d[f];l(e[h],h,f,s,e,a,u)}}s.pop()}}function f(e,t){return e<t?-1:e>t?1:0}function d(e,t,r,n){void 0===n&&(n=a());var i,u=h(e,"",0,[],undefined,0,n)||e;try{i=0===o.length?JSON.stringify(u,t,r):JSON.stringify(u,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var c=s.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return i}function h(e,t,r,o,a,u,l){var d;if(u+=1,"object"==typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void c(i,e,t,a);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&u>l.depthLimit)return void c(n,e,t,a);if(void 0!==l.edgesLimit&&r+1>l.edgesLimit)return void c(n,e,t,a);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)h(e[d],d,d,o,e,u,l);else{var p={},m=Object.keys(e).sort(f);for(d=0;d<m.length;d++){var g=m[d];h(e[g],g,d,o,e,u,l),p[g]=e[g]}if(void 0===a)return p;s.push([a,t,e]),a[t]=p}o.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var i=o[n];if(i[1]===t&&i[0]===r){r=i[2],o.splice(n,1);break}}return e.call(this,t,r)}}}}},{package:"eth-rpc-errors>fast-safe-stringify",file:"../../node_modules/fast-safe-stringify/index.js"}],[99,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
12549
+ Object.defineProperty(r,"__esModule",{value:!0}),r.randomBytes=r.wrapXOFConstructorWithOpts=r.wrapConstructorWithOpts=r.wrapConstructor=r.checkOpts=r.Hash=r.concatBytes=r.toBytes=r.utf8ToBytes=r.asyncLoop=r.nextTick=r.hexToBytes=r.bytesToHex=r.isLE=r.rotr=r.createView=r.u32=r.u8=void 0;const n=e("@noble/hashes/crypto"),i=e=>e instanceof Uint8Array;r.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);r.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));r.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(r.rotr=(e,t)=>e<<32-t|e>>>t,r.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!r.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));r.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t},r.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),s=Number.parseInt(i,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");r[t]=s}return r};function o(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=o(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}r.nextTick=async()=>{},r.asyncLoop=async function(e,t,n){let i=Date.now();for(let s=0;s<e;s++){n(s);const e=Date.now()-i;e>=0&&e<t||(await(0,r.nextTick)(),i+=e)}},r.utf8ToBytes=o,r.toBytes=a,r.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};r.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;r.checkOpts=function(e,t){if(t!==undefined&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},r.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},r.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},r.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}}}},{package:"@metamask/utils>@noble/hashes",file:"../../node_modules/@noble/hashes/utils.js"}],[106,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){r.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=u(e),o=n[0],a=n[1],c=new s(function(e,t,r){return 3*(t+r)/4-r}(0,o,a)),l=0,d=a>0?o-4:o;for(r=0;r<d;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],o=16383,a=0,u=r-i;a<u;a+=o)s.push(c(e,a,a+o>u?u:a+o));1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],i[o.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,s,o=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63}}},{package:"browserify>buffer>base64-js",file:"../../node_modules/base64-js/index.js"}],[107,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){}}},{package:"browserify>browser-resolve",file:"../../node_modules/browser-resolve/empty.js"}],[108,{"base64-js":106,buffer:108,ieee754:120},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function s(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|f(e,t),n=s(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof e);if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=t===undefined&&r===undefined?new Uint8Array(e):r===undefined?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=o.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(e.length!==undefined)return"number"!=typeof e.length||F(e.length)?s(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, "+"or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),s(e<0?0:0|d(e))}function l(e){for(var t=e.length<0?0:0|d(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+i.toString(16)+" bytes");return 0|e}function f(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. '+"Received type "+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function h(e,t,r){var n=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((r===undefined||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),F(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var s,o=1,a=e.length,u=t.length;if(n!==undefined&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===l?0:s-l)){if(-1===l&&(l=s),s-l+1===u)return l*o}else-1!==l&&(s-=s-l),l=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){for(var d=!0,f=0;f<u;f++)if(c(e,s+f)!==c(t,f)){d=!1;break}if(d)return s}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(F(a))return o;e[r+o]=a}return o}function w(e,t,r,n){return D($(t,e.length-r),e,r,n)}function y(e,t,r,n){return D(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return y(e,t,r,n)}function _(e,t,r,n){return D(B(t),e,r,n)}function S(e,t,r,n){return D(function(e,t){for(var r,n,i,s=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function E(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,o,a,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:128==(192&(s=e[i+1]))&&(u=(31&c)<<6|63&s)>127&&(l=u);break;case 3:s=e[i+1],o=e[i+2],128==(192&s)&&128==(192&o)&&(u=(15&c)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by "+"`buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){return o.isBuffer(this)?this.buffer:undefined}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){return o.isBuffer(this)?this.byteOffset:undefined}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return a(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?s(e):t!==undefined?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},o.allocUnsafe=function(e){return c(e)},o.allocUnsafeSlow=function(e){return c(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(W(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),W(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(t===undefined)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(W(s,Uint8Array)&&(s=o.from(s)),!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},o.byteLength=f,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):h.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,i){if(W(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. '+"Received type "+typeof e);if(t===undefined&&(t=0),r===undefined&&(r=e?e.length:0),n===undefined&&(n=0),i===undefined&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),d=0;d<u;++d)if(c[d]!==l[d]){s=c[d],a=l[d];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(t===undefined)n="utf8",r=this.length,t=0;else if(r===undefined&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,n===undefined&&(n="utf8")):(n=r,r=undefined)}var i=this.length-t;if((r===undefined||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function R(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function x(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=L(e[s]);return i}function M(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function A(e,t,r,i,s){return t=+t,r>>>=0,s||C(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function I(e,t,r,i,s){return t=+t,r>>>=0,s||C(e,0,r,8),n.write(e,t,r,i,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=t===undefined?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||P(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<r&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return A(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return A(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var s=i-1;s>=0;--s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),n!==undefined&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=r===undefined?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var N=/[^+/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){var r;t=t||Infinity;for(var n=e.length,i=null,s=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function F(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"browserify>buffer",file:"../../node_modules/browserify/node_modules/buffer/index.js"}],[109,{"process/browser.js":126,timers:109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},u=0;function c(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r.setImmediate="function"==typeof t?t:function(e){var t=u++,n=!(arguments.length<2)&&o.call(arguments,1);return a[t]=!0,i((function(){a[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))})),t},r.clearImmediate="function"==typeof n?n:function(e){delete a[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)}}},{package:"browserify>timers-browserify",file:"../../node_modules/browserify/node_modules/timers-browserify/main.js"}],[110,{"../../is-buffer/index.js":122},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}).call(this)}).call(this,{isBuffer:e("../../is-buffer/index.js")})}}},{package:"browserify>readable-stream>core-util-is",file:"../../node_modules/core-util-is/lib/util.js"}],[111,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=1e3,i=60*n,s=60*i,o=24*s,a=7*o,u=365.25*o;function c(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*u;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*s;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=o)return c(e,t,o,"day");if(t>=s)return c(e,t,s,"hour");if(t>=i)return c(e,t,i,"minute");if(t>=n)return c(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=o)return Math.round(e/o)+"d";if(t>=s)return Math.round(e/s)+"h";if(t>=i)return Math.round(e/i)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}},{package:"eslint>debug>ms",file:"../../node_modules/debug/node_modules/ms/index.js"}],[112,{"./common":113,_process:126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(n){(function(){r.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),e.splice(i,0,r)},r.save=function(e){try{e?r.storage.setItem("debug",e):r.storage.removeItem("debug")}catch(e){}},r.load=function(){let e;try{e=r.storage.getItem("debug")}catch(e){}!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG);return e},r.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;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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage=function(){try{return localStorage}catch(e){}}(),r.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`."))}})(),r.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"],r.log=console.debug||console.log||(()=>{}),t.exports=e("./common")(r);const{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this)}).call(this,e("_process"))}}},{package:"eslint>debug",file:"../../node_modules/debug/src/browser.js"}],[113,{ms:111},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(t){function r(e){let t,i,s,o=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),s=i-(t||i);n.diff=s,n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,i)=>{if("%%"===t)return"%";o++;const s=r.formatters[i];if("function"==typeof s){const r=e[o];t=s.call(n,r),e.splice(o,1),o--}return t})),r.formatArgs.call(n,e);(n.log||r.log).apply(n,e)}return a.namespace=e,a.useColors=r.useColors(),a.color=r.selectColor(e),a.extend=n,a.destroy=r.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==r.namespaces&&(i=r.namespaces,s=r.enabled(e)),s),set:e=>{o=e}}),"function"==typeof r.init&&r.init(a),a}function n(e,t){const n=r(this.namespace+(void 0===t?":":t)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return r.debug=r,r.default=r,r.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},r.disable=function(){const e=[...r.names.map(i),...r.skips.map(i).map((e=>"-"+e))].join(",");return r.enable(""),e},r.enable=function(e){let t;r.save(e),r.namespaces=e,r.names=[],r.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(t=0;t<i;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?r.skips.push(new RegExp("^"+e.slice(1)+"$")):r.names.push(new RegExp("^"+e+"$")))},r.enabled=function(e){if("*"===e[e.length-1])return!0;let t,n;for(t=0,n=r.skips.length;t<n;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;t<n;t++)if(r.names[t].test(e))return!0;return!1},r.humanize=e("ms"),r.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(t).forEach((e=>{r[e]=t[e]})),r.names=[],r.skips=[],r.formatters={},r.selectColor=function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return r.colors[Math.abs(t)%r.colors.length]},r.enable(r.load()),r}}}},{package:"eslint>debug",file:"../../node_modules/debug/src/common.js"}],[114,{_process:126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){var t=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(r,"__esModule",{value:!0}),r.getNodeVersion=r.detectOS=r.parseUserAgent=r.browserName=r.detect=r.ReactNativeInfo=r.BotInfo=r.SearchBotDeviceInfo=r.NodeInfo=r.BrowserInfo=void 0;var n=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"};r.BrowserInfo=n;var i=function(t){this.version=t,this.type="node",this.name="node",this.os=e.platform};r.NodeInfo=i;var s=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"};r.SearchBotDeviceInfo=s;var o=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null};r.BotInfo=o;var a=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null};r.ReactNativeInfo=a;var u=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,c=3,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],d=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return""!==e&&l.reduce((function(t,r){var n=r[0],i=r[1];if(t)return t;var s=i.exec(e);return!!s&&[n,s]}),!1)}function h(e){var r=f(e);if(!r)return null;var i=r[0],a=r[1];if("searchbot"===i)return new o;var l=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);l?l.length<c&&(l=t(t([],l,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(c-l.length),!0)):l=[];var d=l.join("."),h=p(e),m=u.exec(e);return m&&m[1]?new s(i,d,h,m[1]):new n(i,d,h)}function p(e){for(var t=0,r=d.length;t<r;t++){var n=d[t],i=n[0];if(n[1].exec(e))return i}return null}function m(){return void 0!==e&&e.version?new i(e.version.slice(1)):null}r.detect=function(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new a:"undefined"!=typeof navigator?h(navigator.userAgent):m()},r.browserName=function(e){var t=f(e);return t?t[0]:null},r.parseUserAgent=h,r.detectOS=p,r.getNodeVersion=m}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/providers>detect-browser",file:"../../node_modules/detect-browser/index.js"}],[115,{_process:126,once:124},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("once"),i=function(){},s=function(e,t,o){if("function"==typeof t)return s(e,null,t);t||(t={}),o=n(o||i);var a=e._writableState,u=e._readableState,c=t.readable||!1!==t.readable&&e.readable,l=t.writable||!1!==t.writable&&e.writable,d=!1,f=function(){e.writable||h()},h=function(){l=!1,c||o.call(e)},p=function(){c=!1,l||o.call(e)},m=function(t){o.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){o.call(e,t)},b=function(){r.nextTick(w)},w=function(){if(!d)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:o.call(e,new Error("premature close"))},y=function(){e.req.on("finish",h)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?l&&!a&&(e.on("end",f),e.on("close",f)):(e.on("complete",h),e.on("abort",b),e.req?y():e.on("request",y)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",m),e.on("end",p),e.on("finish",h),!1!==t.error&&e.on("error",g),e.on("close",b),function(){d=!0,e.removeListener("complete",h),e.removeListener("abort",b),e.removeListener("request",y),e.req&&e.req.removeListener("finish",h),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",h),e.removeListener("exit",m),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",b)}};t.exports=s}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/object-multiplex>end-of-stream",file:"../../node_modules/end-of-stream/index.js"}],[116,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&b(e,"error",t,r)}(e,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=undefined,a.prototype._eventsCount=0,a.prototype._maxListeners=undefined;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return e._maxListeners===undefined?a.defaultMaxListeners:e._maxListeners}function d(e,t,r,n){var i,s,o,a;if(c(r),(s=e._events)===undefined?(s=e._events=Object.create(null),e._eventsCount=0):(s.newListener!==undefined&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),o===undefined)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=l(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners "+"added. Use emitter.setMaxListeners() to "+"increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:undefined,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(n===undefined)return[];var i=n[t];return i===undefined?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):g(i,i.length)}function m(e){var t=this._events;if(t!==undefined){var r=t[e];if("function"==typeof r)return 1;if(r!==undefined)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.init=function(){this._events!==undefined&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||undefined},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(i!==undefined)n=n&&i.error===undefined;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[e];if(u===undefined)return!1;if("function"==typeof u)s(u,this,t);else{var c=u.length,l=g(u,c);for(r=0;r<c;++r)s(l[r],this,t)}return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,s,o;if(c(t),(n=this._events)===undefined)return this;if((r=n[e])===undefined)return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),n.removeListener!==undefined&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if((r=this._events)===undefined)return this;if(r.removeListener===undefined)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):r[e]!==undefined&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t!==undefined)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}}},{package:"browserify>events",file:"../../node_modules/events/events.js"}],[117,{buffer:108,stream:188},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0});const n=e("stream");class i extends n.Duplex{constructor(e){super({objectMode:!0}),this._port=e,this._port.onMessage.addListener((e=>this._onMessage(e))),this._port.onDisconnect.addListener((()=>this._onDisconnect())),this._log=()=>null}_onMessage(e){if(t.isBuffer(e)){const r=t.from(e);this._log(r,!1),this.push(r)}else this._log(e,!1),this.push(e)}_onDisconnect(){this.destroy()}_read(){return undefined}_write(e,r,n){try{if(t.isBuffer(e)){const t=e.toJSON();t._isBuffer=!0,this._log(t,!0),this._port.postMessage(t)}else this._log(e,!0),this._port.postMessage(e)}catch(e){return n(new Error("PortDuplexStream - disconnected"))}return n()}_setLogger(e){this._log=e}}r.default=i}).call(this)}).call(this,e("buffer").Buffer)}}},{package:"@metamask/providers>extension-port-stream",file:"../../node_modules/extension-port-stream/dist/index.js"}],[118,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var o=s[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}}}},{package:"eslint>fast-deep-equal",file:"../../node_modules/fast-deep-equal/index.js"}],[119,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=u,u.default=u,u.stable=f,u.stableStringify=f;var n="[...]",i="[Circular]",s=[],o=[];function a(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function u(e,t,r,n){var i;void 0===n&&(n=a()),l(e,"",0,[],undefined,0,n);try{i=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var u=s.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function c(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==undefined?i.configurable?(Object.defineProperty(n,r,{value:e}),s.push([n,r,t,i])):o.push([t,r,e]):(n[r]=e,s.push([n,r,t]))}function l(e,t,r,s,o,a,u){var d;if(a+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void c(i,e,t,o);if(void 0!==u.depthLimit&&a>u.depthLimit)return void c(n,e,t,o);if(void 0!==u.edgesLimit&&r+1>u.edgesLimit)return void c(n,e,t,o);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,s,e,a,u);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var h=f[d];l(e[h],h,d,s,e,a,u)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function f(e,t,r,n){void 0===n&&(n=a());var i,u=h(e,"",0,[],undefined,0,n)||e;try{i=0===o.length?JSON.stringify(u,t,r):JSON.stringify(u,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var c=s.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return i}function h(e,t,r,o,a,u,l){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<o.length;f++)if(o[f]===e)return void c(i,e,t,a);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==l.depthLimit&&u>l.depthLimit)return void c(n,e,t,a);if(void 0!==l.edgesLimit&&r+1>l.edgesLimit)return void c(n,e,t,a);if(o.push(e),Array.isArray(e))for(f=0;f<e.length;f++)h(e[f],f,f,o,e,u,l);else{var p={},m=Object.keys(e).sort(d);for(f=0;f<m.length;f++){var g=m[f];h(e[g],g,f,o,e,u,l),p[g]=e[g]}if(void 0===a)return p;s.push([a,t,e]),a[t]=p}o.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var i=o[n];if(i[1]===t&&i[0]===r){r=i[2],o.splice(n,1);break}}return e.call(this,t,r)}}}}},{package:"@metamask/rpc-errors>fast-safe-stringify",file:"../../node_modules/fast-safe-stringify/index.js"}],[120,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
12550
12550
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
12551
- r.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,s=h&(1<<-l)-1,h>>=-l,l+=a;l>0;s=256*s+e[t+f],f+=d,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=256*o+e[t+f],f+=d,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(h?-1:1)*Infinity;o+=Math.pow(2,n),s-=c}return(h?-1:1)*o*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,f=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(a=0,o=l):o+f>=1?(a=(t*u-1)*Math.pow(2,i),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+h]=255&o,h+=p,o/=256,c-=8);e[r+h-p]|=128*m}}}},{package:"browserify>buffer>ieee754",file:"../../node_modules/ieee754/index.js"}],[100,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js"}],[101,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
12551
+ r.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,s=h&(1<<-l)-1,h>>=-l,l+=a;l>0;s=256*s+e[t+d],d+=f,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=f,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(h?-1:1)*Infinity;o+=Math.pow(2,n),s-=c}return(h?-1:1)*o*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,d=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:s-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(a=0,o=l):o+d>=1?(a=(t*u-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+h]=255&o,h+=p,o/=256,c-=8);e[r+h-p]|=128*m}}}},{package:"browserify>buffer>ieee754",file:"../../node_modules/ieee754/index.js"}],[121,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}},{package:"browserify>inherits",file:"../../node_modules/inherits/inherits_browser.js"}],[122,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
12552
12552
  /*!
12553
12553
  * Determine if an object is a Buffer
12554
12554
  *
12555
12555
  * @author Feross Aboukhadijeh <https://feross.org>
12556
12556
  * @license MIT
12557
12557
  */
12558
- t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}}}},{package:"browserify>insert-module-globals>is-buffer",file:"../../node_modules/is-buffer/index.js"}],[102,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,t.exports=n}}},{package:"@metamask/providers>is-stream",file:"../../node_modules/is-stream/index.js"}],[103,{"@metamask/safe-event-emitter":55,"eth-rpc-errors":93},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcEngine=void 0;const i=n(e("@metamask/safe-event-emitter")),s=e("eth-rpc-errors");class o extends i.default{constructor(){super(),this._middleware=[]}push(e){this._middleware.push(e)}handle(e,t){if(t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}asMiddleware(){return async(e,t,r,n)=>{try{const[i,s,a]=await o._runAllMiddleware(e,t,this._middleware);return s?(await o._runReturnHandlers(a),n(i)):r((async e=>{try{await o._runReturnHandlers(a)}catch(t){return e(t)}return e()}))}catch(e){return n(e)}}}async _handleBatch(e,t){try{const r=await Promise.all(e.map(this._promiseHandle.bind(this)));return t?t(null,r):r}catch(e){if(t)return t(e);throw e}}_promiseHandle(e){return new Promise((t=>{this._handle(e,((e,r)=>{t(r)}))}))}async _handle(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const r=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(r,{id:undefined,jsonrpc:"2.0",error:r})}if("string"!=typeof e.method){const r=new s.EthereumRpcError(s.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=Object.assign({},e),n={id:r.id,jsonrpc:r.jsonrpc};let i=null;try{await this._processRequest(r,n)}catch(e){i=e}return i&&(delete n.result,n.error||(n.error=s.serializeError(i))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await o._runAllMiddleware(e,t,this._middleware);if(o._checkForCompletion(e,t,n),await o._runReturnHandlers(i),r)throw r}static async _runAllMiddleware(e,t,r){const n=[];let i=null,s=!1;for(const a of r)if([i,s]=await o._runMiddleware(e,t,a,n),s)break;return[i,s,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=s.serializeError(r)),i([r,!0])},u=r=>{t.error?o(t.error):(r&&("function"!=typeof r&&o(new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof r}" for request:\n${a(e)}`,{request:e})),n.push(r)),i([null,!1]))};try{r(e,t,u,o)}catch(e){o(e)}}))}static async _runReturnHandlers(e){for(const t of e)await new Promise(((e,r)=>{t((t=>t?r(t):e()))}))}static _checkForCompletion(e,t,r){if(!("result"in t)&&!("error"in t))throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(e)}`,{request:e});if(!r)throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(e)}`,{request:e})}}function a(e){return JSON.stringify(e,null,2)}r.JsonRpcEngine=o}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/JsonRpcEngine.js"}],[104,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createAsyncMiddleware=void 0,r.createAsyncMiddleware=function(e){return async(t,r,n,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,s()})),await o};try{await e(t,r,c),u?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/createAsyncMiddleware.js"}],[105,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createScaffoldMiddleware=void 0,r.createScaffoldMiddleware=function(e){return(t,r,n,i)=>{const s=e[t.method];return s===undefined?n():"function"==typeof s?s(t,r,n,i):(r.result=s,i())}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/createScaffoldMiddleware.js"}],[106,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getUniqueId=void 0;const n=4294967295;let i=Math.floor(Math.random()*n);r.getUniqueId=function(){return i=(i+1)%n,i}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/getUniqueId.js"}],[107,{"./getUniqueId":106},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createIdRemapMiddleware=void 0;const n=e("./getUniqueId");r.createIdRemapMiddleware=function(){return(e,t,r,i)=>{const s=e.id,o=n.getUniqueId();e.id=o,t.id=o,r((r=>{e.id=s,t.id=s,r()}))}}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/idRemapMiddleware.js"}],[108,{"./JsonRpcEngine":103,"./createAsyncMiddleware":104,"./createScaffoldMiddleware":105,"./getUniqueId":106,"./idRemapMiddleware":107,"./mergeMiddleware":109},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){n===undefined&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===undefined&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(e("./idRemapMiddleware"),r),i(e("./createAsyncMiddleware"),r),i(e("./createScaffoldMiddleware"),r),i(e("./getUniqueId"),r),i(e("./JsonRpcEngine"),r),i(e("./mergeMiddleware"),r)}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/index.js"}],[109,{"./JsonRpcEngine":103},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.mergeMiddleware=void 0;const n=e("./JsonRpcEngine");r.mergeMiddleware=function(e){const t=new n.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}}}},{package:"json-rpc-engine",file:"../../node_modules/json-rpc-engine/dist/mergeMiddleware.js"}],[110,{"readable-stream":122},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("readable-stream");r.default=function(e){if(!e||!e.engine)throw new Error("Missing engine parameter!");const{engine:t}=e,r=new n.Duplex({objectMode:!0,read:()=>undefined,write:function(e,n,i){t.handle(e,((e,t)=>{r.push(t)})),i()}});return t.on&&t.on("notification",(e=>{r.push(e)})),r}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createEngineStream.js"}],[111,{"@metamask/safe-event-emitter":55,"readable-stream":122},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});const i=n(e("@metamask/safe-event-emitter")),s=e("readable-stream");r.default=function(e={}){const t={},r=new s.Duplex({objectMode:!0,read:()=>undefined,write:function(r,i,s){let a=null;try{!r.id?function(r){(null==e?void 0:e.retryOnMessage)&&r.method===e.retryOnMessage&&Object.values(t).forEach((({req:e,retryCount:r=0})=>{if(e.id){if(r>=3)throw new Error(`StreamMiddleware - Retry limit exceeded for request id "${e.id}"`);t[e.id].retryCount=r+1,o(e)}}));n.emit("notification",r)}(r):function(e){const r=t[e.id];if(!r)return void console.warn(`StreamMiddleware - Unknown response id "${e.id}"`);delete t[e.id],Object.assign(r.res,e),setTimeout(r.end)}(r)}catch(e){a=e}s(a)}}),n=new i.default;return{events:n,middleware:(e,r,n,i)=>{o(e),t[e.id]={req:e,res:r,next:n,end:i}},stream:r};function o(e){r.push(e)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/createStreamMiddleware.js"}],[112,{"./createEngineStream":110,"./createStreamMiddleware":111},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.createStreamMiddleware=r.createEngineStream=void 0;const i=n(e("./createEngineStream"));r.createEngineStream=i.default;const s=n(e("./createStreamMiddleware"));r.createStreamMiddleware=s.default}}},{package:"@metamask/providers>json-rpc-middleware-stream",file:"../../node_modules/json-rpc-middleware-stream/dist/index.js"}],[113,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>isarray",file:"../../node_modules/json-rpc-middleware-stream/node_modules/isarray/index.js"}],[114,{"./_stream_readable":116,"./_stream_writable":118,"core-util-is":84,inherits:100,"process-nextick-args":126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=f;var s=Object.create(e("core-util-is"));s.inherits=e("inherits");var o=e("./_stream_readable"),a=e("./_stream_writable");s.inherits(f,o);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_duplex.js"}],[115,{"./_stream_transform":117,"core-util-is":84,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=s;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_passthrough.js"}],[116,{"./_stream_duplex":114,"./internal/streams/BufferList":119,"./internal/streams/destroy":120,"./internal/streams/stream":121,_process:127,"core-util-is":84,events:95,inherits:100,isarray:113,"process-nextick-args":126,"safe-buffer":123,"string_decoder/":124,util:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("process-nextick-args");t.exports=w;var i,s=e("isarray");w.ReadableState=b;e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},a=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=global.Uint8Array||function(){};var l=Object.create(e("core-util-is"));l.inherits=e("inherits");var f=e("util"),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var h,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");l.inherits(w,a);var g=["error","close","destroy","pause","resume"];function b(t,r){t=t||{};var n=r instanceof(i=i||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var s=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=s||0===s?s:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function w(t){if(i=i||e("./_stream_duplex"),!(this instanceof w))return new w(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function y(e,t,r,n,i){var s,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,o)):(i||(s=function(e,t){var r;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||t===undefined||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),s?e.emit("error",s):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?v(e,o,t,!1):T(e,o)):v(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function v(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&E(e)),T(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),y(this,e,t,!1,r)},w.prototype.unshift=function(e){return y(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(t){return h||(h=e("string_decoder/").StringDecoder),this._readableState.decoder=new h(t),this._readableState.encoding=t,this};var _=8388608;function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),M(e)}function T(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(j,e,t))}function j(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function x(e){d("readable nexttick read 0"),e.read(0)}function R(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;e-=i.length;for(;r=r.next;){var s=r.data,o=e>s.length?s.length:e;if(o===s.length?i+=s:i+=s.slice(0,e),0===(e-=o)){o===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,o=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,o),0===(e-=o)){o===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function C(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}w.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):E(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function c(t,r){d("onunpipe"),t===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",w),e.removeListener("drain",f),e.removeListener("error",g),e.removeListener("unpipe",c),i.removeListener("end",l),i.removeListener("end",y),i.removeListener("data",m),h=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){d("onend"),e.end()}a.endEmitted?n.nextTick(u):i.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(i);e.on("drain",f);var h=!1;var p=!1;function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==C(a.pipes,e))&&!h&&(d("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,p=!0),i.pause())}function g(t){d("onerror",t),y(),e.removeListener("error",g),0===o(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",w),y()}function w(){d("onfinish"),e.removeListener("close",b),y()}function y(){d("unpipe"),i.unpipe(e)}return i.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",b),e.once("finish",w),e.emit("pipe",i),a.flowing||(d("pipe resume"),i.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,r);return this}var o=C(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},w.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&E(this):n.nextTick(x,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(R,e,t))}(this,e)),this},w.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&i!==undefined)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)this[i]===undefined&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=O}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_readable.js"}],[117,{"./_stream_duplex":114,"core-util-is":84,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=o;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_transform.js"}],[118,{"./_stream_duplex":114,"./internal/streams/destroy":120,"./internal/streams/stream":121,_process:127,"core-util-is":84,inherits:100,"process-nextick-args":126,"safe-buffer":123,timers:83,"util-deprecate":193},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r,n){(function(){var i=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}t.exports=b;var o,a=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?n:i.nextTick;b.WritableState=g;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,d=global.Uint8Array||function(){};var h,p=e("./internal/streams/destroy");function m(){}function g(t,r){o=o||e("./_stream_duplex"),t=t||{};var n=r instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,s=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,s){--t.pendingcb,r?(i.nextTick(s,n),i.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(s(n),e._writableState.errorEmitted=!0,e.emit("error",n),E(e,t))}(e,r,n,t,s);else{var o=_(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||v(e,r),n?a(y,e,r,o,s):y(e,r,o,s)}}(r,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(o=o||e("./_stream_duplex"),!(h.call(b,this)||this instanceof o))return new b(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function w(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function y(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function v(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,w(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(w(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=_(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(b,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===b&&(e&&e._writableState instanceof g)}})):h=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n,s=this._writableState,o=!1,a=!s.objectMode&&(n=e,f.isBuffer(n)||n instanceof d);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof r&&(r=m),s.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var s=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||r===undefined||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),s=!1),s}(this,s,e,r))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,a,n,i,s);return u}(this,s,a,e,t,r)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&e!==undefined&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=p.destroy,b.prototype._undestroy=p.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),e("timers").setImmediate)}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/_stream_writable.js"}],[119,{"safe-buffer":123,util:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,s=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=s,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return s},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js"}],[120,{"process-nextick-args":126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(i,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/destroy.js"}],[121,{events:95},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("events").EventEmitter}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/lib/internal/streams/stream-browser.js"}],[122,{"./lib/_stream_duplex.js":114,"./lib/_stream_passthrough.js":115,"./lib/_stream_readable.js":116,"./lib/_stream_transform.js":117,"./lib/_stream_writable.js":118},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream",file:"../../node_modules/json-rpc-middleware-stream/node_modules/readable-stream/readable-browser.js"}],[123,{buffer:82},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer",file:"../../node_modules/json-rpc-middleware-stream/node_modules/safe-buffer/index.js"}],[124,{"safe-buffer":123},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder",file:"../../node_modules/json-rpc-middleware-stream/node_modules/string_decoder/lib/string_decoder.js"}],[125,{wrappy:194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("wrappy");function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(i),t.exports.strict=n(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))}}},{package:"@metamask/object-multiplex>once",file:"../../node_modules/once/once.js"}],[126,{_process:127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return e.nextTick((function(){t.apply(null,s)}))}}}:t.exports=e}).call(this)}).call(this,e("_process"))}}},{package:"browserify>readable-stream>process-nextick-args",file:"../../node_modules/process-nextick-args/index.js"}],[127,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var c,l=[],f=!1,d=-1;function h(){f&&c&&(f=!1,c.length?l=c.concat(l):d=-1,l.length&&p())}function p(){if(!f){var e=u(h);f=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||f||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=g,s.addListener=g,s.once=g,s.off=g,s.removeListener=g,s.removeAllListeners=g,s.emit=g,s.prependListener=g,s.prependOnceListener=g,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}}}},{package:"browserify>process",file:"../../node_modules/process/browser.js"}],[128,{_process:127,"end-of-stream":89,fs:81,once:125},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=e("once"),i=e("end-of-stream"),s=e("fs"),o=function(){},a=/^v?\.0/.test(r.version),u=function(e){return"function"==typeof e},c=function(e,t,r,c){c=n(c);var l=!1;e.on("close",(function(){l=!0})),i(e,{readable:t,writable:r},(function(e){if(e)return c(e);l=!0,c()}));var f=!1;return function(t){if(!l&&!f)return f=!0,function(e){return!!a&&!!s&&(e instanceof(s.ReadStream||o)||e instanceof(s.WriteStream||o))&&u(e.close)}(e)?e.close(o):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void c(t||new Error("stream was destroyed"))}},l=function(e){e()},f=function(e,t){return e.pipe(t)};t.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||o)&&t.pop()||o;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var n=t.map((function(i,s){var o=s<t.length-1;return c(i,o,s>0,(function(t){e||(e=t),t&&n.forEach(l),o||(n.forEach(l),r(e))}))}));return t.reduce(f)}}).call(this)}).call(this,e("_process"))}}},{package:"@metamask/providers>pump",file:"../../node_modules/pump/index.js"}],[129,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o,a;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(r===undefined||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(s(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(s(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/errors-browser.js"}],[130,{"./_stream_readable":132,"./_stream_writable":134,_process:127,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var i=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(c,i);for(var o=n(s.prototype),a=0;a<o.length;a++){var u=o[a];c.prototype[u]||(c.prototype[u]=s.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_duplex.js"}],[131,{"./_stream_transform":133,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_passthrough.js"}],[132,{"../errors":129,"./_stream_duplex":130,"./internal/streams/async_iterator":135,"./internal/streams/buffer_list":136,"./internal/streams/destroy":137,"./internal/streams/from":139,"./internal/streams/state":141,"./internal/streams/stream":142,_process:127,buffer:82,events:95,inherits:100,"string_decoder/":191,util:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n;t.exports=k,k.ReadableState=E;e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),o=e("buffer").Buffer,a=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,c=e("util");u=c&&c.debuglog?c.debuglog("stream"):function(){};var l,f,d,h=e("./internal/streams/buffer_list"),p=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,b=g.ERR_INVALID_ARG_TYPE,w=g.ERR_STREAM_PUSH_AFTER_EOF,y=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(k,s);var _=p.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,r,i){n=n||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=r instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=e("string_decoder/").StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function k(t){if(n=n||e("./_stream_duplex"),!(this instanceof k))return new k(t);var r=this instanceof n;this._readableState=new E(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function T(e,t,r,n,i){u("readableAddChunk",t);var s,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,c);else if(i||(s=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||t===undefined||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(c,t)),s)_(e,s);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)c.endEmitted?_(e,new v):j(e,c,t,!0);else if(c.ended)_(e,new w);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?j(e,c,t,!1):P(e,c)):j(e,c,t,!1)}else n||(c.reading=!1,P(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function j(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&M(e)),P(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=p.destroy,k.prototype._undestroy=p.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},k.prototype.unshift=function(e){return T(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(t){l||(l=e("string_decoder/").StringDecoder);var r=new l(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var x=1073741824;function R(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(O,e))}function O(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(A,e,t))}function A(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function $(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(D,t,e))}function D(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function F(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}k.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):M(this),null;if(0===(e=R(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=R(r,t))),null===(n=e>0?$(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){_(this,new y("_read()"))},k.prototype.pipe=function(e,t){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,u("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:g;function a(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",a),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",d),f=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){u("onend"),e.end()}s.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,L(e))}}(n);e.on("drain",l);var f=!1;function d(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==F(s.pipes,e))&&!f&&(u("false write response, pause",s.awaitDrain),s.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&_(e,t)}function p(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),s.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=F(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?M(this):i.reading||r.nextTick(I,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(C,this),n},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&e!==undefined||r.nextTick(C,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&i!==undefined)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)this[i]===undefined&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<S.length;s++)e.on(S[s],this.emit.bind(this,S[s]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return f===undefined&&(f=e("./internal/streams/async_iterator")),f(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=$,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,r){return d===undefined&&(d=e("./internal/streams/from")),d(k,t,r)})}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_readable.js"}],[133,{"../errors":129,"./_stream_duplex":130,inherits:100},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=l;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(t,r){d(e,t,r)}))}function d(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_transform.js"}],[134,{"../errors":129,"./_stream_duplex":130,"./internal/streams/destroy":137,"./internal/streams/state":141,"./internal/streams/stream":142,_process:127,buffer:82,inherits:100,"util-deprecate":193},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=k,k.WritableState=E;var s={deprecate:e("util-deprecate")},o=e("./internal/streams/stream"),a=e("buffer").Buffer,u=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,l=e("./internal/streams/destroy"),f=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,h=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,w=d.ERR_STREAM_NULL_VALUES,y=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function S(){}function E(t,s,o){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=s instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,s=n.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,s){--t.pendingcb,n?(r.nextTick(s,i),r.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,i)):(s(i),e._writableState.errorEmitted=!0,_(e,i),O(e,t))}(e,n,i,t,s);else{var o=R(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||x(e,n),i?r.nextTick(j,e,n,o,s):j(e,n,o,s)}}(s,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function k(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!c.call(k,this))return new k(t);this._writableState=new E(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function T(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function j(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)s[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;s.allBuffers=u,T(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=R(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}e("inherits")(k,o),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===k&&(e&&e._writableState instanceof E)}})):c=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new g)},k.prototype.write=function(e,t,n){var i,s=this._writableState,o=!1,c=!s.objectMode&&(i=e,a.isBuffer(i)||i instanceof u);return c&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=S),s.ending?function(e,t){var n=new y;_(e,n),r.nextTick(t,n)}(this,n):(c||function(e,t,n,i){var s;return null===n?s=new w:"string"==typeof n||t.objectMode||(s=new h("chunk",["string","Buffer"],n)),!s||(_(e,s),r.nextTick(i,s),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var u=t.objectMode?1:n.length;t.length+=u;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,u,n,i,s);return c}(this,s,c,e,t,n)),o},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&e!==undefined&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=l.destroy,k.prototype._undestroy=l.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_writable.js"}],[135,{"./end-of-stream":138,_process:127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[d].read();null!==r&&(e[l]=null,e[o]=null,e[a]=null,t(h(r,!1)))}}function m(e){r.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(n={get stream(){return this[d]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(undefined,!0));if(this[d].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[u]?n(e[u]):t(h(undefined,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(h(undefined,!0)):t[f](r,n)}),n)}}(i,this));else{var s=this[d].read();if(null!==s)return Promise.resolve(h(s,!1));n=new Promise(this[f])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(h(undefined,!0))}))}))})),n),g);t.exports=function(e){var t,r=Object.create(b,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[d].read();n?(r[l]=null,r[o]=null,r[a]=null,e(h(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[l]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[o]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[a]=null,n(h(undefined,!0))),r[c]=!0})),e.on("readable",m.bind(null,r)),r}}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"}],[136,{buffer:82,util:81},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var u=e("buffer").Buffer,c=e("util").inspect,l=c&&c.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,u.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"}],[137,{_process:127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var o=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!s&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):s?(e.nextTick(n,o),s(t)):e.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/destroy.js"}],[138,{"../../../errors":129},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){a=!1,c=!0,o||s.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,f=!0,a||s.call(t)},h=function(e){s.call(t,e)},p=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},m=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",d),t.on("finish",l),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"}],[139,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/from-browser.js"}],[140,{"../../../errors":129,"./end-of-stream":138},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;var i=e("../../../errors").codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new s("streams");var d=r.map((function(t,i){var s=i<r.length-1;return function(t,r,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),n===undefined&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,i>0,(function(e){l||(l=e),e&&d.forEach(u),s||(d.forEach(u),f(l))}))}));return r.reduce(c)}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"}],[141,{"../../../errors":129},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/state.js"}],[142,{events:95},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("events").EventEmitter}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/stream-browser.js"}],[143,{"./lib/_stream_duplex.js":130,"./lib/_stream_passthrough.js":131,"./lib/_stream_readable.js":132,"./lib/_stream_transform.js":133,"./lib/_stream_writable.js":134,"./lib/internal/streams/end-of-stream.js":138,"./lib/internal/streams/pipeline.js":140},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/readable-browser.js"}],[144,{buffer:82},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
12558
+ t.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}}}},{package:"browserify>insert-module-globals>is-buffer",file:"../../node_modules/is-buffer/index.js"}],[123,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;n.writable=e=>n(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,n.readable=e=>n(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,n.duplex=e=>n.writable(e)&&n.readable(e),n.transform=e=>n.duplex(e)&&"function"==typeof e._transform&&"object"==typeof e._transformState,t.exports=n}}},{package:"@metamask/providers>is-stream",file:"../../node_modules/is-stream/index.js"}],[124,{wrappy:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("wrappy");function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}t.exports=n(i),t.exports.strict=n(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))}}},{package:"@metamask/object-multiplex>once",file:"../../node_modules/once/once.js"}],[125,{_process:126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,o,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(s=new Array(a-1),o=0;o<s.length;)s[o++]=arguments[o];return e.nextTick((function(){t.apply(null,s)}))}}}:t.exports=e}).call(this)}).call(this,e("_process"))}}},{package:"browserify>readable-stream>process-nextick-args",file:"../../node_modules/process-nextick-args/index.js"}],[126,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}}();var c,l=[],d=!1,f=-1;function h(){d&&c&&(d=!1,c.length?l=c.concat(l):f=-1,l.length&&p())}function p(){if(!d){var e=u(h);d=!0;for(var t=l.length;t;){for(c=l,l=[];++f<t;)c&&c[f].run();f=-1,t=l.length}c=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new m(e,t)),1!==l.length||d||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=g,s.addListener=g,s.once=g,s.off=g,s.removeListener=g,s.removeAllListeners=g,s.emit=g,s.prependListener=g,s.prependOnceListener=g,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}}}},{package:"browserify>process",file:"../../node_modules/process/browser.js"}],[127,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i,o,a;if("string"==typeof t&&(i="not ",t.substr(!o||o<0?0:+o,i.length)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(r===undefined||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(n," ").concat(s(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(u," ").concat(n," ").concat(s(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/errors-browser.js"}],[128,{"./_stream_readable":130,"./_stream_writable":132,_process:126,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=c;var i=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(c,i);for(var o=n(s.prototype),a=0;a<o.length;a++){var u=o[a];c.prototype[u]||(c.prototype[u]=s.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||r.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_duplex.js"}],[129,{"./_stream_transform":131,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_passthrough.js"}],[130,{"../errors":127,"./_stream_duplex":128,"./internal/streams/async_iterator":133,"./internal/streams/buffer_list":134,"./internal/streams/destroy":135,"./internal/streams/from":137,"./internal/streams/state":139,"./internal/streams/stream":140,_process:126,buffer:108,events:116,inherits:121,"string_decoder/":189,util:107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n;t.exports=k,k.ReadableState=E;e("events").EventEmitter;var i=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),o=e("buffer").Buffer,a=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,c=e("util");u=c&&c.debuglog?c.debuglog("stream"):function(){};var l,d,f,h=e("./internal/streams/buffer_list"),p=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,b=g.ERR_INVALID_ARG_TYPE,w=g.ERR_STREAM_PUSH_AFTER_EOF,y=g.ERR_METHOD_NOT_IMPLEMENTED,v=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(k,s);var _=p.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,r,i){n=n||e("./_stream_duplex"),t=t||{},"boolean"!=typeof i&&(i=r instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=e("string_decoder/").StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function k(t){if(n=n||e("./_stream_duplex"),!(this instanceof k))return new k(t);var r=this instanceof n;this._readableState=new E(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function T(e,t,r,n,i){u("readableAddChunk",t);var s,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}(e,c);else if(i||(s=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||t===undefined||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(c,t)),s)_(e,s);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)c.endEmitted?_(e,new v):R(e,c,t,!0);else if(c.ended)_(e,new w);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?R(e,c,t,!1):P(e,c)):R(e,c,t,!1)}else n||(c.reading=!1,P(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function R(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&M(e)),P(e,t)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=p.destroy,k.prototype._undestroy=p.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),T(this,e,t,!1,r)},k.prototype.unshift=function(e){return T(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(t){l||(l=e("string_decoder/").StringDecoder);var r=new l(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var j=1073741824;function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function M(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(O,e))}function O(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function A(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function I(e){u("readable nexttick read 0"),e.read(0)}function N(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function $(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function B(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(D,t,e))}function D(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function W(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}k.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&B(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(r,t))),null===(n=e>0?$(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&B(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){_(this,new y("_read()"))},k.prototype.pipe=function(e,t){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,u("pipe count=%d opts=%j",s.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:g;function a(t,r){u("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",a),n.removeListener("end",c),n.removeListener("end",g),n.removeListener("data",f),d=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){u("onend"),e.end()}s.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,L(e))}}(n);e.on("drain",l);var d=!1;function f(t){u("ondata");var r=e.write(t);u("dest.write",r),!1===r&&((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==W(s.pipes,e))&&!d&&(u("false write response, pause",s.awaitDrain),s.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&_(e,t)}function p(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),s.flowing||(u("pipe resume"),n.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=W(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,u("on readable",i.length,i.reading),i.length?M(this):i.reading||r.nextTick(I,this))),n},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(A,this),n},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&e!==undefined||r.nextTick(A,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&i!==undefined)&&((r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause())))})),e)this[i]===undefined&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<S.length;s++)e.on(S[s],this.emit.bind(this,S[s]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return d===undefined&&(d=e("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=$,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,r){return f===undefined&&(f=e("./internal/streams/from")),f(k,t,r)})}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_readable.js"}],[131,{"../errors":127,"./_stream_duplex":128,inherits:121},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=l;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,r){f(e,t,r)}))}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_transform.js"}],[132,{"../errors":127,"./_stream_duplex":128,"./internal/streams/destroy":135,"./internal/streams/state":139,"./internal/streams/stream":140,_process:126,buffer:108,inherits:121,"util-deprecate":191},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;t.exports=k,k.WritableState=E;var s={deprecate:e("util-deprecate")},o=e("./internal/streams/stream"),a=e("buffer").Buffer,u=("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,l=e("./internal/streams/destroy"),d=e("./internal/streams/state").getHighWaterMark,f=e("../errors").codes,h=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,y=f.ERR_STREAM_WRITE_AFTER_END,v=f.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function S(){}function E(t,s,o){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof o&&(o=s instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,s=n.writecb;if("function"!=typeof s)throw new m;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,s){--t.pendingcb,n?(r.nextTick(s,i),r.nextTick(O,e,t),e._writableState.errorEmitted=!0,_(e,i)):(s(i),e._writableState.errorEmitted=!0,_(e,i),O(e,t))}(e,n,i,t,s);else{var o=x(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||j(e,n),i?r.nextTick(R,e,n,o,s):R(e,n,o,s)}}(s,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function k(t){var r=this instanceof(i=i||e("./_stream_duplex"));if(!r&&!c.call(k,this))return new k(t);this._writableState=new E(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),o.call(this)}function T(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function R(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),O(e,t)}function j(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)s[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;s.allBuffers=u,T(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,d=r.callback;if(T(e,t,!1,t.objectMode?1:c.length,c,l,d),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function M(e,t){e._final((function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=x(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(M,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}e("inherits")(k,o),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===k&&(e&&e._writableState instanceof E)}})):c=function(e){return e instanceof this},k.prototype.pipe=function(){_(this,new g)},k.prototype.write=function(e,t,n){var i,s=this._writableState,o=!1,c=!s.objectMode&&(i=e,a.isBuffer(i)||i instanceof u);return c&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=S),s.ending?function(e,t){var n=new y;_(e,n),r.nextTick(t,n)}(this,n):(c||function(e,t,n,i){var s;return null===n?s=new w:"string"==typeof n||t.objectMode||(s=new h("chunk",["string","Buffer"],n)),!s||(_(e,s),r.nextTick(i,s),!1)}(this,s,e,n))&&(s.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var u=t.objectMode?1:n.length;t.length+=u;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else T(e,t,!1,u,n,i,s);return c}(this,s,c,e,t,n)),o},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||j(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&e!==undefined&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=l.destroy,k.prototype._undestroy=l.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/_stream_writable.js"}],[133,{"./end-of-stream":136,_process:126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(r){(function(){var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=e("./end-of-stream"),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[f].read();null!==r&&(e[l]=null,e[o]=null,e[a]=null,t(h(r,!1)))}}function m(e){r.nextTick(p,e)}var g=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(h(undefined,!0));if(this[f].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[u]?n(e[u]):t(h(undefined,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(h(undefined,!0)):t[d](r,n)}),n)}}(i,this));else{var s=this[f].read();if(null!==s)return Promise.resolve(h(s,!1));n=new Promise(this[d])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[f].destroy(null,(function(e){e?r(e):t(h(undefined,!0))}))}))})),n),g);t.exports=function(e){var t,r=Object.create(b,(i(t={},f,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var n=r[f].read();n?(r[l]=null,r[o]=null,r[a]=null,e(h(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[l]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[o]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[a]=null,n(h(undefined,!0))),r[c]=!0})),e.on("readable",m.bind(null,r)),r}}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"}],[134,{buffer:108,util:107},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var u=e("buffer").Buffer,c=e("util").inspect,l=c&&c.custom||"inspect";t.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,u.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"}],[135,{_process:126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var o=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!s&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):s?(e.nextTick(n,o),s(t)):e.nextTick(n,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/destroy.js"}],[136,{"../../../errors":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){a=!1,c=!0,o||s.call(t)},d=t._readableState&&t._readableState.endEmitted,f=function(){o=!1,d=!0,a||s.call(t)},h=function(e){s.call(t,e)},p=function(){var e;return o&&!d?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},m=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",f),t.on("finish",l),!1!==r.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",f),t.removeListener("error",h),t.removeListener("close",p)}}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"}],[137,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/from-browser.js"}],[138,{"../../../errors":127,"./end-of-stream":136},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n;var i=e("../../../errors").codes,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var l,d=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new s("streams");var f=r.map((function(t,i){var s=i<r.length-1;return function(t,r,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;t.on("close",(function(){a=!0})),n===undefined&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new o("pipe"))}}(t,s,i>0,(function(e){l||(l=e),e&&f.forEach(u),s||(f.forEach(u),d(l))}))}));return r.reduce(c)}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/pipeline.js"}],[139,{"../../../errors":127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/state.js"}],[140,{events:116},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=e("events").EventEmitter}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/lib/internal/streams/stream-browser.js"}],[141,{"./lib/_stream_duplex.js":128,"./lib/_stream_passthrough.js":129,"./lib/_stream_readable.js":130,"./lib/_stream_transform.js":131,"./lib/_stream_writable.js":132,"./lib/internal/streams/end-of-stream.js":136,"./lib/internal/streams/pipeline.js":138},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./lib/internal/streams/pipeline.js")}}},{package:"@lavamoat/lavapack>readable-stream",file:"../../node_modules/readable-stream/readable-browser.js"}],[142,{buffer:108},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){
12559
12559
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
12560
- var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"express>safe-buffer",file:"../../node_modules/safe-buffer/index.js"}],[145,{"../functions/cmp":149,"../internal/debug":174,"../internal/parse-options":176,"../internal/re":177,"./range":146,"./semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==undefined?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}t.exports=i;const s=e("../internal/parse-options"),{safeRe:o,t:a}=e("../internal/re"),u=e("../functions/cmp"),c=e("../internal/debug"),l=e("./semver"),f=e("./range")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/comparator.js"}],[146,{"../internal/constants":173,"../internal/debug":174,"../internal/parse-options":176,"../internal/re":177,"./comparator":145,"./semver":147,"lru-cache":178},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n{constructor(e,t){if(t=s(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+":"+e,r=i.get(t);if(r)return r;const n=this.options.loose,s=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,M(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),a("comparator trim",e),e=e.replace(c[l.TILDETRIM],d),a("tilde trim",e),e=e.replace(c[l.CARETTRIM],h),a("caret trim",e);let u=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));n&&(u=u.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[l.COMPARATORLOOSE]))))),a("range list",u);const b=new Map,w=u.map((e=>new o(e,this.options)));for(const e of w){if(g(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const v=[...b.values()];return i.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>w(r,t)&&e.set.some((e=>w(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}t.exports=n;const i=new(e("lru-cache"))({max:1e3}),s=e("../internal/parse-options"),o=e("./comparator"),a=e("../internal/debug"),u=e("./semver"),{safeRe:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:d,caretTrimReplace:h}=e("../internal/re"),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=e("../internal/constants"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},y=(e,t)=>(a("comp",e,t),e=E(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=x(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,i,s)=>{let o;return a("tilde",e,t,r,n,i,s),v(r)?o="":v(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:v(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(a("replaceTilde pr",s),o=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>k(e,t))).join(" "),k=(e,t)=>{a("caret",e,t);const r=t.loose?c[l.CARETLOOSE]:c[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,s,o)=>{let u;return a("caret",e,t,r,i,s,o),v(r)?u="":v(i)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(s)?u="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),u="0"===r?"0"===i?`>=${r}.${i}.${s}-${o} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s}-${o} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===i?`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s} <${+r+1}.0.0-0`),a("caret return",u),u}))},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>j(e,t))).join(" ")),j=(e,t)=>{e=e.trim();const r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,((r,n,i,s,o,u)=>{a("xRange",e,r,n,i,s,o,u);const c=v(i),l=c||v(s),f=l||v(o),d=f;return"="===n&&d&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(l&&(s=0),o=0,">"===n?(n=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",l?i=+i+1:s=+s+1),"<"===n&&(u="-0"),r=`${n+i}.${s}.${o}${u}`):l?r=`>=${i}.0.0${u} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${s}.0${u} <${i}.${+s+1}.0-0`),a("xRange return",r),r}))},x=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),R=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),M=e=>(t,r,n,i,s,o,a,u,c,l,f,d,h)=>`${r=v(n)?"":v(i)?`>=${n}.0.0${e?"-0":""}`:v(s)?`>=${n}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=v(c)?"":v(l)?`<${+c+1}.0.0-0`:v(f)?`<${c}.${+l+1}.0-0`:d?`<=${c}.${l}.${f}-${d}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),O=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/range.js"}],[147,{"../internal/constants":173,"../internal/debug":174,"../internal/identifiers":175,"../internal/parse-options":176,"../internal/re":177},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../internal/debug"),{MAX_LENGTH:i,MAX_SAFE_INTEGER:s}=e("../internal/constants"),{safeRe:o,t:a}=e("../internal/re"),u=e("../internal/parse-options"),{compareIdentifiers:c}=e("../internal/identifiers");class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),r===undefined&&i===undefined)return 0;if(i===undefined)return 1;if(r===undefined)return-1;if(r!==i)return c(r,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),r===undefined&&i===undefined)return 0;if(i===undefined)return 1;if(r===undefined)return-1;if(r!==i)return c(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/semver.js"}],[148,{"./parse":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/clean.js"}],[149,{"./eq":155,"./gt":156,"./gte":157,"./lt":159,"./lte":160,"./neq":163},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./eq"),i=e("./neq"),s=e("./gt"),o=e("./gte"),a=e("./lt"),u=e("./lte");t.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return i(e,r,c);case">":return s(e,r,c);case">=":return o(e,r,c);case"<":return a(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/cmp.js"}],[150,{"../classes/semver":147,"../internal/re":177,"./parse":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("./parse"),{safeRe:s,t:o}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=s[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[o.COERCERTL].lastIndex=-1}else r=e.match(s[o.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/coerce.js"}],[151,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>{const i=new n(e,r),s=new n(t,r);return i.compare(s)||i.compareBuild(s)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-build.js"}],[152,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t)=>n(e,t,!0)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-loose.js"}],[153,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare.js"}],[154,{"./parse.js":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse.js");t.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),s=r.compare(i);if(0===s)return null;const o=s>0,a=o?r:i,u=o?i:r,c=!!a.prerelease.length;if(!!u.prerelease.length&&!c)return u.patch||u.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/diff.js"}],[155,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0===n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/eq.js"}],[156,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gt.js"}],[157,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gte.js"}],[158,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=undefined);try{return new n(e instanceof n?e.version:e,r).inc(t,i,s).version}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/inc.js"}],[159,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lt.js"}],[160,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lte.js"}],[161,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).major}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/major.js"}],[162,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).minor}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/minor.js"}],[163,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0!==n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/neq.js"}],[164,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/parse.js"}],[165,{"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).patch}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/patch.js"}],[166,{"./parse":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/prerelease.js"}],[167,{"./compare":153},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(t,e,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rcompare.js"}],[168,{"./compare-build":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rsort.js"}],[169,{"../classes/range":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/satisfies.js"}],[170,{"./compare-build":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/sort.js"}],[171,{"./parse":164},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/valid.js"}],[172,{"./classes/comparator":145,"./classes/range":146,"./classes/semver":147,"./functions/clean":148,"./functions/cmp":149,"./functions/coerce":150,"./functions/compare":153,"./functions/compare-build":151,"./functions/compare-loose":152,"./functions/diff":154,"./functions/eq":155,"./functions/gt":156,"./functions/gte":157,"./functions/inc":158,"./functions/lt":159,"./functions/lte":160,"./functions/major":161,"./functions/minor":162,"./functions/neq":163,"./functions/parse":164,"./functions/patch":165,"./functions/prerelease":166,"./functions/rcompare":167,"./functions/rsort":168,"./functions/satisfies":169,"./functions/sort":170,"./functions/valid":171,"./internal/constants":173,"./internal/identifiers":175,"./internal/re":177,"./ranges/gtr":179,"./ranges/intersects":180,"./ranges/ltr":181,"./ranges/max-satisfying":182,"./ranges/min-satisfying":183,"./ranges/min-version":184,"./ranges/outside":185,"./ranges/simplify":186,"./ranges/subset":187,"./ranges/to-comparators":188,"./ranges/valid":189},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./internal/re"),i=e("./internal/constants"),s=e("./classes/semver"),o=e("./internal/identifiers"),a=e("./functions/parse"),u=e("./functions/valid"),c=e("./functions/clean"),l=e("./functions/inc"),f=e("./functions/diff"),d=e("./functions/major"),h=e("./functions/minor"),p=e("./functions/patch"),m=e("./functions/prerelease"),g=e("./functions/compare"),b=e("./functions/rcompare"),w=e("./functions/compare-loose"),y=e("./functions/compare-build"),v=e("./functions/sort"),_=e("./functions/rsort"),S=e("./functions/gt"),E=e("./functions/lt"),k=e("./functions/eq"),T=e("./functions/neq"),j=e("./functions/gte"),x=e("./functions/lte"),R=e("./functions/cmp"),M=e("./functions/coerce"),O=e("./classes/comparator"),P=e("./classes/range"),A=e("./functions/satisfies"),C=e("./ranges/to-comparators"),I=e("./ranges/max-satisfying"),N=e("./ranges/min-satisfying"),L=e("./ranges/min-version"),$=e("./ranges/valid"),B=e("./ranges/outside"),D=e("./ranges/gtr"),F=e("./ranges/ltr"),W=e("./ranges/intersects"),U=e("./ranges/simplify"),q=e("./ranges/subset");t.exports={parse:a,valid:u,clean:c,inc:l,diff:f,major:d,minor:h,patch:p,prerelease:m,compare:g,rcompare:b,compareLoose:w,compareBuild:y,sort:v,rsort:_,gt:S,lt:E,eq:k,neq:T,gte:j,lte:x,cmp:R,coerce:M,Comparator:O,Range:P,satisfies:A,toComparators:C,maxSatisfying:I,minSatisfying:N,minVersion:L,validRange:$,outside:B,gtr:D,ltr:F,intersects:W,simplifyRange:U,subset:q,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/index.js"}],[173,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/constants.js"}],[174,{_process:127},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){const r="object"==typeof e&&e.env&&e.env.NODE_DEBUG&&/\bsemver\b/i.test(e.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=r}).call(this)}).call(this,e("_process"))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/debug.js"}],[175,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[0-9]+$/,i=(e,t)=>{const r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:i,rcompareIdentifiers:(e,t)=>i(t,e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/identifiers.js"}],[176,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Object.freeze({loose:!0}),i=Object.freeze({});t.exports=e=>e?"object"!=typeof e?n:e:i}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/parse-options.js"}],[177,{"./constants":173,"./debug":174},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=e("./constants"),o=e("./debug"),a=(r=t.exports={}).re=[],u=r.safeRe=[],c=r.src=[],l=r.t={};let f=0;const d="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[d,i]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=f++;o(e,i,t),l[e]=i,c[i]=t,a[i]=new RegExp(t,r?"g":undefined),u[i]=new RegExp(n,r?"g":undefined)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/re.js"}],[178,{yallist:196},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("yallist"),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(g(e,t)){if(w(e,n),!e[a])return undefined}else r&&(e[h]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},b=e=>{if(e[s]>e[i])for(let t=e[f].tail;e[s]>e[i]&&null!==t;){const r=t.prev;w(e,t),t=r}},w=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[s]-=r.length,e[d].delete(r.key),e[f].removeNode(t)}};class y{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;g(e,i)&&(w(e,r),e[a]||(i=undefined)),i&&t.call(n,i.value,i.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||Infinity;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,b(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[s]=0,this[f].forEach((e=>{e.length=this[o](e.value,e.key),this[s]+=e.length}))),b(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[c]&&this[f]&&this[f].length&&this[f].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[f]=new n,this[s]=0}dump(){return this[f].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](t,e);if(this[d].has(e)){if(a>this[i])return w(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[c]&&(this[l]||this[c](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[s]+=a-o.length,o.length=a,this.get(e),b(this),!0}const h=new y(e,t,a,n,r);return h.length>this[i]?(this[c]&&this[c](e,t),!1):(this[s]+=h.length,this[f].unshift(h),this[d].set(e,this[f].head),b(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[f].tail;return e?(w(this,e),e.value):null}del(e){w(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>m(this,t,!1)))}}}}},{package:"@swc/cli>semver>lru-cache",file:"../../node_modules/semver/node_modules/lru-cache/index.js"}],[179,{"./outside":185},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,">",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/gtr.js"}],[180,{"../classes/range":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/intersects.js"}],[181,{"./outside":185},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,"<",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/ltr.js"}],[182,{"../classes/range":146,"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/range");t.exports=(e,t,r)=>{let s=null,o=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new n(s,r)))})),s}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/max-satisfying.js"}],[183,{"../classes/range":146,"../classes/semver":147},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/range");t.exports=(e,t,r)=>{let s=null,o=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new n(s,r)))})),s}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-satisfying.js"}],[184,{"../classes/range":146,"../classes/semver":147,"../functions/gt":156},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/range"),s=e("../functions/gt");t.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let o=null;i.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!s(r,o)||(r=o)}return r&&e.test(r)?r:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-version.js"}],[185,{"../classes/comparator":145,"../classes/range":146,"../classes/semver":147,"../functions/gt":156,"../functions/gte":157,"../functions/lt":159,"../functions/lte":160,"../functions/satisfies":169},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/comparator"),{ANY:s}=i,o=e("../classes/range"),a=e("../functions/satisfies"),u=e("../functions/gt"),c=e("../functions/lt"),l=e("../functions/lte"),f=e("../functions/gte");t.exports=(e,t,r,d)=>{let h,p,m,g,b;switch(e=new n(e,d),t=new o(t,d),r){case">":h=u,p=l,m=c,g=">",b=">=";break;case"<":h=c,p=f,m=u,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let o=null,a=null;if(n.forEach((e=>{e.semver===s&&(e=new i(">=0.0.0")),o=o||e,a=a||e,h(e.semver,o.semver,d)?o=e:m(e.semver,a.semver,d)&&(a=e)})),o.operator===g||o.operator===b)return!1;if((!a.operator||a.operator===g)&&p(e,a.semver))return!1;if(a.operator===b&&m(e,a.semver))return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/outside.js"}],[186,{"../functions/compare.js":153,"../functions/satisfies.js":169},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../functions/satisfies.js"),i=e("../functions/compare.js");t.exports=(e,t,r)=>{const s=[];let o=null,a=null;const u=e.sort(((e,t)=>i(e,t,r)));for(const e of u){n(e,t,r)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/simplify.js"}],[187,{"../classes/comparator.js":145,"../classes/range.js":146,"../functions/compare.js":153,"../functions/satisfies.js":169},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range.js"),i=e("../classes/comparator.js"),{ANY:s}=i,o=e("../functions/satisfies.js"),a=e("../functions/compare.js"),u=[new i(">=0.0.0-0")],c=[new i(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?u:c}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=c}const n=new Set;let i,l,h,p,m,g,b;for(const t of e)">"===t.operator||">="===t.operator?i=f(i,t,r):"<"===t.operator||"<="===t.operator?l=d(l,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&l){if(h=a(i.semver,l.semver,r),h>0)return null;if(0===h&&(">="!==i.operator||"<="!==l.operator))return null}for(const e of n){if(i&&!o(e,String(i),r))return null;if(l&&!o(e,String(l),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let w=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,y=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;w&&1===w.prerelease.length&&"<"===l.operator&&0===w.prerelease[0]&&(w=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,i)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(p=f(i,e,r),p===e&&p!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(e),r))return!1;if(l)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),"<"===e.operator||"<="===e.operator){if(m=d(l,e,r),m===e&&m!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),r))return!1;if(!e.operator&&(l||i)&&0!==h)return!1}return!(i&&g&&!l&&0!==h)&&(!(l&&b&&!i&&0!==h)&&(!y&&!w))},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/subset.js"}],[188,{"../classes/range":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/to-comparators.js"}],[189,{"../classes/range":146},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/valid.js"}],[190,{events:95,inherits:100,"readable-stream/lib/_stream_duplex.js":130,"readable-stream/lib/_stream_passthrough.js":131,"readable-stream/lib/_stream_readable.js":132,"readable-stream/lib/_stream_transform.js":133,"readable-stream/lib/_stream_writable.js":134,"readable-stream/lib/internal/streams/end-of-stream.js":138,"readable-stream/lib/internal/streams/pipeline.js":140},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/lib/_stream_readable.js"),i.Writable=e("readable-stream/lib/_stream_writable.js"),i.Duplex=e("readable-stream/lib/_stream_duplex.js"),i.Transform=e("readable-stream/lib/_stream_transform.js"),i.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),i.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),i.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var o=!1;function a(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}}}},{package:"browserify>stream-browserify",file:"../../node_modules/stream-browserify/index.js"}],[191,{"safe-buffer":144},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"browserify>string_decoder",file:"../../node_modules/string_decoder/lib/string_decoder.js"}],[192,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Superstruct={})}(this,(function(e){class t extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...s}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function n(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function i(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function s(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:s,branch:o}=t,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${i(n)}\``}=e;return{value:n,type:a,refinement:u,key:s[s.length-1],path:s,branch:o,...e,message:c}}function*o(e,t,n,i){var o;r(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const r of e){const e=s(r,t,n,i);e&&(yield e)}}function*a(e,t,n={}){const{path:i=[],branch:s=[e],coerce:o=!1,mask:u=!1}=n,c={path:i,branch:s};if(o&&(e=t.coercer(e,c),u&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const r in e)t.schema[r]===undefined&&delete e[r];let l="valid";for(const r of t.validator(e,c))r.explanation=n.message,l="not_valid",yield[r,undefined];for(let[f,d,h]of t.entries(e,c)){const t=a(d,h,{path:f===undefined?i:[...i,f],branch:f===undefined?s:[...s,d],coerce:o,mask:u,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],undefined]):o&&(d=n[1],f===undefined?e=d:e instanceof Map?e.set(f,d):e instanceof Set?e.add(d):r(e)&&(d!==undefined||f in e)&&(e[f]=d))}if("not_valid"!==l)for(const r of t.refiner(e,c))r.explanation=n.message,l="not_refined",yield[r,undefined];"valid"===l&&(yield[undefined,e])}class u{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:s=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(e,t)=>o(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>o(i(e,t),t,this,e):()=>[]}assert(e,t){return c(e,this,t)}create(e,t){return l(e,this,t)}is(e){return d(e,this)}mask(e,t){return f(e,this,t)}validate(e,t={}){return h(e,this,t)}}function c(e,t,r){const n=h(e,t,{message:r});if(n[0])throw n[0]}function l(e,t,r){const n=h(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function f(e,t,r){const n=h(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t){return!h(e,t)[0]}function h(e,r,n={}){const i=a(e,r,n),s=function(e){const{done:t,value:r}=e.next();return t?undefined:r}(i);if(s[0]){return[new t(s[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),undefined]}{const e=s[1];return[undefined,e]}}function p(e,t){return new u({type:e,schema:null,validator:t})}function m(){return p("never",(()=>!1))}function g(e){const t=e?Object.keys(e):[],n=m();return new u({type:"object",schema:e||null,*entries(i){if(e&&r(i)){const r=new Set(Object.keys(i));for(const n of t)r.delete(n),yield[n,i[n],e[n]];for(const e of r)yield[e,i[e],n]}},validator:e=>r(e)||`Expected an object, but received: ${i(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new u({...e,validator:(t,r)=>t===undefined||e.validator(t,r),refiner:(t,r)=>t===undefined||e.refiner(t,r)})}function w(){return p("string",(e=>"string"==typeof e||`Expected a string, but received: ${i(e)}`))}function y(e){const t=Object.keys(e);return new u({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${i(e)}`,coercer:e=>r(e)?{...e}:e})}function v(){return p("unknown",(()=>!0))}function _(e,t,r){return new u({...e,coercer:(n,i)=>d(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function S(e){return e instanceof Map||e instanceof Set?e.size:e.length}function E(e,t,r){return new u({...e,*refiner(n,i){yield*e.refiner(n,i);const s=o(r(n,i),i,e,n);for(const e of s)yield{...e,refinement:t}}})}e.Struct=u,e.StructError=t,e.any=function(){return p("any",(()=>!0))},e.array=function(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${i(e)}`})},e.assert=c,e.assign=function(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?y(n):g(n)},e.bigint=function(){return p("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return p("boolean",(e=>"boolean"==typeof e))},e.coerce=_,e.create=l,e.date=function(){return p("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${i(e)}`))},e.defaulted=function(e,t,r={}){return _(e,v(),(e=>{const i="function"==typeof t?t():t;if(e===undefined)return i;if(!r.strict&&n(e)&&n(i)){const t={...e};let r=!1;for(const e in i)t[e]===undefined&&(t[e]=i[e],r=!0);if(r)return t}return e}))},e.define=p,e.deprecated=function(e,t){return new u({...e,refiner:(t,r)=>t===undefined||e.refiner(t,r),validator:(r,n)=>r===undefined||(t(r,n),e.validator(r,n))})},e.dynamic=function(e){return new u({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return E(e,"empty",(t=>{const r=S(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){const t={},r=e.map((e=>i(e))).join();for(const r of e)t[r]=r;return new u({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${i(t)}`})},e.func=function(){return p("func",(e=>"function"==typeof e||`Expected a function, but received: ${i(e)}`))},e.instance=function(e){return p("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${i(t)}`))},e.integer=function(){return p("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${i(e)}`))},e.intersection=function(e){return new u({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})},e.is=d,e.lazy=function(e){let t;return new u({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},e.literal=function(e){const t=i(e),r=typeof e;return new u({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${i(r)}`})},e.map=function(e,t){return new u({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${i(e)}`})},e.mask=f,e.max=function(e,t,r={}){const{exclusive:n}=r;return E(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){const{exclusive:n}=r;return E(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.never=m,e.nonempty=function(e){return E(e,"nonempty",(t=>S(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new u({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return p("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${i(e)}`))},e.object=g,e.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?y(n):g(n)},e.optional=b,e.partial=function(e){const t=e instanceof u?{...e.schema}:{...e};for(const e in t)t[e]=b(t[e]);return g(t)},e.pattern=function(e,t){return E(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return g(n)},e.record=function(e,t){return new u({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>r(e)||`Expected an object, but received: ${i(e)}`})},e.refine=E,e.regexp=function(){return p("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new u({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${i(e)}`})},e.size=function(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return E(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=r||`${n} with a size ${i} but received one with a size of \`${s}\``}{const{length:s}=e;return t<=s&&s<=r||`${n} with a length ${i} but received one with a length of \`${s}\``}}))},e.string=w,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),p(e,t)},e.trimmed=function(e){return _(e,w(),(e=>e.trim()))},e.tuple=function(e){const t=m();return new u({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${i(e)}`})},e.type=y,e.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new u({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const s=[];for(const t of e){const[...e]=a(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&s.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${i(r)}`,...s]}})},e.unknown=v,e.validate=h}))}}},{package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs"}],[193,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){try{if(!global.localStorage)return!1}catch(e){return!1}var t=global.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}}},{package:"browserify>readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/browser.js"}],[194,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}}}},{package:"@metamask/object-multiplex>once>wrappy",file:"../../node_modules/wrappy/wrappy.js"}],[195,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js"}],[196,{"./iterator.js":195},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function s(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.pop=function(){if(!this.tail)return undefined;var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e},n.prototype.shift=function(){if(!this.head)return undefined;var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;null!==s&&n<e;n++)s=s.next;var o=[];for(n=0;s&&n<t;n++)o.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(n=0;n<r.length;n++)s=i(this,s,r[n]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e("./iterator.js")(n)}catch(e){}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js"}],[197,{"../logging":217,"./../../../snaps-utils/src/index.executionenv":221,"./commands":198,"./endowments":203,"./globalEvents":210,"./sortParams":214,"./utils":215,"./validation":216,"@metamask/providers":47,"@metamask/utils":65,"eth-rpc-errors":93,"json-rpc-engine":108,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseSnapExecutor=void 0;var n=e("@metamask/providers"),i=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),o=e("eth-rpc-errors"),a=e("json-rpc-engine"),u=e("superstruct"),c=e("../logging"),l=e("./commands"),f=e("./endowments"),d=e("./globalEvents"),h=e("./sortParams"),p=e("./utils"),m=e("./validation");function g(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b={code:o.errorCodes.rpc.internal,message:"Execution Environment Error"},w={ping:{struct:m.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:m.ExecuteSnapRequestArgumentsStruct,params:["snapId","sourceCode","endowments"]},terminate:{struct:m.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:m.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};r.BaseSnapExecutor=class{constructor(e,t){g(this,"snapData",void 0),g(this,"commandStream",void 0),g(this,"rpcStream",void 0),g(this,"methods",void 0),g(this,"snapErrorHandler",void 0),g(this,"snapPromiseErrorHandler",void 0),g(this,"lastTeardown",0),this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,i.logError)(e)}))})),this.rpcStream=t,this.methods=(0,l.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),o=null==n?void 0:n.exports[t],{required:a}=i.SNAP_EXPORTS[t];if((0,s.assert)(!a||o!==undefined,`No ${t} handler exported for snap "${e}`),!o)return null;let u=await this.executeInSnapContext(e,(()=>o(r)));u===undefined&&(u=null);try{return(0,s.getSafeJson)(u)}catch(e){throw new TypeError(`Received non-JSON-serializable value: ${e.message.replace(/^Assertion failed: /u,"")}`)}}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,p.constructError)(e),n=(0,o.serializeError)(r,{fallbackError:b,shouldIncludeStack:!1}),i={...t,stack:(null==r?void 0:r.stack)??null};this.notify({method:"UnhandledError",params:{error:{...n,data:i}}})}async onCommandRequest(e){if(!(0,s.isJsonRpcRequest)(e))throw new Error("Command stream received a non-JSON-RPC request.");const{id:t,method:r,params:n}=e;if(!(0,s.hasProperty)(w,r))return void this.respond(t,{error:o.ethErrors.rpc.methodNotFound({data:{method:r}}).serialize()});const i=w[r],a=(0,h.sortParamKeys)(i.params,n),[c]=(0,u.validate)(a,i.struct);if(c)this.respond(t,{error:o.ethErrors.rpc.invalidParams({message:`Invalid parameters for method "${r}": ${c.message}.`,data:{method:r,params:a}}).serialize()});else try{const e=await this.methods[r](...a);this.respond(t,{result:e})}catch(e){this.respond(t,{error:(0,o.serializeError)(e,{fallbackError:b})})}}notify(e){if(!(0,s.isValidJson)(e)||!(0,s.isObject)(e))throw new Error("JSON-RPC notifications must be JSON serializable objects");this.commandStream.write({...e,jsonrpc:"2.0"})}respond(e,t){(0,s.isValidJson)(t)&&(0,s.isObject)(t)?this.commandStream.write({...t,id:e,jsonrpc:"2.0"}):this.commandStream.write({error:(0,o.serializeError)(new Error("JSON-RPC responses must be JSON serializable objects."),{fallbackError:b}),id:e,jsonrpc:"2.0"})}async startSnap(e,t,r){(0,c.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,d.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,d.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapId:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapId:e})};const i=new n.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,a.createIdRemapMiddleware)()]});await i.initialize();const s=this.createSnapGlobal(i),o=this.createEIP1193Provider(i),u={exports:{}};try{const{endowments:n,teardown:i}=(0,f.createEndowments)(s,o,e,r);this.snapData.set(e,{idleTeardown:i,runningEvaluations:new Set,exports:{}}),(0,d.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,d.addEventListener)("error",this.snapErrorHandler);const a=new Compartment({...n,module:u,exports:u.exports});a.globalThis.self=a.globalThis,a.globalThis.global=a.globalThis,a.globalThis.window=a.globalThis,await this.executeInSnapContext(e,(()=>{a.evaluate(t),this.registerSnapExports(e,u)}))}catch(t){throw this.removeSnap(e),new Error(`Error while running snap '${e}': ${t.message}`)}}onTerminate(){this.snapData.forEach((e=>e.runningEvaluations.forEach((e=>e.stop())))),this.snapData.clear()}registerSnapExports(e,t){const r=this.snapData.get(e);r&&(r.exports=i.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r],{validator:s}=i.SNAP_EXPORTS[r];return s(n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async e=>{const r=(0,p.sanitizeRequestArguments)(e);(0,p.assertSnapOutboundRequest)(r),this.notify({method:"OutboundRequest"});try{return await(0,p.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get:(e,t)=>"request"===t?r:undefined});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,p.proxyStreamProvider)(e,(async e=>{const r=(0,p.sanitizeRequestArguments)(e);(0,p.assertEthereumOutboundRequest)(r),this.notify({method:"OutboundRequest"});try{return await(0,p.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(r===undefined)throw new Error(`Tried to execute in context of unknown snap: "${e}".`);let n;const i=new Promise(((t,r)=>n=()=>r(o.ethErrors.rpc.internal(`The snap "${e}" has been terminated during execution.`)))),s={stop:n};try{return r.runningEvaluations.add(s),await Promise.race([t(),i])}finally{r.runningEvaluations.delete(s),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}}}},{package:"$root$",file:"src/common/BaseSnapExecutor.ts"}],[198,{"./../../../snaps-utils/src/index.executionenv":221,"./validation":216,"@metamask/utils":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCommandMethodImplementations=function(e,t,r){return{ping:async()=>Promise.resolve("OK"),terminate:async()=>(r(),Promise.resolve("OK")),executeSnap:async(t,r,n)=>(await e(t,r,n),"OK"),snapRpc:async(e,r,n,i)=>await t(e,r,o(n,r,i))??null}},r.getHandlerArguments=o;var n=e("./../../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils"),s=e("./validation");function o(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,s.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnNameLookup:{(0,s.assertIsOnNameLookupRequestArguments)(r.params);const{chainId:e,domain:t,address:n}=r.params;return t?{chainId:e,domain:t}:{chainId:e,address:n}}case n.HandlerType.OnRpcRequest:return{origin:e,request:r};case n.HandlerType.OnCronjob:case n.HandlerType.OnInstall:case n.HandlerType.OnUpdate:return{request:r};default:return(0,i.assertExhaustive)(t)}}}}},{package:"$root$",file:"src/common/commands.ts"}],[199,{"../globalObject":211,"./console":200,"./crypto":201,"./date":202,"./interval":204,"./math":205,"./network":206,"./textDecoder":207,"./textEncoder":208,"./timeout":209},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),i=h(e("./console")),s=h(e("./crypto")),o=h(e("./date")),a=h(e("./interval")),u=h(e("./math")),c=h(e("./network")),l=h(e("./textDecoder")),f=h(e("./textEncoder")),d=h(e("./timeout"));function h(e){return e&&e.__esModule?e:{default:e}}const p=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob",bind:!0},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa",bind:!0},{endowment:DataView,name:"DataView"},{endowment:Float32Array,name:"Float32Array"},{endowment:Float64Array,name:"Float64Array"},{endowment:Int8Array,name:"Int8Array"},{endowment:Int16Array,name:"Int16Array"},{endowment:Int32Array,name:"Int32Array"},{endowment:Uint8Array,name:"Uint8Array"},{endowment:Uint8ClampedArray,name:"Uint8ClampedArray"},{endowment:Uint16Array,name:"Uint16Array"},{endowment:Uint32Array,name:"Uint32Array"},{endowment:URL,name:"URL"},{endowment:WebAssembly,name:"WebAssembly"}];var m=()=>{const e=[s.default,a.default,u.default,c.default,d.default,l.default,f.default,o.default,i.default];return p.forEach((t=>{const r={names:[t.name],factory:()=>{const e="function"==typeof t.endowment&&t.bind?t.endowment.bind(n.rootRealmGlobal):t.endowment;return{[t.name]:harden(e)}}};e.push(r)})),e};r.default=m}}},{package:"$root$",file:"src/common/endowments/commonEndowmentFactory.ts"}],[200,{"../globalObject":211,"@metamask/utils":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.consoleMethods=r.consoleAttenuatedMethods=void 0;var n=e("@metamask/utils"),i=e("../globalObject");const s=new Set(["log","assert","error","debug","info","warn"]);r.consoleAttenuatedMethods=s;const o=new Set(["debug","error","info","log","warn","dir","dirxml","table","trace","group","groupCollapsed","groupEnd","clear","count","countReset","assert","profile","profileEnd","time","timeLog","timeEnd","timeStamp","context"]);r.consoleMethods=o;const a=["log","error","debug","info","warn"];function u(e,t,...r){const n=`[Snap: ${e}]`;return"string"==typeof t?[`${n} ${t}`,...r]:[n,t,...r]}var c={names:["console"],factory:function({snapId:e}={}){(0,n.assert)(e!==undefined);const t=Object.getOwnPropertyNames(i.rootRealmGlobal.console).reduce(((e,t)=>o.has(t)&&!s.has(t)?{...e,[t]:i.rootRealmGlobal.console[t]}:e),{});return harden({console:{...t,assert:(t,r,...n)=>{i.rootRealmGlobal.console.assert(t,...u(e,r,...n))},...a.reduce(((t,r)=>({...t,[r]:(t,...n)=>{i.rootRealmGlobal.console[r](...u(e,t,...n))}})),{})}})}};r.default=c}}},{package:"$root$",file:"src/common/endowments/console.ts"}],[201,{"../globalObject":211},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.createCrypto=void 0;var n=e("../globalObject");const i=()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:harden(n.rootRealmGlobal.crypto),SubtleCrypto:harden(n.rootRealmGlobal.SubtleCrypto)};const t=e("crypto").webcrypto;return{crypto:harden(t),SubtleCrypto:harden(t.subtle.constructor)}};r.createCrypto=i;var s={names:["crypto","SubtleCrypto"],factory:i};r.default=s}}},{package:"$root$",file:"src/common/endowments/crypto.ts"}],[202,{"../globalObject":211},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");var i={names:["Date"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Date);let t=0;const r=()=>{const e=n.rootRealmGlobal.Date.now(),r=Math.round(e+Math.random());return r>t&&(t=r),t},i=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(i,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(i)}}};r.default=i}}},{package:"$root$",file:"src/common/endowments/date.ts"}],[203,{"../globalObject":211,"./../../../../snaps-utils/src/index.executionenv":221,"./commonEndowmentFactory":199,"@metamask/utils":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createEndowments=function(e,t,r,n=[]){const u={},c=n.reduce((({allEndowments:e,teardowns:n},c)=>{if(a.has(c)){if(!(0,s.hasProperty)(u,c)){const{teardownFunction:e,...t}=a.get(c)({snapId:r});Object.assign(u,t),e&&n.push(e)}e[c]=u[c]}else if("ethereum"===c)e[c]=t;else{if(!(c in o.rootRealmGlobal))throw new Error(`Unknown endowment: "${c}".`);{(0,i.logWarning)(`Access to unhardened global ${c}.`);const t=o.rootRealmGlobal[c];e[c]=t}}return{allEndowments:e,teardowns:n}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:c.allEndowments,teardown:async()=>{await Promise.all(c.teardowns.map((e=>e())))}}};var n,i=e("./../../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),o=e("../globalObject");const a=(0,((n=e("./commonEndowmentFactory"))&&n.__esModule?n:{default:n}).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map)}}},{package:"$root$",file:"src/common/endowments/index.ts"}],[204,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);r!==undefined&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The interval handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),i=setInterval(t,Math.max(10,r??0));return e.set(n,i),n})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=n}}},{package:"$root$",file:"src/common/endowments/interval.ts"}],[205,{"../globalObject":211,"./crypto":201},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),i=e("./crypto");var s={names:["Math"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Math).reduce(((e,t)=>"random"===t?e:{...e,[t]:n.rootRealmGlobal.Math[t]}),{}),{crypto:t}=(0,i.createCrypto)();return harden({Math:{...e,random:()=>t.getRandomValues(new Uint32Array(1))[0]/2**32}})}};r.default=s}}},{package:"$root$",file:"src/common/endowments/math.ts"}],[206,{"../utils":215},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../utils");function i(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function s(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,a(e,t,"get"))}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,a(e,t,"set"),r),r}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,c=new WeakMap;class l{constructor(e,t){i(this,u,{writable:!0,value:void 0}),i(this,c,{writable:!0,value:void 0}),o(this,c,e),o(this,u,t)}get body(){return s(this,c).body}get bodyUsed(){return s(this,c).bodyUsed}get headers(){return s(this,c).headers}get ok(){return s(this,c).ok}get redirected(){return s(this,c).redirected}get status(){return s(this,c).status}get statusText(){return s(this,c).statusText}get type(){return s(this,c).type}get url(){return s(this,c).url}async text(){return(0,n.withTeardown)(s(this,c).text(),this)}async arrayBuffer(){return(0,n.withTeardown)(s(this,c).arrayBuffer(),this)}async blob(){return(0,n.withTeardown)(s(this,c).blob(),this)}clone(){const e=s(this,c).clone();return new l(e,s(this,u))}async formData(){return(0,n.withTeardown)(s(this,c).formData(),this)}async json(){return(0,n.withTeardown)(s(this,c).json(),this)}}var f={names:["fetch","Request","Headers","Response"],factory:()=>{const e=new Set,t={lastTeardown:0},r=new FinalizationRegistry((e=>e()));return{fetch:harden((async(i,s)=>{const o=new AbortController;if(null!==(null==s?void 0:s.signal)&&(null==s?void 0:s.signal)!==undefined){const e=s.signal;e.addEventListener("abort",(()=>{o.abort(e.reason)}),{once:!0})}let a,u;try{const r=fetch(i,{...s,signal:o.signal});u={cancel:async()=>{o.abort();try{await r}catch{}}},e.add(u),a=new l(await(0,n.withTeardown)(r,t),t)}finally{u!==undefined&&e.delete(u)}if(null!==a.body){const t=new WeakRef(a.body),n={cancel:async()=>{try{var e;await(null===(e=t.deref())||void 0===e?void 0:e.cancel())}catch{}}};e.add(n),r.register(a.body,(()=>e.delete(n)))}return harden(a)})),Request:harden(Request),Headers:harden(Headers),Response:harden(Response),teardownFunction:async()=>{t.lastTeardown+=1;const r=[];e.forEach((({cancel:e})=>r.push(e()))),e.clear(),await Promise.all(r)}}}};r.default=f}}},{package:"$root$",file:"src/common/endowments/network.ts"}],[207,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textDecoder.ts"}],[208,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textEncoder.ts"}],[209,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);r!==undefined&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw new Error("The timeout handler must be a function. Received: "+typeof t);harden(t);const n=Object.freeze(Object.create(null)),i=setTimeout((()=>{e.delete(n),t()}),Math.max(10,r??0));return e.set(n,i),n})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=n}}},{package:"$root$",file:"src/common/endowments/timeout.ts"}],[210,{"./globalObject":211},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListener=function(e,t){if("addEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.addEventListener)return n.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"on"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.on)return n.rootRealmGlobal.process.on(e,t);throw new Error("Platform agnostic addEventListener failed")},r.removeEventListener=function(e,t){if("removeEventListener"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.removeEventListener)return n.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(n.rootRealmGlobal.process&&"removeListener"in n.rootRealmGlobal.process&&"function"==typeof n.rootRealmGlobal.process.removeListener)return n.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")};var n=e("./globalObject")}}},{package:"$root$",file:"src/common/globalEvents.ts"}],[211,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rootRealmGlobalName=r.rootRealmGlobal=void 0;var n=function(e){return e.globalThis="globalThis",e.global="global",e.self="self",e.window="window",e}(n||{});let i,s;if("undefined"!=typeof globalThis)i=globalThis,s=n.globalThis;else if("undefined"!=typeof self)i=self,s=n.self;else if("undefined"!=typeof window)i=window,s=n.window;else{if("undefined"==typeof global)throw new Error("Unknown realm type; failed to identify global object.");i=global,s=n.global}const o=i;r.rootRealmGlobal=o;const a=s;r.rootRealmGlobalName=a}}},{package:"$root$",file:"src/common/globalObject.ts"}],[212,{"@metamask/utils":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownEvents=function(){i.forEach(((e,t)=>{for(const r of e)Object.defineProperty(t,r,{value:undefined,configurable:!1,writable:!1})}))};var n=e("@metamask/utils");const i=new Map;(0,n.hasProperty)(globalThis,"UIEvent")&&i.set(UIEvent.prototype,["view"]),(0,n.hasProperty)(globalThis,"MutationEvent")&&i.set(MutationEvent.prototype,["relatedNode"]),(0,n.hasProperty)(globalThis,"MessageEvent")&&i.set(MessageEvent.prototype,["source"]),(0,n.hasProperty)(globalThis,"FocusEvent")&&i.set(FocusEvent.prototype,["relatedTarget"]),(0,n.hasProperty)(globalThis,"MouseEvent")&&i.set(MouseEvent.prototype,["relatedTarget","fromElement","toElement"]),(0,n.hasProperty)(globalThis,"TouchEvent")&&i.set(TouchEvent.prototype,["targetTouches","touches"]),(0,n.hasProperty)(globalThis,"Event")&&i.set(Event.prototype,["target","currentTarget","srcElement","composedPath"])}}},{package:"$root$",file:"src/common/lockdown/lockdown-events.ts"}],[213,{"./../../../../snaps-utils/src/index.executionenv":221},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownMore=function(){try{const e=Reflect.ownKeys((new Compartment).globalThis),t=new Set(["eval","Function"]);new Set([...e]).forEach((e=>{const r=Reflect.getOwnPropertyDescriptor(globalThis,e);r&&(r.configurable&&(!function(e){return"set"in e||"get"in e}(r)?Object.defineProperty(globalThis,e,{configurable:!1,writable:!1}):Object.defineProperty(globalThis,e,{configurable:!1})),t.has(e)&&harden(globalThis[e]))}))}catch(e){throw(0,n.logError)("Protecting intrinsics failed:",e),e}};var n=e("./../../../../snaps-utils/src/index.executionenv")}}},{package:"$root$",file:"src/common/lockdown/lockdown-more.ts"}],[214,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sortParamKeys=void 0;r.sortParamKeys=(e,t)=>{if(!t)return[];if(t instanceof Array)return t;const r=e.reduce(((e,t,r)=>({...e,[t]:r})),{});return Object.entries(t).sort((([e,t],[n,i])=>r[e]-r[n])).map((([e,t])=>t))}}}},{package:"$root$",file:"src/common/sortParams.ts"}],[215,{"../logging":217,"@metamask/utils":65,"eth-rpc-errors":93},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BLOCKED_RPC_METHODS=void 0,r.assertEthereumOutboundRequest=function(e){(0,n.assert)(!String.prototype.startsWith.call(e.method,"snap_"),i.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assert)(!o.includes(e.method),i.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assertStruct)(e,n.JsonStruct,"Provided value is not JSON-RPC compatible")},r.assertSnapOutboundRequest=function(e){(0,n.assert)(String.prototype.startsWith.call(e.method,"wallet_")||String.prototype.startsWith.call(e.method,"snap_"),"The global Snap API only allows RPC methods starting with `wallet_*` and `snap_*`."),(0,n.assert)(!o.includes(e.method),i.ethErrors.rpc.methodNotFound({data:{method:e.method}})),(0,n.assertStruct)(e,n.JsonStruct,"Provided value is not JSON-RPC compatible")},r.constructError=function(e){let t;e instanceof Error?t=e:"string"==typeof e&&(t=new Error(e),delete t.stack);return t},r.proxyStreamProvider=function(e,t){return new Proxy({},{has:(e,t)=>"string"==typeof t&&["request","on","removeListener"].includes(t),get:(r,n)=>"request"===n?t:["on","removeListener"].includes(n)?e[n]:undefined})},r.sanitizeRequestArguments=function(e){const t=JSON.parse(JSON.stringify(e));return(0,n.getSafeJson)(t)},r.withTeardown=async function(e,t){const r=t.lastTeardown;return new Promise(((n,i)=>{e.then((e=>{t.lastTeardown===r?n(e):(0,s.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?i(e):(0,s.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))};var n=e("@metamask/utils"),i=e("eth-rpc-errors"),s=e("../logging");const o=Object.freeze(["wallet_requestSnaps","wallet_requestPermissions","eth_sendRawTransaction","eth_sendTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_registerOnboarding","wallet_scanQRCode"]);r.BLOCKED_RPC_METHODS=o}}},{package:"$root$",file:"src/common/utils.ts"}],[216,{"./../../../snaps-utils/src/index.executionenv":221,"@metamask/utils":65,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TerminateRequestArgumentsStruct=r.SnapRpcRequestArgumentsStruct=r.PingRequestArgumentsStruct=r.OnTransactionRequestArgumentsStruct=r.OnNameLookupRequestArgumentsStruct=r.JsonRpcRequestWithoutIdStruct=r.ExecuteSnapRequestArgumentsStruct=r.EndowmentStruct=void 0,r.assertIsOnNameLookupRequestArguments=function(e){(0,i.assertStruct)(e,w,"Invalid request params")},r.assertIsOnTransactionRequestArguments=function(e){(0,i.assertStruct)(e,p,"Invalid request params")},r.isEndowment=u,r.isEndowmentsArray=function(e){return Array.isArray(e)&&e.every(u)};var n=e("./../../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils"),s=e("superstruct");const o=(0,s.assign)((0,s.omit)(i.JsonRpcRequestStruct,["id"]),(0,s.object)({id:(0,s.optional)(i.JsonRpcIdStruct)}));r.JsonRpcRequestWithoutIdStruct=o;const a=(0,s.string)();function u(e){return(0,s.is)(e,a)}r.EndowmentStruct=a;const c=(0,s.literal)("OK"),l=(0,s.optional)((0,s.union)([(0,s.literal)(undefined),(0,s.array)()]));r.PingRequestArgumentsStruct=l;const f=(0,s.union)([(0,s.literal)(undefined),(0,s.array)()]);r.TerminateRequestArgumentsStruct=f;const d=(0,s.tuple)([(0,s.string)(),(0,s.string)(),(0,s.optional)((0,s.array)(a))]);r.ExecuteSnapRequestArgumentsStruct=d;const h=(0,s.tuple)([(0,s.string)(),(0,s.enums)(Object.values(n.HandlerType)),(0,s.string)(),(0,s.assign)(o,(0,s.object)({params:(0,s.optional)((0,s.record)((0,s.string)(),i.JsonStruct))}))]);r.SnapRpcRequestArgumentsStruct=h;const p=(0,s.object)({transaction:(0,s.record)((0,s.string)(),i.JsonStruct),chainId:n.ChainIdStruct,transactionOrigin:(0,s.nullable)((0,s.string)())});r.OnTransactionRequestArgumentsStruct=p;const m={chainId:n.ChainIdStruct},g=(0,s.object)({...m,address:(0,s.string)()}),b=(0,s.object)({...m,domain:(0,s.string)()}),w=(0,s.union)([g,b]);r.OnNameLookupRequestArgumentsStruct=w;(0,s.assign)(i.JsonRpcSuccessStruct,(0,s.object)({result:c})),i.JsonRpcSuccessStruct}}},{package:"$root$",file:"src/common/validation.ts"}],[217,{"./../../snaps-utils/src/index.executionenv":221,"@metamask/utils":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0;var n=e("./../../snaps-utils/src/index.executionenv");const i=(0,e("@metamask/utils").createModuleLogger)(n.snapsLogger,"snaps-execution-environments");r.log=i}}},{package:"$root$",file:"src/logging.ts"}],[218,{"../../common/BaseSnapExecutor":197,"../../logging":217,"./../../../../snaps-utils/src/index.executionenv":221,"@metamask/object-multiplex":3,"@metamask/post-message-stream":19,stream:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerSnapExecutor=void 0;var n,i=(n=e("@metamask/object-multiplex"))&&n.__esModule?n:{default:n},s=e("@metamask/post-message-stream"),o=e("./../../../../snaps-utils/src/index.executionenv"),a=e("stream"),u=e("../../common/BaseSnapExecutor"),c=e("../../logging");class l extends u.BaseSnapExecutor{static initialize(e=new s.WebWorkerPostMessageStream){(0,c.log)("Worker: Connecting to parent.");const t=new i.default;(0,a.pipeline)(e,t,e,(e=>{e&&(0,o.logError)("Parent stream failure, closing worker.",e),self.close()}));const r=t.createStream(o.SNAP_STREAM_NAMES.COMMAND),n=t.createStream(o.SNAP_STREAM_NAMES.JSON_RPC);return new l(r,n)}}r.WebWorkerSnapExecutor=l}}},{package:"$root$",file:"src/webworker/executor/WebWorkerSnapExecutor.ts"}],[219,{"../../common/lockdown/lockdown-events":212,"../../common/lockdown/lockdown-more":213,"./WebWorkerSnapExecutor":218},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../common/lockdown/lockdown-events"),i=e("../../common/lockdown/lockdown-more"),s=e("./WebWorkerSnapExecutor");(0,i.executeLockdownMore)(),(0,n.executeLockdownEvents)(),s.WebWorkerSnapExecutor.initialize()}}},{package:"$root$",file:"src/webworker/executor/index.ts"}],[220,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SeverityLevel=r.SNAP_EXPORTS=r.HandlerType=void 0;let n=function(e){return e.OnRpcRequest="onRpcRequest",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e}({});r.HandlerType=n;const i={[n.OnRpcRequest]:{type:n.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[n.OnTransaction]:{type:n.OnTransaction,required:!0,validator:e=>"function"==typeof e},[n.OnCronjob]:{type:n.OnCronjob,required:!0,validator:e=>"function"==typeof e},[n.OnNameLookup]:{type:n.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[n.OnInstall]:{type:n.OnInstall,required:!1,validator:e=>"function"==typeof e},[n.OnUpdate]:{type:n.OnUpdate,required:!1,validator:e=>"function"==typeof e}};r.SNAP_EXPORTS=i;let s=function(e){return e.Critical="critical",e}({});r.SeverityLevel=s}}},{package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts"}],[221,{"./handlers":220,"./logging":222,"./namespace":223,"./types":224},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./handlers");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var i=e("./logging");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=e("./namespace");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var o=e("./types");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}))}}},{package:"external:../snaps-utils/src/index.executionenv.ts",file:"../snaps-utils/src/index.executionenv.ts"}],[222,{"@metamask/utils":65},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.logError=function(e,...t){console.error(e,...t)},r.logInfo=function(e,...t){console.log(e,...t)},r.logWarning=function(e,...t){console.warn(e,...t)},r.snapsLogger=void 0;const n=(0,e("@metamask/utils").createProjectLogger)("snaps");r.snapsLogger=n}}},{package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts"}],[223,{superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NamespaceStruct=r.NamespaceIdStruct=r.LimitedString=r.ChainStruct=r.ChainIdStruct=r.CHAIN_ID_REGEX=r.AccountIdStruct=r.AccountIdArrayStruct=r.AccountAddressStruct=r.ACCOUNT_ID_REGEX=r.ACCOUNT_ADDRESS_REGEX=void 0,r.isAccountId=function(e){return(0,n.is)(e,c)},r.isAccountIdArray=function(e){return(0,n.is)(e,l)},r.isChainId=function(e){return(0,n.is)(e,u)},r.isNamespace=function(e){return(0,n.is)(e,h)},r.isNamespaceId=function(e){return(0,n.is)(e,p)},r.parseAccountId=function(e){const t=s.exec(e);if(null==t||!t.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.parseChainId=function(e){const t=i.exec(e);if(null==t||!t.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}};var n=e("superstruct");const i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u;r.CHAIN_ID_REGEX=i;const s=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})):(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;r.ACCOUNT_ID_REGEX=s;const o=/^(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;r.ACCOUNT_ADDRESS_REGEX=o;const a=(0,n.size)((0,n.string)(),1,40);r.LimitedString=a;const u=(0,n.pattern)((0,n.string)(),i);r.ChainIdStruct=u;const c=(0,n.pattern)((0,n.string)(),s);r.AccountIdStruct=c;const l=(0,n.array)(c);r.AccountIdArrayStruct=l;const f=(0,n.pattern)((0,n.string)(),o);r.AccountAddressStruct=f;const d=(0,n.object)({id:u,name:a});r.ChainStruct=d;const h=(0,n.object)({chains:(0,n.array)(d),methods:(0,n.optional)((0,n.array)(a)),events:(0,n.optional)((0,n.array)(a))});r.NamespaceStruct=h;const p=(0,n.pattern)((0,n.string)(),/^[-a-z0-9]{3,8}$/u);r.NamespaceIdStruct=p}}},{package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts"}],[224,{"./handlers":220,"@metamask/utils":65,superstruct:192},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_SNAP_PERMISSION_KEY=r.SnapValidationFailureReason=r.SnapIdPrefixes=r.SNAP_STREAM_NAMES=r.SNAP_EXPORT_NAMES=r.NpmSnapPackageJsonStruct=r.NpmSnapFileNames=r.NameStruct=void 0,r.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,u,`"${o.PackageJson}" is invalid`)},r.isNpmSnapPackageJson=function(e){return(0,i.is)(e,u)},r.isValidUrl=function(e,t={}){return(0,i.is)(e,h(t))},r.uri=void 0;var n=e("@metamask/utils"),i=e("superstruct"),s=e("./handlers");let o=function(e){return e.PackageJson="package.json",e.Manifest="snap.manifest.json",e}({});r.NpmSnapFileNames=o;const a=(0,i.size)((0,i.pattern)((0,i.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214);r.NameStruct=a;const u=(0,i.type)({version:n.VersionStruct,name:a,main:(0,i.optional)((0,i.size)((0,i.string)(),1,Infinity)),repository:(0,i.optional)((0,i.object)({type:(0,i.size)((0,i.string)(),1,Infinity),url:(0,i.size)((0,i.string)(),1,Infinity)}))});r.NpmSnapPackageJsonStruct=u;let c=function(e){return e.npm="npm:",e.local="local:",e}({});r.SnapIdPrefixes=c;let l=function(e){return e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch',e}({});r.SnapValidationFailureReason=l;let f=function(e){return e.JSON_RPC="jsonRpc",e.COMMAND="command",e}({});r.SNAP_STREAM_NAMES=f;const d=Object.values(s.HandlerType);r.SNAP_EXPORT_NAMES=d;const h=(e={})=>(0,i.refine)((0,i.union)([(0,i.string)(),(0,i.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,i.type)(e);return(0,i.assert)(r,n),!0}catch{return`Expected URL, got "${t.toString()}".`}}));r.uri=h;r.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts"}]],[219],{resources:{"@lavamoat/lavapack>readable-stream":{packages:{"browserify>browser-resolve":!0,"browserify>buffer":!0,"browserify>events":!0,"browserify>inherits":!0,"browserify>process":!0,"browserify>readable-stream>util-deprecate":!0,"browserify>string_decoder":!0}},"@metamask/object-multiplex":{globals:{"console.warn":!0},packages:{"@metamask/object-multiplex>end-of-stream":!0,"@metamask/object-multiplex>once":!0,"@metamask/object-multiplex>readable-stream":!0}},"@metamask/object-multiplex>end-of-stream":{packages:{"@metamask/object-multiplex>once":!0,"browserify>process":!0}},"@metamask/object-multiplex>once":{packages:{"@metamask/object-multiplex>once>wrappy":!0}},"@metamask/object-multiplex>readable-stream":{packages:{"@metamask/object-multiplex>readable-stream>isarray":!0,"@metamask/object-multiplex>readable-stream>safe-buffer":!0,"@metamask/object-multiplex>readable-stream>string_decoder":!0,"browserify>browser-resolve":!0,"browserify>events":!0,"browserify>inherits":!0,"browserify>process":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,"browserify>timers-browserify":!0}},"@metamask/object-multiplex>readable-stream>safe-buffer":{packages:{"browserify>buffer":!0}},"@metamask/object-multiplex>readable-stream>string_decoder":{packages:{"@metamask/object-multiplex>readable-stream>safe-buffer":!0}},"@metamask/post-message-stream":{globals:{"MessageEvent.prototype":!0,WorkerGlobalScope:!0,addEventListener:!0,browser:!0,chrome:!0,"location.origin":!0,postMessage:!0,removeEventListener:!0},packages:{"@lavamoat/lavapack>readable-stream":!0,"@metamask/post-message-stream>@metamask/utils":!0}},"@metamask/post-message-stream>@metamask/utils":{globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@swc/cli>semver":!0,"browserify>buffer":!0,"eslint>debug":!0,superstruct:!0}},"@metamask/providers":{globals:{Event:!0,addEventListener:!0,"chrome.runtime.connect":!0,console:!0,dispatchEvent:!0,"document.createElement":!0,"document.readyState":!0,ethereum:"write","location.hostname":!0,removeEventListener:!0,web3:!0},packages:{"@metamask/object-multiplex":!0,"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/providers>detect-browser":!0,"@metamask/providers>extension-port-stream":!0,"@metamask/providers>is-stream":!0,"@metamask/providers>json-rpc-middleware-stream":!0,"@metamask/providers>pump":!0,"eslint>fast-deep-equal":!0,"eth-rpc-errors":!0,"json-rpc-engine":!0}},"@metamask/providers>@metamask/safe-event-emitter":{globals:{setTimeout:!0},packages:{"browserify>events":!0}},"@metamask/providers>detect-browser":{globals:{document:!0,navigator:!0},packages:{"browserify>process":!0}},"@metamask/providers>extension-port-stream":{packages:{"browserify>buffer":!0,"browserify>stream-browserify":!0}},"@metamask/providers>json-rpc-middleware-stream":{globals:{"console.warn":!0,setTimeout:!0},packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream":{packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>isarray":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":!0,"browserify>browser-resolve":!0,"browserify>events":!0,"browserify>inherits":!0,"browserify>process":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,"browserify>timers-browserify":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":{packages:{"browserify>buffer":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":{packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0}},"@metamask/providers>pump":{packages:{"@metamask/object-multiplex>end-of-stream":!0,"@metamask/object-multiplex>once":!0,"browserify>browser-resolve":!0,"browserify>process":!0}},"@metamask/utils":{globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@metamask/utils>@noble/hashes":!0,"@swc/cli>semver":!0,"browserify>buffer":!0,"eslint>debug":!0,superstruct:!0}},"@metamask/utils>@noble/hashes":{globals:{TextEncoder:!0,crypto:!0}},"@swc/cli>semver":{globals:{"console.error":!0},packages:{"@swc/cli>semver>lru-cache":!0,"browserify>process":!0}},"@swc/cli>semver>lru-cache":{packages:{"@swc/cli>semver>lru-cache>yallist":!0}},"browserify>buffer":{globals:{console:!0},packages:{"browserify>buffer>base64-js":!0,"browserify>buffer>ieee754":!0}},"browserify>events":{globals:{console:!0}},"browserify>process":{globals:{clearTimeout:!0,setTimeout:!0}},"browserify>readable-stream>core-util-is":{packages:{"browserify>insert-module-globals>is-buffer":!0}},"browserify>readable-stream>process-nextick-args":{packages:{"browserify>process":!0}},"browserify>readable-stream>util-deprecate":{globals:{"console.trace":!0,"console.warn":!0,localStorage:!0}},"browserify>stream-browserify":{packages:{"@lavamoat/lavapack>readable-stream":!0,"browserify>events":!0,"browserify>inherits":!0}},"browserify>string_decoder":{packages:{"express>safe-buffer":!0}},"browserify>timers-browserify":{globals:{clearInterval:!0,clearTimeout:!0,setInterval:!0,setTimeout:!0},packages:{"browserify>process":!0}},"eslint>debug":{globals:{console:!0,document:!0,localStorage:!0,navigator:!0,process:!0},packages:{"browserify>process":!0,"eslint>debug>ms":!0}},"eth-rpc-errors":{packages:{"eth-rpc-errors>fast-safe-stringify":!0}},"express>safe-buffer":{packages:{"browserify>buffer":!0}},"external:../snaps-utils/src/icon.ts":{builtin:{buffer:!0}},"external:../snaps-utils/src/index.executionenv.ts":{packages:{"external:../snaps-utils/src/handlers.ts":!0,"external:../snaps-utils/src/logging.ts":!0,"external:../snaps-utils/src/namespace.ts":!0,"external:../snaps-utils/src/types.ts":!0}},"external:../snaps-utils/src/logging.ts":{globals:{"console.error":!0,"console.log":!0,"console.warn":!0},packages:{"@metamask/utils":!0}},"external:../snaps-utils/src/namespace.ts":{packages:{superstruct:!0}},"external:../snaps-utils/src/types.ts":{globals:{URL:!0},packages:{"@metamask/utils":!0,"external:../snaps-utils/src/handlers.ts":!0,superstruct:!0}},"json-rpc-engine":{packages:{"eth-rpc-errors":!0,"json-rpc-engine>@metamask/safe-event-emitter":!0}},"json-rpc-engine>@metamask/safe-event-emitter":{globals:{setTimeout:!0},packages:{"browserify>events":!0}},superstruct:{globals:{"console.warn":!0,define:!0}}}});
12560
+ var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return t!==undefined?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}}},{package:"browserify>browser-pack>safe-buffer",file:"../../node_modules/safe-buffer/index.js"}],[143,{"../functions/cmp":147,"../internal/debug":172,"../internal/parse-options":174,"../internal/re":175,"./range":144,"./semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==undefined?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return u(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(u(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(u(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}t.exports=i;const s=e("../internal/parse-options"),{safeRe:o,t:a}=e("../internal/re"),u=e("../functions/cmp"),c=e("../internal/debug"),l=e("./semver"),d=e("./range")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/comparator.js"}],[144,{"../internal/constants":171,"../internal/debug":172,"../internal/parse-options":174,"../internal/re":175,"./comparator":143,"./semver":145,"lru-cache":176},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){class n{constructor(e,t){if(t=s(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!g(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+":"+e,r=i.get(t);if(r)return r;const n=this.options.loose,s=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,M(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],d),a("comparator trim",e),e=e.replace(c[l.TILDETRIM],f),a("tilde trim",e),e=e.replace(c[l.CARETTRIM],h),a("caret trim",e);let u=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>x(e,this.options)));n&&(u=u.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(c[l.COMPARATORLOOSE]))))),a("range list",u);const b=new Map,w=u.map((e=>new o(e,this.options)));for(const e of w){if(g(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const v=[...b.values()];return i.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>w(r,t)&&e.set.some((e=>w(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}t.exports=n;const i=new(e("lru-cache"))({max:1e3}),s=e("../internal/parse-options"),o=e("./comparator"),a=e("../internal/debug"),u=e("./semver"),{safeRe:c,t:l,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:h}=e("../internal/re"),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=e("../internal/constants"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every((e=>i.intersects(e,t))),i=n.pop();return r},y=(e,t)=>(a("comp",e,t),e=E(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=j(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,i,s)=>{let o;return a("tilde",e,t,r,n,i,s),v(r)?o="":v(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:v(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(a("replaceTilde pr",s),o=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",o),o}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>k(e,t))).join(" "),k=(e,t)=>{a("caret",e,t);const r=t.loose?c[l.CARETLOOSE]:c[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,s,o)=>{let u;return a("caret",e,t,r,i,s,o),v(r)?u="":v(i)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:v(s)?u="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(a("replaceCaret pr",o),u="0"===r?"0"===i?`>=${r}.${i}.${s}-${o} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s}-${o} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===i?`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`:`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${s} <${+r+1}.0.0-0`),a("caret return",u),u}))},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>{e=e.trim();const r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,((r,n,i,s,o,u)=>{a("xRange",e,r,n,i,s,o,u);const c=v(i),l=c||v(s),d=l||v(o),f=d;return"="===n&&f&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(s=0),o=0,">"===n?(n=">=",l?(i=+i+1,s=0,o=0):(s=+s+1,o=0)):"<="===n&&(n="<",l?i=+i+1:s=+s+1),"<"===n&&(u="-0"),r=`${n+i}.${s}.${o}${u}`):l?r=`>=${i}.0.0${u} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${s}.0${u} <${i}.${+s+1}.0-0`),a("xRange return",r),r}))},j=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),x=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),M=e=>(t,r,n,i,s,o,a,u,c,l,d,f,h)=>`${r=v(n)?"":v(i)?`>=${n}.0.0${e?"-0":""}`:v(s)?`>=${n}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=v(c)?"":v(l)?`<${+c+1}.0.0-0`:v(d)?`<${c}.${+l+1}.0-0`:f?`<=${c}.${l}.${d}-${f}`:e?`<${c}.${l}.${+d+1}-0`:`<=${u}`}`.trim(),O=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/range.js"}],[145,{"../internal/constants":171,"../internal/debug":172,"../internal/identifiers":173,"../internal/parse-options":174,"../internal/re":175},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../internal/debug"),{MAX_LENGTH:i,MAX_SAFE_INTEGER:s}=e("../internal/constants"),{safeRe:o,t:a}=e("../internal/re"),u=e("../internal/parse-options"),{compareIdentifiers:c}=e("../internal/identifiers");class l{constructor(e,t){if(t=u(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),r===undefined&&i===undefined)return 0;if(i===undefined)return 1;if(r===undefined)return-1;if(r!==i)return c(r,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),r===undefined&&i===undefined)return 0;if(i===undefined)return 1;if(r===undefined)return-1;if(r!==i)return c(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=l}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/classes/semver.js"}],[146,{"./parse":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/clean.js"}],[147,{"./eq":153,"./gt":154,"./gte":155,"./lt":157,"./lte":158,"./neq":161},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./eq"),i=e("./neq"),s=e("./gt"),o=e("./gte"),a=e("./lt"),u=e("./lte");t.exports=(e,t,r,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return i(e,r,c);case">":return s(e,r,c);case">=":return o(e,r,c);case"<":return a(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/cmp.js"}],[148,{"../classes/semver":145,"../internal/re":175,"./parse":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("./parse"),{safeRe:s,t:o}=e("../internal/re");t.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=s[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;s[o.COERCERTL].lastIndex=-1}else r=e.match(s[o.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/coerce.js"}],[149,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>{const i=new n(e,r),s=new n(t,r);return i.compare(s)||i.compareBuild(s)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-build.js"}],[150,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t)=>n(e,t,!0)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare-loose.js"}],[151,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/compare.js"}],[152,{"./parse.js":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse.js");t.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),s=r.compare(i);if(0===s)return null;const o=s>0,a=o?r:i,u=o?i:r,c=!!a.prerelease.length;if(!!u.prerelease.length&&!c)return u.patch||u.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/diff.js"}],[153,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0===n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/eq.js"}],[154,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gt.js"}],[155,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)>=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/gte.js"}],[156,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=undefined);try{return new n(e instanceof n?e.version:e,r).inc(t,i,s).version}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/inc.js"}],[157,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lt.js"}],[158,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(e,t,r)<=0}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/lte.js"}],[159,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).major}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/major.js"}],[160,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).minor}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/minor.js"}],[161,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>0!==n(e,t,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/neq.js"}],[162,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/parse.js"}],[163,{"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver");t.exports=(e,t)=>new n(e,t).patch}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/patch.js"}],[164,{"./parse":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/prerelease.js"}],[165,{"./compare":151},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare");t.exports=(e,t,r)=>n(t,e,r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rcompare.js"}],[166,{"./compare-build":149},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/rsort.js"}],[167,{"../classes/range":144},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/satisfies.js"}],[168,{"./compare-build":149},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./compare-build");t.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/sort.js"}],[169,{"./parse":162},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./parse");t.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/functions/valid.js"}],[170,{"./classes/comparator":143,"./classes/range":144,"./classes/semver":145,"./functions/clean":146,"./functions/cmp":147,"./functions/coerce":148,"./functions/compare":151,"./functions/compare-build":149,"./functions/compare-loose":150,"./functions/diff":152,"./functions/eq":153,"./functions/gt":154,"./functions/gte":155,"./functions/inc":156,"./functions/lt":157,"./functions/lte":158,"./functions/major":159,"./functions/minor":160,"./functions/neq":161,"./functions/parse":162,"./functions/patch":163,"./functions/prerelease":164,"./functions/rcompare":165,"./functions/rsort":166,"./functions/satisfies":167,"./functions/sort":168,"./functions/valid":169,"./internal/constants":171,"./internal/identifiers":173,"./internal/re":175,"./ranges/gtr":177,"./ranges/intersects":178,"./ranges/ltr":179,"./ranges/max-satisfying":180,"./ranges/min-satisfying":181,"./ranges/min-version":182,"./ranges/outside":183,"./ranges/simplify":184,"./ranges/subset":185,"./ranges/to-comparators":186,"./ranges/valid":187},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./internal/re"),i=e("./internal/constants"),s=e("./classes/semver"),o=e("./internal/identifiers"),a=e("./functions/parse"),u=e("./functions/valid"),c=e("./functions/clean"),l=e("./functions/inc"),d=e("./functions/diff"),f=e("./functions/major"),h=e("./functions/minor"),p=e("./functions/patch"),m=e("./functions/prerelease"),g=e("./functions/compare"),b=e("./functions/rcompare"),w=e("./functions/compare-loose"),y=e("./functions/compare-build"),v=e("./functions/sort"),_=e("./functions/rsort"),S=e("./functions/gt"),E=e("./functions/lt"),k=e("./functions/eq"),T=e("./functions/neq"),R=e("./functions/gte"),j=e("./functions/lte"),x=e("./functions/cmp"),M=e("./functions/coerce"),O=e("./classes/comparator"),P=e("./classes/range"),C=e("./functions/satisfies"),A=e("./ranges/to-comparators"),I=e("./ranges/max-satisfying"),N=e("./ranges/min-satisfying"),L=e("./ranges/min-version"),$=e("./ranges/valid"),B=e("./ranges/outside"),D=e("./ranges/gtr"),W=e("./ranges/ltr"),F=e("./ranges/intersects"),U=e("./ranges/simplify"),q=e("./ranges/subset");t.exports={parse:a,valid:u,clean:c,inc:l,diff:d,major:f,minor:h,patch:p,prerelease:m,compare:g,rcompare:b,compareLoose:w,compareBuild:y,sort:v,rsort:_,gt:S,lt:E,eq:k,neq:T,gte:R,lte:j,cmp:x,coerce:M,Comparator:O,Range:P,satisfies:C,toComparators:A,maxSatisfying:I,minSatisfying:N,minVersion:L,validRange:$,outside:B,gtr:D,ltr:W,intersects:F,simplifyRange:U,subset:q,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/index.js"}],[171,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/constants.js"}],[172,{_process:126},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){(function(e){(function(){const r="object"==typeof e&&e.env&&e.env.NODE_DEBUG&&/\bsemver\b/i.test(e.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};t.exports=r}).call(this)}).call(this,e("_process"))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/debug.js"}],[173,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=/^[0-9]+$/,i=(e,t)=>{const r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:i,rcompareIdentifiers:(e,t)=>i(t,e)}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/identifiers.js"}],[174,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=Object.freeze({loose:!0}),i=Object.freeze({});t.exports=e=>e?"object"!=typeof e?n:e:i}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/parse-options.js"}],[175,{"./constants":171,"./debug":172},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=e("./constants"),o=e("./debug"),a=(r=t.exports={}).re=[],u=r.safeRe=[],c=r.src=[],l=r.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[f,i]],p=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=d++;o(e,i,t),l[e]=i,c[i]=t,a[i]=new RegExp(t,r?"g":undefined),u[i]=new RegExp(n,r?"g":undefined)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${f}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/internal/re.js"}],[176,{yallist:194},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("yallist"),i=Symbol("max"),s=Symbol("length"),o=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),d=Symbol("lruList"),f=Symbol("cache"),h=Symbol("updateAgeOnGet"),p=()=>1;const m=(e,t,r)=>{const n=e[f].get(t);if(n){const t=n.value;if(g(e,t)){if(w(e,n),!e[a])return undefined}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[u])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[u]&&r>e[u]},b=e=>{if(e[s]>e[i])for(let t=e[d].tail;e[s]>e[i]&&null!==t;){const r=t.prev;w(e,t),t=r}},w=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[s]-=r.length,e[f].delete(r.key),e[d].removeNode(t)}};class y{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const v=(e,t,r,n)=>{let i=r.value;g(e,i)&&(w(e,r),e[a]||(i=undefined)),i&&t.call(n,i.value,i.key,e)};t.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||Infinity;const t=e.length||p;if(this[o]="function"!=typeof t?p:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[u]=e.maxAge||0,this[c]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity,b(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[u]=e,b(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[o]&&(this[o]=e,this[s]=0,this[d].forEach((e=>{e.length=this[o](e.value,e.key),this[s]+=e.length}))),b(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;v(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;v(this,e,r,t),r=n}}keys(){return this[d].toArray().map((e=>e.key))}values(){return this[d].toArray().map((e=>e.value))}reset(){this[c]&&this[d]&&this[d].length&&this[d].forEach((e=>this[c](e.key,e.value))),this[f]=new Map,this[d]=new n,this[s]=0}dump(){return this[d].map((e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[u])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[o](t,e);if(this[f].has(e)){if(a>this[i])return w(this,this[f].get(e)),!1;const o=this[f].get(e).value;return this[c]&&(this[l]||this[c](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[s]+=a-o.length,o.length=a,this.get(e),b(this),!0}const h=new y(e,t,a,n,r);return h.length>this[i]?(this[c]&&this[c](e,t),!1):(this[s]+=h.length,this[d].unshift(h),this[f].set(e,this[d].head),b(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!g(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[d].tail;return e?(w(this,e),e.value):null}del(e){w(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[f].forEach(((e,t)=>m(this,t,!1)))}}}}},{package:"@swc/cli>semver>lru-cache",file:"../../node_modules/semver/node_modules/lru-cache/index.js"}],[177,{"./outside":183},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,">",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/gtr.js"}],[178,{"../classes/range":144},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/intersects.js"}],[179,{"./outside":183},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("./outside");t.exports=(e,t,r)=>n(e,t,"<",r)}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/ltr.js"}],[180,{"../classes/range":144,"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/range");t.exports=(e,t,r)=>{let s=null,o=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==o.compare(e)||(s=e,o=new n(s,r)))})),s}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/max-satisfying.js"}],[181,{"../classes/range":144,"../classes/semver":145},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/range");t.exports=(e,t,r)=>{let s=null,o=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==o.compare(e)||(s=e,o=new n(s,r)))})),s}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-satisfying.js"}],[182,{"../classes/range":144,"../classes/semver":145,"../functions/gt":154},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/range"),s=e("../functions/gt");t.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let o=null;i.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!s(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||r&&!s(r,o)||(r=o)}return r&&e.test(r)?r:null}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/min-version.js"}],[183,{"../classes/comparator":143,"../classes/range":144,"../classes/semver":145,"../functions/gt":154,"../functions/gte":155,"../functions/lt":157,"../functions/lte":158,"../functions/satisfies":167},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/semver"),i=e("../classes/comparator"),{ANY:s}=i,o=e("../classes/range"),a=e("../functions/satisfies"),u=e("../functions/gt"),c=e("../functions/lt"),l=e("../functions/lte"),d=e("../functions/gte");t.exports=(e,t,r,f)=>{let h,p,m,g,b;switch(e=new n(e,f),t=new o(t,f),r){case">":h=u,p=l,m=c,g=">",b=">=";break;case"<":h=c,p=d,m=u,g="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let o=null,a=null;if(n.forEach((e=>{e.semver===s&&(e=new i(">=0.0.0")),o=o||e,a=a||e,h(e.semver,o.semver,f)?o=e:m(e.semver,a.semver,f)&&(a=e)})),o.operator===g||o.operator===b)return!1;if((!a.operator||a.operator===g)&&p(e,a.semver))return!1;if(a.operator===b&&m(e,a.semver))return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/outside.js"}],[184,{"../functions/compare.js":151,"../functions/satisfies.js":167},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../functions/satisfies.js"),i=e("../functions/compare.js");t.exports=(e,t,r)=>{const s=[];let o=null,a=null;const u=e.sort(((e,t)=>i(e,t,r)));for(const e of u){n(e,t,r)?(a=e,o||(o=e)):(a&&s.push([o,a]),a=null,o=null)}o&&s.push([o,null]);const c=[];for(const[e,t]of s)e===t?c.push(e):t||e!==u[0]?t?e===u[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const l=c.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/simplify.js"}],[185,{"../classes/comparator.js":143,"../classes/range.js":144,"../functions/compare.js":151,"../functions/satisfies.js":167},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range.js"),i=e("../classes/comparator.js"),{ANY:s}=i,o=e("../functions/satisfies.js"),a=e("../functions/compare.js"),u=[new i(">=0.0.0-0")],c=[new i(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?u:c}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=c}const n=new Set;let i,l,h,p,m,g,b;for(const t of e)">"===t.operator||">="===t.operator?i=d(i,t,r):"<"===t.operator||"<="===t.operator?l=f(l,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&l){if(h=a(i.semver,l.semver,r),h>0)return null;if(0===h&&(">="!==i.operator||"<="!==l.operator))return null}for(const e of n){if(i&&!o(e,String(i),r))return null;if(l&&!o(e,String(l),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let w=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,y=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;w&&1===w.prerelease.length&&"<"===l.operator&&0===w.prerelease[0]&&(w=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,i)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),">"===e.operator||">="===e.operator){if(p=d(i,e,r),p===e&&p!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(e),r))return!1;if(l)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),"<"===e.operator||"<="===e.operator){if(m=f(l,e,r),m===e&&m!==l)return!1}else if("<="===l.operator&&!o(l.semver,String(e),r))return!1;if(!e.operator&&(l||i)&&0!==h)return!1}return!(i&&g&&!l&&0!==h)&&(!(l&&b&&!i&&0!==h)&&(!y&&!w))},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};t.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/subset.js"}],[186,{"../classes/range":144},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/to-comparators.js"}],[187,{"../classes/range":144},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){const n=e("../classes/range");t.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}}}},{package:"@swc/cli>semver",file:"../../node_modules/semver/ranges/valid.js"}],[188,{events:116,inherits:121,"readable-stream/lib/_stream_duplex.js":128,"readable-stream/lib/_stream_passthrough.js":129,"readable-stream/lib/_stream_readable.js":130,"readable-stream/lib/_stream_transform.js":131,"readable-stream/lib/_stream_writable.js":132,"readable-stream/lib/internal/streams/end-of-stream.js":136,"readable-stream/lib/internal/streams/pipeline.js":138},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/lib/_stream_readable.js"),i.Writable=e("readable-stream/lib/_stream_writable.js"),i.Duplex=e("readable-stream/lib/_stream_duplex.js"),i.Transform=e("readable-stream/lib/_stream_transform.js"),i.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),i.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),i.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var o=!1;function a(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",s),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}}}},{package:"browserify>stream-browserify",file:"../../node_modules/stream-browserify/index.js"}],[189,{"safe-buffer":142},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return r!==undefined?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}},{package:"browserify>string_decoder",file:"../../node_modules/string_decoder/lib/string_decoder.js"}],[190,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){!function(e,n){"object"==typeof r&&void 0!==t?n(r):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Superstruct={})}(this,(function(e){class t extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...s}=e,{path:o}=e,a=0===o.length?n:`At path: ${o.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function r(e){return"object"==typeof e&&null!=e}function n(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function i(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function s(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:s,branch:o}=t,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${i(n)}\``}=e;return{value:n,type:a,refinement:u,key:s[s.length-1],path:s,branch:o,...e,message:c}}function*o(e,t,n,i){var o;r(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const r of e){const e=s(r,t,n,i);e&&(yield e)}}function*a(e,t,n={}){const{path:i=[],branch:s=[e],coerce:o=!1,mask:u=!1}=n,c={path:i,branch:s};if(o&&(e=t.coercer(e,c),u&&"type"!==t.type&&r(t.schema)&&r(e)&&!Array.isArray(e)))for(const r in e)t.schema[r]===undefined&&delete e[r];let l="valid";for(const r of t.validator(e,c))r.explanation=n.message,l="not_valid",yield[r,undefined];for(let[d,f,h]of t.entries(e,c)){const t=a(f,h,{path:d===undefined?i:[...i,d],branch:d===undefined?s:[...s,f],coerce:o,mask:u,message:n.message});for(const n of t)n[0]?(l=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],undefined]):o&&(f=n[1],d===undefined?e=f:e instanceof Map?e.set(d,f):e instanceof Set?e.add(f):r(e)&&(f!==undefined||d in e)&&(e[d]=f))}if("not_valid"!==l)for(const r of t.refiner(e,c))r.explanation=n.message,l="not_refined",yield[r,undefined];"valid"===l&&(yield[undefined,e])}class u{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:s=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(e,t)=>o(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>o(i(e,t),t,this,e):()=>[]}assert(e,t){return c(e,this,t)}create(e,t){return l(e,this,t)}is(e){return f(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return h(e,this,t)}}function c(e,t,r){const n=h(e,t,{message:r});if(n[0])throw n[0]}function l(e,t,r){const n=h(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=h(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function f(e,t){return!h(e,t)[0]}function h(e,r,n={}){const i=a(e,r,n),s=function(e){const{done:t,value:r}=e.next();return t?undefined:r}(i);if(s[0]){return[new t(s[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),undefined]}{const e=s[1];return[undefined,e]}}function p(e,t){return new u({type:e,schema:null,validator:t})}function m(){return p("never",(()=>!1))}function g(e){const t=e?Object.keys(e):[],n=m();return new u({type:"object",schema:e||null,*entries(i){if(e&&r(i)){const r=new Set(Object.keys(i));for(const n of t)r.delete(n),yield[n,i[n],e[n]];for(const e of r)yield[e,i[e],n]}},validator:e=>r(e)||`Expected an object, but received: ${i(e)}`,coercer:e=>r(e)?{...e}:e})}function b(e){return new u({...e,validator:(t,r)=>t===undefined||e.validator(t,r),refiner:(t,r)=>t===undefined||e.refiner(t,r)})}function w(){return p("string",(e=>"string"==typeof e||`Expected a string, but received: ${i(e)}`))}function y(e){const t=Object.keys(e);return new u({type:"type",schema:e,*entries(n){if(r(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>r(e)||`Expected an object, but received: ${i(e)}`,coercer:e=>r(e)?{...e}:e})}function v(){return p("unknown",(()=>!0))}function _(e,t,r){return new u({...e,coercer:(n,i)=>f(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function S(e){return e instanceof Map||e instanceof Set?e.size:e.length}function E(e,t,r){return new u({...e,*refiner(n,i){yield*e.refiner(n,i);const s=o(r(n,i),i,e,n);for(const e of s)yield{...e,refinement:t}}})}e.Struct=u,e.StructError=t,e.any=function(){return p("any",(()=>!0))},e.array=function(e){return new u({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${i(e)}`})},e.assert=c,e.assign=function(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?y(n):g(n)},e.bigint=function(){return p("bigint",(e=>"bigint"==typeof e))},e.boolean=function(){return p("boolean",(e=>"boolean"==typeof e))},e.coerce=_,e.create=l,e.date=function(){return p("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${i(e)}`))},e.defaulted=function(e,t,r={}){return _(e,v(),(e=>{const i="function"==typeof t?t():t;if(e===undefined)return i;if(!r.strict&&n(e)&&n(i)){const t={...e};let r=!1;for(const e in i)t[e]===undefined&&(t[e]=i[e],r=!0);if(r)return t}return e}))},e.define=p,e.deprecated=function(e,t){return new u({...e,refiner:(t,r)=>t===undefined||e.refiner(t,r),validator:(r,n)=>r===undefined||(t(r,n),e.validator(r,n))})},e.dynamic=function(e){return new u({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},e.empty=function(e){return E(e,"empty",(t=>{const r=S(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))},e.enums=function(e){const t={},r=e.map((e=>i(e))).join();for(const r of e)t[r]=r;return new u({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${i(t)}`})},e.func=function(){return p("func",(e=>"function"==typeof e||`Expected a function, but received: ${i(e)}`))},e.instance=function(e){return p("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${i(t)}`))},e.integer=function(){return p("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${i(e)}`))},e.intersection=function(e){return new u({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})},e.is=f,e.lazy=function(e){let t;return new u({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},e.literal=function(e){const t=i(e),r=typeof e;return new u({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${i(r)}`})},e.map=function(e,t){return new u({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${i(e)}`})},e.mask=d,e.max=function(e,t,r={}){const{exclusive:n}=r;return E(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.min=function(e,t,r={}){const{exclusive:n}=r;return E(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))},e.never=m,e.nonempty=function(e){return E(e,"nonempty",(t=>S(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},e.nullable=function(e){return new u({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},e.number=function(){return p("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${i(e)}`))},e.object=g,e.omit=function(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?y(n):g(n)},e.optional=b,e.partial=function(e){const t=e instanceof u?{...e.schema}:{...e};for(const e in t)t[e]=b(t[e]);return g(t)},e.pattern=function(e,t){return E(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))},e.pick=function(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return g(n)},e.record=function(e,t){return new u({type:"record",schema:null,*entries(n){if(r(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>r(e)||`Expected an object, but received: ${i(e)}`})},e.refine=E,e.regexp=function(){return p("regexp",(e=>e instanceof RegExp))},e.set=function(e){return new u({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${i(e)}`})},e.size=function(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return E(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=r||`${n} with a size ${i} but received one with a size of \`${s}\``}{const{length:s}=e;return t<=s&&s<=r||`${n} with a length ${i} but received one with a length of \`${s}\``}}))},e.string=w,e.struct=function(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),p(e,t)},e.trimmed=function(e){return _(e,w(),(e=>e.trim()))},e.tuple=function(e){const t=m();return new u({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${i(e)}`})},e.type=y,e.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new u({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const s=[];for(const t of e){const[...e]=a(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&s.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${i(r)}`,...s]}})},e.unknown=v,e.validate=h}))}}},{package:"superstruct",file:"../../node_modules/superstruct/dist/index.cjs"}],[191,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){try{if(!global.localStorage)return!1}catch(e){return!1}var t=global.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}}},{package:"browserify>readable-stream>util-deprecate",file:"../../node_modules/util-deprecate/browser.js"}],[192,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];var n=t.apply(this,e),i=e[e.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(e){n[e]=i[e]})),n}}}}},{package:"@metamask/object-multiplex>once>wrappy",file:"../../node_modules/wrappy/wrappy.js"}],[193,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){t.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/iterator.js"}],[194,{"./iterator.js":193},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function s(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function o(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}t.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.pop=function(){if(!this.tail)return undefined;var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e},n.prototype.shift=function(){if(!this.head)return undefined;var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;null!==s&&n<e;n++)s=s.next;var o=[];for(n=0;s&&n<t;n++)o.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(n=0;n<r.length;n++)s=i(this,s,r[n]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{e("./iterator.js")(n)}catch(e){}}}},{package:"@swc/cli>semver>lru-cache>yallist",file:"../../node_modules/yallist/yallist.js"}],[195,{"../logging":215,"./../../../snaps-utils/src/index.executionenv":220,"./commands":196,"./endowments":201,"./globalEvents":208,"./sortParams":212,"./utils":213,"./validation":214,"@metamask/json-rpc-engine":6,"@metamask/providers":54,"@metamask/rpc-errors":79,"@metamask/utils":91,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BaseSnapExecutor=void 0;var n=e("@metamask/json-rpc-engine"),i=e("@metamask/providers"),s=e("@metamask/rpc-errors"),o=e("./../../../snaps-utils/src/index.executionenv"),a=e("@metamask/utils"),u=e("superstruct"),c=e("../logging"),l=e("./commands"),d=e("./endowments"),f=e("./globalEvents"),h=e("./sortParams"),p=e("./utils"),m=e("./validation");function g(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(r!==undefined){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const b={code:s.errorCodes.rpc.internal,message:"Execution Environment Error"},w=s.rpcErrors.internal({message:"Unhandled Snap Error"}).serialize(),y={ping:{struct:m.PingRequestArgumentsStruct,params:[]},executeSnap:{struct:m.ExecuteSnapRequestArgumentsStruct,params:["snapId","sourceCode","endowments"]},terminate:{struct:m.TerminateRequestArgumentsStruct,params:[]},snapRpc:{struct:m.SnapRpcRequestArgumentsStruct,params:["target","handler","origin","request"]}};r.BaseSnapExecutor=class{constructor(e,t){g(this,"snapData",void 0),g(this,"commandStream",void 0),g(this,"rpcStream",void 0),g(this,"methods",void 0),g(this,"snapErrorHandler",void 0),g(this,"snapPromiseErrorHandler",void 0),g(this,"lastTeardown",0),this.snapData=new Map,this.commandStream=e,this.commandStream.on("data",(e=>{this.onCommandRequest(e).catch((e=>{(0,o.logError)(e)}))})),this.rpcStream=t,this.methods=(0,l.getCommandMethodImplementations)(this.startSnap.bind(this),(async(e,t,r)=>{const n=this.snapData.get(e),i=null==n?void 0:n.exports[t],{required:u}=o.SNAP_EXPORTS[t];if((0,a.assert)(!u||i!==undefined,`No ${t} handler exported for snap "${e}`,s.rpcErrors.methodNotSupported),!i)return null;let c=await this.executeInSnapContext(e,(()=>i(r)));c===undefined&&(c=null);try{return(0,a.getSafeJson)(c)}catch(e){throw s.rpcErrors.internal(`Received non-JSON-serializable value: ${e.message.replace(/^Assertion failed: /u,"")}`)}}),this.onTerminate.bind(this))}errorHandler(e,t){const r=(0,s.serializeError)(e,{fallbackError:w,shouldIncludeStack:!1}),n=(0,o.getErrorData)(r);this.notify({method:"UnhandledError",params:{error:{...r,data:{...n,...t}}}})}async onCommandRequest(e){if(!(0,a.isJsonRpcRequest)(e))throw s.rpcErrors.invalidRequest({message:"Command stream received a non-JSON-RPC request.",data:e});const{id:t,method:r,params:n}=e;if(!(0,a.hasProperty)(y,r))return void this.respond(t,{error:s.rpcErrors.methodNotFound({data:{method:r}}).serialize()});const i=y[r],o=(0,h.sortParamKeys)(i.params,n),[c]=(0,u.validate)(o,i.struct);if(c)this.respond(t,{error:s.rpcErrors.invalidParams({message:`Invalid parameters for method "${r}": ${c.message}.`,data:{method:r,params:o}}).serialize()});else try{const e=await this.methods[r](...o);this.respond(t,{result:e})}catch(e){this.respond(t,{error:(0,s.serializeError)(e,{fallbackError:b})})}}notify(e){if(!(0,a.isValidJson)(e)||!(0,a.isObject)(e))throw s.rpcErrors.internal("JSON-RPC notifications must be JSON serializable objects");this.commandStream.write({...e,jsonrpc:"2.0"})}respond(e,t){(0,a.isValidJson)(t)&&(0,a.isObject)(t)?this.commandStream.write({...t,id:e,jsonrpc:"2.0"}):this.commandStream.write({error:(0,s.serializeError)(s.rpcErrors.internal("JSON-RPC responses must be JSON serializable objects.")),id:e,jsonrpc:"2.0"})}async startSnap(e,t,r){(0,c.log)(`Starting snap '${e}' in worker.`),this.snapPromiseErrorHandler&&(0,f.removeEventListener)("unhandledrejection",this.snapPromiseErrorHandler),this.snapErrorHandler&&(0,f.removeEventListener)("error",this.snapErrorHandler),this.snapErrorHandler=t=>{this.errorHandler(t.error,{snapId:e})},this.snapPromiseErrorHandler=t=>{this.errorHandler(t instanceof Error?t:t.reason,{snapId:e})};const a=new i.StreamProvider(this.rpcStream,{jsonRpcStreamName:"metamask-provider",rpcMiddleware:[(0,n.createIdRemapMiddleware)()]});await a.initialize();const u=this.createSnapGlobal(a),l=this.createEIP1193Provider(a),h={exports:{}};try{const{endowments:n,teardown:i}=(0,d.createEndowments)(u,l,e,r);this.snapData.set(e,{idleTeardown:i,runningEvaluations:new Set,exports:{}}),(0,f.addEventListener)("unhandledRejection",this.snapPromiseErrorHandler),(0,f.addEventListener)("error",this.snapErrorHandler);const s=new Compartment({...n,module:h,exports:h.exports});s.globalThis.self=s.globalThis,s.globalThis.global=s.globalThis,s.globalThis.window=s.globalThis,await this.executeInSnapContext(e,(()=>{s.evaluate(t),this.registerSnapExports(e,h)}))}catch(t){this.removeSnap(e);const[r]=(0,o.unwrapError)(t);throw s.rpcErrors.internal({message:`Error while running snap '${e}': ${r.message}`,data:{cause:r.serialize()}})}}onTerminate(){this.snapData.forEach((e=>e.runningEvaluations.forEach((e=>e.stop())))),this.snapData.clear()}registerSnapExports(e,t){const r=this.snapData.get(e);r&&(r.exports=o.SNAP_EXPORT_NAMES.reduce(((e,r)=>{const n=t.exports[r],{validator:i}=o.SNAP_EXPORTS[r];return i(n)?{...e,[r]:n}:e}),{}))}createSnapGlobal(e){const t=e.request.bind(e),r=async e=>{const r=(0,p.sanitizeRequestArguments)(e);(0,p.assertSnapOutboundRequest)(r),this.notify({method:"OutboundRequest"});try{return await(0,p.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}},n=new Proxy({},{has:(e,t)=>"string"==typeof t&&["request"].includes(t),get:(e,t)=>"request"===t?r:undefined});return harden(n)}createEIP1193Provider(e){const t=e.request.bind(e),r=(0,p.proxyStreamProvider)(e,(async e=>{const r=(0,p.sanitizeRequestArguments)(e);(0,p.assertEthereumOutboundRequest)(r),this.notify({method:"OutboundRequest"});try{return await(0,p.withTeardown)(t(r),this)}finally{this.notify({method:"OutboundResponse"})}}));return harden(r)}removeSnap(e){this.snapData.delete(e)}async executeInSnapContext(e,t){const r=this.snapData.get(e);if(r===undefined)throw s.rpcErrors.internal(`Tried to execute in context of unknown snap: "${e}".`);let n;const i=new Promise(((t,r)=>n=()=>r(s.rpcErrors.internal(`The snap "${e}" has been terminated during execution.`)))),a={stop:n};try{return r.runningEvaluations.add(a),await Promise.race([t(),i])}catch(e){throw new o.WrappedSnapError(e)}finally{r.runningEvaluations.delete(a),0===r.runningEvaluations.size&&(this.lastTeardown+=1,await r.idleTeardown())}}}}}},{package:"$root$",file:"src/common/BaseSnapExecutor.ts"}],[196,{"./../../../snaps-utils/src/index.executionenv":220,"./validation":214,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getCommandMethodImplementations=function(e,t,r){return{ping:async()=>Promise.resolve("OK"),terminate:async()=>(r(),Promise.resolve("OK")),executeSnap:async(t,r,n)=>(await e(t,r,n),"OK"),snapRpc:async(e,r,n,i)=>await t(e,r,o(n,r,i))??null}},r.getHandlerArguments=o;var n=e("./../../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils"),s=e("./validation");function o(e,t,r){switch(t){case n.HandlerType.OnTransaction:{(0,s.assertIsOnTransactionRequestArguments)(r.params);const{transaction:e,chainId:t,transactionOrigin:n}=r.params;return{transaction:e,chainId:t,transactionOrigin:n}}case n.HandlerType.OnNameLookup:{(0,s.assertIsOnNameLookupRequestArguments)(r.params);const{chainId:e,domain:t,address:n}=r.params;return t?{chainId:e,domain:t}:{chainId:e,address:n}}case n.HandlerType.OnRpcRequest:case n.HandlerType.OnKeyringRequest:return{origin:e,request:r};case n.HandlerType.OnCronjob:case n.HandlerType.OnInstall:case n.HandlerType.OnUpdate:return{request:r};default:return(0,i.assertExhaustive)(t)}}}}},{package:"$root$",file:"src/common/commands.ts"}],[197,{"../globalObject":209,"./console":198,"./crypto":199,"./date":200,"./interval":202,"./math":203,"./network":204,"./textDecoder":205,"./textEncoder":206,"./timeout":207},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),i=h(e("./console")),s=h(e("./crypto")),o=h(e("./date")),a=h(e("./interval")),u=h(e("./math")),c=h(e("./network")),l=h(e("./textDecoder")),d=h(e("./textEncoder")),f=h(e("./timeout"));function h(e){return e&&e.__esModule?e:{default:e}}const p=[{endowment:AbortController,name:"AbortController"},{endowment:AbortSignal,name:"AbortSignal"},{endowment:ArrayBuffer,name:"ArrayBuffer"},{endowment:atob,name:"atob",bind:!0},{endowment:BigInt,name:"BigInt"},{endowment:BigInt64Array,name:"BigInt64Array"},{endowment:BigUint64Array,name:"BigUint64Array"},{endowment:btoa,name:"btoa",bind:!0},{endowment:DataView,name:"DataView"},{endowment:Float32Array,name:"Float32Array"},{endowment:Float64Array,name:"Float64Array"},{endowment:Int8Array,name:"Int8Array"},{endowment:Int16Array,name:"Int16Array"},{endowment:Int32Array,name:"Int32Array"},{endowment:Uint8Array,name:"Uint8Array"},{endowment:Uint8ClampedArray,name:"Uint8ClampedArray"},{endowment:Uint16Array,name:"Uint16Array"},{endowment:Uint32Array,name:"Uint32Array"},{endowment:URL,name:"URL"},{endowment:WebAssembly,name:"WebAssembly"}];r.default=()=>{const e=[s.default,a.default,u.default,c.default,f.default,l.default,d.default,o.default,i.default];return p.forEach((t=>{const r={names:[t.name],factory:()=>{const e="function"==typeof t.endowment&&t.bind?t.endowment.bind(n.rootRealmGlobal):t.endowment;return{[t.name]:harden(e)}}};e.push(r)})),e}}}},{package:"$root$",file:"src/common/endowments/commonEndowmentFactory.ts"}],[198,{"../globalObject":209,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.consoleMethods=r.consoleAttenuatedMethods=void 0;var n=e("@metamask/utils"),i=e("../globalObject");const s=r.consoleAttenuatedMethods=new Set(["log","assert","error","debug","info","warn"]),o=r.consoleMethods=new Set(["debug","error","info","log","warn","dir","dirxml","table","trace","group","groupCollapsed","groupEnd","clear","count","countReset","assert","profile","profileEnd","time","timeLog","timeEnd","timeStamp","context"]),a=["log","error","debug","info","warn"];function u(e,t,...r){const n=`[Snap: ${e}]`;return"string"==typeof t?[`${n} ${t}`,...r]:[n,t,...r]}const c={names:["console"],factory:function({snapId:e}={}){(0,n.assert)(e!==undefined);const t=Object.getOwnPropertyNames(i.rootRealmGlobal.console).reduce(((e,t)=>o.has(t)&&!s.has(t)?{...e,[t]:i.rootRealmGlobal.console[t]}:e),{});return harden({console:{...t,assert:(t,r,...n)=>{i.rootRealmGlobal.console.assert(t,...u(e,r,...n))},...a.reduce(((t,r)=>({...t,[r]:(t,...n)=>{i.rootRealmGlobal.console[r](...u(e,t,...n))}})),{})}})}};r.default=c}}},{package:"$root$",file:"src/common/endowments/console.ts"}],[199,{"../globalObject":209},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.createCrypto=void 0;var n=e("../globalObject");const i=()=>{if("crypto"in n.rootRealmGlobal&&"object"==typeof n.rootRealmGlobal.crypto&&"SubtleCrypto"in n.rootRealmGlobal&&"function"==typeof n.rootRealmGlobal.SubtleCrypto)return{crypto:harden(n.rootRealmGlobal.crypto),SubtleCrypto:harden(n.rootRealmGlobal.SubtleCrypto)};const t=e("crypto").webcrypto;return{crypto:harden(t),SubtleCrypto:harden(t.subtle.constructor)}};r.createCrypto=i;const s={names:["crypto","SubtleCrypto"],factory:i};r.default=s}}},{package:"$root$",file:"src/common/endowments/crypto.ts"}],[200,{"../globalObject":209},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject");const i={names:["Date"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Date);let t=0;const r=()=>{const e=n.rootRealmGlobal.Date.now(),r=Math.round(e+Math.random());return r>t&&(t=r),t},i=function(...e){return Reflect.construct(n.rootRealmGlobal.Date,0===e.length?[r()]:e,new.target)};return e.forEach((e=>{Reflect.defineProperty(i,e,{configurable:!1,writable:!1,value:"now"===e?r:n.rootRealmGlobal.Date[e]})})),{Date:harden(i)}}};r.default=i}}},{package:"$root$",file:"src/common/endowments/date.ts"}],[201,{"../globalObject":209,"./../../../../snaps-utils/src/index.executionenv":220,"./commonEndowmentFactory":197,"@metamask/rpc-errors":79,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.createEndowments=function(e,t,r,n=[]){const c={},l=n.reduce((({allEndowments:e,teardowns:n},l)=>{if(u.has(l)){if(!(0,o.hasProperty)(c,l)){const{teardownFunction:e,...t}=u.get(l)({snapId:r});Object.assign(c,t),e&&n.push(e)}e[l]=c[l]}else if("ethereum"===l)e[l]=t;else{if(!(l in a.rootRealmGlobal))throw i.rpcErrors.internal(`Unknown endowment: "${l}".`);{(0,s.logWarning)(`Access to unhardened global ${l}.`);const t=a.rootRealmGlobal[l];e[l]=t}}return{allEndowments:e,teardowns:n}}),{allEndowments:{snap:e},teardowns:[]});return{endowments:l.allEndowments,teardown:async()=>{await Promise.all(l.teardowns.map((e=>e())))}}};var n,i=e("@metamask/rpc-errors"),s=e("./../../../../snaps-utils/src/index.executionenv"),o=e("@metamask/utils"),a=e("../globalObject");const u=(0,((n=e("./commonEndowmentFactory"))&&n.__esModule?n:{default:n}).default)().reduce(((e,t)=>(t.names.forEach((r=>{e.set(r,t.factory)})),e)),new Map)}}},{package:"$root$",file:"src/common/endowments/index.ts"}],[202,{"@metamask/rpc-errors":79},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/rpc-errors");const i={names:["setInterval","clearInterval"],factory:()=>{const e=new Map,t=t=>{harden(t);const r=e.get(t);r!==undefined&&(clearInterval(r),e.delete(t))};return{setInterval:harden(((t,r)=>{if("function"!=typeof t)throw n.rpcErrors.invalidInput(`The interval handler must be a function. Received: ${typeof t}.`);harden(t);const i=Object.freeze(Object.create(null)),s=setInterval(t,Math.max(10,r??0));return e.set(i,s),i})),clearInterval:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=i}}},{package:"$root$",file:"src/common/endowments/interval.ts"}],[203,{"../globalObject":209,"./crypto":199},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../globalObject"),i=e("./crypto");const s={names:["Math"],factory:function(){const e=Object.getOwnPropertyNames(n.rootRealmGlobal.Math).reduce(((e,t)=>"random"===t?e:{...e,[t]:n.rootRealmGlobal.Math[t]}),{}),{crypto:t}=(0,i.createCrypto)();return harden({Math:{...e,random:()=>t.getRandomValues(new Uint32Array(1))[0]/2**32}})}};r.default=s}}},{package:"$root$",file:"src/common/endowments/math.ts"}],[204,{"../utils":213},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("../utils");function i(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function s(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,a(e,t,"get"))}function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,a(e,t,"set"),r),r}function a(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}var u=new WeakMap,c=new WeakMap;class l{constructor(e,t){i(this,u,{writable:!0,value:void 0}),i(this,c,{writable:!0,value:void 0}),o(this,c,e),o(this,u,t)}get body(){return s(this,c).body}get bodyUsed(){return s(this,c).bodyUsed}get headers(){return s(this,c).headers}get ok(){return s(this,c).ok}get redirected(){return s(this,c).redirected}get status(){return s(this,c).status}get statusText(){return s(this,c).statusText}get type(){return s(this,c).type}get url(){return s(this,c).url}async text(){return(0,n.withTeardown)(s(this,c).text(),this)}async arrayBuffer(){return(0,n.withTeardown)(s(this,c).arrayBuffer(),this)}async blob(){return(0,n.withTeardown)(s(this,c).blob(),this)}clone(){const e=s(this,c).clone();return new l(e,s(this,u))}async formData(){return(0,n.withTeardown)(s(this,c).formData(),this)}async json(){return(0,n.withTeardown)(s(this,c).json(),this)}}const d={names:["fetch","Request","Headers","Response"],factory:()=>{const e=new Set,t={lastTeardown:0},r=new FinalizationRegistry((e=>e()));return{fetch:harden((async(i,s)=>{const o=new AbortController;if(null!==(null==s?void 0:s.signal)&&(null==s?void 0:s.signal)!==undefined){const e=s.signal;e.addEventListener("abort",(()=>{o.abort(e.reason)}),{once:!0})}let a,u;try{const r=fetch(i,{...s,signal:o.signal});u={cancel:async()=>{o.abort();try{await r}catch{}}},e.add(u),a=new l(await(0,n.withTeardown)(r,t),t)}finally{u!==undefined&&e.delete(u)}if(null!==a.body){const t=new WeakRef(a.body),n={cancel:async()=>{try{var e;await(null===(e=t.deref())||void 0===e?void 0:e.cancel())}catch{}}};e.add(n),r.register(a.body,(()=>e.delete(n)))}return harden(a)})),Request:harden(Request),Headers:harden(Headers),Response:harden(Response),teardownFunction:async()=>{t.lastTeardown+=1;const r=[];e.forEach((({cancel:e})=>r.push(e()))),e.clear(),await Promise.all(r)}}}};r.default=d}}},{package:"$root$",file:"src/common/endowments/network.ts"}],[205,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;const n={names:["TextDecoder"],factory:()=>({TextDecoder:harden(TextDecoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textDecoder.ts"}],[206,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;const n={names:["TextEncoder"],factory:()=>({TextEncoder:harden(TextEncoder)})};r.default=n}}},{package:"$root$",file:"src/common/endowments/textEncoder.ts"}],[207,{"@metamask/rpc-errors":79},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=e("@metamask/rpc-errors");const i={names:["setTimeout","clearTimeout"],factory:()=>{const e=new Map,t=t=>{const r=e.get(t);r!==undefined&&(clearTimeout(r),e.delete(t))};return{setTimeout:harden(((t,r)=>{if("function"!=typeof t)throw n.rpcErrors.internal(`The timeout handler must be a function. Received: ${typeof t}.`);harden(t);const i=Object.freeze(Object.create(null)),s=setTimeout((()=>{e.delete(i),t()}),Math.max(10,r??0));return e.set(i,s),i})),clearTimeout:harden(t),teardownFunction:()=>{for(const r of e.keys())t(r)}}}};r.default=i}}},{package:"$root$",file:"src/common/endowments/timeout.ts"}],[208,{"./globalObject":209,"@metamask/rpc-errors":79},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.addEventListener=function(e,t){if("addEventListener"in i.rootRealmGlobal&&"function"==typeof i.rootRealmGlobal.addEventListener)return i.rootRealmGlobal.addEventListener(e.toLowerCase(),t);if(i.rootRealmGlobal.process&&"on"in i.rootRealmGlobal.process&&"function"==typeof i.rootRealmGlobal.process.on)return i.rootRealmGlobal.process.on(e,t);throw n.rpcErrors.internal("Platform agnostic addEventListener failed.")},r.removeEventListener=function(e,t){if("removeEventListener"in i.rootRealmGlobal&&"function"==typeof i.rootRealmGlobal.removeEventListener)return i.rootRealmGlobal.removeEventListener(e.toLowerCase(),t);if(i.rootRealmGlobal.process&&"removeListener"in i.rootRealmGlobal.process&&"function"==typeof i.rootRealmGlobal.process.removeListener)return i.rootRealmGlobal.process.removeListener(e,t);throw new Error("Platform agnostic removeEventListener failed")};var n=e("@metamask/rpc-errors"),i=e("./globalObject")}}},{package:"$root$",file:"src/common/globalEvents.ts"}],[209,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.rootRealmGlobalName=r.rootRealmGlobal=void 0;var n=function(e){return e.globalThis="globalThis",e.global="global",e.self="self",e.window="window",e}(n||{});let i,s;if("undefined"!=typeof globalThis)i=globalThis,s=n.globalThis;else if("undefined"!=typeof self)i=self,s=n.self;else if("undefined"!=typeof window)i=window,s=n.window;else{if("undefined"==typeof global)throw new Error("Unknown realm type; failed to identify global object.");i=global,s=n.global}r.rootRealmGlobal=i,r.rootRealmGlobalName=s}}},{package:"$root$",file:"src/common/globalObject.ts"}],[210,{"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownEvents=function(){i.forEach(((e,t)=>{for(const r of e)Object.defineProperty(t,r,{value:undefined,configurable:!1,writable:!1})}))};var n=e("@metamask/utils");const i=new Map;(0,n.hasProperty)(globalThis,"UIEvent")&&i.set(UIEvent.prototype,["view"]),(0,n.hasProperty)(globalThis,"MutationEvent")&&i.set(MutationEvent.prototype,["relatedNode"]),(0,n.hasProperty)(globalThis,"MessageEvent")&&i.set(MessageEvent.prototype,["source"]),(0,n.hasProperty)(globalThis,"FocusEvent")&&i.set(FocusEvent.prototype,["relatedTarget"]),(0,n.hasProperty)(globalThis,"MouseEvent")&&i.set(MouseEvent.prototype,["relatedTarget","fromElement","toElement"]),(0,n.hasProperty)(globalThis,"TouchEvent")&&i.set(TouchEvent.prototype,["targetTouches","touches"]),(0,n.hasProperty)(globalThis,"Event")&&i.set(Event.prototype,["target","currentTarget","srcElement","composedPath"])}}},{package:"$root$",file:"src/common/lockdown/lockdown-events.ts"}],[211,{"./../../../../snaps-utils/src/index.executionenv":220},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.executeLockdownMore=function(){try{const e=Reflect.ownKeys((new Compartment).globalThis),t=new Set(["eval","Function"]);new Set([...e]).forEach((e=>{const r=Reflect.getOwnPropertyDescriptor(globalThis,e);r&&(r.configurable&&(!function(e){return"set"in e||"get"in e}(r)?Object.defineProperty(globalThis,e,{configurable:!1,writable:!1}):Object.defineProperty(globalThis,e,{configurable:!1})),t.has(e)&&harden(globalThis[e]))}))}catch(e){throw(0,n.logError)("Protecting intrinsics failed:",e),e}};var n=e("./../../../../snaps-utils/src/index.executionenv")}}},{package:"$root$",file:"src/common/lockdown/lockdown-more.ts"}],[212,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.sortParamKeys=void 0;r.sortParamKeys=(e,t)=>{if(!t)return[];if(t instanceof Array)return t;const r=e.reduce(((e,t,r)=>({...e,[t]:r})),{});return Object.entries(t).sort((([e,t],[n,i])=>r[e]-r[n])).map((([e,t])=>t))}}}},{package:"$root$",file:"src/common/sortParams.ts"}],[213,{"../logging":215,"@metamask/rpc-errors":79,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.BLOCKED_RPC_METHODS=void 0,r.assertEthereumOutboundRequest=function(e){(0,i.assert)(!String.prototype.startsWith.call(e.method,"snap_"),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,i.assert)(!o.includes(e.method),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,i.assertStruct)(e,i.JsonStruct,"Provided value is not JSON-RPC compatible",n.rpcErrors.invalidParams)},r.assertSnapOutboundRequest=function(e){(0,i.assert)(String.prototype.startsWith.call(e.method,"wallet_")||String.prototype.startsWith.call(e.method,"snap_"),"The global Snap API only allows RPC methods starting with `wallet_*` and `snap_*`.",n.rpcErrors.methodNotSupported),(0,i.assert)(!o.includes(e.method),n.rpcErrors.methodNotFound({data:{method:e.method}})),(0,i.assertStruct)(e,i.JsonStruct,"Provided value is not JSON-RPC compatible",n.rpcErrors.invalidParams)},r.proxyStreamProvider=function(e,t){return new Proxy({},{has:(e,t)=>"string"==typeof t&&["request","on","removeListener"].includes(t),get:(r,n)=>"request"===n?t:["on","removeListener"].includes(n)?e[n]:undefined})},r.sanitizeRequestArguments=function(e){const t=JSON.parse(JSON.stringify(e));return(0,i.getSafeJson)(t)},r.withTeardown=async function(e,t){const r=t.lastTeardown;return new Promise(((n,i)=>{e.then((e=>{t.lastTeardown===r?n(e):(0,s.log)("Late promise received after Snap finished execution. Promise will be dropped.")})).catch((e=>{t.lastTeardown===r?i(e):(0,s.log)("Late promise received after Snap finished execution. Promise will be dropped.")}))}))};var n=e("@metamask/rpc-errors"),i=e("@metamask/utils"),s=e("../logging");const o=r.BLOCKED_RPC_METHODS=Object.freeze(["wallet_requestSnaps","wallet_requestPermissions","eth_sendRawTransaction","eth_sendTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v3","eth_signTypedData_v4","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_watchAsset","wallet_registerOnboarding","wallet_scanQRCode"])}}},{package:"$root$",file:"src/common/utils.ts"}],[214,{"./../../../snaps-utils/src/index.executionenv":220,"@metamask/rpc-errors":79,"@metamask/utils":91,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.TerminateRequestArgumentsStruct=r.SnapRpcRequestArgumentsStruct=r.PingRequestArgumentsStruct=r.OnTransactionRequestArgumentsStruct=r.OnNameLookupRequestArgumentsStruct=r.JsonRpcRequestWithoutIdStruct=r.ExecuteSnapRequestArgumentsStruct=r.EndowmentStruct=void 0,r.assertIsOnNameLookupRequestArguments=function(e){(0,s.assertStruct)(e,m,"Invalid request params",n.rpcErrors.invalidParams)},r.assertIsOnTransactionRequestArguments=function(e){(0,s.assertStruct)(e,d,"Invalid request params",n.rpcErrors.invalidParams)},r.isEndowment=c,r.isEndowmentsArray=function(e){return Array.isArray(e)&&e.every(c)};var n=e("@metamask/rpc-errors"),i=e("./../../../snaps-utils/src/index.executionenv"),s=e("@metamask/utils"),o=e("superstruct");const a=r.JsonRpcRequestWithoutIdStruct=(0,o.assign)((0,o.omit)(s.JsonRpcRequestStruct,["id"]),(0,o.object)({id:(0,o.optional)(s.JsonRpcIdStruct)})),u=r.EndowmentStruct=(0,o.string)();function c(e){return(0,o.is)(e,u)}const l=(0,o.literal)("OK"),d=(r.PingRequestArgumentsStruct=(0,o.optional)((0,o.union)([(0,o.literal)(undefined),(0,o.array)()])),r.TerminateRequestArgumentsStruct=(0,o.union)([(0,o.literal)(undefined),(0,o.array)()]),r.ExecuteSnapRequestArgumentsStruct=(0,o.tuple)([(0,o.string)(),(0,o.string)(),(0,o.optional)((0,o.array)(u))]),r.SnapRpcRequestArgumentsStruct=(0,o.tuple)([(0,o.string)(),(0,o.enums)(Object.values(i.HandlerType)),(0,o.string)(),(0,o.assign)(a,(0,o.object)({params:(0,o.optional)((0,o.record)((0,o.string)(),s.JsonStruct))}))]),r.OnTransactionRequestArgumentsStruct=(0,o.object)({transaction:(0,o.record)((0,o.string)(),s.JsonStruct),chainId:i.ChainIdStruct,transactionOrigin:(0,o.nullable)((0,o.string)())}));const f={chainId:i.ChainIdStruct},h=(0,o.object)({...f,address:(0,o.string)()}),p=(0,o.object)({...f,domain:(0,o.string)()}),m=r.OnNameLookupRequestArgumentsStruct=(0,o.union)([h,p]);(0,o.assign)(s.JsonRpcSuccessStruct,(0,o.object)({result:l})),s.JsonRpcSuccessStruct}}},{package:"$root$",file:"src/common/validation.ts"}],[215,{"./../../snaps-utils/src/index.executionenv":220,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.log=void 0;var n=e("./../../snaps-utils/src/index.executionenv"),i=e("@metamask/utils");r.log=(0,i.createModuleLogger)(n.snapsLogger,"snaps-execution-environments")}}},{package:"$root$",file:"src/logging.ts"}],[216,{"../../common/BaseSnapExecutor":195,"../../logging":215,"./../../../../snaps-utils/src/index.executionenv":220,"@metamask/object-multiplex":10,"@metamask/post-message-stream":26,stream:188},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WebWorkerSnapExecutor=void 0;var n,i=(n=e("@metamask/object-multiplex"))&&n.__esModule?n:{default:n},s=e("@metamask/post-message-stream"),o=e("./../../../../snaps-utils/src/index.executionenv"),a=e("stream"),u=e("../../common/BaseSnapExecutor"),c=e("../../logging");class l extends u.BaseSnapExecutor{static initialize(e=new s.WebWorkerPostMessageStream){(0,c.log)("Worker: Connecting to parent.");const t=new i.default;(0,a.pipeline)(e,t,e,(e=>{e&&(0,o.logError)("Parent stream failure, closing worker.",e),self.close()}));const r=t.createStream(o.SNAP_STREAM_NAMES.COMMAND),n=t.createStream(o.SNAP_STREAM_NAMES.JSON_RPC);return new l(r,n)}}r.WebWorkerSnapExecutor=l}}},{package:"$root$",file:"src/webworker/executor/WebWorkerSnapExecutor.ts"}],[217,{"../../common/lockdown/lockdown-events":210,"../../common/lockdown/lockdown-more":211,"./WebWorkerSnapExecutor":216},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){var n=e("../../common/lockdown/lockdown-events"),i=e("../../common/lockdown/lockdown-more"),s=e("./WebWorkerSnapExecutor");(0,i.executeLockdownMore)(),(0,n.executeLockdownEvents)(),s.WebWorkerSnapExecutor.initialize()}}},{package:"$root$",file:"src/webworker/executor/index.ts"}],[218,{"@metamask/rpc-errors":79,"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WrappedSnapError=r.SnapError=r.SNAP_ERROR_WRAPPER_MESSAGE=r.SNAP_ERROR_WRAPPER_CODE=r.SNAP_ERROR_MESSAGE=r.SNAP_ERROR_CODE=void 0,r.getErrorCode=d,r.getErrorData=f,r.getErrorMessage=c,r.getErrorStack=l,r.isSerializedSnapError=j,r.isSnapError=R,r.isWrappedSnapError=x,r.unwrapError=function(e){if(x(e)){if((0,i.isJsonRpcError)(e.data.cause)){if(j(e.data.cause)){const{code:t,message:r,stack:n,data:i}=e.data.cause.data.cause;return[M(t,r,n,i),!0]}const{code:t,message:r,stack:n,data:i}=e.data.cause;return[M(t,r,n,i),!1]}return[M(n.errorCodes.rpc.internal,c(e.data.cause),l(e.data.cause)),!1]}if((0,i.isJsonRpcError)(e)){const{code:t,message:r,stack:n,data:i}=e;return[M(t,r,n,i),!1]}return[M(n.errorCodes.rpc.internal,c(e),l(e)),!1]};var n=e("@metamask/rpc-errors"),i=e("@metamask/utils");function s(e,t,r){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,r)}function o(e,t){return function(e,t){if(t.get)return t.get.call(e);return t.value}(e,u(e,t,"get"))}function a(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,u(e,t,"set"),r),r}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function c(e){return(0,i.isObject)(e)&&(0,i.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:String(e)}function l(e){return(0,i.isObject)(e)&&(0,i.hasProperty)(e,"stack")&&"string"==typeof e.stack?e.stack:undefined}function d(e){return(0,i.isObject)(e)&&(0,i.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code)?e.code:n.errorCodes.rpc.internal}function f(e){return(0,i.isObject)(e)&&(0,i.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,i.isValidJson)(e.data)&&!Array.isArray(e.data)?e.data:{}}const h=r.SNAP_ERROR_WRAPPER_CODE=-31001,p=r.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error",m=r.SNAP_ERROR_CODE=-31002,g=r.SNAP_ERROR_MESSAGE="Snap Error";var b=new WeakMap,w=new WeakMap,y=new WeakMap;class v extends Error{constructor(e){const t=c(e);super(t),s(this,b,{writable:!0,value:void 0}),s(this,w,{writable:!0,value:void 0}),s(this,y,{writable:!0,value:void 0}),a(this,b,e),a(this,w,t),a(this,y,l(e))}get name(){return"WrappedSnapError"}get message(){return o(this,w)}get stack(){return o(this,y)}toJSON(){const e=R(o(this,b))?o(this,b).serialize():(0,n.serializeCause)(o(this,b));return{code:h,message:p,data:{cause:e}}}serialize(){return this.toJSON()}}r.WrappedSnapError=v;var _=new WeakMap,S=new WeakMap,E=new WeakMap,k=new WeakMap;class T extends Error{constructor(e,t={}){const r=c(e);super(r),s(this,_,{writable:!0,value:void 0}),s(this,S,{writable:!0,value:void 0}),s(this,E,{writable:!0,value:void 0}),s(this,k,{writable:!0,value:void 0}),a(this,S,r),a(this,_,d(e)),a(this,E,{...f(e),...t}),a(this,k,super.stack)}get name(){return"SnapError"}get code(){return o(this,_)}get message(){return o(this,S)}get data(){return o(this,E)}get stack(){return o(this,k)}toJSON(){return{code:m,message:g,data:{cause:{code:this.code,message:this.message,stack:this.stack,data:this.data}}}}serialize(){return this.toJSON()}}function R(e){if((0,i.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,i.isJsonRpcError)(t)&&j(t)}return!1}function j(e){return e.code===m&&e.message===g}function x(e){return(0,i.isJsonRpcError)(e)&&e.code===h&&e.message===p}function M(e,t,r,i){const s=new n.JsonRpcError(e,t,i);return s.stack=r,s}r.SnapError=T}}},{package:"external:../snaps-utils/src/errors.ts",file:"../snaps-utils/src/errors.ts"}],[219,{},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SeverityLevel=r.SNAP_EXPORTS=r.HandlerType=void 0;let n=r.HandlerType=function(e){return e.OnRpcRequest="onRpcRequest",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e}({});r.SNAP_EXPORTS={[n.OnRpcRequest]:{type:n.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[n.OnTransaction]:{type:n.OnTransaction,required:!0,validator:e=>"function"==typeof e},[n.OnCronjob]:{type:n.OnCronjob,required:!0,validator:e=>"function"==typeof e},[n.OnNameLookup]:{type:n.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[n.OnInstall]:{type:n.OnInstall,required:!1,validator:e=>"function"==typeof e},[n.OnUpdate]:{type:n.OnUpdate,required:!1,validator:e=>"function"==typeof e},[n.OnKeyringRequest]:{type:n.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e}};r.SeverityLevel=function(e){return e.Critical="critical",e}({})}}},{package:"external:../snaps-utils/src/handlers.ts",file:"../snaps-utils/src/handlers.ts"}],[220,{"./errors":218,"./handlers":219,"./logging":221,"./namespace":222,"./types":223},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e("./errors");Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}}))}));var i=e("./handlers");Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=e("./logging");Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}}))}));var o=e("./namespace");Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}}))}));var a=e("./types");Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}}))}))}}},{package:"external:../snaps-utils/src/index.executionenv.ts",file:"../snaps-utils/src/index.executionenv.ts"}],[221,{"@metamask/utils":91},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.logError=function(e,...t){console.error(e,...t)},r.logInfo=function(e,...t){console.log(e,...t)},r.logWarning=function(e,...t){console.warn(e,...t)},r.snapsLogger=void 0;var n=e("@metamask/utils");r.snapsLogger=(0,n.createProjectLogger)("snaps")}}},{package:"external:../snaps-utils/src/logging.ts",file:"../snaps-utils/src/logging.ts"}],[222,{superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NamespaceStruct=r.NamespaceIdStruct=r.LimitedString=r.ChainStruct=r.ChainIdStruct=r.CHAIN_ID_REGEX=r.AccountIdStruct=r.AccountIdArrayStruct=r.AccountAddressStruct=r.ACCOUNT_ID_REGEX=r.ACCOUNT_ADDRESS_REGEX=void 0,r.isAccountId=function(e){return(0,n.is)(e,c)},r.isAccountIdArray=function(e){return(0,n.is)(e,l)},r.isChainId=function(e){return(0,n.is)(e,u)},r.isNamespace=function(e){return(0,n.is)(e,f)},r.isNamespaceId=function(e){return(0,n.is)(e,h)},r.parseAccountId=function(e){const t=s.exec(e);if(null==t||!t.groups)throw new Error("Invalid account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},r.parseChainId=function(e){const t=i.exec(e);if(null==t||!t.groups)throw new Error("Invalid chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}};var n=e("superstruct");const i=r.CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u,s=r.ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})):(?<accountAddress>[a-zA-Z0-9]{1,64})$/u,o=r.ACCOUNT_ADDRESS_REGEX=/^(?<accountAddress>[a-zA-Z0-9]{1,64})$/u;const a=r.LimitedString=(0,n.size)((0,n.string)(),1,40),u=r.ChainIdStruct=(0,n.pattern)((0,n.string)(),i),c=r.AccountIdStruct=(0,n.pattern)((0,n.string)(),s),l=r.AccountIdArrayStruct=(0,n.array)(c),d=(r.AccountAddressStruct=(0,n.pattern)((0,n.string)(),o),r.ChainStruct=(0,n.object)({id:u,name:a})),f=r.NamespaceStruct=(0,n.object)({chains:(0,n.array)(d),methods:(0,n.optional)((0,n.array)(a)),events:(0,n.optional)((0,n.array)(a))}),h=r.NamespaceIdStruct=(0,n.pattern)((0,n.string)(),/^[-a-z0-9]{3,8}$/u)}}},{package:"external:../snaps-utils/src/namespace.ts",file:"../snaps-utils/src/namespace.ts"}],[223,{"./handlers":219,"@metamask/utils":91,superstruct:190},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_SNAP_PERMISSION_KEY=r.SnapValidationFailureReason=r.SnapIdPrefixes=r.SNAP_STREAM_NAMES=r.SNAP_EXPORT_NAMES=r.NpmSnapPackageJsonStruct=r.NpmSnapFileNames=r.NameStruct=void 0,r.assertIsNpmSnapPackageJson=function(e){(0,n.assertStruct)(e,u,`"${o.PackageJson}" is invalid`)},r.isNpmSnapPackageJson=function(e){return(0,i.is)(e,u)},r.isValidUrl=function(e,t={}){return(0,i.is)(e,c(t))},r.uri=void 0;var n=e("@metamask/utils"),i=e("superstruct"),s=e("./handlers");let o=r.NpmSnapFileNames=function(e){return e.PackageJson="package.json",e.Manifest="snap.manifest.json",e}({});const a=r.NameStruct=(0,i.size)((0,i.pattern)((0,i.string)(),/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),u=r.NpmSnapPackageJsonStruct=(0,i.type)({version:n.VersionStruct,name:a,main:(0,i.optional)((0,i.size)((0,i.string)(),1,Infinity)),repository:(0,i.optional)((0,i.object)({type:(0,i.size)((0,i.string)(),1,Infinity),url:(0,i.size)((0,i.string)(),1,Infinity)}))});r.SnapIdPrefixes=function(e){return e.npm="npm:",e.local="local:",e}({}),r.SnapValidationFailureReason=function(e){return e.NameMismatch='"name" field mismatch',e.VersionMismatch='"version" field mismatch',e.RepositoryMismatch='"repository" field mismatch',e.ShasumMismatch='"shasum" field mismatch',e}({}),r.SNAP_STREAM_NAMES=function(e){return e.JSON_RPC="jsonRpc",e.COMMAND="command",e}({});r.SNAP_EXPORT_NAMES=Object.values(s.HandlerType);const c=(e={})=>(0,i.refine)((0,i.union)([(0,i.string)(),(0,i.instance)(URL)]),"uri",(t=>{try{const r=new URL(t),n=(0,i.type)(e);return(0,i.assert)(r,n),!0}catch{return`Expected URL, got "${t.toString()}".`}}));r.uri=c;r.WALLET_SNAP_PERMISSION_KEY="wallet_snap"}}},{package:"external:../snaps-utils/src/types.ts",file:"../snaps-utils/src/types.ts"}]],[217],{resources:{"@lavamoat/lavapack>readable-stream":{packages:{"browserify>browser-resolve":!0,"browserify>buffer":!0,"browserify>events":!0,"browserify>inherits":!0,"browserify>process":!0,"browserify>readable-stream>util-deprecate":!0,"browserify>string_decoder":!0}},"@metamask/json-rpc-engine":{packages:{"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/rpc-errors":!0,"@metamask/utils":!0}},"@metamask/object-multiplex":{globals:{"console.warn":!0},packages:{"@metamask/object-multiplex>end-of-stream":!0,"@metamask/object-multiplex>once":!0,"@metamask/object-multiplex>readable-stream":!0}},"@metamask/object-multiplex>end-of-stream":{packages:{"@metamask/object-multiplex>once":!0,"browserify>process":!0}},"@metamask/object-multiplex>once":{packages:{"@metamask/object-multiplex>once>wrappy":!0}},"@metamask/object-multiplex>readable-stream":{packages:{"@metamask/object-multiplex>readable-stream>isarray":!0,"@metamask/object-multiplex>readable-stream>safe-buffer":!0,"@metamask/object-multiplex>readable-stream>string_decoder":!0,"browserify>browser-resolve":!0,"browserify>events":!0,"browserify>inherits":!0,"browserify>process":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,"browserify>timers-browserify":!0}},"@metamask/object-multiplex>readable-stream>safe-buffer":{packages:{"browserify>buffer":!0}},"@metamask/object-multiplex>readable-stream>string_decoder":{packages:{"@metamask/object-multiplex>readable-stream>safe-buffer":!0}},"@metamask/post-message-stream":{globals:{"MessageEvent.prototype":!0,WorkerGlobalScope:!0,addEventListener:!0,browser:!0,chrome:!0,"location.origin":!0,postMessage:!0,removeEventListener:!0},packages:{"@lavamoat/lavapack>readable-stream":!0,"@metamask/post-message-stream>@metamask/utils":!0}},"@metamask/post-message-stream>@metamask/utils":{globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@swc/cli>semver":!0,"browserify>buffer":!0,"eslint>debug":!0,superstruct:!0}},"@metamask/providers":{globals:{Event:!0,addEventListener:!0,"chrome.runtime.connect":!0,console:!0,dispatchEvent:!0,"document.createElement":!0,"document.readyState":!0,ethereum:"write","location.hostname":!0,removeEventListener:!0,web3:!0},packages:{"@metamask/json-rpc-engine":!0,"@metamask/object-multiplex":!0,"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/providers>detect-browser":!0,"@metamask/providers>extension-port-stream":!0,"@metamask/providers>is-stream":!0,"@metamask/providers>json-rpc-middleware-stream":!0,"@metamask/rpc-errors":!0,"browserify>stream-browserify":!0,"eslint>fast-deep-equal":!0}},"@metamask/providers>@metamask/safe-event-emitter":{globals:{setTimeout:!0},packages:{"browserify>events":!0}},"@metamask/providers>detect-browser":{globals:{document:!0,navigator:!0},packages:{"browserify>process":!0}},"@metamask/providers>extension-port-stream":{packages:{"browserify>buffer":!0,"browserify>stream-browserify":!0}},"@metamask/providers>json-rpc-middleware-stream":{globals:{"console.warn":!0,setTimeout:!0},packages:{"@metamask/providers>@metamask/safe-event-emitter":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream":{packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>isarray":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0,"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":!0,"browserify>browser-resolve":!0,"browserify>events":!0,"browserify>inherits":!0,"browserify>process":!0,"browserify>readable-stream>core-util-is":!0,"browserify>readable-stream>process-nextick-args":!0,"browserify>readable-stream>util-deprecate":!0,"browserify>timers-browserify":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":{packages:{"browserify>buffer":!0}},"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder":{packages:{"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer":!0}},"@metamask/rpc-errors":{packages:{"@metamask/rpc-errors>fast-safe-stringify":!0,"@metamask/utils":!0}},"@metamask/utils":{globals:{TextDecoder:!0,TextEncoder:!0},packages:{"@metamask/utils>@noble/hashes":!0,"@swc/cli>semver":!0,"browserify>buffer":!0,"eslint>debug":!0,superstruct:!0}},"@metamask/utils>@noble/hashes":{globals:{TextEncoder:!0,crypto:!0}},"@swc/cli>semver":{globals:{"console.error":!0},packages:{"@swc/cli>semver>lru-cache":!0,"browserify>process":!0}},"@swc/cli>semver>lru-cache":{packages:{"@swc/cli>semver>lru-cache>yallist":!0}},"browserify>browser-pack>safe-buffer":{packages:{"browserify>buffer":!0}},"browserify>buffer":{globals:{console:!0},packages:{"browserify>buffer>base64-js":!0,"browserify>buffer>ieee754":!0}},"browserify>events":{globals:{console:!0}},"browserify>process":{globals:{clearTimeout:!0,setTimeout:!0}},"browserify>readable-stream>core-util-is":{packages:{"browserify>insert-module-globals>is-buffer":!0}},"browserify>readable-stream>process-nextick-args":{packages:{"browserify>process":!0}},"browserify>readable-stream>util-deprecate":{globals:{"console.trace":!0,"console.warn":!0,localStorage:!0}},"browserify>stream-browserify":{packages:{"@lavamoat/lavapack>readable-stream":!0,"browserify>events":!0,"browserify>inherits":!0}},"browserify>string_decoder":{packages:{"browserify>browser-pack>safe-buffer":!0}},"browserify>timers-browserify":{globals:{clearInterval:!0,clearTimeout:!0,setInterval:!0,setTimeout:!0},packages:{"browserify>process":!0}},"eslint>debug":{globals:{console:!0,document:!0,localStorage:!0,navigator:!0,process:!0},packages:{"browserify>process":!0,"eslint>debug>ms":!0}},"external:../snaps-utils/src/errors.ts":{packages:{"@metamask/rpc-errors":!0,"@metamask/utils":!0}},"external:../snaps-utils/src/icon.ts":{builtin:{buffer:!0}},"external:../snaps-utils/src/index.executionenv.ts":{packages:{"external:../snaps-utils/src/errors.ts":!0,"external:../snaps-utils/src/handlers.ts":!0,"external:../snaps-utils/src/logging.ts":!0,"external:../snaps-utils/src/namespace.ts":!0,"external:../snaps-utils/src/types.ts":!0}},"external:../snaps-utils/src/logging.ts":{globals:{"console.error":!0,"console.log":!0,"console.warn":!0},packages:{"@metamask/utils":!0}},"external:../snaps-utils/src/namespace.ts":{packages:{superstruct:!0}},"external:../snaps-utils/src/types.ts":{globals:{URL:!0},packages:{"@metamask/utils":!0,"external:../snaps-utils/src/handlers.ts":!0,superstruct:!0}},superstruct:{globals:{"console.warn":!0,define:!0}}}});