@web3auth/no-modal 6.1.1 → 6.1.3

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.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see noModal.umd.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoModal=t():e.NoModal=t()}(self,(()=>(()=>{var e={6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteArrayToHashObject=t.hashObjectToByteArray=void 0,t.hashObjectToByteArray=function(e,t,r){let n=e.h0;t[0+r]=255&n,n>>=8,t[1+r]=255&n,n>>=8,t[2+r]=255&n,n>>=8,t[3+r]=255&n,n=e.h1,t[4+r]=255&n,n>>=8,t[5+r]=255&n,n>>=8,t[6+r]=255&n,n>>=8,t[7+r]=255&n,n=e.h2,t[8+r]=255&n,n>>=8,t[9+r]=255&n,n>>=8,t[10+r]=255&n,n>>=8,t[11+r]=255&n,n=e.h3,t[12+r]=255&n,n>>=8,t[13+r]=255&n,n>>=8,t[14+r]=255&n,n>>=8,t[15+r]=255&n,n=e.h4,t[16+r]=255&n,n>>=8,t[17+r]=255&n,n>>=8,t[18+r]=255&n,n>>=8,t[19+r]=255&n,n=e.h5,t[20+r]=255&n,n>>=8,t[21+r]=255&n,n>>=8,t[22+r]=255&n,n>>=8,t[23+r]=255&n,n=e.h6,t[24+r]=255&n,n>>=8,t[25+r]=255&n,n>>=8,t[26+r]=255&n,n>>=8,t[27+r]=255&n,n=e.h7,t[28+r]=255&n,n>>=8,t[29+r]=255&n,n>>=8,t[30+r]=255&n,n>>=8,t[31+r]=255&n},t.byteArrayToHashObject=function(e){let t=0;t|=255&e[3],t<<=8,t|=255&e[2],t<<=8,t|=255&e[1],t<<=8,t|=255&e[0];const r=t;t=0,t|=255&e[7],t<<=8,t|=255&e[6],t<<=8,t|=255&e[5],t<<=8,t|=255&e[4];const n=t;t=0,t|=255&e[11],t<<=8,t|=255&e[10],t<<=8,t|=255&e[9],t<<=8,t|=255&e[8];const i=t;t=0,t|=255&e[15],t<<=8,t|=255&e[14],t<<=8,t|=255&e[13],t<<=8,t|=255&e[12];const o=t;t=0,t|=255&e[19],t<<=8,t|=255&e[18],t<<=8,t|=255&e[17],t<<=8,t|=255&e[16];const s=t;t=0,t|=255&e[23],t<<=8,t|=255&e[22],t<<=8,t|=255&e[21],t<<=8,t|=255&e[20];const a=t;t=0,t|=255&e[27],t<<=8,t|=255&e[26],t<<=8,t|=255&e[25],t<<=8,t|=255&e[24];const u=t;return t=0,t|=255&e[31],t<<=8,t|=255&e[30],t<<=8,t|=255&e[29],t<<=8,t|=255&e[28],{h0:r,h1:n,h2:i,h3:o,h4:s,h5:a,h6:u,h7:t}}},5113:(e,t)=>{"use strict";function r(e,t){const r=BigInt(1)<<BigInt(e);if(t>=r)throw new Error(`index ${t} too large for depth ${e}`);return r|t}Object.defineProperty(t,"__esModule",{value:!0}),t.gindexChild=t.gindexParent=t.gindexSibling=t.concatGindices=t.getGindexBits=t.gindexIterator=t.getGindicesAtDepth=t.iterateAtDepth=t.countToDepth=t.convertGindexToBitstring=t.toGindexBitstring=t.toGindex=t.bitIndexBigInt=void 0,t.bitIndexBigInt=function(e){return e.toString(2).length-1},t.toGindex=r,t.toGindexBitstring=function(e,t){const r=t?Number(t).toString(2):"";if(r.length>e)throw new Error("index too large for depth");return"1"+r.padStart(e,"0")},t.convertGindexToBitstring=function(e){if("string"==typeof e){if(0===e.length)throw new Error(n);return e}if(e<1)throw new Error(n);return e.toString(2)},t.countToDepth=function(e){return e<=1?0:(e-BigInt(1)).toString(2).length},t.iterateAtDepth=function(e,t,n){if(t+n>BigInt(1)<<BigInt(e))throw new Error("Too large for depth");let i=r(e,t);const o=i+n;return{[Symbol.iterator]:()=>({next(){if(i<o){const e=i;return i++,{done:!1,value:e}}return{done:!0,value:void 0}}})}},t.getGindicesAtDepth=function(e,t,n){if(t+n>BigInt(1)<<BigInt(e))throw new Error("Too large for depth");let i=r(e,BigInt(t));const o=[];for(let e=0;e<n;e++)o.push(i++);return o};const n="Invalid gindex";t.gindexIterator=function(e){let t;if("string"==typeof e){if(!e.length)throw new Error(n);t=e}else{if(e<1)throw new Error(n);t=e.toString(2)}let r=1;const i=()=>{if(r===t.length)return{done:!0,value:void 0};const e=Number(t[r]);return r++,{done:!1,value:e}};return{[Symbol.iterator]:()=>({next:i}),remainingBitLength:()=>t.length-r}},t.getGindexBits=function(e){let t;if("string"==typeof e){if(!e.length)throw new Error(n);t=e}else{if(e<1)throw new Error(n);t=e.toString(2)}const r=[];for(let e=1;e<t.length;e++)r.push(Number(t[e]));return r},t.concatGindices=function(e){return BigInt(e.reduce(((e,t)=>e+t.toString(2).slice(1)),"0b1"))},t.gindexSibling=function(e){return e^BigInt(1)},t.gindexParent=function(e){return e/BigInt(2)},t.gindexChild=function(e,t){return e*BigInt(2)+BigInt(t)}},9457:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.setHasher=t.hasher=void 0;const o=r(7207);i(r(4571),t),i(r(336),t),t.hasher=o.hasher,t.setHasher=function(e){t.hasher=e}},7207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasher=void 0;const n=r(6053),i=r(336),o=(e,t)=>n.sha256.create().update(e).update(t).digest();t.hasher={digest64:o,digest64HashObjects:(e,t)=>i.uint8ArrayToHashObject(o(i.hashObjectToUint8Array(e),i.hashObjectToUint8Array(t)))}},4571:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint8ArrayToHashObject=t.hashObjectToUint8Array=void 0;const n=r(6975);t.hashObjectToUint8Array=function(e){const t=new Uint8Array(32);return n.hashObjectToByteArray(e,t,0),t},t.uint8ArrayToHashObject=function(e){return n.byteArrayToHashObject(e)}},6567:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(5113),t),i(r(9457),t),i(r(8894),t),i(r(628),t),i(r(7392),t),i(r(8738),t),i(r(2969),t),i(r(7048),t)},8894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bitwiseOrNodeH=t.setNodeH=t.getNodeH=t.compose=t.identity=t.LeafNode=t.BranchNode=t.Node=void 0;const n=r(9457),i=2**32;class o{constructor(e,t,r,n,i,o,s,a){this.h0=e,this.h1=t,this.h2=r,this.h3=n,this.h4=i,this.h5=o,this.h6=s,this.h7=a}applyHash(e){this.h0=e.h0,this.h1=e.h1,this.h2=e.h2,this.h3=e.h3,this.h4=e.h4,this.h5=e.h5,this.h6=e.h6,this.h7=e.h7}}t.Node=o,t.BranchNode=class extends o{constructor(e,t){if(super(null,0,0,0,0,0,0,0),this._left=e,this._right=t,!e)throw new Error("Left node is undefined");if(!t)throw new Error("Right node is undefined")}get rootHashObject(){return null===this.h0&&super.applyHash(n.hasher.digest64HashObjects(this.left.rootHashObject,this.right.rootHashObject)),this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this._left}get right(){return this._right}};class s extends o{static fromRoot(e){return this.fromHashObject(n.uint8ArrayToHashObject(e))}static fromHashObject(e){return new s(e.h0,e.h1,e.h2,e.h3,e.h4,e.h5,e.h6,e.h7)}static fromZero(){return new s(0,0,0,0,0,0,0,0)}static fromUint32(e){return new s(e,0,0,0,0,0,0,0)}clone(){return s.fromHashObject(this)}get rootHashObject(){return this}get root(){return n.hashObjectToUint8Array(this)}isLeaf(){return!0}get left(){throw Error("LeafNode has no left node")}get right(){throw Error("LeafNode has no right node")}writeToBytes(e,t,r){e.set(this.root.slice(0,r),t)}getUint(e,t,r){const n=Math.floor(t/4);if(e<4){const r=t%4*8,i=a(this,n);return 1===e?255&i>>r:65535&i>>r}if(4===e)return a(this,n)>>>0;if(8===e){const e=a(this,n),t=a(this,n+1);return 0===t?e>>>0:-1===t&&-1===e&&r?1/0:(e>>>0)+(t>>>0)*i}throw Error("uintBytes > 8")}getUintBigint(e,t){const r=Math.floor(t/4);if(e<4){const n=t%4*8,i=a(this,r);return 1===e?BigInt(255&i>>n):BigInt(65535&i>>n)}if(4===e)return BigInt(a(this,r)>>>0);{const t=Math.ceil(e/4);let n=BigInt(0);for(let e=0;e<t;e++)n+=BigInt(a(this,r+e)>>>0)<<BigInt(32*e);return n}}setUint(e,t,r,n){const o=Math.floor(t/4);if(e<4){const n=t%4*8;let i=a(this,o);1===e?(i&=~(255<<n),i|=r<<n):(i&=~(65535<<n),i|=r<<n),u(this,o,i)}else if(4===e)u(this,o,r);else{if(8!==e)throw Error("uintBytes > 8");r===1/0&&n?(u(this,o,-1),u(this,o+1,-1)):(u(this,o,4294967295&r),u(this,o+1,r/i&4294967295))}}setUintBigint(e,t,r){const n=Math.floor(t/4);if(e<4){const i=Number(r),o=t%4*8;let s=a(this,n);1===e?(s&=~(255<<o),s|=i<<o):(s&=~(65535<<o),s|=i<<o),u(this,n,s)}else if(4===e)u(this,n,Number(r));else{const t=n+Math.ceil(e/4);for(let e=n;e<t;e++)u(this,e,Number(r&BigInt(4294967295))),r>>=BigInt(32)}}bitwiseOrUint(e,t,r){const n=Math.floor(t/4);if(e<4)c(this,n,r<<t%4*8);else if(4===e)c(this,n,r);else{const t=n+Math.ceil(e/4);for(let e=n;e<t;e++)c(this,e,4294967295&r),r>>=32}}}function a(e,t){if(0===t)return e.h0;if(1===t)return e.h1;if(2===t)return e.h2;if(3===t)return e.h3;if(4===t)return e.h4;if(5===t)return e.h5;if(6===t)return e.h6;if(7===t)return e.h7;throw Error("hIndex > 7")}function u(e,t,r){if(0===t)e.h0=r;else if(1===t)e.h1=r;else if(2===t)e.h2=r;else if(3===t)e.h3=r;else if(4===t)e.h4=r;else if(5===t)e.h5=r;else if(6===t)e.h6=r;else{if(7!==t)throw Error("hIndex > 7");e.h7=r}}function c(e,t,r){if(0===t)e.h0|=r;else if(1===t)e.h1|=r;else if(2===t)e.h2|=r;else if(3===t)e.h3|=r;else if(4===t)e.h4|=r;else if(5===t)e.h5|=r;else if(6===t)e.h6|=r;else{if(7!==t)throw Error("hIndex > 7");e.h7|=r}}t.LeafNode=s,t.identity=function(e){return e},t.compose=function(e,t){return function(r){return t(e(r))}},t.getNodeH=a,t.setNodeH=u,t.bitwiseOrNodeH=c},628:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packedNodeRootsToBytes=t.packedRootsBytesToLeafNodes=t.packedRootsBytesToNode=void 0;const n=r(8738),i=r(8894);function o(e,t,r){const n=r-t,o=Math.floor(n/32),s=new Array(Math.ceil(n/32));for(let r=0;r<o;r++){const n=t+32*r;s[r]=new i.LeafNode(e.getInt32(n+0,!0),e.getInt32(n+4,!0),e.getInt32(n+8,!0),e.getInt32(n+12,!0),e.getInt32(n+16,!0),e.getInt32(n+20,!0),e.getInt32(n+24,!0),e.getInt32(n+28,!0))}const a=n%32;if(a>0){const r=new i.LeafNode(0,0,0,0,0,0,0,0);s[o]=r;const u=Math.floor(a/4);for(let n=0;n<u;n++)i.setNodeH(r,n,e.getInt32(t+32*o+4*n,!0));const c=n%4;if(c>0){let o=0;for(let r=0;r<c;r++)o|=e.getUint8(t+n-c+r)<<8*r;i.setNodeH(r,u,o)}}return s}t.packedRootsBytesToNode=function(e,t,r,i){const s=o(t,r,i);return n.subtreeFillToContents(s,e)},t.packedRootsBytesToLeafNodes=o,t.packedNodeRootsToBytes=function(e,t,r,n){const o=r%32,s=Math.floor(r/32);for(let r=0;r<s;r++){const i=n[r],o=t+32*r;e.setInt32(o+0,i.h0,!0),e.setInt32(o+4,i.h1,!0),e.setInt32(o+8,i.h2,!0),e.setInt32(o+12,i.h3,!0),e.setInt32(o+16,i.h4,!0),e.setInt32(o+20,i.h5,!0),e.setInt32(o+24,i.h6,!0),e.setInt32(o+28,i.h7,!0)}if(o>0){const a=n[s],u=Math.floor(o/4);for(let r=0;r<u;r++)e.setInt32(t+32*s+4*r,i.getNodeH(a,r),!0);const c=r%4;if(c>0){const n=i.getNodeH(a,u);for(let i=0;i<c;i++)e.setUint8(t+r-c+i,n>>8*i&255)}}}},65:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeFromCompactMultiProof=t.createCompactMultiProof=t.compactMultiProofToNode=t.nodeToCompactMultiProof=t.descriptorToBitlist=t.computeDescriptor=void 0;const n=r(5113),i=r(8894),o=r(5410);function s(e,t){const r=t%8,n=e[Math.floor(t/8)];switch(r){case 0:return 0!=(128&n);case 1:return 0!=(64&n);case 2:return 0!=(32&n);case 3:return 0!=(16&n);case 4:return 0!=(8&n);case 5:return 0!=(4&n);case 6:return 0!=(2&n);case 7:return 0!=(1&n);default:throw new Error("unreachable")}}function a(e){const t=[],r=8*e.length;let n=0,i=0;for(let o=0;o<r;o++){const a=s(e,o);if(t.push(a),a?i++:n++,i>n){if(o++,o+7<r)throw new Error("Invalid descriptor: too many bytes");for(;o<r;o++)if(s(e,o))throw new Error("Invalid descriptor: too many 1 bits");return t}}throw new Error("Invalid descriptor: not enough 1 bits")}function u(e,t,r){if(t[r])return[e.root];{const n=u(e.left,t,r+1),i=u(e.right,t,r+2*n.length);return[...n,...i]}}function c(e,t,r){return e[r.bitIndex++]?i.LeafNode.fromRoot(t[r.leafIndex++]):new i.BranchNode(c(e,t,r),c(e,t,r))}t.computeDescriptor=function(e){const t=new Set,r=new Set;for(const i of e){const e=n.convertGindexToBitstring(i);t.add(e);const{branch:s,path:a}=o.computeProofBitstrings(e);a.delete(e);for(const e of a)r.add(e);for(const e of s)t.add(e)}for(const e of r)t.delete(e);const i=Array.from(t).sort(((e,t)=>e.localeCompare(t)));let s="";for(const e of i)for(let t=0;t<e.length;t++)if("1"===e[e.length-1-t]){s+="1".padStart(t+1,"0");break}s.length%8!=0&&(s=s.padEnd(8-s.length%8+s.length,"0"));const a=new Uint8Array(s.length/8);for(let e=0;e<a.length;e++)a[e]=Number("0b"+s.substring(8*e,8*(e+1)));return a},t.descriptorToBitlist=a,t.nodeToCompactMultiProof=u,t.compactMultiProofToNode=c,t.createCompactMultiProof=function(e,t){return u(e,a(t),0)},t.createNodeFromCompactMultiProof=function(e,t){const r=a(t);if(r.length!==2*e.length-1)throw new Error("Invalid multiproof: invalid number of leaves");return c(r,e,{bitIndex:0,leafIndex:0})}},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeProof=t.serializeProof=t.createNodeFromProof=t.createProof=t.ProofTypeSerialized=t.ProofType=t.descriptorToBitlist=t.computeDescriptor=void 0;const n=r(4871),i=r(65),o=r(2456),s=r(5492);var a,u=r(65);Object.defineProperty(t,"computeDescriptor",{enumerable:!0,get:function(){return u.computeDescriptor}}),Object.defineProperty(t,"descriptorToBitlist",{enumerable:!0,get:function(){return u.descriptorToBitlist}}),function(e){e.single="single",e.treeOffset="treeOffset",e.multi="multi",e.compactMulti="compactMulti"}(a=t.ProofType||(t.ProofType={})),t.ProofTypeSerialized=[a.single,a.treeOffset,a.multi,a.compactMulti],t.createProof=function(e,t){switch(t.type){case a.single:{const[r,n]=o.createSingleProof(e,t.gindex);return{type:a.single,gindex:t.gindex,leaf:r,witnesses:n}}case a.treeOffset:{const[r,n]=s.createTreeOffsetProof(e,t.gindices);return{type:a.treeOffset,offsets:r,leaves:n}}case a.multi:{const[r,i,o]=n.createMultiProof(e,t.gindices);return{type:a.multi,leaves:r,witnesses:i,gindices:o}}case a.compactMulti:{const r=i.createCompactMultiProof(e,t.descriptor);return{type:a.compactMulti,leaves:r,descriptor:t.descriptor}}default:throw new Error("Invalid proof type")}},t.createNodeFromProof=function(e){switch(e.type){case a.single:return o.createNodeFromSingleProof(e.gindex,e.leaf,e.witnesses);case a.treeOffset:return s.createNodeFromTreeOffsetProof(e.offsets,e.leaves);case a.multi:return n.createNodeFromMultiProof(e.leaves,e.witnesses,e.gindices);case a.compactMulti:return i.createNodeFromCompactMultiProof(e.leaves,e.descriptor);default:throw new Error("Invalid proof type")}},t.serializeProof=function(e){switch(e.type){case a.single:case a.multi:throw new Error("Not implemented");case a.treeOffset:{const r=new Uint8Array(1+s.computeTreeOffsetProofSerializedLength(e.offsets,e.leaves));return r[0]=t.ProofTypeSerialized.indexOf(a.treeOffset),s.serializeTreeOffsetProof(r,1,e.offsets,e.leaves),r}default:throw new Error("Invalid proof type")}},t.deserializeProof=function(e){const r=t.ProofTypeSerialized[e[0]];if(!r)throw new Error("Invalid proof type");switch(r){case a.single:case a.multi:throw new Error("Not implemented");case a.treeOffset:{const[t,r]=s.deserializeTreeOffsetProof(e,1);return{type:a.treeOffset,offsets:t,leaves:r}}default:throw new Error("Invalid proof type")}}},4871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeFromMultiProof=t.createMultiProof=void 0;const n=r(8894),i=r(2969),o=r(5410);t.createMultiProof=function(e,t){const r=new i.Tree(e),n=o.computeMultiProofBitstrings(t.map((e=>e.toString(2))),!1,o.SortOrder.Decreasing),s=t.slice().sort(((e,t)=>e<t?1:-1));return[s.map((e=>r.getRoot(e))),n.map((e=>r.getRoot(e))),s]},t.createNodeFromMultiProof=function(e,t,r){if(e.length!==r.length)throw new Error("Leaves length should equal gindices length");const i=r.map((e=>e.toString(2))),s=o.computeMultiProofBitstrings(i,!1,o.SortOrder.Decreasing);if(s.length!==t.length)throw new Error("Witnesses length should equal witnesses gindices length");const a=Math.max(i[0]?.length??0,s[0]?.length??0),u=Object.fromEntries(Array.from({length:a},((e,t)=>[t+1,{}])));for(let t=0;t<i.length;t++){const r=i[t],o=e[t];u[r.length][r]=n.LeafNode.fromRoot(o)}for(let e=0;e<s.length;e++){const r=s[e],i=t[e];u[r.length][r]=n.LeafNode.fromRoot(i)}for(let e=a;e>1;e--){const t=u[e],r=u[e-1];for(const e of Object.keys(t)){const i=t[e];if(!i)continue;const o="0"===e[e.length-1],s=e.substring(0,e.length-1),a=s+(o?"1":"0"),u=t[a];if(!u)throw new Error(`Sibling not found: ${a}`);const c=o?new n.BranchNode(i,u):new n.BranchNode(u,i);r[s]=c,delete t[e],delete t[a]}}const c=u[1][1];if(!c)throw new Error("Internal consistency error: no root found");return c}},2456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createNodeFromSingleProof=t.createSingleProof=t.ERR_INVALID_NAV=void 0;const n=r(8894),i=r(5113);t.ERR_INVALID_NAV="Invalid tree navigation",t.createSingleProof=function(e,r){const n=[];let o=e;for(const e of i.gindexIterator(r))if(e){if(o.isLeaf())throw new Error(t.ERR_INVALID_NAV);n.push(o.left.root),o=o.right}else{if(o.isLeaf())throw new Error(t.ERR_INVALID_NAV);n.push(o.right.root),o=o.left}return[o.root,n.reverse()]},t.createNodeFromSingleProof=function(e,t,r){let i=n.LeafNode.fromRoot(t);const o=r.slice().reverse();for(;e>1;){const t=n.LeafNode.fromRoot(o.pop());i=e%BigInt(2)===BigInt(0)?new n.BranchNode(i,t):new n.BranchNode(t,i),e/=BigInt(2)}return i}},5492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeTreeOffsetProof=t.serializeTreeOffsetProof=t.computeTreeOffsetProofSerializedLength=t.createNodeFromTreeOffsetProof=t.createTreeOffsetProof=t.treeOffsetProofToNode=t.nodeToTreeOffsetProof=void 0;const n=r(8894),i=r(5410);function o(e,t,r){if(r.length&&r[0].startsWith(t)){if(t===r[0])return r.shift(),[[],[e.root]];{const[n,i]=o(e.left,t+"0",r),[s,a]=o(e.right,t+"1",r);return[[i.length].concat(n,s),i.concat(a)]}}return[[],[]]}function s(e,t){if(t.length){if(1===t.length)return n.LeafNode.fromRoot(t[0]);{const r=e[0];return new n.BranchNode(s(e.slice(1,r),t.slice(0,r)),s(e.slice(r),t.slice(r)))}}throw new Error("Proof must contain gt 0 leaves")}t.nodeToTreeOffsetProof=o,t.treeOffsetProofToNode=s,t.createTreeOffsetProof=function(e,t){return o(e,"1",i.computeMultiProofBitstrings(t.map((e=>e.toString(2)))))},t.createNodeFromTreeOffsetProof=function(e,t){return s(e,t)},t.computeTreeOffsetProofSerializedLength=function(e,t){return 2*(e.length+1)+32*t.length},t.serializeTreeOffsetProof=function(e,t,r,n){const i=new DataView(e.buffer,e.byteOffset,e.byteLength);i.setUint16(t,n.length,!0);const o=t+2;for(let e=0;e<r.length;e++)i.setUint16(2*e+o,r[e],!0);const s=o+2*r.length;for(let t=0;t<n.length;t++)e.set(n[t],32*t+s)},t.deserializeTreeOffsetProof=function(e,t){const r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=r.getUint16(t,!0);if(e.length<2*(n-1)+32*n)throw new Error("Unable to deserialize tree offset proof: not enough bytes");const i=t+2,o=Array.from({length:n-1},((e,t)=>r.getUint16(2*t+i,!0))),s=i+2*o.length;return[o,Array.from({length:n},((t,r)=>e.subarray(32*r+s,32*(r+1)+s)))]}},5410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeMultiProofBitstrings=t.SortOrder=t.filterParentBitstrings=t.sortDecreasingBitstrings=t.sortInOrderBitstrings=t.computeProofBitstrings=t.computeProofGindices=void 0;const n=r(5113);function i(e){const t=new Set,r=new Set;let n=e;for(;n.length>1;){t.add(n);const e=n[n.length-1],i=n.substring(0,n.length-1);r.add(i+(1^Number(e))),n=i}return{path:t,branch:r}}function o(e,t){return e.length?e.map((e=>e.padEnd(t))).sort().map((e=>e.trim())):[]}function s(e){return e.length?e.sort(((e,t)=>{if(e.length<t.length)return 1;if(t.length<e.length)return-1;let r=e.indexOf("0"),n=t.indexOf("0");for(;;){if(-1===r)return-1;if(-1===n)return 1;if(r<n)return 1;if(n<r)return-1;r=e.indexOf("0",r+1),n=t.indexOf("0",n+1)}})):[]}function a(e){const t=e.slice().sort(((e,t)=>e.length-t.length)),r=[];e:for(let e=0;e<t.length;e++){const n=t[e];for(let r=e+1;r<t.length;r++)if(t[r].startsWith(n))continue e;r.push(n)}return r}var u;t.computeProofGindices=function(e){const t=new Set,r=new Set;let i=e;for(;i>1;)t.add(i),r.add(n.gindexSibling(i)),i=n.gindexParent(i);return{path:t,branch:r}},t.computeProofBitstrings=i,t.sortInOrderBitstrings=o,t.sortDecreasingBitstrings=s,t.filterParentBitstrings=a,function(e){e[e.InOrder=0]="InOrder",e[e.Decreasing=1]="Decreasing",e[e.Unsorted=2]="Unsorted"}(u=t.SortOrder||(t.SortOrder={})),t.computeMultiProofBitstrings=function(e,t=!0,r=u.InOrder){const n=a(e),c=new Set(t?n:[]),l=new Set,f=new Set;let h=1;for(const e of n){e.length>h&&(h=e.length);const{path:t,branch:r}=i(e);t.forEach((e=>l.add(e))),r.forEach((e=>f.add(e)))}switch(l.forEach((e=>f.delete(e))),f.forEach((e=>c.add(e))),r){case u.InOrder:return o(Array.from(c),h);case u.Decreasing:return s(Array.from(c));case u.Unsorted:return Array.from(c)}}},8738:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subtreeFillToContents=t.subtreeFillToLength=t.subtreeFillToDepth=void 0;const n=r(8894),i=r(7048);function o(e,t){let r=e;for(;t>0;)r=new n.BranchNode(r,r),t--;return r}t.subtreeFillToDepth=o,t.subtreeFillToLength=function e(t,r,s){const a=1<<r;if(s>a)throw new Error("ERR_TOO_MANY_NODES");if(s===a)return o(t,r);if(0===r){if(1===s)return t;throw new Error("ERR_NAVIGATION")}if(1===r)return new n.BranchNode(t,s>1?t:i.zeroNode(0));const u=a>>1;return s<=u?new n.BranchNode(e(t,r-1,s),i.zeroNode(r-1)):new n.BranchNode(o(t,r-1),e(t,r-1,s-u))},t.subtreeFillToContents=function(e,t){const r=2**t;if(e.length>r)throw new Error(`nodes.length ${e.length} over maxIndex at depth ${t}`);if(0===e.length)return i.zeroNode(t);if(0===t)return e[0];if(1===t)return e.length>1?new n.BranchNode(e[0],e[1]):new n.BranchNode(e[0],i.zeroNode(0));let o=e.length;for(let r=t;r>0;r--){const s=o%2,a=o-s;for(let t=0;t<a;t+=2)e[t/2]=new n.BranchNode(e[t],e[t+1]);s>0&&(e[a/2]=new n.BranchNode(e[a],i.zeroNode(t-r))),o=a/2+s}return e[0]}},2969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treeZeroAfterIndex=t.iterateNodesAtDepth=t.getNodesAtDepth=t.setNodesAtDepth=t.setNodeAtDepth=t.getNodeAtDepth=t.setNodeWithFn=t.setNode=t.getNode=t.Tree=void 0;const n=r(7048),i=r(5113),o=r(8894),s=r(7392),a=r(2456);class u{constructor(e,t){this._rootNode=e,t&&("undefined"==typeof WeakRef?this.hook=t:this.hook=new WeakRef(t))}static createFromProof(e){return new u(s.createNodeFromProof(e))}get rootNode(){return this._rootNode}set rootNode(e){if(this._rootNode=e,this.hook)if("undefined"==typeof WeakRef)this.hook(e);else{const t=this.hook.deref();t?t(e):this.hook=void 0}}get root(){return this.rootNode.root}clone(){return new u(this.rootNode)}getSubtree(e){return new u(this.getNode(e),(t=>this.setNode(e,t)))}getNode(e){return c(this.rootNode,e)}getNodeAtDepth(e,t){return p(this.rootNode,e,t)}getRoot(e){return this.getNode(e).root}setNode(e,t){this.rootNode=l(this.rootNode,e,t)}setNodeWithFn(e,t){this.rootNode=f(this.rootNode,e,t)}setNodeAtDepth(e,t,r){this.rootNode=y(this.rootNode,e,t,r)}setRoot(e,t){this.setNode(e,o.LeafNode.fromRoot(t))}getNodesAtDepth(e,t,r){return m(this.rootNode,e,t,r)}iterateNodesAtDepth(e,t,r){return b(this.rootNode,e,t,r)}getSingleProof(e){return a.createSingleProof(this.rootNode,e)[1]}getProof(e){return s.createProof(this.rootNode,e)}}function c(e,t){const r=i.convertGindexToBitstring(t);let n=e;for(let e=1;e<r.length;e++){if(n.isLeaf())throw new Error(`Invalid tree - found leaf at depth ${e}`);n="1"===r[e]?n.right:n.left}return n}function l(e,t,r){const n=i.convertGindexToBitstring(t);return d(n,h(e,n),r)}function f(e,t,r){const n=i.convertGindexToBitstring(t),o=h(e,n),s=o[o.length-1];return d(n,o,r("1"===n[n.length-1]?s.right:s.left))}function h(e,t){let r=e;const n=[e];for(let e=1;e<t.length-1;e++)r="1"===t[e]?r.right:r.left,n.push(r);return n}function d(e,t,r){let n=r;for(let r=e.length-1;r>=1;r--)n="1"===e[r]?new o.BranchNode(t[r-1].left,n):new o.BranchNode(n,t[r-1].right);return n}function p(e,t,r){if(0===t)return e;if(1===t)return 0===r?e.left:e.right;let n=e;for(let e=t-1;e>=0;e--)n=v(e,r)?n.left:n.right;return n}function y(e,t,r,n){return g(e,t,[r],[n])}function g(e,t,r,n){if(0===t)return n.length>0?n[0]:e;const i=new Array(t),s=new Array(t),a=t-1;let u=a,c=e;i[a]=e;for(let e=0;e<r.length;e++){const t=r[e];for(let e=u;e>0;e--)c=v(e,t)?c.left:c.right,i[e-1]=c;u=0,1!=(1&t)?t+1===r[e+1]?(c=new o.BranchNode(n[e],n[e+1]),e++):c=new o.BranchNode(n[e],c.right):c=new o.BranchNode(c.left,n[e]);const h=e>=r.length-1,d=h?a:(l=t,f=r[e+1],Math.ceil(Math.log2(-~(l^f)))-1);for(let e=1;e<=d;e++)if(v(e,t))h||e!==d?c=new o.BranchNode(c,i[e].right):(s[e]=c,c=i[e]);else{const t=s[e];void 0!==t?(c=new o.BranchNode(t,c),s[e]=void 0):c=new o.BranchNode(i[e].left,c)}u=d}var l,f;return c}function m(e,t,r,n){if(0===t)return 0===r&&n>0?[e]:[];if(1===t)return 0===n?[]:1===n?0===r?[e.left]:[e.right]:[e.left,e.right];const i=t-1;let o=i,s=e;const a=new Array(t),u=new Array(t),c=new Array(n);a[i]=e;for(let e=0;e<n;e++){for(let t=o;t>=0;t--){t!==o&&(a[t]=s);const n=v(t,r+e);u[t]=n,s=n?s.left:s.right}c[e]=s;for(let e=0;e<=i;e++)if(!0===u[e]){o=e;break}s=a[o]}return c}function*b(e,t,r,n){const i=r+n,o=t-1;let s=o,a=e;const u=new Array(t),c=new Array(t);u[o]=e;for(let e=r;e<i;e++){for(let t=s;t>=0;t--){t!==s&&(u[t]=a);const r=v(t,e);c[t]=r,a=r?a.left:a.right}yield a;for(let e=0;e<=o;e++)if(!0===c[e]){s=e;break}a=u[s]}}function v(e,t){if(e>31){const r=1<<e-32;return(t/2**32>>>0&r)!==r}const r=1<<e;return(t&r)!==r}t.Tree=u,t.getNode=c,t.setNode=l,t.setNodeWithFn=f,t.getNodeAtDepth=p,t.setNodeAtDepth=y,t.setNodesAtDepth=g,t.getNodesAtDepth=m,t.iterateNodesAtDepth=b,t.treeZeroAfterIndex=function(e,t,r){if(r<0)return n.zeroNode(t);const i=new Array(t),s=t-1;let a=s,u=e;i[s]=e;for(let e=a;e>=0;e--)u=v(e,r)?u.left:u.right,i[e-1]=u;a=0;for(let e=0;e<=s;e++)u=v(e,r)?new o.BranchNode(u,n.zeroNode(e)):new o.BranchNode(i[e].left,u);return u}},7048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroNode=void 0;const n=r(8894),i=[n.LeafNode.fromZero()];t.zeroNode=function(e){if(e>=i.length)for(let t=i.length;t<=e;t++)i[t]=new n.BranchNode(i[t-1],i[t-1]);return i[e]}},8747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BranchNodeStruct=void 0;const n=r(6567);class i extends n.Node{constructor(e,t){super(null,0,0,0,0,0,0,0),this.valueToNode=e,this.value=t}get rootHashObject(){if(null===this.h0){const e=this.valueToNode(this.value);super.applyHash(e.rootHashObject)}return this}get root(){return n.hashObjectToUint8Array(this.rootHashObject)}isLeaf(){return!1}get left(){return this.valueToNode(this.value).left}get right(){return this.valueToNode(this.value).right}}t.BranchNodeStruct=i},557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash64=t.byteArrayEquals=t.toHexString=t.fromHexString=t.getUint8ByteToBitBooleanArray=t.BitArray=t.TreeViewDU=t.TreeView=t.isCompositeType=t.CompositeType=t.isBasicType=t.BasicType=t.Type=t.ByteArrayType=t.BitArrayType=t.ArrayType=t.VectorCompositeType=t.VectorBasicType=t.UnionType=t.UintNumberType=t.UintBigintType=t.NoneType=t.ListCompositeType=t.ListBasicType=t.ContainerNodeStructType=t.ContainerType=t.ByteVectorType=t.ByteListType=t.BooleanType=t.BitVectorType=t.BitListType=void 0;var n=r(284);Object.defineProperty(t,"BitListType",{enumerable:!0,get:function(){return n.BitListType}});var i=r(1393);Object.defineProperty(t,"BitVectorType",{enumerable:!0,get:function(){return i.BitVectorType}});var o=r(2034);Object.defineProperty(t,"BooleanType",{enumerable:!0,get:function(){return o.BooleanType}});var s=r(3568);Object.defineProperty(t,"ByteListType",{enumerable:!0,get:function(){return s.ByteListType}});var a=r(245);Object.defineProperty(t,"ByteVectorType",{enumerable:!0,get:function(){return a.ByteVectorType}});var u=r(5039);Object.defineProperty(t,"ContainerType",{enumerable:!0,get:function(){return u.ContainerType}});var c=r(3261);Object.defineProperty(t,"ContainerNodeStructType",{enumerable:!0,get:function(){return c.ContainerNodeStructType}});var l=r(6866);Object.defineProperty(t,"ListBasicType",{enumerable:!0,get:function(){return l.ListBasicType}});var f=r(5189);Object.defineProperty(t,"ListCompositeType",{enumerable:!0,get:function(){return f.ListCompositeType}});var h=r(1638);Object.defineProperty(t,"NoneType",{enumerable:!0,get:function(){return h.NoneType}});var d=r(436);Object.defineProperty(t,"UintBigintType",{enumerable:!0,get:function(){return d.UintBigintType}}),Object.defineProperty(t,"UintNumberType",{enumerable:!0,get:function(){return d.UintNumberType}});var p=r(1851);Object.defineProperty(t,"UnionType",{enumerable:!0,get:function(){return p.UnionType}});var y=r(5021);Object.defineProperty(t,"VectorBasicType",{enumerable:!0,get:function(){return y.VectorBasicType}});var g=r(4013);Object.defineProperty(t,"VectorCompositeType",{enumerable:!0,get:function(){return g.VectorCompositeType}});var m=r(9659);Object.defineProperty(t,"ArrayType",{enumerable:!0,get:function(){return m.ArrayType}});var b=r(6612);Object.defineProperty(t,"BitArrayType",{enumerable:!0,get:function(){return b.BitArrayType}});var v=r(4316);Object.defineProperty(t,"ByteArrayType",{enumerable:!0,get:function(){return v.ByteArrayType}});var w=r(7451);Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return w.Type}});var _=r(645);Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return _.BasicType}}),Object.defineProperty(t,"isBasicType",{enumerable:!0,get:function(){return _.isBasicType}});var E=r(8715);Object.defineProperty(t,"CompositeType",{enumerable:!0,get:function(){return E.CompositeType}}),Object.defineProperty(t,"isCompositeType",{enumerable:!0,get:function(){return E.isCompositeType}});var A=r(4984);Object.defineProperty(t,"TreeView",{enumerable:!0,get:function(){return A.TreeView}});var S=r(332);Object.defineProperty(t,"TreeViewDU",{enumerable:!0,get:function(){return S.TreeViewDU}});var T=r(1714);Object.defineProperty(t,"BitArray",{enumerable:!0,get:function(){return T.BitArray}}),Object.defineProperty(t,"getUint8ByteToBitBooleanArray",{enumerable:!0,get:function(){return T.getUint8ByteToBitBooleanArray}});var O=r(1518);Object.defineProperty(t,"fromHexString",{enumerable:!0,get:function(){return O.fromHexString}}),Object.defineProperty(t,"toHexString",{enumerable:!0,get:function(){return O.toHexString}}),Object.defineProperty(t,"byteArrayEquals",{enumerable:!0,get:function(){return O.byteArrayEquals}});var N=r(995);Object.defineProperty(t,"hash64",{enumerable:!0,get:function(){return N.hash64}})},7451:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Type=void 0,t.Type=class{value_toTree(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),this.tree_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}tree_toValue(e){const t=new Uint8Array(this.tree_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.tree_serializeToBytes({uint8Array:t,dataView:r},0,e),this.value_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}serialize(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),t}deserialize(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.value_deserializeFromBytes({uint8Array:e,dataView:t},0,e.length)}}},9659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayType=void 0;const n=r(6567),i=r(8715),o=r(3191);class s extends i.CompositeType{constructor(e){super(),this.elementType=e}defaultValue(){return o.value_defaultValueArray(this.elementType,this.defaultLen)}getPropertyType(){return this.elementType}getPropertyGindex(e){if("number"!=typeof e)throw Error(`Invalid array index: ${e}`);const t=Math.floor(e/this.itemsPerChunk);return n.toGindex(this.depth,BigInt(t))}getIndexProperty(e){return e}tree_getLeafGindices(e,t){let r;if(this.isList){if(!t)throw new Error("List type requires tree argument to get leaves");r=this.tree_getLength(t)}else r=this.tree_getLength(null);const o=[];if(i.isCompositeType(this.elementType)){const i=n.toGindex(this.depth,BigInt(0)),s=i+BigInt(r),a=n.concatGindices([e,i]);if(null===this.elementType.fixedSize){if(!t)throw new Error("Array of variable size requires tree argument to get leaves");for(let e=i,r=a;e<s;e++,r++)o.push(...this.elementType.tree_getLeafGindices(r,n.getNode(t,e)))}else for(let e=0,t=a;e<r;e++,t++)o.push(...this.elementType.tree_getLeafGindices(t))}else{const t=Math.ceil(r/this.itemsPerChunk),i=n.concatGindices([e,n.toGindex(this.depth,BigInt(0))]),s=i+BigInt(t);for(let e=i;e<s;e++)o.push(e)}return this.isList&&o.push(n.concatGindices([e,i.LENGTH_GINDEX])),o}fromJson(e){return o.value_fromJsonArray(this.elementType,e,this)}toJson(e){return o.value_toJsonArray(this.elementType,e,this)}clone(e){return o.value_cloneArray(this.elementType,e)}equals(e,t){return o.value_equals(this.elementType,e,t)}}t.ArrayType=s},3191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidArrayLength=t.value_defaultValueArray=t.value_equals=t.value_cloneArray=t.value_toJsonArray=t.value_fromJsonArray=t.tree_deserializeFromBytesArrayBasic=t.tree_serializeToBytesArrayBasic=t.value_deserializeFromBytesArrayBasic=t.value_serializeToBytesArrayBasic=t.setChunksNode=t.addLengthNode=t.getChunksNodeFromRootNode=t.getLengthFromRootNode=void 0;const n=r(6567);function i(e,t){return new n.BranchNode(e,n.LeafNode.fromUint32(t))}function o(e,t,r){if(r&&e%1!=0)throw Error("size not multiple of element fixedSize");if(t.isList){if(e>t.limit)throw new Error(`Invalid list length ${e} over limit ${t.limit}`)}else if(e!==t.length)throw new Error(`Incorrect vector length ${e} expected ${t.length}`)}t.getLengthFromRootNode=function(e){return e.right.getUint(4,0)},t.getChunksNodeFromRootNode=function(e){return e.left},t.addLengthNode=i,t.setChunksNode=function(e,t,r){const i=void 0!==r?n.LeafNode.fromUint32(r):e.right;return new n.BranchNode(t,i)},t.value_serializeToBytesArrayBasic=function(e,t,r,n,i){const o=e.byteLength;for(let s=0;s<t;s++)e.value_serializeToBytes(r,n+s*o,i[s]);return n+t*o},t.value_deserializeFromBytesArrayBasic=function(e,t,r,n,i){const s=e.byteLength,a=(n-r)/s;o(a,i,!0);const u=new Array(a);for(let n=0;n<a;n++)u[n]=e.value_deserializeFromBytes(t,r+n*s,r+(n+1)*s);return u},t.tree_serializeToBytesArrayBasic=function(e,t,r,i,o,s){const a=e.byteLength*t,u=Math.ceil(a/32),c=n.getNodesAtDepth(s,r,0,u);return n.packedNodeRootsToBytes(i.dataView,o,a,c),o+a},t.tree_deserializeFromBytesArrayBasic=function(e,t,r,s,a,u){const c=(a-s)/e.byteLength;o(c,u,!0);const l=n.packedRootsBytesToNode(t,r.dataView,s,a);return u.isList?i(l,c):l},t.value_fromJsonArray=function(e,t,r){if(!Array.isArray(t))throw Error("JSON is not an array");o(t.length,r);const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=e.fromJson(t[r]);return n},t.value_toJsonArray=function(e,t,r){const n=r.isList?t.length:r.length,i=new Array(n);for(let r=0;r<n;r++)i[r]=e.toJson(t[r]);return i},t.value_cloneArray=function(e,t){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=e.clone(t[n]);return r},t.value_equals=function(e,t,r){if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(!e.equals(t[n],r[n]))return!1;return!0},t.value_defaultValueArray=function(e,t){const r=new Array(t);for(let n=0;n<t;n++)r[n]=e.defaultValue();return r},t.assertValidArrayLength=o},404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.value_getRootsArrayComposite=t.tree_deserializeFromBytesArrayComposite=t.tree_serializeToBytesArrayComposite=t.tree_serializedSizeArrayComposite=t.value_deserializeFromBytesArrayComposite=t.value_serializeToBytesArrayComposite=t.value_serializedSizeArrayComposite=t.maxSizeArrayComposite=t.minSizeArrayComposite=void 0;const n=r(6567),i=r(3191);function o(e,t,r,n,o){const s=n-r;let a;if(null===e)a=function(e,t,r){if(0===r)return new Uint32Array(0);const n=e.getUint32(t,!0),i=n;if(0===n)throw Error("First offset must be > 0");if(i%4!=0)throw Error("Offset data length not multiple of 4");const o=i/4,s=new Uint32Array(o);s[0]=n;for(let n=1;n<o;n++){const i=e.getUint32(t+4*n,!0);if(s[n]=i,i>r)throw new Error(`Offset out of bounds ${i} > ${r}`);if(i<s[n-1])throw new Error(`Offsets must be increasing ${i} < ${s[n-1]}`)}return s}(t,r,s);else{if(0===e)throw Error("element fixed length is 0");if(s%e!=0)throw Error(`size ${s} is not multiple of element fixedSize ${e}`);const t=s/e;a=new Uint32Array(t);for(let r=0;r<t;r++)a[r]=r*e}return i.assertValidArrayLength(a.length,o),a}t.minSizeArrayComposite=function(e,t){return null===e.fixedSize?t*(4+e.minSize):t*e.minSize},t.maxSizeArrayComposite=function(e,t){return null===e.fixedSize?t*(4+e.maxSize):t*e.maxSize},t.value_serializedSizeArrayComposite=function(e,t,r){if(null===e.fixedSize){let n=0;for(let i=0;i<t;i++)n+=4+e.value_serializedSize(r[i]);return n}return t*e.fixedSize},t.value_serializeToBytesArrayComposite=function(e,t,r,n,i){if(null===e.fixedSize){let o=n+4*t;for(let s=0;s<t;s++)r.dataView.setUint32(n+4*s,o-n,!0),o=e.value_serializeToBytes(r,o,i[s]);return o}for(let o=0;o<t;o++)e.value_serializeToBytes(r,n+o*e.fixedSize,i[o]);return n+t*e.fixedSize},t.value_deserializeFromBytesArrayComposite=function(e,t,r,n,i){const s=o(e.fixedSize,t.dataView,r,n,i),a=s.length,u=new Array(a);for(let i=0;i<a;i++){const o=r+s[i],c=i===a-1?n:r+s[i+1];u[i]=e.value_deserializeFromBytes(t,o,c)}return u},t.tree_serializedSizeArrayComposite=function(e,t,r,i){if(null===e.fixedSize){const o=n.getNodesAtDepth(i,r,0,t);let s=0;for(let t=0;t<o.length;t++)s+=4+e.tree_serializedSize(o[t]);return s}return t*e.fixedSize},t.tree_serializeToBytesArrayComposite=function(e,t,r,i,o,s){const a=n.getNodesAtDepth(i,r,0,t);if(null===e.fixedSize){let r=s+4*t;const{dataView:n}=o;for(let t=0;t<a.length;t++)n.setUint32(s+4*t,r-s,!0),r=e.tree_serializeToBytes(o,r,a[t]);return r}for(let t=0;t<a.length;t++)s=e.tree_serializeToBytes(o,s,a[t]);return s},t.tree_deserializeFromBytesArrayComposite=function(e,t,r,s,a,u){const c=o(e.fixedSize,r.dataView,s,a,u),l=c.length,f=new Array(l);for(let t=0;t<l;t++){const n=s+c[t],i=t===l-1?a:s+c[t+1];f[t]=e.tree_deserializeFromBytes(r,n,i)}const h=n.subtreeFillToContents(f,t);return u.isList?i.addLengthNode(h,l):h},t.value_getRootsArrayComposite=function(e,t,r){const n=new Array(t);for(let i=0;i<t;i++)n[i]=e.hashTreeRoot(r[i]);return n}},645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBasicType=t.BasicType=void 0;const n=r(7451);class i extends n.Type{constructor(){super(...arguments),this.isBasic=!0,this.depth=0,this.maxChunkCount=1}value_serializedSize(){return this.byteLength}tree_serializedSize(){return this.byteLength}assertValidSize(e){if(e!==this.byteLength)throw Error(`BasicType invalid size ${e} expected ${this.byteLength}`)}hashTreeRoot(e){const t=new Uint8Array(32),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),t}clone(e){return e}equals(e,t){return e===t}}t.BasicType=i,t.isBasicType=function(e){return e.isBasic}},6612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitArrayType=void 0;const n=r(6567),i=r(1518),o=r(995),s=r(8715),a=r(6572),u=r(7844);class c extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!0}getView(e){return new a.BitArrayTreeView(this,e)}getViewDU(e){return new u.BitArrayTreeViewDU(this,e)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}getRoots(e){return o.splitIntoRootChunks(e.uint8Array)}getPropertyGindex(){return null}getPropertyType(){throw Error("Must only request BitArray complete data")}getIndexProperty(){throw Error("Must only request BitArray complete data")}tree_fromProofNode(e){return{node:e,done:!0}}tree_getLeafGindices(e,t){const r=this.tree_getByteLen(t),i=Math.ceil(r/32),o=n.concatGindices([e,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let e=0,t=o;e<i;e++,t++)a[e]=t;return this.isList&&a.push(n.concatGindices([e,s.LENGTH_GINDEX])),a}fromJson(e){const t=i.fromHexString(e),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}toJson(e){return i.toHexString(this.serialize(e))}clone(e){return e.clone()}equals(e,t){return e.bitLen===t.bitLen&&i.byteArrayEquals(e.uint8Array,t.uint8Array)}}t.BitArrayType=c},284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitListType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(3191),a=r(1714),u=r(6612);class c extends u.BitArrayType{constructor(e,t){if(super(),this.limitBits=e,this.fixedSize=null,this.minSize=1,this.isList=!0,0===e)throw Error("List limit must be > 0");this.typeName=t?.typeName??`BitList[${e}]`,this.maxChunkCount=Math.ceil(this.limitBits/8/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.maxSize=Math.ceil(e/8)+1}static named(e,t){return new(o.namedClass(c,t.typeName))(e,t)}defaultValue(){return a.BitArray.fromBitLen(0)}value_serializedSize(e){return l(e.bitLen)}value_serializeToBytes(e,t,r){return e.uint8Array.set(r.uint8Array,t),f(e.uint8Array,t,r.bitLen)}value_deserializeFromBytes(e,t,r){const{uint8Array:n,bitLen:i}=this.deserializeUint8ArrayBitListFromBytes(e.uint8Array,t,r);return new a.BitArray(n,i)}tree_serializedSize(e){return l(s.getLengthFromRootNode(e))}tree_serializeToBytes(e,t,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/8),u=Math.ceil(a/32),c=n.getNodesAtDepth(i,this.chunkDepth,0,u);return n.packedNodeRootsToBytes(e.dataView,t,a,c),f(e.uint8Array,t,o)}tree_deserializeFromBytes(e,t,r){const{uint8Array:i,bitLen:o}=this.deserializeUint8ArrayBitListFromBytes(e.uint8Array,t,r),a=new DataView(i.buffer,i.byteOffset,i.byteLength),u=n.packedRootsBytesToNode(this.chunkDepth,a,0,i.length);return s.addLengthNode(u,o)}tree_getByteLen(e){if(!e)throw new Error("BitListType requires a node to get leaves");return Math.ceil(s.getLengthFromRootNode(e)/8)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.bitLen)}deserializeUint8ArrayBitListFromBytes(e,t,r){const{uint8Array:n,bitLen:i}=function(e,t,r){if(r>e.length)throw Error(`BitList attempting to read byte ${r} of data length ${e.length}`);const n=e[r-1],i=r-t;if(0===n)throw new Error("Invalid deserialized bitlist, padding bit required");if(1===n)return{uint8Array:Uint8Array.prototype.slice.call(e,t,r-1),bitLen:8*(i-1)};const o=Uint8Array.prototype.slice.call(e,t,r),s=n.toString(2).length-1,a=8*(i-1)+s,u=255>>8-s;return o[i-1]&=u,{uint8Array:o,bitLen:a}}(e,t,r);if(i>this.limitBits)throw Error(`bitLen over limit ${i} > ${this.limitBits}`);return{uint8Array:n,bitLen:i}}}function l(e){const t=Math.ceil(e/8);return e%8==0?t+1:t}function f(e,t,r){const n=t+Math.ceil(r/8);return r%8==0?(e[n]=1,n+1):(e[n-1]|=1<<r%8,n)}t.BitListType=c},1393:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitVectorType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(1714),a=r(6612);class u extends a.BitArrayType{constructor(e,t){if(super(),this.lengthBits=e,this.isList=!1,0===e)throw Error("Vector length must be > 0");this.typeName=t?.typeName??`BitVector[${e}]`,this.chunkCount=Math.ceil(this.lengthBits/8/32),this.maxChunkCount=this.chunkCount,this.depth=i.maxChunksToDepth(this.chunkCount),this.fixedSize=Math.ceil(this.lengthBits/8),this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.zeroBitsMask=e%8==0?0:255&255<<e%8}static named(e,t){return new(o.namedClass(u,t.typeName))(e,t)}defaultValue(){return s.BitArray.fromBitLen(this.lengthBits)}value_serializedSize(){return this.fixedSize}value_serializeToBytes(e,t,r){return e.uint8Array.set(r.uint8Array,t),t+this.fixedSize}value_deserializeFromBytes(e,t,r){return this.assertValidLength(e.uint8Array,t,r),new s.BitArray(Uint8Array.prototype.slice.call(e.uint8Array,t,r),this.lengthBits)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(e,t,r){const i=n.getNodesAtDepth(r,this.depth,0,this.chunkCount);return n.packedNodeRootsToBytes(e.dataView,t,this.fixedSize,i),t+this.fixedSize}tree_deserializeFromBytes(e,t,r){return this.assertValidLength(e.uint8Array,t,r),n.packedRootsBytesToNode(this.depth,e.dataView,t,r)}tree_getByteLen(){return this.fixedSize}assertValidLength(e,t,r){const n=r-t;if(r-t!==this.fixedSize)throw Error(`Invalid BitVector size ${n} != ${this.fixedSize}`);if(this.zeroBitsMask>0&&(e[r-1]&this.zeroBitsMask)>0)throw Error("BitVector: nonzero bits past length")}}t.BitVectorType=u},2034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanType=void 0;const n=r(6567),i=r(1425),o=r(645);class s extends o.BasicType{constructor(e){super(),this.byteLength=1,this.itemsPerChunk=32,this.fixedSize=1,this.minSize=1,this.maxSize=1,this.typeName=e?.typeName??"boolean"}static named(e){return new(i.namedClass(s,e.typeName))(e)}defaultValue(){return!1}value_serializeToBytes(e,t,r){return e.uint8Array[t]=r?1:0,t+1}value_deserializeFromBytes(e,t,r){switch(this.assertValidSize(r-t),e.uint8Array[t]){case 1:return!0;case 0:return!1;default:throw new Error(`Boolean: invalid value: ${e.uint8Array[t]}`)}}tree_serializeToBytes(e,t,r){return e.uint8Array[t]=r.getUint(4,0),t+1}tree_deserializeFromBytes(e,t,r){this.assertValidSize(r-t);const i=e.uint8Array[t];if(i>1)throw Error(`Boolean: invalid value ${i}`);return n.LeafNode.fromUint32(i)}tree_getFromNode(e){return 1===e.getUint(4,0)}tree_setToNode(e,t){e.setUint(4,0,t?1:0)}tree_getFromPackedNode(e,t){const r=t%this.itemsPerChunk;return 0!==e.getUint(1,r)}tree_setToPackedNode(e,t,r){const n=t%this.itemsPerChunk;e.setUint(1,n,r?1:0)}fromJson(e){if("boolean"!=typeof e)throw Error(`JSON invalid type ${typeof e} expected boolean`);return e}toJson(e){return e}}t.BooleanType=s},4316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteArrayType=void 0;const n=r(6567),i=r(1518),o=r(995),s=r(8715);class a extends s.CompositeType{constructor(){super(...arguments),this.isViewMutable=!1}defaultValue(){return new Uint8Array(this.minSize)}getView(e){return this.getViewDU(e.rootNode)}getViewDU(e){return this.tree_toValue(e)}commitView(e){return this.commitViewDU(e)}commitViewDU(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),this.tree_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}cacheOfViewDU(){}toView(e){return e}toViewDU(e){return e}value_serializeToBytes(e,t,r){return e.uint8Array.set(r,t),t+r.length}value_deserializeFromBytes(e,t,r){return this.assertValidSize(r-t),Uint8Array.prototype.slice.call(e.uint8Array,t,r)}getRoots(e){return o.splitIntoRootChunks(e)}getPropertyGindex(){return null}getPropertyType(){throw Error("Must only request ByteArray complete data")}getIndexProperty(){throw Error("Must only request ByteArray complete data")}tree_fromProofNode(e){return{node:e,done:!0}}tree_getLeafGindices(e,t){const r=this.tree_getByteLen(t),i=Math.ceil(r/32),o=n.concatGindices([e,n.toGindex(this.depth,BigInt(0))]),a=new Array(i);for(let e=0,t=o;e<i;e++,t++)a[e]=t;return this.isList&&a.push(n.concatGindices([e,s.LENGTH_GINDEX])),a}fromJson(e){const t=i.fromHexString(e);return this.assertValidSize(t.length),t}toJson(e){return i.toHexString(e)}clone(e){return e}equals(e,t){return i.byteArrayEquals(e,t)}}t.ByteArrayType=a},3568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteListType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(3191),a=r(4316);class u extends a.ByteArrayType{constructor(e,t){if(super(),this.limitBytes=e,this.fixedSize=null,this.isList=!0,0===e)throw Error("List limit must be > 0");this.typeName=t?.typeName??`ByteList[${e}]`,this.maxChunkCount=Math.ceil(this.limitBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=1+this.chunkDepth,this.minSize=0,this.maxSize=this.limitBytes}static named(e,t){return new(o.namedClass(u,t.typeName))(e,t)}value_serializedSize(e){return e.length}tree_serializedSize(e){return s.getLengthFromRootNode(e)}tree_serializeToBytes(e,t,r){const i=s.getChunksNodeFromRootNode(r),o=s.getLengthFromRootNode(r),a=Math.ceil(o/32),u=n.getNodesAtDepth(i,this.chunkDepth,0,a);return n.packedNodeRootsToBytes(e.dataView,t,o,u),t+o}tree_deserializeFromBytes(e,t,r){this.assertValidSize(r-t);const i=n.packedRootsBytesToNode(this.chunkDepth,e.dataView,t,r);return s.addLengthNode(i,r-t)}tree_getByteLen(e){if(!e)throw new Error("ByteListType requires a node to get leaves");return s.getLengthFromRootNode(e)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.length)}assertValidSize(e){if(e>this.limitBytes)throw Error(`ByteList invalid size ${e} limit ${this.limitBytes}`)}}t.ByteListType=u},245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ByteVectorType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(4316);class a extends s.ByteArrayType{constructor(e,t){if(super(),this.lengthBytes=e,this.isList=!1,0===e)throw Error("Vector length must be > 0");this.typeName=t?.typeName??`ByteVector[${e}]`,this.maxChunkCount=Math.ceil(this.lengthBytes/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=this.lengthBytes,this.minSize=this.fixedSize,this.maxSize=this.fixedSize}static named(e,t){return new(o.namedClass(a,t.typeName))(e,t)}value_serializedSize(){return this.fixedSize}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(e,t,r){const i=n.getNodesAtDepth(r,this.chunkDepth,0,this.maxChunkCount);return n.packedNodeRootsToBytes(e.dataView,t,this.fixedSize,i),t+this.fixedSize}tree_deserializeFromBytes(e,t,r){return this.assertValidSize(r-t),n.packedRootsBytesToNode(this.chunkDepth,e.dataView,t,r)}tree_getByteLen(){return this.lengthBytes}assertValidSize(e){if(e!==this.lengthBytes)throw Error(`ByteVector invalid size ${e} expected ${this.lengthBytes}`)}}t.ByteVectorType=a},8715:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCompositeType=t.CompositeType=t.LENGTH_GINDEX=void 0;const n=r(6567),i=r(1518),o=r(995),s=r(8081),a=r(7451);t.LENGTH_GINDEX=BigInt(3);const u=Symbol("ssz_cached_permanent_root");class c extends a.Type{constructor(e){super(),this.cachePermanentRootStruct=e,this.isBasic=!1}defaultView(){return this.toView(this.defaultValue())}defaultViewDU(){return this.toViewDU(this.defaultValue())}deserializeToView(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=this.tree_deserializeFromBytes({uint8Array:e,dataView:t},0,e.length);return this.getView(new n.Tree(r))}deserializeToViewDU(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength),r=this.tree_deserializeFromBytes({uint8Array:e,dataView:t},0,e.length);return this.getViewDU(r)}toView(e){const t=this.value_toTree(e);return this.getView(new n.Tree(t))}toViewDU(e){const t=this.value_toTree(e);return this.getViewDU(t)}toValueFromView(e){const t=this.commitView(e);return this.tree_toValue(t)}toValueFromViewDU(e){const t=this.commitViewDU(e);return this.tree_toValue(t)}toViewFromViewDU(e){const t=this.commitViewDU(e);return this.getView(new n.Tree(t))}toViewDUFromView(e){const t=this.commitView(e);return this.getViewDU(t)}hashTreeRoot(e){if(this.cachePermanentRootStruct){const t=e[u];if(t)return t}const t=o.merkleize(this.getRoots(e),this.maxChunkCount);return this.cachePermanentRootStruct&&(e[u]=t),t}getCachedPermanentRoot(e){return e[u]}createFromProof(e,t){const r=n.Tree.createFromProof(e).rootNode,o=s.treePostProcessFromProofNode(r,this);if(void 0!==t&&!i.byteArrayEquals(o.root,t))throw new Error("Proof does not match trusted root");return this.getView(new n.Tree(o))}tree_createProof(e,t){const r=this.tree_createProofGindexes(e,t);return n.createProof(e,{type:n.ProofType.treeOffset,gindices:r})}tree_createProofGindexes(e,t){const r=[];for(const i of t){const{type:t,gindex:o}=this.getPathInfo(i);if(l(t)){const i=t.tree_getLeafGindices(o,null===t.fixedSize?n.getNode(e,o):void 0);for(const e of i)r.push(e)}else r.push(o)}return r}getPathInfo(e){const t=[];let r=this;for(const n of e){if(r.isBasic)throw new Error("Invalid path: cannot navigate beyond a basic type");const e=r.getPropertyGindex(n);null!==e&&(t.push(e),r=r.getPropertyType(n))}return{type:r,gindex:n.concatGindices(t)}}tree_fromProofNode(e){return{node:e,done:!1}}}function l(e){return!e.isBasic}t.CompositeType=c,t.isCompositeType=l},5039:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderContainerTypeName=t.precomputeJsonKey=t.ContainerType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(8715),a=r(7685),u=r(8865),c=r(9705);class l extends s.CompositeType{constructor(e,t){super(t?.cachePermanentRootStruct),this.fields=e,this.opts=t,this.isList=!1,this.isViewMutable=!0,this.typeName=t?.typeName??h(e),this.maxChunkCount=Object.keys(e).length,this.depth=i.maxChunksToDepth(this.maxChunkCount),this.fieldsEntries=[];for(const r of Object.keys(e))this.fieldsEntries.push({fieldName:r,fieldType:this.fields[r],jsonKey:f(r,t?.casingMap,t?.jsonCase),gindex:n.toGindex(this.depth,BigInt(this.fieldsEntries.length))});if(0===this.fieldsEntries.length)throw Error("Container must have > 0 fields");this.fieldsGindex={};for(let e=0;e<this.fieldsEntries.length;e++)this.fieldsGindex[this.fieldsEntries[e].fieldName]=n.toGindex(this.depth,BigInt(e));this.jsonKeyToFieldName={};for(const{fieldName:e,jsonKey:t}of this.fieldsEntries)this.jsonKeyToFieldName[t]=e;const{minLen:r,maxLen:o,fixedSize:s}=function(e){let t=0,r=0,n=0;for(const i of Object.values(e))t+=i.minSize,r+=i.maxSize,null===i.fixedSize?(t+=4,r+=4,n=null):null!==n&&(n+=i.fixedSize);return{minLen:t,maxLen:r,fixedSize:n}}(e);this.minSize=r,this.maxSize=o,this.fixedSize=s;const{isFixedLen:c,fieldRangesFixedLen:l,variableOffsetsPosition:d,fixedEnd:p}=function(e){const t=[],r=[],n=[];let i=0;for(const o of Object.values(e))t.push(null!==o.fixedSize),null===o.fixedSize?(n.push(i),i+=4):(r.push({start:i,end:i+o.fixedSize}),i+=o.fixedSize);return{isFixedLen:t,fieldRangesFixedLen:r,variableOffsetsPosition:n,fixedEnd:i}}(e);this.isFixedLen=c,this.fieldRangesFixedLen=l,this.variableOffsetsPosition=d,this.fixedEnd=p,this.TreeView=t?.getContainerTreeViewClass?.(this)??a.getContainerTreeViewClass(this),this.TreeViewDU=t?.getContainerTreeViewDUClass?.(this)??u.getContainerTreeViewDUClass(this)}static named(e,t){return new(o.namedClass(l,t.typeName))(e,t)}defaultValue(){const e={};for(const{fieldName:t,fieldType:r}of this.fieldsEntries)e[t]=r.defaultValue();return e}getView(e){return new this.TreeView(this,e)}getViewDU(e,t){return new this.TreeViewDU(this,e,t)}cacheOfViewDU(e){return e.cache}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}value_serializedSize(e){let t=0;for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];t+=null===i.fixedSize?4+i.value_serializedSize(e[n]):i.fixedSize}return t}value_serializeToBytes(e,t,r){let n=t,i=t+this.fixedEnd;for(let o=0;o<this.fieldsEntries.length;o++){const{fieldName:s,fieldType:a}=this.fieldsEntries[o];null===a.fixedSize?(e.dataView.setUint32(n,i-t,!0),n+=4,i=a.value_serializeToBytes(e,i,r[s])):n=a.value_serializeToBytes(e,n,r[s])}return i}value_deserializeFromBytes(e,t,r){const n=this.getFieldRanges(e.dataView,t,r),i={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=this.fieldsEntries[r],a=n[r];i[o]=s.value_deserializeFromBytes(e,t+a.start,t+a.end)}return i}tree_serializedSize(e){let t=0;const r=n.getNodesAtDepth(e,this.depth,0,this.fieldsEntries.length);for(let e=0;e<this.fieldsEntries.length;e++){const{fieldType:n}=this.fieldsEntries[e],i=r[e];t+=null===n.fixedSize?4+n.tree_serializedSize(i):n.fixedSize}return t}tree_serializeToBytes(e,t,r){let i=t,o=t+this.fixedEnd;const s=n.getNodesAtDepth(r,this.depth,0,this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],a=s[r];null===n.fixedSize?(e.dataView.setUint32(i,o-t,!0),i+=4,o=n.tree_serializeToBytes(e,o,a)):i=n.tree_serializeToBytes(e,i,a)}return o}tree_deserializeFromBytes(e,t,r){const i=this.getFieldRanges(e.dataView,t,r),o=new Array(this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldType:n}=this.fieldsEntries[r],s=i[r];o[r]=n.tree_deserializeFromBytes(e,t+s.start,t+s.end)}return n.subtreeFillToContents(o,this.depth)}getRoots(e){const t=new Array(this.fieldsEntries.length);for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];t[r]=i.hashTreeRoot(e[n])}return t}getPropertyGindex(e){const t=this.fieldsGindex[e]??this.fieldsGindex[this.jsonKeyToFieldName[e]];if(void 0===t)throw Error(`Unknown container property ${e}`);return t}getPropertyType(e){const t=this.fields[e]??this.fields[this.jsonKeyToFieldName[e]];if(void 0===t)throw Error(`Unknown container property ${e}`);return t}getIndexProperty(e){return e>=this.fieldsEntries.length?null:this.fieldsEntries[e].fieldName}tree_getLeafGindices(e,t){const r=[];for(let i=0;i<this.fieldsEntries.length;i++){const{fieldName:o,fieldType:s}=this.fieldsEntries[i],a=this.fieldsGindex[o],u=n.concatGindices([e,a]);if(s.isBasic)r.push(u);else{const e=s;if(null===s.fixedSize){if(!t)throw new Error("variable type requires tree argument to get leaves");r.push(...e.tree_getLeafGindices(u,n.getNode(t,a)))}else r.push(...e.tree_getLeafGindices(u))}}return r}fromJson(e){if("object"!=typeof e)throw Error("JSON must be of type object");if(null===e)throw Error("JSON must not be null");const t={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r],s=e[o];if(void 0===s)throw Error(`JSON expected key ${o} is undefined`);t[n]=i.fromJson(s)}return t}toJson(e){const t={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i,jsonKey:o}=this.fieldsEntries[r];t[o]=i.toJson(e[n])}return t}clone(e){const t={};for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];t[n]=i.clone(e[n])}return t}equals(e,t){for(let r=0;r<this.fieldsEntries.length;r++){const{fieldName:n,fieldType:i}=this.fieldsEntries[r];if(!i.equals(e[n],t[n]))return!1}return!0}getFieldRanges(e,t,r){if(0===this.variableOffsetsPosition.length){const e=r-t;if(e!==this.fixedEnd)throw Error(`${this.typeName} size ${e} not equal fixed size ${this.fixedEnd}`);return this.fieldRangesFixedLen}const n=function(e,t,r,n,i){const o=r-t,s=new Array(i.length);for(let r=0;r<i.length;r++){const a=e.getUint32(t+i[r],!0);if(a>o)throw new Error(`Offset out of bounds ${a} > ${o}`);if(0===r){if(a!==n)throw new Error(`First offset must equal to fixedEnd ${a} != ${n}`)}else if(a<s[r-1])throw new Error(`Offsets must be increasing ${a} < ${s[r-1]}`);s[r]=a}return s}(e,t,r,this.fixedEnd,this.variableOffsetsPosition);n.push(r-t);let i=0,o=0;const s=new Array(this.isFixedLen.length);for(let e=0;e<this.isFixedLen.length;e++)this.isFixedLen[e]?s[e]=this.fieldRangesFixedLen[o++]:(s[e]={start:n[i],end:n[i+1]},i++);return s}}function f(e,t,r){if(t){const r=t[e];if(void 0===r)throw Error(`casingMap[${e}] not defined`);return r}return r?c.Case[r](e):e}function h(e,t="Container"){return`${t}({${Object.keys(e).map((t=>`${t}: ${e[t].typeName}`)).join(", ")}})`}t.ContainerType=l,t.precomputeJsonKey=f,t.renderContainerTypeName=h},3261:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerNodeStructType=void 0;const n=r(8715),i=r(5039),o=r(1425),s=r(1225),a=r(4320),u=r(8747);class c extends i.ContainerType{constructor(e,t){super(e,{typeName:t?.typeName??i.renderContainerTypeName(e,"ContainerNodeStruct"),...t,getContainerTreeViewClass:s.getContainerTreeViewClass,getContainerTreeViewDUClass:a.getContainerTreeViewDUClass}),this.fields=e;for(const{fieldName:e,fieldType:t}of this.fieldsEntries)if(n.isCompositeType(t)&&t.isViewMutable)throw Error(`ContainerNodeStructType field '${e}' ${t.typeName} view is mutable`)}static named(e,t){return new(o.namedClass(i.ContainerType,t.typeName))(e,t)}tree_serializedSize(e){return this.value_serializedSize(e.value)}tree_serializeToBytes(e,t,r){const{value:n}=r;return this.value_serializeToBytes(e,t,n)}tree_deserializeFromBytes(e,t,r){const n=this.value_deserializeFromBytes(e,t,r);return new u.BranchNodeStruct(this.valueToTree.bind(this),n)}getPropertyGindex(){return null}tree_fromProofNode(e){const t=new Uint8Array(super.tree_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);super.tree_serializeToBytes({uint8Array:t,dataView:r},0,e);const n=this.value_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length);return{node:new u.BranchNodeStruct(this.valueToTree.bind(this),n),done:!0}}tree_toValue(e){return e.value}value_toTree(e){return new u.BranchNodeStruct(this.valueToTree.bind(this),e)}valueToTree(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return this.value_serializeToBytes({uint8Array:t,dataView:r},0,e),super.tree_deserializeFromBytes({uint8Array:t,dataView:r},0,t.length)}}t.ContainerNodeStructType=c},6866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBasicType=void 0;const n=r(3191),i=r(995),o=r(1425),s=r(9291),a=r(1828),u=r(9659);class c extends u.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.limit=t,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,!e.isBasic)throw Error("elementType must be basic");if(0===t)throw Error("List limit must be > 0");this.typeName=r?.typeName??`List[${e.typeName}, ${t}]`,this.itemsPerChunk=32/e.byteLength,this.maxChunkCount=Math.ceil(this.limit*e.byteLength/32),this.chunkDepth=i.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=this.limit*e.maxSize}static named(e,t,r){return new(o.namedClass(c,r.typeName))(e,t,r)}getView(e){return new s.ListBasicTreeView(this,e)}getViewDU(e,t){return new a.ListBasicTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(e){return e.length*this.elementType.byteLength}value_serializeToBytes(e,t,r){return n.value_serializeToBytesArrayBasic(this.elementType,r.length,e,t,r)}value_deserializeFromBytes(e,t,r){return n.value_deserializeFromBytesArrayBasic(this.elementType,e,t,r,this)}tree_serializedSize(e){return this.tree_getLength(e)*this.elementType.byteLength}tree_serializeToBytes(e,t,r){const i=this.tree_getChunksNode(r),o=this.tree_getLength(r);return n.tree_serializeToBytesArrayBasic(this.elementType,o,this.chunkDepth,e,t,i)}tree_deserializeFromBytes(e,t,r){return n.tree_deserializeFromBytesArrayBasic(this.elementType,this.chunkDepth,e,t,r,this)}tree_getLength(e){return e.right.getUint(4,0)}tree_setLength(e,t){e.rootNode=n.addLengthNode(e.rootNode.left,t)}tree_getChunksNode(e){return e.left}tree_setChunksNode(e,t,r){return n.setChunksNode(e,t,r)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.length)}getRoots(e){const t=new Uint8Array(this.value_serializedSize(e)),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return n.value_serializeToBytesArrayBasic(this.elementType,e.length,{uint8Array:t,dataView:r},0,e),i.splitIntoRootChunks(t)}}t.ListBasicType=c},5189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListCompositeType=void 0;const n=r(995),i=r(1425),o=r(3191),s=r(404),a=r(1783),u=r(2029),c=r(9659);class l extends c.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.limit=t,this.itemsPerChunk=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,this.defaultLen=0,e.isBasic)throw Error("elementType must not be basic");if(0===t)throw Error("List limit must be > 0");this.typeName=r?.typeName??`List[${e.typeName}, ${t}]`,this.maxChunkCount=this.limit,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth+1,this.minSize=0,this.maxSize=s.maxSizeArrayComposite(e,this.limit)}static named(e,t,r){return new(i.namedClass(l,r.typeName))(e,t,r)}getView(e){return new a.ListCompositeTreeView(this,e)}getViewDU(e,t){return new u.ListCompositeTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(e){return s.value_serializedSizeArrayComposite(this.elementType,e.length,e)}value_serializeToBytes(e,t,r){return s.value_serializeToBytesArrayComposite(this.elementType,r.length,e,t,r)}value_deserializeFromBytes(e,t,r){return s.value_deserializeFromBytesArrayComposite(this.elementType,e,t,r,this)}tree_serializedSize(e){const t=this.tree_getChunksNode(e),r=this.tree_getLength(e);return s.tree_serializedSizeArrayComposite(this.elementType,r,this.chunkDepth,t)}tree_serializeToBytes(e,t,r){const n=this.tree_getChunksNode(r),i=this.tree_getLength(r);return s.tree_serializeToBytesArrayComposite(this.elementType,i,this.chunkDepth,n,e,t)}tree_deserializeFromBytes(e,t,r){return s.tree_deserializeFromBytesArrayComposite(this.elementType,this.chunkDepth,e,t,r,this)}tree_getLength(e){return o.getLengthFromRootNode(e)}tree_setLength(e,t){e.rootNode=o.addLengthNode(e.rootNode.left,t)}tree_getChunksNode(e){return e.left}tree_setChunksNode(e,t,r){return o.setChunksNode(e,t,r)}hashTreeRoot(e){return n.mixInLength(super.hashTreeRoot(e),e.length)}getRoots(e){return s.value_getRootsArrayComposite(this.elementType,e.length,e)}}t.ListCompositeType=l},1638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoneType=void 0;const n=r(6567),i=r(645);class o extends i.BasicType{constructor(){super(...arguments),this.typeName="none",this.byteLength=0,this.itemsPerChunk=32,this.fixedSize=0,this.minSize=0,this.maxSize=0}defaultValue(){return null}value_serializeToBytes(e,t,r){return t}value_deserializeFromBytes(e,t){return null}tree_serializeToBytes(e,t,r){return t}tree_deserializeFromBytes(e,t,r){return n.zeroNode(0)}tree_getFromNode(e){return null}tree_setToNode(e,t){}tree_getFromPackedNode(e,t){return null}tree_setToPackedNode(e,t,r){}fromJson(e){if(null!==e)throw Error("JSON invalid type none must be null");return null}toJson(e){return null}}t.NoneType=o},436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UintBigintType=t.UintNumberType=t.uintBigintByteLens=t.uintNumberByteLens=void 0;const n=r(6567),i=r(1425),o=r(645),s=BigInt(Number.MAX_SAFE_INTEGER),a=BigInt(2)**BigInt(64),u=BigInt(2)**BigInt(128),c=BigInt(2)**BigInt(192),l=2**32,f=4294967295;t.uintNumberByteLens=[1,2,4,8],t.uintBigintByteLens=[1,2,4,8,16,32];class h extends o.BasicType{constructor(e,t){if(super(),this.byteLength=e,e>8)throw Error("UintNumber byteLength limit is 8");if(Math.log2(e)%1!=0)throw Error("byteLength must be a power of 2");this.typeName=t?.typeName??"uint"+8*e,t?.clipInfinity&&(this.typeName+="Inf"),t?.setBitwiseOR&&(this.typeName+="OR"),this.itemsPerChunk=32/this.byteLength,this.fixedSize=e,this.minSize=e,this.maxSize=e,this.maxDecimalStr=(BigInt(2)**BigInt(8*this.byteLength)-BigInt(1)).toString(10),this.clipInfinity=!0===t?.clipInfinity,this.setBitwiseOR=!0===t?.setBitwiseOR}static named(e,t){return new(i.namedClass(h,t.typeName))(e,t)}defaultValue(){return 0}value_serializeToBytes({dataView:e},t,r){switch(this.byteLength){case 1:e.setInt8(t,r);break;case 2:e.setUint16(t,r,!0);break;case 4:e.setUint32(t,r,!0);break;case 8:r===1/0?(e.setUint32(t,4294967295),e.setUint32(t+4,4294967295)):(e.setUint32(t,4294967295&r,!0),e.setUint32(t+4,r/l&4294967295,!0))}return t+this.byteLength}value_deserializeFromBytes({dataView:e},t,r){switch(this.assertValidSize(r-t),this.byteLength){case 1:return e.getUint8(t);case 2:return e.getUint16(t,!0);case 4:return e.getUint32(t,!0);case 8:{const r=e.getUint32(t,!0),n=e.getUint32(t+4,!0);return n===f&&r===f&&this.clipInfinity?1/0:n*l+r}}}tree_serializeToBytes(e,t,r){const n=r.getUint(this.byteLength,0,this.clipInfinity);return this.value_serializeToBytes(e,t,n),t+this.byteLength}tree_deserializeFromBytes(e,t,r){this.assertValidSize(r-t);const i=this.value_deserializeFromBytes(e,t,r),o=n.LeafNode.fromZero();return o.setUint(this.byteLength,0,i,this.clipInfinity),o}tree_getFromNode(e){return e.getUint(this.byteLength,0,this.clipInfinity)}tree_setToNode(e,t){this.tree_setToPackedNode(e,0,t)}tree_getFromPackedNode(e,t){const r=this.byteLength*(t%this.itemsPerChunk);return e.getUint(this.byteLength,r,this.clipInfinity)}tree_setToPackedNode(e,t,r){const n=this.byteLength*(t%this.itemsPerChunk);this.setBitwiseOR?e.bitwiseOrUint(this.byteLength,n,r):e.setUint(this.byteLength,n,r,this.clipInfinity)}fromJson(e){if("number"==typeof e)return e;if("string"==typeof e){if(this.clipInfinity&&e===this.maxDecimalStr)return 1/0;{const t=parseInt(e,10);if(isNaN(t))throw Error("JSON invalid number isNaN");if(t>Number.MAX_SAFE_INTEGER)throw Error("JSON invalid number > MAX_SAFE_INTEGER");return t}}if("bigint"==typeof e){if(e>s)throw Error("JSON invalid number > MAX_SAFE_INTEGER_BN");return Number(e)}throw Error(`JSON invalid type ${typeof e} expected number`)}toJson(e){return e===1/0?this.maxDecimalStr:e.toString(10)}}t.UintNumberType=h;class d extends o.BasicType{constructor(e,t){if(super(),this.byteLength=e,e>32)throw Error("UintBigint byteLength limit is 32");if(Math.log2(e)%1!=0)throw Error("byteLength must be a power of 2");this.typeName=t?.typeName??"uintBigint"+8*e,this.byteLength=e,this.itemsPerChunk=32/this.byteLength,this.fixedSize=e,this.minSize=e,this.maxSize=e}static named(e,t){return new(i.namedClass(d,t.typeName))(e,t)}defaultValue(){return BigInt(0)}value_serializeToBytes({dataView:e},t,r){switch(this.byteLength){case 1:e.setInt8(t,Number(r));break;case 2:e.setUint16(t,Number(r),!0);break;case 4:e.setUint32(t,Number(r),!0);break;case 8:e.setBigUint64(t,r,!0);break;default:for(let n=0;n<this.byteLength;n+=8){n>0&&(r/=a);const i=BigInt.asUintN(64,r);e.setBigUint64(t+n,i,!0)}}return t+this.byteLength}value_deserializeFromBytes({dataView:e},t,r){const n=r-t;if(n!==this.byteLength)throw Error(`Invalid size ${n} expected ${this.byteLength}`);switch(this.byteLength){case 1:return BigInt(e.getUint8(t));case 2:return BigInt(e.getUint16(t,!0));case 4:return BigInt(e.getUint32(t,!0));case 8:return e.getBigUint64(t,!0);case 16:{const r=e.getBigUint64(t,!0);return e.getBigUint64(t+8,!0)*a+r}case 32:{const r=e.getBigUint64(t,!0),n=e.getBigUint64(t+8,!0),i=e.getBigUint64(t+16,!0);return e.getBigUint64(t+24,!0)*c+i*u+n*a+r}}}tree_serializeToBytes(e,t,r){const n=r.getUintBigint(this.byteLength,0);return this.value_serializeToBytes(e,t,n),t+this.byteLength}tree_deserializeFromBytes(e,t,r){const i=r-t;if(i!==this.byteLength)throw Error(`Invalid size ${i} expected ${this.byteLength}`);const o=this.value_deserializeFromBytes(e,t,r),s=n.LeafNode.fromZero();return s.setUintBigint(this.byteLength,0,o),s}tree_getFromNode(e){return e.getUintBigint(this.byteLength,0)}tree_setToNode(e,t){this.tree_setToPackedNode(e,0,t)}tree_getFromPackedNode(e,t){const r=this.byteLength*(t%this.itemsPerChunk);return e.getUintBigint(this.byteLength,r)}tree_setToPackedNode(e,t,r){const n=this.byteLength*(t%this.itemsPerChunk);e.setUintBigint(this.byteLength,n,r)}fromJson(e){if("bigint"==typeof e)return e;if("string"==typeof e||"number"==typeof e)return BigInt(e);throw Error(`JSON invalid type ${typeof e} expected bigint`)}toJson(e){return e.toString(10)}}t.UintBigintType=d},1851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnionType=void 0;const n=r(6567),i=r(995),o=r(1425),s=r(8715),a=r(3191),u=r(1638),c=BigInt(2),l=BigInt(3);class f extends s.CompositeType{constructor(e,t){if(super(),this.types=e,this.depth=1,this.maxChunkCount=1,this.fixedSize=null,this.isList=!0,this.isViewMutable=!0,e.length>=128)throw Error("Must have less than 128 types");if(0===e.length)throw Error("Must have at least 1 type option");if(e[0]instanceof u.NoneType&&e.length<2)throw Error("Must have at least 2 type options if the first is None");for(let t=1;t<e.length;t++)if(e[t]instanceof u.NoneType)throw Error("None may only be the first option");this.typeName=t?.typeName??`Union[${e.map((e=>e.typeName)).join(",")}]`;const r=[],n=[];for(const t of e)r.push(t.minSize),n.push(t.maxSize);this.minSize=1+Math.min(...r),this.maxSize=1+Math.max(...n),this.maxSelector=this.types.length-1}static named(e,t){return new(o.namedClass(f,t.typeName))(e,t)}defaultValue(){return{selector:0,value:this.types[0].defaultValue()}}getView(e){return this.tree_toValue(e.rootNode)}getViewDU(e){return this.tree_toValue(e)}cacheOfViewDU(){}commitView(e){return this.value_toTree(e)}commitViewDU(e){return this.value_toTree(e)}value_serializedSize(e){return 1+this.types[e.selector].value_serializedSize(e.value)}value_serializeToBytes(e,t,r){return e.uint8Array[t]=r.selector,this.types[r.selector].value_serializeToBytes(e,t+1,r.value)}value_deserializeFromBytes(e,t,r){const n=e.uint8Array[t];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);return{selector:n,value:this.types[n].value_deserializeFromBytes(e,t+1,r)}}tree_serializedSize(e){const t=a.getLengthFromRootNode(e),r=e.left;return 1+this.types[t].value_serializedSize(r)}tree_serializeToBytes(e,t,r){const n=a.getLengthFromRootNode(r),i=r.left;return e.uint8Array[t]=n,this.types[n].tree_serializeToBytes(e,t+1,i)}tree_deserializeFromBytes(e,t,r){const n=e.uint8Array[t];if(n>this.maxSelector)throw Error(`Invalid selector ${n}`);const i=this.types[n].tree_deserializeFromBytes(e,t+1,r);return a.addLengthNode(i,n)}hashTreeRoot(e){return i.mixInLength(super.hashTreeRoot(e),e.selector)}getRoots(e){return[this.types[e.selector].hashTreeRoot(e.value)]}getPropertyGindex(e){switch(e){case"value":return c;case"selector":return l;default:throw new Error(`Invalid Union type property ${e}`)}}getPropertyType(){throw new Error("Not applicable for Union type")}getIndexProperty(e){if(0===e)return"value";if(1===e)return"selector";throw Error("Union index of out bounds")}tree_getLeafGindices(e,t){if(!t)throw Error("rootNode required");const r=[n.concatGindices([e,l])],i=a.getLengthFromRootNode(t),o=this.types[i],u=n.concatGindices([e,c]);return s.isCompositeType(o)?r.push(...o.tree_getLeafGindices(u,n.getNode(t,c))):r.push(u),r}fromJson(e){if("object"!=typeof e)throw new Error("JSON must be of type object");const t=e;if("number"!=typeof t.selector)throw new Error("Invalid JSON Union selector must be number");const r=this.types[t.selector];if(!r)throw new Error("Invalid JSON Union selector out of range");return{selector:t.selector,value:r.toJson(t.value)}}toJson(e){return{selector:e.selector,value:this.types[e.selector].toJson(e.value)}}clone(e){return{selector:e.selector,value:this.types[e.selector].clone(e.value)}}equals(e,t){return e.selector===t.selector&&this.types[e.selector].equals(e.value,t.value)}}t.UnionType=f},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorBasicType=void 0;const n=r(995),i=r(1425),o=r(3191),s=r(7733),a=r(3341),u=r(9659);class c extends u.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.length=t,this.isList=!1,this.isViewMutable=!0,!e.isBasic)throw Error("elementType must be basic");if(0===t)throw Error("Vector length must be > 0");this.typeName=r?.typeName??`Vector[${e.typeName}, ${t}]`,this.itemsPerChunk=32/e.byteLength,this.maxChunkCount=Math.ceil(t*e.byteLength/32),this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=t*e.byteLength,this.minSize=this.fixedSize,this.maxSize=this.fixedSize,this.defaultLen=t}static named(e,t,r){return new(i.namedClass(c,r.typeName))(e,t,r)}getView(e){return new s.ArrayBasicTreeView(this,e)}getViewDU(e,t){return new a.ArrayBasicTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(){return this.fixedSize}value_serializeToBytes(e,t,r){return o.value_serializeToBytesArrayBasic(this.elementType,this.length,e,t,r)}value_deserializeFromBytes(e,t,r){return o.value_deserializeFromBytesArrayBasic(this.elementType,e,t,r,this)}tree_serializedSize(){return this.fixedSize}tree_serializeToBytes(e,t,r){return o.tree_serializeToBytesArrayBasic(this.elementType,this.length,this.depth,e,t,r)}tree_deserializeFromBytes(e,t,r){return o.tree_deserializeFromBytesArrayBasic(this.elementType,this.depth,e,t,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(e){return e}tree_setChunksNode(e,t){return t}getRoots(e){const t=new Uint8Array(this.fixedSize),r=new DataView(t.buffer,t.byteOffset,t.byteLength);return o.value_serializeToBytesArrayBasic(this.elementType,this.length,{uint8Array:t,dataView:r},0,e),n.splitIntoRootChunks(t)}}t.VectorBasicType=c},4013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VectorCompositeType=void 0;const n=r(995),i=r(1425),o=r(404),s=r(6330),a=r(2309),u=r(9659);class c extends u.ArrayType{constructor(e,t,r){if(super(e),this.elementType=e,this.length=t,this.itemsPerChunk=1,this.isList=!1,this.isViewMutable=!0,e.isBasic)throw Error("elementType must not be basic");if(0===t)throw Error("Vector length must be > 0");this.typeName=r?.typeName??`Vector[${e.typeName}, ${t}]`,this.maxChunkCount=t,this.chunkDepth=n.maxChunksToDepth(this.maxChunkCount),this.depth=this.chunkDepth,this.fixedSize=null===e.fixedSize?null:t*e.fixedSize,this.minSize=o.minSizeArrayComposite(e,t),this.maxSize=o.maxSizeArrayComposite(e,t),this.defaultLen=t}static named(e,t,r){return new(i.namedClass(c,r.typeName))(e,t,r)}getView(e){return new s.ArrayCompositeTreeView(this,e)}getViewDU(e,t){return new a.ArrayCompositeTreeViewDU(this,e,t)}commitView(e){return e.node}commitViewDU(e){return e.commit(),e.node}cacheOfViewDU(e){return e.cache}value_serializedSize(e){return o.value_serializedSizeArrayComposite(this.elementType,this.length,e)}value_serializeToBytes(e,t,r){return o.value_serializeToBytesArrayComposite(this.elementType,this.length,e,t,r)}value_deserializeFromBytes(e,t,r){return o.value_deserializeFromBytesArrayComposite(this.elementType,e,t,r,this)}tree_serializedSize(e){return o.tree_serializedSizeArrayComposite(this.elementType,this.length,this.depth,e)}tree_serializeToBytes(e,t,r){return o.tree_serializeToBytesArrayComposite(this.elementType,this.length,this.depth,r,e,t)}tree_deserializeFromBytes(e,t,r){return o.tree_deserializeFromBytesArrayComposite(this.elementType,this.depth,e,t,r,this)}tree_getLength(){return this.length}tree_setLength(){}tree_getChunksNode(e){return e}tree_setChunksNode(e,t){return t}getRoots(e){return o.value_getRootsArrayComposite(this.elementType,this.length,e)}}t.VectorCompositeType=c},1518:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.byteArrayEquals=t.fromHexString=t.toHexString=void 0;const r=new Array(256);t.toHexString=function(e){let t="0x";for(const n of e)r[n]||(r[n]=n<16?"0"+n.toString(16):n.toString(16)),t+=r[n];return t},t.fromHexString=function(e){if("string"!=typeof e)throw new Error(`hex argument type ${typeof e} must be of type string`);if(e.startsWith("0x")&&(e=e.slice(2)),e.length%2!=0)throw new Error(`hex string length ${e.length} must be multiple of 2`);const t=e.length/2,r=new Uint8Array(t);for(let n=0;n<t;n++){const t=parseInt(e.slice(2*n,2*(n+1)),16);r[n]=t}return r},t.byteArrayEquals=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}},995:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.nextPowerOf2=t.maxChunksToDepth=t.bitLength=t.mixInLength=t.splitIntoRootChunks=t.merkleize=t.hash64=void 0;const i=r(9457),o=r(38);function s(e,t){return i.hasher.digest64(e,t)}function a(e){return 0===e?0:Math.floor(Math.log2(e))+1}function u(e){return e<=0?1:Math.pow(2,a(e-1))}t.hash64=s,t.merkleize=function(e,t){const r=a(u(t)-1);if(0==e.length)return o.zeroHash(r);let n=e.length;for(let t=0;t<r;t++){const r=n%2,i=n+r;for(let i=0;i<r;i++)e[n+i]=o.zeroHash(t);for(let t=0;t<i;t+=2)e[t/2]=s(e[t],e[t+1]);n=i/2}return e[0]},t.splitIntoRootChunks=function(e){const t=Math.ceil(e.length/32),r=new Array(t);for(let n=0;n<t;n++){const t=new Uint8Array(32);t.set(e.slice(32*n,32*(n+1))),r[n]=t}return r},t.mixInLength=function(e,t){const r=n.alloc(32);return r.writeUIntLE(t,0,6),s(e,r)},t.bitLength=a,t.maxChunksToDepth=function(e){return 0===e?0:Math.ceil(Math.log2(e))},t.nextPowerOf2=u},1425:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedClass=void 0,t.namedClass=function(e,t){return new Function("superClass",`return class ${t} extends superClass {}`)(e)}},8081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.treePostProcessFromProofNode=void 0;const n=r(6567);function i(e){return!e.isBasic}function o(e){return""===e?0:parseInt(e,2)}t.treePostProcessFromProofNode=function e(t,r,s="",a=0){if(0===a){const e=r.tree_fromProofNode(t);if(e.done)return e.node;t=e.node}const u=r.depth===a;if(t.isLeaf()){if(u){const e=r.getIndexProperty(o(s));if(null===e)return t;const n=r.getPropertyType(e);return 1===n.maxChunkCount&&i(n)?n.tree_fromProofNode(t).node:t}return t}if(u){const n=r.getIndexProperty(o(s));if(null===n)return t;const a=r.getPropertyType(n);if(!i(a))throw Error("BranchNode does not map to CompositeType");const u=a.tree_fromProofNode(t);return u.done?u.node:e(u.node,a)}{const i=e(t.left,r,s+"0",a+1),o=e(t.right,r,s+"1",a+1);return i===t.left&&o===t.right?t:new n.BranchNode(i,o)}}},9705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Case=void 0,t.Case={snake:e=>e.replace(/[^0-z]/g,"").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(e=>e[0]+"_"+e[1].toLowerCase())),constant:e=>e.replace(/[^0-z]/g,"").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(e=>e[0]+"_"+e[1])).toUpperCase(),pascal:e=>(e[0].toUpperCase()+e.slice(1)).replace(/[^0-z]/g,""),camel:e=>e[0].toLowerCase()+e.slice(1),header:e=>e[0].toUpperCase()+e.slice(1).replace(/[^0-z]/g,"").replace(/[a-z][A-Z]|[0-9][A-Z]/g,(e=>e[0]+"-"+e[1])),eth2:e=>t.Case.snake(e).replace(/(\d)$/,"_$1")}},38:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroHash=void 0;const n=r(9457),i=[new Uint8Array(32)];t.zeroHash=function(e){if(e>=i.length)for(let t=i.length;t<=e;t++)i[t]=n.hasher.digest64(i[t-1],i[t-1]);return i[e]}},1714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUint8ByteToBitBooleanArray=t.BitArray=void 0;const r=new Array(256);class n{constructor(e,t){if(this.uint8Array=e,this.bitLen=t,e.length!==Math.ceil(t/8))throw Error("BitArray uint8Array length does not match bitLen")}static fromBitLen(e){return new n(new Uint8Array(Math.ceil(e/8)),e)}static fromSingleBit(e,t){const r=n.fromBitLen(e);return r.set(t,!0),r}static fromBoolArray(e){const t=n.fromBitLen(e.length);for(let r=0;r<e.length;r++)!0===e[r]&&t.set(r,!0);return t}clone(){return new n(Uint8Array.prototype.slice.call(this.uint8Array,0),this.bitLen)}get(e){const t=Math.floor(e/8),r=1<<e%8;return(this.uint8Array[t]&r)===r}set(e,t){if(e>=this.bitLen)throw Error(`BitArray set bitIndex ${e} beyond bitLen ${this.bitLen}`);const r=Math.floor(e/8),n=1<<e%8;let i=this.uint8Array[r];t?(i|=n,this.uint8Array[r]=i):(i&n)===n&&(i^=n,this.uint8Array[r]=i)}mergeOrWith(e){if(e.bitLen!==this.bitLen)throw Error("Must merge BitArrays of same bitLen");for(let t=0;t<this.uint8Array.length;t++)this.uint8Array[t]=this.uint8Array[t]|e.uint8Array[t]}intersectValues(e){const t=[];if(e.length!==this.bitLen)throw Error(`Must not intersect values of length ${e.length} != bitLen ${this.bitLen}`);const r=Math.floor(this.bitLen/8),n=this.bitLen%8,o=this.uint8Array;for(let n=0;n<r;n++){const r=i(o[n]);for(let i=0;i<8;i++)r[i]&&t.push(e[8*n+i])}if(n>0){const s=i(o[r]);for(let i=0;i<n;i++)s[i]&&t.push(e[8*r+i])}return t}getTrueBitIndexes(){const e=[],t=this.uint8Array;for(let r=0,n=t.length;r<n;r++){const n=i(t[r]);for(let t=0;t<8;t++)n[t]&&e.push(8*r+t)}return e}getSingleTrueBit(){let e=null;const t=this.uint8Array;for(let r=0,n=t.length;r<n;r++){if(0===t[r])continue;const n=i(t[r]);for(let t=0;t<8;t++)if(!0===n[t]){if(null!==e)return null;e=8*r+t}}return null===e?null:e}toBoolArray(){const e=new Array(this.bitLen);for(let t=0;t<this.bitLen;t++)e[t]=this.get(t);return e}}function i(e){return r[e]||(r[e]=function(e){const t=e.toString(2),r=t.length,n=new Array(8);for(let e=0;e<8;e++)n[e]=e<r&&"1"===t[r-e-1];return n}(e)),r[e]}t.BitArray=n,t.getUint8ByteToBitBooleanArray=i},4984:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeView=void 0;const n=r(6567);t.TreeView=class{serialize(){const e=new Uint8Array(this.type.tree_serializedSize(this.node)),t=new DataView(e.buffer,e.byteOffset,e.byteLength);return this.type.tree_serializeToBytes({uint8Array:e,dataView:t},0,this.node),e}hashTreeRoot(){return this.node.root}createProof(e){return this.type.tree_createProof(this.node,e)}toValue(){return this.type.tree_toValue(this.node)}clone(){return this.type.getView(new n.Tree(this.node))}}},7733:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBasicTreeView=void 0;const n=r(6567),i=r(4984);class o extends i.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(e){const t=Math.floor(e/this.type.itemsPerChunk),r=this.tree.getNodeAtDepth(this.type.depth,t);return this.type.elementType.tree_getFromPackedNode(r,e)}set(e,t){const r=this.length;if(e>=r)throw Error(`Error setting index over length ${e} > ${r}`);const n=Math.floor(e/this.type.itemsPerChunk),i=this.tree.getNodeAtDepth(this.type.depth,n).clone();this.type.elementType.tree_setToPackedNode(i,e,t),this.tree.setNodeAtDepth(this.type.depth,n,i)}getAll(){const e=this.length,t=this.type.tree_getChunksNode(this.node),r=Math.ceil(e/this.type.itemsPerChunk),i=n.getNodesAtDepth(t,this.type.chunkDepth,0,r),o=new Array(e),s=this.type.itemsPerChunk,a=Math.floor(e/s),u=e%s;for(let e=0;e<a;e++){const t=i[e];for(let r=0;r<s;r++)o[e*s+r]=this.type.elementType.tree_getFromPackedNode(t,r)}if(u>0){const e=i[a];for(let t=0;t<u;t++)o[a*s+t]=this.type.elementType.tree_getFromPackedNode(e,t)}return o}}t.ArrayBasicTreeView=o},6330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCompositeTreeView=void 0;const n=r(6567),i=r(4984);class o extends i.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get length(){return this.type.tree_getLength(this.tree.rootNode)}get node(){return this.tree.rootNode}get(e){const t=n.toGindexBitstring(this.type.depth,e),r=this.tree.getSubtree(t);return this.type.elementType.getView(r)}getReadonly(e){const t=n.toGindexBitstring(this.type.depth,e),r=new n.Tree(this.tree.getNode(t));return this.type.elementType.getView(r)}set(e,t){const r=this.length;if(e>=r)throw Error(`Error setting index over length ${e} > ${r}`);const n=this.type.elementType.commitView(t);this.tree.setNodeAtDepth(this.type.depth,e,n)}getAllReadonly(){const e=this.length,t=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(t,this.type.chunkDepth,0,e),i=new Array(e);for(let t=0;t<e;t++)i[t]=this.type.elementType.getView(new n.Tree(r[t]));return i}getAllReadonlyValues(){const e=this.length,t=this.type.tree_getChunksNode(this.node),r=n.getNodesAtDepth(t,this.type.chunkDepth,0,e),i=new Array(e);for(let t=0;t<e;t++)i[t]=this.type.elementType.tree_toValue(r[t]);return i}}t.ArrayCompositeTreeView=o},6572:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitArrayTreeView=void 0;const n=r(4984);class i extends n.TreeView{constructor(e,t){super(),this.type=e,this.tree=t,this.bitArray=e.tree_toValue(t.rootNode)}get node(){return this.tree.rootNode}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(e){return this.bitArray.get(e)}set(e,t){this.bitArray.set(e,t),this.tree.rootNode=this.type.value_toTree(this.bitArray)}mergeOrWith(e){this.bitArray.mergeOrWith(e)}intersectValues(e){return this.bitArray.intersectValues(e)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}}t.BitArrayTreeView=i},7685:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewClass=void 0;const n=r(6567),i=r(645),o=r(8715),s=r(4984);class a extends s.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get node(){return this.tree.rootNode}}t.getContainerTreeViewClass=function(e){class t extends a{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=e.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){const e=n.getNodeAtDepth(this.node,this.type.depth,r);return a.tree_getFromNode(e)},set:function(e){const t=n.getNodeAtDepth(this.node,this.type.depth,r).clone();a.tree_setToNode(t,e),this.tree.setNodeAtDepth(this.type.depth,r,t)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){const e=n.toGindexBitstring(this.type.depth,r);return a.getView(this.tree.getSubtree(e))},set:function(e){const t=a.commitView(e);this.tree.setNodeAtDepth(this.type.depth,r,t)}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},1225:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewClass=void 0;const n=r(8715),i=r(8747),o=r(4984);class s extends o.TreeView{constructor(e,t){super(),this.type=e,this.tree=t}get node(){return this.tree.rootNode}}t.getContainerTreeViewClass=function(e){class t extends s{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:o,fieldType:s}=e.fieldsEntries[r];if(s.isBasic)Object.defineProperty(t.prototype,o,{configurable:!1,enumerable:!0,get:function(){return this.tree.rootNode.value[o]},set:function(e){const t=this.tree.rootNode,r=this.type.clone(t.value);r[o]=e,this.tree.rootNode=new i.BranchNodeStruct(t.valueToNode,r)}});else{if(!n.isCompositeType(s))throw Error(`Unknown fieldType ${s.typeName} for fieldName ${o}`);Object.defineProperty(t.prototype,o,{configurable:!1,enumerable:!0,get:function(){const{value:e}=this.tree.rootNode;return s.toView(e[o])},set:function(e){const t=this.tree.rootNode,r=this.type.clone(t.value);r[o]=s.toValueFromView(e),this.tree.rootNode=new i.BranchNodeStruct(t.valueToNode,r)}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},9291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBasicTreeView=void 0;const n=r(6567),i=r(7733);class o extends i.ArrayBasicTreeView{constructor(e,t){super(e,t),this.type=e,this.tree=t}push(e){const t=this.length;if(t>=this.type.limit)throw Error("Error pushing over limit");if(this.type.tree_setLength(this.tree,t+1),t%this.type.itemsPerChunk==0){const r=n.LeafNode.fromZero();this.type.elementType.tree_setToPackedNode(r,t,e);const i=Math.floor(t/this.type.itemsPerChunk);this.tree.setNodeAtDepth(this.type.depth,i,r)}else this.set(t,e)}}t.ListBasicTreeView=o},1783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListCompositeTreeView=void 0;const n=r(6330);class i extends n.ArrayCompositeTreeView{constructor(e,t){super(e,t),this.type=e,this.tree=t}push(e){const t=this.length;if(t>=this.type.limit)throw Error("Error pushing over limit");this.type.tree_setLength(this.tree,t+1),this.set(t,e)}}t.ListCompositeTreeView=i},332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeViewDU=void 0;const n=r(4984);class i extends n.TreeView{hashTreeRoot(){return this.commit(),super.hashTreeRoot()}serialize(){return this.commit(),super.serialize()}clone(e){if(e)return this.type.getViewDU(this.node);{const e=this.cache;return this.clearCache(),this.type.getViewDU(this.node,e)}}}t.TreeViewDU=i},3341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayBasicTreeViewDU=void 0;const n=r(6567),i=r(332);class o extends i.TreeViewDU{constructor(e,t,r){super(),this.type=e,this._rootNode=t,this.nodesChanged=new Set,this.dirtyLength=!1,r?(this.nodes=r.nodes,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this._length=this.type.tree_getLength(t),this.nodesPopulated=!1)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,length:this._length,nodesPopulated:this.nodesPopulated}}get(e){const t=Math.floor(e/this.type.itemsPerChunk);let r=this.nodes[t];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,t),this.nodes[t]=r),this.type.elementType.tree_getFromPackedNode(r,e)}set(e,t){if(e>=this._length)throw Error(`Error setting index over length ${e} > ${this._length}`);const r=Math.floor(e/this.type.itemsPerChunk);let i;this.nodesChanged.has(r)?i=this.nodes[r]:(i=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=i,this.nodesChanged.add(r)),this.type.elementType.tree_setToPackedNode(i,e,t)}getAll(){if(!this.nodesPopulated){const e=this.nodes,t=this.type.tree_getChunksNode(this.node),r=Math.ceil(this._length/this.type.itemsPerChunk);this.nodes=n.getNodesAtDepth(t,this.type.chunkDepth,0,r);for(const t of this.nodesChanged)this.nodes[t]=e[t];this.nodesPopulated=!0}const e=new Array(this._length),t=this.type.itemsPerChunk,r=Math.floor(this._length/t),i=this._length%t;for(let n=0;n<r;n++){const r=this.nodes[n];for(let i=0;i<t;i++)e[n*t+i]=this.type.elementType.tree_getFromPackedNode(r,i)}if(i>0){const n=this.nodes[r];for(let o=0;o<i;o++)e[r*t+o]=this.type.elementType.tree_getFromPackedNode(n,o)}return e}commit(){if(0===this.nodesChanged.size)return;const e=Array.from(this.nodesChanged.keys()).sort(((e,t)=>e-t)),t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=this.nodes[e[r]];const r=this.type.tree_getChunksNode(this._rootNode),i=n.setNodesAtDepth(r,this.type.chunkDepth,e,t);this._rootNode=this.type.tree_setChunksNode(this._rootNode,i,this.dirtyLength?this._length:void 0),this.nodesChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}}t.ArrayBasicTreeViewDU=o},2309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCompositeTreeViewDU=void 0;const n=r(6567),i=r(332);class o extends i.TreeViewDU{constructor(e,t,r){super(),this.type=e,this._rootNode=t,this.viewsChanged=new Map,this.dirtyLength=!1,r?(this.nodes=r.nodes,this.caches=r.caches,this._length=r.length,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this._length=this.type.tree_getLength(t),this.nodesPopulated=0===this._length)}get length(){return this._length}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,length:this._length,nodesPopulated:this.nodesPopulated}}get(e){const t=this.viewsChanged.get(e);if(t)return t;let r=this.nodes[e];void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,e),this.nodes[e]=r);const i=this.type.elementType.getViewDU(r,this.caches[e]);return this.type.elementType.isViewMutable&&this.viewsChanged.set(e,i),i}getReadonly(e){const t=this.viewsChanged.get(e);if(t)return t;let r=this.nodes[e];return void 0===r&&(r=n.getNodeAtDepth(this._rootNode,this.type.depth,e),this.nodes[e]=r),this.type.elementType.getViewDU(r,this.caches[e])}set(e,t){if(e>=this._length)throw Error(`Error setting index over length ${e} > ${this._length}`);this.viewsChanged.set(e,t)}getAllReadonly(){this.populateAllNodes();const e=new Array(this._length);for(let t=0;t<this._length;t++)e[t]=this.type.elementType.getViewDU(this.nodes[t],this.caches[t]);return e}getAllReadonlyValues(){this.populateAllNodes();const e=new Array(this._length);for(let t=0;t<this._length;t++)e[t]=this.type.elementType.tree_toValue(this.nodes[t]);return e}commit(){if(0===this.viewsChanged.size)return;const e=[];for(const[t,r]of this.viewsChanged){const n=this.type.elementType.commitViewDU(r);this.nodes[t]=n,e.push({index:t,node:n});const i=this.type.elementType.cacheOfViewDU(r);i&&(this.caches[t]=i)}const t=e.sort(((e,t)=>e.index-t.index)),r=t.map((e=>e.index)),i=t.map((e=>e.node)),o=this.type.tree_getChunksNode(this._rootNode),s=n.setNodesAtDepth(o,this.type.chunkDepth,r,i);this._rootNode=this.type.tree_setChunksNode(this._rootNode,s,this.dirtyLength?this._length:void 0),this.viewsChanged.clear(),this.dirtyLength=!1}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.viewsChanged.clear(),this.dirtyLength&&(this._length=this.type.tree_getLength(this._rootNode),this.dirtyLength=!1)}populateAllNodes(){if(this.viewsChanged.size>0)throw Error("Must commit changes before reading all nodes");this.nodesPopulated||(this.nodes=n.getNodesAtDepth(this._rootNode,this.type.depth,0,this.length),this.nodesPopulated=!0)}}t.ArrayCompositeTreeViewDU=o},7844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitArrayTreeViewDU=void 0;const n=r(332);class i extends n.TreeViewDU{constructor(e,t){super(),this.type=e,this._rootNode=t,this._bitArray=null}get node(){return this._rootNode}get cache(){}commit(){null!==this._bitArray&&(this._rootNode=this.type.value_toTree(this._bitArray))}get uint8Array(){return this.bitArray.uint8Array}get bitLen(){return this.bitArray.bitLen}get(e){return this.bitArray.get(e)}set(e,t){this.bitArray.set(e,t)}mergeOrWith(e){this.bitArray.mergeOrWith(e)}intersectValues(e){return this.bitArray.intersectValues(e)}getTrueBitIndexes(){return this.bitArray.getTrueBitIndexes()}getSingleTrueBit(){return this.bitArray.getSingleTrueBit()}toBoolArray(){return this.bitArray.toBoolArray()}get bitArray(){return null===this._bitArray&&(this._bitArray=this.type.tree_toValue(this._rootNode)),this._bitArray}clearCache(){this._bitArray=null}}t.BitArrayTreeViewDU=i},8865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewDUClass=void 0;const n=r(6567),i=r(645),o=r(8715),s=r(332);class a extends s.TreeViewDU{constructor(e,t,r){super(),this.type=e,this._rootNode=t,this.nodes=[],this.nodesChanged=new Set,this.viewsChanged=new Map,r?(this.nodes=r.nodes,this.caches=r.caches,this.nodesPopulated=r.nodesPopulated):(this.nodes=[],this.caches=[],this.nodesPopulated=!1)}get node(){return this._rootNode}get cache(){return{nodes:this.nodes,caches:this.caches,nodesPopulated:this.nodesPopulated}}commit(){if(0===this.nodesChanged.size&&0===this.viewsChanged.size)return;const e=[];for(const[t,r]of this.viewsChanged){const n=this.type.fieldsEntries[t].fieldType,i=n.commitViewDU(r);this.nodes[t]=i,e.push({index:t,node:i});const o=n.cacheOfViewDU(r);o&&(this.caches[t]=o)}for(const t of this.nodesChanged)e.push({index:t,node:this.nodes[t]});const t=e.sort(((e,t)=>e.index-t.index)),r=t.map((e=>e.index)),i=t.map((e=>e.node));this._rootNode=n.setNodesAtDepth(this._rootNode,this.type.depth,r,i),this.nodesChanged.clear(),this.viewsChanged.clear()}clearCache(){this.nodes=[],this.caches=[],this.nodesPopulated=!1,this.nodesChanged.clear(),this.viewsChanged.clear()}}t.getContainerTreeViewDUClass=function(e){class t extends a{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:s,fieldType:a}=e.fieldsEntries[r];if(i.isBasicType(a))Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){let e=this.nodes[r];return void 0===e&&(e=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=e),a.tree_getFromNode(e)},set:function(e){let t;this.nodesChanged.has(r)?t=this.nodes[r]:(t=(this.nodes[r]??n.getNodeAtDepth(this._rootNode,this.type.depth,r)).clone(),this.nodes[r]=t,this.nodesChanged.add(r)),a.tree_setToNode(t,e)}});else{if(!o.isCompositeType(a))throw Error(`Unknown fieldType ${a.typeName} for fieldName ${s}`);Object.defineProperty(t.prototype,s,{configurable:!1,enumerable:!0,get:function(){const e=this.viewsChanged.get(r);if(e)return e;let t=this.nodes[r];void 0===t&&(t=n.getNodeAtDepth(this._rootNode,this.type.depth,r),this.nodes[r]=t);const i=a.getViewDU(t,this.caches[r]);return a.isViewMutable&&this.viewsChanged.set(r,i),i},set:function(e){this.viewsChanged.set(r,e)}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},4320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContainerTreeViewDUClass=void 0;const n=r(8715),i=r(332);class o extends i.TreeViewDU{constructor(e,t){super(),this.type=e,this.valueChanged=null,this._rootNode=t}get node(){return this._rootNode}get cache(){}commit(){if(null===this.valueChanged)return;const e=this.valueChanged;this.valueChanged=null,this._rootNode=this.type.value_toTree(e)}clearCache(){this.valueChanged=null}}t.getContainerTreeViewDUClass=function(e){class t extends o{}for(let r=0;r<e.fieldsEntries.length;r++){const{fieldName:i,fieldType:o}=e.fieldsEntries[r];if(o.isBasic)Object.defineProperty(t.prototype,i,{configurable:!1,enumerable:!0,get:function(){return(this.valueChanged||this._rootNode.value)[i]},set:function(e){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value)),this.valueChanged[i]=e}});else{if(!n.isCompositeType(o))throw Error(`Unknown fieldType ${o.typeName} for fieldName ${i}`);Object.defineProperty(t.prototype,i,{configurable:!1,enumerable:!0,get:function(){const e=this.valueChanged||this._rootNode.value;return o.toViewDU(e[i])},set:function(e){null===this.valueChanged&&(this.valueChanged=this.type.clone(this._rootNode.value));const t=o.toValueFromViewDU(e);this.valueChanged[i]=t}})}}return Object.defineProperty(t,"name",{value:e.typeName,writable:!1}),t}},1828:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBasicTreeViewDU=void 0;const n=r(6567),i=r(3341);class o extends i.ArrayBasicTreeViewDU{constructor(e,t,r){super(e,t,r),this.type=e,this._rootNode=t}push(e){if(this._length>=this.type.limit)throw Error("Error pushing over limit");this.dirtyLength=!0;const t=this._length++;if(t%this.type.itemsPerChunk==0){const e=Math.floor(t/this.type.itemsPerChunk);this.nodes[e]=n.zeroNode(0)}this.set(t,e)}}t.ListBasicTreeViewDU=o},2029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListCompositeTreeViewDU=void 0;const n=r(6567),i=r(2309);class o extends i.ArrayCompositeTreeViewDU{constructor(e,t,r){super(e,t,r),this.type=e,this._rootNode=t}push(e){if(this._length>=this.type.limit)throw Error("Error pushing over limit");this.dirtyLength=!0;const t=this._length++;this.set(t,e)}sliceTo(e){this.commit();const t=this._rootNode;if(e>=this.type.tree_getLength(t)-1)return this;const r=this.type.tree_getChunksNode(t),i=n.treeZeroAfterIndex(r,this.type.chunkDepth,e),o=e+1,s=this.type.tree_setChunksNode(t,i,o);return this.type.getViewDU(s)}}t.ListCompositeTreeViewDU=o},7256:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;i<e.length;i++){const o=r(e[i]);t.push(o),n+=o.length}return h(o(n,192),...t)}const t=g(e);return 1===t.length&&t[0]<128?t:h(o(t.length,128),t)}function n(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(c(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const r=p(e),n=p(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(g(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,o,s,u;const c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,o=128===l?Uint8Array.from([]):n(e,1,t),2===t&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(n(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=n(e,r,t+r),{data:o,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,s=n(e,1,t);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:e.slice(t)}}{if(r=l-246,t=i(n(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const o=r+t;if(o>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,o);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:e.slice(o)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function c(e){let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function f(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r;t[r]=l(e.slice(n,n+2))}return t}function h(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r}function d(e){return(new TextEncoder).encode(e)}function p(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function y(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?f((t="string"!=typeof(r=e)?r:y(r)?r.slice(2):r).length%2?`0${t}`:t):d(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(p(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:c,concatBytes:h,hexToBytes:f,utf8ToBytes:d},t.RLP={encode:r,decode:s}},4706:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const i=r(7256),o=r(1115),s=r(101),a=r(144),u=r(4916),c=r(8127),l=r(8707),f=r(4243),h=BigInt(0);class d{constructor(e=h,t=h,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:i}=e;return new d(void 0!==t?(0,u.bufferToBigInt)((0,u.toBuffer)(t)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==i?(0,u.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){const t=(0,u.arrToBufArr)(i.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,i]=e;return new d((0,u.bufferToBigInt)(t),(0,u.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<h)throw new Error("nonce must be greater than zero");if(this.balance<h)throw new Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw new Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(i.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(c.KECCAK256_NULL)}isEmpty(){return this.balance===h&&this.nonce===h&&this.codeHash.equals(c.KECCAK256_NULL)}}function p(e){const[t,r,n,i]=e;return[t,r,0===(0,u.arrToBufArr)(n).length?c.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(i).length?c.KECCAK256_NULL:i]}t.Account=d,t.isValidAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,l.assertIsHexString)(e);const r=(0,f.stripHexPrefix)(e).toLowerCase();let i="";void 0!==t&&(i=(0,u.bufferToBigInt)((0,u.toBuffer)(t)).toString()+"0x");const s=n.from(i+r,"utf8"),c=(0,a.bytesToHex)((0,o.keccak256)(s));let h="0x";for(let e=0;e<r.length;e++)parseInt(c[e],16)>=8?h+=r[e].toUpperCase():h+=r[e];return h},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,u.bufferToBigInt)(t)===BigInt(0)?n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([e,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,u.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,l.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const i=(0,o.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,o.keccak256)(r)]));return(0,u.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,l.assertIsBuffer)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,l.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,o.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,l.assertIsBuffer)(e),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,l.assertIsBuffer)(e),64!==e.length&&(e=n.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,u.zeros)(20);return(0,u.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=p;const y=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,i]=e;return[t,r,(0,u.arrToBufArr)(n).equals(c.KECCAK256_RLP)?y:n,(0,u.arrToBufArr)(i).equals(c.KECCAK256_NULL)?y:i]},t.accountBodyToRLP=function(e,t=!0){const r=t?p(e):e;return(0,u.arrToBufArr)(i.RLP.encode(r))}},8515:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const i=r(4706),o=r(4916);class s{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new s((0,o.zeros)(20))}static fromString(e){if(!(0,i.isValidAddress)(e))throw new Error("Invalid address");return new s((0,o.toBuffer)(e))}static fromPublicKey(e){if(!n.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,i.pubToAddress)(e);return new s(t)}static fromPrivateKey(e){if(!n.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,i.privateToAddress)(e);return new s(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new s((0,i.generateAddress)(e.buf,(0,o.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!n.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new s((0,i.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=(0,o.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return n.from(this.buf)}}t.Address=s},8263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(2699);class i extends n.EventEmitter{emit(e,...t){let[r,n]=t;const i=this;let o=i._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),o=Array.isArray(o)?o:[o],async function(e,t,r){let n;for await(const i of t)try{i.length<2?i.call(e,r):await new Promise(((t,n)=>{i.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(i,o.slice(),r).then(n).catch(n),i.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(i,o){r.removeListener(e,n),t(i,o)}:function(i){r.removeListener(e,n),t(i,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let i,o,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),o=s.length,i=s.length;i--;)if(s[i]===t){o=i+a;break}return s.splice(o,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=i},4916:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const i=r(8707),o=r(4243);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};const s=function(e,r,n){const i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,i.assertIsBuffer)(e),s(e,t,!1)},t.setLengthRight=function(e,t){return(0,i.assertIsBuffer)(e),s(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function u(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,i.assertIsBuffer)(e),a(e)},t.unpadArray=function(e){return(0,i.assertIsArray)(e),a(e)},t.unpadHexString=function(e){return(0,i.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),"0x"+a(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),n.from(t,"hex")}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=u,t.bigIntToBuffer=c,t.bufferToInt=function(e){const t=Number(u(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,u(e))},t.toUnsigned=function(e){return c(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e||(0,o.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){const r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,o.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},8127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8834),i=r(101);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},3244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n<e.length;r+=1,n+=2)t[r]=e[n]<<4|e[n+1]},t.nibblesToCompactBytes=e=>{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1==(1&e.length)&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t<e.length;t++){const n=e[t];r[2*t]=n/16,r[2*t+1]=n%16}return r[t-1]=16,r},t.compactBytesToNibbles=e=>{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},8707:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const i=r(4243);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!n.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},5372:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=t.ssz=void 0,i(r(8127),t),i(r(3895),t),i(r(4706),t),i(r(8515),t),i(r(2868),t),i(r(2074),t),i(r(4916),t),t.ssz=r(1668),i(r(2103),t),i(r(3244),t),i(r(8263),t);var o=r(4243);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(6065),t),i(r(6831),t)},4243:(e,t,r)=>{"use strict";var n=r(8834).Buffer;function i(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function o(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t},t.fromUtf8=function(e){return`0x${o(n.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const n=[];for(let i=0;i<e.length;i++){let o=e[i][t];if(!0!==r||o){if("string"!=typeof o)throw new Error("invalid abi - expected type 'string', received "+typeof o)}else o="";n.push(o)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||void 0!==t&&t>0&&e.length!==2+2*t)}},6065:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},6831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(2973);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2074:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const i=r(1115),o=r(101),s=r(4916),a=r(8127),u=r(8707);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const i=o.secp256k1.sign(e,t),s=i.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(i,32)],64),f=c(t,a);if(!l(f))throw new Error("Invalid signature v value");const h=o.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return n.from(h.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(c(e,i)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){const t=(0,s.toBuffer)(e);let r,n,i;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),i=(0,s.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),i=BigInt((0,s.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return i<27&&(i+=BigInt(27)),{v:i,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,i){if(32!==t.length||32!==r.length)return!1;if(!l(c(e,i)))return!1;const o=(0,s.bufferToBigInt)(t),u=(0,s.bufferToBigInt)(r);return!(o===BigInt(0)||o>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER||n&&u>=a.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);const t=n.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},1668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawals=t.Withdrawal=t.Bytes20=t.UintBigInt64=t.UintNum64=void 0;const n=r(557),i=r(8127);t.UintNum64=new n.UintNumberType(8),t.UintBigInt64=new n.UintBigintType(8),t.Bytes20=new n.ByteVectorType(20),t.Withdrawal=new n.ContainerType({index:t.UintBigInt64,validatorIndex:t.UintBigInt64,address:t.Bytes20,amount:t.UintBigInt64},{typeName:"Withdrawal",jsonCase:"eth2"}),t.Withdrawals=new n.ListCompositeType(t.Withdrawal,i.MAX_WITHDRAWALS_PER_PAYLOAD)},2103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(4916),i=r(4243);var o;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(o=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case o.Buffer:return r;case o.BigInt:return(0,n.bufferToBigInt)(r);case o.Number:{const e=(0,n.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case o.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},3895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},2868:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const i=r(8515),o=r(4916),s=r(2103);class a{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:n,amount:o}=e,u=(0,s.toType)(t,s.TypeOutput.BigInt),c=(0,s.toType)(r,s.TypeOutput.BigInt),l=new i.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(o,s.TypeOutput.BigInt);return new a(u,c,l,f)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,i]=e;return a.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:i})}static toBufferArray(e){const{index:t,validatorIndex:r,address:o,amount:a}=e,u=(0,s.toType)(t,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(t,s.TypeOutput.Buffer),c=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let l;return l=o instanceof i.Address?o.buf:(0,s.toType)(o,s.TypeOutput.Buffer),[u,c,l,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,o.bigIntToHex)(this.amount)}}}t.Withdrawal=a},8856:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.JsonRpcError=void 0;const i=r(8513),o=n(r(7847)),s=r(7962);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,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,i.isPlainObject)(this.data)&&(e.data.cause=(0,s.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,o.default)(this.serialize(),u,2)}}function u(e,t){if("[Circular]"!==t)return t}t.JsonRpcError=a,t.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)}}},5191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.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}},t.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."}}},6748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerErrors=t.rpcErrors=void 0;const n=r(8856),i=r(5191),o=r(7962);function s(e,t){const[r,i]=u(t);return new n.JsonRpcError(e,r??(0,o.getMessageFromCode)(e),i)}function a(e,t){const[r,i]=u(t);return new n.EthereumProviderError(e,r??(0,o.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??void 0,r]}}return[]}t.rpcErrors={parse:e=>s(i.errorCodes.rpc.parse,e),invalidRequest:e=>s(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(i.errorCodes.rpc.methodNotFound,e),internal:e=>s(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 s(t,e)},invalidInput:e=>s(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(i.errorCodes.rpc.limitExceeded,e)},t.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)}}},774:(e,t,r)=>{"use strict";t.PY=t.Xy=void 0;r(8856);var n=r(7962);Object.defineProperty(t,"Xy",{enumerable:!0,get:function(){return n.serializeError}});var i=r(6748);Object.defineProperty(t,"PY",{enumerable:!0,get:function(){return i.rpcErrors}});r(5191)},7962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCause=t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(8513),i=r(5191),o=i.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(u(e)){const r=e.toString();if((0,n.hasProperty)(i.errorValues,r))return i.errorValues[r].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}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}),{})}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=u,t.serializeError=function(e,{fallbackError:t=s,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;return{...t,data:{cause:c(e)}}}(e,t);return r||delete i.stack,i},t.serializeCause=c},6580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(6891);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 o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=o,t.assert=function(e,t="Assertion failed.",r=o){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",s=o){try{(0,n.assert)(e,t)}catch(e){throw i(s,`${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)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},8530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(6891),i=r(6580);t.base64=(e,t={})=>{var r,o;const s=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(o=t.characterSet)&&void 0!==o?o:"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=s?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)}},6501:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const i=r(6580),o=r(1307),s=48,a=58,u=87,c=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 l(e){return e instanceof Uint8Array}function f(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(f(e),0===e.length)return"0x";const t=c(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,o.add0x)(r.join(""))}function d(e){f(e);const t=h(e);return BigInt(t)}function p(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,o.assertIsHexString)(e);const r=(0,o.remove0x)(e).toLowerCase(),n=r.length%2==0?r:`0${r}`,i=new Uint8Array(n.length/2);for(let e=0;e<i.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),o=t-(t<a?s:u),c=r-(r<a?s:u);i[e]=16*o+c}return i}function y(e){return(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)(e>=BigInt(0),"Value must be a non-negative bigint."),p(e.toString(16))}function g(e){return(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),p(e.toString(16))}function m(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return y(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?p(e):m(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=l,t.assertIsBytes=f,t.bytesToHex=h,t.bytesToBigInt=d,t.bytesToSignedBigInt=function(e){f(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){f(e);const t=d(e);return(0,i.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return f(e),(new TextDecoder).decode(e)},t.hexToBytes=p,t.bigIntToBytes=y,t.signedBigIntToBytes=function(e,t){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)("number"==typeof t,"Byte length must be a number."),(0,i.assert)(t>0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.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 n=new Uint8Array(t);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},t.numberToBytes=g,t.stringToBytes=m,t.valueToBytes=b,t.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},t.createDataView=function(e){if(void 0!==n&&e instanceof n){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},4308:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(6891),i=r(8530);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},3247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(6891),i=r(6580),o=r(6501),s=r(1307),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),o.hexToBytes)),f=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);t.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}},t.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}},t.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}},t.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}}},1373:function(e,t){"use strict";var r,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},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(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class s{constructor(e){r.set(this,void 0),i(this,r,new Map(e),"f"),Object.freeze(this)}get size(){return o(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return o(this,r,"f")[Symbol.iterator]()}entries(){return o(this,r,"f").entries()}forEach(e,t){return o(this,r,"f").forEach(((r,n,i)=>e.call(t,r,n,this)))}get(e){return o(this,r,"f").get(e)}has(e){return o(this,r,"f").has(e)}keys(){return o(this,r,"f").keys()}values(){return o(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=s;class a{constructor(e){n.set(this,void 0),i(this,n,new Set(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)))}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`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},5874:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const n=r(6891),i=r(6580);function o(e){return(0,n.is)(e,t.HexStruct)}function s(e){return(0,n.is)(e,t.StrictHexStruct)}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=o,t.isStrictHexString=s,t.assertIsHexString=function(e){(0,i.assert)(o(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,i.assert)(s(e),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}},8513:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(6580),t),i(r(8530),t),i(r(6501),t),i(r(4308),t),i(r(3247),t),i(r(1373),t),i(r(5874),t),i(r(1307),t),i(r(8066),t),i(r(25),t),i(r(596),t),i(r(6023),t),i(r(272),t),i(r(8379),t),i(r(6648),t),i(r(2758),t),i(r(1770),t)},8066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=void 0;const n=r(6891),i=r(6580);t.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)((()=>t.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>t.UnsafeJsonStruct)))]),t.JsonStruct=(0,n.define)("Json",((e,r)=>{function n(e,t){const n=[...t.validator(e,r)];return!(n.length>0)||n}try{const r=n(e,t.UnsafeJsonStruct);return!0!==r?r:n(JSON.parse(JSON.stringify(e)),t.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),t.isValidJson=function(e){return(0,n.is)(e,t.JsonStruct)},t.getJsonSize=function(e){(0,i.assertStruct)(e,t.JsonStruct,"Invalid JSON value");const r=JSON.stringify(e);return(new TextEncoder).encode(r).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(t.JsonStruct),stack:(0,n.optional)((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,n.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.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)}},25:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},596:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const i=(0,n(r(5130)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},6023:(e,t)=>{"use strict";function r(e){return e.charCodeAt(0)<=127}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),(n=t.JsonSize||(t.JsonSize={}))[n.Null=4]="Null",n[n.Comma=1]="Comma",n[n.Wrapper=1]="Wrapper",n[n.True=4]="True",n[n.False=5]="False",n[n.Quote=1]="Quote",n[n.Colon=1]="Colon",n[n.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.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}},t.isASCII=r,t.calculateStringSize=function(e){var n;return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(null!==(n=e.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==n?n:[]).length},t.calculateNumberSize=function(e){return e.toString().length}},272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(6580),i=r(1307);t.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))),t.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))),t.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},t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},8379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6648:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},2758:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(8249),i=r(6891),o=r(6580);t.VersionStruct=(0,i.refine)((0,i.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,i.refine)((0,i.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,i.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,i.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,n.gt)(e,t)},t.gtRange=function(e,t){return(0,n.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}},372:(e,t,r)=>{"use strict";const n=r(6195),i=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),u=Symbol("maxAge"),c=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),d=Symbol("updateAgeOnGet"),p=()=>1,y=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(g(e,t)){if(b(e,n),!e[a])return}else r&&(e[d]&&(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]},m=e=>{if(e[o]>e[i])for(let t=e[f].tail;e[o]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[o]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}};class v{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const w=(e,t,r,n)=>{let i=r.value;g(e,i)&&(b(e,r),e[a]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.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||1/0;const t=e.length||p;if(this[s]="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[d]=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||1/0,m(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,m(this)}get maxAge(){return this[u]}set lengthCalculator(e){"function"!=typeof e&&(e=p),e!==this[s]&&(this[s]=e,this[o]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[o]+=e.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(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[h]=new Map,this[f]=new n,this[o]=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[s](t,e);if(this[h].has(e)){if(a>this[i])return b(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[c]&&(this[l]||this[c](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[o]+=a-s.length,s.length=a,this.get(e),m(this),!0}const d=new v(e,t,a,n,r);return d.length>this[i]?(this[c]&&this[c](e,t),!1):(this[o]+=d.length,this[f].unshift(d),this[h].set(e,this[f].head),m(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!g(this,t)}get(e){return y(this,e,!0)}peek(e){return y(this,e,!1)}pop(){const e=this[f].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].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[h].forEach(((e,t)=>y(this,t,!1)))}}},6487:(e,t,r)=>{const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(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?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?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=o(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(">")))}}e.exports=i;const o=r(2398),{safeRe:s,t:a}=r(8669),u=r(5793),c=r(2368),l=r(4952),f=r(1546)},1546:(e,t,r)=>{class n{constructor(e,t){if(t=o(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)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))).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&&m(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&&y))+":"+e,r=i.get(t);if(r)return r;const n=this.options.loose,o=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(o,B(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),a("comparator trim",e);let u=(e=(e=e.replace(c[l.TILDETRIM],h)).replace(c[l.CARETTRIM],d)).split(" ").map((e=>v(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 m=new Map,b=u.map((e=>new s(e,this.options)));for(const e of b){if(g(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const w=[...m.values()];return i.set(t,w),w}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>b(r,t)&&e.set.some((e=>b(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(P(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const i=new(r(372))({max:1e3}),o=r(2398),s=r(6487),a=r(2368),u=r(4952),{safeRe:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:h,caretTrimReplace:d}=r(8669),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:y}=r(2828),g=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,b=(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},v=(e,t)=>(a("comp",e,t),e=A(e,t),a("caret",e),e=_(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=N(e,t),a("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,i,o)=>{let s;return a("tilde",e,t,r,n,i,o),w(r)?s="":w(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(a("replaceTilde pr",o),s=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},A=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(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,o,s)=>{let u;return a("caret",e,t,r,i,o,s),w(r)?u="":w(i)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(o)?u="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),u="0"===r?"0"===i?`>=${r}.${i}.${o}-${s} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${s} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),a("caret return",u),u}))},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>O(e,t))).join(" ")),O=(e,t)=>{e=e.trim();const r=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(r,((r,n,i,o,s,u)=>{a("xRange",e,r,n,i,o,s,u);const c=w(i),l=c||w(o),f=l||w(s),h=f;return"="===n&&h&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(l&&(o=0),s=0,">"===n?(n=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===n&&(n="<",l?i=+i+1:o=+o+1),"<"===n&&(u="-0"),r=`${n+i}.${o}.${s}${u}`):l?r=`>=${i}.0.0${u} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${u} <${i}.${+o+1}.0-0`),a("xRange return",r),r}))},N=(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],"")),B=e=>(t,r,n,i,o,s,a,u,c,l,f,h,d)=>`${r=w(n)?"":w(i)?`>=${n}.0.0${e?"-0":""}`:w(o)?`>=${n}.${i}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=w(c)?"":w(l)?`<${+c+1}.0.0-0`:w(f)?`<${c}.${+l+1}.0-0`:h?`<=${c}.${l}.${f}-${h}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),P=(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!==s.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}},4952:(e,t,r)=>{const n=r(2368),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(2828),{safeRe:s,t:a}=r(8669),u=r(2398),{compareIdentifiers:c}=r(8729);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?s[a.LOOSE]:s[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>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||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<o)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),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)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),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)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}}e.exports=l},3682:(e,t,r)=>{const n=r(4077);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},5793:(e,t,r)=>{const n=r(1336),i=r(4328),o=r(7988),s=r(1681),a=r(8326),u=r(8630);e.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 o(e,r,c);case">=":return s(e,r,c);case"<":return a(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},5733:(e,t,r)=>{const n=r(4952),i=r(4077),{safeRe:o,t:s}=r(8669);e.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=o[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),o[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;o[s.COERCERTL].lastIndex=-1}else r=e.match(o[s.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},7339:(e,t,r)=>{const n=r(4952);e.exports=(e,t,r)=>{const i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},3115:(e,t,r)=>{const n=r(6472);e.exports=(e,t)=>n(e,t,!0)},6472:(e,t,r)=>{const n=r(4952);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},253:(e,t,r)=>{const n=r(4077);e.exports=(e,t)=>{const r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,u=s?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"}},1336:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>0===n(e,t,r)},7988:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>n(e,t,r)>0},1681:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>n(e,t,r)>=0},982:(e,t,r)=>{const n=r(4952);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},8326:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>n(e,t,r)<0},8630:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>n(e,t,r)<=0},9174:(e,t,r)=>{const n=r(4952);e.exports=(e,t)=>new n(e,t).major},2139:(e,t,r)=>{const n=r(4952);e.exports=(e,t)=>new n(e,t).minor},4328:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>0!==n(e,t,r)},4077:(e,t,r)=>{const n=r(4952);e.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}}},1810:(e,t,r)=>{const n=r(4952);e.exports=(e,t)=>new n(e,t).patch},2912:(e,t,r)=>{const n=r(4077);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},965:(e,t,r)=>{const n=r(6472);e.exports=(e,t,r)=>n(t,e,r)},7876:(e,t,r)=>{const n=r(7339);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},46:(e,t,r)=>{const n=r(1546);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},7347:(e,t,r)=>{const n=r(7339);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},7115:(e,t,r)=>{const n=r(4077);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},8249:(e,t,r)=>{const n=r(8669),i=r(2828),o=r(4952),s=r(8729),a=r(4077),u=r(7115),c=r(3682),l=r(982),f=r(253),h=r(9174),d=r(2139),p=r(1810),y=r(2912),g=r(6472),m=r(965),b=r(3115),v=r(7339),w=r(7347),_=r(7876),E=r(7988),A=r(8326),S=r(1336),T=r(4328),O=r(1681),N=r(8630),x=r(5793),B=r(5733),P=r(6487),R=r(1546),I=r(46),C=r(2626),L=r(8464),j=r(5646),k=r(4797),M=r(7042),U=r(4466),F=r(3538),D=r(3439),z=r(2773),$=r(5387),V=r(687);e.exports={parse:a,valid:u,clean:c,inc:l,diff:f,major:h,minor:d,patch:p,prerelease:y,compare:g,rcompare:m,compareLoose:b,compareBuild:v,sort:w,rsort:_,gt:E,lt:A,eq:S,neq:T,gte:O,lte:N,cmp:x,coerce:B,Comparator:P,Range:R,satisfies:I,toComparators:C,maxSatisfying:L,minSatisfying:j,minVersion:k,validRange:M,outside:U,gtr:F,ltr:D,intersects:z,simplifyRange:$,subset:V,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},2828:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2368:(e,t,r)=>{var n=r(4406);const i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=i},8729:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},2398:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},8669:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(2828),i=r(2368),o=(t=e.exports={}).re=[],s=t.safeRe=[],a=t.src=[],u=t.t={};let c=0;const l=(e,t,r)=>{const n=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),l=c++;i(e,l,t),u[e]=l,a[l]=t,o[l]=new RegExp(t,r?"g":void 0),s[l]=new RegExp(n,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})\\.(${a[u.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})\\.(${a[u.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${a[u.NUMERICIDENTIFIER]}|${a[u.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${a[u.NUMERICIDENTIFIERLOOSE]}|${a[u.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${a[u.PRERELEASEIDENTIFIER]}(?:\\.${a[u.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${a[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[u.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${a[u.BUILDIDENTIFIER]}(?:\\.${a[u.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${a[u.MAINVERSION]}${a[u.PRERELEASE]}?${a[u.BUILD]}?`),l("FULL",`^${a[u.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${a[u.MAINVERSIONLOOSE]}${a[u.PRERELEASELOOSE]}?${a[u.BUILD]}?`),l("LOOSE",`^${a[u.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${a[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${a[u.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:\\.(${a[u.XRANGEIDENTIFIER]})(?:${a[u.PRERELEASE]})?${a[u.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[u.XRANGEIDENTIFIERLOOSE]})(?:${a[u.PRERELEASELOOSE]})?${a[u.BUILD]}?)?)?`),l("XRANGE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${a[u.GTLT]}\\s*${a[u.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",a[u.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${a[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${a[u.LONETILDE]}${a[u.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${a[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${a[u.LONECARET]}${a[u.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${a[u.LONECARET]}${a[u.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${a[u.GTLT]}\\s*(${a[u.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${a[u.GTLT]}\\s*(${a[u.LOOSEPLAIN]}|${a[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${a[u.XRANGEPLAIN]})\\s+-\\s+(${a[u.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${a[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[u.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},3538:(e,t,r)=>{const n=r(4466);e.exports=(e,t,r)=>n(e,t,">",r)},2773:(e,t,r)=>{const n=r(1546);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},3439:(e,t,r)=>{const n=r(4466);e.exports=(e,t,r)=>n(e,t,"<",r)},8464:(e,t,r)=>{const n=r(4952),i=r(1546);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&-1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},5646:(e,t,r)=>{const n=r(4952),i=r(1546);e.exports=(e,t,r)=>{let o=null,s=null,a=null;try{a=new i(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(o&&1!==s.compare(e)||(o=e,s=new n(o,r)))})),o}},4797:(e,t,r)=>{const n=r(4952),i=r(1546),o=r(7988);e.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 s=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">=":s&&!o(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!o(r,s)||(r=s)}return r&&e.test(r)?r:null}},4466:(e,t,r)=>{const n=r(4952),i=r(6487),{ANY:o}=i,s=r(1546),a=r(46),u=r(7988),c=r(8326),l=r(8630),f=r(1681);e.exports=(e,t,r,h)=>{let d,p,y,g,m;switch(e=new n(e,h),t=new s(t,h),r){case">":d=u,p=l,y=c,g=">",m=">=";break;case"<":d=c,p=f,y=u,g="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let s=null,a=null;if(n.forEach((e=>{e.semver===o&&(e=new i(">=0.0.0")),s=s||e,a=a||e,d(e.semver,s.semver,h)?s=e:y(e.semver,a.semver,h)&&(a=e)})),s.operator===g||s.operator===m)return!1;if((!a.operator||a.operator===g)&&p(e,a.semver))return!1;if(a.operator===m&&y(e,a.semver))return!1}return!0}},5387:(e,t,r)=>{const n=r(46),i=r(6472);e.exports=(e,t,r)=>{const o=[];let s=null,a=null;const u=e.sort(((e,t)=>i(e,t,r)));for(const e of u)n(e,t,r)?(a=e,s||(s=e)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const c=[];for(const[e,t]of o)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}},687:(e,t,r)=>{const n=r(1546),i=r(6487),{ANY:o}=i,s=r(46),a=r(6472),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===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?u:c}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=c}const n=new Set;let i,l,d,p,y,g,m;for(const t of e)">"===t.operator||">="===t.operator?i=f(i,t,r):"<"===t.operator||"<="===t.operator?l=h(l,t,r):n.add(t.semver);if(n.size>1)return null;if(i&&l){if(d=a(i.semver,l.semver,r),d>0)return null;if(0===d&&(">="!==i.operator||"<="!==l.operator))return null}for(const e of n){if(i&&!s(e,String(i),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,i)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(p=f(i,e,r),p===e&&p!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(y=h(l,e,r),y===e&&y!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||i)&&0!==d)return!1}return!(i&&g&&!l&&0!==d||l&&m&&!i&&0!==d||v||b)},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},h=(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};e.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}},2626:(e,t,r)=>{const n=r(1546);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},7042:(e,t,r)=>{const n=r(1546);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},1128:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},6195:(e,t,r)=>{"use strict";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 o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(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}e.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++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){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){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,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.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,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.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,o=this.head;null!==o&&n<e;n++)o=o.next;var s=[];for(n=0;o&&n<t;n++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),n=0;n<r.length;n++)o=i(this,o,r[n]);return s},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{r(1128)(n)}catch(e){}},5887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(1377),i=r(64),o=r(7851);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},1465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(9530),i=r(4323),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:u}=n(t);let c=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<a;e++){const t=e*u;let n=Number(o&f);o>>=d,n>u&&(n-=h,o+=s);const a=t,p=t+Math.abs(n)-1,y=e%2!=0,g=n<0;0===n?l=l.add(r(y,i[a])):c=c.add(r(g,i[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},1322:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(9530),i=r(4323),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function u(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){u(e),u(t),c(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(t,s(t.length,1)),d=s(0,l),p=s(r,2),y=new Array(f),g=n((0,i.concatBytes)(d,e,p,s(0,1),h));y[0]=n((0,i.concatBytes)(g,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(g,y[e-1]),s(e+1,1),h];y[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...y).slice(0,r)}function f(e,t,r,n,o){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,i.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:d,expand:p,DST:y}=r;u(e),c(t);const g=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(y),m=s.toString(2).length,b=Math.ceil((m+a)/8),v=t*h*b;let w;if("xmd"===p)w=l(e,g,v,d);else if("xof"===p)w=f(e,g,v,a,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const _=new Array(t);for(let e=0;e<t;e++){const t=new Array(h);for(let r=0;r<h;r++){const i=b*(r+e*h),a=w.subarray(i,i+b);t[r]=(0,n.mod)(o(a),s)}_[e]=t}return _}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=h,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},9530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(4323),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function h(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=s-u*e,o=a-c*e;n=r,r=t,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&h(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const c=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,u=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,c),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(u,o<<BigInt(s-t-1));u=e.sqr(r),l=e.mul(l,r),f=e.mul(f,u),s=t}return l}}function y(e){if(e%u===a){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===c){const t=(e-c)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),u=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),r))throw new Error("Cannot find square root");return u}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=h,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=y,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){const t=g.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=v(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=y(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>m(l,e,t),div:(t,r)=>f(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:s.sqrt||(e=>c(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o}},4323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function u(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(e.length%2)throw new Error("hex string is invalid: unpadded "+e.length);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("invalid byte sequence");t[r]=o}return t}function f(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=(e,t)=>l(e.toString(16).padStart(2*t,"0")),t.numberToBytesLE=(e,r)=>(0,t.numberToBytesBE)(e,r).reverse(),t.numberToVarBytesBE=e=>l(u(e)),t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=f,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=(e,t)=>e>>BigInt(t)&n,t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const h=e=>new Uint8Array(e),d=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),i=h(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),u=(e=h())=>{i=a(d([0]),e),n=a(),0!==e.length&&(i=a(d([1]),e),n=a())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return f(...r)};return(e,t)=>{let r;for(s(),u(e);!(r=t(c()));)u();return s(),r}};const p={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=p[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},7851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(9530),i=r(4323),o=r(4323),s=r(1465),{bytesToNumberBE:a,hexToBytes:u}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:c}=t.DER._parseInt(s);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&c<e&&e<t.n}function p(e){if(!d(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function y(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:u}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let c;try{c="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(c=n.mod(c,u)),p(c),c}const g=new Map;function m(e){if(!(e instanceof b))throw new Error("ProjectivePoint expected")}class b{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof b)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(y(e))}_setWindowSize(e){this._WINDOW_SIZE=e,g.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){m(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(o,i)),c=r.eql(r.mul(n,a),r.mul(s,i));return u&&c}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),y=r.mul(o,s);return y=r.add(y,y),l=r.mul(o,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(d,c),c=r.add(d,c),c=r.mul(u,c),u=r.mul(y,u),l=r.mul(i,l),p=r.mul(e,p),y=r.sub(f,p),y=r.mul(e,y),y=r.add(y,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,y),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,y),u=r.sub(u,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new b(u,c,l)}add(e){m(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const d=t.a,p=r.mul(t.b,h);let y=r.mul(n,s),g=r.mul(i,a),v=r.mul(o,u),w=r.add(n,i),_=r.add(s,a);w=r.mul(w,_),_=r.add(y,g),w=r.sub(w,_),_=r.add(n,o);let E=r.add(s,u);return _=r.mul(_,E),E=r.add(y,v),_=r.sub(_,E),E=r.add(i,o),c=r.add(a,u),E=r.mul(E,c),c=r.add(g,v),E=r.sub(E,c),f=r.mul(d,_),c=r.mul(p,v),f=r.add(c,f),c=r.sub(g,f),f=r.add(g,f),l=r.mul(c,f),g=r.add(y,y),g=r.add(g,y),v=r.mul(d,v),_=r.mul(p,_),g=r.add(g,v),v=r.sub(y,v),v=r.mul(d,v),_=r.add(_,v),y=r.mul(g,_),l=r.add(l,y),y=r.mul(E,_),c=r.mul(w,c),c=r.sub(c,y),y=r.mul(w,g),f=r.mul(E,f),f=r.add(f,y),new b(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,g,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(e),f=n,h=n,d=this;for(;s>c||u>c;)s&l&&(f=f.add(d)),u&l&&(h=h.add(d)),d=d.double(),s>>=l,u>>=l;return o&&(f=f.negate()),a&&(h=h.negate()),h=new b(r.mul(h.px,i.beta),h.py,h.pz),f.add(h)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:u}=s.splitScalar(o);let{p:c,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(u);c=w.constTimeNegate(e,c),f=w.constTimeNegate(a,f),f=new b(r.mul(f.px,s.beta),f.py,f.pz),n=c.add(f),i=l.add(h)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,i=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:y,weierstrassEquation:f,isWithinCurveOrder:d}}function y(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=(r-l)/f**i,s=(o-l)/f,a=f**i-l,u=f**(i-l),p=e.pow(t,o),y=e.pow(t,(o+l)/f);let g=(t,r)=>{let n=p,o=e.pow(r,a),c=e.sqr(o);c=e.mul(c,r);let h=e.mul(t,c);h=e.pow(h,s),h=e.mul(h,o),o=e.mul(h,r),c=e.mul(h,t);let d=e.mul(c,o);h=e.pow(d,u);let g=e.eql(h,e.ONE);o=e.mul(c,y),h=e.mul(d,n),c=e.cmov(o,c,g),d=e.cmov(h,d,g);for(let t=i;t>l;t--){let r=f**(t-f),i=e.pow(d,r);const s=e.eql(i,e.ONE);o=e.mul(c,n),n=e.mul(n,n),i=e.mul(d,n),c=e.cmov(o,c,s),d=e.cmov(i,d,s)}return{isValid:g,value:c}};if(e.ORDER%d===h){const r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));g=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const u=e.mul(a,n),c=e.mul(e.sqr(a),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return g}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:u}=r,f=a.BYTES+1,h=2*a.BYTES+1;function d(e){return n.mod(e,u)}function y(e){return n.invert(e,u)}const{ProjectivePoint:g,normPrivateKeyToScalar:m,weierstrassEquation:b,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(c<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=b(e);let s=a.sqrt(t);return 1==(1&r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),w=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function _(e){return e>u>>l}const E=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class A{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new A(E(e,0,t),E(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new A(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new A(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=N((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?t+r.n:t;if(u>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=0==(1&i)?"02":"03",l=g.fromHex(c+w(u)),f=y(u),h=d(-s*f),p=d(n*f),m=g.BASE.multiplyAndAddUnsafe(l,h,p);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return _(this.s)}normalizeS(){return this.hasHighS()?new A(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const S={isValidPrivateKey(e){try{return m(e),!0}catch(e){return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const e=r.randomBytes(a.BYTES+8),t=n.hashToPrivateScalar(e,u);return i.numberToBytesBE(t,r.nByteLength)},precompute:(e=8,t=g.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function T(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof g}const O=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},N=r.bits2int_modN||function(e){return d(O(e))},x=i.bitMask(r.nBitLength);function B(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&e<x))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const P={lowS:r.lowS,prehash:!1},R={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return g.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(T(e))throw new Error("first arg must be private key");if(!T(t))throw new Error("second arg must be public key");return g.fromHex(t).multiply(m(e)).toRawBytes(r)},sign:function(e,t,n=P){const{seed:s,k2sig:u}=function(e,t,n=P){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=r;let{lowS:f,prehash:h,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),h&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const b=N(e),w=m(t),E=[B(w),B(b)];if(null!=p){const e=!0===p?u(a.BYTES):p;E.push((0,o.ensureBytes)("extraEntropy",e,a.BYTES))}const S=i.concatBytes(...E),T=b;return{seed:S,k2sig:function(e){const t=O(e);if(!v(t))return;const r=y(t),n=g.BASE.multiply(t).toAffine(),i=d(n.x);if(i===c)return;const o=d(r*d(T+i*w));if(o===c)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&_(o)&&(a=function(e){return _(e)?d(-e):e}(o),s^=1),new A(i,a,s)}}}(e,t,n);return i.createHmacDrbg(r.hash.outputLen,r.nByteLength,r.hmac)(s,u)},verify:function(e,n,i,s=R){const a=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=A.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=A.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new A(e,t)}}f=g.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:h,s:p}=l,m=N(n),b=y(p),v=d(m*b),w=d(h*b),_=g.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!_&&d(_.x)===h},ProjectivePoint:g,Signature:A,utils:S}},t.SWUFpSqrtRatio=y,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=y(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),c=e.sqr(a),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,s),c=e.mul(c,a),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,s);const{isValid:h,value:d}=r(o,c);f=e.mul(i,n),f=e.mul(f,d),l=e.cmov(l,s,h),f=e.cmov(f,d,h);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},8358:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const i=r(6053),o=r(64),s=r(9530),a=r(7851),u=r(4323),c=r(1322),l=r(5887),f=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d=BigInt(1),p=BigInt(2),y=(e,t)=>(e+t/p)/t;function g(e){const t=f,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),l=e*e*e%t,h=l*l*e%t,d=(0,s.pow2)(h,r,t)*h%t,y=(0,s.pow2)(d,r,t)*h%t,g=(0,s.pow2)(y,p,t)*l%t,b=(0,s.pow2)(g,i,t)*g%t,v=(0,s.pow2)(b,o,t)*b%t,w=(0,s.pow2)(v,u,t)*v%t,_=(0,s.pow2)(w,c,t)*w%t,E=(0,s.pow2)(_,u,t)*v%t,A=(0,s.pow2)(E,r,t)*h%t,S=(0,s.pow2)(A,a,t)*b%t,T=(0,s.pow2)(S,n,t)*l%t,O=(0,s.pow2)(T,p,t);if(!m.eql(m.sqr(O),e))throw new Error("Cannot find square root");return O}const m=(0,s.Field)(f,void 0,void 0,{sqrt:g});t.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:m,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-d*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,a=BigInt("0x100000000000000000000000000000000"),u=y(o*e,t),c=y(-n*e,t);let l=(0,s.mod)(e-u*r-c*i,t),f=(0,s.mod)(-u*n-c*o,t);const p=l>a,g=f>a;if(p&&(l=t-l),g&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:l,k2neg:g,k2:f}}}},i.sha256);const b=BigInt(0),v=e=>"bigint"==typeof e&&b<e&&e<f,w={};function _(e,...t){let r=w[e];if(void 0===r){const t=(0,i.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,u.concatBytes)(t,t),w[e]=r}return(0,i.sha256)((0,u.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),A=e=>(0,u.numberToBytesBE)(e,32),S=e=>(0,s.mod)(e,f),T=e=>(0,s.mod)(e,h),O=t.secp256k1.ProjectivePoint;function N(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=O.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:T(-r),bytes:E(n)}}function x(e){if(!v(e))throw new Error("bad x: need 0 < x < p");const t=S(e*e);let r=g(S(t*e+BigInt(7)));r%p!==b&&(r=S(-r));const n=new O(e,r,d);return n.assertValidity(),n}function B(...e){return T((0,u.bytesToNumberBE)(_("BIP0340/challenge",...e)))}function P(e,t,r){const n=(0,u.ensureBytes)("signature",e,64),i=(0,u.ensureBytes)("message",t),o=(0,u.ensureBytes)("publicKey",r,32);try{const e=x((0,u.bytesToNumberBE)(o)),t=(0,u.bytesToNumberBE)(n.subarray(0,32));if(!v(t))return!1;const r=(0,u.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&b<l&&l<h))return!1;const f=B(A(t),E(e),i),d=(s=e,a=r,c=T(-f),O.BASE.multiplyAndAddUnsafe(s,a,c));return!(!d||!d.hasEvenY()||d.toAffine().x!==t)}catch(e){return!1}var s,a,c,l}t.schnorr={getPublicKey:function(e){return N(e).bytes},sign:function(e,t,r=(0,o.randomBytes)(32)){const n=(0,u.ensureBytes)("message",e),{bytes:i,scalar:s}=N(t),a=(0,u.ensureBytes)("auxRand",r,32),c=A(s^(0,u.bytesToNumberBE)(_("BIP0340/aux",a))),l=_("BIP0340/nonce",c,i,n),f=T((0,u.bytesToNumberBE)(l));if(f===b)throw new Error("sign failed: k is zero");const{bytes:h,scalar:d}=N(f),p=B(h,i,n),y=new Uint8Array(64);if(y.set(h,0),y.set(A(T(d+p*s)),32),!P(y,n,i))throw new Error("sign: Invalid signature produced");return y},verify:P,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:x,pointToBytes:E,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:_,mod:s.mod}};const R=c.isogenyMap(m,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))),I=(0,a.mapToCurveSimpleSWU)(m,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:m.create(BigInt("-11"))});n=c.createHasher(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=I(m.create(e[0]));return R(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:m.ORDER,m:1,k:128,expand:"xmd",hash:i.sha256}),t.hashToCurve=n.hashToCurve,t.encodeToCurve=n.encodeToCurve},3525:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`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");r(e.outputLen),r(e.blockLen)}function s(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 a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const u={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=u},9350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(3525),i=r(64);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){n.default.exists(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.default.exists(this),n.default.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},1655:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}function s(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.fromBig=i,t.split=o,t.toBig=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0),t.add=s;const a={fromBig:i,split:o,toBig:t.toBig,shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,r)=>e<<r|t>>>32-r,rotlSL:(e,t,r)=>t<<r|e>>>32-r,rotlBH:(e,t,r)=>t<<r-32|e>>>64-r,rotlBL:(e,t,r)=>e<<r-32|t>>>64-r,add:s,add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)};t.default=a},825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1377:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const n=r(3525),i=r(64);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.default.hash(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return n.default.exists(this),this.iHash.update(e),this}digestInto(e){n.default.exists(this),n.default.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},6053:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(9350),i=r(64),o=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+s[e]+u[e]|0,y=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;d=h,h=f,f=l,l=c+t|0,c=a,a=n,n=r,r=t+y|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,a,c,l,f,h,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new l))},125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(3525),i=r(1655),o=r(64),[s,a,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),d=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],s.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>>h)*p)%d,t&f&&(i^=l<<(l<<BigInt(e))-l);u.push(i)}const[y,g]=i.default.split(u,!0),m=(e,t,r)=>r>32?i.default.rotlBH(e,t,r):i.default.rotlSH(e,t,r),b=(e,t,r)=>r>32?i.default.rotlBL(e,t,r):i.default.rotlSL(e,t,r);function v(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,o=r[i],s=r[i+1],a=m(o,s,1)^r[n],u=b(o,s,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],o=m(t,i,n),u=b(t,i,n),c=s[r];t=e[c],i=e[c+1],e[c]=o,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]^=y[n],e[1]^=g[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.default.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,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){n.default.exists(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;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){n.default.exists(this,!1),n.default.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 o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n.default.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(n.default.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:o}=this;return e||(e=new w(t,r,n,o,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=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const _=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=_(6,144,28),t.sha3_256=_(6,136,32),t.sha3_384=_(6,104,48),t.sha3_512=_(6,72,64),t.keccak_224=_(1,144,28),t.keccak_256=_(1,136,32),t.keccak_384=_(1,104,48),t.keccak_512=_(1,72,64);const E=(e,t,r)=>(0,o.wrapConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=E(31,168,16),t.shake256=E(31,136,32)},64:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(825);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function s(e){if("string"==typeof e&&(e=o(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[r]=o}return t},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=o,t.toBytes=s,t.concatBytes=function(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.Hash=class{clone(){return this._cloneInto()}},t.checkOpts=function(e,t){if(void 0!==t&&("object"!=typeof t||(r=t,"[object Object]"!==Object.prototype.toString.call(r)||r.constructor!==Object)))throw new TypeError("Options should be object or undefined");var r;return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.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")}},2349:(e,t,r)=>{"use strict";const{AbortError:n,codes:i}=r(2415),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:a}=r(6140),u=r(3803),{ERR_INVALID_ARG_TYPE:c}=i;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const r=o(t)?()=>{t.destroy(new n(void 0,{cause:e.reason}))}:()=>{t[a](new n(void 0,{cause:e.reason}))};return e.aborted?r():(e.addEventListener("abort",r),u(t,(()=>e.removeEventListener("abort",r)))),t}},4250:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:o,Uint8Array:s}=r(5439),{Buffer:a}=r(8834),{inspect:u}=r(9928);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[i](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,i=0;do{const o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,i=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(o(t,a,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}o(t,a,r-e),e-=a.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return u(this,{...t,depth:0,customInspect:!1})}}},5291:(e,t,r)=>{"use strict";const{pipeline:n}=r(7253),i=r(8637),{destroyer:o}=r(4664),{isNodeStream:s,isReadable:a,isWritable:u,isWebStream:c,isTransformStream:l,isWritableStream:f,isReadableStream:h}=r(6140),{AbortError:d,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:y}}=r(2415),g=r(3803);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r<e.length;++r)if(s(e[r])||c(e[r])){if(r<e.length-1&&!(a(e[r])||h(e[r])||l(e[r])))throw new p(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(u(e[r])||f(e[r])||l(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,m,b,v,w;const _=e[0],E=n(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):S||A||w.destroy()})),A=!!(u(_)||f(_)||l(_)),S=!!(a(E)||h(E)||l(E));if(w=new i({writableObjectMode:!(null==_||!_.writableObjectMode),readableObjectMode:!(null==E||!E.writableObjectMode),writable:A,readable:S}),A){if(s(_))w._write=function(e,t,n){_.write(e,t)?n():r=n},w._final=function(e){_.end(),m=e},_.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(c(_)){const e=(l(_)?_.writable:_).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=l(E)?E.readable:E;g(e,(()=>{if(m){const e=m;m=null,e()}}))}if(S)if(s(E))E.on("readable",(function(){if(b){const e=b;b=null,e()}})),E.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=E.read();if(null===e)return void(b=w._read);if(!w.push(e))return}};else if(c(E)){const e=(l(E)?E.readable:E).getReader();w._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(e,t){e||null===v||(e=new d),b=null,r=null,m=null,null===v?t(e):(v=t,s(E)&&o(E,e))},w}},4664:(e,t,r)=>{"use strict";const n=r(4406),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:o},AbortError:s}=r(2415),{Symbol:a}=r(5439),{kDestroyed:u,isDestroyed:c,isFinished:l,isServerRequest:f}=r(6140),h=a("kDestroy"),d=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let i=!1;function o(t){if(i)return;i=!0;const o=e._readableState,s=e._writableState;p(t,s,o),s&&(s.closed=!0),o&&(o.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,o)}catch(t){o(t)}}function g(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,o=e._writableState;if(null!=o&&o.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=o&&o.autoDestroy?e.destroy(t):t&&(t.stack,o&&!o.errored&&(o.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function w(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new o);t=!0;const i=e._readableState,s=e._writableState,a=s||i;i&&(i.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(h,r):r?v(e,r,!0):n.nextTick(_,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function _(e){e.emit(d)}function E(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function A(e){e.emit("close")}function S(e,t){e.emit("error",t),n.nextTick(A,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(d,t),e.listenerCount(d)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!c(e)&&(t||l(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):E(e)?e.abort():E(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(S,e,t):n.nextTick(A,e),e.destroyed||(e[u]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,o=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),o.constructed?y(this,e,t):this.once(h,(function(r){y(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},8637:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:o,ObjectSetPrototypeOf:s}=r(5439);e.exports=c;const a=r(538),u=r(4695);s(c.prototype,a.prototype),s(c,a);{const e=o(u.prototype);for(let t=0;t<e.length;t++){const r=e[t];c.prototype[r]||(c.prototype[r]=u.prototype[r])}}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),u.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let l,f;function h(){return void 0===l&&(l={}),l}n(c.prototype,{writable:{__proto__:null,...i(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...i(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...i(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...i(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...i(u.prototype,"writableLength")},writableFinished:{__proto__:null,...i(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...i(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...i(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...i(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),c.fromWeb=function(e,t){return h().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return h().newReadableWritablePairFromDuplex(e)},c.from=function(e){return f||(f=r(325)),f(e,"body")}},325:(e,t,r)=>{const n=r(4406),i=r(8834),{isReadable:o,isWritable:s,isIterable:a,isNodeStream:u,isReadableNodeStream:c,isWritableNodeStream:l,isDuplexNodeStream:f}=r(6140),h=r(3803),{AbortError:d,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:y}}=r(2415),{destroyer:g}=r(4664),m=r(8637),b=r(538),{createDeferredPromise:v}=r(9928),w=r(8236),_=globalThis.Blob||i.Blob,E=void 0!==_?function(e){return e instanceof _}:function(e){return!1},A=globalThis.AbortController||r(7948).AbortController,{FunctionPrototypeCall:S}=r(5439);class T extends m{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function O(e){const t=e.readable&&"function"!=typeof e.readable.read?b.wrap(e.readable):e.readable,r=e.writable;let n,i,a,u,c,l=!!o(t),f=!!s(r);function p(e){const t=u;u=null,t?t(e):e&&c.destroy(e)}return c=new T({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:f}),f&&(h(r,(e=>{f=!1,e&&g(t,e),p(e)})),c._write=function(e,t,i){r.write(e,t)?i():n=i},c._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(h(t,(e=>{l=!1,e&&g(t,e),p(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){c.push(null)})),c._read=function(){for(;;){const e=t.read();if(null===e)return void(a=c._read);if(!c.push(e))return}}),c._destroy=function(e,o){e||null===u||(e=new d),a=null,n=null,i=null,null===u?o(e):(u=o,g(r,e),g(t,e))},c}e.exports=function e(t,r){if(f(t))return t;if(c(t))return O({readable:t});if(l(t))return O({writable:t});if(u(t))return O({writable:!1,readable:!1});if("function"==typeof t){const{value:e,write:i,final:o,destroy:s}=function(e){let{promise:t,resolve:r}=v();const i=new A,o=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(o.aborted)throw new d(void 0,{cause:o.reason});({promise:t,resolve:r}=v()),yield i}}(),{signal:o}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(a(e))return w(T,e,{objectMode:!0,write:i,final:o,destroy:s});const u=null==e?void 0:e.then;if("function"==typeof u){let t;const r=S(u,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{g(t,e)}));return t=new T({objectMode:!0,readable:!1,write:i,final(e){o((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(a(t))return w(T,t,{objectMode:!0,writable:!1});if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return O({readable:null!=t&&t.readable?c(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return S(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{g(e,t)})),e=new T({objectMode:!0,writable:!1,read(){}})}throw new p(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},3803:(e,t,r)=>{const n=r(4406),{AbortError:i,codes:o}=r(2415),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=o,{kEmptyObject:u,once:c}=r(9928),{validateAbortSignal:l,validateFunction:f,validateObject:h,validateBoolean:d}=r(1670),{Promise:p,PromisePrototypeThen:y}=r(5439),{isClosed:g,isReadable:m,isReadableNodeStream:b,isReadableStream:v,isReadableFinished:w,isReadableErrored:_,isWritable:E,isWritableNodeStream:A,isWritableStream:S,isWritableFinished:T,isWritableErrored:O,isNodeStream:N,willEmitClose:x,kIsClosedPromise:B}=r(6140),P=()=>{};function R(e,t,r){var o,d;if(2===arguments.length?(r=t,t=u):null==t?t=u:h(t,"options"),f(r,"callback"),l(t.signal,"options.signal"),r=c(r),v(e)||S(e))return function(e,t,r){let o=!1,s=P;if(t.signal)if(s=()=>{o=!0,r.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{const n=r;r=c(((...r)=>{t.signal.removeEventListener("abort",s),n.apply(e,r)})),t.signal.addEventListener("abort",s)}const a=(...t)=>{o||n.nextTick((()=>r.apply(e,t)))};return y(e[B].promise,a,a),P}(e,t,r);if(!N(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const p=null!==(o=t.readable)&&void 0!==o?o:b(e),R=null!==(d=t.writable)&&void 0!==d?d:A(e),I=e._writableState,C=e._readableState,L=()=>{e.writable||M()};let j=x(e)&&b(e)===p&&A(e)===R,k=T(e,!1);const M=()=>{k=!0,e.destroyed&&(j=!1),(!j||e.readable&&!p)&&(p&&!U||r.call(e))};let U=w(e,!1);const F=()=>{U=!0,e.destroyed&&(j=!1),(!j||e.writable&&!R)&&(R&&!k||r.call(e))},D=t=>{r.call(e,t)};let z=g(e);const $=()=>{z=!0;const t=O(e)||_(e);return t&&"boolean"!=typeof t?r.call(e,t):p&&!U&&b(e,!0)&&!w(e,!1)?r.call(e,new a):!R||k||T(e,!1)?void r.call(e):r.call(e,new a)},V=()=>{z=!0;const t=O(e)||_(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},H=()=>{e.req.on("finish",M)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?R&&!I&&(e.on("end",L),e.on("close",L)):(e.on("complete",M),j||e.on("abort",$),e.req?H():e.on("request",H)),j||"boolean"!=typeof e.aborted||e.on("aborted",$),e.on("end",F),e.on("finish",M),!1!==t.error&&e.on("error",D),e.on("close",$),z?n.nextTick($):null!=I&&I.errorEmitted||null!=C&&C.errorEmitted?j||n.nextTick(V):(p||j&&!m(e)||!k&&!1!==E(e))&&(R||j&&!E(e)||!U&&!1!==m(e))?C&&e.req&&e.aborted&&n.nextTick(V):n.nextTick(V);const W=()=>{r=P,e.removeListener("aborted",$),e.removeListener("complete",M),e.removeListener("abort",$),e.removeListener("request",H),e.req&&e.req.removeListener("finish",M),e.removeListener("end",L),e.removeListener("close",L),e.removeListener("finish",M),e.removeListener("end",F),e.removeListener("error",D),e.removeListener("close",$)};if(t.signal&&!z){const o=()=>{const n=r;W(),n.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{const n=r;r=c(((...r)=>{t.signal.removeEventListener("abort",o),n.apply(e,r)})),t.signal.addEventListener("abort",o)}}return W}e.exports=R,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=u),null!==(r=t)&&void 0!==r&&r.cleanup&&(d(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,i)=>{const o=R(e,t,(e=>{n&&o(),e?i(e):r()}))}))}},8236:(e,t,r)=>{"use strict";const n=r(4406),{PromisePrototypeThen:i,SymbolAsyncIterator:o,SymbolIterator:s}=r(5439),{Buffer:a}=r(8834),{ERR_INVALID_ARG_TYPE:u,ERR_STREAM_NULL_VALUES:c}=r(2415).codes;e.exports=function(e,t,r){let l,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[o])f=!0,l=t[o]();else{if(!t||!t[s])throw new u("iterable",["Iterable"],t);f=!1,l=t[s]()}const h=new e({objectMode:!0,highWaterMark:1,...r});let d=!1;return h._read=function(){d||(d=!0,async function(){for(;;){try{const{value:e,done:t}=f?await l.next():l.next();if(t)h.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw d=!1,new c;if(h.push(t))continue;d=!1}}catch(e){h.destroy(e)}break}}())},h._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},h}},6767:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(5439),{EventEmitter:o}=r(2699);function s(e){o.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(s.prototype,o.prototype),i(s,o),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",u),r.on("close",c));let s=!1;function u(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){f(),0===o.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",u),r.removeListener("close",c),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",l),a(e,"error",l),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},2542:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(7948).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:u}=r(2415),{validateAbortSignal:c,validateInteger:l,validateObject:f}=r(1670),h=r(5439).Symbol("kWeak"),{finished:d}=r(3803),p=r(5291),{addAbortSignalNoValidate:y}=r(2349),{isWritable:g,isNodeStream:m}=r(6140),{ArrayPrototypePush:b,MathFloor:v,Number:w,NumberIsNaN:_,Promise:E,PromiseReject:A,PromisePrototypeThen:S,Symbol:T}=r(5439),O=T("kEmpty"),N=T("kEof");function x(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let r=1;return null!=(null==t?void 0:t.concurrency)&&(r=v(t.concurrency)),l(r,"concurrency",1),async function*(){var i,o;const s=new n,a=this,c=[],l=s.signal,f={signal:l},h=()=>s.abort();let d,p;null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted&&h(),null==t||null===(o=t.signal)||void 0===o||o.addEventListener("abort",h);let y=!1;function g(){y=!0}!async function(){try{for await(let t of a){var n;if(y)return;if(l.aborted)throw new u;try{t=e(t,f)}catch(e){t=A(e)}t!==O&&("function"==typeof(null===(n=t)||void 0===n?void 0:n.catch)&&t.catch(g),c.push(t),d&&(d(),d=null),!y&&c.length&&c.length>=r&&await new E((e=>{p=e})))}c.push(N)}catch(e){const t=A(e);S(t,void 0,g),c.push(t)}finally{var i;y=!0,d&&(d(),d=null),null==t||null===(i=t.signal)||void 0===i||i.removeEventListener("abort",h)}}();try{for(;;){for(;c.length>0;){const e=await c[0];if(e===N)return;if(l.aborted)throw new u;e!==O&&(yield e),c.shift(),p&&(p(),p=null)}await new E((e=>{d=e}))}}finally{s.abort(),y=!0,p&&(p(),p=null)}}.call(this)}async function B(e,t=void 0){for await(const r of P.call(this,e,t))return!0;return!1}function P(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return x.call(this,(async function(t,r){return await e(t,r)?t:O}),t)}class R extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function I(e){if(e=w(e),_(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u({cause:e.signal.reason});yield[t++,n]}}.call(this)},drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=I(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new u;e--<=0&&(yield r)}}.call(this)},filter:P,flatMap:function(e,t){const r=x.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:x,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=I(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new u;if(!(e-- >0))return;yield r}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!g(e))throw new i("stream",e,"must be writable");const r=p(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await B.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of x.call(this,(async function(t,r){return await e(t,r),O}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new u(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await d(this.destroy(e)),e}const a=new n,l=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this};r.signal.addEventListener("abort",(()=>a.abort()),e)}let p=!1;try{for await(const n of this){var y;if(p=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new u;s?t=await e(t,n,{signal:l}):(t=n,s=!0)}if(!p&&!s)throw new R}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u(void 0,{cause:e.signal.reason});b(t,n)}return t},some:B,find:async function(e,t){for await(const r of P.call(this,e,t))return r}}},1753:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(5439);e.exports=o;const i=r(9643);function o(e){if(!(this instanceof o))return new o(e);i.call(this,e)}n(o.prototype,i.prototype),n(o,i),o.prototype._transform=function(e,t,r){r(null,e)}},7253:(e,t,r)=>{const n=r(4406),{ArrayIsArray:i,Promise:o,SymbolAsyncIterator:s}=r(5439),a=r(3803),{once:u}=r(9928),c=r(4664),l=r(8637),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:d,ERR_MISSING_ARGS:p,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:m}=r(2415),{validateFunction:b,validateAbortSignal:v}=r(1670),{isIterable:w,isReadable:_,isReadableNodeStream:E,isNodeStream:A,isTransformStream:S,isWebStream:T,isReadableStream:O,isReadableEnded:N}=r(6140),x=globalThis.AbortController||r(7948).AbortController;let B,P;function R(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:a(e,{readable:t,writable:r},(e=>{n=!e}))}}function I(e){if(w(e))return e;if(E(e))return async function*(e){P||(P=r(538)),yield*P.prototype[s].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function C(e,t,r,{end:n}){let i,s=null;const u=e=>{if(e&&(i=e),s){const e=s;s=null,e()}},c=()=>new o(((e,t)=>{i?t(i):s=()=>{i?t(i):e()}}));t.on("drain",u);const l=a(t,{readable:!1},u);try{t.writableNeedDrain&&await c();for await(const r of e)t.write(r)||await c();n&&t.end(),await c(),r()}catch(e){r(i!==e?f(i,e):e)}finally{l(),t.off("drain",u)}}async function L(e,t,r,{end:n}){S(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function j(e,t,o){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new p("streams");const s=new x,a=s.signal,u=null==o?void 0:o.signal,c=[];function f(){M(new m)}let y,g;v(u,"options.signal"),null==u||u.addEventListener("abort",f);const b=[];let N,P=0;function j(e){M(e,0==--P)}function M(e,r){if(!e||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=e),y||r){for(;b.length;)b.shift()(y);null==u||u.removeEventListener("abort",f),s.abort(),r&&(y||c.forEach((e=>e())),n.nextTick(t,y,g))}}for(let z=0;z<e.length;z++){const $=e[z],V=z<e.length-1,H=z>0,W=V||!1!==(null==o?void 0:o.end),G=z===e.length-1;if(A($)){if(W){const{destroy:q,cleanup:J}=R($,V,H);b.push(q),_($)&&G&&c.push(J)}function U(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&j(e)}$.on("error",U),_($)&&G&&c.push((()=>{$.removeListener("error",U)}))}if(0===z)if("function"==typeof $){if(N=$({signal:a}),!w(N))throw new d("Iterable, AsyncIterable or Stream","source",N)}else N=w($)||E($)||S($)?$:l.from($);else if("function"==typeof $){var F;if(N=S(N)?I(null===(F=N)||void 0===F?void 0:F.readable):I(N),N=$(N,{signal:a}),V){if(!w(N,!0))throw new d("AsyncIterable",`transform[${z-1}]`,N)}else{var D;B||(B=r(1753));const K=new B({objectMode:!0}),Y=null===(D=N)||void 0===D?void 0:D.then;if("function"==typeof Y)P++,Y.call(N,(e=>{g=e,null!=e&&K.write(e),W&&K.end(),n.nextTick(j)}),(e=>{K.destroy(e),n.nextTick(j,e)}));else if(w(N,!0))P++,C(N,K,j,{end:W});else{if(!O(N)&&!S(N))throw new d("AsyncIterable or Promise","destination",N);{const Q=N.readable||N;P++,C(Q,K,j,{end:W})}}N=K;const{destroy:Z,cleanup:X}=R(N,!1,!0);b.push(Z),G&&c.push(X)}}else if(A($)){if(E(N)){P+=2;const ee=k(N,$,j,{end:W});_($)&&G&&c.push(ee)}else if(S(N)||O(N)){const te=N.readable||N;P++,C(te,$,j,{end:W})}else{if(!w(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);P++,C(N,$,j,{end:W})}N=$}else if(T($)){if(E(N))P++,L(I(N),$,j,{end:W});else if(O(N)||w(N))P++,L(N,$,j,{end:W});else{if(!S(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);P++,L(N.readable,$,j,{end:W})}N=$}else N=l.from($)}return(null!=a&&a.aborted||null!=u&&u.aborted)&&n.nextTick(f),N}function k(e,t,r,{end:i}){let o=!1;if(t.on("close",(()=>{o||r(new g)})),e.pipe(t,{end:!1}),i){function s(){o=!0,t.end()}N(e)?n.nextTick(s):e.once("end",s)}else r();return a(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),a(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:j,pipeline:function(...e){return j(e,u(function(e){return b(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},538:(e,t,r)=>{const n=r(4406),{ArrayPrototypeIndexOf:i,NumberIsInteger:o,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:u,ObjectKeys:c,ObjectSetPrototypeOf:l,Promise:f,SafeSet:h,SymbolAsyncIterator:d,Symbol:p}=r(5439);e.exports=F,F.ReadableState=U;const{EventEmitter:y}=r(2699),{Stream:g,prependListener:m}=r(6767),{Buffer:b}=r(8834),{addAbortSignal:v}=r(2349),w=r(3803);let _=r(9928).debuglog("stream",(e=>{_=e}));const E=r(4250),A=r(4664),{getHighWaterMark:S,getDefaultHighWaterMark:T}=r(4930),{aggregateTwoErrors:O,codes:{ERR_INVALID_ARG_TYPE:N,ERR_METHOD_NOT_IMPLEMENTED:x,ERR_OUT_OF_RANGE:B,ERR_STREAM_PUSH_AFTER_EOF:P,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:R}}=r(2415),{validateObject:I}=r(1670),C=p("kPaused"),{StringDecoder:L}=r(214),j=r(8236);l(F.prototype,g.prototype),l(F,g);const k=()=>{},{errorOrDestroy:M}=A;function U(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8637)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.readableObjectMode)),this.highWaterMark=e?S(this,e,"readableHighWaterMark",n):T(!1),this.buffer=new E,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[C]=null,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function F(e){if(!(this instanceof F))return new F(e);const t=this instanceof r(8637);this._readableState=new U(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&v(e.signal,this)),g.call(this,e),A.construct(this,(()=>{this._readableState.needReadable&&W(this,this._readableState)}))}function D(e,t,r,n){_("readableAddChunk",t);const i=e._readableState;let o;if(i.objectMode||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=b.from(t,r).toString(i.encoding):(t=b.from(t,r),r=""))):t instanceof b?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(o=new N("chunk",["string","Buffer","Uint8Array"],t))),o)M(e,o);else if(null===t)i.reading=!1,function(e,t){if(_("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?V(e):(t.needReadable=!1,t.emittedReadable=!0,H(e))}}(e,i);else if(i.objectMode||t&&t.length>0)if(n)if(i.endEmitted)M(e,new R);else{if(i.destroyed||i.errored)return!1;z(e,i,t,!0)}else if(i.ended)M(e,new P);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?z(e,i,t,!1):W(e,i)):z(e,i,t,!1)}else n||(i.reading=!1,W(e,i));return!i.ended&&(i.length<i.highWaterMark||0===i.length)}function z(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&V(e)),W(e,t)}function $(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function V(e){const t=e._readableState;_("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(_("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(H,e))}function H(e){const t=e._readableState;_("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Y(e)}function W(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(G,e,t))}function G(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(_("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function q(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[C]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function J(e){_("readable nexttick read 0"),e.read(0)}function K(e,t){_("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Y(e),t.flowing&&!t.reading&&e.read(0)}function Y(e){const t=e._readableState;for(_("flow",t.flowing);t.flowing&&null!==e.read(););}function Z(e,t){"function"!=typeof e.read&&(e=F.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=k;function i(t){this===e?(n(),n=k):n=t}e.on("readable",i);const o=w(e,{writable:!1},(e=>{r=e?O(r,e):null,n(),n=k}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(i)}}}catch(e){throw r=O(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),o()):A.destroyer(e,null)}}(e,t);return r.stream=e,r}function X(e,t){if(0===t.length)return null;let r;return 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}function Q(e){const t=e._readableState;_("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ee,t,e))}function ee(e,t){if(_("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(te,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function te(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let re;function ne(){return void 0===re&&(re={}),re}F.prototype.destroy=A.destroy,F.prototype._undestroy=A.undestroy,F.prototype._destroy=function(e,t){t(e)},F.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},F.prototype.push=function(e,t){return D(this,e,t,!1)},F.prototype.unshift=function(e,t){return D(this,e,t,!0)},F.prototype.isPaused=function(){const e=this._readableState;return!0===e[C]||!1===e.flowing},F.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},F.prototype.read=function(e){_("read",e),void 0===e?e=NaN:o(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new B("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return _("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):V(this),null;if(0===(e=$(e,t))&&t.ended)return 0===t.length&&Q(this),null;let n,i=t.needReadable;if(_("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,_("length less than watermark",i)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)i=!1,_("reading, ended or constructing",i);else if(i){_("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0);try{this._read(t.highWaterMark)}catch(e){M(this,e)}t.sync=!1,t.reading||(e=$(r,t))}return n=e>0?X(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},F.prototype._read=function(e){throw new x("_read()")},F.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new h(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),_("pipe count=%d opts=%j",i.pipes.length,t);const o=t&&!1===t.end||e===n.stdout||e===n.stderr?y:s;function s(){_("onend"),e.end()}let a;i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",(function t(n,o){_("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,_("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",l),u=!0,a&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let u=!1;function c(){u||(1===i.pipes.length&&i.pipes[0]===e?(_("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(_("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(_("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(_("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function l(t){_("ondata");const r=e.write(t);_("dest.write",r),!1===r&&c()}function f(t){if(_("onerror",t),y(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?M(e,t):e.emit("error",t)}}function d(){e.removeListener("finish",p),y()}function p(){_("onfinish"),e.removeListener("close",d),y()}function y(){_("unpipe"),r.unpipe(e)}return r.on("data",l),m(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?i.flowing&&c():i.flowing||(_("pipe resume"),r.resume()),e},F.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=i(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},F.prototype.on=function(e,t){const r=g.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,_("on readable",i.length,i.reading),i.length?V(this):i.reading||n.nextTick(J,this))),r},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(q,this),r},F.prototype.off=F.prototype.removeListener,F.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(q,this),t},F.prototype.resume=function(){const e=this._readableState;return e.flowing||(_("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(K,e,t))}(this,e)),e[C]=!1,this},F.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[C]=!0,this},F.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{M(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=c(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},F.prototype[d]=function(){return Z(this)},F.prototype.iterator=function(e){return void 0!==e&&I(e,"options"),Z(this,e)},u(F.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),u(U.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[C]},set(e){this[C]=!!e}}}),F._fromList=X,F.from=function(e,t){return j(F,e,t)},F.fromWeb=function(e,t){return ne().newStreamReadableFromReadableStream(e,t)},F.toWeb=function(e,t){return ne().newReadableStreamFromStreamReadable(e,t)},F.wrap=function(e,t){var r,n;return new F({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){A.destroyer(e,t),r(t)}}).wrap(e)}},4930:(e,t,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(5439),{ERR_INVALID_ARG_VALUE:o}=r(2415).codes;function s(e){return e?16:16384}e.exports={getHighWaterMark:function(e,t,r,a){const u=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=u){if(!i(u)||u<0)throw new o(a?`options.${r}`:"options.highWaterMark",u);return n(u)}return s(e.objectMode)},getDefaultHighWaterMark:s}},9643:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(5439);e.exports=c;const{ERR_METHOD_NOT_IMPLEMENTED:o}=r(2415).codes,s=r(8637),{getHighWaterMark:a}=r(4930);n(c.prototype,s.prototype),n(c,s);const u=i("kCallback");function c(e){if(!(this instanceof c))return new c(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[u]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,r){throw new o("_transform()")},c.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,o=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||o===n.length||n.length<n.highWaterMark?r():this[u]=r)}))},c.prototype._read=function(){if(this[u]){const e=this[u];this[u]=null,e()}}},6140:(e,t,r)=>{"use strict";const{Symbol:n,SymbolAsyncIterator:i,SymbolIterator:o,SymbolFor:s}=r(5439),a=n("kDestroyed"),u=n("kIsErrored"),c=n("kIsReadable"),l=n("kIsDisturbed"),f=s("nodejs.webstream.isClosedPromise"),h=s("nodejs.webstream.controllerErrorFunction");function d(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function _(e,t){if(!d(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function E(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&d(e)&&e.readable&&!_(e)}function A(e){return"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&p(e)&&e.writable&&!w(e)}function S(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function T(e){return"boolean"==typeof e._sent100&&S(e)}e.exports={kDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,o,s,a,c,l,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(s=e[u])&&void 0!==s?s:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(a=e._readableState)||void 0===a?void 0:a.errorEmitted)&&void 0!==n?n:null===(c=e._writableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:u,isReadable:E,kIsReadable:c,kIsClosedPromise:f,kControllerErrorFunction:h,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&S(e)?e._closed:null},isDestroyed:v,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&E(e)||!1!==(null==t?void 0:t.writable)&&A(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[i]:!1===t?"function"==typeof e[o]:"function"==typeof e[i]||"function"==typeof e[o])},isReadableNodeStream:d,isReadableStream:g,isReadableEnded:function(e){if(!d(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:_,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||m(e)||b(e)},isWritable:A,isWritableNodeStream:p,isWritableStream:m,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:T,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&T(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},4695:(e,t,r)=>{const n=r(4406),{ArrayPrototypeSlice:i,Error:o,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:u,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:l,Symbol:f,SymbolHasInstance:h}=r(5439);e.exports=L,L.WritableState=I;const{EventEmitter:d}=r(2699),p=r(6767).Stream,{Buffer:y}=r(8834),g=r(4664),{addAbortSignal:m}=r(2349),{getHighWaterMark:b,getDefaultHighWaterMark:v}=r(4930),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:E,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:S,ERR_STREAM_ALREADY_FINISHED:T,ERR_STREAM_NULL_VALUES:O,ERR_STREAM_WRITE_AFTER_END:N,ERR_UNKNOWN_ENCODING:x}=r(2415).codes,{errorOrDestroy:B}=g;function P(){}c(L.prototype,p.prototype),c(L,p);const R=f("kOnFinished");function I(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8637)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=U.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,C(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[R]=[]}function C(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function L(e){const t=this instanceof r(8637);if(!t&&!s(L,this))return new L(e);this._writableState=new I(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),p.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||$(this,e),H(this,e)}))}function j(e,t,r,i){const o=e._writableState;if("function"==typeof r)i=r,r=o.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new x(r)}else r=o.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new O;if(!o.objectMode)if("string"==typeof t)!1!==o.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return o.ending?s=new N:o.destroyed&&(s=new S("write")),s?(n.nextTick(i,s),B(e,s,!0),s):(o.pendingcb++,function(e,t,r,n,i){const o=t.objectMode?1:r.length;t.length+=o;const s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:i}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&i!==P&&(t.allNoop=!1)):(t.writelen=o,t.writecb=i,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,o,t,r,i))}function k(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new S("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function M(e,t,r,n){--t.pendingcb,n(r),z(t),B(e,r)}function U(e,t){const r=e._writableState,i=r.sync,o=r.writecb;"function"==typeof o?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),i?n.nextTick(M,e,r,t,o):M(e,r,t,o)):(r.buffered.length>r.bufferedIndex&&$(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===o?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:o,stream:e,state:r},n.nextTick(F,r.afterWriteTickInfo)):D(e,r,1,o))):B(e,new E)}function F({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,D(e,t,r,n)}function D(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&z(t),H(e,t)}function z(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:i}=e.buffered[r],o=e.objectMode?1:n.length;e.length-=o,i(null!==(t=e.errored)&&void 0!==t?t:new S("write"))}const r=e[R].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new S("end"))}C(e)}function $(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:o}=t,s=r.length-n;if(!s)return;let a=n;if(t.bufferProcessing=!0,s>1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?P:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},o=t.allNoop&&0===a?r:i(r,a);o.allBuffers=t.allBuffers,k(e,t,!0,t.length,o,"",n),C(t)}else{do{const{chunk:n,encoding:i,callback:s}=r[a];r[a++]=null,k(e,t,!1,o?1:n.length,n,i,s)}while(a<r.length&&!t.writing);a===r.length?C(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function V(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function H(e,t,r){V(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)B(e,null!=i?i:E());else if(r=!0,t.pendingcb--,i){const r=t[R].splice(0);for(let e=0;e<r.length;e++)r[e](i);B(e,i,t.sync)}else V(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(W,e,t))}t.sync=!0,t.pendingcb++;try{e._final(i)}catch(e){i(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{V(t)?W(e,t):t.pendingcb--}),e,t)):V(t)&&(t.pendingcb++,W(e,t))))}function W(e,t){t.pendingcb--,t.finished=!0;const r=t[R].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}I.prototype.getBuffer=function(){return i(this.buffered,this.bufferedIndex)},a(I.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(L,h,{__proto__:null,value:function(e){return!!s(this,e)||this===L&&e&&e._writableState instanceof I}}),L.prototype.pipe=function(){B(this,new A)},L.prototype.write=function(e,t,r){return!0===j(this,e,t,r)},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||$(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=l(e)),!y.isEncoding(e))throw new x(e);return this._writableState.defaultEncoding=e,this},L.prototype._write=function(e,t,r){if(!this._writev)throw new _("_write()");this._writev([{chunk:e,encoding:t}],r)},L.prototype._writev=null,L.prototype.end=function(e,t,r){const i=this._writableState;let s;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=j(this,e,t);r instanceof o&&(s=r)}return i.corked&&(i.corked=1,this.uncork()),s||(i.errored||i.ending?i.finished?s=new T("end"):i.destroyed&&(s=new S("end")):(i.ending=!0,H(this,i,!0),i.ended=!0)),"function"==typeof r&&(s||i.finished?n.nextTick(r,s):i[R].push(r)),this},u(L.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const G=g.destroy;let q;function J(){return void 0===q&&(q={}),q}L.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[R].length)&&n.nextTick(z,r),G.call(this,e,t),this},L.prototype._undestroy=g.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype[d.captureRejectionSymbol]=function(e){this.destroy(e)},L.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},L.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}},1670:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:o,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:u,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:f,ObjectPrototypeHasOwnProperty:h,RegExpPrototypeExec:d,String:p,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(5439),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:E}}=r(2415),{normalizeEncoding:A}=r(9928),{isAsyncFunction:S,isArrayBufferView:T}=r(9928).types,O={},N=/^[0-7]+$/,x=m(((e,t,r=l,n=c)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),B=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);if(e<r||e>n)throw new _(t,`>= ${r} && <= ${n}`,e)})),P=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new _(t,"an integer",e);const n=r?1:0,i=4294967295;if(e<n||e>i)throw new _(t,`>= ${n} && <= ${i}`,e)}));function R(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const I=m(((e,t,r)=>{if(!i(r,e)){const n=o(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new w(t,e,"must be one of: "+n)}}));function C(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function L(e,t,r){return null!=e&&h(e,t)?e[t]:r}const j=m(((e,t,r=null)=>{const i=L(r,"allowArray",!1),o=L(r,"allowFunction",!1);if(!L(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new v(t,"Object",e)})),k=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),M=m(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length<r)throw new w(t,e,`must be longer than ${r}`)})),U=m(((e,t="buffer")=>{if(!T(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),F=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),D=m(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),z=m(((e,t)=>{if("function"!=typeof e||S(e))throw new v(t,"Function",e)})),$=m(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),V=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function H(e,t){if(void 0===e||!d(V,e))throw new w(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===d(N,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return P(e,t),e},validateArray:M,validateStringArray:function(e,t){M(e,t);for(let r=0;r<e.length;r++)R(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){M(e,t);for(let r=0;r<e.length;r++)C(e[r],`${t}[${r}]`)},validateBoolean:C,validateBuffer:U,validateDictionary:k,validateEncoding:function(e,t){const r=A(t),n=e.length;if("hex"===r&&n%2!=0)throw new w("encoding",t,`is invalid for data of length ${n}`)},validateFunction:D,validateInt32:B,validateInteger:x,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new v(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&u(e))throw new _(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:j,validateOneOf:I,validatePlainFunction:z,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(R(e,t),void 0===O[e]){if(void 0!==O[y(e)])throw new E(e+" (signals must use all capital letters)");throw new E(e)}},validateString:R,validateUint32:P,validateUndefined:$,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${o(r,"|")}')`,e)},validateAbortSignal:F,validateLinkHeaderValue:function(e){if("string"==typeof e)return H(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const i=e[n];H(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new w("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},1149:(e,t,r)=>{"use strict";const n=r(8712),i=r(4021),o=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=o,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},2415:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:o}=r(9928),s=globalThis.AggregateError||o,a=Symbol("kIsNodeError"),u=["string","function","number","object","Function","Object","boolean","bigint","symbol"],c=/^([A-Z][a-z0-9]*)+$/,l={};function f(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function h(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function d(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return f(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[a]=!0,l[e]=i}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}d("ERR_ASSERTION","%s",Error),d("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const o=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),u.includes(e)?o.push(e.toLowerCase()):c.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=o.indexOf("object");-1!==e&&(o.splice(o,e,1),s.push("Object"))}if(o.length>0){switch(o.length){case 1:n+=`of type ${o[0]}`;break;case 2:n+=`one of type ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`one of type ${o.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),d("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),d("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),d("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),d("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=h(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=h(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),d("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),d("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),d("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),d("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),d("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),d("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),d("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),d("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),d("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),d("ERR_STREAM_WRITE_AFTER_END","write after end",Error),d("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:l}},5439:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Uint8Array}},9928:(e,t,r)=>{"use strict";const n=r(8834),i=Object.getPrototypeOf((async function(){})).constructor,o=globalThis.Blob||n.Blob,s=void 0!==o?function(e){return e instanceof o}:function(e){return!1};class a extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof i,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:s},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8712:(e,t,r)=>{const{Buffer:n}=r(8834),{ObjectDefineProperty:i,ObjectKeys:o,ReflectApply:s}=r(5439),{promisify:{custom:a}}=r(9928),{streamReturningOperators:u,promiseReturningOperators:c}=r(2542),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(2415),f=r(5291),{pipeline:h}=r(7253),{destroyer:d}=r(4664),p=r(3803),y=r(4021),g=r(6140),m=e.exports=r(6767).Stream;m.isDisturbed=g.isDisturbed,m.isErrored=g.isErrored,m.isReadable=g.isReadable,m.Readable=r(538);for(const w of o(u)){const _=u[w];function b(...e){if(new.target)throw l();return m.Readable.from(s(_,this,e))}i(b,"name",{__proto__:null,value:_.name}),i(b,"length",{__proto__:null,value:_.length}),i(m.Readable.prototype,w,{__proto__:null,value:b,enumerable:!1,configurable:!0,writable:!0})}for(const E of o(c)){const A=c[E];function b(...e){if(new.target)throw l();return s(A,this,e)}i(b,"name",{__proto__:null,value:A.name}),i(b,"length",{__proto__:null,value:A.length}),i(m.Readable.prototype,E,{__proto__:null,value:b,enumerable:!1,configurable:!0,writable:!0})}m.Writable=r(4695),m.Duplex=r(8637),m.Transform=r(9643),m.PassThrough=r(1753),m.pipeline=h;const{addAbortSignal:v}=r(2349);m.addAbortSignal=v,m.finished=p,m.destroy=d,m.compose=f,i(m,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),i(h,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),i(p,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),m.Stream=m,m._isUint8Array=function(e){return e instanceof Uint8Array},m._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},4021:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(5439),{isIterable:o,isNodeStream:s,isWebStream:a}=r(6140),{pipelineImpl:u}=r(7253),{finished:c}=r(3803);r(4888),e.exports={finished:c,pipeline:function(...e){return new i(((t,r)=>{let i,c;const l=e[e.length-1];if(l&&"object"==typeof l&&!s(l)&&!o(l)&&!a(l)){const t=n(e);i=t.signal,c=t.end}u(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:c})}))}}},7948:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,f=u>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(e,a,a+s>c?c:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(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 u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2573:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=r(1329);function o(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?a(e.toString("base64")):a(n.from(e,t).toString("base64"))}function s(e){return e=e.toString(),i.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var u=o;u.encode=o,u.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(s(e),"base64").toString(t)},u.toBase64=s,u.fromBase64=a,u.toBuffer=function(e){return n.from(s(e),"base64")},t.default=u},1329:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var i=t,o=4-r,s=t+o,a=n.alloc(s);for(a.write(e);o--;)a.write("=",i++);return a.toString()}},9487:(e,t,r)=>{e.exports=r(2573).default,e.exports.default=e.exports},7160:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(i,o),a=0,u=e.map([t,r],(function(t){var r=s-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),o=u(r(94)),s=u(r(95)),a=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(r[t]=s,n+=1)})),n>0){var s=Object.keys(r),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(r[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=i.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=i.default.getMacOSVersionName(t),n={name:o.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:o.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},8834:(e,t,r)=>{"use strict";const n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(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 f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(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');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return B(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Y(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function E(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return J(q(t),e,r,n)}function S(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=N)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=N));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.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}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(K(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){o=c[e],s=l[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"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,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function B(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Z[e[n]];return i}function R(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(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 C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function L(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function j(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function k(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||k(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,o){return t=+t,r>>>=0,o||k(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.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);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const F={};function D(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function z(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function $(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,o)}function V(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},2680:(e,t,r)=>{"use strict";var n=r(7286),i=r(9429),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},9429:(e,t,r)=>{"use strict";var n=r(4090),i=r(7286),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,s,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var f=function(){return a(n,o,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},5130:(e,t,r)=>{var n=r(4406);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(7123)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,i,o,s=null;function a(...e){if(!a.enabled)return;const n=a,i=Number(new Date),o=i-(r||i);n.diff=o,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,i)=>{if("%%"===r)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];r=o.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},8797:(e,t,r)=>{var n=r(4406),i=r(7033),o=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=i(r||o);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,h=function(){e.writable||d()},d=function(){l=!1,c||r.call(e)},p=function(){c=!1,l||r.call(e)},y=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){r.call(e,t)},m=function(){n.nextTick(b)},b=function(){if(!f)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},v=function(){e.req.on("finish",d)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",d),e.on("abort",m),e.req?v():e.on("request",v)):l&&!a&&(e.on("end",h),e.on("close",h)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",y),e.on("end",p),e.on("finish",d),!1!==t.error&&e.on("error",g),e.on("close",m),function(){f=!0,e.removeListener("complete",d),e.removeListener("abort",m),e.removeListener("request",v),e.req&&e.req.removeListener("finish",d),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("exit",y),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",m)}};e.exports=s},4723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(7847);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,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),o,2)}}function o(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=i,t.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)}}},4792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.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}},t.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."}}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(4723),i=r(894),o=r(4792);function s(e,t){const[r,o]=u(t);return new n.EthereumRpcError(e,r||i.getMessageFromCode(e),o)}function a(e,t){const[r,o]=u(t);return new n.EthereumProviderError(e,r||i.getMessageFromCode(e),o)}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||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.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 s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.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)}}}},8094:(e,t,r)=>{"use strict";t.Sy=void 0;r(4723),r(894);const n=r(8159);Object.defineProperty(t,"Sy",{enumerable:!0,get:function(){return n.ethErrors}});r(4792)},894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(4792),i=r(4723),o=n.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const r=e.toString();if(f(n.errorValues,r))return n.errorValues[r].message;if(c(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function u(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!c(e)}function c(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=u,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!1}={}){var n,o;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 c={};if(e&&"object"==typeof e&&!Array.isArray(e)&&f(e,"code")&&u(e.code)){const t=e;c.code=t.code,t.message&&"string"==typeof t.message?(c.message=t.message,f(t,"data")&&(c.data=t.data)):(c.message=a(c.code),c.data={originalError:l(e)})}else{c.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;c.message=r&&"string"==typeof r?r:t.message,c.data={originalError:l(e)}}const h=null===(o=e)||void 0===o?void 0:o.stack;return r&&e&&h&&"string"==typeof h&&(c.stack=h),c}},1115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(125),i=r(144);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(8358);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},144:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const i=n(r(3525)),o=r(64),s=i.default.bool;t.assertBool=s;const a=i.default.bytes;t.assertBytes=a;var u=r(64);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return u.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof self&&"crypto"in self?self.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},2699:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"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):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(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(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(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},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))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,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;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]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[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(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7847:e=>{e.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var t="[...]",r="[Circular]",n=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=o()),u(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,r):JSON.stringify(e,h(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:e}),n.push([o,r,t,s])):i.push([t,r,e]):(o[r]=e,n.push([o,r,t]))}function u(e,n,i,o,s,c,l){var f;if(c+=1,"object"==typeof e&&null!==e){for(f=0;f<o.length;f++)if(o[f]===e)return void a(r,e,n,s);if(void 0!==l.depthLimit&&c>l.depthLimit)return void a(t,e,n,s);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void a(t,e,n,s);if(o.push(e),Array.isArray(e))for(f=0;f<e.length;f++)u(e[f],f,f,o,e,c,l);else{var h=Object.keys(e);for(f=0;f<h.length;f++){var d=h[f];u(e[d],d,f,o,e,c,l)}}o.pop()}}function c(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,s){void 0===s&&(s=o());var a,u=f(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(u,t,r):JSON.stringify(u,h(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function f(e,i,o,s,u,l,h){var d;if(l+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void a(r,e,i,u);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&l>h.depthLimit)return void a(t,e,i,u);if(void 0!==h.edgesLimit&&o+1>h.edgesLimit)return void a(t,e,i,u);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)f(e[d],d,d,s,e,l,h);else{var p={},y=Object.keys(e).sort(c);for(d=0;d<y.length;d++){var g=y[d];f(e[g],g,d,s,e,l,h),p[g]=e[g]}if(void 0===u)return p;n.push([u,i,e]),u[i]=p}s.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(i.length>0)for(var n=0;n<i.length;n++){var o=i[n];if(o[1]===t&&o[0]===r){r=o[2],i.splice(n,1);break}}return e.call(this,t,r)}}},3243:(e,t,r)=>{"use strict";var n=r(9680),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n<i;n++)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,s):function(e,t,r){for(var n in e)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s)}},7795:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var i,o=t.call(arguments,1),s=Math.max(0,n.length-o.length),a=[],u=0;u<s;u++)a.push("$"+u);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var r=n.apply(this,o.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,o.concat(t.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i}},4090:(e,t,r)=>{"use strict";var n=r(7795);e.exports=Function.prototype.bind||n},7286:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new s},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(2636)(),h=r(8486)(),d=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),p={},y="undefined"!=typeof Uint8Array&&d?d(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&d?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&d?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&d?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&d?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&d?d(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(d)try{null.error}catch(e){var m=d(d(e));g["%Error.prototype%"]=m}var b=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&d&&(r=d(i.prototype))}return g[t]=r,r},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(4090),_=r(3198),E=w.call(Function.call,Array.prototype.concat),A=w.call(Function.apply,Array.prototype.splice),S=w.call(Function.call,String.prototype.replace),T=w.call(Function.call,String.prototype.slice),O=w.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,B=function(e,t){var r,n=e;if(_(v,n)&&(n="%"+(r=v[n])[0]+"%"),_(g,n)){var o=g[n];if(o===p&&(o=b(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=T(e,0,1),r=T(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,N,(function(e,t,r,i){n[n.length]=r?S(i,x,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=B("%"+n+"%",t),a=o.name,c=o.value,l=!1,f=o.alias;f&&(n=f[0],A(r,E([0,1],f)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],y=T(p,0,1),m=T(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(l=!0),_(g,a="%"+(n+="."+p)+"%"))c=g[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var b=u(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=_(c,p),c=c[p];d&&!l&&(g[a]=c)}}return c}},326:(e,t,r)=>{"use strict";var n=r(7286)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8486:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},2636:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(6679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},6679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7226:(e,t,r)=>{"use strict";var n=r(6679);e.exports=function(){return n()&&!!Symbol.toStringTag}},3198:(e,t,r)=>{"use strict";var n=r(4090);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},2333:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*y}},1285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2635:(e,t,r)=>{"use strict";var n=r(7226)(),i=r(2680)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},9680:e=>{"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;u.call(h)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(s(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},3138:(e,t,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(7226)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(o.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},198:(e,t,r)=>{"use strict";var n=r(3243),i=r(2191),o=r(2680),s=o("Object.prototype.toString"),a=r(7226)(),u=r(326),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},h=o("String.prototype.slice"),d={},p=Object.getPrototypeOf;a&&u&&p&&n(l,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var r=p(t),n=u(r,Symbol.toStringTag);if(!n){var i=p(r);n=u(i,Symbol.toStringTag)}d[e]=n.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=h(s(e),8,-1);return f(l,t)>-1}return!!u&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},3349:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},1344:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Null]",l="[object Object]",f="[object Proxy]",h="[object Undefined]",d=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,y={};y["[object Float32Array]"]=y["[object Float64Array]"]=y["[object Int8Array]"]=y["[object Int16Array]"]=y["[object Int32Array]"]=y["[object Uint8Array]"]=y["[object Uint8ClampedArray]"]=y["[object Uint16Array]"]=y["[object Uint32Array]"]=!0,y[o]=y["[object Array]"]=y["[object ArrayBuffer]"]=y["[object Boolean]"]=y["[object DataView]"]=y["[object Date]"]=y["[object Error]"]=y[a]=y["[object Map]"]=y["[object Number]"]=y[l]=y["[object RegExp]"]=y["[object Set]"]=y["[object String]"]=y["[object WeakMap]"]=!1;var g,m,b,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,w="object"==typeof self&&self&&self.Object===Object&&self,_=v||w||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,S=A&&A.exports===E,T=S&&v.process,O=function(){try{return A&&A.require&&A.require("util").types||T&&T.binding&&T.binding("util")}catch(e){}}(),N=O&&O.isTypedArray,x=Array.prototype,B=Function.prototype,P=Object.prototype,R=_["__core-js_shared__"],I=B.toString,C=P.hasOwnProperty,L=(g=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",j=P.toString,k=I.call(Object),M=RegExp("^"+I.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=S?_.Buffer:void 0,F=_.Symbol,D=_.Uint8Array,z=(U&&U.allocUnsafe,m=Object.getPrototypeOf,b=Object,function(e){return m(b(e))}),$=Object.create,V=P.propertyIsEnumerable,H=x.splice,W=F?F.toStringTag:void 0,G=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),q=U?U.isBuffer:void 0,J=Math.max,K=Date.now,Y=he(_,"Map"),Z=he(Object,"create"),X=function(){function e(){}return function(t){if(!Se(t))return{};if($)return $(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!me(e[t],r)||void 0===r&&!(t in e))&&se(e,t,r)}function ie(e,t,r){var n=e[t];C.call(e,t)&&me(n,r)&&(void 0!==r||t in e)||se(e,t,r)}function oe(e,t){for(var r=e.length;r--;)if(me(e[r][0],t))return r;return-1}function se(e,t,r){"__proto__"==t&&G?G(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(Z){var r=t[e];return r===n?void 0:r}return C.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return Z?void 0!==t[e]:C.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Z&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=oe(t,e);return!(r<0||(r==t.length-1?t.pop():H.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return oe(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Y||ee),string:new Q}},te.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return fe(this,e).get(e)},te.prototype.has=function(e){return fe(this,e).has(e)},te.prototype.set=function(e,t){var r=fe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!Y||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function ae(e){return null==e?void 0===e?h:c:W&&W in Object(e)?function(e){var t=C.call(e,W),r=e[W];try{e[W]=void 0;var n=!0}catch(e){}var i=j.call(e);return n&&(t?e[W]=r:delete e[W]),i}(e):function(e){return j.call(e)}(e)}function ue(e){return Te(e)&&ae(e)==o}function ce(e,t,r,n,i){e!==t&&function(e,t,r){for(var n=-1,i=Object(e),o=r(e),s=o.length;s--;){var a=o[++n];if(!1===t(i[a],a,i))break}}(t,(function(o,s){if(i||(i=new re),Se(o))!function(e,t,r,n,i,o,s){var a=ye(e,r),u=ye(t,r),c=s.get(u);if(c)ne(e,r,c);else{var f,h,d,p,y,g=o?o(a,u,r+"",e,t,s):void 0,m=void 0===g;if(m){var b=ve(u),v=!b&&_e(u),w=!b&&!v&&Oe(u);g=u,b||v||w?ve(a)?g=a:Te(y=a)&&we(y)?g=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(a):v?(m=!1,g=function(e,t){return e.slice()}(u)):w?(m=!1,p=new(d=(f=u).buffer).constructor(d.byteLength),new D(p).set(new D(d)),h=p,g=new f.constructor(h,f.byteOffset,f.length)):g=[]:function(e){if(!Te(e)||ae(e)!=l)return!1;var t=z(e);if(null===t)return!0;var r=C.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&I.call(r)==k}(u)||be(u)?(g=a,be(a)?g=function(e){return function(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var a=t[o],u=void 0;void 0===u&&(u=e[a]),i?se(r,a,u):ie(r,a,u)}return r}(e,Ne(e))}(a):Se(a)&&!Ee(a)||(g=function(e){return"function"!=typeof e.constructor||pe(e)?{}:X(z(e))}(u))):m=!1}m&&(s.set(u,g),i(g,u,n,o,s),s.delete(u)),ne(e,r,g)}}(e,t,s,r,ce,n,i);else{var a=n?n(ye(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),ne(e,s,a)}}),Ne)}var le=G?function(e,t){return G(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Pe;function fe(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function he(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Se(e)||function(e){return!!L&&L in e}(e))&&(Ee(e)?M:d).test(function(e){if(null!=e){try{return I.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function de(e,t){var r=typeof e;return!!(t=null==t?i:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||P)}function ye(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge=function(e){var t=0,r=0;return function(){var n=K(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(le);function me(e,t){return e===t||e!=e&&t!=t}var be=ue(function(){return arguments}())?ue:function(e){return Te(e)&&C.call(e,"callee")&&!V.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&Ae(e.length)&&!Ee(e)}var _e=q||function(){return!1};function Ee(e){if(!Se(e))return!1;var t=ae(e);return t==a||t==u||t==s||t==f}function Ae(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Se(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Oe=N?function(e){return function(t){return e(t)}}(N):function(e){return Te(e)&&Ae(e.length)&&!!y[ae(e)]};function Ne(e){return we(e)?function(e,t){var r=ve(e),n=!r&&be(e),i=!r&&!n&&_e(e),o=!r&&!n&&!i&&Oe(e),s=r||n||i||o,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var c in e)!t&&!C.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||de(c,u))||a.push(c);return a}(e,!0):function(e){if(!Se(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=pe(e),r=[];for(var n in e)("constructor"!=n||!t&&C.call(e,n))&&r.push(n);return r}(e)}var xe,Be=(xe=function(e,t,r){ce(e,t,r)},function(e,t){return ge(function(e,t,r){return t=J(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=J(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,Pe),e+"")}((function(e,t){var r=-1,n=t.length,i=n>1?t[n-1]:void 0,o=n>2?t[2]:void 0;for(i=xe.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(e,t,r){if(!Se(r))return!1;var n=typeof t;return!!("number"==n?we(r)&&de(t,r.length):"string"==n&&t in r)&&me(r[t],e)}(t[0],t[1],o)&&(i=n<3?void 0:i,n=1),e=Object(e);++r<n;){var s=t[r];s&&xe(e,s,r)}return e})));function Pe(e){return e}e.exports=Be},6635:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",m="[object Boolean]",b="[object Date]",v="[object Error]",w="[object Function]",_="[object GeneratorFunction]",E="[object Map]",A="[object Number]",S="[object Object]",T="[object Promise]",O="[object RegExp]",N="[object Set]",x="[object String]",B="[object Symbol]",P="[object WeakMap]",R="[object ArrayBuffer]",I="[object DataView]",C="[object Float32Array]",L="[object Float64Array]",j="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",U="[object Uint8Array]",F="[object Uint8ClampedArray]",D="[object Uint16Array]",z="[object Uint32Array]",$=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,q=RegExp(W.source),J=RegExp(G.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Oe="\\ufe0e\\ufe0f",Ne="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xe="["+_e+"]",Be="["+Ne+"]",Pe="["+Ee+"]",Re="\\d+",Ie="["+Ae+"]",Ce="["+Se+"]",Le="[^"+_e+Ne+Re+Ae+Se+Te+"]",je="\\ud83c[\\udffb-\\udfff]",ke="[^"+_e+"]",Me="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+Te+"]",De="\\u200d",ze="(?:"+Ce+"|"+Le+")",$e="(?:"+Fe+"|"+Le+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Pe+"|"+je+")?",Ge="["+Oe+"]?",qe=Ge+We+"(?:"+De+"(?:"+[ke,Me,Ue].join("|")+")"+Ge+We+")*",Je="(?:"+[Ie,Me,Ue].join("|")+")"+qe,Ke="(?:"+[ke+Pe+"?",Pe,Me,Ue,xe].join("|")+")",Ye=RegExp("['’]","g"),Ze=RegExp(Pe,"g"),Xe=RegExp(je+"(?="+je+")|"+Ke+qe,"g"),Qe=RegExp([Fe+"?"+Ce+"+"+Ve+"(?="+[Be,Fe,"$"].join("|")+")",$e+"+"+He+"(?="+[Be,Fe+ze,"$"].join("|")+")",Fe+"?"+ze+"+"+Ve,Fe+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Je].join("|"),"g"),et=RegExp("["+De+_e+Ee+Oe+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[C]=it[L]=it[j]=it[k]=it[M]=it[U]=it[F]=it[D]=it[z]=!0,it[y]=it[g]=it[R]=it[m]=it[I]=it[b]=it[v]=it[w]=it[E]=it[A]=it[S]=it[O]=it[N]=it[x]=it[P]=!1;var ot={};ot[y]=ot[g]=ot[R]=ot[I]=ot[m]=ot[b]=ot[C]=ot[L]=ot[j]=ot[k]=ot[M]=ot[E]=ot[A]=ot[S]=ot[O]=ot[N]=ot[x]=ot[B]=ot[U]=ot[F]=ot[D]=ot[z]=!0,ot[v]=ot[w]=ot[P]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),ht=t&&!t.nodeType&&t,dt=ht&&e&&!e.nodeType&&e,pt=dt&&dt.exports===ht,yt=pt&&ct.process,gt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=gt&&gt.isArrayBuffer,bt=gt&&gt.isDate,vt=gt&&gt.isMap,wt=gt&&gt.isRegExp,_t=gt&&gt.isSet,Et=gt&&gt.isTypedArray;function At(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Ot(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Nt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function xt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Bt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function Pt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Rt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function It(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Ct(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Lt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var kt=Vt("length");function Mt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ut(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Ft(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ut(e,zt,r)}function Dt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function zt(e){return e!=e}function $t(e,t){var r=null==e?0:e.length;return r?Gt(e,t)/r:h}function Vt(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Gt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function qt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Jt(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Yt(e,t){return Rt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function Xt(e,t){for(var r=-1,n=e.length;++r<n&&Ft(t,e[r],0)>-1;);return r}function Qt(e,t){for(var r=e.length;r--&&Ft(t,e[r],0)>-1;);return r}var er=Ht({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function ir(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function or(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):kt(e)}function lr(e){return nr(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var hr=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dr=function e(t){var r,n=(t=null==t?ft:dr.defaults(ft.Object(),t,dr.pick(ft,rt))).Array,ie=t.Date,_e=t.Error,Ee=t.Function,Ae=t.Math,Se=t.Object,Te=t.RegExp,Oe=t.String,Ne=t.TypeError,xe=n.prototype,Be=Ee.prototype,Pe=Se.prototype,Re=t["__core-js_shared__"],Ie=Be.toString,Ce=Pe.hasOwnProperty,Le=0,je=(r=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",ke=Pe.toString,Me=Ie.call(Se),Ue=ft._,Fe=Te("^"+Ie.call(Ce).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=pt?t.Buffer:i,ze=t.Symbol,$e=t.Uint8Array,Ve=De?De.allocUnsafe:i,He=or(Se.getPrototypeOf,Se),We=Se.create,Ge=Pe.propertyIsEnumerable,qe=xe.splice,Je=ze?ze.isConcatSpreadable:i,Ke=ze?ze.iterator:i,Xe=ze?ze.toStringTag:i,et=function(){try{var e=uo(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,ht=Ae.ceil,dt=Ae.floor,yt=Se.getOwnPropertySymbols,gt=De?De.isBuffer:i,kt=t.isFinite,Ht=xe.join,pr=or(Se.keys,Se),yr=Ae.max,gr=Ae.min,mr=ie.now,br=t.parseInt,vr=Ae.random,wr=xe.reverse,_r=uo(t,"DataView"),Er=uo(t,"Map"),Ar=uo(t,"Promise"),Sr=uo(t,"Set"),Tr=uo(t,"WeakMap"),Or=uo(Se,"create"),Nr=Tr&&new Tr,xr={},Br=Mo(_r),Pr=Mo(Er),Rr=Mo(Ar),Ir=Mo(Sr),Cr=Mo(Tr),Lr=ze?ze.prototype:i,jr=Lr?Lr.valueOf:i,kr=Lr?Lr.toString:i;function Mr(e){if(ea(e)&&!Vs(e)&&!(e instanceof zr)){if(e instanceof Dr)return e;if(Ce.call(e,"__wrapped__"))return Uo(e)}return new Dr(e)}var Ur=function(){function e(){}return function(t){if(!Qs(t))return{};if(We)return We(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Fr(){}function Dr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function zr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Hr;++t<r;)this.add(e[t])}function Gr(e){var t=this.__data__=new Vr(e);this.size=t.size}function qr(e,t){var r=Vs(e),n=!r&&$s(e),i=!r&&!n&&qs(e),o=!r&&!n&&!i&&ua(e),s=r||n||i||o,a=s?qt(e.length,Oe):[],u=a.length;for(var c in e)!t&&!Ce.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||go(c,u))||a.push(c);return a}function Jr(e){var t=e.length;return t?e[Wn(0,t-1)]:i}function Kr(e,t){return Io(Oi(e),on(t,0,e.length))}function Yr(e){return Io(Oi(e))}function Zr(e,t,r){(r!==i&&!Fs(e[t],r)||r===i&&!(t in e))&&rn(e,t,r)}function Xr(e,t,r){var n=e[t];Ce.call(e,t)&&Fs(n,r)&&(r!==i||t in e)||rn(e,t,r)}function Qr(e,t){for(var r=e.length;r--;)if(Fs(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function tn(e,t){return e&&Ni(t,Pa(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Ta(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!Qs(e))return e;var f=Vs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Oi(e,a)}else{var h=fo(e),d=h==w||h==_;if(qs(e))return wi(e,u);if(h==S||h==y||d&&!o){if(a=c||d?{}:po(e),!u)return c?function(e,t){return Ni(e,lo(e),t)}(e,function(e,t){return e&&Ni(t,Ra(t),e)}(a,e)):function(e,t){return Ni(e,co(e),t)}(e,tn(a,e))}else{if(!ot[h])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case R:return _i(e);case m:case b:return new i(+e);case I:return function(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case C:case L:case j:case k:case M:case U:case F:case D:case z:return Ei(e,r);case E:return new i;case A:case x:return new i(e);case O:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case N:return new i;case B:return n=e,jr?Se(jr.call(n)):{}}}(e,h,u)}}s||(s=new Gr);var p=s.get(e);if(p)return p;s.set(e,a),oa(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,i){a.set(i,sn(n,t,r,i,e,s))}));var g=f?i:(l?c?to:eo:c?Ra:Pa)(e);return Tt(g||e,(function(n,i){g&&(n=e[i=n]),Xr(a,i,sn(n,t,r,i,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new Ne(o);return xo((function(){e.apply(i,r)}),t)}function cn(e,t,r,n){var i=-1,o=Bt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Rt(t,Kt(r))),n?(o=Pt,s=!1):t.length>=200&&(o=Zt,s=!1,t=new Wr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var h=c;h--;)if(t[h]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}Mr.templateSettings={escape:K,evaluate:Y,interpolate:Z,variable:"",imports:{_:Mr}},Mr.prototype=Fr.prototype,Mr.prototype.constructor=Mr,Dr.prototype=Ur(Fr.prototype),Dr.prototype.constructor=Dr,zr.prototype=Ur(Fr.prototype),zr.prototype.constructor=zr,$r.prototype.clear=function(){this.__data__=Or?Or(null):{},this.size=0},$r.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$r.prototype.get=function(e){var t=this.__data__;if(Or){var r=t[e];return r===s?i:r}return Ce.call(t,e)?t[e]:i},$r.prototype.has=function(e){var t=this.__data__;return Or?t[e]!==i:Ce.call(t,e)},$r.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Or&&t===i?s:t,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(e){var t=this.__data__,r=Qr(t,e);return!(r<0||(r==t.length-1?t.pop():qe.call(t,r,1),--this.size,0))},Vr.prototype.get=function(e){var t=this.__data__,r=Qr(t,e);return r<0?i:t[r][1]},Vr.prototype.has=function(e){return Qr(this.__data__,e)>-1},Vr.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new $r,map:new(Er||Vr),string:new $r}},Hr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return so(this,e).get(e)},Hr.prototype.has=function(e){return so(this,e).has(e)},Hr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Wr.prototype.add=Wr.prototype.push=function(e){return this.__data__.set(e,s),this},Wr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Gr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Gr.prototype.get=function(e){return this.__data__.get(e)},Gr.prototype.has=function(e){return this.__data__.has(e)},Gr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Er||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var ln=Pi(bn),fn=Pi(vn,!0);function hn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function dn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function pn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function yn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?yn(a,t-1,r,n,i):It(i,a):n||(i[i.length]=a)}return i}var gn=Ri(),mn=Ri(!0);function bn(e,t){return e&&gn(e,t,Pa)}function vn(e,t){return e&&mn(e,t,Pa)}function wn(e,t){return xt(t,(function(t){return Ys(e[t])}))}function _n(e,t){for(var r=0,n=(t=gi(t,e)).length;null!=e&&r<n;)e=e[ko(t[r++])];return r&&r==n?e:i}function En(e,t,r){var n=t(e);return Vs(e)?n:It(n,r(e))}function An(e){return null==e?e===i?"[object Undefined]":"[object Null]":Xe&&Xe in Se(e)?function(e){var t=Ce.call(e,Xe),r=e[Xe];try{e[Xe]=i;var n=!0}catch(e){}var o=ke.call(e);return n&&(t?e[Xe]=r:delete e[Xe]),o}(e):function(e){return ke.call(e)}(e)}function Sn(e,t){return e>t}function Tn(e,t){return null!=e&&Ce.call(e,t)}function On(e,t){return null!=e&&t in Se(e)}function Nn(e,t,r){for(var o=r?Pt:Bt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var h=e[u];u&&t&&(h=Rt(h,Kt(t))),l=gr(h.length,l),c[u]=!r&&(t||s>=120&&h.length>=120)?new Wr(u&&h):i}h=e[0];var d=-1,p=c[0];e:for(;++d<s&&f.length<l;){var y=h[d],g=t?t(y):y;if(y=r||0!==y?y:0,!(p?Zt(p,g):o(f,g,r))){for(u=a;--u;){var m=c[u];if(!(m?Zt(m,g):o(e[u],g,r)))continue e}p&&p.push(g),f.push(y)}}return f}function xn(e,t,r){var n=null==(e=To(e,t=gi(t,e)))?e:e[ko(Ko(t))];return null==n?i:At(n,e,r)}function Bn(e){return ea(e)&&An(e)==y}function Pn(e,t,r,n,o){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Vs(e),u=Vs(t),c=a?g:fo(e),l=u?g:fo(t),f=(c=c==y?S:c)==S,h=(l=l==y?S:l)==S,d=c==l;if(d&&qs(e)){if(!qs(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new Gr),a||ua(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!o(new $e(e),new $e(t)));case m:case b:case A:return Fs(+e,+t);case v:return e.name==t.name&&e.message==t.message;case O:case x:return e==t+"";case E:var a=ir;case N:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Xi(a(e),a(t),n,i,o,s);return s.delete(e),l;case B:if(jr)return jr.call(e)==jr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var p=f&&Ce.call(e,"__wrapped__"),w=h&&Ce.call(t,"__wrapped__");if(p||w){var _=p?e.value():e,T=w?t.value():t;return s||(s=new Gr),o(_,T,r,n,s)}}return!!d&&(s||(s=new Gr),function(e,t,r,n,o,s){var a=1&r,u=eo(e),c=u.length;if(c!=eo(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Ce.call(t,f)))return!1}var h=s.get(e),d=s.get(t);if(h&&d)return h==t&&d==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var g=e[f=u[l]],m=t[f];if(n)var b=a?n(m,g,f,t,e,s):n(g,m,f,e,t,s);if(!(b===i?g===m||o(g,m,r,n,s):b)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,o,s))}(e,t,r,n,Pn,o))}function Rn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Se(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var h=new Gr;if(n)var d=n(l,f,c,e,t,h);if(!(d===i?Pn(f,l,3,n,h):d))return!1}}return!0}function In(e){return!(!Qs(e)||(t=e,je&&je in t))&&(Ys(e)?Fe:ye).test(Mo(e));var t}function Cn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Vs(e)?Un(e[0],e[1]):Mn(e):fu(e)}function Ln(e){if(!_o(e))return pr(e);var t=[];for(var r in Se(e))Ce.call(e,r)&&"constructor"!=r&&t.push(r);return t}function jn(e,t){return e<t}function kn(e,t){var r=-1,i=Ws(e)?n(e.length):[];return ln(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Mn(e){var t=ao(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(r){return r===e||Rn(r,e,t)}}function Un(e,t){return bo(e)&&Eo(t)?Ao(ko(e),t):function(r){var n=Ta(r,e);return n===i&&n===t?Oa(r,e):Pn(t,n,3)}}function Fn(e,t,r,n,o){e!==t&&gn(t,(function(s,a){if(o||(o=new Gr),Qs(s))!function(e,t,r,n,o,s,a){var u=Oo(e,r),c=Oo(t,r),l=a.get(c);if(l)Zr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,h=f===i;if(h){var d=Vs(c),p=!d&&qs(c),y=!d&&!p&&ua(c);f=c,d||p||y?Vs(u)?f=u:Gs(u)?f=Oi(u):p?(h=!1,f=wi(c,!0)):y?(h=!1,f=Ei(c,!0)):f=[]:na(c)||$s(c)?(f=u,$s(u)?f=ga(u):Qs(u)&&!Ys(u)||(f=po(c))):h=!1}h&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Zr(e,r,f)}}(e,t,a,r,Fn,n,o);else{var u=n?n(Oo(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Zr(e,a,u)}}),Ra)}function Dn(e,t){var r=e.length;if(r)return go(t+=t<0?r:0,r)?e[t]:i}function zn(e,t,r){t=t.length?Rt(t,(function(e){return Vs(e)?function(t){return _n(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Rt(t,Kt(oo()));var i=kn(e,(function(e,r,i){var o=Rt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Ai(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function $n(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=_n(e,s);r(a,s)&&Yn(o,gi(s,e),a)}return o}function Vn(e,t,r,n){var i=n?Dt:Ft,o=-1,s=t.length,a=e;for(e===t&&(t=Oi(t)),r&&(a=Rt(e,Kt(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&qe.call(a,u,1),qe.call(e,u,1);return e}function Hn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;go(i)?qe.call(e,i,1):ui(e,i)}}return e}function Wn(e,t){return e+dt(vr()*(t-e+1))}function Gn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function qn(e,t){return Bo(So(e,t,ru),e+"")}function Jn(e){return Jr(Fa(e))}function Kn(e,t){var r=Fa(e);return Io(r,on(t,0,r.length))}function Yn(e,t,r,n){if(!Qs(e))return e;for(var o=-1,s=(t=gi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=ko(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=Qs(f)?f:go(t[o+1])?[]:{})}Xr(u,c,l),u=u[c]}return e}var Zn=Nr?function(e,t){return Nr.set(e,t),e}:ru,Xn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Qa(t),writable:!0})}:ru;function Qn(e){return Io(Fa(e))}function ei(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ti(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ri(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ni(e,t,ru,r)}function ni(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===i;o<s;){var f=dt((o+s)/2),h=r(e[f]),d=h!==i,p=null===h,y=h==h,g=aa(h);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!p):c?y&&d&&!p&&(n||!g):!p&&!g&&(n?h<=t:h<t);m?o=f+1:s=f}return gr(s,4294967294)}function ii(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Fs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function oi(e){return"number"==typeof e?e:aa(e)?h:+e}function si(e){if("string"==typeof e)return e;if(Vs(e))return Rt(e,si)+"";if(aa(e))return kr?kr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ai(e,t,r){var n=-1,i=Bt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=Pt;else if(o>=200){var c=t?null:Gi(e);if(c)return ar(c);s=!1,i=Zt,u=new Wr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ui(e,t){return null==(e=To(e,t=gi(t,e)))||delete e[ko(Ko(t))]}function ci(e,t,r,n){return Yn(e,t,r(_n(e,t)),n)}function li(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ei(e,n?0:o,n?o+1:i):ei(e,n?o+1:0,n?i:o)}function fi(e,t){var r=e;return r instanceof zr&&(r=r.value()),Ct(t,(function(e,t){return t.func.apply(t.thisArg,It([e],t.args))}),r)}function hi(e,t,r){var i=e.length;if(i<2)return i?ai(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=cn(s[o]||a,e[u],t,r));return ai(yn(s,1),t,r)}function di(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function pi(e){return Gs(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function gi(e,t){return Vs(e)?e:bo(e,t)?[e]:jo(ma(e))}var mi=qn;function bi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ei(e,t,r)}var vi=st||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function _i(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ei(e,t){var r=t?_i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=aa(e),a=t!==i,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Si(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),h=!i;++u<c;)f[u]=t[u];for(;++o<a;)(h||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function Ti(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),h=n(f+l),d=!i;++o<f;)h[o]=e[o];for(var p=o;++c<l;)h[p+c]=t[c];for(;++a<u;)(d||o<s)&&(h[p+r[a]]=e[o++]);return h}function Oi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ni(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?rn(r,u,c):Xr(r,u,c)}return r}function xi(e,t){return function(r,n){var i=Vs(r)?St:en,o=t?t():{};return i(r,e,oo(n,2),o)}}function Bi(e){return qn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Se(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Pi(e,t){return function(r,n){if(null==r)return r;if(!Ws(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Se(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ri(e){return function(t,r,n){for(var i=-1,o=Se(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Ii(e){return function(t){var r=nr(t=ma(t))?lr(t):i,n=r?r[0]:t.charAt(0),o=r?bi(r,1).join(""):t.slice(1);return n[e]()+o}}function Ci(e){return function(t){return Ct(Ya($a(t).replace(Ye,"")),e,"")}}function Li(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Ur(e.prototype),n=e.apply(r,t);return Qs(n)?n:r}}function ji(e){return function(t,r,n){var o=Se(t);if(!Ws(t)){var s=oo(r,3);t=Pa(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function ki(e){return Qi((function(t){var r=t.length,n=r,s=Dr.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Ne(o);if(s&&!u&&"wrapper"==no(a))var u=new Dr([],!0)}for(n=u?n:r;++n<r;){var c=no(a=t[n]),l="wrapper"==c?ro(a):i;u=l&&vo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[no(l[0])].apply(u,l[3]):1==a.length&&vo(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Vs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function Mi(e,t,r,o,s,a,u,l,f,h){var d=t&c,p=1&t,y=2&t,g=24&t,m=512&t,b=y?i:Li(e);return function c(){for(var v=arguments.length,w=n(v),_=v;_--;)w[_]=arguments[_];if(g)var E=io(c),A=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(w,E);if(o&&(w=Si(w,o,s,g)),a&&(w=Ti(w,a,u,g)),v-=A,g&&v<h){var S=sr(w,E);return Hi(e,t,Mi,c.placeholder,r,w,S,l,f,h-v)}var T=p?r:this,O=y?T[e]:e;return v=w.length,l?w=function(e,t){for(var r=e.length,n=gr(t.length,r),o=Oi(e);n--;){var s=t[n];e[n]=go(s,r)?o[s]:i}return e}(w,l):m&&v>1&&w.reverse(),d&&f<v&&(w.length=f),this&&this!==ft&&this instanceof c&&(O=b||Li(O)),O.apply(T,w)}}function Ui(e,t){return function(r,n){return function(e,t,r,n){return bn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Fi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=oi(r),n=oi(n)),o=e(r,n)}return o}}function Di(e){return Qi((function(t){return t=Rt(t,Kt(oo())),qn((function(r){var n=this;return e(t,(function(e){return At(e,n,r)}))}))}))}function zi(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?Gn(t,e):t;var n=Gn(t,ht(e/cr(t)));return nr(t)?bi(lr(n),0,e).join(""):n.slice(0,e)}function $i(e){return function(t,r,o){return o&&"number"!=typeof o&&mo(t,r,o)&&(r=o=i),t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r,i){for(var o=-1,s=yr(ht((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:ha(o),e)}}function Vi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Hi(e,t,r,n,o,s,a,c,l,f){var h=8&t;t|=h?u:64,4&(t&=~(h?64:u))||(t&=-4);var d=[e,t,o,h?s:i,h?a:i,h?i:s,h?i:a,c,l,f],p=r.apply(i,d);return vo(e)&&No(p,d),p.placeholder=n,Po(p,e,t)}function Wi(e){var t=Ae[e];return function(e,r){if(e=ya(e),(r=null==r?0:gr(da(r),292))&&kt(e)){var n=(ma(e)+"e").split("e");return+((n=(ma(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Gi=Sr&&1/ar(new Sr([,-0]))[1]==l?function(e){return new Sr(e)}:au;function qi(e){return function(t){var r=fo(t);return r==E?ir(t):r==N?ur(t):function(e,t){return Rt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(e,t,r,s,l,f,h,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Ne(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),h=h===i?h:yr(da(h),0),d=d===i?d:da(d),y-=l?l.length:0,64&t){var g=s,m=l;s=l=i}var b=p?i:ro(e),v=[e,t,r,s,l,g,m,f,h,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Si(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ti(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:gr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(v,b),e=v[0],t=v[1],r=v[2],s=v[3],l=v[4],!(d=v[9]=v[9]===i?p?0:e.length:yr(v[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var o=Li(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=io(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?Hi(e,t,Mi,s.placeholder,i,u,f,i,i,r-a):At(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Mi.apply(i,v):function(e,t,r,i){var o=1&t,s=Li(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),h=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return At(h,o?r:this,f)}}(e,t,r,s);else var w=function(e,t,r){var n=1&t,i=Li(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Po((b?Zn:No)(w,v),e,t)}function Ki(e,t,r,n){return e===i||Fs(e,Pe[r])&&!Ce.call(n,r)?t:e}function Yi(e,t,r,n,o,s){return Qs(e)&&Qs(t)&&(s.set(t,e),Fn(e,t,i,Yi,s),s.delete(t)),e}function Zi(e){return na(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var h=-1,d=!0,p=2&r?new Wr:i;for(s.set(e,t),s.set(t,e);++h<u;){var y=e[h],g=t[h];if(n)var m=a?n(g,y,h,t,e,s):n(y,g,h,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(p){if(!jt(t,(function(e,t){if(!Zt(p,t)&&(y===e||o(y,e,r,n,s)))return p.push(t)}))){d=!1;break}}else if(y!==g&&!o(y,g,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function Qi(e){return Bo(So(e,i,Ho),e+"")}function eo(e){return En(e,Pa,co)}function to(e){return En(e,Ra,lo)}var ro=Nr?function(e){return Nr.get(e)}:au;function no(e){for(var t=e.name+"",r=xr[t],n=Ce.call(xr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function io(e){return(Ce.call(Mr,"placeholder")?Mr:e).placeholder}function oo(){var e=Mr.iteratee||nu;return e=e===nu?Cn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function ao(e){for(var t=Pa(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Eo(i)]}return t}function uo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return In(r)?r:i}var co=yt?function(e){return null==e?[]:(e=Se(e),xt(yt(e),(function(t){return Ge.call(e,t)})))}:pu,lo=yt?function(e){for(var t=[];e;)It(t,co(e)),e=He(e);return t}:pu,fo=An;function ho(e,t,r){for(var n=-1,i=(t=gi(t,e)).length,o=!1;++n<i;){var s=ko(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Xs(i)&&go(s,i)&&(Vs(e)||$s(e))}function po(e){return"function"!=typeof e.constructor||_o(e)?{}:Ur(He(e))}function yo(e){return Vs(e)||$s(e)||!!(Je&&e&&e[Je])}function go(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function mo(e,t,r){if(!Qs(r))return!1;var n=typeof t;return!!("number"==n?Ws(r)&&go(t,r.length):"string"==n&&t in r)&&Fs(r[t],e)}function bo(e,t){if(Vs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||Q.test(e)||!X.test(e)||null!=t&&e in Se(t)}function vo(e){var t=no(e),r=Mr[t];if("function"!=typeof r||!(t in zr.prototype))return!1;if(e===r)return!0;var n=ro(r);return!!n&&e===n[0]}(_r&&fo(new _r(new ArrayBuffer(1)))!=I||Er&&fo(new Er)!=E||Ar&&fo(Ar.resolve())!=T||Sr&&fo(new Sr)!=N||Tr&&fo(new Tr)!=P)&&(fo=function(e){var t=An(e),r=t==S?e.constructor:i,n=r?Mo(r):"";if(n)switch(n){case Br:return I;case Pr:return E;case Rr:return T;case Ir:return N;case Cr:return P}return t});var wo=Re?Ys:yu;function _o(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function Eo(e){return e==e&&!Qs(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Se(r))}}function So(e,t,r){return t=yr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=yr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),At(e,this,u)}}function To(e,t){return t.length<2?e:_n(e,ei(t,0,-1))}function Oo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var No=Ro(Zn),xo=lt||function(e,t){return ft.setTimeout(e,t)},Bo=Ro(Xn);function Po(e,t,r){var n=t+"";return Bo(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Tt(p,(function(r){var n="_."+r[0];t&r[1]&&!Bt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function Ro(e){var t=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Io(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Wn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Co,Lo,jo=(Co=Cs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Lo.size&&Lo.clear(),e})),Lo=Co.cache,Co);function ko(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Mo(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Uo(e){if(e instanceof zr)return e.clone();var t=new Dr(e.__wrapped__,e.__chain__);return t.__actions__=Oi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fo=qn((function(e,t){return Gs(e)?cn(e,yn(t,1,Gs,!0)):[]})),Do=qn((function(e,t){var r=Ko(t);return Gs(r)&&(r=i),Gs(e)?cn(e,yn(t,1,Gs,!0),oo(r,2)):[]})),zo=qn((function(e,t){var r=Ko(t);return Gs(r)&&(r=i),Gs(e)?cn(e,yn(t,1,Gs,!0),i,r):[]}));function $o(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ut(e,oo(t,3),i)}function Vo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=da(r),o=r<0?yr(n+o,0):gr(o,n-1)),Ut(e,oo(t,3),o,!0)}function Ho(e){return null!=e&&e.length?yn(e,1):[]}function Wo(e){return e&&e.length?e[0]:i}var Go=qn((function(e){var t=Rt(e,pi);return t.length&&t[0]===e[0]?Nn(t):[]})),qo=qn((function(e){var t=Ko(e),r=Rt(e,pi);return t===Ko(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Nn(r,oo(t,2)):[]})),Jo=qn((function(e){var t=Ko(e),r=Rt(e,pi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Nn(r,i,t):[]}));function Ko(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Yo=qn(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Vn(e,t):e}var Xo=Qi((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return Hn(e,Rt(t,(function(e){return go(e,r)?+e:e})).sort(Ai)),n}));function Qo(e){return null==e?e:wr.call(e)}var es=qn((function(e){return ai(yn(e,1,Gs,!0))})),ts=qn((function(e){var t=Ko(e);return Gs(t)&&(t=i),ai(yn(e,1,Gs,!0),oo(t,2))})),rs=qn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,ai(yn(e,1,Gs,!0),i,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=xt(e,(function(e){if(Gs(e))return t=yr(e.length,t),!0})),qt(t,(function(t){return Rt(e,Vt(t))}))}function is(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Rt(r,(function(e){return At(t,i,e)}))}var os=qn((function(e,t){return Gs(e)?cn(e,t):[]})),ss=qn((function(e){return hi(xt(e,Gs))})),as=qn((function(e){var t=Ko(e);return Gs(t)&&(t=i),hi(xt(e,Gs),oo(t,2))})),us=qn((function(e){var t=Ko(e);return t="function"==typeof t?t:i,hi(xt(e,Gs),i,t)})),cs=qn(ns),ls=qn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,is(e,r)}));function fs(e){var t=Mr(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ds=Qi((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zr&&go(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Dr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),ps=xi((function(e,t,r){Ce.call(e,r)?++e[r]:rn(e,r,1)})),ys=ji($o),gs=ji(Vo);function ms(e,t){return(Vs(e)?Tt:ln)(e,oo(t,3))}function bs(e,t){return(Vs(e)?Ot:fn)(e,oo(t,3))}var vs=xi((function(e,t,r){Ce.call(e,r)?e[r].push(t):rn(e,r,[t])})),ws=qn((function(e,t,r){var i=-1,o="function"==typeof t,s=Ws(e)?n(e.length):[];return ln(e,(function(e){s[++i]=o?At(t,e,r):xn(e,t,r)})),s})),_s=xi((function(e,t,r){rn(e,r,t)}));function Es(e,t){return(Vs(e)?Rt:kn)(e,oo(t,3))}var As=xi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Ss=qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&mo(e,t[0],t[1])?t=[]:r>2&&mo(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,yn(t,1),[])})),Ts=ct||function(){return ft.Date.now()};function Os(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ji(e,c,i,i,i,i,t)}function Ns(e,t){var r;if("function"!=typeof t)throw new Ne(o);return e=da(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var xs=qn((function(e,t,r){var n=1;if(r.length){var i=sr(r,io(xs));n|=u}return Ji(e,n,t,r,i)})),Bs=qn((function(e,t,r){var n=3;if(r.length){var i=sr(r,io(Bs));n|=u}return Ji(t,n,e,r,i)}));function Ps(e,t,r){var n,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ne(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function g(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function m(){var e=Ts();if(g(e))return b(e);c=xo(m,function(e){var r=t-(e-l);return d?gr(r,a-(e-f)):r}(e))}function b(e){return c=i,p&&n?y(e):(n=s=i,u)}function v(){var e=Ts(),r=g(e);if(n=arguments,s=this,l=e,r){if(c===i)return function(e){return f=e,c=xo(m,t),h?y(e):u}(l);if(d)return vi(c),c=xo(m,t),y(l)}return c===i&&(c=xo(m,t)),u}return t=ya(t)||0,Qs(r)&&(h=!!r.leading,a=(d="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){c!==i&&vi(c),f=0,n=l=s=c=i},v.flush=function(){return c===i?u:b(Ts())},v}var Rs=qn((function(e,t){return un(e,1,t)})),Is=qn((function(e,t,r){return un(e,ya(t)||0,r)}));function Cs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ne(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Cs.Cache||Hr),r}function Ls(e){if("function"!=typeof e)throw new Ne(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Cs.Cache=Hr;var js=mi((function(e,t){var r=(t=1==t.length&&Vs(t[0])?Rt(t[0],Kt(oo())):Rt(yn(t,1),Kt(oo()))).length;return qn((function(n){for(var i=-1,o=gr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return At(e,this,n)}))})),ks=qn((function(e,t){var r=sr(t,io(ks));return Ji(e,u,i,t,r)})),Ms=qn((function(e,t){var r=sr(t,io(Ms));return Ji(e,64,i,t,r)})),Us=Qi((function(e,t){return Ji(e,256,i,i,i,t)}));function Fs(e,t){return e===t||e!=e&&t!=t}var Ds=Vi(Sn),zs=Vi((function(e,t){return e>=t})),$s=Bn(function(){return arguments}())?Bn:function(e){return ea(e)&&Ce.call(e,"callee")&&!Ge.call(e,"callee")},Vs=n.isArray,Hs=mt?Kt(mt):function(e){return ea(e)&&An(e)==R};function Ws(e){return null!=e&&Xs(e.length)&&!Ys(e)}function Gs(e){return ea(e)&&Ws(e)}var qs=gt||yu,Js=bt?Kt(bt):function(e){return ea(e)&&An(e)==b};function Ks(e){if(!ea(e))return!1;var t=An(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Ys(e){if(!Qs(e))return!1;var t=An(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zs(e){return"number"==typeof e&&e==da(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Qs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=vt?Kt(vt):function(e){return ea(e)&&fo(e)==E};function ra(e){return"number"==typeof e||ea(e)&&An(e)==A}function na(e){if(!ea(e)||An(e)!=S)return!1;var t=He(e);if(null===t)return!0;var r=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ie.call(r)==Me}var ia=wt?Kt(wt):function(e){return ea(e)&&An(e)==O},oa=_t?Kt(_t):function(e){return ea(e)&&fo(e)==N};function sa(e){return"string"==typeof e||!Vs(e)&&ea(e)&&An(e)==x}function aa(e){return"symbol"==typeof e||ea(e)&&An(e)==B}var ua=Et?Kt(Et):function(e){return ea(e)&&Xs(e.length)&&!!it[An(e)]},ca=Vi(jn),la=Vi((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Ws(e))return sa(e)?lr(e):Oi(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=fo(e);return(t==E?ir:t==N?ar:Fa)(e)}function ha(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function da(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function pa(e){return e?on(da(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return h;if(Qs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var r=pe.test(e);return r||ge.test(e)?ut(e.slice(2),r?2:8):de.test(e)?h:+e}function ga(e){return Ni(e,Ra(e))}function ma(e){return null==e?"":si(e)}var ba=Bi((function(e,t){if(_o(t)||Ws(t))Ni(t,Pa(t),e);else for(var r in t)Ce.call(t,r)&&Xr(e,r,t[r])})),va=Bi((function(e,t){Ni(t,Ra(t),e)})),wa=Bi((function(e,t,r,n){Ni(t,Ra(t),e,n)})),_a=Bi((function(e,t,r,n){Ni(t,Pa(t),e,n)})),Ea=Qi(nn),Aa=qn((function(e,t){e=Se(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&mo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Ra(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||Fs(f,Pe[l])&&!Ce.call(e,l))&&(e[l]=s[l])}return e})),Sa=qn((function(e){return e.push(i,Yi),At(Ca,i,e)}));function Ta(e,t,r){var n=null==e?i:_n(e,t);return n===i?r:n}function Oa(e,t){return null!=e&&ho(e,t,On)}var Na=Ui((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),e[t]=r}),Qa(ru)),xa=Ui((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=ke.call(t)),Ce.call(e,t)?e[t].push(r):e[t]=[r]}),oo),Ba=qn(xn);function Pa(e){return Ws(e)?qr(e):Ln(e)}function Ra(e){return Ws(e)?qr(e,!0):function(e){if(!Qs(e))return function(e){var t=[];if(null!=e)for(var r in Se(e))t.push(r);return t}(e);var t=_o(e),r=[];for(var n in e)("constructor"!=n||!t&&Ce.call(e,n))&&r.push(n);return r}(e)}var Ia=Bi((function(e,t,r){Fn(e,t,r)})),Ca=Bi((function(e,t,r,n){Fn(e,t,r,n)})),La=Qi((function(e,t){var r={};if(null==e)return r;var n=!1;t=Rt(t,(function(t){return t=gi(t,e),n||(n=t.length>1),t})),Ni(e,to(e),r),n&&(r=sn(r,7,Zi));for(var i=t.length;i--;)ui(r,t[i]);return r})),ja=Qi((function(e,t){return null==e?{}:function(e,t){return $n(e,t,(function(t,r){return Oa(e,r)}))}(e,t)}));function ka(e,t){if(null==e)return{};var r=Rt(to(e),(function(e){return[e]}));return t=oo(t),$n(e,r,(function(e,r){return t(e,r[0])}))}var Ma=qi(Pa),Ua=qi(Ra);function Fa(e){return null==e?[]:Yt(e,Pa(e))}var Da=Ci((function(e,t,r){return t=t.toLowerCase(),e+(r?za(t):t)}));function za(e){return Ka(ma(e).toLowerCase())}function $a(e){return(e=ma(e))&&e.replace(be,er).replace(Ze,"")}var Va=Ci((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ha=Ci((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Wa=Ii("toLowerCase"),Ga=Ci((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),qa=Ci((function(e,t,r){return e+(r?" ":"")+Ka(t)})),Ja=Ci((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ka=Ii("toUpperCase");function Ya(e,t,r){return e=ma(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Za=qn((function(e,t){try{return At(e,i,t)}catch(e){return Ks(e)?e:new _e(e)}})),Xa=Qi((function(e,t){return Tt(t,(function(t){t=ko(t),rn(e,t,xs(e[t],e))})),e}));function Qa(e){return function(){return e}}var eu=ki(),tu=ki(!0);function ru(e){return e}function nu(e){return Cn("function"==typeof e?e:sn(e,1))}var iu=qn((function(e,t){return function(r){return xn(r,e,t)}})),ou=qn((function(e,t){return function(r){return xn(e,r,t)}}));function su(e,t,r){var n=Pa(t),i=wn(t,n);null!=r||Qs(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=wn(t,Pa(t)));var o=!(Qs(r)&&"chain"in r&&!r.chain),s=Ys(e);return Tt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Oi(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,It([this.value()],arguments))})})),e}function au(){}var uu=Di(Rt),cu=Di(Nt),lu=Di(jt);function fu(e){return bo(e)?Vt(ko(e)):function(e){return function(t){return _n(t,e)}}(e)}var hu=$i(),du=$i(!0);function pu(){return[]}function yu(){return!1}var gu,mu=Fi((function(e,t){return e+t}),0),bu=Wi("ceil"),vu=Fi((function(e,t){return e/t}),1),wu=Wi("floor"),_u=Fi((function(e,t){return e*t}),1),Eu=Wi("round"),Au=Fi((function(e,t){return e-t}),0);return Mr.after=function(e,t){if("function"!=typeof t)throw new Ne(o);return e=da(e),function(){if(--e<1)return t.apply(this,arguments)}},Mr.ary=Os,Mr.assign=ba,Mr.assignIn=va,Mr.assignInWith=wa,Mr.assignWith=_a,Mr.at=Ea,Mr.before=Ns,Mr.bind=xs,Mr.bindAll=Xa,Mr.bindKey=Bs,Mr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vs(e)?e:[e]},Mr.chain=fs,Mr.chunk=function(e,t,r){t=(r?mo(e,t,r):t===i)?1:yr(da(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(ht(o/t));s<o;)u[a++]=ei(e,s,s+=t);return u},Mr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Mr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return It(Vs(r)?Oi(r):[r],yn(t,1))},Mr.cond=function(e){var t=null==e?0:e.length,r=oo();return e=t?Rt(e,(function(e){if("function"!=typeof e[1])throw new Ne(o);return[r(e[0]),e[1]]})):[],qn((function(r){for(var n=-1;++n<t;){var i=e[n];if(At(i[0],this,r))return At(i[1],this,r)}}))},Mr.conforms=function(e){return function(e){var t=Pa(e);return function(r){return an(r,e,t)}}(sn(e,1))},Mr.constant=Qa,Mr.countBy=ps,Mr.create=function(e,t){var r=Ur(e);return null==t?r:tn(r,t)},Mr.curry=function e(t,r,n){var o=Ji(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Mr.curryRight=function e(t,r,n){var o=Ji(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Mr.debounce=Ps,Mr.defaults=Aa,Mr.defaultsDeep=Sa,Mr.defer=Rs,Mr.delay=Is,Mr.difference=Fo,Mr.differenceBy=Do,Mr.differenceWith=zo,Mr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=r||t===i?1:da(t))<0?0:t,n):[]},Mr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,0,(t=n-(t=r||t===i?1:da(t)))<0?0:t):[]},Mr.dropRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0,!0):[]},Mr.dropWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!0):[]},Mr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&mo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=da(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:da(n))<0&&(n+=o),n=r>n?0:pa(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Mr.filter=function(e,t){return(Vs(e)?xt:pn)(e,oo(t,3))},Mr.flatMap=function(e,t){return yn(Es(e,t),1)},Mr.flatMapDeep=function(e,t){return yn(Es(e,t),l)},Mr.flatMapDepth=function(e,t,r){return r=r===i?1:da(r),yn(Es(e,t),r)},Mr.flatten=Ho,Mr.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},Mr.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===i?1:da(t)):[]},Mr.flip=function(e){return Ji(e,512)},Mr.flow=eu,Mr.flowRight=tu,Mr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Mr.functions=function(e){return null==e?[]:wn(e,Pa(e))},Mr.functionsIn=function(e){return null==e?[]:wn(e,Ra(e))},Mr.groupBy=vs,Mr.initial=function(e){return null!=e&&e.length?ei(e,0,-1):[]},Mr.intersection=Go,Mr.intersectionBy=qo,Mr.intersectionWith=Jo,Mr.invert=Na,Mr.invertBy=xa,Mr.invokeMap=ws,Mr.iteratee=nu,Mr.keyBy=_s,Mr.keys=Pa,Mr.keysIn=Ra,Mr.map=Es,Mr.mapKeys=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,t(e,n,i),e)})),r},Mr.mapValues=function(e,t){var r={};return t=oo(t,3),bn(e,(function(e,n,i){rn(r,n,t(e,n,i))})),r},Mr.matches=function(e){return Mn(sn(e,1))},Mr.matchesProperty=function(e,t){return Un(e,sn(t,1))},Mr.memoize=Cs,Mr.merge=Ia,Mr.mergeWith=Ca,Mr.method=iu,Mr.methodOf=ou,Mr.mixin=su,Mr.negate=Ls,Mr.nthArg=function(e){return e=da(e),qn((function(t){return Dn(t,e)}))},Mr.omit=La,Mr.omitBy=function(e,t){return ka(e,Ls(oo(t)))},Mr.once=function(e){return Ns(2,e)},Mr.orderBy=function(e,t,r,n){return null==e?[]:(Vs(t)||(t=null==t?[]:[t]),Vs(r=n?i:r)||(r=null==r?[]:[r]),zn(e,t,r))},Mr.over=uu,Mr.overArgs=js,Mr.overEvery=cu,Mr.overSome=lu,Mr.partial=ks,Mr.partialRight=Ms,Mr.partition=As,Mr.pick=ja,Mr.pickBy=ka,Mr.property=fu,Mr.propertyOf=function(e){return function(t){return null==e?i:_n(e,t)}},Mr.pull=Yo,Mr.pullAll=Zo,Mr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,oo(r,2)):e},Mr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Vn(e,t,i,r):e},Mr.pullAt=Xo,Mr.range=hu,Mr.rangeRight=du,Mr.rearg=Us,Mr.reject=function(e,t){return(Vs(e)?xt:pn)(e,Ls(oo(t,3)))},Mr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=oo(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Hn(e,i),r},Mr.rest=function(e,t){if("function"!=typeof e)throw new Ne(o);return qn(e,t=t===i?t:da(t))},Mr.reverse=Qo,Mr.sampleSize=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),(Vs(e)?Kr:Kn)(e,t)},Mr.set=function(e,t,r){return null==e?e:Yn(e,t,r)},Mr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Yn(e,t,r,n)},Mr.shuffle=function(e){return(Vs(e)?Yr:Qn)(e)},Mr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&mo(e,t,r)?(t=0,r=n):(t=null==t?0:da(t),r=r===i?n:da(r)),ei(e,t,r)):[]},Mr.sortBy=Ss,Mr.sortedUniq=function(e){return e&&e.length?ii(e):[]},Mr.sortedUniqBy=function(e,t){return e&&e.length?ii(e,oo(t,2)):[]},Mr.split=function(e,t,r){return r&&"number"!=typeof r&&mo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ma(e))&&("string"==typeof t||null!=t&&!ia(t))&&!(t=si(t))&&nr(e)?bi(lr(e),0,r):e.split(t,r):[]},Mr.spread=function(e,t){if("function"!=typeof e)throw new Ne(o);return t=null==t?0:yr(da(t),0),qn((function(r){var n=r[t],i=bi(r,0,t);return n&&It(i,n),At(e,this,i)}))},Mr.tail=function(e){var t=null==e?0:e.length;return t?ei(e,1,t):[]},Mr.take=function(e,t,r){return e&&e.length?ei(e,0,(t=r||t===i?1:da(t))<0?0:t):[]},Mr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ei(e,(t=n-(t=r||t===i?1:da(t)))<0?0:t,n):[]},Mr.takeRightWhile=function(e,t){return e&&e.length?li(e,oo(t,3),!1,!0):[]},Mr.takeWhile=function(e,t){return e&&e.length?li(e,oo(t,3)):[]},Mr.tap=function(e,t){return t(e),e},Mr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Ne(o);return Qs(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ps(e,t,{leading:n,maxWait:t,trailing:i})},Mr.thru=hs,Mr.toArray=fa,Mr.toPairs=Ma,Mr.toPairsIn=Ua,Mr.toPath=function(e){return Vs(e)?Rt(e,ko):aa(e)?[e]:Oi(jo(ma(e)))},Mr.toPlainObject=ga,Mr.transform=function(e,t,r){var n=Vs(e),i=n||qs(e)||ua(e);if(t=oo(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:Qs(e)&&Ys(o)?Ur(He(e)):{}}return(i?Tt:bn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Mr.unary=function(e){return Os(e,1)},Mr.union=es,Mr.unionBy=ts,Mr.unionWith=rs,Mr.uniq=function(e){return e&&e.length?ai(e):[]},Mr.uniqBy=function(e,t){return e&&e.length?ai(e,oo(t,2)):[]},Mr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ai(e,i,t):[]},Mr.unset=function(e,t){return null==e||ui(e,t)},Mr.unzip=ns,Mr.unzipWith=is,Mr.update=function(e,t,r){return null==e?e:ci(e,t,yi(r))},Mr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:ci(e,t,yi(r),n)},Mr.values=Fa,Mr.valuesIn=function(e){return null==e?[]:Yt(e,Ra(e))},Mr.without=os,Mr.words=Ya,Mr.wrap=function(e,t){return ks(yi(t),e)},Mr.xor=ss,Mr.xorBy=as,Mr.xorWith=us,Mr.zip=cs,Mr.zipObject=function(e,t){return di(e||[],t||[],Xr)},Mr.zipObjectDeep=function(e,t){return di(e||[],t||[],Yn)},Mr.zipWith=ls,Mr.entries=Ma,Mr.entriesIn=Ua,Mr.extend=va,Mr.extendWith=wa,su(Mr,Mr),Mr.add=mu,Mr.attempt=Za,Mr.camelCase=Da,Mr.capitalize=za,Mr.ceil=bu,Mr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},Mr.clone=function(e){return sn(e,4)},Mr.cloneDeep=function(e){return sn(e,5)},Mr.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},Mr.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},Mr.conformsTo=function(e,t){return null==t||an(e,t,Pa(t))},Mr.deburr=$a,Mr.defaultTo=function(e,t){return null==e||e!=e?t:e},Mr.divide=vu,Mr.endsWith=function(e,t,r){e=ma(e),t=si(t);var n=e.length,o=r=r===i?n:on(da(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Mr.eq=Fs,Mr.escape=function(e){return(e=ma(e))&&J.test(e)?e.replace(G,tr):e},Mr.escapeRegExp=function(e){return(e=ma(e))&&re.test(e)?e.replace(te,"\\$&"):e},Mr.every=function(e,t,r){var n=Vs(e)?Nt:hn;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},Mr.find=ys,Mr.findIndex=$o,Mr.findKey=function(e,t){return Mt(e,oo(t,3),bn)},Mr.findLast=gs,Mr.findLastIndex=Vo,Mr.findLastKey=function(e,t){return Mt(e,oo(t,3),vn)},Mr.floor=wu,Mr.forEach=ms,Mr.forEachRight=bs,Mr.forIn=function(e,t){return null==e?e:gn(e,oo(t,3),Ra)},Mr.forInRight=function(e,t){return null==e?e:mn(e,oo(t,3),Ra)},Mr.forOwn=function(e,t){return e&&bn(e,oo(t,3))},Mr.forOwnRight=function(e,t){return e&&vn(e,oo(t,3))},Mr.get=Ta,Mr.gt=Ds,Mr.gte=zs,Mr.has=function(e,t){return null!=e&&ho(e,t,Tn)},Mr.hasIn=Oa,Mr.head=Wo,Mr.identity=ru,Mr.includes=function(e,t,r,n){e=Ws(e)?e:Fa(e),r=r&&!n?da(r):0;var i=e.length;return r<0&&(r=yr(i+r,0)),sa(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Ft(e,t,r)>-1},Mr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:da(r);return i<0&&(i=yr(n+i,0)),Ft(e,t,i)},Mr.inRange=function(e,t,r){return t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r){return e>=gr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},Mr.invoke=Ba,Mr.isArguments=$s,Mr.isArray=Vs,Mr.isArrayBuffer=Hs,Mr.isArrayLike=Ws,Mr.isArrayLikeObject=Gs,Mr.isBoolean=function(e){return!0===e||!1===e||ea(e)&&An(e)==m},Mr.isBuffer=qs,Mr.isDate=Js,Mr.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},Mr.isEmpty=function(e){if(null==e)return!0;if(Ws(e)&&(Vs(e)||"string"==typeof e||"function"==typeof e.splice||qs(e)||ua(e)||$s(e)))return!e.length;var t=fo(e);if(t==E||t==N)return!e.size;if(_o(e))return!Ln(e).length;for(var r in e)if(Ce.call(e,r))return!1;return!0},Mr.isEqual=function(e,t){return Pn(e,t)},Mr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Pn(e,t,i,r):!!n},Mr.isError=Ks,Mr.isFinite=function(e){return"number"==typeof e&&kt(e)},Mr.isFunction=Ys,Mr.isInteger=Zs,Mr.isLength=Xs,Mr.isMap=ta,Mr.isMatch=function(e,t){return e===t||Rn(e,t,ao(t))},Mr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Rn(e,t,ao(t),r)},Mr.isNaN=function(e){return ra(e)&&e!=+e},Mr.isNative=function(e){if(wo(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(e)},Mr.isNil=function(e){return null==e},Mr.isNull=function(e){return null===e},Mr.isNumber=ra,Mr.isObject=Qs,Mr.isObjectLike=ea,Mr.isPlainObject=na,Mr.isRegExp=ia,Mr.isSafeInteger=function(e){return Zs(e)&&e>=-9007199254740991&&e<=f},Mr.isSet=oa,Mr.isString=sa,Mr.isSymbol=aa,Mr.isTypedArray=ua,Mr.isUndefined=function(e){return e===i},Mr.isWeakMap=function(e){return ea(e)&&fo(e)==P},Mr.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==An(e)},Mr.join=function(e,t){return null==e?"":Ht.call(e,t)},Mr.kebabCase=Va,Mr.last=Ko,Mr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=da(r))<0?yr(n+o,0):gr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ut(e,zt,o,!0)},Mr.lowerCase=Ha,Mr.lowerFirst=Wa,Mr.lt=ca,Mr.lte=la,Mr.max=function(e){return e&&e.length?dn(e,ru,Sn):i},Mr.maxBy=function(e,t){return e&&e.length?dn(e,oo(t,2),Sn):i},Mr.mean=function(e){return $t(e,ru)},Mr.meanBy=function(e,t){return $t(e,oo(t,2))},Mr.min=function(e){return e&&e.length?dn(e,ru,jn):i},Mr.minBy=function(e,t){return e&&e.length?dn(e,oo(t,2),jn):i},Mr.stubArray=pu,Mr.stubFalse=yu,Mr.stubObject=function(){return{}},Mr.stubString=function(){return""},Mr.stubTrue=function(){return!0},Mr.multiply=_u,Mr.nth=function(e,t){return e&&e.length?Dn(e,da(t)):i},Mr.noConflict=function(){return ft._===this&&(ft._=Ue),this},Mr.noop=au,Mr.now=Ts,Mr.pad=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return zi(dt(i),r)+e+zi(ht(i),r)},Mr.padEnd=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?e+zi(t-n,r):e},Mr.padStart=function(e,t,r){e=ma(e);var n=(t=da(t))?cr(e):0;return t&&n<t?zi(t-n,r)+e:e},Mr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),br(ma(e).replace(ne,""),t||0)},Mr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&mo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=vr();return gr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Wn(e,t)},Mr.reduce=function(e,t,r){var n=Vs(e)?Ct:Wt,i=arguments.length<3;return n(e,oo(t,4),r,i,ln)},Mr.reduceRight=function(e,t,r){var n=Vs(e)?Lt:Wt,i=arguments.length<3;return n(e,oo(t,4),r,i,fn)},Mr.repeat=function(e,t,r){return t=(r?mo(e,t,r):t===i)?1:da(t),Gn(ma(e),t)},Mr.replace=function(){var e=arguments,t=ma(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Mr.result=function(e,t,r){var n=-1,o=(t=gi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[ko(t[n])];s===i&&(n=o,s=r),e=Ys(s)?s.call(e):s}return e},Mr.round=Eu,Mr.runInContext=e,Mr.sample=function(e){return(Vs(e)?Jr:Jn)(e)},Mr.size=function(e){if(null==e)return 0;if(Ws(e))return sa(e)?cr(e):e.length;var t=fo(e);return t==E||t==N?e.size:Ln(e).length},Mr.snakeCase=Ga,Mr.some=function(e,t,r){var n=Vs(e)?jt:ti;return r&&mo(e,t,r)&&(t=i),n(e,oo(t,3))},Mr.sortedIndex=function(e,t){return ri(e,t)},Mr.sortedIndexBy=function(e,t,r){return ni(e,t,oo(r,2))},Mr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ri(e,t);if(n<r&&Fs(e[n],t))return n}return-1},Mr.sortedLastIndex=function(e,t){return ri(e,t,!0)},Mr.sortedLastIndexBy=function(e,t,r){return ni(e,t,oo(r,2),!0)},Mr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ri(e,t,!0)-1;if(Fs(e[r],t))return r}return-1},Mr.startCase=qa,Mr.startsWith=function(e,t,r){return e=ma(e),r=null==r?0:on(da(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},Mr.subtract=Au,Mr.sum=function(e){return e&&e.length?Gt(e,ru):0},Mr.sumBy=function(e,t){return e&&e.length?Gt(e,oo(t,2)):0},Mr.template=function(e,t,r){var n=Mr.templateSettings;r&&mo(e,t,r)&&(t=i),e=ma(e),t=wa({},t,n,Ki);var o,s,a=wa({},t.imports,n.imports,Ki),u=Pa(a),c=Yt(a,u),l=0,f=t.interpolate||ve,h="__p += '",d=Te((t.escape||ve).source+"|"+f.source+"|"+(f===Z?fe:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),p="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),h+=e.slice(l,u).replace(we,rr),r&&(o=!0,h+="' +\n__e("+r+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),n&&(h+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),h+="';\n";var y=Ce.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new _e("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace($,""):h).replace(V,"$1").replace(H,"$1;"),h="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Za((function(){return Ee(u,p+"return "+h).apply(i,c)}));if(g.source=h,Ks(g))throw g;return g},Mr.times=function(e,t){if((e=da(e))<1||e>f)return[];var r=d,n=gr(e,d);t=oo(t),e-=d;for(var i=qt(n,t);++r<e;)t(r);return i},Mr.toFinite=ha,Mr.toInteger=da,Mr.toLength=pa,Mr.toLower=function(e){return ma(e).toLowerCase()},Mr.toNumber=ya,Mr.toSafeInteger=function(e){return e?on(da(e),-9007199254740991,f):0===e?e:0},Mr.toString=ma,Mr.toUpper=function(e){return ma(e).toUpperCase()},Mr.trim=function(e,t,r){if((e=ma(e))&&(r||t===i))return Jt(e);if(!e||!(t=si(t)))return e;var n=lr(e),o=lr(t);return bi(n,Xt(n,o),Qt(n,o)+1).join("")},Mr.trimEnd=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.slice(0,fr(e)+1);if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,0,Qt(n,lr(t))+1).join("")},Mr.trimStart=function(e,t,r){if((e=ma(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=lr(e);return bi(n,Xt(n,lr(t))).join("")},Mr.truncate=function(e,t){var r=30,n="...";if(Qs(t)){var o="separator"in t?t.separator:o;r="length"in t?da(t.length):r,n="omission"in t?si(t.omission):n}var s=(e=ma(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?bi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),ia(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Te(o.source,ma(he.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},Mr.unescape=function(e){return(e=ma(e))&&q.test(e)?e.replace(W,hr):e},Mr.uniqueId=function(e){var t=++Le;return ma(e)+t},Mr.upperCase=Ja,Mr.upperFirst=Ka,Mr.each=ms,Mr.eachRight=bs,Mr.first=Wo,su(Mr,(gu={},bn(Mr,(function(e,t){Ce.call(Mr.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),Mr.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Mr[e].placeholder=Mr})),Tt(["drop","take"],(function(e,t){zr.prototype[e]=function(r){r=r===i?1:yr(da(r),0);var n=this.__filtered__&&!t?new zr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},zr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;zr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:oo(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Tt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");zr.prototype[e]=function(){return this[r](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");zr.prototype[e]=function(){return this.__filtered__?new zr(this):this[r](1)}})),zr.prototype.compact=function(){return this.filter(ru)},zr.prototype.find=function(e){return this.filter(e).head()},zr.prototype.findLast=function(e){return this.reverse().find(e)},zr.prototype.invokeMap=qn((function(e,t){return"function"==typeof e?new zr(this):this.map((function(r){return xn(r,e,t)}))})),zr.prototype.reject=function(e){return this.filter(Ls(oo(e)))},zr.prototype.slice=function(e,t){e=da(e);var r=this;return r.__filtered__&&(e>0||t<0)?new zr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=da(t))<0?r.dropRight(-t):r.take(t-e)),r)},zr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zr.prototype.toArray=function(){return this.take(d)},bn(zr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Mr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(Mr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof zr,c=a[0],l=u||Vs(t),f=function(e){var t=o.apply(Mr,It([e],a));return n&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,y=u&&!d;if(!s&&l){t=y?t:new zr(this);var g=e.apply(t,a);return g.__actions__.push({func:hs,args:[f],thisArg:i}),new Dr(g,h)}return p&&y?e.apply(this,a):(g=this.thru(f),p?n?g.value()[0]:g.value():g)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=xe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Mr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Vs(i)?i:[],e)}return this[r]((function(r){return t.apply(Vs(r)?r:[],e)}))}})),bn(zr.prototype,(function(e,t){var r=Mr[t];if(r){var n=r.name+"";Ce.call(xr,n)||(xr[n]=[]),xr[n].push({name:t,func:r})}})),xr[Mi(i,2).name]=[{name:"wrapper",func:i}],zr.prototype.clone=function(){var e=new zr(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e},zr.prototype.reverse=function(){if(this.__filtered__){var e=new zr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Vs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=gr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return fi(e,this.__actions__);var p=[];e:for(;u--&&h<d;){for(var y=-1,g=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,v=m.type,w=b(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[h++]=g}return p},Mr.prototype.at=ds,Mr.prototype.chain=function(){return fs(this)},Mr.prototype.commit=function(){return new Dr(this.value(),this.__chain__)},Mr.prototype.next=function(){this.__values__===i&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Mr.prototype.plant=function(e){for(var t,r=this;r instanceof Fr;){var n=Uo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Mr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zr){var t=e;return this.__actions__.length&&(t=new zr(this)),(t=t.reverse()).__actions__.push({func:hs,args:[Qo],thisArg:i}),new Dr(t,this.__chain__)}return this.thru(Qo)},Mr.prototype.toJSON=Mr.prototype.valueOf=Mr.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Mr.prototype.first=Mr.prototype.head,Ke&&(Mr.prototype[Ke]=function(){return this}),Mr}();ft._=dr,(n=function(){return dr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},9640:function(e,t,r){var n,i;!function(o,s){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function i(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,r){for(var i=0;i<n.length;i++){var o=n[i];this[o]=i<t?e:this.methodFactory(o,t,r)}this.log=this.debug}function a(e,r,n){return function(){typeof console!==t&&(s.call(this,r,n),this[e].apply(this,arguments))}}function u(n,s,u){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?o:void 0!==console[n]?i(console,n):void 0!==console.log?i(console,"log"):e)}(n)||a.apply(this,arguments)}function c(e,r,i){var o,a=this;r=null==r?"WARN":r;var c="loglevel";function l(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=i||u,a.getLevel=function(){return o},a.setLevel=function(r,i){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(o=r,!1!==i&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(a,r,e),typeof console===t&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){r=e,l()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var f=l();null==f&&(f=r),a.setLevel(f,!1)}var l=new c,f={};l.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=f[e];return t||(t=f[e]=new c(e,l.getLevel(),l.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return f},l.default=l,l},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},2973:(e,t,r)=>{"use strict";var n=r(8834).Buffer,i=r(4406);Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const o=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class s extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=s;class a extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function u(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=a;let c={};function l(e,t){let i={...o,...t};const f=r(732),h=r(3406),d=r(4087),{promisify:p}=r(3335),{resolve:y}=r(883),g=!!/^https/.test(e);let m={method:i.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=e=>e.replace(/:| /g,"").toLowerCase();if(i.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&i.sslPinnedCertificates?.map((e=>b(e))).sort()].join();m.agent=c[t]||(c[t]=new(g?h:f).Agent(e))}return"json"===i.type&&(m.headers["Content-Type"]="application/json"),i.data&&(i.method||(m.method="POST"),m.body="json"===i.type?JSON.stringify(i.data):i.data),m.headers={...m.headers,...i.headers},i.sslAllowSelfSigned&&(m.rejectUnauthorized=!1),new Promise(((t,r)=>{const o=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await l(e,{...i,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new s(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},c=(g?h:f).request(e,m,(s=>{s.on("error",o),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(i.redirect&&300<=r&&r<400&&t.headers.location){if(10==i._redirectCount)throw new Error("Request failed. Too much redirects.");return i._redirectCount+=1,await l(y(e,t.headers.location),i)}if(i.expectStatusCode&&r!==i.expectStatusCode)throw t.resume(),new a(r);let o=[];for await(const e of t)o.push(e);let s=n.concat(o);const c=t.headers["content-encoding"];"br"===c&&(s=await p(d.brotliDecompress)(s)),"gzip"!==c&&"deflate"!==c||(s=await p(d.unzip)(s));const f=u(s,i.type);return i.full?{headers:t.headers,status:r,body:f}:f})(s))}catch(e){r(e)}})()}));c.on("error",o);const v=i.sslPinnedCertificates?.map((e=>b(e))),w=e=>{const t=b(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!v.includes(t))return c.emit("error",new s(`Invalid SSL certificate: ${t} Expected: ${v}`,t)),c.abort()};i.sslPinnedCertificates&&c.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",w.bind(null,e))})),i.keepAlive&&c.setNoDelay(!0),m.body&&c.write(m.body),c.end()}))}const f=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),h=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function d(e,t){let r={...o,...t};const n=new Headers;"json"===r.type&&n.set("Content-Type","application/json");let i=new URL(e);if(i.username){const e=btoa(`${i.username}:${i.password}`);n.set("Authorization",`Basic ${e}`),i.username="",i.password=""}e=""+i;for(let e in r.headers){const t=e.toLowerCase();(f.has(t)||r.cors&&!h.has(t))&&n.set(e,r.headers[e])}let s={headers:n,redirect:r.redirect?"follow":"manual"};r.referrer||(s.referrerPolicy="no-referrer"),r.cors&&(s.mode="cors"),r.data&&(r.method||(s.method="POST"),s.body="json"===r.type?JSON.stringify(r.data):r.data);const c=await fetch(e,s);if(r.expectStatusCode&&c.status!==r.expectStatusCode)throw new a(c.status);const l=u(new Uint8Array(await c.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(c.headers.entries()),status:c.status,body:l}:l}const p=!!("object"==typeof i&&i.versions&&i.versions.node&&i.versions.v8);t.default=function(e,t){return(p?l:d)(e,t)}},1378:e=>{var t=1e3,r=60*t,n=60*r,i=24*n;function o(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\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(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&isFinite(e))return s.long?(a=e,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=n?o(a,u,n,"hour"):u>=r?o(a,u,r,"minute"):u>=t?o(a,u,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=n?Math.round(e/n)+"h":o>=r?Math.round(e/r)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7033:(e,t,r)=>{var n=r(8892);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 o(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}e.exports=n(i),e.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},4406:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,u=[],c=!1,l=-1;function f(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.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];u.push(new d(e,t)),1!==u.length||c||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3171:(e,t,r)=>{var n=r(4406),i=r(7033),o=r(8797),s=r(3558),a=function(){},u=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},l=function(e){e()},f=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||a)&&t.pop()||a;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(f,h){var d=h<t.length-1;return function(e,t,r,n){n=i(n);var l=!1;e.on("close",(function(){l=!0})),o(e,{readable:t,writable:r},(function(e){if(e)return n(e);l=!0,n()}));var f=!1;return function(t){if(!l&&!f)return f=!0,function(e){return!!u&&!!s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&c(e.close)}(e)?e.close(a):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(f,d,h>0,(function(t){e||(e=t),t&&n.forEach(l),d||(n.forEach(l),r(e))}))}));return t.reduce(f)}},2808:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(r);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var l,f,h,d,p=e[c].replace(s,"%20"),y=p.indexOf(n);y>=0?(l=p.substr(0,y),f=p.substr(y+1)):(l=p,f=""),h=decodeURIComponent(l),d=decodeURIComponent(f),t(o,h)?Array.isArray(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o}},1368:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[i]))})).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},6642:(e,t,r)=>{"use strict";t.decode=t.parse=r(2808),t.encode=t.stringify=r(1368)},7834:(e,t,r)=>{var n=r(8834),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},214:(e,t,r)=>{"use strict";var n=r(7834).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 o(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=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(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 void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function 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 h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.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}},9639:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=26,l=38,f=700,h=/^xn--/,d=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=u-1,m=Math.floor,b=String.fromCharCode;function v(e){throw RangeError(y[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function _(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(p,".")).split("."),t).join(".")}function E(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function A(e){return w(e,(function(e){var t="";return e>65535&&(t+=b((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+b(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function T(e,t,r){var n=0;for(e=r?m(e/f):e>>1,e+=m(e/t);e>g*c>>1;n+=u)e=m(e/g);return m(n+(g+1)*e/(e+l))}function O(e){var t,r,n,i,o,s,l,f,h,d,p,y=[],g=e.length,b=0,w=128,_=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),y.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=b,s=1,l=u;i>=g&&v("invalid-input"),((f=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||f>m((a-b)/s))&&v("overflow"),b+=f*s,!(f<(h=l<=_?1:l>=_+c?c:l-_));l+=u)s>m(a/(d=u-h))&&v("overflow"),s*=d;_=T(b-o,t=y.length+1,0==o),m(b/t)>a-w&&v("overflow"),w+=m(b/t),b%=t,y.splice(b++,0,w)}return A(y)}function N(e){var t,r,n,i,o,s,l,f,h,d,p,y,g,w,_,A=[];for(y=(e=E(e)).length,t=128,r=0,o=72,s=0;s<y;++s)(p=e[s])<128&&A.push(b(p));for(n=i=A.length,i&&A.push("-");n<y;){for(l=a,s=0;s<y;++s)(p=e[s])>=t&&p<l&&(l=p);for(l-t>m((a-r)/(g=n+1))&&v("overflow"),r+=(l-t)*g,t=l,s=0;s<y;++s)if((p=e[s])<t&&++r>a&&v("overflow"),p==t){for(f=r,h=u;!(f<(d=h<=o?1:h>=o+c?c:h-o));h+=u)_=f-d,w=u-d,A.push(b(S(d+_%w,0))),f=m(_/w);A.push(b(S(f,0))),o=T(r,g,n==i),r=0,++n}++r,++t}return A.join("")}s={version:"1.3.2",ucs2:{decode:E,encode:A},decode:O,encode:N,toASCII:function(e){return _(e,(function(e){return d.test(e)?"xn--"+N(e):e}))},toUnicode:function(e){return _(e,(function(e){return h.test(e)?O(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},883:(e,t,r)=>{"use strict";var n=r(9639),i=r(5225);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(6642);function v(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var v=e=c.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var w=u.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(v);if(_){var E=(_=_[0]).toLowerCase();this.protocol=E,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var A="//"===v.substr(0,2);!A||_&&g[_]||(v=v.substr(2),this.slashes=!0)}if(!g[_]&&(A||_&&!m[_])){for(var S,T,O=-1,N=0;N<h.length;N++)-1!==(x=v.indexOf(h[N]))&&(-1===O||x<O)&&(O=x);for(-1!==(T=-1===O?v.lastIndexOf("@"):v.lastIndexOf("@",O))&&(S=v.slice(0,T),v=v.slice(T+1),this.auth=decodeURIComponent(S)),O=-1,N=0;N<f.length;N++){var x;-1!==(x=v.indexOf(f[N]))&&(-1===O||x<O)&&(O=x)}-1===O&&(O=v.length),this.host=v.slice(0,O),v=v.slice(O),this.parseHost(),this.hostname=this.hostname||"";var B="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!B)for(var P=this.hostname.split(/\./),R=(N=0,P.length);N<R;N++){var I=P[N];if(I&&!I.match(d)){for(var C="",L=0,j=I.length;L<j;L++)I.charCodeAt(L)>127?C+="x":C+=I[L];if(!C.match(d)){var k=P.slice(0,N),M=P.slice(N+1),U=I.match(p);U&&(k.push(U[1]),M.unshift(U[2])),M.length&&(v="/"+M.join(".")+v),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),B||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+F,this.href+=this.host,B&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!y[E])for(N=0,R=l.length;N<R;N++){var z=l[N];if(-1!==v.indexOf(z)){var $=encodeURIComponent(z);$===z&&($=escape(z)),v=v.split(z).join($)}}var V=v.indexOf("#");-1!==V&&(this.hash=v.substr(V),v=v.slice(0,V));var H=v.indexOf("?");if(-1!==H?(this.search=v.substr(H),this.query=v.substr(H+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,H)):t&&(this.search="",this.query={}),v&&(this.pathname=v),m[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var W=this.search||"";this.path=F+W}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var f=Object.keys(e),h=0;h<f.length;h++){var d=f[h];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var y=r.pathname||"",b=r.search||"";r.path=y+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||v||r.host&&e.pathname,E=_,A=r.pathname&&r.pathname.split("/")||[],S=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===A[0]?A[0]=r.host:A.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===A[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,A=p;else if(p.length)A||(A=[]),A.pop(),A=A.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search))return S&&(r.hostname=r.host=A.shift(),(B=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!A.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=A.slice(-1)[0],O=(r.host||e.host||A.length>1)&&("."===T||".."===T)||""===T,N=0,x=A.length;x>=0;x--)"."===(T=A[x])?A.splice(x,1):".."===T?(A.splice(x,1),N++):N&&(A.splice(x,1),N--);if(!_&&!E)for(;N--;N)A.unshift("..");!_||""===A[0]||A[0]&&"/"===A[0].charAt(0)||A.unshift(""),O&&"/"!==A.join("/").substr(-1)&&A.push("");var B,P=""===A[0]||A[0]&&"/"===A[0].charAt(0);return S&&(r.hostname=r.host=P?"":A.length?A.shift():"",(B=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=B.shift(),r.host=r.hostname=B.shift())),(_=_||r.host&&A.length)&&!P&&A.unshift(""),A.length?r.pathname=A.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},5225:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},82:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},4895:(e,t,r)=>{"use strict";var n=r(2635),i=r(3138),o=r(2094),s=r(198);function a(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=a(Object.prototype.toString),f=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var y=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function b(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function _(e){return"[object ArrayBuffer]"===l(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function A(e){return"[object DataView]"===l(e)}function S(e){return"undefined"!=typeof DataView&&(A.working?A(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||S(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,A.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&A(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=S;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===l(e)}function N(e){return void 0!==T&&(void 0===O.working&&(O.working=O(new T)),O.working?O(e):e instanceof T)}function x(e){return g(e,f)}function B(e){return g(e,h)}function P(e){return g(e,d)}function R(e){return u&&g(e,p)}function I(e){return c&&g(e,y)}t.isSharedArrayBuffer=N,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=x,t.isStringObject=B,t.isBooleanObject=P,t.isBigIntObject=R,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return x(e)||B(e)||P(e)||R(e)||I(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||N(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},3335:(e,t,r)=>{var n=r(4406),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])m(a)||!E(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),h(n,e,n.depth)}function l(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function f(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return v(i)||(i=h(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(r);if(0===s.length){if(T(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return d(r)}var c,l="",f=!1,E=["{","}"];return y(r)&&(f=!0,E=["[","]"]),T(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),S(r)&&(l=" "+d(r)),0!==s.length||f&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)B(t,String(s))?o.push(p(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return p(e,r,n,a,t,f)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,E)):E[0]+l+E[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),B(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===O(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===O(e)}function S(e){return E(e)&&("[object Error]"===O(e)||e instanceof Error)}function T(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function N(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(4895),t.isArray=y,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=S,t.types.isNativeError=S,t.isFunction=T,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(82);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[N((e=new Date).getHours()),N(e.getMinutes()),N(e.getSeconds())].join(":"),[e.getDate(),x[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(1285),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=P,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(s.bind(null,null,e))}),(function(e){n.nextTick(R.bind(null,e,s))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},2094:(e,t,r)=>{"use strict";var n=r(3243),i=r(2191),o=r(2680),s=r(326),a=o("Object.prototype.toString"),u=r(7226)(),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=o("String.prototype.slice"),h={},d=Object.getPrototypeOf;u&&s&&d&&n(l,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var r=d(t),n=s(r,Symbol.toStringTag);if(!n){var i=d(r);n=s(i,Symbol.toStringTag)}h[e]=n.get}}}));var p=r(198);e.exports=function(e){return!!p(e)&&(u&&Symbol.toStringTag in e?function(e){var t=!1;return n(h,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):f(a(e),8,-1))}},8892:e=>{e.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}}},4888:()=>{},732:()=>{},3406:()=>{},4087:()=>{},3558:()=>{},2191:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}},6891:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>T,array:()=>O,assert:()=>f,assign:()=>g,bigint:()=>N,boolean:()=>x,coerce:()=>Y,create:()=>h,date:()=>B,defaulted:()=>Z,define:()=>m,deprecated:()=>b,dynamic:()=>v,empty:()=>Q,enums:()=>P,func:()=>R,instance:()=>I,integer:()=>C,intersection:()=>L,is:()=>p,lazy:()=>w,literal:()=>j,map:()=>k,mask:()=>d,max:()=>te,min:()=>re,never:()=>M,nonempty:()=>ne,nullable:()=>U,number:()=>F,object:()=>D,omit:()=>_,optional:()=>z,partial:()=>E,pattern:()=>ie,pick:()=>A,record:()=>$,refine:()=>se,regexp:()=>V,set:()=>H,size:()=>oe,string:()=>W,struct:()=>S,trimmed:()=>X,tuple:()=>G,type:()=>q,union:()=>J,unknown:()=>K,validate:()=>y});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:i,...o}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function i(e){return"object"==typeof e&&null!=e}function o(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:i,branch:o}=t,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:u,key:i[i.length-1],path:i,branch:o,...e,message:c}}function*u(e,t,r,n){var o;i(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const i of e){const e=a(i,t,r,n);e&&(yield e)}}function*c(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,u={path:n,branch:o};if(s&&(e=t.coercer(e,u),a&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,u))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,h,d]of t.entries(e,u)){const t=c(h,d,{path:void 0===f?n:[...n,f],branch:void 0===f?o:[...o,h],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(h=r[1],void 0===f?e=h:e instanceof Map?e.set(f,h):e instanceof Set?e.add(h):i(e)&&(void 0!==h||f in e)&&(e[f]=h))}if("not_valid"!==l)for(const n of t.refiner(e,u))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:i,coercer:o=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=o,this.validator=n?(e,t)=>u(n(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>u(i(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return h(e,this,t)}is(e){return p(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return y(e,this,t)}}function f(e,t,r){const n=y(e,t,{message:r});if(n[0])throw n[0]}function h(e,t,r){const n=y(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=y(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t){return!y(e,t)[0]}function y(e,t,r={}){const i=c(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(i);return o[0]?[new n(o[0],(function*(){for(const e of i)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function g(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?q(n):D(n)}function m(e,t){return new l({type:e,schema:null,validator:t})}function b(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function v(e){return new l({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)})}function w(e){let t;return new l({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))})}function _(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?q(n):D(n)}function E(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=z(t[e]);return D(t)}function A(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return D(n)}function S(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),m(e,t)}function T(){return m("any",(()=>!0))}function O(e){return new l({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: ${s(e)}`})}function N(){return m("bigint",(e=>"bigint"==typeof e))}function x(){return m("boolean",(e=>"boolean"==typeof e))}function B(){return m("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function P(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function R(){return m("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function I(e){return m("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function C(){return m("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function L(e){return new l({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)}})}function j(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function k(e,t){return new l({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: ${s(e)}`})}function M(){return m("never",(()=>!1))}function U(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function F(){return m("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function D(e){const t=e?Object.keys(e):[],r=M();return new l({type:"object",schema:e||null,*entries(n){if(e&&i(n)){const i=new Set(Object.keys(n));for(const r of t)i.delete(r),yield[r,n[r],e[r]];for(const e of i)yield[e,n[e],r]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function z(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function $(e,t){return new l({type:"record",schema:null,*entries(r){if(i(r))for(const n in r){const i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`})}function V(){return m("regexp",(e=>e instanceof RegExp))}function H(e){return new l({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: ${s(e)}`})}function W(){return m("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function G(e){const t=M();return new l({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: ${s(e)}`})}function q(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(i(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>i(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>i(e)?{...e}:e})}function J(e){const t=e.map((e=>e.type)).join(" | ");return new l({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 i=[];for(const t of e){const[...e]=c(r,t,n),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...i]}})}function K(){return m("unknown",(()=>!0))}function Y(e,t,r){return new l({...e,coercer:(n,i)=>p(n,t)?e.coercer(r(n,i),i):e.coercer(n,i)})}function Z(e,t,r={}){return Y(e,K(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&o(e)&&o(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function X(e){return Y(e,W(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))}function re(e,t,r={}){const{exclusive:n}=r;return se(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function ie(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function oe(e,t,r=t){const n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(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:o}=e;return t<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}{const{length:o}=e;return t<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,i){yield*e.refiner(n,i);const o=u(r(n,i),i,e,n);for(const e of o)yield{...e,refinement:t}}})}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}r.r(n),r.d(n,{Web3AuthNoModal:()=>Fe}),r(1149);var i=r(2699),o=r(7847),s=r.n(o),a=r(774);function u(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}r(8797),r(7033),r(3171);class c extends i.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(t){let e;if(i.length>0&&([e]=i),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)u(s,this,i);else{const e=s.length,t=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 r=0;r<e;r+=1)u(t[r],this,i)}return!0}}class l extends Error{constructor(e){let{code:r,message:n,data:i}=e;if(!Number.isInteger(r))throw new Error("code must be an integer");if(!n||"string"!=typeof n)throw new Error("message must be string");super(n),t(this,"code",void 0),t(this,"data",void 0),this.code=r,void 0!==i&&(this.data=i)}toString(){return s()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function f(e){return async(t,r,n,i)=>{let o;const s=new Promise((e=>{o=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,o()})),await s};try{await e(t,r,c),u?(await s,a(null)):i(null)}catch(e){a?a(e):i(e)}}}function h(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 d(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class p extends c{constructor(){super(),t(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let i=null,o=!1;for(const s of r)if([i,o]=await p._runMiddleware(e,t,s,n),o)break;return[i,o,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((i=>{const o=e=>{const r=e||t.error;r&&(t.error=(0,a.Xy)(r)),i([r,!0])},s=e=>{t.error?o(t.error):(e&&("function"!=typeof e&&o(new l({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),i([null,!1]))};try{r(e,t,s,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 l({code:-32603,message:"Response has no error or result for request"});if(!r)throw new l({code:-32603,message:"Nothing ended request"})}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,o,s]=await p._runAllMiddleware(e,t,this._middleware);return o?(await p._runReturnHandlers(s),n(i)):r((async e=>{try{await p._runReturnHandlers(s)}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 e=new l({code:-32603,message:"request must be plain object"});return t(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const r=new l({code:-32603,message:"method must be string"});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=d({},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=(0,a.Xy)(i))),t(i,n)}async _processRequest(e,t){const[r,n,i]=await p._runAllMiddleware(e,t,this._middleware);if(p._checkForCompletion(e,t,n),await p._runReturnHandlers(i),r)throw r}}function y(e){const t=new c;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,i;const e=(0,a.Xy)(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||r.error.toString(),code:(null===(i=r.error)||void 0===i?void 0:i.code)||-32603}});throw a.PY.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=d(d({},e),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await t.sendAsync(r)},t}function g(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}Symbol("IGNORE_SUBSTREAM"),r(9487);class m{constructor(){t(this,"store",{})}getItem(e){return this.store[e]||null}setItem(e,t){this.store[e]=t}}t(class{constructor(e,r){t(this,"storage",void 0),t(this,"_storeKey",void 0),this.storage=r,this._storeKey=e;try{r.getItem(e)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instance){let r;r="local"===t&&g("localStorage")?window.localStorage:"session"===t&&g("sessionStorage")?window.sessionStorage:new m,this.instance=new this(e,r)}return this.instance}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.setItem(this._storeKey,JSON.stringify({})),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(e){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instance",void 0);var b,v=(b=function(e,t){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},b(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}b(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),w=function(e){function t(t,r){var n,i,o,s=this.constructor,a=e.call(this,t,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,i=s.prototype,(o=Object.setPrototypeOf)?o(n,i):n.__proto__=i,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(a),a}return v(t,e),t}(Error);r(1344);var _=r(9640),E=r.n(_);function A(e){this.message=e}function S(e){this.message=e}E().getLogger("http-helpers").setLevel(_.levels.INFO),A.prototype=new Error,A.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),S.prototype=new Error,S.prototype.name="InvalidTokenError";const T={EIP155:"eip155",SOLANA:"solana",OTHER:"other"},O="multichain",N=(e,t)=>{if(e===T.OTHER)return null;const r=t?"number"==typeof t?t:parseInt(t,16):(e=>{if(e===T.EIP155)return 1;if(e===T.SOLANA)return 1;throw new Error(`Chain namespace ${e} is not supported`)})(e);return e===T.EIP155?(e=>{const t=T.EIP155;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorer:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===e?{chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorer:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===e?{chainNamespace:t,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorer:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===e?{chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorer:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80001===e?{chainNamespace:t,chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===e?{chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorer:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===e?{chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorer:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===e?{chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===e?{chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorer:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):e===T.SOLANA?(e=>{const t=T.SOLANA;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorer:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===e?{chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorer:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===e?{chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorer:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):null};class x extends w{constructor(e,r){super(r),t(this,"code",void 0),t(this,"message",void 0),this.code=e,this.message=r||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class B extends x{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new B(e,`${B.messages[e]}, ${t}`)}static notFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5001,e)}static notInstalled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5002,e)}static notReady(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5003,e)}static windowBlocked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5004,e)}static windowClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5005,e)}static incompatibleChainNameSpace(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5006,e)}static duplicateAdapterError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5007,e)}static invalidProviderConfigError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5008,e)}static providerNotReadyError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5009,e)}static rpcConnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5010,e)}static invalidParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5011,e)}static invalidNetwork(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return B.fromCode(5013,e)}}t(B,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class P extends x{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new P(e,`${P.messages[e]}. ${t}`)}static connectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5111,e)}static disconnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5112,e)}static notConnectedError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5113,e)}static popupClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5114,e)}static mfaEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5115,e)}static chainConfigNotAdded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5116,e)}static unsupportedOperation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5117,e)}static coreKitKeyNotFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5118,e)}static userNotLoggedIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5119,e)}}t(P,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class R extends x{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new R(e,`${R.messages[e]}, ${t}`)}static chainIDNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return R.fromCode(5201,e)}static operationNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return R.fromCode(5202,e)}static chainNamespaceNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return R.fromCode(5203,e)}}function I(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 C(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?I(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(R,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});const L={OPENLOGIN:"openlogin",WALLET_CONNECT_V1:"wallet-connect-v1",WALLET_CONNECT_V2:"wallet-connect-v2"},j=C({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},L),k=C({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},L),M=C(C({},k),j);function U(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 F(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?U(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}j.TORUS_SOLANA,j.PHANTOM,j.SOLFLARE,j.SLOPE,k.TORUS_EVM,k.METAMASK,k.COINBASE;const D={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},z=F(F({},D),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});var $=E().getLogger("web3auth-logger");function V(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const i="__storage_test__";return t.setItem(i,i),t.removeItem(i),!0}catch(e){const t=e;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}function H(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 W(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?H(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const G=W(W({},T),{},{MULTICHAIN:"multichain"});r(5372);var q=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,J=Math.ceil,K=Math.floor,Y="[BigNumber Error] ",Z=Y+"Number primitive has more than 15 significant digits: ",X=1e14,Q=14,ee=9007199254740991,te=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],re=1e7,ne=1e9;function ie(e){var t=0|e;return e>0||e===t?t:t-1}function oe(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=Q-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function se(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function ae(e,t,r,n){if(e<t||e>r||e!==K(e))throw Error(Y+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ue(e){var t=e.c.length-1;return ie(e.e/Q)==t&&e.c[t]%2!=0}function ce(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function le(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function fe(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 he(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function e(t){var r,n,i,o,s,a,u,c,l,f,h=O.prototype={constructor:O,toString:null,valueOf:null},d=new O(1),p=20,y=4,g=-7,m=21,b=-1e7,v=1e7,w=!1,_=1,E=0,A={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},S="0123456789abcdefghijklmnopqrstuvwxyz",T=!0;function O(e,t){var r,o,s,a,u,c,l,f,h=this;if(!(h instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>v?h.c=h.e=null:e.e<b?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,u=e;u>=10;u/=10,a++);return void(a>v?h.c=h.e=null:(h.e=a,h.c=[e]))}f=String(e)}else{if(!q.test(f=String(e)))return i(h,f,c);h.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(a=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(a<0&&(a=u),a+=+f.slice(u+1),f=f.substring(0,u)):a<0&&(a=f.length)}else{if(ae(t,2,S.length,"Base"),10==t&&T)return P(h=new O(e),p+h.e+1,y);if(f=String(e),c="number"==typeof e){if(0*e!=0)return i(h,f,c,t);if(h.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(Z+e)}else h.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=S.slice(0,t),a=u=0,l=f.length;u<l;u++)if(r.indexOf(o=f.charAt(u))<0){if("."==o){if(u>a){a=l;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,u=-1,a=0;continue}return i(h,String(e),c,t)}c=!1,(a=(f=n(f,t,10,h.s)).indexOf("."))>-1?f=f.replace(".",""):a=f.length}for(u=0;48===f.charCodeAt(u);u++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(u,++l)){if(l-=u,c&&O.DEBUG&&l>15&&(e>ee||e!==K(e)))throw Error(Z+h.s*e);if((a=a-u-1)>v)h.c=h.e=null;else if(a<b)h.c=[h.e=0];else{if(h.e=a,h.c=[],u=(a+1)%Q,a<0&&(u+=Q),u<l){for(u&&h.c.push(+f.slice(0,u)),l-=Q;u<l;)h.c.push(+f.slice(u,u+=Q));u=Q-(f=f.slice(u)).length}else u-=l;for(;u--;f+="0");h.c.push(+f)}}else h.c=[h.e=0]}function N(e,t,r,n){var i,o,s,a,u;if(null==r?r=y:ae(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=oe(e.c),u=1==n||2==n&&(s<=g||s>=m)?ce(u,s):le(u,s,"0");else if(o=(e=P(new O(e),t,r)).e,a=(u=oe(e.c)).length,1==n||2==n&&(t<=o||o<=g)){for(;a<t;u+="0",a++);u=ce(u,o)}else if(t-=s,u=le(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function x(e,t){for(var r,n=1,i=new O(e[0]);n<e.length;n++){if(!(r=new O(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function B(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*Q-1)>v?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var i,o,s,a,u,c,l,f=e.c,h=te;if(f){e:{for(i=1,a=f[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=Q,s=t,l=(u=f[c=0])/h[i-s-1]%10|0;else if((c=J((o+1)/Q))>=f.length){if(!n)break e;for(;f.length<=c;f.push(0));u=l=0,i=1,s=(o%=Q)-Q+1}else{for(u=a=f[c],i=1;a>=10;a/=10,i++);l=(s=(o%=Q)-Q+i)<0?0:u/h[i-s-1]%10|0}if(n=n||t<0||null!=f[c+1]||(s<0?u:u%h[i-s-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(o>0?s>0?u/h[i-s]:0:f[c-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=h[(Q-t%Q)%Q],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=c,a=1,c--):(f.length=c+1,a=h[Q-o],f[c]=s>0?K(u/h[i-s]%h[s])*a:0),n)for(;;){if(0==c){for(o=1,s=f[0];s>=10;s/=10,o++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,f[0]==X&&(f[0]=1));break}if(f[c]+=a,f[c]!=X)break;f[c--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}e.e>v?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function R(e){var t,r=e.e;return null===r?e.toString():(t=oe(e.c),t=r<=g||r>=m?ce(t,r):le(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=e,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Y+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ae(r=e[t],0,ne,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ae(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ae(r[0],-ne,0,t),ae(r[1],0,ne,t),g=r[0],m=r[1]):(ae(r,-ne,ne,t),g=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ae(r[0],-ne,-1,t),ae(r[1],1,ne,t),b=r[0],v=r[1];else{if(ae(r,-ne,ne,t),!r)throw Error(Y+t+" cannot be zero: "+r);b=-(v=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Y+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(Y+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ae(r=e[t],0,9,t),_=r),e.hasOwnProperty(t="POW_PRECISION")&&(ae(r=e[t],0,ne,t),E=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Y+t+" not an object: "+r);A=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Y+t+" invalid: "+r);T="0123456789"==r.slice(0,10),S=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:y,EXPONENTIAL_AT:[g,m],RANGE:[b,v],CRYPTO:w,MODULO_MODE:_,POW_PRECISION:E,FORMAT:A,ALPHABET:S}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-ne&&i<=ne&&i===K(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%Q)<1&&(t+=Q),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=X||r!==K(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(Y+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return x(arguments,h.lt)},O.minimum=O.min=function(){return x(arguments,h.gt)},O.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return K(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,u=[],c=new O(d);if(null==e?e=p:ae(e,0,ne),i=J(e/Q),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(u.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(Y+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(u.push(o%1e14),a+=7);a=i/7}if(!w)for(;a<i;)(o=s())<9e15&&(u[a++]=o%1e14);for(i=u[--a],e%=Q,i&&e&&(o=te[Q-e],u[a]=K(i/o)*o);0===u[a];u.pop(),a--);if(a<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=Q);for(a=1,o=u[0];o>=10;o/=10,a++);a<Q&&(n-=Q-a)}return c.e=n,c.c=u,c}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,c,l,f,h,d,g,m,b=n.indexOf("."),v=p,w=y;for(b>=0&&(f=E,E=0,n=n.replace(".",""),d=(m=new O(i)).pow(n.length-b),E=f,m.c=t(le(oe(d.c),d.e,"0"),10,o,e),m.e=m.c.length),l=f=(g=t(n,i,o,a?(u=S,e):(u=e,S))).length;0==g[--f];g.pop());if(!g[0])return u.charAt(0);if(b<0?--l:(d.c=g,d.e=l,d.s=s,g=(d=r(d,m,v,w,o)).c,h=d.r,l=d.e),b=g[c=l+v+1],f=o/2,h=h||c<0||null!=g[c+1],h=w<4?(null!=b||h)&&(0==w||w==(d.s<0?3:2)):b>f||b==f&&(4==w||h||6==w&&1&g[c-1]||w==(d.s<0?8:7)),c<1||!g[0])n=h?le(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(g.length=c,h)for(--o;++g[--c]>o;)g[c]=0,c||(++l,g=[1].concat(g));for(f=g.length;!g[--f];);for(b=0,n="";b<=f;n+=u.charAt(g[b++]));n=le(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,c=t%re,l=t/re|0;for(e=e.slice();u--;)a=((i=c*(o=e[u]%re)+(n=l*o+(s=e[u]/re|0)*c)%re*re+a)/r|0)+(n/re|0)+l*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var u,c,l,f,h,d,p,y,g,m,b,v,w,_,E,A,S,T=n.s==i.s?1:-1,N=n.c,x=i.c;if(!(N&&N[0]&&x&&x[0]))return new O(n.s&&i.s&&(N?!x||N[0]!=x[0]:x)?N&&0==N[0]||!x?0*T:T/0:NaN);for(g=(y=new O(T)).c=[],T=o+(c=n.e-i.e)+1,a||(a=X,c=ie(n.e/Q)-ie(i.e/Q),T=T/Q|0),l=0;x[l]==(N[l]||0);l++);if(x[l]>(N[l]||0)&&c--,T<0)g.push(1),f=!0;else{for(_=N.length,A=x.length,l=0,T+=2,(h=K(a/(x[0]+1)))>1&&(x=e(x,h,a),N=e(N,h,a),A=x.length,_=N.length),w=A,b=(m=N.slice(0,A)).length;b<A;m[b++]=0);S=x.slice(),S=[0].concat(S),E=x[0],x[1]>=a/2&&E++;do{if(h=0,(u=t(x,m,A,b))<0){if(v=m[0],A!=b&&(v=v*a+(m[1]||0)),(h=K(v/E))>1)for(h>=a&&(h=a-1),p=(d=e(x,h,a)).length,b=m.length;1==t(d,m,p,b);)h--,r(d,A<p?S:x,p,a),p=d.length,u=1;else 0==h&&(u=h=1),p=(d=x.slice()).length;if(p<b&&(d=[0].concat(d)),r(m,d,b,a),b=m.length,-1==u)for(;t(x,m,A,b)<1;)h++,r(m,A<b?S:x,b,a),b=m.length}else 0===u&&(h++,m=[0]);g[l++]=h,m[0]?m[b++]=N[w]||0:(m=[N[w]],b=1)}while((w++<_||null!=m[0])&&T--);f=null!=m[0],g[0]||g.splice(0,1)}if(a==X){for(l=1,T=g[0];T>=10;T/=10,l++);P(y,o+(y.e=l+c*Q-1)+1,s,f)}else y.e=c,y.r=+f;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(f,"");if(l.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(u,"$1").replace(c,"0.$1")),t!=o))return new O(o,i);if(O.DEBUG)throw Error(Y+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return se(this,new O(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,n,i,o=this;if(null!=e)return ae(e,0,ne),null==t?t=y:ae(t,0,8),P(new O(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-ie(this.e/Q))*Q,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},h.dividedBy=h.div=function(e,t){return r(this,new O(e,t),p,y)},h.dividedToIntegerBy=h.idiv=function(e,t){return r(this,new O(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,n,i,o,s,a,u,c,l=this;if((e=new O(e)).c&&!e.isInteger())throw Error(Y+"Exponent not an integer: "+R(e));if(null!=t&&(t=new O(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new O(Math.pow(+R(l),s?e.s*(2-ue(e)):+R(e))),t?c.mod(t):c;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return o=l.s<0&&ue(e)?-0:0,l.e>-1&&(o=1/o),new O(a?1/o:o);E&&(o=J(E/Q+2))}for(s?(r=new O(.5),a&&(e.s=1),u=ue(e)):u=(i=Math.abs(+R(e)))%2,c=new O(d);;){if(u){if(!(c=c.times(l)).c)break;o?c.c.length>o&&(c.c.length=o):n&&(c=c.mod(t))}if(i){if(0===(i=K(i/2)))break;u=i%2}else if(P(e=e.times(r),e.e+1,1),e.e>14)u=ue(e);else{if(0==(i=+R(e)))break;u=i%2}l=l.times(l),o?l.c&&l.c.length>o&&(l.c.length=o):n&&(l=l.mod(t))}return n?c:(a&&(c=d.div(c)),t?c.mod(t):o?P(c,E,y,void 0):c)},h.integerValue=function(e){var t=new O(this);return null==e?e=y:ae(e,0,8),P(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===se(this,new O(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return se(this,new O(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=se(this,new O(e,t)))||0===t},h.isInteger=function(){return!!this.c&&ie(this.e/Q)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return se(this,new O(e,t))<0},h.isLessThanOrEqualTo=h.lte=function(e,t){return-1===(t=se(this,new O(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new O(e,t)).s,!a||!t)return new O(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/Q,c=e.e/Q,l=s.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new O(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new O(l[0]?s:3==y?-0:0)}if(u=ie(u),c=ie(c),l=l.slice(),a=u-c){for((o=a<0)?(a=-a,i=l):(c=u,i=f),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){o=l[t]<f[t];break}if(o&&(i=l,l=f,f=i,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=X-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=X}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?B(e,l,c):(e.s=3==y?-1:1,e.c=[e.e=0],e)},h.modulo=h.mod=function(e,t){var n,i,o=this;return e=new O(e,t),!o.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||o.c&&!o.c[0]?new O(o):(9==_?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,_),(e=o.minus(n.times(e))).c[0]||1!=_||(e.s=o.s),e)},h.multipliedBy=h.times=function(e,t){var r,n,i,o,s,a,u,c,l,f,h,d,p,y,g,m=this,b=m.c,v=(e=new O(e,t)).c;if(!(b&&v&&b[0]&&v[0]))return!m.s||!e.s||b&&!b[0]&&!v||v&&!v[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=ie(m.e/Q)+ie(e.e/Q),e.s*=m.s,(u=b.length)<(f=v.length)&&(p=b,b=v,v=p,i=u,u=f,f=i),i=u+f,p=[];i--;p.push(0));for(y=X,g=re,i=f;--i>=0;){for(r=0,h=v[i]%g,d=v[i]/g|0,o=i+(s=u);o>i;)r=((c=h*(c=b[--s]%g)+(a=d*c+(l=b[s]/g|0)*h)%g*g+p[o]+r)/y|0)+(a/g|0)+d*l,p[o--]=c%y;p[o]=r}return r?++n:p.splice(0,1),B(e,p,n)},h.negated=function(){var e=new O(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new O(e,t)).s,!i||!t)return new O(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/Q,s=e.e/Q,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new O(i/0);if(!a[0]||!u[0])return u[0]?e:new O(a[0]?n:0*i)}if(o=ie(o),s=ie(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/X|0,a[t]=X===a[t]?0:a[t]%X;return i&&(a=[i].concat(a),++s),B(e,a,s)},h.precision=h.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return ae(e,1,ne),null==t?t=y:ae(t,0,8),P(new O(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*Q+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},h.shiftedBy=function(e){return ae(e,-9007199254740991,ee),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,c=s.e,l=p+4,f=new O("0.5");if(1!==u||!a||!a[0])return new O(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+R(s)))||u==1/0?(((t=oe(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=ie((c+1)/2)-(c<0||c%2),n=new O(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new O(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(s,o,l,1))),oe(o.c).slice(0,u)===(t=oe(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!i&&(P(o,o.e+p+2,0),o.times(o).eq(s))){n=o;break}l+=4,u+=4,i=1}return P(n,n.e+p+1,y,e)},h.toExponential=function(e,t){return null!=e&&(ae(e,0,ne),e++),N(this,e,t,1)},h.toFixed=function(e,t){return null!=e&&(ae(e,0,ne),e=e+this.e+1),N(this,e,t)},h.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=A;else if("object"!=typeof r)throw Error(Y+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",l=s[0],f=s[1],h=i.s<0,d=h?l.slice(1):l,p=d.length;if(u&&(o=a,a=u,u=o,p-=o),a>0&&p>0){for(o=p%a||a,l=d.substr(0,o);o<p;o+=a)l+=c+d.substr(o,a);u>0&&(l+=c+d.slice(o)),h&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},h.toFraction=function(e){var t,n,i,o,s,a,u,c,l,f,h,p,g=this,m=g.c;if(null!=e&&(!(u=new O(e)).isInteger()&&(u.c||1!==u.s)||u.lt(d)))throw Error(Y+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+R(u));if(!m)return new O(g);for(t=new O(d),l=n=new O(d),i=c=new O(d),p=oe(m),s=t.e=p.length-g.e-1,t.c[0]=te[(a=s%Q)<0?Q+a:a],e=!e||u.comparedTo(t)>0?s>0?t:l:u,a=v,v=1/0,u=new O(p),c.c[0]=0;f=r(u,t,0,1),1!=(o=n.plus(f.times(i))).comparedTo(e);)n=i,i=o,l=c.plus(f.times(o=l)),c=o,t=u.minus(f.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),c=c.plus(o.times(l)),n=n.plus(o.times(i)),c.s=l.s=g.s,h=r(l,i,s*=2,y).minus(g).abs().comparedTo(r(c,n,s,y).minus(g).abs())<1?[l,i]:[c,n],v=a,h},h.toNumber=function(){return+R(this)},h.toPrecision=function(e,t){return null!=e&&ae(e,1,ne),N(this,e,t,2)},h.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=g||o>=m?ce(oe(r.c),o):le(oe(r.c),o,"0"):10===e&&T?t=le(oe((r=P(new O(r),p+o+1,y)).c),r.e,"0"):(ae(e,2,S.length,"Base"),t=n(le(oe(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return R(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&O.set(t),O}(),r(7160),r(6635),r(8834).Buffer;class de extends c{constructor(e){let{config:r={},state:n={}}=e;super(),t(this,"defaultConfig",{}),t(this,"defaultState",{}),t(this,"disabled",!1),t(this,"name","BaseController"),t(this,"initialConfig",void 0),t(this,"initialState",void 0),t(this,"internalConfig",this.defaultConfig),t(this,"internalState",this.defaultState),this.initialState=n,this.initialConfig=r}get config(){return this.internalConfig}get state(){return this.internalState}configure(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2&&void 0!==arguments[2]&&!arguments[2])for(const t in e)void 0!==this.internalConfig[t]&&(this.internalConfig[t]=e[t],this[t]=e[t]);else{this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e in this.internalConfig)void 0!==this.internalConfig[e]&&(this[e]=this.internalConfig[e])}}update(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.internalState=he(t?{}:he({},this.internalState),e),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const pe=()=>!0,ye=["newListener","removeListener"],ge=e=>!ye.includes(e);function me(e,t){let r=(t||{}).eventFilter||pe;if("string"==typeof r&&"skipInternal"===r&&(r=ge),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=e,i=e=>{const t=n;n=e,t.eventNames().filter(r).forEach((r=>{(function(e,t){return void 0!==e.rawListeners?e.rawListeners(t):e.listeners(t)})(t,r).forEach((t=>e.on(r,t)))})),t.removeAllListeners()};return new Proxy({},{get:(e,t)=>"setTarget"===t?i:n[t],set:(e,t,r)=>"setTarget"===t?(i=r,!0):(n[t]=r,!0)})}const be=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function ve(e){switch(e.status){case 405:throw a.PY.methodNotFound();case 418:throw a.PY.internal({message:"Request is being rate limited."});case 503:case 504:throw a.PY.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function we(e){return new Promise((t=>{setTimeout(t,e)}))}function _e(e,t){if(200!==e.status)throw a.PY.internal({message:`Non-200 status code: '${e.status}'`,data:t});if(t.error)throw a.PY.internal({data:t.error});return t.result}var Ee;!function(e){e.approved="approved",e.cancelled="cancelled",e.confirmed="confirmed",e.failed="failed",e.finalized="finalized",e.processed="processed",e.rejected="rejected",e.signed="signed",e.submitted="submitted",e.unapproved="unapproved",e.dropped="dropped",e.expired="expired"}(Ee||(Ee={}));var Ae=r(8094),Se=r(3349),Te=r.n(Se);function Oe(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 Ne(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Oe(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class xe extends de{constructor(e){let{config:r,state:n}=e;if(super({config:r,state:n}),t(this,"_providerEngineProxy",null),!r.chainConfig)throw B.invalidProviderConfigError("Please provide chainConfig");if(!r.chainConfig.chainId)throw B.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!r.chainConfig.rpcTarget)throw B.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:r.chainConfig,networks:{[r.chainConfig.chainId]:r.chainConfig}},super.initialize()}get currentChainConfig(){return this.config.chainConfig}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){if(!e.chainId)throw Ae.Sy.rpc.invalidParams("chainId is required");if(!e.rpcTarget)throw Ae.Sy.rpc.invalidParams("chainId is required");this.configure({networks:Ne(Ne({},this.config.networks),{},{[e.chainId]:e})})}getChainConfig(e){var t;const r=null===(t=this.config.networks)||void 0===t?void 0:t[e];if(!r)throw Ae.Sy.rpc.invalidRequest(`Chain ${e} is not supported, please add chainConfig for it`);return r}getProviderEngineProxy(){return this._providerEngineProxy}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=me(e)}}function Be(e){return(t,r,n,i)=>"chainId"===t.method?(r.result=e,i()):n()}function Pe(e){return(t,r,n,i)=>"provider_config"===t.method?(r.result=e,i()):n()}function Re(e){const{chainId:t,rpcTarget:r}=e,n=function(e){let{rpcTarget:t,originHttpHeaderKey:r}=e;return f((async(e,n,i)=>{const{fetchUrl:o,fetchParams:s}=function(e){let{req:t,rpcTarget:r,originHttpHeaderKey:n}=e;const i=new URL(r),o={id:t.id,jsonrpc:t.jsonrpc,method:t.method,params:t.params},s=t.origin,a={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)};return n&&s&&(a.headers[n]=s),{fetchUrl:i.href,fetchParams:a}}({req:e,rpcTarget:t,originHttpHeaderKey:r});for(let e=0;e<5;e++){try{const e=await fetch(o,s);ve(e);const t=await e.json(),r=_e(e,t);return void(n.result=r)}catch(e){const t=e.toString();if(!be.some((e=>t.includes(e))))throw e}await we(1e3)}}))}({rpcTarget:r});return{networkMiddleware:function(e){const t=new p;return e.forEach((e=>t.push(e))),t.asMiddleware()}([Be(t),Pe(e),n]),fetchMiddleware:n}}class Ie extends xe{constructor(e){let{config:t,state:r}=e;super({config:t,state:r})}async setupProvider(){const{networkMiddleware:e}=Re(this.config.chainConfig),t=new p;t.push(e);const r=y(t);this.updateProviderEngineProxy(r)}async switchChain(e){if(!this._providerEngineProxy)throw Ae.Sy.provider.custom({message:"Provider is not initialized",code:4902});const t=this.getChainConfig(e.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:t}),await this.setupProvider()}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=me(e)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}function Ce(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 Le(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ce(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(Ie,"getProviderInstance",(async e=>{const t=new Ie({config:{chainConfig:e.chainConfig}});return await t.setupProvider(),t}));class je extends xe{constructor(e){let{config:r,state:n}=e;super({config:{chainConfig:Le(Le({},r.chainConfig),{},{chainNamespace:T.OTHER})},state:n}),t(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){throw new Error("Method not implemented.")}async setupProvider(e){const t=this.getPrivKeyMiddleware(e),r=new p;r.push(t);const n=y(r);this.updateProviderEngineProxy(n)}async switchChain(e){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}async lookupNetwork(){return Promise.resolve("")}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=me(e)}getPrivKeyMiddleware(e){const t={getPrivatekey:async()=>e};return this.createPrivKeyMiddleware(t)}createPrivKeyMiddleware(e){let{getPrivatekey:t}=e;return r={private_key:f((async function(e,r){r.result=await t()}))},(e,t,n,i)=>{const o=r[e.method];return void 0===o?n():"function"==typeof o?o(e,t,n,i):(t.result=o,i())};var r}}function ke(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 Me(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ke(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(je,"getProviderInstance",(async e=>{const t=new je({config:{chainConfig:e.chainConfig}});return await t.setupProvider(e.privKey),t})),Te()();const Ue="Web3Auth-cachedAdapter";class Fe extends c{constructor(e){var r,n,i,o;if(super(),t(this,"coreOptions",void 0),t(this,"connectedAdapterName",null),t(this,"status",D.NOT_READY),t(this,"cachedAdapter",null),t(this,"walletAdapters",{}),t(this,"commonJRPCProvider",null),t(this,"plugins",{}),t(this,"storage","localStorage"),!e.clientId)throw B.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?$.enableAll():$.setLevel("error"),null===(r=e.chainConfig)||void 0===r||!r.chainNamespace||!Object.values(T).includes(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace))throw B.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===e.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=V(this.storage)?window[this.storage].getItem(Ue):null,this.coreOptions=Me(Me({},e),{},{chainConfig:Me(Me({},N(null===(i=e.chainConfig)||void 0===i?void 0:i.chainNamespace,null===(o=e.chainConfig)||void 0===o?void 0:o.chainId)||{}),e.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==D.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider.provider:null}set provider(e){throw new Error("Not implemented")}async init(){this.commonJRPCProvider=await Ie.getProviderInstance({chainConfig:this.coreOptions.chainConfig});const e=Object.keys(this.walletAdapters).map((e=>{if(this.subscribeToAdapterEvents(this.walletAdapters[e]),this.walletAdapters[e].chainConfigProxy)this.walletAdapters[e].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw B.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[e].setAdapterSettings({chainConfig:t,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}return this.walletAdapters[e].init({autoConnect:this.cachedAdapter===e}).catch((e=>$.error(e)))}));this.status=D.READY,await Promise.all(e)}configureAdapter(e){this.checkInitRequirements();const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw B.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw B.duplicateAdapterError(`Wallet adapter for ${e.name} already exists`);if(e.adapterNamespace!==O&&e.adapterNamespace!==t.chainNamespace)throw B.incompatibleChainNameSpace(`This wallet adapter belongs to ${e.adapterNamespace} which is incompatible with currently used namespace: ${t.chainNamespace}`);if(e.name===M.WALLET_CONNECT_V2&&this.walletAdapters[M.WALLET_CONNECT_V1])throw B.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v1 is already added to adapter lists.");if(e.name===M.WALLET_CONNECT_V1&&this.walletAdapters[M.WALLET_CONNECT_V2])throw B.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v2 is already added to adapter lists.");return e.adapterNamespace===O&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setAdapterSettings({chainConfig:t}),this.walletAdapters[e.name]=e,this}clearCache(){V(this.storage)&&(window[this.storage].removeItem(Ue),this.cachedAdapter=null)}async addChain(e){if(this.status===D.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(e);throw B.notReady("No wallet is ready")}async switchChain(e){if(this.status===D.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(e);throw B.notReady("No wallet is ready")}async connectTo(e,t){if(!this.walletAdapters[e]||!this.commonJRPCProvider)throw B.notFound(`Please add wallet adapter for ${e} wallet, before connecting`);const r=await this.walletAdapters[e].connect(t);return this.commonJRPCProvider.updateProviderEngineProxy(r),this.provider}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cleanup:!1};if(this.status!==D.CONNECTED||!this.connectedAdapterName)throw P.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(e)}async getUserInfo(){if($.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==D.CONNECTED||!this.connectedAdapterName)throw P.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async authenticateUser(){if(this.status!==D.CONNECTED||!this.connectedAdapterName)throw P.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}async addPlugin(e){if(this.plugins[e.name])throw new Error(`Plugin ${e.name} already exist`);if(e.pluginNamespace!==G.MULTICHAIN&&e.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw new Error(`This plugin belongs to ${e.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[e.name]=e,this}subscribeToAdapterEvents(e){e.on(z.CONNECTED,(async e=>{if(!this.commonJRPCProvider)throw B.notFound("CommonJrpcProvider not found");const{provider:t}=this.walletAdapters[e.adapter];this.commonJRPCProvider.updateProviderEngineProxy(t),this.status=D.CONNECTED,this.connectedAdapterName=e.adapter,this.cacheWallet(e.adapter),$.debug("connected",this.status,this.connectedAdapterName),Object.values(this.plugins).map((async t=>{try{if(!t.SUPPORTED_ADAPTERS.includes(e.adapter))return;await t.initWithWeb3Auth(this),await t.connect()}catch(e){if(5211===e.code)return;$.error(e)}})),this.emit(z.CONNECTED,Me({},e))})),e.on(z.DISCONNECTED,(async e=>{if(this.status=D.READY,V(this.storage)){const e=window[this.storage].getItem(Ue);this.connectedAdapterName===e&&this.clearCache()}$.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((e=>e.disconnect().catch((e=>{5211!==e.code&&$.error(e)}))))),this.connectedAdapterName=null,this.emit(z.DISCONNECTED,e)})),e.on(z.CONNECTING,(e=>{this.status=D.CONNECTING,this.emit(z.CONNECTING,e),$.debug("connecting",this.status,this.connectedAdapterName)})),e.on(z.ERRORED,(e=>{this.status=D.ERRORED,this.clearCache(),this.emit(z.ERRORED,e),$.debug("errored",this.status,this.connectedAdapterName)})),e.on(z.ADAPTER_DATA_UPDATED,(e=>{$.debug("adapter data updated",e),this.emit(z.ADAPTER_DATA_UPDATED,e)})),e.on(z.CACHE_CLEAR,(e=>{$.debug("adapter cache clear",e),V(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===D.CONNECTING)throw B.notReady("Already pending connection");if(this.status===D.CONNECTED)throw B.notReady("Already connected");if(this.status===D.READY)throw B.notReady("Adapter is already initialized")}cacheWallet(e){V(this.storage)&&(window[this.storage].setItem(Ue,e),this.cachedAdapter=e)}}})(),n})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NoModal=t():e.NoModal=t()}(self,(()=>(()=>{var e={7256:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let o=0;o<e.length;o++){const i=r(e[o]);t.push(i),n+=i.length}return d(i(n,192),...t)}const t=g(e);return 1===t.length&&t[0]<128?t:d(i(t.length,128),t)}function n(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function o(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(c(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const r=p(e),n=p(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(g(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,i,s,u;const c=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):n(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=o(n(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=n(e,r,t+r),{data:i,remainder:e.slice(t+r)}}if(l<=247){for(t=l-191,s=n(e,1,t);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:e.slice(t)}}{if(r=l-246,t=o(n(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const i=r+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,i);s.length;)u=a(s),c.push(u.data),s=u.remainder;return{data:c,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function c(e){let t="";for(let r=0;r<e.length;r++)t+=u[e[r]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function f(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r;t[r]=l(e.slice(n,n+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}function h(e){return(new TextEncoder).encode(e)}function p(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function y(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?f((t="string"!=typeof(r=e)?r:y(r)?r.slice(2):r).length%2?`0${t}`:t):h(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(p(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:c,concatBytes:d,hexToBytes:f,utf8ToBytes:h},t.RLP={encode:r,decode:s}},4706:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const o=r(7256),i=r(1115),s=r(101),a=r(144),u=r(4916),c=r(8127),l=r(8707),f=r(4243),d=BigInt(0);class h{constructor(e=d,t=d,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:o}=e;return new h(void 0!==t?(0,u.bufferToBigInt)((0,u.toBuffer)(t)):void 0,void 0!==r?(0,u.bufferToBigInt)((0,u.toBuffer)(r)):void 0,void 0!==n?(0,u.toBuffer)(n):void 0,void 0!==o?(0,u.toBuffer)(o):void 0)}static fromRlpSerializedAccount(e){const t=(0,u.arrToBufArr)(o.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,o]=e;return new h((0,u.bufferToBigInt)(t),(0,u.bufferToBigInt)(r),n,o)}_validate(){if(this.nonce<d)throw new Error("nonce must be greater than zero");if(this.balance<d)throw new Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw new Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw new Error("codeHash must have a length of 32")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return n.from(o.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(c.KECCAK256_NULL)}isEmpty(){return this.balance===d&&this.nonce===d&&this.codeHash.equals(c.KECCAK256_NULL)}}function p(e){const[t,r,n,o]=e;return[t,r,0===(0,u.arrToBufArr)(n).length?c.KECCAK256_RLP:n,0===(0,u.arrToBufArr)(o).length?c.KECCAK256_NULL:o]}t.Account=h,t.isValidAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,l.assertIsHexString)(e);const r=(0,f.stripHexPrefix)(e).toLowerCase();let o="";void 0!==t&&(o=(0,u.bufferToBigInt)((0,u.toBuffer)(t)).toString()+"0x");const s=n.from(o+r,"utf8"),c=(0,a.bytesToHex)((0,i.keccak256)(s));let d="0x";for(let e=0;e<r.length;e++)parseInt(c[e],16)>=8?d+=r[e].toUpperCase():d+=r[e];return d},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,u.bufferToBigInt)(t)===BigInt(0)?n.from((0,i.keccak256)(o.RLP.encode((0,u.bufArrToArr)([e,null])))).slice(-20):n.from((0,i.keccak256)(o.RLP.encode((0,u.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,l.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const o=(0,i.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,i.keccak256)(r)]));return(0,u.toBuffer)(o).slice(-20)},t.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,l.assertIsBuffer)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,l.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return n.from((0,i.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,l.assertIsBuffer)(e),n.from(s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,l.assertIsBuffer)(e),64!==e.length&&(e=n.from(s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,u.zeros)(20);return(0,u.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=p;const y=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,o]=e;return[t,r,(0,u.arrToBufArr)(n).equals(c.KECCAK256_RLP)?y:n,(0,u.arrToBufArr)(o).equals(c.KECCAK256_NULL)?y:o]},t.accountBodyToRLP=function(e,t=!0){const r=t?p(e):e;return(0,u.arrToBufArr)(o.RLP.encode(r))}},8515:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const o=r(4706),i=r(4916);class s{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new s((0,i.zeros)(20))}static fromString(e){if(!(0,o.isValidAddress)(e))throw new Error("Invalid address");return new s((0,i.toBuffer)(e))}static fromPublicKey(e){if(!n.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,o.pubToAddress)(e);return new s(t)}static fromPrivateKey(e){if(!n.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,o.privateToAddress)(e);return new s(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new s((0,o.generateAddress)(e.buf,(0,i.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!n.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!n.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new s((0,o.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(s.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return n.from(this.buf)}}t.Address=s},8263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(2699);class o extends n.EventEmitter{emit(e,...t){let[r,n]=t;const o=this;let i=o._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),i=Array.isArray(i)?i:[i],async function(e,t,r){let n;for await(const o of t)try{o.length<2?o.call(e,r):await new Promise(((t,n)=>{o.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(o,i.slice(),r).then(n).catch(n),o.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(o,i){r.removeListener(e,n),t(o,i)}:function(o){r.removeListener(e,n),t(o,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let o,i,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),i=s.length,o=s.length;o--;)if(s[o]===t){i=o+a;break}return s.splice(i,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=o},4916:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const o=r(8707),i=r(4243);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return n.from((0,i.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};const s=function(e,r,n){const o=(0,t.zeros)(r);return n?e.length<r?(e.copy(o),o):e.slice(0,r):e.length<r?(e.copy(o,r-e.length),o):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,o.assertIsBuffer)(e),s(e,t,!1)},t.setLengthRight=function(e,t){return(0,o.assertIsBuffer)(e),s(e,t,!0)};const a=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function u(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,o.assertIsBuffer)(e),a(e)},t.unpadArray=function(e){return(0,o.assertIsArray)(e),a(e)},t.unpadHexString=function(e){return(0,o.assertIsHexString)(e),e=(0,i.stripHexPrefix)(e),"0x"+a(e)},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e))return n.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,i.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return n.from((0,i.padToEven)((0,i.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),n.from(t,"hex")}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw new Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=u,t.bigIntToBuffer=c,t.bufferToInt=function(e){const t=Number(u(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,u(e))},t.toUnsigned=function(e){return c(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e||(0,i.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){const r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,i.stripHexPrefix)(e)).length%2!=0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){const r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},8127:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8834),o=r(101);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=o.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=o.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},3244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n<e.length;r+=1,n+=2)t[r]=e[n]<<4|e[n+1]},t.nibblesToCompactBytes=e=>{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1==(1&e.length)&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t<e.length;t++){const n=e[t];r[2*t]=n/16,r[2*t+1]=n%16}return r[t-1]=16,r},t.compactBytesToNibbles=e=>{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},8707:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const o=r(4243);t.assertIsHexString=function(e){if(!(0,o.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!n.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},5372:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,o(r(8127),t),o(r(3895),t),o(r(4706),t),o(r(8515),t),o(r(2868),t),o(r(2074),t),o(r(4916),t),o(r(2103),t),o(r(3244),t),o(r(8263),t);var i=r(4243);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),o(r(6065),t),o(r(6831),t)},4243:(e,t,r)=>{"use strict";var n=r(8834).Buffer;function o(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function i(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=o,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return o(e)?e.slice(2):e},t.padToEven=i,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t},t.fromUtf8=function(e){return`0x${i(n.from(e,"utf8").toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const n=[];for(let o=0;o<e.length;o++){let i=e[o][t];if(!0!==r||i){if("string"!=typeof i)throw new Error("invalid abi - expected type 'string', received "+typeof i)}else i="";n.push(i)}return n},t.isHexString=function(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||void 0!==t&&t>0&&e.length!==2+2*t)}},6065:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},6831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(2973);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2074:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const o=r(1115),i=r(101),s=r(4916),a=r(8127),u=r(8707);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const o=i.secp256k1.sign(e,t),s=o.toCompactRawBytes();return{r:n.from(s.slice(0,32)),s:n.from(s.slice(32,64)),v:void 0===r?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,o,a){const u=n.concat([(0,s.setLengthLeft)(r,32),(0,s.setLengthLeft)(o,32)],64),f=c(t,a);if(!l(f))throw new Error("Invalid signature v value");const d=i.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return n.from(d.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,o){if(!l(c(e,o)))throw new Error("Invalid signature v value");return(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(r,32),(0,s.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,o){if(!l(c(e,o)))throw new Error("Invalid signature v value");let i=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(i=n.from(r),i[0]|=128),(0,s.bufferToHex)(n.concat([(0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(i,32)]))},t.fromRpcSig=function(e){const t=(0,s.toBuffer)(e);let r,n,o;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),o=(0,s.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),o=BigInt((0,s.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return o<27&&(o+=BigInt(27)),{v:o,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,o){if(32!==t.length||32!==r.length)return!1;if(!l(c(e,o)))return!1;const i=(0,s.bufferToBigInt)(t),u=(0,s.bufferToBigInt)(r);return!(i===BigInt(0)||i>=a.SECP256K1_ORDER||u===BigInt(0)||u>=a.SECP256K1_ORDER||n&&u>=a.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,u.assertIsBuffer)(e);const t=n.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return n.from((0,o.keccak256)(n.concat([t,e])))}},2103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(4916),o=r(4243);var i;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case i.Buffer:return r;case i.BigInt:return(0,n.bufferToBigInt)(r);case i.Number:{const e=(0,n.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case i.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},3895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},2868:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const o=r(8515),i=r(4916),s=r(2103);class a{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:n,amount:i}=e,u=(0,s.toType)(t,s.TypeOutput.BigInt),c=(0,s.toType)(r,s.TypeOutput.BigInt),l=new o.Address((0,s.toType)(n,s.TypeOutput.Buffer)),f=(0,s.toType)(i,s.TypeOutput.BigInt);return new a(u,c,l,f)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,o]=e;return a.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:o})}static toBufferArray(e){const{index:t,validatorIndex:r,address:i,amount:a}=e,u=(0,s.toType)(t,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(t,s.TypeOutput.Buffer),c=(0,s.toType)(r,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(r,s.TypeOutput.Buffer);let l;return l=i instanceof o.Address?i.buf:(0,s.toType)(i,s.TypeOutput.Buffer),[u,c,l,(0,s.toType)(a,s.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,s.toType)(a,s.TypeOutput.Buffer)]}raw(){return a.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,i.bigIntToHex)(this.amount)}}}t.Withdrawal=a},8856:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.JsonRpcError=void 0;const o=r(5554),i=n(r(7847)),s=r(7962);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,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,o.isPlainObject)(this.data)&&(e.data.cause=(0,s.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,i.default)(this.serialize(),u,2)}}function u(e,t){if("[Circular]"!==t)return t}t.JsonRpcError=a,t.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)}}},5191:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.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}},t.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."}}},6748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerErrors=t.rpcErrors=void 0;const n=r(8856),o=r(5191),i=r(7962);function s(e,t){const[r,o]=u(t);return new n.JsonRpcError(e,r??(0,i.getMessageFromCode)(e),o)}function a(e,t){const[r,o]=u(t);return new n.EthereumProviderError(e,r??(0,i.getMessageFromCode)(e),o)}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??void 0,r]}}return[]}t.rpcErrors={parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.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 s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},t.providerErrors={userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.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:o}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,o)}}},774:(e,t,r)=>{"use strict";t.PY=t.Xy=void 0;r(8856);var n=r(7962);Object.defineProperty(t,"Xy",{enumerable:!0,get:function(){return n.serializeError}});var o=r(6748);Object.defineProperty(t,"PY",{enumerable:!0,get:function(){return o.rpcErrors}});r(5191)},7962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCause=t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(5554),o=r(5191),i=o.errorCodes.rpc.internal,s={code:i,message:a(i)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(u(e)){const r=e.toString();if((0,n.hasProperty)(o.errorValues,r))return o.errorValues[r].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}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 o=e[r];return(0,n.isValidJson)(o)&&(t[r]=o),t}),{})}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=u,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const o=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;return{...t,data:{cause:c(e)}}}(e,t);return r||delete o.stack,o},t.serializeCause=c},2875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const n=r(6686);function o(e,t){return r=e,Boolean("string"==typeof(null===(o=null===(n=null==r?void 0:r.prototype)||void 0===n?void 0:n.constructor)||void 0===o?void 0:o.name))?new e({message:t}):e({message:t});var r,n,o}class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=i,t.assert=function(e,t="Assertion failed.",r=i){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",s=i){try{(0,n.assert)(e,t)}catch(e){throw o(s,`${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)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},7552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const n=r(6686),o=r(2875);t.base64=(e,t={})=>{var r,i;const s=null!==(r=t.paddingRequired)&&void 0!==r&&r,a=null!==(i=t.characterSet)&&void 0!==i?i:"base64";let u,c;return"base64"===a?u=String.raw`[A-Za-z0-9+\/]`:((0,o.assert)("base64url"===a),u=String.raw`[-_A-Za-z0-9]`),c=s?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)}},638:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const o=r(2875),i=r(7657),s=48,a=58,u=87,c=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 l(e){return e instanceof Uint8Array}function f(e){(0,o.assert)(l(e),"Value must be a Uint8Array.")}function d(e){if(f(e),0===e.length)return"0x";const t=c(),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 h(e){f(e);const t=d(e);return BigInt(t)}function p(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}`,o=new Uint8Array(n.length/2);for(let e=0;e<o.length;e++){const t=n.charCodeAt(2*e),r=n.charCodeAt(2*e+1),i=t-(t<a?s:u),c=r-(r<a?s:u);o[e]=16*i+c}return o}function y(e){return(0,o.assert)("bigint"==typeof e,"Value must be a bigint."),(0,o.assert)(e>=BigInt(0),"Value must be a non-negative bigint."),p(e.toString(16))}function g(e){return(0,o.assert)("number"==typeof e,"Value must be a number."),(0,o.assert)(e>=0,"Value must be a non-negative number."),(0,o.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),p(e.toString(16))}function b(e){return(0,o.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function m(e){if("bigint"==typeof e)return y(e);if("number"==typeof e)return g(e);if("string"==typeof e)return e.startsWith("0x")?p(e):b(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=l,t.assertIsBytes=f,t.bytesToHex=d,t.bytesToBigInt=h,t.bytesToSignedBigInt=function(e){f(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){f(e);const t=h(e);return(0,o.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return f(e),(new TextDecoder).decode(e)},t.hexToBytes=p,t.bigIntToBytes=y,t.signedBigIntToBytes=function(e,t){(0,o.assert)("bigint"==typeof e,"Value must be a bigint."),(0,o.assert)("number"==typeof t,"Byte length must be a number."),(0,o.assert)(t>0,"Byte length must be greater than 0."),(0,o.assert)(function(e,t){(0,o.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 n=new Uint8Array(t);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},t.numberToBytes=g,t.stringToBytes=b,t.valueToBytes=m,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const o=m(e[n]);t[n]=o,r+=o.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},t.createDataView=function(e){if(void 0!==n&&e instanceof n){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},2793:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const n=r(6686),o=r(7552);t.ChecksumStruct=(0,n.size)((0,o.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},5740:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const n=r(6686),o=r(2875),i=r(638),s=r(7657),a=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),s.StrictHexStruct]),u=(0,n.coerce)((0,n.number)(),a,Number),c=(0,n.coerce)((0,n.bigint)(),a,BigInt),l=((0,n.union)([s.StrictHexStruct,(0,n.instance)(Uint8Array)]),(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([s.StrictHexStruct]),i.hexToBytes)),f=(0,n.coerce)(s.StrictHexStruct,(0,n.instance)(Uint8Array),i.bytesToHex);t.createNumber=function(e){try{const t=(0,n.create)(e,u);return(0,o.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}},t.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}},t.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}},t.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}}},6618:function(e,t){"use strict";var r,n,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},i=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(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class s{constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}get size(){return i(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,"f")[Symbol.iterator]()}entries(){return i(this,r,"f").entries()}forEach(e,t){return i(this,r,"f").forEach(((r,n,o)=>e.call(t,r,n,this)))}get(e){return i(this,r,"f").get(e)}has(e){return i(this,r,"f").has(e)}keys(){return i(this,r,"f").keys()}values(){return i(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}t.FrozenMap=s;class a{constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}get size(){return i(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,"f")[Symbol.iterator]()}entries(){return i(this,n,"f").entries()}forEach(e,t){return i(this,n,"f").forEach(((r,n,o)=>e.call(t,r,n,this)))}has(e){return i(this,n,"f").has(e)}keys(){return i(this,n,"f").keys()}values(){return i(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}t.FrozenSet=a,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype)},4559:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const n=r(6686),o=r(2875);function i(e){return(0,n.is)(e,t.HexStruct)}function s(e){return(0,n.is)(e,t.StrictHexStruct)}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=i,t.isStrictHexString=s,t.assertIsHexString=function(e){(0,o.assert)(i(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,o.assert)(s(e),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=function(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}},5554:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=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(t,"__esModule",{value:!0}),o(r(2875),t),o(r(7552),t),o(r(638),t),o(r(2793),t),o(r(5740),t),o(r(6618),t),o(r(4559),t),o(r(7657),t),o(r(9545),t),o(r(8183),t),o(r(3621),t),o(r(758),t),o(r(4030),t),o(r(368),t),o(r(2968),t),o(r(7717),t),o(r(3191),t)},9545:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=void 0;const n=r(6686),o=r(2875);t.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)((()=>t.UnsafeJsonStruct))),(0,n.record)((0,n.string)(),(0,n.lazy)((()=>t.UnsafeJsonStruct)))]),t.JsonStruct=(0,n.define)("Json",((e,r)=>{function n(e,t){const n=[...t.validator(e,r)];return!(n.length>0)||n}try{const r=n(e,t.UnsafeJsonStruct);return!0!==r?r:n(JSON.parse(JSON.stringify(e)),t.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}})),t.isValidJson=function(e){return(0,n.is)(e,t.JsonStruct)},t.getJsonSize=function(e){(0,o.assertStruct)(e,t.JsonStruct,"Invalid JSON value");const r=JSON.stringify(e);return(new TextEncoder).encode(r).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,n.object)({code:(0,n.integer)(),message:(0,n.string)(),data:(0,n.optional)(t.JsonStruct),stack:(0,n.optional)((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.optional)((0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,n.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,o.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,o.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,o.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,o.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,o.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,o.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,o.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.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)}},8183:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3621:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const o=(0,n(r(5130)).default)("metamask");t.createProjectLogger=function(e){return o.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},758:(e,t)=>{"use strict";function r(e){return e.charCodeAt(0)<=127}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),(n=t.JsonSize||(t.JsonSize={}))[n.Null=4]="Null",n[n.Comma=1]="Comma",n[n.Wrapper=1]="Wrapper",n[n.True=4]="True",n[n.False=5]="False",n[n.Quote=1]="Quote",n[n.Colon=1]="Colon",n[n.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.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}},t.isASCII=r,t.calculateStringSize=function(e){var n;return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(null!==(n=e.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==n?n:[]).length},t.calculateNumberSize=function(e){return e.toString().length}},4030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const n=r(2875),o=r(7657);t.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,o.add0x)(e.toString(16))),t.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,o.add0x)(e.toString(16))),t.hexToNumber=e=>{(0,o.assertIsHexString)(e);const t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>((0,o.assertIsHexString)(e),BigInt((0,o.add0x)(e)))},368:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2968:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";const n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},7717:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const n=r(7699),o=r(6686),i=r(2875);t.VersionStruct=(0,o.refine)((0,o.string)(),"Version",(e=>null!==(0,n.valid)(e)||`Expected SemVer version, got "${e}"`)),t.VersionRangeStruct=(0,o.refine)((0,o.string)(),"Version range",(e=>null!==(0,n.validRange)(e)||`Expected SemVer range, got "${e}"`)),t.isValidSemVerVersion=function(e){return(0,o.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,o.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,i.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,i.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,n.gt)(e,t)},t.gtRange=function(e,t){return(0,n.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,n.satisfies)(e,t,{includePrerelease:!0})}},2349:(e,t,r)=>{"use strict";const{AbortError:n,codes:o}=r(2415),{isNodeStream:i,isWebStream:s,kControllerErrorFunction:a}=r(6140),u=r(3803),{ERR_INVALID_ARG_TYPE:c}=o;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new c("signal","AbortSignal",e)})(t),!i(r)&&!s(r))throw new c("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const r=i(t)?()=>{t.destroy(new n(void 0,{cause:e.reason}))}:()=>{t[a](new n(void 0,{cause:e.reason}))};return e.aborted?r():(e.addEventListener("abort",r),u(t,(()=>e.removeEventListener("abort",r)))),t}},4250:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:o,TypedArrayPrototypeSet:i,Uint8Array:s}=r(5439),{Buffer:a}=r(8834),{inspect:u}=r(9928);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return a.alloc(0);const t=a.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)i(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(e<r.length){const t=r.slice(0,e);return this.head.data=r.slice(e),t}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[o](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let t="",r=this.head,o=0;do{const i=r.data;if(!(e>i.length)){e===i.length?(t+=i,++o,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(i,0,e),this.head=r,r.data=n(i,e));break}t+=i,e-=i.length,++o}while(null!==(r=r.next));return this.length-=o,t}_getBuffer(e){const t=a.allocUnsafe(e),r=e;let n=this.head,o=0;do{const a=n.data;if(!(e>a.length)){e===a.length?(i(t,a,r-e),++o,n.next?this.head=n.next:this.head=this.tail=null):(i(t,new s(a.buffer,a.byteOffset,e),r-e),this.head=n,n.data=a.slice(e));break}i(t,a,r-e),e-=a.length,++o}while(null!==(n=n.next));return this.length-=o,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return u(this,{...t,depth:0,customInspect:!1})}}},5291:(e,t,r)=>{"use strict";const{pipeline:n}=r(7253),o=r(8637),{destroyer:i}=r(4664),{isNodeStream:s,isReadable:a,isWritable:u,isWebStream:c,isTransformStream:l,isWritableStream:f,isReadableStream:d}=r(6140),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:p,ERR_MISSING_ARGS:y}}=r(2415),g=r(3803);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return o.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=o.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=o.from(e[t])}for(let r=0;r<e.length;++r)if(s(e[r])||c(e[r])){if(r<e.length-1&&!(a(e[r])||d(e[r])||l(e[r])))throw new p(`streams[${r}]`,t[r],"must be readable");if(r>0&&!(u(e[r])||f(e[r])||l(e[r])))throw new p(`streams[${r}]`,t[r],"must be writable")}let r,b,m,v,w;const E=e[0],_=n(e,(function(e){const t=v;v=null,t?t(e):e?w.destroy(e):A||S||w.destroy()})),S=!!(u(E)||f(E)||l(E)),A=!!(a(_)||d(_)||l(_));if(w=new o({writableObjectMode:!(null==E||!E.writableObjectMode),readableObjectMode:!(null==_||!_.writableObjectMode),writable:S,readable:A}),S){if(s(E))w._write=function(e,t,n){E.write(e,t)?n():r=n},w._final=function(e){E.end(),b=e},E.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(c(E)){const e=(l(E)?E.writable:E).getWriter();w._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},w._final=async function(t){try{await e.ready,e.close().catch((()=>{})),b=t}catch(e){t(e)}}}const e=l(_)?_.readable:_;g(e,(()=>{if(b){const e=b;b=null,e()}}))}if(A)if(s(_))_.on("readable",(function(){if(m){const e=m;m=null,e()}})),_.on("end",(function(){w.push(null)})),w._read=function(){for(;;){const e=_.read();if(null===e)return void(m=w._read);if(!w.push(e))return}};else if(c(_)){const e=(l(_)?_.readable:_).getReader();w._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!w.push(t))return;if(r)return void w.push(null)}catch{return}}}return w._destroy=function(e,t){e||null===v||(e=new h),m=null,r=null,b=null,null===v?t(e):(v=t,s(_)&&i(_,e))},w}},4664:(e,t,r)=>{"use strict";const n=r(4406),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:i},AbortError:s}=r(2415),{Symbol:a}=r(5439),{kDestroyed:u,isDestroyed:c,isFinished:l,isServerRequest:f}=r(6140),d=a("kDestroy"),h=a("kConstruct");function p(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let o=!1;function i(t){if(o)return;o=!0;const i=e._readableState,s=e._writableState;p(t,s,i),s&&(s.closed=!0),i&&(i.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(b,e)}try{e._destroy(t||null,i)}catch(t){i(t)}}function g(e,t){m(e,t),b(e)}function b(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function m(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const o=e._readableState,i=e._writableState;if(null!=i&&i.destroyed||null!=o&&o.destroyed)return this;null!=o&&o.autoDestroy||null!=i&&i.autoDestroy?e.destroy(t):t&&(t.stack,i&&!i.errored&&(i.errored=t),o&&!o.errored&&(o.errored=t),r?n.nextTick(m,e,t):m(e,t))}function w(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new i);t=!0;const o=e._readableState,s=e._writableState,a=s||o;o&&(o.constructed=!0),s&&(s.constructed=!0),a.destroyed?e.emit(d,r):r?v(e,r,!0):n.nextTick(E,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function E(e){e.emit(h)}function _(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function A(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,o=e._writableState;r&&(r.constructed=!1),o&&(o.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(w,e)},destroyer:function(e,t){e&&!c(e)&&(t||l(e)||(t=new s),f(e)?(e.socket=null,e.destroy(t)):_(e)?e.abort():_(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(A,e,t):n.nextTick(S,e),e.destroyed||(e[u]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,i=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(p(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?y(this,e,t):this.once(d,(function(r){y(this,o(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},8637:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:i,ObjectSetPrototypeOf:s}=r(5439);e.exports=c;const a=r(538),u=r(4695);s(c.prototype,a.prototype),s(c,a);{const e=i(u.prototype);for(let t=0;t<e.length;t++){const r=e[t];c.prototype[r]||(c.prototype[r]=u.prototype[r])}}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),u.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}let l,f;function d(){return void 0===l&&(l={}),l}n(c.prototype,{writable:{__proto__:null,...o(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...o(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...o(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...o(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...o(u.prototype,"writableLength")},writableFinished:{__proto__:null,...o(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...o(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...o(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...o(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),c.fromWeb=function(e,t){return d().newStreamDuplexFromReadableWritablePair(e,t)},c.toWeb=function(e){return d().newReadableWritablePairFromDuplex(e)},c.from=function(e){return f||(f=r(325)),f(e,"body")}},325:(e,t,r)=>{const n=r(4406),o=r(8834),{isReadable:i,isWritable:s,isIterable:a,isNodeStream:u,isReadableNodeStream:c,isWritableNodeStream:l,isDuplexNodeStream:f}=r(6140),d=r(3803),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:y}}=r(2415),{destroyer:g}=r(4664),b=r(8637),m=r(538),{createDeferredPromise:v}=r(9928),w=r(8236),E=globalThis.Blob||o.Blob,_=void 0!==E?function(e){return e instanceof E}:function(e){return!1},S=globalThis.AbortController||r(7948).AbortController,{FunctionPrototypeCall:A}=r(5439);class O extends b{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function R(e){const t=e.readable&&"function"!=typeof e.readable.read?m.wrap(e.readable):e.readable,r=e.writable;let n,o,a,u,c,l=!!i(t),f=!!s(r);function p(e){const t=u;u=null,t?t(e):e&&c.destroy(e)}return c=new O({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:f}),f&&(d(r,(e=>{f=!1,e&&g(t,e),p(e)})),c._write=function(e,t,o){r.write(e,t)?o():n=o},c._final=function(e){r.end(),o=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(o){const e=o;o=null,e()}}))),l&&(d(t,(e=>{l=!1,e&&g(t,e),p(e)})),t.on("readable",(function(){if(a){const e=a;a=null,e()}})),t.on("end",(function(){c.push(null)})),c._read=function(){for(;;){const e=t.read();if(null===e)return void(a=c._read);if(!c.push(e))return}}),c._destroy=function(e,i){e||null===u||(e=new h),a=null,n=null,o=null,null===u?i(e):(u=i,g(r,e),g(t,e))},c}e.exports=function e(t,r){if(f(t))return t;if(c(t))return R({readable:t});if(l(t))return R({writable:t});if(u(t))return R({writable:!1,readable:!1});if("function"==typeof t){const{value:e,write:o,final:i,destroy:s}=function(e){let{promise:t,resolve:r}=v();const o=new S,i=o.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:o,done:s,cb:a}=await e;if(n.nextTick(a),s)return;if(i.aborted)throw new h(void 0,{cause:i.reason});({promise:t,resolve:r}=v()),yield o}}(),{signal:i}),write(e,t,n){const o=r;r=null,o({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){o.abort(),t(e)}}}(t);if(a(e))return w(O,e,{objectMode:!0,write:o,final:i,destroy:s});const u=null==e?void 0:e.then;if("function"==typeof u){let t;const r=A(u,e,(e=>{if(null!=e)throw new y("nully","body",e)}),(e=>{g(t,e)}));return t=new O({objectMode:!0,readable:!1,write:o,final(e){i((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:s})}throw new y("Iterable, AsyncIterable or AsyncFunction",r,e)}if(_(t))return e(t.arrayBuffer());if(a(t))return w(O,t,{objectMode:!0,writable:!1});if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return R({readable:null!=t&&t.readable?c(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const o=null==t?void 0:t.then;if("function"==typeof o){let e;return A(o,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{g(e,t)})),e=new O({objectMode:!0,writable:!1,read(){}})}throw new p(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},3803:(e,t,r)=>{const n=r(4406),{AbortError:o,codes:i}=r(2415),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_PREMATURE_CLOSE:a}=i,{kEmptyObject:u,once:c}=r(9928),{validateAbortSignal:l,validateFunction:f,validateObject:d,validateBoolean:h}=r(1670),{Promise:p,PromisePrototypeThen:y}=r(5439),{isClosed:g,isReadable:b,isReadableNodeStream:m,isReadableStream:v,isReadableFinished:w,isReadableErrored:E,isWritable:_,isWritableNodeStream:S,isWritableStream:A,isWritableFinished:O,isWritableErrored:R,isNodeStream:x,willEmitClose:I,kIsClosedPromise:P}=r(6140),T=()=>{};function N(e,t,r){var i,h;if(2===arguments.length?(r=t,t=u):null==t?t=u:d(t,"options"),f(r,"callback"),l(t.signal,"options.signal"),r=c(r),v(e)||A(e))return function(e,t,r){let i=!1,s=T;if(t.signal)if(s=()=>{i=!0,r.call(e,new o(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{const n=r;r=c(((...r)=>{t.signal.removeEventListener("abort",s),n.apply(e,r)})),t.signal.addEventListener("abort",s)}const a=(...t)=>{i||n.nextTick((()=>r.apply(e,t)))};return y(e[P].promise,a,a),T}(e,t,r);if(!x(e))throw new s("stream",["ReadableStream","WritableStream","Stream"],e);const p=null!==(i=t.readable)&&void 0!==i?i:m(e),N=null!==(h=t.writable)&&void 0!==h?h:S(e),j=e._writableState,C=e._readableState,B=()=>{e.writable||k()};let L=I(e)&&m(e)===p&&S(e)===N,M=O(e,!1);const k=()=>{M=!0,e.destroyed&&(L=!1),(!L||e.readable&&!p)&&(p&&!F||r.call(e))};let F=w(e,!1);const $=()=>{F=!0,e.destroyed&&(L=!1),(!L||e.writable&&!N)&&(N&&!M||r.call(e))},U=t=>{r.call(e,t)};let D=g(e);const H=()=>{D=!0;const t=R(e)||E(e);return t&&"boolean"!=typeof t?r.call(e,t):p&&!F&&m(e,!0)&&!w(e,!1)?r.call(e,new a):!N||M||O(e,!1)?void r.call(e):r.call(e,new a)},W=()=>{D=!0;const t=R(e)||E(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},z=()=>{e.req.on("finish",k)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?N&&!j&&(e.on("end",B),e.on("close",B)):(e.on("complete",k),L||e.on("abort",H),e.req?z():e.on("request",z)),L||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",$),e.on("finish",k),!1!==t.error&&e.on("error",U),e.on("close",H),D?n.nextTick(H):null!=j&&j.errorEmitted||null!=C&&C.errorEmitted?L||n.nextTick(W):(p||L&&!b(e)||!M&&!1!==_(e))&&(N||L&&!_(e)||!F&&!1!==b(e))?C&&e.req&&e.aborted&&n.nextTick(W):n.nextTick(W);const V=()=>{r=T,e.removeListener("aborted",H),e.removeListener("complete",k),e.removeListener("abort",H),e.removeListener("request",z),e.req&&e.req.removeListener("finish",k),e.removeListener("end",B),e.removeListener("close",B),e.removeListener("finish",k),e.removeListener("end",$),e.removeListener("error",U),e.removeListener("close",H)};if(t.signal&&!D){const i=()=>{const n=r;V(),n.call(e,new o(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(i);else{const n=r;r=c(((...r)=>{t.signal.removeEventListener("abort",i),n.apply(e,r)})),t.signal.addEventListener("abort",i)}}return V}e.exports=N,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=u),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new p(((r,o)=>{const i=N(e,t,(e=>{n&&i(),e?o(e):r()}))}))}},8236:(e,t,r)=>{"use strict";const n=r(4406),{PromisePrototypeThen:o,SymbolAsyncIterator:i,SymbolIterator:s}=r(5439),{Buffer:a}=r(8834),{ERR_INVALID_ARG_TYPE:u,ERR_STREAM_NULL_VALUES:c}=r(2415).codes;e.exports=function(e,t,r){let l,f;if("string"==typeof t||t instanceof a)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[i])f=!0,l=t[i]();else{if(!t||!t[s])throw new u("iterable",["Iterable"],t);f=!1,l=t[s]()}const d=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return d._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=f?await l.next():l.next();if(t)d.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new c;if(d.push(t))continue;h=!1}}catch(e){d.destroy(e)}break}}())},d._destroy=function(e,t){o(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},d}},6767:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:o}=r(5439),{EventEmitter:i}=r(2699);function s(e){i.call(this,e)}function a(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}o(s.prototype,i.prototype),o(s,i),s.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",u),r.on("close",c));let s=!1;function u(){s||(s=!0,e.end())}function c(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){f(),0===i.listenerCount(this,"error")&&this.emit("error",e)}function f(){r.removeListener("data",n),e.removeListener("drain",o),r.removeListener("end",u),r.removeListener("close",c),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return a(r,"error",l),a(e,"error",l),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e},e.exports={Stream:s,prependListener:a}},2542:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(7948).AbortController,{codes:{ERR_INVALID_ARG_VALUE:o,ERR_INVALID_ARG_TYPE:i,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:u}=r(2415),{validateAbortSignal:c,validateInteger:l,validateObject:f}=r(1670),d=r(5439).Symbol("kWeak"),{finished:h}=r(3803),p=r(5291),{addAbortSignalNoValidate:y}=r(2349),{isWritable:g,isNodeStream:b}=r(6140),{ArrayPrototypePush:m,MathFloor:v,Number:w,NumberIsNaN:E,Promise:_,PromiseReject:S,PromisePrototypeThen:A,Symbol:O}=r(5439),R=O("kEmpty"),x=O("kEof");function I(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let r=1;return null!=(null==t?void 0:t.concurrency)&&(r=v(t.concurrency)),l(r,"concurrency",1),async function*(){var o,i;const s=new n,a=this,c=[],l=s.signal,f={signal:l},d=()=>s.abort();let h,p;null!=t&&null!==(o=t.signal)&&void 0!==o&&o.aborted&&d(),null==t||null===(i=t.signal)||void 0===i||i.addEventListener("abort",d);let y=!1;function g(){y=!0}!async function(){try{for await(let t of a){var n;if(y)return;if(l.aborted)throw new u;try{t=e(t,f)}catch(e){t=S(e)}t!==R&&("function"==typeof(null===(n=t)||void 0===n?void 0:n.catch)&&t.catch(g),c.push(t),h&&(h(),h=null),!y&&c.length&&c.length>=r&&await new _((e=>{p=e})))}c.push(x)}catch(e){const t=S(e);A(t,void 0,g),c.push(t)}finally{var o;y=!0,h&&(h(),h=null),null==t||null===(o=t.signal)||void 0===o||o.removeEventListener("abort",d)}}();try{for(;;){for(;c.length>0;){const e=await c[0];if(e===x)return;if(l.aborted)throw new u;e!==R&&(yield e),c.shift(),p&&(p(),p=null)}await new _((e=>{h=e}))}}finally{s.abort(),y=!0,p&&(p(),p=null)}}.call(this)}async function P(e,t=void 0){for await(const r of T.call(this,e,t))return!0;return!1}function T(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);return I.call(this,(async function(t,r){return await e(t,r)?t:R}),t)}class N extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function j(e){if(e=w(e),E(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u({cause:e.signal.reason});yield[t++,n]}}.call(this)},drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=j(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new u;e--<=0&&(yield r)}}.call(this)},filter:T,flatMap:function(e,t){const r=I.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:I,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=j(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new u;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new u;if(!(e-- >0))return;yield r}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),b(e)&&!g(e))throw new o("stream",e,"must be writable");const r=p(this,e);return null!=t&&t.signal&&y(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);return!await P.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new i("fn",["Function","AsyncFunction"],e);for await(const r of I.call(this,(async function(t,r){return await e(t,r),R}),t));},reduce:async function(e,t,r){var o;if("function"!=typeof e)throw new i("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(o=r.signal)&&void 0!==o&&o.aborted){const e=new u(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await h(this.destroy(e)),e}const a=new n,l=a.signal;if(null!=r&&r.signal){const e={once:!0,[d]:this};r.signal.addEventListener("abort",(()=>a.abort()),e)}let p=!1;try{for await(const n of this){var y;if(p=!0,null!=r&&null!==(y=r.signal)&&void 0!==y&&y.aborted)throw new u;s?t=await e(t,n,{signal:l}):(t=n,s=!0)}if(!p&&!s)throw new N}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new u(void 0,{cause:e.signal.reason});m(t,n)}return t},some:P,find:async function(e,t){for await(const r of T.call(this,e,t))return r}}},1753:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(5439);e.exports=i;const o=r(9643);function i(e){if(!(this instanceof i))return new i(e);o.call(this,e)}n(i.prototype,o.prototype),n(i,o),i.prototype._transform=function(e,t,r){r(null,e)}},7253:(e,t,r)=>{const n=r(4406),{ArrayIsArray:o,Promise:i,SymbolAsyncIterator:s}=r(5439),a=r(3803),{once:u}=r(9928),c=r(4664),l=r(8637),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:d,ERR_INVALID_RETURN_VALUE:h,ERR_MISSING_ARGS:p,ERR_STREAM_DESTROYED:y,ERR_STREAM_PREMATURE_CLOSE:g},AbortError:b}=r(2415),{validateFunction:m,validateAbortSignal:v}=r(1670),{isIterable:w,isReadable:E,isReadableNodeStream:_,isNodeStream:S,isTransformStream:A,isWebStream:O,isReadableStream:R,isReadableEnded:x}=r(6140),I=globalThis.AbortController||r(7948).AbortController;let P,T;function N(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,c.destroyer(e,t||new y("pipe")))},cleanup:a(e,{readable:t,writable:r},(e=>{n=!e}))}}function j(e){if(w(e))return e;if(_(e))return async function*(e){T||(T=r(538)),yield*T.prototype[s].call(e)}(e);throw new d("val",["Readable","Iterable","AsyncIterable"],e)}async function C(e,t,r,{end:n}){let o,s=null;const u=e=>{if(e&&(o=e),s){const e=s;s=null,e()}},c=()=>new i(((e,t)=>{o?t(o):s=()=>{o?t(o):e()}}));t.on("drain",u);const l=a(t,{readable:!1},u);try{t.writableNeedDrain&&await c();for await(const r of e)t.write(r)||await c();n&&t.end(),await c(),r()}catch(e){r(o!==e?f(o,e):e)}finally{l(),t.off("drain",u)}}async function B(e,t,r,{end:n}){A(t)&&(t=t.writable);const o=t.getWriter();try{for await(const t of e)await o.ready,o.write(t).catch((()=>{}));await o.ready,n&&await o.close(),r()}catch(e){try{await o.abort(e),r(e)}catch(e){r(e)}}}function L(e,t,i){if(1===e.length&&o(e[0])&&(e=e[0]),e.length<2)throw new p("streams");const s=new I,a=s.signal,u=null==i?void 0:i.signal,c=[];function f(){k(new b)}let y,g;v(u,"options.signal"),null==u||u.addEventListener("abort",f);const m=[];let x,T=0;function L(e){k(e,0==--T)}function k(e,r){if(!e||y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code||(y=e),y||r){for(;m.length;)m.shift()(y);null==u||u.removeEventListener("abort",f),s.abort(),r&&(y||c.forEach((e=>e())),n.nextTick(t,y,g))}}for(let D=0;D<e.length;D++){const H=e[D],W=D<e.length-1,z=D>0,V=W||!1!==(null==i?void 0:i.end),q=D===e.length-1;if(S(H)){if(V){const{destroy:G,cleanup:J}=N(H,W,z);m.push(G),E(H)&&q&&c.push(J)}function F(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&L(e)}H.on("error",F),E(H)&&q&&c.push((()=>{H.removeListener("error",F)}))}if(0===D)if("function"==typeof H){if(x=H({signal:a}),!w(x))throw new h("Iterable, AsyncIterable or Stream","source",x)}else x=w(H)||_(H)||A(H)?H:l.from(H);else if("function"==typeof H){var $;if(x=A(x)?j(null===($=x)||void 0===$?void 0:$.readable):j(x),x=H(x,{signal:a}),W){if(!w(x,!0))throw new h("AsyncIterable",`transform[${D-1}]`,x)}else{var U;P||(P=r(1753));const K=new P({objectMode:!0}),Y=null===(U=x)||void 0===U?void 0:U.then;if("function"==typeof Y)T++,Y.call(x,(e=>{g=e,null!=e&&K.write(e),V&&K.end(),n.nextTick(L)}),(e=>{K.destroy(e),n.nextTick(L,e)}));else if(w(x,!0))T++,C(x,K,L,{end:V});else{if(!R(x)&&!A(x))throw new h("AsyncIterable or Promise","destination",x);{const Q=x.readable||x;T++,C(Q,K,L,{end:V})}}x=K;const{destroy:X,cleanup:Z}=N(x,!1,!0);m.push(X),q&&c.push(Z)}}else if(S(H)){if(_(x)){T+=2;const ee=M(x,H,L,{end:V});E(H)&&q&&c.push(ee)}else if(A(x)||R(x)){const te=x.readable||x;T++,C(te,H,L,{end:V})}else{if(!w(x))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],x);T++,C(x,H,L,{end:V})}x=H}else if(O(H)){if(_(x))T++,B(j(x),H,L,{end:V});else if(R(x)||w(x))T++,B(x,H,L,{end:V});else{if(!A(x))throw new d("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],x);T++,B(x.readable,H,L,{end:V})}x=H}else x=l.from(H)}return(null!=a&&a.aborted||null!=u&&u.aborted)&&n.nextTick(f),x}function M(e,t,r,{end:o}){let i=!1;if(t.on("close",(()=>{i||r(new g)})),e.pipe(t,{end:!1}),o){function s(){i=!0,t.end()}x(e)?n.nextTick(s):e.once("end",s)}else r();return a(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),a(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:L,pipeline:function(...e){return L(e,u(function(e){return m(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},538:(e,t,r)=>{const n=r(4406),{ArrayPrototypeIndexOf:o,NumberIsInteger:i,NumberIsNaN:s,NumberParseInt:a,ObjectDefineProperties:u,ObjectKeys:c,ObjectSetPrototypeOf:l,Promise:f,SafeSet:d,SymbolAsyncIterator:h,Symbol:p}=r(5439);e.exports=$,$.ReadableState=F;const{EventEmitter:y}=r(2699),{Stream:g,prependListener:b}=r(6767),{Buffer:m}=r(8834),{addAbortSignal:v}=r(2349),w=r(3803);let E=r(9928).debuglog("stream",(e=>{E=e}));const _=r(4250),S=r(4664),{getHighWaterMark:A,getDefaultHighWaterMark:O}=r(4930),{aggregateTwoErrors:R,codes:{ERR_INVALID_ARG_TYPE:x,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:T,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:N}}=r(2415),{validateObject:j}=r(1670),C=p("kPaused"),{StringDecoder:B}=r(214),L=r(8236);l($.prototype,g.prototype),l($,g);const M=()=>{},{errorOrDestroy:k}=S;function F(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8637)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.readableObjectMode)),this.highWaterMark=e?A(this,e,"readableHighWaterMark",n):O(!1),this.buffer=new _,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[C]=null,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new B(e.encoding),this.encoding=e.encoding)}function $(e){if(!(this instanceof $))return new $(e);const t=this instanceof r(8637);this._readableState=new F(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&v(e.signal,this)),g.call(this,e),S.construct(this,(()=>{this._readableState.needReadable&&V(this,this._readableState)}))}function U(e,t,r,n){E("readableAddChunk",t);const o=e._readableState;let i;if(o.objectMode||("string"==typeof t?(r=r||o.defaultEncoding,o.encoding!==r&&(n&&o.encoding?t=m.from(t,r).toString(o.encoding):(t=m.from(t,r),r=""))):t instanceof m?r="":g._isUint8Array(t)?(t=g._uint8ArrayToBuffer(t),r=""):null!=t&&(i=new x("chunk",["string","Buffer","Uint8Array"],t))),i)k(e,i);else if(null===t)o.reading=!1,function(e,t){if(E("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?W(e):(t.needReadable=!1,t.emittedReadable=!0,z(e))}}(e,o);else if(o.objectMode||t&&t.length>0)if(n)if(o.endEmitted)k(e,new N);else{if(o.destroyed||o.errored)return!1;D(e,o,t,!0)}else if(o.ended)k(e,new T);else{if(o.destroyed||o.errored)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?D(e,o,t,!1):V(e,o)):D(e,o,t,!1)}else n||(o.reading=!1,V(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function D(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&W(e)),V(e,t)}function H(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:s(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function W(e){const t=e._readableState;E("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(E("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(z,e))}function z(e){const t=e._readableState;E("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Y(e)}function V(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(q,e,t))}function q(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){const r=t.length;if(E("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function G(e){const t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[C]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function J(e){E("readable nexttick read 0"),e.read(0)}function K(e,t){E("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Y(e),t.flowing&&!t.reading&&e.read(0)}function Y(e){const t=e._readableState;for(E("flow",t.flowing);t.flowing&&null!==e.read(););}function X(e,t){"function"!=typeof e.read&&(e=$.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=M;function o(t){this===e?(n(),n=M):n=t}e.on("readable",o);const i=w(e,{writable:!1},(e=>{r=e?R(r,e):null,n(),n=M}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new f(o)}}}catch(e){throw r=R(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",o),i()):S.destroyer(e,null)}}(e,t);return r.stream=e,r}function Z(e,t){if(0===t.length)return null;let r;return 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}function Q(e){const t=e._readableState;E("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(ee,t,e))}function ee(e,t){if(E("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(te,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function te(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let re;function ne(){return void 0===re&&(re={}),re}$.prototype.destroy=S.destroy,$.prototype._undestroy=S.undestroy,$.prototype._destroy=function(e,t){t(e)},$.prototype[y.captureRejectionSymbol]=function(e){this.destroy(e)},$.prototype.push=function(e,t){return U(this,e,t,!1)},$.prototype.unshift=function(e,t){return U(this,e,t,!0)},$.prototype.isPaused=function(){const e=this._readableState;return!0===e[C]||!1===e.flowing},$.prototype.setEncoding=function(e){const t=new B(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},$.prototype.read=function(e){E("read",e),void 0===e?e=NaN:i(e)||(e=a(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return E("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Q(this):W(this),null;if(0===(e=H(e,t))&&t.ended)return 0===t.length&&Q(this),null;let n,o=t.needReadable;if(E("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&(o=!0,E("length less than watermark",o)),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)o=!1,E("reading, ended or constructing",o);else if(o){E("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0);try{this._read(t.highWaterMark)}catch(e){k(this,e)}t.sync=!1,t.reading||(e=H(r,t))}return n=e>0?Z(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Q(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},$.prototype._read=function(e){throw new I("_read()")},$.prototype.pipe=function(e,t){const r=this,o=this._readableState;1===o.pipes.length&&(o.multiAwaitDrain||(o.multiAwaitDrain=!0,o.awaitDrainWriters=new d(o.awaitDrainWriters?[o.awaitDrainWriters]:[]))),o.pipes.push(e),E("pipe count=%d opts=%j",o.pipes.length,t);const i=t&&!1===t.end||e===n.stdout||e===n.stderr?y:s;function s(){E("onend"),e.end()}let a;o.endEmitted?n.nextTick(i):r.once("end",i),e.on("unpipe",(function t(n,i){E("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,E("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),a&&e.removeListener("drain",a),e.removeListener("error",f),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",l),u=!0,a&&o.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&a())}));let u=!1;function c(){u||(1===o.pipes.length&&o.pipes[0]===e?(E("false write response, pause",0),o.awaitDrainWriters=e,o.multiAwaitDrain=!1):o.pipes.length>1&&o.pipes.includes(e)&&(E("false write response, pause",o.awaitDrainWriters.size),o.awaitDrainWriters.add(e)),r.pause()),a||(a=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(E("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(E("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",a))}function l(t){E("ondata");const r=e.write(t);E("dest.write",r),!1===r&&c()}function f(t){if(E("onerror",t),y(),e.removeListener("error",f),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?k(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",p),y()}function p(){E("onfinish"),e.removeListener("close",h),y()}function y(){E("unpipe"),r.unpipe(e)}return r.on("data",l),b(e,"error",f),e.once("close",h),e.once("finish",p),e.emit("pipe",r),!0===e.writableNeedDrain?o.flowing&&c():o.flowing||(E("pipe resume"),r.resume()),e},$.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t<e.length;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}const r=o(t.pipes,e);return-1===r||(t.pipes.splice(r,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},$.prototype.on=function(e,t){const r=g.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,E("on readable",o.length,o.reading),o.length?W(this):o.reading||n.nextTick(J,this))),r},$.prototype.addListener=$.prototype.on,$.prototype.removeListener=function(e,t){const r=g.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(G,this),r},$.prototype.off=$.prototype.removeListener,$.prototype.removeAllListeners=function(e){const t=g.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(G,this),t},$.prototype.resume=function(){const e=this._readableState;return e.flowing||(E("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(K,e,t))}(this,e)),e[C]=!1,this},$.prototype.pause=function(){return E("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(E("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[C]=!0,this},$.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{k(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=c(e);for(let t=1;t<r.length;t++){const n=r[t];void 0===this[n]&&"function"==typeof e[n]&&(this[n]=e[n].bind(e))}return this},$.prototype[h]=function(){return X(this)},$.prototype.iterator=function(e){return void 0!==e&&j(e,"options"),X(this,e)},u($.prototype,{readable:{__proto__:null,get(){const e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),u(F.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[C]},set(e){this[C]=!!e}}}),$._fromList=Z,$.from=function(e,t){return L($,e,t)},$.fromWeb=function(e,t){return ne().newStreamReadableFromReadableStream(e,t)},$.toWeb=function(e,t){return ne().newReadableStreamFromStreamReadable(e,t)},$.wrap=function(e,t){var r,n;return new $({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r,...t,destroy(t,r){S.destroyer(e,t),r(t)}}).wrap(e)}},4930:(e,t,r)=>{"use strict";const{MathFloor:n,NumberIsInteger:o}=r(5439),{ERR_INVALID_ARG_VALUE:i}=r(2415).codes;function s(e){return e?16:16384}e.exports={getHighWaterMark:function(e,t,r,a){const u=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=u){if(!o(u)||u<0)throw new i(a?`options.${r}`:"options.highWaterMark",u);return n(u)}return s(e.objectMode)},getDefaultHighWaterMark:s}},9643:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:o}=r(5439);e.exports=c;const{ERR_METHOD_NOT_IMPLEMENTED:i}=r(2415).codes,s=r(8637),{getHighWaterMark:a}=r(4930);n(c.prototype,s.prototype),n(c,s);const u=o("kCallback");function c(e){if(!(this instanceof c))return new c(e);const t=e?a(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),s.call(this,e),this._readableState.sync=!1,this[u]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function f(){this._final!==l&&l.call(this)}c.prototype._final=l,c.prototype._transform=function(e,t,r){throw new i("_transform()")},c.prototype._write=function(e,t,r){const n=this._readableState,o=this._writableState,i=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),o.ended||i===n.length||n.length<n.highWaterMark?r():this[u]=r)}))},c.prototype._read=function(){if(this[u]){const e=this[u];this[u]=null,e()}}},6140:(e,t,r)=>{"use strict";const{Symbol:n,SymbolAsyncIterator:o,SymbolIterator:i,SymbolFor:s}=r(5439),a=n("kDestroyed"),u=n("kIsErrored"),c=n("kIsReadable"),l=n("kIsDisturbed"),f=s("nodejs.webstream.isClosedPromise"),d=s("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function p(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function b(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function m(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[a]||null!=n&&n.destroyed)}function w(e){if(!p(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function E(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function _(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&h(e)&&e.readable&&!E(e)}function S(e){return"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&p(e)&&e.writable&&!w(e)}function A(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function O(e){return"boolean"==typeof e._sent100&&A(e)}e.exports={kDestroyed:a,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,o,i,s,a,c,l,f;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(o=null!==(i=null!==(s=e[u])&&void 0!==s?s:e.readableErrored)&&void 0!==i?i:e.writableErrored)&&void 0!==o?o:null===(a=e._readableState)||void 0===a?void 0:a.errorEmitted)&&void 0!==n?n:null===(c=e._writableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(f=e._writableState)||void 0===f?void 0:f.errored))},kIsErrored:u,isReadable:_,kIsReadable:c,kIsClosedPromise:f,kControllerErrorFunction:d,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&A(e)?e._closed:null},isDestroyed:v,isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&_(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[o]:!1===t?"function"==typeof e[i]:"function"==typeof e[o]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:E,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||b(e)||m(e)},isWritable:S,isWritableNodeStream:p,isWritableStream:b,isWritableEnded:w,isWritableFinished:function(e,t){if(!p(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:O,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&O(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:m}},4695:(e,t,r)=>{const n=r(4406),{ArrayPrototypeSlice:o,Error:i,FunctionPrototypeSymbolHasInstance:s,ObjectDefineProperty:a,ObjectDefineProperties:u,ObjectSetPrototypeOf:c,StringPrototypeToLowerCase:l,Symbol:f,SymbolHasInstance:d}=r(5439);e.exports=B,B.WritableState=j;const{EventEmitter:h}=r(2699),p=r(6767).Stream,{Buffer:y}=r(8834),g=r(4664),{addAbortSignal:b}=r(2349),{getHighWaterMark:m,getDefaultHighWaterMark:v}=r(4930),{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:_,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:A,ERR_STREAM_ALREADY_FINISHED:O,ERR_STREAM_NULL_VALUES:R,ERR_STREAM_WRITE_AFTER_END:x,ERR_UNKNOWN_ENCODING:I}=r(2415).codes,{errorOrDestroy:P}=g;function T(){}c(B.prototype,p.prototype),c(B,p);const N=f("kOnFinished");function j(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(8637)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?m(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const o=!(!e||!1!==e.decodeStrings);this.decodeStrings=!o,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,C(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function C(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function B(e){const t=this instanceof r(8637);if(!t&&!s(B,this))return new B(e);this._writableState=new j(e,this,t),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&b(e.signal,this)),p.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||H(this,e),z(this,e)}))}function L(e,t,r,o){const i=e._writableState;if("function"==typeof r)o=r,r=i.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new I(r)}else r=i.defaultEncoding;"function"!=typeof o&&(o=T)}if(null===t)throw new R;if(!i.objectMode)if("string"==typeof t)!1!==i.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!p._isUint8Array(t))throw new w("chunk",["string","Buffer","Uint8Array"],t);t=p._uint8ArrayToBuffer(t),r="buffer"}let s;return i.ending?s=new x:i.destroyed&&(s=new A("write")),s?(n.nextTick(o,s),P(e,s,!0),s):(i.pendingcb++,function(e,t,r,n,o){const i=t.objectMode?1:r.length;t.length+=i;const s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:r,encoding:n,callback:o}),t.allBuffers&&"buffer"!==n&&(t.allBuffers=!1),t.allNoop&&o!==T&&(t.allNoop=!1)):(t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,n,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,i,t,r,o))}function M(e,t,r,n,o,i,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function k(e,t,r,n){--t.pendingcb,n(r),D(t),P(e,r)}function F(e,t){const r=e._writableState,o=r.sync,i=r.writecb;"function"==typeof i?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),o?n.nextTick(k,e,r,t,i):k(e,r,t,i)):(r.buffered.length>r.bufferedIndex&&H(e,r),o?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:e,state:r},n.nextTick($,r.afterWriteTickInfo)):U(e,r,1,i))):P(e,new _)}function $({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,U(e,t,r,n)}function U(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&D(t),z(e,t)}function D(e){if(e.writing)return;for(let r=e.bufferedIndex;r<e.buffered.length;++r){var t;const{chunk:n,callback:o}=e.buffered[r],i=e.objectMode?1:n.length;e.length-=i,o(null!==(t=e.errored)&&void 0!==t?t:new A("write"))}const r=e[N].splice(0);for(let t=0;t<r.length;t++){var n;r[t](null!==(n=e.errored)&&void 0!==n?n:new A("end"))}C(e)}function H(e,t){if(t.corked||t.bufferProcessing||t.destroyed||!t.constructed)return;const{buffered:r,bufferedIndex:n,objectMode:i}=t,s=r.length-n;if(!s)return;let a=n;if(t.bufferProcessing=!0,s>1&&e._writev){t.pendingcb-=s-1;const n=t.allNoop?T:e=>{for(let t=a;t<r.length;++t)r[t].callback(e)},i=t.allNoop&&0===a?r:o(r,a);i.allBuffers=t.allBuffers,M(e,t,!0,t.length,i,"",n),C(t)}else{do{const{chunk:n,encoding:o,callback:s}=r[a];r[a++]=null,M(e,t,!1,i?1:n.length,n,o,s)}while(a<r.length&&!t.writing);a===r.length?C(t):a>256?(r.splice(0,a),t.bufferedIndex=0):t.bufferedIndex=a}t.bufferProcessing=!1}function W(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function z(e,t,r){W(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function o(o){if(r)P(e,null!=o?o:_());else if(r=!0,t.pendingcb--,o){const r=t[N].splice(0);for(let e=0;e<r.length;e++)r[e](o);P(e,o,t.sync)}else W(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,n.nextTick(V,e,t))}t.sync=!0,t.pendingcb++;try{e._final(o)}catch(e){o(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,n.nextTick(((e,t)=>{W(t)?V(e,t):t.pendingcb--}),e,t)):W(t)&&(t.pendingcb++,V(e,t))))}function V(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e<r.length;e++)r[e]();if(e.emit("finish"),t.autoDestroy){const t=e._readableState;(!t||t.autoDestroy&&(t.endEmitted||!1===t.readable))&&e.destroy()}}j.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},a(j.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),a(B,d,{__proto__:null,value:function(e){return!!s(this,e)||this===B&&e&&e._writableState instanceof j}}),B.prototype.pipe=function(){P(this,new S)},B.prototype.write=function(e,t,r){return!0===L(this,e,t,r)},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){const e=this._writableState;e.corked&&(e.corked--,e.writing||H(this,e))},B.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=l(e)),!y.isEncoding(e))throw new I(e);return this._writableState.defaultEncoding=e,this},B.prototype._write=function(e,t,r){if(!this._writev)throw new E("_write()");this._writev([{chunk:e,encoding:t}],r)},B.prototype._writev=null,B.prototype.end=function(e,t,r){const o=this._writableState;let s;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){const r=L(this,e,t);r instanceof i&&(s=r)}return o.corked&&(o.corked=1,this.uncork()),s||(o.errored||o.ending?o.finished?s=new O("end"):o.destroyed&&(s=new A("end")):(o.ending=!0,z(this,o,!0),o.ended=!0)),"function"==typeof r&&(s||o.finished?n.nextTick(r,s):o[N].push(r)),this},u(B.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get(){const e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){const e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});const q=g.destroy;let G;function J(){return void 0===G&&(G={}),G}B.prototype.destroy=function(e,t){const r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[N].length)&&n.nextTick(D,r),q.call(this,e,t),this},B.prototype._undestroy=g.undestroy,B.prototype._destroy=function(e,t){t(e)},B.prototype[h.captureRejectionSymbol]=function(e){this.destroy(e)},B.fromWeb=function(e,t){return J().newStreamWritableFromWritableStream(e,t)},B.toWeb=function(e){return J().newWritableStreamFromStreamWritable(e)}},1670:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:o,ArrayPrototypeJoin:i,ArrayPrototypeMap:s,NumberIsInteger:a,NumberIsNaN:u,NumberMAX_SAFE_INTEGER:c,NumberMIN_SAFE_INTEGER:l,NumberParseInt:f,ObjectPrototypeHasOwnProperty:d,RegExpPrototypeExec:h,String:p,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(5439),{hideStackFrames:b,codes:{ERR_SOCKET_BAD_PORT:m,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:w,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:_}}=r(2415),{normalizeEncoding:S}=r(9928),{isAsyncFunction:A,isArrayBufferView:O}=r(9928).types,R={},x=/^[0-7]+$/,I=b(((e,t,r=l,n=c)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(e<r||e>n)throw new E(t,`>= ${r} && <= ${n}`,e)})),P=b(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new E(t,"an integer",e);if(e<r||e>n)throw new E(t,`>= ${r} && <= ${n}`,e)})),T=b(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!a(e))throw new E(t,"an integer",e);const n=r?1:0,o=4294967295;if(e<n||e>o)throw new E(t,`>= ${n} && <= ${o}`,e)}));function N(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const j=b(((e,t,r)=>{if(!o(r,e)){const n=i(s(r,(e=>"string"==typeof e?`'${e}'`:p(e))),", ");throw new w(t,e,"must be one of: "+n)}}));function C(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function B(e,t,r){return null!=e&&d(e,t)?e[t]:r}const L=b(((e,t,r=null)=>{const o=B(r,"allowArray",!1),i=B(r,"allowFunction",!1);if(!B(r,"nullable",!1)&&null===e||!o&&n(e)||"object"!=typeof e&&(!i||"function"!=typeof e))throw new v(t,"Object",e)})),M=b(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),k=b(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length<r)throw new w(t,e,`must be longer than ${r}`)})),F=b(((e,t="buffer")=>{if(!O(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),$=b(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),U=b(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),D=b(((e,t)=>{if("function"!=typeof e||A(e))throw new v(t,"Function",e)})),H=b(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),W=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function z(e,t){if(void 0===e||!h(W,e))throw new w(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(x,e))throw new w(t,e,"must be a 32-bit unsigned integer or an octal string");e=f(e,8)}return T(e,t),e},validateArray:k,validateStringArray:function(e,t){k(e,t);for(let r=0;r<e.length;r++)N(e[r],`${t}[${r}]`)},validateBooleanArray:function(e,t){k(e,t);for(let r=0;r<e.length;r++)C(e[r],`${t}[${r}]`)},validateBoolean:C,validateBuffer:F,validateDictionary:M,validateEncoding:function(e,t){const r=S(t),n=e.length;if("hex"===r&&n%2!=0)throw new w("encoding",t,`is invalid for data of length ${n}`)},validateFunction:U,validateInt32:P,validateInteger:I,validateNumber:function(e,t,r=void 0,n){if("number"!=typeof e)throw new v(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&u(e))throw new E(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:L,validateOneOf:j,validatePlainFunction:D,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new m(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===R[e]){if(void 0!==R[y(e)])throw new _(e+" (signals must use all capital letters)");throw new _(e)}},validateString:N,validateUint32:T,validateUndefined:H,validateUnion:function(e,t,r){if(!o(r,e))throw new v(t,`('${i(r,"|")}')`,e)},validateAbortSignal:$,validateLinkHeaderValue:function(e){if("string"==typeof e)return z(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n<t;n++){const o=e[n];z(o,"hints"),r+=o,n!==t-1&&(r+=", ")}return r}throw new w("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}},1149:(e,t,r)=>{"use strict";const n=r(8712),o=r(4021),i=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=i,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>o}),e.exports.Stream=n.Stream,e.exports.default=e.exports},2415:(e,t,r)=>{"use strict";const{format:n,inspect:o,AggregateError:i}=r(9928),s=globalThis.AggregateError||i,a=Symbol("kIsNodeError"),u=["string","function","number","object","Function","Object","boolean","bigint","symbol"],c=/^([A-Z][a-z0-9]*)+$/,l={};function f(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function d(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function h(e,t,r){r||(r=Error);class o extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return f(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const o=(t.match(/%[dfijoOs]/g)||[]).length;return f(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),o.prototype.code=e,o.prototype[a]=!0,l[e]=o}function p(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{f("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const i=[],s=[],a=[];for(const e of t)f("string"==typeof e,"All expected entries have to be of type string"),u.includes(e)?i.push(e.toLowerCase()):c.test(e)?s.push(e):(f("object"!==e,'The value "object" should be written as "Object"'),a.push(e));if(s.length>0){const e=i.indexOf("object");-1!==e&&(i.splice(i,e,1),s.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{const e=i.pop();n+=`one of type ${i.join(", ")}, or ${e}`}}(s.length>0||a.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`an instance of ${s.join(", ")}, or ${e}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of ${a.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${o(r,{depth:-1})}`}else{let e=o(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=o(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;f(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return f(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=d(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=d(n)),n+="n"):n=o(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:p((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new s([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:p,codes:l}},5439:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Uint8Array}},9928:(e,t,r)=>{"use strict";const n=r(8834),o=Object.getPrototypeOf((async function(){})).constructor,i=globalThis.Blob||n.Blob,s=void 0!==i?function(e){return e instanceof i}:function(e){return!1};class a extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r<e.length;r++)t+=` ${e[r].stack}\n`;super(t),this.name="AggregateError",this.errors=e}}e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(e){let t=!1;return function(...r){t||(t=!0,e.apply(this,r))}},createDeferredPromise:function(){let e,t;return{promise:new Promise(((r,n)=>{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof o,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:s},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},8712:(e,t,r)=>{const{Buffer:n}=r(8834),{ObjectDefineProperty:o,ObjectKeys:i,ReflectApply:s}=r(5439),{promisify:{custom:a}}=r(9928),{streamReturningOperators:u,promiseReturningOperators:c}=r(2542),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(2415),f=r(5291),{pipeline:d}=r(7253),{destroyer:h}=r(4664),p=r(3803),y=r(4021),g=r(6140),b=e.exports=r(6767).Stream;b.isDisturbed=g.isDisturbed,b.isErrored=g.isErrored,b.isReadable=g.isReadable,b.Readable=r(538);for(const w of i(u)){const E=u[w];function m(...e){if(new.target)throw l();return b.Readable.from(s(E,this,e))}o(m,"name",{__proto__:null,value:E.name}),o(m,"length",{__proto__:null,value:E.length}),o(b.Readable.prototype,w,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const _ of i(c)){const S=c[_];function m(...e){if(new.target)throw l();return s(S,this,e)}o(m,"name",{__proto__:null,value:S.name}),o(m,"length",{__proto__:null,value:S.length}),o(b.Readable.prototype,_,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}b.Writable=r(4695),b.Duplex=r(8637),b.Transform=r(9643),b.PassThrough=r(1753),b.pipeline=d;const{addAbortSignal:v}=r(2349);b.addAbortSignal=v,b.finished=p,b.destroy=h,b.compose=f,o(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>y}),o(d,a,{__proto__:null,enumerable:!0,get:()=>y.pipeline}),o(p,a,{__proto__:null,enumerable:!0,get:()=>y.finished}),b.Stream=b,b._isUint8Array=function(e){return e instanceof Uint8Array},b._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},4021:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:o}=r(5439),{isIterable:i,isNodeStream:s,isWebStream:a}=r(6140),{pipelineImpl:u}=r(7253),{finished:c}=r(3803);r(8712),e.exports={finished:c,pipeline:function(...e){return new o(((t,r)=>{let o,c;const l=e[e.length-1];if(l&&"object"==typeof l&&!s(l)&&!i(l)&&!a(l)){const t=n(e);o=t.signal,c=t.end}u(e,((e,n)=>{e?r(e):t(n)}),{signal:o,end:c})}))}}},7948:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=a(e),s=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,f=u>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,c=n-o;a<c;a+=s)i.push(u(e,a,a+s>c?c:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(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 u(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2573:(e,t,r)=>{"use strict";var n=r(8834).Buffer,o=r(1329);function i(e,t){return void 0===t&&(t="utf8"),n.isBuffer(e)?a(e.toString("base64")):a(n.from(e,t).toString("base64"))}function s(e){return e=e.toString(),o.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function a(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var u=i;u.encode=i,u.decode=function(e,t){return void 0===t&&(t="utf8"),n.from(s(e),"base64").toString(t)},u.toBase64=s,u.fromBase64=a,u.toBuffer=function(e){return n.from(s(e),"base64")},t.default=u},1329:(e,t,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.length,r=t%4;if(!r)return e;var o=t,i=4-r,s=t+i,a=n.alloc(s);for(a.write(e);i--;)a.write("=",o++);return a.toString()}},9487:(e,t,r)=>{e.exports=r(2573).default,e.exports.default=e.exports},7160:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=r(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(r),s=Math.max(o,i),a=0,u=e.map([t,r],(function(t){var r=s-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(a=s-Math.min(o,i)),s-=1;s>=a;){if(u[0][s]>u[1][s])return 1;if(u[0][s]===u[1][s]){if(s===a)return 0;s-=1}else if(u[0][s]<u[1][s])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var o=e[r];if(t(o,r))return o}},e.assign=function(e){for(var t,r,n=e,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(i));var a=function(){var e=i[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=i.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||""},e}();t.default=o,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,o=(n=r(91))&&n.__esModule?n:{default:n},i=r(18);function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new o.default(e,t)},e.parse=function(e){return new o.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n=u(r(92)),o=u(r(93)),i=u(r(94)),s=u(r(95)),a=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(n.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,o={},i=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(o[t]=s,i+=1):"object"==typeof s&&(r[t]=s,n+=1)})),n>0){var s=Object.keys(r),u=a.default.find(s,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(r[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),h=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(o[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),o=a.default.getBrowserTypeByAlias(n);return t&&o&&(n=o.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(o,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},r=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=o.default.getMacOSVersionName(t),n={name:i.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=o.default.getAndroidVersionName(t),n={name:i.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:i.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},r=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},r=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},r=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},r=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},8834:(e,t,r)=>{"use strict";const n=r(5766),o=r(2333),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(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 f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const o=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),a(e<0?0:0|p(e))}function d(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(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');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(o)return n?-1:q(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,o){let i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let n=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*s}else-1!==n&&(i-=i-n),n=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function w(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let s;for(n>i/2&&(n=i/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Y(n))return s;e[r+s]=n}return s}function E(e,t,r,n){return J(q(t,e.length-r),e,r,n)}function _(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return J(G(t),e,r,n)}function A(e,t,r,n){return J(function(e,t){let r,n,o;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function R(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(o+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},u.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}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(K(t,Uint8Array))o+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,o){if(K(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){i=c[e],s=l[e];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"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,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return _(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function P(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function T(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=X[e[n]];return o}function N(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function j(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 C(e,t,r,n,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function B(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function L(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function M(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return t=+t,r>>>=0,i||M(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Z((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),u.prototype.readBigUInt64BE=Z((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||j(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Z((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Z((function(e){W(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Z((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Z((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let o=0,i=1,s=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Z((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Z((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.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);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},u.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),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=u.isBuffer(e)?e:u.from(e,n),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%s]}return this};const $={};function U(e,t,r){$[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new $.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function W(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw W(e,r),new $.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=D(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=D(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function q(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},2680:(e,t,r)=>{"use strict";var n=r(7286),o=r(9429),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},9429:(e,t,r)=>{"use strict";var n=r(4090),o=r(7286),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||n.call(s,i),u=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,s,arguments);return u&&c&&u(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};var f=function(){return a(n,i,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},5130:(e,t,r)=>{var n=r(4406);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("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+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(7123)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},7123:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(1378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},8797:(e,t,r)=>{var n=r(4406),o=r(7033),i=function(){},s=function(e,t,r){if("function"==typeof t)return s(e,null,t);t||(t={}),r=o(r||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||r.call(e)},p=function(){c=!1,l||r.call(e)},y=function(t){r.call(e,t?new Error("exited with error code: "+t):null)},g=function(t){r.call(e,t)},b=function(){n.nextTick(m)},m=function(){if(!f)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:r.call(e,new Error("premature close"))},v=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",b),e.req?v():e.on("request",v)):l&&!a&&(e.on("end",d),e.on("close",d)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",y),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",v),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",y),e.removeListener("end",p),e.removeListener("error",g),e.removeListener("close",b)}};e.exports=s},4723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;const n=r(7847);class o 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,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}toString(){return n.default(this.serialize(),i,2)}}function i(e,t){if("[Circular]"!==t)return t}t.EthereumRpcError=o,t.EthereumProviderError=class extends o{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)}}},4792:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.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}},t.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."}}},8159:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethErrors=void 0;const n=r(4723),o=r(894),i=r(4792);function s(e,t){const[r,i]=u(t);return new n.EthereumRpcError(e,r||o.getMessageFromCode(e),i)}function a(e,t){const[r,i]=u(t);return new n.EthereumProviderError(e,r||o.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||void 0,r]}}return[]}t.ethErrors={rpc:{parse:e=>s(i.errorCodes.rpc.parse,e),invalidRequest:e=>s(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(i.errorCodes.rpc.methodNotFound,e),internal:e=>s(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 s(t,e)},invalidInput:e=>s(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(i.errorCodes.rpc.limitExceeded,e)},provider:{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:o}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,o)}}}},8094:(e,t,r)=>{"use strict";t.Sy=void 0;r(4723),r(894);const n=r(8159);Object.defineProperty(t,"Sy",{enumerable:!0,get:function(){return n.ethErrors}});r(4792)},894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(4792),o=r(4723),i=n.errorCodes.rpc.internal,s={code:i,message:a(i)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(e)){const r=e.toString();if(f(n.errorValues,r))return n.errorValues[r].message;if(c(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function u(e){if(!Number.isInteger(e))return!1;const t=e.toString();return!!n.errorValues[t]||!!c(e)}function c(e){return e>=-32099&&e<=-32e3}function l(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=u,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!1}={}){var n,i;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 o.EthereumRpcError)return e.serialize();const c={};if(e&&"object"==typeof e&&!Array.isArray(e)&&f(e,"code")&&u(e.code)){const t=e;c.code=t.code,t.message&&"string"==typeof t.message?(c.message=t.message,f(t,"data")&&(c.data=t.data)):(c.message=a(c.code),c.data={originalError:l(e)})}else{c.code=t.code;const r=null===(n=e)||void 0===n?void 0:n.message;c.message=r&&"string"==typeof r?r:t.message,c.data={originalError:l(e)}}const d=null===(i=e)||void 0===i?void 0:i.stack;return r&&e&&d&&"string"==typeof d&&(c.stack=d),c}},1115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(3488),o=r(144);t.keccak224=(0,o.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,o.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,o.wrapHash)(n.keccak_384),t.keccak512=(0,o.wrapHash)(n.keccak_512)},1019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(520),o=r(300),i=r(551);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,i.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},7824:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(8767),o=r(7367),i=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>i;)r&s&&(n=n.add(o)),o=o.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),i=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,i.push(a);for(let e=1;e<o;e++)a=a.add(s),i.push(a);s=a.double()}return i},wNAF(t,o,i){const{windows:a,windowSize:u}=n(t);let c=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),d=2**t,h=BigInt(t);for(let e=0;e<a;e++){const t=e*u;let n=Number(i&f);i>>=h,n>u&&(n-=d,i+=s);const a=t,p=t+Math.abs(n)-1,y=e%2!=0,g=n<0;0===n?l=l.add(r(y,o[a])):c=c.add(r(g,o[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let i=t.get(e);return i||(i=this.precomputeWindow(e,o),1!==o&&t.set(e,n(i))),this.wNAF(o,i,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},9173:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(8767),o=r(7367),i=o.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function u(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){u(e),u(t),c(r),t.length>255&&(t=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:i,blockLen:l}=n,f=Math.ceil(r/i);if(f>255)throw new Error("Invalid xmd length");const d=(0,o.concatBytes)(t,s(t.length,1)),h=s(0,l),p=s(r,2),y=new Array(f),g=n((0,o.concatBytes)(h,e,p,s(0,1),d));y[0]=n((0,o.concatBytes)(g,s(1,1),d));for(let e=1;e<=f;e++){const t=[a(g,y[e-1]),s(e+1,1),d];y[e]=n((0,o.concatBytes)(...t))}return(0,o.concatBytes)(...y).slice(0,r)}function f(e,t,r,n,i){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=i.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function d(e,t,r){(0,o.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:d,hash:h,expand:p,DST:y}=r;u(e),c(t);const g=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(y),b=s.toString(2).length,m=Math.ceil((b+a)/8),v=t*d*m;let w;if("xmd"===p)w=l(e,g,v,h);else if("xof"===p)w=f(e,g,v,a,h);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let e=0;e<t;e++){const t=new Array(d);for(let r=0;r<d;r++){const o=m*(r+e*d),a=w.subarray(o,o+m);t[r]=(0,n.mod)(i(a),s)}E[e]=t}return E}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=d,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[o,i,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(o,i),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){const i=d(n,2,{...r,DST:r.DST,...o}),s=e.fromAffine(t(i[0])),a=e.fromAffine(t(i[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,o){const i=d(n,1,{...r,DST:r.encodeDST,...o}),s=e.fromAffine(t(i[0])).clearCofactor();return s.assertValidity(),s}}}},8767:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(7367),o=BigInt(0),i=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=o?r:t+r}function d(e,t,r){if(r<=o||t<o)throw new Error("Expected power/modulo > 0");if(r===i)return o;let n=i;for(;t>o;)t&i&&(n=n*e%r),e=e*e%r,t>>=i;return n}function h(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=o,a=i,u=i,c=o;for(;r!==o;){const e=n/r,t=n%r,o=s-u*e,i=a-c*e;n=r,r=t,s=u,a=c,u=o,c=i}if(n!==i)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-i)/s;let r,n,a;for(r=e-i,n=0;r%s===o;r/=s,n++);for(a=s;a<e&&d(a,t,e)!==e-i;a++);if(1===n){const t=(e+i)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const c=(r+i)/s;return function(e,o){if(e.pow(o,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,u=e.pow(e.mul(e.ONE,a),r),l=e.pow(o,c),f=e.pow(o,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(u,i<<BigInt(s-t-1));u=e.sqr(r),l=e.mul(l,r),f=e.mul(f,u),s=t}return l}}function y(e){if(e%u===a){const t=(e+i)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===c){const t=(e-c)/l;return function(e,r){const n=e.mul(r,s),o=e.pow(n,t),i=e.mul(r,o),a=e.mul(e.mul(i,s),o),u=e.mul(i,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),r))throw new Error("Cannot find square root");return u}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=d,t.pow2=function(e,t,r){let n=e;for(;t-- >o;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=p,t.FpSqrt=y,t.isNegativeLE=(e,t)=>(f(e,t)&i)===i;const g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r<o)throw new Error("Expected power > 0");if(r===o)return e.ONE;if(r===i)return t;let n=e.ONE,s=t;for(;r>o;)r&i&&(n=e.mul(n,s)),s=e.sqr(s),r>>=i;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){const t=g.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-i)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=o)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=v(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=y(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:o,ONE:i,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&t<e},is0:e=>e===o,isOdd:e=>(e&i)===i,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>b(l,e,t),div:(t,r)=>f(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:s.sqrt||(e=>c(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const o=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||o<s||o>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-i)+i}},7367:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),o=BigInt(2),i=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(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}function u(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(e.length%2)throw new Error("hex string is invalid: unpadded "+e.length);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,o=e.slice(n,n+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("invalid byte sequence");t[r]=i}return t}function f(...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}t.bytesToHex=a,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(a(e))},t.bytesToNumberLE=function(e){if(!i(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=(e,t)=>l(e.toString(16).padStart(2*t,"0")),t.numberToBytesLE=(e,r)=>(0,t.numberToBytesBE)(e,r).reverse(),t.numberToVarBytesBE=e=>l(u(e)),t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!i(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if("number"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n},t.concatBytes=f,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=(e,t)=>e>>BigInt(t)&n,t.bitSet=(e,t,o)=>e|(o?n:r)<<BigInt(t),t.bitMask=e=>(o<<BigInt(e-1))-n;const d=e=>new Uint8Array(e),h=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=d(e),o=d(e),i=0;const s=()=>{n.fill(1),o.fill(0),i=0},a=(...e)=>r(o,n,...e),u=(e=d())=>{o=a(h([0]),e),n=a(),0!==e.length&&(o=a(h([1]),e),n=a())},c=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return f(...r)};return(e,t)=>{let r;for(s(),u(e);!(r=t(c()));)u();return s(),r}};const p={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const o=p[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const i=e[t];if(!(n&&void 0===i||o(i,e)))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(8767),o=r(7367),i=r(7367),s=r(7824),{bytesToNumberBE:a,hexToBytes:u}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],o=e.subarray(2,n+2);if(!n||o.length!==n)throw new r("Invalid signature integer: wrong length");if(128&o[0])throw new r("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(o),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let o=n.length;if(o<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==o-2)throw new r("Invalid signature: incorrect length");const{d:i,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:c}=t.DER._parseInt(s);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,a=r(i),u=r(s);return`30${r(s+i+4)}02${u}${o}02${a}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),d=BigInt(3),h=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:o}=t,i=r.sqr(e),s=r.mul(i,e);return r.add(r.add(s,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function h(e){return"bigint"==typeof e&&c<e&&e<t.n}function p(e){if(!h(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function y(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:u}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=o.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let c;try{c="bigint"==typeof e?e:o.bytesToNumberBE((0,i.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(c=n.mod(c,u)),p(c),c}const g=new Map;function b(e){if(!(e instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof m)throw new Error("projective point not allowed");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(u((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(y(e))}_setWindowSize(e){this._WINDOW_SIZE=e,g.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),i=f(e);if(!r.eql(o,i))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){b(e);const{px:t,py:n,pz:o}=this,{px:i,py:s,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(i,o)),c=r.eql(r.mul(n,a),r.mul(s,o));return u&&c}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,d),{px:i,py:s,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(i,i),h=r.mul(s,s),p=r.mul(a,a),y=r.mul(i,s);return y=r.add(y,y),l=r.mul(i,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(o,p),c=r.add(u,c),u=r.sub(h,c),c=r.add(h,c),c=r.mul(u,c),u=r.mul(y,u),l=r.mul(o,l),p=r.mul(e,p),y=r.sub(f,p),y=r.mul(e,y),y=r.add(y,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,y),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,y),u=r.sub(u,f),l=r.mul(p,h),l=r.add(l,l),l=r.add(l,l),new m(u,c,l)}add(e){b(e);const{px:n,py:o,pz:i}=this,{px:s,py:a,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const h=t.a,p=r.mul(t.b,d);let y=r.mul(n,s),g=r.mul(o,a),v=r.mul(i,u),w=r.add(n,o),E=r.add(s,a);w=r.mul(w,E),E=r.add(y,g),w=r.sub(w,E),E=r.add(n,i);let _=r.add(s,u);return E=r.mul(E,_),_=r.add(y,v),E=r.sub(E,_),_=r.add(o,i),c=r.add(a,u),_=r.mul(_,c),c=r.add(g,v),_=r.sub(_,c),f=r.mul(h,E),c=r.mul(p,v),f=r.add(c,f),c=r.sub(g,f),f=r.add(g,f),l=r.mul(c,f),g=r.add(y,y),g=r.add(g,y),v=r.mul(h,v),E=r.mul(p,E),g=r.add(g,v),v=r.sub(y,v),v=r.mul(h,v),E=r.add(E,v),y=r.mul(g,E),l=r.add(l,y),y=r.mul(_,E),c=r.mul(w,c),c=r.sub(c,y),y=r.mul(w,g),f=r.mul(_,f),f=r.add(f,y),new m(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return w.wNAFCached(this,g,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:o}=t;if(!o)return w.unsafeLadder(this,e);let{k1neg:i,k1:s,k2neg:a,k2:u}=o.splitScalar(e),f=n,d=n,h=this;for(;s>c||u>c;)s&l&&(f=f.add(h)),u&l&&(d=d.add(h)),h=h.double(),s>>=l,u>>=l;return i&&(f=f.negate()),a&&(d=d.negate()),d=new m(r.mul(d.px,o.beta),d.py,d.pz),f.add(d)}multiply(e){p(e);let n,o,i=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:u}=s.splitScalar(i);let{p:c,f:l}=this.wNAF(t),{p:f,f:d}=this.wNAF(u);c=w.constTimeNegate(e,c),f=w.constTimeNegate(a,f),f=new m(r.mul(f.px,s.beta),f.py,f.pz),n=c.add(f),o=l.add(d)}else{const{p:e,f:t}=this.wNAF(i);n=e,o=t}return m.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,o=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,r));return i.is0()?void 0:i}toAffine(e){const{px:t,py:n,pz:o}=this,i=this.is0();null==e&&(e=i?r.ONE:r.inv(o));const s=r.mul(t,e),a=r.mul(n,e),u=r.mul(o,e);if(i)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(m,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:y,weierstrassEquation:f,isWithinCurveOrder:h}}function y(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const o=n,i=(r-l)/f**o,s=(i-l)/f,a=f**o-l,u=f**(o-l),p=e.pow(t,i),y=e.pow(t,(i+l)/f);let g=(t,r)=>{let n=p,i=e.pow(r,a),c=e.sqr(i);c=e.mul(c,r);let d=e.mul(t,c);d=e.pow(d,s),d=e.mul(d,i),i=e.mul(d,r),c=e.mul(d,t);let h=e.mul(c,i);d=e.pow(h,u);let g=e.eql(d,e.ONE);i=e.mul(c,y),d=e.mul(h,n),c=e.cmov(i,c,g),h=e.cmov(d,h,g);for(let t=o;t>l;t--){let r=f**(t-f),o=e.pow(h,r);const s=e.eql(o,e.ONE);i=e.mul(c,n),n=e.mul(n,n),o=e.mul(h,n),c=e.cmov(i,c,s),h=e.cmov(o,h,s)}return{isValid:g,value:c}};if(e.ORDER%h===d){const r=(e.ORDER-d)/h,n=e.sqrt(e.neg(t));g=(t,o)=>{let i=e.sqr(o);const s=e.mul(t,o);i=e.mul(i,s);let a=e.pow(i,r);a=e.mul(a,s);const u=e.mul(a,n),c=e.mul(e.sqr(a),o),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return g}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:u}=r,f=a.BYTES+1,d=2*a.BYTES+1;function h(e){return n.mod(e,u)}function y(e){return n.invert(e,u)}const{ProjectivePoint:g,normPrivateKeyToScalar:b,weierstrassEquation:m,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),i=a.toBytes(n.x),s=o.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===d&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${d} uncompressed bytes`)}{const e=o.bytesToNumberBE(n);if(!(c<(i=e)&&i<a.ORDER))throw new Error("Point is not on curve");const t=m(e);let s=a.sqrt(t);return 1==(1&r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var i}}),w=e=>o.bytesToHex(o.numberToBytesBE(e,r.nByteLength));function E(e){return e>u>>l}const _=(e,t,r)=>o.bytesToNumberBE(e.slice(t,r));class S{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,i.ensureBytes)("compactSignature",e,2*t),new S(_(e,0,t),_(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,i.ensureBytes)("DER",e));return new S(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new S(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:o}=this,s=x((0,i.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const u=2===o||3===o?t+r.n:t;if(u>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=0==(1&o)?"02":"03",l=g.fromHex(c+w(u)),f=y(u),d=h(-s*f),p=h(n*f),b=g.BASE.multiplyAndAddUnsafe(l,d,p);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const A={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=r.randomBytes(a.BYTES+8),t=n.hashToPrivateScalar(e,u);return o.numberToBytesBE(t,r.nByteLength)},precompute:(e=8,t=g.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function O(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===d:r?n===2*f||n===2*d:e instanceof g}const R=r.bits2int||function(e){const t=o.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},x=r.bits2int_modN||function(e){return h(R(e))},I=o.bitMask(r.nBitLength);function P(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&e<I))throw new Error(`bigint expected < 2^${r.nBitLength}`);return o.numberToBytesBE(e,r.nByteLength)}const T={lowS:r.lowS,prehash:!1},N={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return g.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(O(e))throw new Error("first arg must be private key");if(!O(t))throw new Error("second arg must be public key");return g.fromHex(t).multiply(b(e)).toRawBytes(r)},sign:function(e,t,n=T){const{seed:s,k2sig:u}=function(e,t,n=T){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=r;let{lowS:f,prehash:d,extraEntropy:p}=n;null==f&&(f=!0),e=(0,i.ensureBytes)("msgHash",e),d&&(e=(0,i.ensureBytes)("prehashed msgHash",s(e)));const m=x(e),w=b(t),_=[P(w),P(m)];if(null!=p){const e=!0===p?u(a.BYTES):p;_.push((0,i.ensureBytes)("extraEntropy",e,a.BYTES))}const A=o.concatBytes(..._),O=m;return{seed:A,k2sig:function(e){const t=R(e);if(!v(t))return;const r=y(t),n=g.BASE.multiply(t).toAffine(),o=h(n.x);if(o===c)return;const i=h(r*h(O+o*w));if(i===c)return;let s=(n.x===o?0:2)|Number(n.y&l),a=i;return f&&E(i)&&(a=function(e){return E(e)?h(-e):e}(i),s^=1),new S(o,a,s)}}}(e,t,n);return o.createHmacDrbg(r.hash.outputLen,r.nByteLength,r.hmac)(s,u)},verify:function(e,n,o,s=N){const a=e;if(n=(0,i.ensureBytes)("msgHash",n),o=(0,i.ensureBytes)("publicKey",o),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=S.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=S.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new S(e,t)}}f=g.fromHex(o)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:d,s:p}=l,b=x(n),m=y(p),v=h(b*m),w=h(d*m),E=g.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!E&&h(E.x)===d},ProjectivePoint:g,Signature:S,utils:A}},t.SWUFpSqrtRatio=y,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=y(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,i,s,a,u,c,l,f;o=e.sqr(n),o=e.mul(o,t.Z),i=e.sqr(o),i=e.add(i,o),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),c=e.sqr(a),u=e.mul(c,t.A),i=e.add(i,u),i=e.mul(i,s),c=e.mul(c,a),u=e.mul(c,t.B),i=e.add(i,u),l=e.mul(o,s);const{isValid:d,value:h}=r(i,c);f=e.mul(o,n),f=e.mul(f,h),l=e.cmov(l,s,d),f=e.cmov(f,h,d);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},2934:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const o=r(3426),i=r(300),s=r(8767),a=r(551),u=r(7367),c=r(9173),l=r(1019),f=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),p=BigInt(2),y=(e,t)=>(e+t/p)/t;function g(e){const t=f,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),l=e*e*e%t,d=l*l*e%t,h=(0,s.pow2)(d,r,t)*d%t,y=(0,s.pow2)(h,r,t)*d%t,g=(0,s.pow2)(y,p,t)*l%t,m=(0,s.pow2)(g,o,t)*g%t,v=(0,s.pow2)(m,i,t)*m%t,w=(0,s.pow2)(v,u,t)*v%t,E=(0,s.pow2)(w,c,t)*w%t,_=(0,s.pow2)(E,u,t)*v%t,S=(0,s.pow2)(_,r,t)*d%t,A=(0,s.pow2)(S,a,t)*m%t,O=(0,s.pow2)(A,n,t)*l%t,R=(0,s.pow2)(O,p,t);if(!b.eql(b.sqr(R),e))throw new Error("Cannot find square root");return R}const b=(0,s.Field)(f,void 0,void 0,{sqrt:g});t.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=d,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,a=BigInt("0x100000000000000000000000000000000"),u=y(i*e,t),c=y(-n*e,t);let l=(0,s.mod)(e-u*r-c*o,t),f=(0,s.mod)(-u*n-c*i,t);const p=l>a,g=f>a;if(p&&(l=t-l),g&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:l,k2neg:g,k2:f}}}},o.sha256);const m=BigInt(0),v=e=>"bigint"==typeof e&&m<e&&e<f,w={};function E(e,...t){let r=w[e];if(void 0===r){const t=(0,o.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,u.concatBytes)(t,t),w[e]=r}return(0,o.sha256)((0,u.concatBytes)(r,...t))}const _=e=>e.toRawBytes(!0).slice(1),S=e=>(0,u.numberToBytesBE)(e,32),A=e=>(0,s.mod)(e,f),O=e=>(0,s.mod)(e,d),R=t.secp256k1.ProjectivePoint;function x(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=R.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:O(-r),bytes:_(n)}}function I(e){if(!v(e))throw new Error("bad x: need 0 < x < p");const t=A(e*e);let r=g(A(t*e+BigInt(7)));r%p!==m&&(r=A(-r));const n=new R(e,r,h);return n.assertValidity(),n}function P(...e){return O((0,u.bytesToNumberBE)(E("BIP0340/challenge",...e)))}function T(e,t,r){const n=(0,u.ensureBytes)("signature",e,64),o=(0,u.ensureBytes)("message",t),i=(0,u.ensureBytes)("publicKey",r,32);try{const e=I((0,u.bytesToNumberBE)(i)),t=(0,u.bytesToNumberBE)(n.subarray(0,32));if(!v(t))return!1;const r=(0,u.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&m<l&&l<d))return!1;const f=P(S(t),_(e),o),h=(s=e,a=r,c=O(-f),R.BASE.multiplyAndAddUnsafe(s,a,c));return!(!h||!h.hasEvenY()||h.toAffine().x!==t)}catch(e){return!1}var s,a,c,l}t.schnorr={getPublicKey:function(e){return x(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,u.ensureBytes)("message",e),{bytes:o,scalar:s}=x(t),a=(0,u.ensureBytes)("auxRand",r,32),c=S(s^(0,u.bytesToNumberBE)(E("BIP0340/aux",a))),l=E("BIP0340/nonce",c,o,n),f=O((0,u.bytesToNumberBE)(l));if(f===m)throw new Error("sign failed: k is zero");const{bytes:d,scalar:h}=x(f),p=P(d,o,n),y=new Uint8Array(64);if(y.set(d,0),y.set(S(O(h+p*s)),32),!T(y,n,o))throw new Error("sign: Invalid signature produced");return y},verify:T,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:I,pointToBytes:_,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:E,mod:s.mod}};const N=c.isogenyMap(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))),j=(0,a.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))});n=c.createHasher(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=j(b.create(e[0]));return N(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:o.sha256}),t.hashToCurve=n.hashToCurve,t.encodeToCurve=n.encodeToCurve},1839:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(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 a(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=o,t.hash=i,t.exists=s,t.output=a;const u={number:r,bool:n,bytes:o,hash:i,exists:s,output:a};t.default=u},6214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(1839),o=r(300);class i extends o.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){n.default.exists(this);const{view:t,buffer:r,blockLen:i}=this,s=(e=(0,o.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(i-this.pos,s-n);if(a!==i)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===i&&(this.process(t,0),this.pos=0);else{const t=(0,o.createView)(e);for(;i<=s-n;n+=i)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){n.default.exists(this),n.default.output(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:i,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let e=a;e<i;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),a=Number(r&i),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}(r,i-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,o.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:i,pos:s}=this;return e.length=n,e.pos=s,e.finished=o,e.destroyed=i,n%t&&e.buffer.set(r),e}}t.SHA2=i},2426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function i(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:a}=o(e[i],t);[r[i],n[i]]=[s,a]}return[r,n]}function s(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}t.fromBig=o,t.split=i,t.toBig=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0),t.add=s;const a={fromBig:o,split:i,toBig:t.toBig,shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:(e,t,r)=>e<<r|t>>>32-r,rotlSL:(e,t,r)=>t<<r|e>>>32-r,rotlBH:(e,t,r)=>t<<r-32|e>>>64-r,rotlBL:(e,t,r)=>e<<r-32|t>>>64-r,add:s,add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,add5H:(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0,add5L:(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0)};t.default=a},4937:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const n=r(1839),o=r(300);class i extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.default.hash(e);const r=(0,o.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return n.default.exists(this),this.iHash.update(e),this}digestInto(e){n.default.exists(this),n.default.bytes(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:i,outputLen:s}=this;return e.finished=n,e.destroyed=o,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.hmac=(e,t,r)=>new i(e,t).update(r).digest(),t.hmac.create=(e,t)=>new i(e,t)},3426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(6214),o=r(300),i=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:i,G:s,H:a}=this;return[e,t,r,n,o,i,s,a]}set(e,t,r,n,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;u[e]=i+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:f,G:d,H:h}=this;for(let e=0;e<64;e++){const t=h+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((p=l)&f^~p&d)+s[e]+u[e]|0,y=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+i(r,n,a)|0;h=d,d=f,f=l,l=c+t|0,c=a,a=n,n=r,r=t+y|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,d=d+this.G|0,h=h+this.H|0,this.set(r,n,a,c,l,f,d,h)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new c)),t.sha224=(0,o.wrapConstructor)((()=>new l))},3488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(1839),o=r(2426),i=r(300),[s,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],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let o=c;for(let e=0;e<7;e++)t=(t<<l^(t>>d)*p)%h,t&f&&(o^=l<<(l<<BigInt(e))-l);u.push(o)}const[y,g]=o.default.split(u,!0),b=(e,t,r)=>r>32?o.default.rotlBH(e,t,r):o.default.rotlSH(e,t,r),m=(e,t,r)=>r>32?o.default.rotlBL(e,t,r):o.default.rotlSL(e,t,r);function v(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,o=(t+2)%10,i=r[o],s=r[o+1],a=b(i,s,1)^r[n],u=m(i,s,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],o=e[3];for(let r=0;r<24;r++){const n=a[r],i=b(t,o,n),u=m(t,o,n),c=s[r];t=e[c],o=e[c+1],e[c]=i,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]^=y[n],e[1]^=g[n]}r.fill(0)}t.keccakP=v;class w extends i.Hash{constructor(e,t,r,o=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,n.default.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,i.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){n.default.exists(this);const{blockLen:t,state:r}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n<o;){const i=Math.min(t-this.pos,o-n);for(let t=0;t<i;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){n.default.exists(this,!1),n.default.bytes(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return n.default.number(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(n.default.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:o,enableXOF:i}=this;return e||(e=new w(t,r,n,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,r)=>(0,i.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const _=(e,t,r)=>(0,i.wrapConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=_(31,168,16),t.shake256=_(31,136,32)},300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(4937);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function i(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function s(e){if("string"==typeof e&&(e=i(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=2*r,o=e.slice(n,n+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");t[r]=i}return t},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-o;e>=0&&e<r||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=i,t.toBytes=s,t.concatBytes=function(...e){if(!e.every((e=>e instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r},t.Hash=class{clone(){return this._cloneInto()}},t.checkOpts=function(e,t){if(void 0!==t&&("object"!=typeof t||(r=t,"[object Object]"!==Object.prototype.toString.call(r)||r.constructor!==Object)))throw new TypeError("Options should be object or undefined");var r;return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(s(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(s(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.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")}},101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(2934);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},144:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const o=n(r(1839)),i=r(300),s=o.default.bool;t.assertBool=s;const a=o.default.bytes;t.assertBytes=a;var u=r(300);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return u.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return u.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return u.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return u.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,i.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(o.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof self&&"crypto"in self?self.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},2699:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.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 i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var o,i,s,c;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(e))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=l.bind(n);return o.listener=r,n.wrapFn=o,o}function d(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]: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}(o):p(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(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 o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},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+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.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},i.prototype.getMaxListeners=function(){return u(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,o,i,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))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(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);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(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7847:e=>{e.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var t="[...]",r="[Circular]",n=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=i()),u(e,"",0,[],void 0,0,s);try{a=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(e,t,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:e}),n.push([i,r,t,s])):o.push([t,r,e]):(i[r]=e,n.push([i,r,t]))}function u(e,n,o,i,s,c,l){var f;if(c+=1,"object"==typeof e&&null!==e){for(f=0;f<i.length;f++)if(i[f]===e)return void a(r,e,n,s);if(void 0!==l.depthLimit&&c>l.depthLimit)return void a(t,e,n,s);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(t,e,n,s);if(i.push(e),Array.isArray(e))for(f=0;f<e.length;f++)u(e[f],f,f,i,e,c,l);else{var d=Object.keys(e);for(f=0;f<d.length;f++){var h=d[f];u(e[h],h,f,i,e,c,l)}}i.pop()}}function c(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,s){void 0===s&&(s=i());var a,u=f(e,"",0,[],void 0,0,s)||e;try{a=0===o.length?JSON.stringify(u,t,r):JSON.stringify(u,d(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function f(e,o,i,s,u,l,d){var h;if(l+=1,"object"==typeof e&&null!==e){for(h=0;h<s.length;h++)if(s[h]===e)return void a(r,e,o,u);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==d.depthLimit&&l>d.depthLimit)return void a(t,e,o,u);if(void 0!==d.edgesLimit&&i+1>d.edgesLimit)return void a(t,e,o,u);if(s.push(e),Array.isArray(e))for(h=0;h<e.length;h++)f(e[h],h,h,s,e,l,d);else{var p={},y=Object.keys(e).sort(c);for(h=0;h<y.length;h++){var g=y[h];f(e[g],g,h,s,e,l,d),p[g]=e[g]}if(void 0===u)return p;n.push([u,o,e]),u[o]=p}s.pop()}}function d(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)}}},3243:(e,t,r)=>{"use strict";var n=r(9680),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,s):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s)}},7795:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i=t.call(arguments,1),s=Math.max(0,n.length-i.length),a=[],u=0;u<s;u++)a.push("$"+u);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,i.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,i.concat(t.call(arguments)))})),n.prototype){var c=function(){};c.prototype=n.prototype,o.prototype=new c,c.prototype=null}return o}},4090:(e,t,r)=>{"use strict";var n=r(7795);e.exports=Function.prototype.bind||n},7286:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,s=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new s},l=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,f=r(2636)(),d=r(8486)(),h=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),p={},y="undefined"!=typeof Uint8Array&&h?h(Uint8Array):n,g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f&&h?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&h?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f&&h?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f&&h?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&h?h(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":y,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(h)try{null.error}catch(e){var b=h(h(e));g["%Error.prototype%"]=b}var m=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&h&&(r=h(o.prototype))}return g[t]=r,r},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=r(4090),E=r(3198),_=w.call(Function.call,Array.prototype.concat),S=w.call(Function.apply,Array.prototype.splice),A=w.call(Function.call,String.prototype.replace),O=w.call(Function.call,String.prototype.slice),R=w.call(Function.call,RegExp.prototype.exec),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,P=function(e,t){var r,n=e;if(E(v,n)&&(n="%"+(r=v[n])[0]+"%"),E(g,n)){var i=g[n];if(i===p&&(i=m(n)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===R(/^%?[^%]*%?$/,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=O(e,0,1),r=O(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return A(e,x,(function(e,t,r,o){n[n.length]=r?A(o,I,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",i=P("%"+n+"%",t),a=i.name,c=i.value,l=!1,f=i.alias;f&&(n=f[0],S(r,_([0,1],f)));for(var d=1,h=!0;d<r.length;d+=1){var p=r[d],y=O(p,0,1),b=O(p,-1);if(('"'===y||"'"===y||"`"===y||'"'===b||"'"===b||"`"===b)&&y!==b)throw new o("property names with quotes must have matching quotes");if("constructor"!==p&&h||(l=!0),E(g,a="%"+(n+="."+p)+"%"))c=g[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&d+1>=r.length){var m=u(c,p);c=(h=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else h=E(c,p),c=c[p];h&&!l&&(g[a]=c)}}return c}},326:(e,t,r)=>{"use strict";var n=r(7286)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8486:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},2636:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(6679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},6679:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7226:(e,t,r)=>{"use strict";var n=r(6679);e.exports=function(){return n()&&!!Symbol.toStringTag}},3198:(e,t,r)=>{"use strict";var n=r(4090);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},2333:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?o-1:0,d=r?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=d,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=d,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=c}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+h]=255&s,h+=p,s/=256,c-=8);e[r+h-p]|=128*y}},1285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2635:(e,t,r)=>{"use strict";var n=r(7226)(),o=r(2680)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,e.exports=a?i:s},9680:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,s=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var d=document.all;u.call(d)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(s(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},3138:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(7226)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(i.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},198:(e,t,r)=>{"use strict";var n=r(3243),o=r(2191),i=r(2680),s=i("Object.prototype.toString"),a=r(7226)(),u=r(326),c="undefined"==typeof globalThis?r.g:globalThis,l=o(),f=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},d=i("String.prototype.slice"),h={},p=Object.getPrototypeOf;a&&u&&p&&n(l,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var r=p(t),n=u(r,Symbol.toStringTag);if(!n){var o=p(r);n=u(o,Symbol.toStringTag)}h[e]=n.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=d(s(e),8,-1);return f(l,t)>-1}return!!u&&function(e){var t=!1;return n(h,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},3349:e=>{e.exports=function(e){var t=(e=e||{}).max||Number.MAX_SAFE_INTEGER,r=void 0!==e.start?e.start:Math.floor(Math.random()*t);return function(){return r%=t,r++}}},1344:(e,t,r)=>{e=r.nmd(e);var n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",c="[object Null]",l="[object Object]",f="[object Proxy]",d="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,y={};y["[object Float32Array]"]=y["[object Float64Array]"]=y["[object Int8Array]"]=y["[object Int16Array]"]=y["[object Int32Array]"]=y["[object Uint8Array]"]=y["[object Uint8ClampedArray]"]=y["[object Uint16Array]"]=y["[object Uint32Array]"]=!0,y[i]=y["[object Array]"]=y["[object ArrayBuffer]"]=y["[object Boolean]"]=y["[object DataView]"]=y["[object Date]"]=y["[object Error]"]=y[a]=y["[object Map]"]=y["[object Number]"]=y[l]=y["[object RegExp]"]=y["[object Set]"]=y["[object String]"]=y["[object WeakMap]"]=!1;var g,b,m,v="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,w="object"==typeof self&&self&&self.Object===Object&&self,E=v||w||Function("return this")(),_=t&&!t.nodeType&&t,S=_&&e&&!e.nodeType&&e,A=S&&S.exports===_,O=A&&v.process,R=function(){try{return S&&S.require&&S.require("util").types||O&&O.binding&&O.binding("util")}catch(e){}}(),x=R&&R.isTypedArray,I=Array.prototype,P=Function.prototype,T=Object.prototype,N=E["__core-js_shared__"],j=P.toString,C=T.hasOwnProperty,B=(g=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",L=T.toString,M=j.call(Object),k=RegExp("^"+j.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),F=A?E.Buffer:void 0,$=E.Symbol,U=E.Uint8Array,D=(F&&F.allocUnsafe,b=Object.getPrototypeOf,m=Object,function(e){return b(m(e))}),H=Object.create,W=T.propertyIsEnumerable,z=I.splice,V=$?$.toStringTag:void 0,q=function(){try{var e=de(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),G=F?F.isBuffer:void 0,J=Math.max,K=Date.now,Y=de(E,"Map"),X=de(Object,"create"),Z=function(){function e(){}return function(t){if(!Ae(t))return{};if(H)return H(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Q(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function te(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function re(e){var t=this.__data__=new ee(e);this.size=t.size}function ne(e,t,r){(void 0!==r&&!be(e[t],r)||void 0===r&&!(t in e))&&se(e,t,r)}function oe(e,t,r){var n=e[t];C.call(e,t)&&be(n,r)&&(void 0!==r||t in e)||se(e,t,r)}function ie(e,t){for(var r=e.length;r--;)if(be(e[r][0],t))return r;return-1}function se(e,t,r){"__proto__"==t&&q?q(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}Q.prototype.clear=function(){this.__data__=X?X(null):{},this.size=0},Q.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Q.prototype.get=function(e){var t=this.__data__;if(X){var r=t[e];return r===n?void 0:r}return C.call(t,e)?t[e]:void 0},Q.prototype.has=function(e){var t=this.__data__;return X?void 0!==t[e]:C.call(t,e)},Q.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=X&&void 0===t?n:t,this},ee.prototype.clear=function(){this.__data__=[],this.size=0},ee.prototype.delete=function(e){var t=this.__data__,r=ie(t,e);return!(r<0||(r==t.length-1?t.pop():z.call(t,r,1),--this.size,0))},ee.prototype.get=function(e){var t=this.__data__,r=ie(t,e);return r<0?void 0:t[r][1]},ee.prototype.has=function(e){return ie(this.__data__,e)>-1},ee.prototype.set=function(e,t){var r=this.__data__,n=ie(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},te.prototype.clear=function(){this.size=0,this.__data__={hash:new Q,map:new(Y||ee),string:new Q}},te.prototype.delete=function(e){var t=fe(this,e).delete(e);return this.size-=t?1:0,t},te.prototype.get=function(e){return fe(this,e).get(e)},te.prototype.has=function(e){return fe(this,e).has(e)},te.prototype.set=function(e,t){var r=fe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},re.prototype.clear=function(){this.__data__=new ee,this.size=0},re.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ee){var n=r.__data__;if(!Y||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new te(n)}return r.set(e,t),this.size=r.size,this};function ae(e){return null==e?void 0===e?d:c:V&&V in Object(e)?function(e){var t=C.call(e,V),r=e[V];try{e[V]=void 0;var n=!0}catch(e){}var o=L.call(e);return n&&(t?e[V]=r:delete e[V]),o}(e):function(e){return L.call(e)}(e)}function ue(e){return Oe(e)&&ae(e)==i}function ce(e,t,r,n,o){e!==t&&function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[++n];if(!1===t(o[a],a,o))break}}(t,(function(i,s){if(o||(o=new re),Ae(i))!function(e,t,r,n,o,i,s){var a=ye(e,r),u=ye(t,r),c=s.get(u);if(c)ne(e,r,c);else{var f,d,h,p,y,g=i?i(a,u,r+"",e,t,s):void 0,b=void 0===g;if(b){var m=ve(u),v=!m&&Ee(u),w=!m&&!v&&Re(u);g=u,m||v||w?ve(a)?g=a:Oe(y=a)&&we(y)?g=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(a):v?(b=!1,g=function(e,t){return e.slice()}(u)):w?(b=!1,p=new(h=(f=u).buffer).constructor(h.byteLength),new U(p).set(new U(h)),d=p,g=new f.constructor(d,f.byteOffset,f.length)):g=[]:function(e){if(!Oe(e)||ae(e)!=l)return!1;var t=D(e);if(null===t)return!0;var r=C.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&j.call(r)==M}(u)||me(u)?(g=a,me(a)?g=function(e){return function(e,t,r,n){var o=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var a=t[i],u=void 0;void 0===u&&(u=e[a]),o?se(r,a,u):oe(r,a,u)}return r}(e,xe(e))}(a):Ae(a)&&!_e(a)||(g=function(e){return"function"!=typeof e.constructor||pe(e)?{}:Z(D(e))}(u))):b=!1}b&&(s.set(u,g),o(g,u,n,i,s),s.delete(u)),ne(e,r,g)}}(e,t,s,r,ce,n,o);else{var a=n?n(ye(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),ne(e,s,a)}}),xe)}var le=q?function(e,t){return q(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Te;function fe(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function de(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ae(e)||function(e){return!!B&&B in e}(e))&&(_e(e)?k:h).test(function(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}(r)?r:void 0}function he(e,t){var r=typeof e;return!!(t=null==t?o:t)&&("number"==r||"symbol"!=r&&p.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}function ye(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ge=function(e){var t=0,r=0;return function(){var n=K(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(le);function be(e,t){return e===t||e!=e&&t!=t}var me=ue(function(){return arguments}())?ue:function(e){return Oe(e)&&C.call(e,"callee")&&!W.call(e,"callee")},ve=Array.isArray;function we(e){return null!=e&&Se(e.length)&&!_e(e)}var Ee=G||function(){return!1};function _e(e){if(!Ae(e))return!1;var t=ae(e);return t==a||t==u||t==s||t==f}function Se(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Ae(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oe(e){return null!=e&&"object"==typeof e}var Re=x?function(e){return function(t){return e(t)}}(x):function(e){return Oe(e)&&Se(e.length)&&!!y[ae(e)]};function xe(e){return we(e)?function(e,t){var r=ve(e),n=!r&&me(e),o=!r&&!n&&Ee(e),i=!r&&!n&&!o&&Re(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var c in e)!t&&!C.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||he(c,u))||a.push(c);return a}(e,!0):function(e){if(!Ae(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=pe(e),r=[];for(var n in e)("constructor"!=n||!t&&C.call(e,n))&&r.push(n);return r}(e)}var Ie,Pe=(Ie=function(e,t,r){ce(e,t,r)},function(e,t){return ge(function(e,t,r){return t=J(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=J(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,Te),e+"")}((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=Ie.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!Ae(r))return!1;var n=typeof t;return!!("number"==n?we(r)&&he(t,r.length):"string"==n&&t in r)&&be(r[t],e)}(t[0],t[1],i)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var s=t[r];s&&Ie(e,s,r)}return e})));function Te(e){return e}e.exports=Pe},6635:function(e,t,r){var n;e=r.nmd(e),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",b="[object Boolean]",m="[object Date]",v="[object Error]",w="[object Function]",E="[object GeneratorFunction]",_="[object Map]",S="[object Number]",A="[object Object]",O="[object Promise]",R="[object RegExp]",x="[object Set]",I="[object String]",P="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",j="[object DataView]",C="[object Float32Array]",B="[object Float64Array]",L="[object Int8Array]",M="[object Int16Array]",k="[object Int32Array]",F="[object Uint8Array]",$="[object Uint8ClampedArray]",U="[object Uint16Array]",D="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,G=RegExp(V.source),J=RegExp(q.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,me=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,we=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ae="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",Re="\\ufe0e\\ufe0f",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+Ee+"]",Pe="["+xe+"]",Te="["+_e+"]",Ne="\\d+",je="["+Se+"]",Ce="["+Ae+"]",Be="[^"+Ee+xe+Ne+Se+Ae+Oe+"]",Le="\\ud83c[\\udffb-\\udfff]",Me="[^"+Ee+"]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Oe+"]",Ue="\\u200d",De="(?:"+Ce+"|"+Be+")",He="(?:"+$e+"|"+Be+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ve="(?:"+Te+"|"+Le+")?",qe="["+Re+"]?",Ge=qe+Ve+"(?:"+Ue+"(?:"+[Me,ke,Fe].join("|")+")"+qe+Ve+")*",Je="(?:"+[je,ke,Fe].join("|")+")"+Ge,Ke="(?:"+[Me+Te+"?",Te,ke,Fe,Ie].join("|")+")",Ye=RegExp("['’]","g"),Xe=RegExp(Te,"g"),Ze=RegExp(Le+"(?="+Le+")|"+Ke+Ge,"g"),Qe=RegExp([$e+"?"+Ce+"+"+We+"(?="+[Pe,$e,"$"].join("|")+")",He+"+"+ze+"(?="+[Pe,$e+De,"$"].join("|")+")",$e+"?"+De+"+"+We,$e+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Je].join("|"),"g"),et=RegExp("["+Ue+Ee+_e+Re+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,ot={};ot[C]=ot[B]=ot[L]=ot[M]=ot[k]=ot[F]=ot[$]=ot[U]=ot[D]=!0,ot[y]=ot[g]=ot[N]=ot[b]=ot[j]=ot[m]=ot[v]=ot[w]=ot[_]=ot[S]=ot[A]=ot[R]=ot[x]=ot[I]=ot[T]=!1;var it={};it[y]=it[g]=it[N]=it[j]=it[b]=it[m]=it[C]=it[B]=it[L]=it[M]=it[k]=it[_]=it[S]=it[A]=it[R]=it[x]=it[I]=it[P]=it[F]=it[$]=it[U]=it[D]=!0,it[v]=it[w]=it[T]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),dt=t&&!t.nodeType&&t,ht=dt&&e&&!e.nodeType&&e,pt=ht&&ht.exports===dt,yt=pt&&ct.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),bt=gt&&gt.isArrayBuffer,mt=gt&&gt.isDate,vt=gt&&gt.isMap,wt=gt&&gt.isRegExp,Et=gt&&gt.isSet,_t=gt&&gt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function At(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o<i;){var s=e[o];t(n,s,r(s),e)}return n}function Ot(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Rt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function xt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function Pt(e,t){return!(null==e||!e.length)&&$t(e,t,0)>-1}function Tt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function jt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Ct(e,t,r,n){var o=-1,i=null==e?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function Bt(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Lt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Mt=Wt("length");function kt(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function Ft(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function $t(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Dt,r)}function Ut(e,t,r,n){for(var o=r-1,i=e.length;++o<i;)if(n(e[o],t))return o;return-1}function Dt(e){return e!=e}function Ht(e,t){var r=null==e?0:e.length;return r?qt(e,t)/r:d}function Wt(e){return function(t){return null==t?o:t[e]}}function zt(e){return function(t){return null==e?o:e[t]}}function Vt(e,t,r,n,o){return o(e,(function(e,o,i){r=n?(n=!1,e):t(r,e,o,i)})),r}function qt(e,t){for(var r,n=-1,i=e.length;++n<i;){var s=t(e[n]);s!==o&&(r=r===o?s:r+s)}return r}function Gt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Jt(e){return e?e.slice(0,fr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Yt(e,t){return Nt(t,(function(t){return e[t]}))}function Xt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&$t(t,e[r],0)>-1;);return r}function Qt(e,t){for(var r=e.length;r--&&$t(t,e[r],0)>-1;);return r}var er=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),tr=zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rr(e){return"\\"+st[e]}function nr(e){return et.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ir(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,i[o++]=r)}return i}function ar(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function cr(e){return nr(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Mt(e)}function lr(e){return nr(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function fr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var dr=zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hr=function e(t){var r,n=(t=null==t?ft:hr.defaults(ft.Object(),t,hr.pick(ft,rt))).Array,oe=t.Date,Ee=t.Error,_e=t.Function,Se=t.Math,Ae=t.Object,Oe=t.RegExp,Re=t.String,xe=t.TypeError,Ie=n.prototype,Pe=_e.prototype,Te=Ae.prototype,Ne=t["__core-js_shared__"],je=Pe.toString,Ce=Te.hasOwnProperty,Be=0,Le=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Me=Te.toString,ke=je.call(Ae),Fe=ft._,$e=Oe("^"+je.call(Ce).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ue=pt?t.Buffer:o,De=t.Symbol,He=t.Uint8Array,We=Ue?Ue.allocUnsafe:o,ze=ir(Ae.getPrototypeOf,Ae),Ve=Ae.create,qe=Te.propertyIsEnumerable,Ge=Ie.splice,Je=De?De.isConcatSpreadable:o,Ke=De?De.iterator:o,Ze=De?De.toStringTag:o,et=function(){try{var e=ci(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=oe&&oe.now!==ft.Date.now&&oe.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,dt=Se.ceil,ht=Se.floor,yt=Ae.getOwnPropertySymbols,gt=Ue?Ue.isBuffer:o,Mt=t.isFinite,zt=Ie.join,pr=ir(Ae.keys,Ae),yr=Se.max,gr=Se.min,br=oe.now,mr=t.parseInt,vr=Se.random,wr=Ie.reverse,Er=ci(t,"DataView"),_r=ci(t,"Map"),Sr=ci(t,"Promise"),Ar=ci(t,"Set"),Or=ci(t,"WeakMap"),Rr=ci(Ae,"create"),xr=Or&&new Or,Ir={},Pr=ki(Er),Tr=ki(_r),Nr=ki(Sr),jr=ki(Ar),Cr=ki(Or),Br=De?De.prototype:o,Lr=Br?Br.valueOf:o,Mr=Br?Br.toString:o;function kr(e){if(ea(e)&&!Ws(e)&&!(e instanceof Dr)){if(e instanceof Ur)return e;if(Ce.call(e,"__wrapped__"))return Fi(e)}return new Ur(e)}var Fr=function(){function e(){}return function(t){if(!Qs(t))return{};if(Ve)return Ve(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function $r(){}function Ur(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Dr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new zr;++t<r;)this.add(e[t])}function qr(e){var t=this.__data__=new Wr(e);this.size=t.size}function Gr(e,t){var r=Ws(e),n=!r&&Hs(e),o=!r&&!n&&Gs(e),i=!r&&!n&&!o&&ua(e),s=r||n||o||i,a=s?Gt(e.length,Re):[],u=a.length;for(var c in e)!t&&!Ce.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gi(c,u))||a.push(c);return a}function Jr(e){var t=e.length;return t?e[Vn(0,t-1)]:o}function Kr(e,t){return ji(xo(e),on(t,0,e.length))}function Yr(e){return ji(xo(e))}function Xr(e,t,r){(r!==o&&!$s(e[t],r)||r===o&&!(t in e))&&rn(e,t,r)}function Zr(e,t,r){var n=e[t];Ce.call(e,t)&&$s(n,r)&&(r!==o||t in e)||rn(e,t,r)}function Qr(e,t){for(var r=e.length;r--;)if($s(e[r][0],t))return r;return-1}function en(e,t,r,n){return ln(e,(function(e,o,i){t(n,e,r(e),i)})),n}function tn(e,t){return e&&Io(t,Ta(t),e)}function rn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function nn(e,t){for(var r=-1,i=t.length,s=n(i),a=null==e;++r<i;)s[r]=a?o:Oa(e,t[r]);return s}function on(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function sn(e,t,r,n,i,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=i?r(e,n,i,s):r(e)),a!==o)return a;if(!Qs(e))return e;var f=Ws(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return xo(e,a)}else{var d=di(e),h=d==w||d==E;if(Gs(e))return Eo(e,u);if(d==A||d==y||h&&!i){if(a=c||h?{}:pi(e),!u)return c?function(e,t){return Io(e,fi(e),t)}(e,function(e,t){return e&&Io(t,Na(t),e)}(a,e)):function(e,t){return Io(e,li(e),t)}(e,tn(a,e))}else{if(!it[d])return i?e:{};a=function(e,t,r){var n,o=e.constructor;switch(t){case N:return _o(e);case b:case m:return new o(+e);case j:return function(e,t){var r=t?_o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case C:case B:case L:case M:case k:case F:case $:case U:case D:return So(e,r);case _:return new o;case S:case I:return new o(e);case R:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case x:return new o;case P:return n=e,Lr?Ae(Lr.call(n)):{}}}(e,d,u)}}s||(s=new qr);var p=s.get(e);if(p)return p;s.set(e,a),ia(e)?e.forEach((function(n){a.add(sn(n,t,r,n,e,s))})):ta(e)&&e.forEach((function(n,o){a.set(o,sn(n,t,r,o,e,s))}));var g=f?o:(l?c?ri:ti:c?Na:Ta)(e);return Ot(g||e,(function(n,o){g&&(n=e[o=n]),Zr(a,o,sn(n,t,r,o,e,s))})),a}function an(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ae(e);n--;){var i=r[n],s=t[i],a=e[i];if(a===o&&!(i in e)||!s(a))return!1}return!0}function un(e,t,r){if("function"!=typeof e)throw new xe(i);return Ii((function(){e.apply(o,r)}),t)}function cn(e,t,r,n){var o=-1,i=Pt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Nt(t,Kt(r))),n?(i=Tt,s=!1):t.length>=200&&(i=Xt,s=!1,t=new Vr(t));e:for(;++o<a;){var l=e[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;u.push(l)}else i(t,f,n)||u.push(l)}return u}kr.templateSettings={escape:K,evaluate:Y,interpolate:X,variable:"",imports:{_:kr}},kr.prototype=$r.prototype,kr.prototype.constructor=kr,Ur.prototype=Fr($r.prototype),Ur.prototype.constructor=Ur,Dr.prototype=Fr($r.prototype),Dr.prototype.constructor=Dr,Hr.prototype.clear=function(){this.__data__=Rr?Rr(null):{},this.size=0},Hr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hr.prototype.get=function(e){var t=this.__data__;if(Rr){var r=t[e];return r===s?o:r}return Ce.call(t,e)?t[e]:o},Hr.prototype.has=function(e){var t=this.__data__;return Rr?t[e]!==o:Ce.call(t,e)},Hr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Rr&&t===o?s:t,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=Qr(t,e);return!(r<0||(r==t.length-1?t.pop():Ge.call(t,r,1),--this.size,0))},Wr.prototype.get=function(e){var t=this.__data__,r=Qr(t,e);return r<0?o:t[r][1]},Wr.prototype.has=function(e){return Qr(this.__data__,e)>-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=Qr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},zr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(_r||Wr),string:new Hr}},zr.prototype.delete=function(e){var t=ai(this,e).delete(e);return this.size-=t?1:0,t},zr.prototype.get=function(e){return ai(this,e).get(e)},zr.prototype.has=function(e){return ai(this,e).has(e)},zr.prototype.set=function(e,t){var r=ai(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Vr.prototype.add=Vr.prototype.push=function(e){return this.__data__.set(e,s),this},Vr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.clear=function(){this.__data__=new Wr,this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},qr.prototype.get=function(e){return this.__data__.get(e)},qr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!_r||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new zr(n)}return r.set(e,t),this.size=r.size,this};var ln=No(mn),fn=No(vn,!0);function dn(e,t){var r=!0;return ln(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function hn(e,t,r){for(var n=-1,i=e.length;++n<i;){var s=e[n],a=t(s);if(null!=a&&(u===o?a==a&&!aa(a):r(a,u)))var u=a,c=s}return c}function pn(e,t){var r=[];return ln(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function yn(e,t,r,n,o){var i=-1,s=e.length;for(r||(r=yi),o||(o=[]);++i<s;){var a=e[i];t>0&&r(a)?t>1?yn(a,t-1,r,n,o):jt(o,a):n||(o[o.length]=a)}return o}var gn=jo(),bn=jo(!0);function mn(e,t){return e&&gn(e,t,Ta)}function vn(e,t){return e&&bn(e,t,Ta)}function wn(e,t){return It(t,(function(t){return Ys(e[t])}))}function En(e,t){for(var r=0,n=(t=bo(t,e)).length;null!=e&&r<n;)e=e[Mi(t[r++])];return r&&r==n?e:o}function _n(e,t,r){var n=t(e);return Ws(e)?n:jt(n,r(e))}function Sn(e){return null==e?e===o?"[object Undefined]":"[object Null]":Ze&&Ze in Ae(e)?function(e){var t=Ce.call(e,Ze),r=e[Ze];try{e[Ze]=o;var n=!0}catch(e){}var i=Me.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),i}(e):function(e){return Me.call(e)}(e)}function An(e,t){return e>t}function On(e,t){return null!=e&&Ce.call(e,t)}function Rn(e,t){return null!=e&&t in Ae(e)}function xn(e,t,r){for(var i=r?Tt:Pt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Nt(d,Kt(t))),l=gr(d.length,l),c[u]=!r&&(t||s>=120&&d.length>=120)?new Vr(u&&d):o}d=e[0];var h=-1,p=c[0];e:for(;++h<s&&f.length<l;){var y=d[h],g=t?t(y):y;if(y=r||0!==y?y:0,!(p?Xt(p,g):i(f,g,r))){for(u=a;--u;){var b=c[u];if(!(b?Xt(b,g):i(e[u],g,r)))continue e}p&&p.push(g),f.push(y)}}return f}function In(e,t,r){var n=null==(e=Oi(e,t=bo(t,e)))?e:e[Mi(Ki(t))];return null==n?o:St(n,e,r)}function Pn(e){return ea(e)&&Sn(e)==y}function Tn(e,t,r,n,i){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,r,n,i,s){var a=Ws(e),u=Ws(t),c=a?g:di(e),l=u?g:di(t),f=(c=c==y?A:c)==A,d=(l=l==y?A:l)==A,h=c==l;if(h&&Gs(e)){if(!Gs(t))return!1;a=!0,f=!1}if(h&&!f)return s||(s=new qr),a||ua(e)?Qo(e,t,r,n,i,s):function(e,t,r,n,o,i,s){switch(r){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!i(new He(e),new He(t)));case b:case m:case S:return $s(+e,+t);case v:return e.name==t.name&&e.message==t.message;case R:case I:return e==t+"";case _:var a=or;case x:var u=1&n;if(a||(a=ar),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Qo(a(e),a(t),n,o,i,s);return s.delete(e),l;case P:if(Lr)return Lr.call(e)==Lr.call(t)}return!1}(e,t,c,r,n,i,s);if(!(1&r)){var p=f&&Ce.call(e,"__wrapped__"),w=d&&Ce.call(t,"__wrapped__");if(p||w){var E=p?e.value():e,O=w?t.value():t;return s||(s=new qr),i(E,O,r,n,s)}}return!!h&&(s||(s=new qr),function(e,t,r,n,i,s){var a=1&r,u=ti(e),c=u.length;if(c!=ti(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Ce.call(t,f)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var p=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var g=e[f=u[l]],b=t[f];if(n)var m=a?n(b,g,f,t,e,s):n(g,b,f,e,t,s);if(!(m===o?g===b||i(g,b,r,n,s):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,i,s))}(e,t,r,n,Tn,i))}function Nn(e,t,r,n){var i=r.length,s=i,a=!n;if(null==e)return!s;for(e=Ae(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){var c=(u=r[i])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===o&&!(c in e))return!1}else{var d=new qr;if(n)var h=n(l,f,c,e,t,d);if(!(h===o?Tn(f,l,3,n,d):h))return!1}}return!0}function jn(e){return!(!Qs(e)||(t=e,Le&&Le in t))&&(Ys(e)?$e:ye).test(ki(e));var t}function Cn(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ws(e)?Fn(e[0],e[1]):kn(e):fu(e)}function Bn(e){if(!Ei(e))return pr(e);var t=[];for(var r in Ae(e))Ce.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Ln(e,t){return e<t}function Mn(e,t){var r=-1,o=Vs(e)?n(e.length):[];return ln(e,(function(e,n,i){o[++r]=t(e,n,i)})),o}function kn(e){var t=ui(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function Fn(e,t){return mi(e)&&_i(t)?Si(Mi(e),t):function(r){var n=Oa(r,e);return n===o&&n===t?Ra(r,e):Tn(t,n,3)}}function $n(e,t,r,n,i){e!==t&&gn(t,(function(s,a){if(i||(i=new qr),Qs(s))!function(e,t,r,n,i,s,a){var u=Ri(e,r),c=Ri(t,r),l=a.get(c);if(l)Xr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):o,d=f===o;if(d){var h=Ws(c),p=!h&&Gs(c),y=!h&&!p&&ua(c);f=c,h||p||y?Ws(u)?f=u:qs(u)?f=xo(u):p?(d=!1,f=Eo(c,!0)):y?(d=!1,f=So(c,!0)):f=[]:na(c)||Hs(c)?(f=u,Hs(u)?f=ga(u):Qs(u)&&!Ys(u)||(f=pi(c))):d=!1}d&&(a.set(c,f),i(f,c,n,s,a),a.delete(c)),Xr(e,r,f)}}(e,t,a,r,$n,n,i);else{var u=n?n(Ri(e,a),s,a+"",e,t,i):o;u===o&&(u=s),Xr(e,a,u)}}),Na)}function Un(e,t){var r=e.length;if(r)return gi(t+=t<0?r:0,r)?e[t]:o}function Dn(e,t,r){t=t.length?Nt(t,(function(e){return Ws(e)?function(t){return En(t,1===e.length?e[0]:e)}:e})):[ru];var n=-1;t=Nt(t,Kt(si()));var o=Mn(e,(function(e,r,o){var i=Nt(t,(function(t){return t(e)}));return{criteria:i,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,o=e.criteria,i=t.criteria,s=o.length,a=r.length;++n<s;){var u=Ao(o[n],i[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(o)}function Hn(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var s=t[n],a=En(e,s);r(a,s)&&Yn(i,bo(s,e),a)}return i}function Wn(e,t,r,n){var o=n?Ut:$t,i=-1,s=t.length,a=e;for(e===t&&(t=xo(t)),r&&(a=Nt(e,Kt(r)));++i<s;)for(var u=0,c=t[i],l=r?r(c):c;(u=o(a,l,u,n))>-1;)a!==e&&Ge.call(a,u,1),Ge.call(e,u,1);return e}function zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;gi(o)?Ge.call(e,o,1):uo(e,o)}}return e}function Vn(e,t){return e+ht(vr()*(t-e+1))}function qn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=ht(t/2))&&(e+=e)}while(t);return r}function Gn(e,t){return Pi(Ai(e,t,ru),e+"")}function Jn(e){return Jr($a(e))}function Kn(e,t){var r=$a(e);return ji(r,on(t,0,r.length))}function Yn(e,t,r,n){if(!Qs(e))return e;for(var i=-1,s=(t=bo(t,e)).length,a=s-1,u=e;null!=u&&++i<s;){var c=Mi(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var f=u[c];(l=n?n(f,c,u):o)===o&&(l=Qs(f)?f:gi(t[i+1])?[]:{})}Zr(u,c,l),u=u[c]}return e}var Xn=xr?function(e,t){return xr.set(e,t),e}:ru,Zn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:Qa(t),writable:!0})}:ru;function Qn(e){return ji($a(e))}function eo(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=n(i);++o<i;)s[o]=e[o+t];return s}function to(e,t){var r;return ln(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function ro(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var i=n+o>>>1,s=e[i];null!==s&&!aa(s)&&(r?s<=t:s<t)?n=i+1:o=i}return o}return no(e,t,ru,r)}function no(e,t,r,n){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=aa(t),l=t===o;i<s;){var f=ht((i+s)/2),d=r(e[f]),h=d!==o,p=null===d,y=d==d,g=aa(d);if(a)var b=n||y;else b=l?y&&(n||h):u?y&&h&&(n||!p):c?y&&h&&!p&&(n||!g):!p&&!g&&(n?d<=t:d<t);b?i=f+1:s=f}return gr(s,4294967294)}function oo(e,t){for(var r=-1,n=e.length,o=0,i=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!$s(a,u)){var u=a;i[o++]=0===s?0:s}}return i}function io(e){return"number"==typeof e?e:aa(e)?d:+e}function so(e){if("string"==typeof e)return e;if(Ws(e))return Nt(e,so)+"";if(aa(e))return Mr?Mr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ao(e,t,r){var n=-1,o=Pt,i=e.length,s=!0,a=[],u=a;if(r)s=!1,o=Tt;else if(i>=200){var c=t?null:Go(e);if(c)return ar(c);s=!1,o=Xt,u=new Vr}else u=t?[]:a;e:for(;++n<i;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var d=u.length;d--;)if(u[d]===f)continue e;t&&u.push(f),a.push(l)}else o(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function uo(e,t){return null==(e=Oi(e,t=bo(t,e)))||delete e[Mi(Ki(t))]}function co(e,t,r,n){return Yn(e,t,r(En(e,t)),n)}function lo(e,t,r,n){for(var o=e.length,i=n?o:-1;(n?i--:++i<o)&&t(e[i],i,e););return r?eo(e,n?0:i,n?i+1:o):eo(e,n?i+1:0,n?o:i)}function fo(e,t){var r=e;return r instanceof Dr&&(r=r.value()),Ct(t,(function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))}),r)}function ho(e,t,r){var o=e.length;if(o<2)return o?ao(e[0]):[];for(var i=-1,s=n(o);++i<o;)for(var a=e[i],u=-1;++u<o;)u!=i&&(s[i]=cn(s[i]||a,e[u],t,r));return ao(yn(s,1),t,r)}function po(e,t,r){for(var n=-1,i=e.length,s=t.length,a={};++n<i;){var u=n<s?t[n]:o;r(a,e[n],u)}return a}function yo(e){return qs(e)?e:[]}function go(e){return"function"==typeof e?e:ru}function bo(e,t){return Ws(e)?e:mi(e,t)?[e]:Li(ba(e))}var mo=Gn;function vo(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:eo(e,t,r)}var wo=st||function(e){return ft.clearTimeout(e)};function Eo(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function _o(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function So(e,t){var r=t?_o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ao(e,t){if(e!==t){var r=e!==o,n=null===e,i=e==e,s=aa(e),a=t!==o,u=null===t,c=t==t,l=aa(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!i)return 1;if(!n&&!s&&!l&&e<t||l&&r&&i&&!n&&!s||u&&r&&i||!a&&i||!c)return-1}return 0}function Oo(e,t,r,o){for(var i=-1,s=e.length,a=r.length,u=-1,c=t.length,l=yr(s-a,0),f=n(c+l),d=!o;++u<c;)f[u]=t[u];for(;++i<a;)(d||i<s)&&(f[r[i]]=e[i]);for(;l--;)f[u++]=e[i++];return f}function Ro(e,t,r,o){for(var i=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=yr(s-u,0),d=n(f+l),h=!o;++i<f;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++a<u;)(h||i<s)&&(d[p+r[a]]=e[i++]);return d}function xo(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Io(e,t,r,n){var i=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):o;c===o&&(c=e[u]),i?rn(r,u,c):Zr(r,u,c)}return r}function Po(e,t){return function(r,n){var o=Ws(r)?At:en,i=t?t():{};return o(r,e,si(n,2),i)}}function To(e){return Gn((function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:o,a=i>2?r[2]:o;for(s=e.length>3&&"function"==typeof s?(i--,s):o,a&&bi(r[0],r[1],a)&&(s=i<3?o:s,i=1),t=Ae(t);++n<i;){var u=r[n];u&&e(t,u,n,s)}return t}))}function No(e,t){return function(r,n){if(null==r)return r;if(!Vs(r))return e(r,n);for(var o=r.length,i=t?o:-1,s=Ae(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}function jo(e){return function(t,r,n){for(var o=-1,i=Ae(t),s=n(t),a=s.length;a--;){var u=s[e?a:++o];if(!1===r(i[u],u,i))break}return t}}function Co(e){return function(t){var r=nr(t=ba(t))?lr(t):o,n=r?r[0]:t.charAt(0),i=r?vo(r,1).join(""):t.slice(1);return n[e]()+i}}function Bo(e){return function(t){return Ct(Ya(Ha(t).replace(Ye,"")),e,"")}}function Lo(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Fr(e.prototype),n=e.apply(r,t);return Qs(n)?n:r}}function Mo(e){return function(t,r,n){var i=Ae(t);if(!Vs(t)){var s=si(r,3);t=Ta(t),r=function(e){return s(i[e],e,i)}}var a=e(t,r,n);return a>-1?i[s?t[a]:a]:o}}function ko(e){return ei((function(t){var r=t.length,n=r,s=Ur.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new xe(i);if(s&&!u&&"wrapper"==oi(a))var u=new Ur([],!0)}for(n=u?n:r;++n<r;){var c=oi(a=t[n]),l="wrapper"==c?ni(a):o;u=l&&vi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[oi(l[0])].apply(u,l[3]):1==a.length&&vi(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Ws(n))return u.plant(n).value();for(var o=0,i=r?t[o].apply(this,e):n;++o<r;)i=t[o].call(this,i);return i}}))}function Fo(e,t,r,i,s,a,u,l,f,d){var h=t&c,p=1&t,y=2&t,g=24&t,b=512&t,m=y?o:Lo(e);return function c(){for(var v=arguments.length,w=n(v),E=v;E--;)w[E]=arguments[E];if(g)var _=ii(c),S=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(w,_);if(i&&(w=Oo(w,i,s,g)),a&&(w=Ro(w,a,u,g)),v-=S,g&&v<d){var A=sr(w,_);return Vo(e,t,Fo,c.placeholder,r,w,A,l,f,d-v)}var O=p?r:this,R=y?O[e]:e;return v=w.length,l?w=function(e,t){for(var r=e.length,n=gr(t.length,r),i=xo(e);n--;){var s=t[n];e[n]=gi(s,r)?i[s]:o}return e}(w,l):b&&v>1&&w.reverse(),h&&f<v&&(w.length=f),this&&this!==ft&&this instanceof c&&(R=m||Lo(R)),R.apply(O,w)}}function $o(e,t){return function(r,n){return function(e,t,r,n){return mn(e,(function(e,o,i){t(n,r(e),o,i)})),n}(r,e,t(n),{})}}function Uo(e,t){return function(r,n){var i;if(r===o&&n===o)return t;if(r!==o&&(i=r),n!==o){if(i===o)return n;"string"==typeof r||"string"==typeof n?(r=so(r),n=so(n)):(r=io(r),n=io(n)),i=e(r,n)}return i}}function Do(e){return ei((function(t){return t=Nt(t,Kt(si())),Gn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Ho(e,t){var r=(t=t===o?" ":so(t)).length;if(r<2)return r?qn(t,e):t;var n=qn(t,dt(e/cr(t)));return nr(t)?vo(lr(n),0,e).join(""):n.slice(0,e)}function Wo(e){return function(t,r,i){return i&&"number"!=typeof i&&bi(t,r,i)&&(r=i=o),t=da(t),r===o?(r=t,t=0):r=da(r),function(e,t,r,o){for(var i=-1,s=yr(dt((t-e)/(r||1)),0),a=n(s);s--;)a[o?s:++i]=e,e+=r;return a}(t,r,i=i===o?t<r?1:-1:da(i),e)}}function zo(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Vo(e,t,r,n,i,s,a,c,l,f){var d=8&t;t|=d?u:64,4&(t&=~(d?64:u))||(t&=-4);var h=[e,t,i,d?s:o,d?a:o,d?o:s,d?o:a,c,l,f],p=r.apply(o,h);return vi(e)&&xi(p,h),p.placeholder=n,Ti(p,e,t)}function qo(e){var t=Se[e];return function(e,r){if(e=ya(e),(r=null==r?0:gr(ha(r),292))&&Mt(e)){var n=(ba(e)+"e").split("e");return+((n=(ba(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Go=Ar&&1/ar(new Ar([,-0]))[1]==l?function(e){return new Ar(e)}:au;function Jo(e){return function(t){var r=di(t);return r==_?or(t):r==x?ur(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ko(e,t,r,s,l,f,d,h){var p=2&t;if(!p&&"function"!=typeof e)throw new xe(i);var y=s?s.length:0;if(y||(t&=-97,s=l=o),d=d===o?d:yr(ha(d),0),h=h===o?h:ha(h),y-=l?l.length:0,64&t){var g=s,b=l;s=l=o}var m=p?o:ni(e),v=[e,t,r,s,l,g,b,f,d,h];if(m&&function(e,t){var r=e[1],n=t[1],o=r|n,i=o<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!i&&!s)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Oo(l,u,t[4]):u,e[4]=l?sr(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?Ro(l,u,t[6]):u,e[6]=l?sr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:gr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,m),e=v[0],t=v[1],r=v[2],s=v[3],l=v[4],!(h=v[9]=v[9]===o?p?0:e.length:yr(v[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var i=Lo(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=ii(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:sr(u,l);return(a-=f.length)<r?Vo(e,t,Fo,s.placeholder,o,u,f,o,o,r-a):St(this&&this!==ft&&this instanceof s?i:e,this,u)}}(e,t,h):t!=u&&33!=t||l.length?Fo.apply(o,v):function(e,t,r,o){var i=1&t,s=Lo(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=o.length,f=n(l+u),d=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=o[c];for(;u--;)f[c++]=arguments[++a];return St(d,i?r:this,f)}}(e,t,r,s);else var w=function(e,t,r){var n=1&t,o=Lo(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return Ti((m?Xn:xi)(w,v),e,t)}function Yo(e,t,r,n){return e===o||$s(e,Te[r])&&!Ce.call(n,r)?t:e}function Xo(e,t,r,n,i,s){return Qs(e)&&Qs(t)&&(s.set(t,e),$n(e,t,o,Xo,s),s.delete(t)),e}function Zo(e){return na(e)?o:e}function Qo(e,t,r,n,i,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,p=2&r?new Vr:o;for(s.set(e,t),s.set(t,e);++d<u;){var y=e[d],g=t[d];if(n)var b=a?n(g,y,d,t,e,s):n(y,g,d,e,t,s);if(b!==o){if(b)continue;h=!1;break}if(p){if(!Lt(t,(function(e,t){if(!Xt(p,t)&&(y===e||i(y,e,r,n,s)))return p.push(t)}))){h=!1;break}}else if(y!==g&&!i(y,g,r,n,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function ei(e){return Pi(Ai(e,o,zi),e+"")}function ti(e){return _n(e,Ta,li)}function ri(e){return _n(e,Na,fi)}var ni=xr?function(e){return xr.get(e)}:au;function oi(e){for(var t=e.name+"",r=Ir[t],n=Ce.call(Ir,t)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(Ce.call(kr,"placeholder")?kr:e).placeholder}function si(){var e=kr.iteratee||nu;return e=e===nu?Cn:e,arguments.length?e(arguments[0],arguments[1]):e}function ai(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function ui(e){for(var t=Ta(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,_i(o)]}return t}function ci(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return jn(r)?r:o}var li=yt?function(e){return null==e?[]:(e=Ae(e),It(yt(e),(function(t){return qe.call(e,t)})))}:pu,fi=yt?function(e){for(var t=[];e;)jt(t,li(e)),e=ze(e);return t}:pu,di=Sn;function hi(e,t,r){for(var n=-1,o=(t=bo(t,e)).length,i=!1;++n<o;){var s=Mi(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Zs(o)&&gi(s,o)&&(Ws(e)||Hs(e))}function pi(e){return"function"!=typeof e.constructor||Ei(e)?{}:Fr(ze(e))}function yi(e){return Ws(e)||Hs(e)||!!(Je&&e&&e[Je])}function gi(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function bi(e,t,r){if(!Qs(r))return!1;var n=typeof t;return!!("number"==n?Vs(r)&&gi(t,r.length):"string"==n&&t in r)&&$s(r[t],e)}function mi(e,t){if(Ws(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!aa(e))||Q.test(e)||!Z.test(e)||null!=t&&e in Ae(t)}function vi(e){var t=oi(e),r=kr[t];if("function"!=typeof r||!(t in Dr.prototype))return!1;if(e===r)return!0;var n=ni(r);return!!n&&e===n[0]}(Er&&di(new Er(new ArrayBuffer(1)))!=j||_r&&di(new _r)!=_||Sr&&di(Sr.resolve())!=O||Ar&&di(new Ar)!=x||Or&&di(new Or)!=T)&&(di=function(e){var t=Sn(e),r=t==A?e.constructor:o,n=r?ki(r):"";if(n)switch(n){case Pr:return j;case Tr:return _;case Nr:return O;case jr:return x;case Cr:return T}return t});var wi=Ne?Ys:yu;function Ei(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Te)}function _i(e){return e==e&&!Qs(e)}function Si(e,t){return function(r){return null!=r&&r[e]===t&&(t!==o||e in Ae(r))}}function Ai(e,t,r){return t=yr(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=yr(o.length-t,0),a=n(s);++i<s;)a[i]=o[t+i];i=-1;for(var u=n(t+1);++i<t;)u[i]=o[i];return u[t]=r(a),St(e,this,u)}}function Oi(e,t){return t.length<2?e:En(e,eo(t,0,-1))}function Ri(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xi=Ni(Xn),Ii=lt||function(e,t){return ft.setTimeout(e,t)},Pi=Ni(Zn);function Ti(e,t,r){var n=t+"";return Pi(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Ot(p,(function(r){var n="_."+r[0];t&r[1]&&!Pt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function Ni(e){var t=0,r=0;return function(){var n=br(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function ji(e,t){var r=-1,n=e.length,i=n-1;for(t=t===o?n:t;++r<t;){var s=Vn(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Ci,Bi,Li=(Ci=Cs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,o){t.push(n?o.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Bi.size&&Bi.clear(),e})),Bi=Ci.cache,Ci);function Mi(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ki(e){if(null!=e){try{return je.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Fi(e){if(e instanceof Dr)return e.clone();var t=new Ur(e.__wrapped__,e.__chain__);return t.__actions__=xo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $i=Gn((function(e,t){return qs(e)?cn(e,yn(t,1,qs,!0)):[]})),Ui=Gn((function(e,t){var r=Ki(t);return qs(r)&&(r=o),qs(e)?cn(e,yn(t,1,qs,!0),si(r,2)):[]})),Di=Gn((function(e,t){var r=Ki(t);return qs(r)&&(r=o),qs(e)?cn(e,yn(t,1,qs,!0),o,r):[]}));function Hi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ha(r);return o<0&&(o=yr(n+o,0)),Ft(e,si(t,3),o)}function Wi(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==o&&(i=ha(r),i=r<0?yr(n+i,0):gr(i,n-1)),Ft(e,si(t,3),i,!0)}function zi(e){return null!=e&&e.length?yn(e,1):[]}function Vi(e){return e&&e.length?e[0]:o}var qi=Gn((function(e){var t=Nt(e,yo);return t.length&&t[0]===e[0]?xn(t):[]})),Gi=Gn((function(e){var t=Ki(e),r=Nt(e,yo);return t===Ki(r)?t=o:r.pop(),r.length&&r[0]===e[0]?xn(r,si(t,2)):[]})),Ji=Gn((function(e){var t=Ki(e),r=Nt(e,yo);return(t="function"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?xn(r,o,t):[]}));function Ki(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Yi=Gn(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Wn(e,t):e}var Zi=ei((function(e,t){var r=null==e?0:e.length,n=nn(e,t);return zn(e,Nt(t,(function(e){return gi(e,r)?+e:e})).sort(Ao)),n}));function Qi(e){return null==e?e:wr.call(e)}var es=Gn((function(e){return ao(yn(e,1,qs,!0))})),ts=Gn((function(e){var t=Ki(e);return qs(t)&&(t=o),ao(yn(e,1,qs,!0),si(t,2))})),rs=Gn((function(e){var t=Ki(e);return t="function"==typeof t?t:o,ao(yn(e,1,qs,!0),o,t)}));function ns(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(qs(e))return t=yr(e.length,t),!0})),Gt(t,(function(t){return Nt(e,Wt(t))}))}function os(e,t){if(!e||!e.length)return[];var r=ns(e);return null==t?r:Nt(r,(function(e){return St(t,o,e)}))}var is=Gn((function(e,t){return qs(e)?cn(e,t):[]})),ss=Gn((function(e){return ho(It(e,qs))})),as=Gn((function(e){var t=Ki(e);return qs(t)&&(t=o),ho(It(e,qs),si(t,2))})),us=Gn((function(e){var t=Ki(e);return t="function"==typeof t?t:o,ho(It(e,qs),o,t)})),cs=Gn(ns),ls=Gn((function(e){var t=e.length,r=t>1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,os(e,r)}));function fs(e){var t=kr(e);return t.__chain__=!0,t}function ds(e,t){return t(e)}var hs=ei((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return nn(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Dr&&gi(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ds,args:[i],thisArg:o}),new Ur(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),ps=Po((function(e,t,r){Ce.call(e,r)?++e[r]:rn(e,r,1)})),ys=Mo(Hi),gs=Mo(Wi);function bs(e,t){return(Ws(e)?Ot:ln)(e,si(t,3))}function ms(e,t){return(Ws(e)?Rt:fn)(e,si(t,3))}var vs=Po((function(e,t,r){Ce.call(e,r)?e[r].push(t):rn(e,r,[t])})),ws=Gn((function(e,t,r){var o=-1,i="function"==typeof t,s=Vs(e)?n(e.length):[];return ln(e,(function(e){s[++o]=i?St(t,e,r):In(e,t,r)})),s})),Es=Po((function(e,t,r){rn(e,r,t)}));function _s(e,t){return(Ws(e)?Nt:Mn)(e,si(t,3))}var Ss=Po((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),As=Gn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&bi(e,t[0],t[1])?t=[]:r>2&&bi(t[0],t[1],t[2])&&(t=[t[0]]),Dn(e,yn(t,1),[])})),Os=ct||function(){return ft.Date.now()};function Rs(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Ko(e,c,o,o,o,o,t)}function xs(e,t){var r;if("function"!=typeof t)throw new xe(i);return e=ha(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var Is=Gn((function(e,t,r){var n=1;if(r.length){var o=sr(r,ii(Is));n|=u}return Ko(e,n,t,r,o)})),Ps=Gn((function(e,t,r){var n=3;if(r.length){var o=sr(r,ii(Ps));n|=u}return Ko(t,n,e,r,o)}));function Ts(e,t,r){var n,s,a,u,c,l,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new xe(i);function y(t){var r=n,i=s;return n=s=o,f=t,u=e.apply(i,r)}function g(e){var r=e-l;return l===o||r>=t||r<0||h&&e-f>=a}function b(){var e=Os();if(g(e))return m(e);c=Ii(b,function(e){var r=t-(e-l);return h?gr(r,a-(e-f)):r}(e))}function m(e){return c=o,p&&n?y(e):(n=s=o,u)}function v(){var e=Os(),r=g(e);if(n=arguments,s=this,l=e,r){if(c===o)return function(e){return f=e,c=Ii(b,t),d?y(e):u}(l);if(h)return wo(c),c=Ii(b,t),y(l)}return c===o&&(c=Ii(b,t)),u}return t=ya(t)||0,Qs(r)&&(d=!!r.leading,a=(h="maxWait"in r)?yr(ya(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),v.cancel=function(){c!==o&&wo(c),f=0,n=l=s=c=o},v.flush=function(){return c===o?u:m(Os())},v}var Ns=Gn((function(e,t){return un(e,1,t)})),js=Gn((function(e,t,r){return un(e,ya(t)||0,r)}));function Cs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new xe(i);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Cs.Cache||zr),r}function Bs(e){if("function"!=typeof e)throw new xe(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Cs.Cache=zr;var Ls=mo((function(e,t){var r=(t=1==t.length&&Ws(t[0])?Nt(t[0],Kt(si())):Nt(yn(t,1),Kt(si()))).length;return Gn((function(n){for(var o=-1,i=gr(n.length,r);++o<i;)n[o]=t[o].call(this,n[o]);return St(e,this,n)}))})),Ms=Gn((function(e,t){var r=sr(t,ii(Ms));return Ko(e,u,o,t,r)})),ks=Gn((function(e,t){var r=sr(t,ii(ks));return Ko(e,64,o,t,r)})),Fs=ei((function(e,t){return Ko(e,256,o,o,o,t)}));function $s(e,t){return e===t||e!=e&&t!=t}var Us=zo(An),Ds=zo((function(e,t){return e>=t})),Hs=Pn(function(){return arguments}())?Pn:function(e){return ea(e)&&Ce.call(e,"callee")&&!qe.call(e,"callee")},Ws=n.isArray,zs=bt?Kt(bt):function(e){return ea(e)&&Sn(e)==N};function Vs(e){return null!=e&&Zs(e.length)&&!Ys(e)}function qs(e){return ea(e)&&Vs(e)}var Gs=gt||yu,Js=mt?Kt(mt):function(e){return ea(e)&&Sn(e)==m};function Ks(e){if(!ea(e))return!1;var t=Sn(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!na(e)}function Ys(e){if(!Qs(e))return!1;var t=Sn(e);return t==w||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ha(e)}function Zs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function Qs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=vt?Kt(vt):function(e){return ea(e)&&di(e)==_};function ra(e){return"number"==typeof e||ea(e)&&Sn(e)==S}function na(e){if(!ea(e)||Sn(e)!=A)return!1;var t=ze(e);if(null===t)return!0;var r=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&je.call(r)==ke}var oa=wt?Kt(wt):function(e){return ea(e)&&Sn(e)==R},ia=Et?Kt(Et):function(e){return ea(e)&&di(e)==x};function sa(e){return"string"==typeof e||!Ws(e)&&ea(e)&&Sn(e)==I}function aa(e){return"symbol"==typeof e||ea(e)&&Sn(e)==P}var ua=_t?Kt(_t):function(e){return ea(e)&&Zs(e.length)&&!!ot[Sn(e)]},ca=zo(Ln),la=zo((function(e,t){return e<=t}));function fa(e){if(!e)return[];if(Vs(e))return sa(e)?lr(e):xo(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=di(e);return(t==_?or:t==x?ar:$a)(e)}function da(e){return e?(e=ya(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ha(e){var t=da(e),r=t%1;return t==t?r?t-r:t:0}function pa(e){return e?on(ha(e),0,h):0}function ya(e){if("number"==typeof e)return e;if(aa(e))return d;if(Qs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var r=pe.test(e);return r||ge.test(e)?ut(e.slice(2),r?2:8):he.test(e)?d:+e}function ga(e){return Io(e,Na(e))}function ba(e){return null==e?"":so(e)}var ma=To((function(e,t){if(Ei(t)||Vs(t))Io(t,Ta(t),e);else for(var r in t)Ce.call(t,r)&&Zr(e,r,t[r])})),va=To((function(e,t){Io(t,Na(t),e)})),wa=To((function(e,t,r,n){Io(t,Na(t),e,n)})),Ea=To((function(e,t,r,n){Io(t,Ta(t),e,n)})),_a=ei(nn),Sa=Gn((function(e,t){e=Ae(e);var r=-1,n=t.length,i=n>2?t[2]:o;for(i&&bi(t[0],t[1],i)&&(n=1);++r<n;)for(var s=t[r],a=Na(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===o||$s(f,Te[l])&&!Ce.call(e,l))&&(e[l]=s[l])}return e})),Aa=Gn((function(e){return e.push(o,Xo),St(Ca,o,e)}));function Oa(e,t,r){var n=null==e?o:En(e,t);return n===o?r:n}function Ra(e,t){return null!=e&&hi(e,t,Rn)}var xa=$o((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),e[t]=r}),Qa(ru)),Ia=$o((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Me.call(t)),Ce.call(e,t)?e[t].push(r):e[t]=[r]}),si),Pa=Gn(In);function Ta(e){return Vs(e)?Gr(e):Bn(e)}function Na(e){return Vs(e)?Gr(e,!0):function(e){if(!Qs(e))return function(e){var t=[];if(null!=e)for(var r in Ae(e))t.push(r);return t}(e);var t=Ei(e),r=[];for(var n in e)("constructor"!=n||!t&&Ce.call(e,n))&&r.push(n);return r}(e)}var ja=To((function(e,t,r){$n(e,t,r)})),Ca=To((function(e,t,r,n){$n(e,t,r,n)})),Ba=ei((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=bo(t,e),n||(n=t.length>1),t})),Io(e,ri(e),r),n&&(r=sn(r,7,Zo));for(var o=t.length;o--;)uo(r,t[o]);return r})),La=ei((function(e,t){return null==e?{}:function(e,t){return Hn(e,t,(function(t,r){return Ra(e,r)}))}(e,t)}));function Ma(e,t){if(null==e)return{};var r=Nt(ri(e),(function(e){return[e]}));return t=si(t),Hn(e,r,(function(e,r){return t(e,r[0])}))}var ka=Jo(Ta),Fa=Jo(Na);function $a(e){return null==e?[]:Yt(e,Ta(e))}var Ua=Bo((function(e,t,r){return t=t.toLowerCase(),e+(r?Da(t):t)}));function Da(e){return Ka(ba(e).toLowerCase())}function Ha(e){return(e=ba(e))&&e.replace(me,er).replace(Xe,"")}var Wa=Bo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),za=Bo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Va=Co("toLowerCase"),qa=Bo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ga=Bo((function(e,t,r){return e+(r?" ":"")+Ka(t)})),Ja=Bo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ka=Co("toUpperCase");function Ya(e,t,r){return e=ba(e),(t=r?o:t)===o?function(e){return tt.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Gn((function(e,t){try{return St(e,o,t)}catch(e){return Ks(e)?e:new Ee(e)}})),Za=ei((function(e,t){return Ot(t,(function(t){t=Mi(t),rn(e,t,Is(e[t],e))})),e}));function Qa(e){return function(){return e}}var eu=ko(),tu=ko(!0);function ru(e){return e}function nu(e){return Cn("function"==typeof e?e:sn(e,1))}var ou=Gn((function(e,t){return function(r){return In(r,e,t)}})),iu=Gn((function(e,t){return function(r){return In(e,r,t)}}));function su(e,t,r){var n=Ta(t),o=wn(t,n);null!=r||Qs(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=wn(t,Ta(t)));var i=!(Qs(r)&&"chain"in r&&!r.chain),s=Ys(e);return Ot(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=xo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,jt([this.value()],arguments))})})),e}function au(){}var uu=Do(Nt),cu=Do(xt),lu=Do(Lt);function fu(e){return mi(e)?Wt(Mi(e)):function(e){return function(t){return En(t,e)}}(e)}var du=Wo(),hu=Wo(!0);function pu(){return[]}function yu(){return!1}var gu,bu=Uo((function(e,t){return e+t}),0),mu=qo("ceil"),vu=Uo((function(e,t){return e/t}),1),wu=qo("floor"),Eu=Uo((function(e,t){return e*t}),1),_u=qo("round"),Su=Uo((function(e,t){return e-t}),0);return kr.after=function(e,t){if("function"!=typeof t)throw new xe(i);return e=ha(e),function(){if(--e<1)return t.apply(this,arguments)}},kr.ary=Rs,kr.assign=ma,kr.assignIn=va,kr.assignInWith=wa,kr.assignWith=Ea,kr.at=_a,kr.before=xs,kr.bind=Is,kr.bindAll=Za,kr.bindKey=Ps,kr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ws(e)?e:[e]},kr.chain=fs,kr.chunk=function(e,t,r){t=(r?bi(e,t,r):t===o)?1:yr(ha(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,a=0,u=n(dt(i/t));s<i;)u[a++]=eo(e,s,s+=t);return u},kr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o},kr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return jt(Ws(r)?xo(r):[r],yn(t,1))},kr.cond=function(e){var t=null==e?0:e.length,r=si();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new xe(i);return[r(e[0]),e[1]]})):[],Gn((function(r){for(var n=-1;++n<t;){var o=e[n];if(St(o[0],this,r))return St(o[1],this,r)}}))},kr.conforms=function(e){return function(e){var t=Ta(e);return function(r){return an(r,e,t)}}(sn(e,1))},kr.constant=Qa,kr.countBy=ps,kr.create=function(e,t){var r=Fr(e);return null==t?r:tn(r,t)},kr.curry=function e(t,r,n){var i=Ko(t,8,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},kr.curryRight=function e(t,r,n){var i=Ko(t,16,o,o,o,o,o,r=n?o:r);return i.placeholder=e.placeholder,i},kr.debounce=Ts,kr.defaults=Sa,kr.defaultsDeep=Aa,kr.defer=Ns,kr.delay=js,kr.difference=$i,kr.differenceBy=Ui,kr.differenceWith=Di,kr.drop=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,(t=r||t===o?1:ha(t))<0?0:t,n):[]},kr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,0,(t=n-(t=r||t===o?1:ha(t)))<0?0:t):[]},kr.dropRightWhile=function(e,t){return e&&e.length?lo(e,si(t,3),!0,!0):[]},kr.dropWhile=function(e,t){return e&&e.length?lo(e,si(t,3),!0):[]},kr.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&bi(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=ha(r))<0&&(r=-r>i?0:i+r),(n=n===o||n>i?i:ha(n))<0&&(n+=i),n=r>n?0:pa(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},kr.filter=function(e,t){return(Ws(e)?It:pn)(e,si(t,3))},kr.flatMap=function(e,t){return yn(_s(e,t),1)},kr.flatMapDeep=function(e,t){return yn(_s(e,t),l)},kr.flatMapDepth=function(e,t,r){return r=r===o?1:ha(r),yn(_s(e,t),r)},kr.flatten=zi,kr.flattenDeep=function(e){return null!=e&&e.length?yn(e,l):[]},kr.flattenDepth=function(e,t){return null!=e&&e.length?yn(e,t=t===o?1:ha(t)):[]},kr.flip=function(e){return Ko(e,512)},kr.flow=eu,kr.flowRight=tu,kr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},kr.functions=function(e){return null==e?[]:wn(e,Ta(e))},kr.functionsIn=function(e){return null==e?[]:wn(e,Na(e))},kr.groupBy=vs,kr.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},kr.intersection=qi,kr.intersectionBy=Gi,kr.intersectionWith=Ji,kr.invert=xa,kr.invertBy=Ia,kr.invokeMap=ws,kr.iteratee=nu,kr.keyBy=Es,kr.keys=Ta,kr.keysIn=Na,kr.map=_s,kr.mapKeys=function(e,t){var r={};return t=si(t,3),mn(e,(function(e,n,o){rn(r,t(e,n,o),e)})),r},kr.mapValues=function(e,t){var r={};return t=si(t,3),mn(e,(function(e,n,o){rn(r,n,t(e,n,o))})),r},kr.matches=function(e){return kn(sn(e,1))},kr.matchesProperty=function(e,t){return Fn(e,sn(t,1))},kr.memoize=Cs,kr.merge=ja,kr.mergeWith=Ca,kr.method=ou,kr.methodOf=iu,kr.mixin=su,kr.negate=Bs,kr.nthArg=function(e){return e=ha(e),Gn((function(t){return Un(t,e)}))},kr.omit=Ba,kr.omitBy=function(e,t){return Ma(e,Bs(si(t)))},kr.once=function(e){return xs(2,e)},kr.orderBy=function(e,t,r,n){return null==e?[]:(Ws(t)||(t=null==t?[]:[t]),Ws(r=n?o:r)||(r=null==r?[]:[r]),Dn(e,t,r))},kr.over=uu,kr.overArgs=Ls,kr.overEvery=cu,kr.overSome=lu,kr.partial=Ms,kr.partialRight=ks,kr.partition=Ss,kr.pick=La,kr.pickBy=Ma,kr.property=fu,kr.propertyOf=function(e){return function(t){return null==e?o:En(e,t)}},kr.pull=Yi,kr.pullAll=Xi,kr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Wn(e,t,si(r,2)):e},kr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Wn(e,t,o,r):e},kr.pullAt=Zi,kr.range=du,kr.rangeRight=hu,kr.rearg=Fs,kr.reject=function(e,t){return(Ws(e)?It:pn)(e,Bs(si(t,3)))},kr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=si(t,3);++n<i;){var s=e[n];t(s,n,e)&&(r.push(s),o.push(n))}return zn(e,o),r},kr.rest=function(e,t){if("function"!=typeof e)throw new xe(i);return Gn(e,t=t===o?t:ha(t))},kr.reverse=Qi,kr.sampleSize=function(e,t,r){return t=(r?bi(e,t,r):t===o)?1:ha(t),(Ws(e)?Kr:Kn)(e,t)},kr.set=function(e,t,r){return null==e?e:Yn(e,t,r)},kr.setWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:Yn(e,t,r,n)},kr.shuffle=function(e){return(Ws(e)?Yr:Qn)(e)},kr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&bi(e,t,r)?(t=0,r=n):(t=null==t?0:ha(t),r=r===o?n:ha(r)),eo(e,t,r)):[]},kr.sortBy=As,kr.sortedUniq=function(e){return e&&e.length?oo(e):[]},kr.sortedUniqBy=function(e,t){return e&&e.length?oo(e,si(t,2)):[]},kr.split=function(e,t,r){return r&&"number"!=typeof r&&bi(e,t,r)&&(t=r=o),(r=r===o?h:r>>>0)?(e=ba(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=so(t))&&nr(e)?vo(lr(e),0,r):e.split(t,r):[]},kr.spread=function(e,t){if("function"!=typeof e)throw new xe(i);return t=null==t?0:yr(ha(t),0),Gn((function(r){var n=r[t],o=vo(r,0,t);return n&&jt(o,n),St(e,this,o)}))},kr.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},kr.take=function(e,t,r){return e&&e.length?eo(e,0,(t=r||t===o?1:ha(t))<0?0:t):[]},kr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?eo(e,(t=n-(t=r||t===o?1:ha(t)))<0?0:t,n):[]},kr.takeRightWhile=function(e,t){return e&&e.length?lo(e,si(t,3),!1,!0):[]},kr.takeWhile=function(e,t){return e&&e.length?lo(e,si(t,3)):[]},kr.tap=function(e,t){return t(e),e},kr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new xe(i);return Qs(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ts(e,t,{leading:n,maxWait:t,trailing:o})},kr.thru=ds,kr.toArray=fa,kr.toPairs=ka,kr.toPairsIn=Fa,kr.toPath=function(e){return Ws(e)?Nt(e,Mi):aa(e)?[e]:xo(Li(ba(e)))},kr.toPlainObject=ga,kr.transform=function(e,t,r){var n=Ws(e),o=n||Gs(e)||ua(e);if(t=si(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:Qs(e)&&Ys(i)?Fr(ze(e)):{}}return(o?Ot:mn)(e,(function(e,n,o){return t(r,e,n,o)})),r},kr.unary=function(e){return Rs(e,1)},kr.union=es,kr.unionBy=ts,kr.unionWith=rs,kr.uniq=function(e){return e&&e.length?ao(e):[]},kr.uniqBy=function(e,t){return e&&e.length?ao(e,si(t,2)):[]},kr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?ao(e,o,t):[]},kr.unset=function(e,t){return null==e||uo(e,t)},kr.unzip=ns,kr.unzipWith=os,kr.update=function(e,t,r){return null==e?e:co(e,t,go(r))},kr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:co(e,t,go(r),n)},kr.values=$a,kr.valuesIn=function(e){return null==e?[]:Yt(e,Na(e))},kr.without=is,kr.words=Ya,kr.wrap=function(e,t){return Ms(go(t),e)},kr.xor=ss,kr.xorBy=as,kr.xorWith=us,kr.zip=cs,kr.zipObject=function(e,t){return po(e||[],t||[],Zr)},kr.zipObjectDeep=function(e,t){return po(e||[],t||[],Yn)},kr.zipWith=ls,kr.entries=ka,kr.entriesIn=Fa,kr.extend=va,kr.extendWith=wa,su(kr,kr),kr.add=bu,kr.attempt=Xa,kr.camelCase=Ua,kr.capitalize=Da,kr.ceil=mu,kr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=ya(r))==r?r:0),t!==o&&(t=(t=ya(t))==t?t:0),on(ya(e),t,r)},kr.clone=function(e){return sn(e,4)},kr.cloneDeep=function(e){return sn(e,5)},kr.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:o)},kr.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:o)},kr.conformsTo=function(e,t){return null==t||an(e,t,Ta(t))},kr.deburr=Ha,kr.defaultTo=function(e,t){return null==e||e!=e?t:e},kr.divide=vu,kr.endsWith=function(e,t,r){e=ba(e),t=so(t);var n=e.length,i=r=r===o?n:on(ha(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},kr.eq=$s,kr.escape=function(e){return(e=ba(e))&&J.test(e)?e.replace(q,tr):e},kr.escapeRegExp=function(e){return(e=ba(e))&&re.test(e)?e.replace(te,"\\$&"):e},kr.every=function(e,t,r){var n=Ws(e)?xt:dn;return r&&bi(e,t,r)&&(t=o),n(e,si(t,3))},kr.find=ys,kr.findIndex=Hi,kr.findKey=function(e,t){return kt(e,si(t,3),mn)},kr.findLast=gs,kr.findLastIndex=Wi,kr.findLastKey=function(e,t){return kt(e,si(t,3),vn)},kr.floor=wu,kr.forEach=bs,kr.forEachRight=ms,kr.forIn=function(e,t){return null==e?e:gn(e,si(t,3),Na)},kr.forInRight=function(e,t){return null==e?e:bn(e,si(t,3),Na)},kr.forOwn=function(e,t){return e&&mn(e,si(t,3))},kr.forOwnRight=function(e,t){return e&&vn(e,si(t,3))},kr.get=Oa,kr.gt=Us,kr.gte=Ds,kr.has=function(e,t){return null!=e&&hi(e,t,On)},kr.hasIn=Ra,kr.head=Vi,kr.identity=ru,kr.includes=function(e,t,r,n){e=Vs(e)?e:$a(e),r=r&&!n?ha(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),sa(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&$t(e,t,r)>-1},kr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ha(r);return o<0&&(o=yr(n+o,0)),$t(e,t,o)},kr.inRange=function(e,t,r){return t=da(t),r===o?(r=t,t=0):r=da(r),function(e,t,r){return e>=gr(t,r)&&e<yr(t,r)}(e=ya(e),t,r)},kr.invoke=Pa,kr.isArguments=Hs,kr.isArray=Ws,kr.isArrayBuffer=zs,kr.isArrayLike=Vs,kr.isArrayLikeObject=qs,kr.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Sn(e)==b},kr.isBuffer=Gs,kr.isDate=Js,kr.isElement=function(e){return ea(e)&&1===e.nodeType&&!na(e)},kr.isEmpty=function(e){if(null==e)return!0;if(Vs(e)&&(Ws(e)||"string"==typeof e||"function"==typeof e.splice||Gs(e)||ua(e)||Hs(e)))return!e.length;var t=di(e);if(t==_||t==x)return!e.size;if(Ei(e))return!Bn(e).length;for(var r in e)if(Ce.call(e,r))return!1;return!0},kr.isEqual=function(e,t){return Tn(e,t)},kr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:o)?r(e,t):o;return n===o?Tn(e,t,o,r):!!n},kr.isError=Ks,kr.isFinite=function(e){return"number"==typeof e&&Mt(e)},kr.isFunction=Ys,kr.isInteger=Xs,kr.isLength=Zs,kr.isMap=ta,kr.isMatch=function(e,t){return e===t||Nn(e,t,ui(t))},kr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:o,Nn(e,t,ui(t),r)},kr.isNaN=function(e){return ra(e)&&e!=+e},kr.isNative=function(e){if(wi(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jn(e)},kr.isNil=function(e){return null==e},kr.isNull=function(e){return null===e},kr.isNumber=ra,kr.isObject=Qs,kr.isObjectLike=ea,kr.isPlainObject=na,kr.isRegExp=oa,kr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},kr.isSet=ia,kr.isString=sa,kr.isSymbol=aa,kr.isTypedArray=ua,kr.isUndefined=function(e){return e===o},kr.isWeakMap=function(e){return ea(e)&&di(e)==T},kr.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Sn(e)},kr.join=function(e,t){return null==e?"":zt.call(e,t)},kr.kebabCase=Wa,kr.last=Ki,kr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==o&&(i=(i=ha(r))<0?yr(n+i,0):gr(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ft(e,Dt,i,!0)},kr.lowerCase=za,kr.lowerFirst=Va,kr.lt=ca,kr.lte=la,kr.max=function(e){return e&&e.length?hn(e,ru,An):o},kr.maxBy=function(e,t){return e&&e.length?hn(e,si(t,2),An):o},kr.mean=function(e){return Ht(e,ru)},kr.meanBy=function(e,t){return Ht(e,si(t,2))},kr.min=function(e){return e&&e.length?hn(e,ru,Ln):o},kr.minBy=function(e,t){return e&&e.length?hn(e,si(t,2),Ln):o},kr.stubArray=pu,kr.stubFalse=yu,kr.stubObject=function(){return{}},kr.stubString=function(){return""},kr.stubTrue=function(){return!0},kr.multiply=Eu,kr.nth=function(e,t){return e&&e.length?Un(e,ha(t)):o},kr.noConflict=function(){return ft._===this&&(ft._=Fe),this},kr.noop=au,kr.now=Os,kr.pad=function(e,t,r){e=ba(e);var n=(t=ha(t))?cr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Ho(ht(o),r)+e+Ho(dt(o),r)},kr.padEnd=function(e,t,r){e=ba(e);var n=(t=ha(t))?cr(e):0;return t&&n<t?e+Ho(t-n,r):e},kr.padStart=function(e,t,r){e=ba(e);var n=(t=ha(t))?cr(e):0;return t&&n<t?Ho(t-n,r)+e:e},kr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),mr(ba(e).replace(ne,""),t||0)},kr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bi(e,t,r)&&(t=r=o),r===o&&("boolean"==typeof t?(r=t,t=o):"boolean"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=da(e),t===o?(t=e,e=0):t=da(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=vr();return gr(e+i*(t-e+at("1e-"+((i+"").length-1))),t)}return Vn(e,t)},kr.reduce=function(e,t,r){var n=Ws(e)?Ct:Vt,o=arguments.length<3;return n(e,si(t,4),r,o,ln)},kr.reduceRight=function(e,t,r){var n=Ws(e)?Bt:Vt,o=arguments.length<3;return n(e,si(t,4),r,o,fn)},kr.repeat=function(e,t,r){return t=(r?bi(e,t,r):t===o)?1:ha(t),qn(ba(e),t)},kr.replace=function(){var e=arguments,t=ba(e[0]);return e.length<3?t:t.replace(e[1],e[2])},kr.result=function(e,t,r){var n=-1,i=(t=bo(t,e)).length;for(i||(i=1,e=o);++n<i;){var s=null==e?o:e[Mi(t[n])];s===o&&(n=i,s=r),e=Ys(s)?s.call(e):s}return e},kr.round=_u,kr.runInContext=e,kr.sample=function(e){return(Ws(e)?Jr:Jn)(e)},kr.size=function(e){if(null==e)return 0;if(Vs(e))return sa(e)?cr(e):e.length;var t=di(e);return t==_||t==x?e.size:Bn(e).length},kr.snakeCase=qa,kr.some=function(e,t,r){var n=Ws(e)?Lt:to;return r&&bi(e,t,r)&&(t=o),n(e,si(t,3))},kr.sortedIndex=function(e,t){return ro(e,t)},kr.sortedIndexBy=function(e,t,r){return no(e,t,si(r,2))},kr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ro(e,t);if(n<r&&$s(e[n],t))return n}return-1},kr.sortedLastIndex=function(e,t){return ro(e,t,!0)},kr.sortedLastIndexBy=function(e,t,r){return no(e,t,si(r,2),!0)},kr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ro(e,t,!0)-1;if($s(e[r],t))return r}return-1},kr.startCase=Ga,kr.startsWith=function(e,t,r){return e=ba(e),r=null==r?0:on(ha(r),0,e.length),t=so(t),e.slice(r,r+t.length)==t},kr.subtract=Su,kr.sum=function(e){return e&&e.length?qt(e,ru):0},kr.sumBy=function(e,t){return e&&e.length?qt(e,si(t,2)):0},kr.template=function(e,t,r){var n=kr.templateSettings;r&&bi(e,t,r)&&(t=o),e=ba(e),t=wa({},t,n,Yo);var i,s,a=wa({},t.imports,n.imports,Yo),u=Ta(a),c=Yt(a,u),l=0,f=t.interpolate||ve,d="__p += '",h=Oe((t.escape||ve).source+"|"+f.source+"|"+(f===X?fe:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),p="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(h,(function(t,r,n,o,a,u){return n||(n=o),d+=e.slice(l,u).replace(we,rr),r&&(i=!0,d+="' +\n__e("+r+") +\n'"),a&&(s=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),d+="';\n";var y=Ce.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new Ee("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(s?d.replace(H,""):d).replace(W,"$1").replace(z,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Xa((function(){return _e(u,p+"return "+d).apply(o,c)}));if(g.source=d,Ks(g))throw g;return g},kr.times=function(e,t){if((e=ha(e))<1||e>f)return[];var r=h,n=gr(e,h);t=si(t),e-=h;for(var o=Gt(n,t);++r<e;)t(r);return o},kr.toFinite=da,kr.toInteger=ha,kr.toLength=pa,kr.toLower=function(e){return ba(e).toLowerCase()},kr.toNumber=ya,kr.toSafeInteger=function(e){return e?on(ha(e),-9007199254740991,f):0===e?e:0},kr.toString=ba,kr.toUpper=function(e){return ba(e).toUpperCase()},kr.trim=function(e,t,r){if((e=ba(e))&&(r||t===o))return Jt(e);if(!e||!(t=so(t)))return e;var n=lr(e),i=lr(t);return vo(n,Zt(n,i),Qt(n,i)+1).join("")},kr.trimEnd=function(e,t,r){if((e=ba(e))&&(r||t===o))return e.slice(0,fr(e)+1);if(!e||!(t=so(t)))return e;var n=lr(e);return vo(n,0,Qt(n,lr(t))+1).join("")},kr.trimStart=function(e,t,r){if((e=ba(e))&&(r||t===o))return e.replace(ne,"");if(!e||!(t=so(t)))return e;var n=lr(e);return vo(n,Zt(n,lr(t))).join("")},kr.truncate=function(e,t){var r=30,n="...";if(Qs(t)){var i="separator"in t?t.separator:i;r="length"in t?ha(t.length):r,n="omission"in t?so(t.omission):n}var s=(e=ba(e)).length;if(nr(e)){var a=lr(e);s=a.length}if(r>=s)return e;var u=r-cr(n);if(u<1)return n;var c=a?vo(a,0,u).join(""):e.slice(0,u);if(i===o)return c+n;if(a&&(u+=c.length-u),oa(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Oe(i.source,ba(de.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var d=l.index;c=c.slice(0,d===o?u:d)}}else if(e.indexOf(so(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+n},kr.unescape=function(e){return(e=ba(e))&&G.test(e)?e.replace(V,dr):e},kr.uniqueId=function(e){var t=++Be;return ba(e)+t},kr.upperCase=Ja,kr.upperFirst=Ka,kr.each=bs,kr.eachRight=ms,kr.first=Vi,su(kr,(gu={},mn(kr,(function(e,t){Ce.call(kr.prototype,t)||(gu[t]=e)})),gu),{chain:!1}),kr.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){kr[e].placeholder=kr})),Ot(["drop","take"],(function(e,t){Dr.prototype[e]=function(r){r=r===o?1:yr(ha(r),0);var n=this.__filtered__&&!t?new Dr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,h),type:e+(n.__dir__<0?"Right":"")}),n},Dr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Dr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:si(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Ot(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Dr.prototype[e]=function(){return this[r](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Dr.prototype[e]=function(){return this.__filtered__?new Dr(this):this[r](1)}})),Dr.prototype.compact=function(){return this.filter(ru)},Dr.prototype.find=function(e){return this.filter(e).head()},Dr.prototype.findLast=function(e){return this.reverse().find(e)},Dr.prototype.invokeMap=Gn((function(e,t){return"function"==typeof e?new Dr(this):this.map((function(r){return In(r,e,t)}))})),Dr.prototype.reject=function(e){return this.filter(Bs(si(e)))},Dr.prototype.slice=function(e,t){e=ha(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Dr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=ha(t))<0?r.dropRight(-t):r.take(t-e)),r)},Dr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Dr.prototype.toArray=function(){return this.take(h)},mn(Dr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=kr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);i&&(kr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Dr,c=a[0],l=u||Ws(t),f=function(e){var t=i.apply(kr,jt([e],a));return n&&d?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,h=!!this.__actions__.length,p=s&&!d,y=u&&!h;if(!s&&l){t=y?t:new Dr(this);var g=e.apply(t,a);return g.__actions__.push({func:ds,args:[f],thisArg:o}),new Ur(g,d)}return p&&y?e.apply(this,a):(g=this.thru(f),p?n?g.value()[0]:g.value():g)})})),Ot(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);kr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Ws(o)?o:[],e)}return this[r]((function(r){return t.apply(Ws(r)?r:[],e)}))}})),mn(Dr.prototype,(function(e,t){var r=kr[t];if(r){var n=r.name+"";Ce.call(Ir,n)||(Ir[n]=[]),Ir[n].push({name:t,func:r})}})),Ir[Fo(o,2).name]=[{name:"wrapper",func:o}],Dr.prototype.clone=function(){var e=new Dr(this.__wrapped__);return e.__actions__=xo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=xo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=xo(this.__views__),e},Dr.prototype.reverse=function(){if(this.__filtered__){var e=new Dr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Dr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ws(e),n=t<0,o=r?e.length:0,i=function(e,t,r){for(var n=-1,o=r.length;++n<o;){var i=r[n],s=i.size;switch(i.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=gr(t,e+s);break;case"takeRight":e=yr(e,t-s)}}return{start:e,end:t}}(0,o,this.__views__),s=i.start,a=i.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,d=0,h=gr(u,this.__takeCount__);if(!r||!n&&o==u&&h==u)return fo(e,this.__actions__);var p=[];e:for(;u--&&d<h;){for(var y=-1,g=e[c+=t];++y<f;){var b=l[y],m=b.iteratee,v=b.type,w=m(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[d++]=g}return p},kr.prototype.at=hs,kr.prototype.chain=function(){return fs(this)},kr.prototype.commit=function(){return new Ur(this.value(),this.__chain__)},kr.prototype.next=function(){this.__values__===o&&(this.__values__=fa(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},kr.prototype.plant=function(e){for(var t,r=this;r instanceof $r;){var n=Fi(r);n.__index__=0,n.__values__=o,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},kr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Dr){var t=e;return this.__actions__.length&&(t=new Dr(this)),(t=t.reverse()).__actions__.push({func:ds,args:[Qi],thisArg:o}),new Ur(t,this.__chain__)}return this.thru(Qi)},kr.prototype.toJSON=kr.prototype.valueOf=kr.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},kr.prototype.first=kr.prototype.head,Ke&&(kr.prototype[Ke]=function(){return this}),kr}();ft._=hr,(n=function(){return hr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},9640:function(e,t,r){var n,o;!function(i,s){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function o(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<t?e:this.methodFactory(i,t,r)}this.log=this.debug}function a(e,r,n){return function(){typeof console!==t&&(s.call(this,r,n),this[e].apply(this,arguments))}}function u(n,s,u){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?i:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):e)}(n)||a.apply(this,arguments)}function c(e,r,o){var i,a=this;r=null==r?"WARN":r;var c="loglevel";function l(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=o||u,a.getLevel=function(){return i},a.setLevel=function(r,o){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(i=r,!1!==o&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(a,r,e),typeof console===t&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){r=e,l()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var f=l();null==f&&(f=r),a.setLevel(f,!1)}var l=new c,f={};l.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=f[e];return t||(t=f[e]=new c(e,l.getLevel(),l.methodFactory)),t};var d=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=d),l},l.getLoggers=function(){return f},l.default=l,l},void 0===(o=n.call(t,r,t,e))||(e.exports=o)}()},2973:(e,t,r)=>{"use strict";var n=r(8834).Buffer,o=r(4406);Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const i=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class s extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=s;class a extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function u(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=a;let c={};function l(e,t){let o={...i,...t};const f=r(732),d=r(3406),h=r(4087),{promisify:p}=r(3335),{resolve:y}=r(883),g=!!/^https/.test(e);let b={method:o.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const m=e=>e.replace(/:| /g,"").toLowerCase();if(o.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&o.sslPinnedCertificates?.map((e=>m(e))).sort()].join();b.agent=c[t]||(c[t]=new(g?d:f).Agent(e))}return"json"===o.type&&(b.headers["Content-Type"]="application/json"),o.data&&(o.method||(b.method="POST"),b.body="json"===o.type?JSON.stringify(o.data):o.data),b.headers={...b.headers,...o.headers},o.sslAllowSelfSigned&&(b.rejectUnauthorized=!1),new Promise(((t,r)=>{const i=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await l(e,{...o,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new s(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},c=(g?d:f).request(e,b,(s=>{s.on("error",i),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(o.redirect&&300<=r&&r<400&&t.headers.location){if(10==o._redirectCount)throw new Error("Request failed. Too much redirects.");return o._redirectCount+=1,await l(y(e,t.headers.location),o)}if(o.expectStatusCode&&r!==o.expectStatusCode)throw t.resume(),new a(r);let i=[];for await(const e of t)i.push(e);let s=n.concat(i);const c=t.headers["content-encoding"];"br"===c&&(s=await p(h.brotliDecompress)(s)),"gzip"!==c&&"deflate"!==c||(s=await p(h.unzip)(s));const f=u(s,o.type);return o.full?{headers:t.headers,status:r,body:f}:f})(s))}catch(e){r(e)}})()}));c.on("error",i);const v=o.sslPinnedCertificates?.map((e=>m(e))),w=e=>{const t=m(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!v.includes(t))return c.emit("error",new s(`Invalid SSL certificate: ${t} Expected: ${v}`,t)),c.abort()};o.sslPinnedCertificates&&c.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",w.bind(null,e))})),o.keepAlive&&c.setNoDelay(!0),b.body&&c.write(b.body),c.end()}))}const f=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),d=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function h(e,t){let r={...i,...t};const n=new Headers;"json"===r.type&&n.set("Content-Type","application/json");let o=new URL(e);if(o.username){const e=btoa(`${o.username}:${o.password}`);n.set("Authorization",`Basic ${e}`),o.username="",o.password=""}e=""+o;for(let e in r.headers){const t=e.toLowerCase();(f.has(t)||r.cors&&!d.has(t))&&n.set(e,r.headers[e])}let s={headers:n,redirect:r.redirect?"follow":"manual"};r.referrer||(s.referrerPolicy="no-referrer"),r.cors&&(s.mode="cors"),r.data&&(r.method||(s.method="POST"),s.body="json"===r.type?JSON.stringify(r.data):r.data);const c=await fetch(e,s);if(r.expectStatusCode&&c.status!==r.expectStatusCode)throw new a(c.status);const l=u(new Uint8Array(await c.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(c.headers.entries()),status:c.status,body:l}:l}const p=!!("object"==typeof o&&o.versions&&o.versions.node&&o.versions.v8);t.default=function(e,t){return(p?l:h)(e,t)}},1378:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,s){s=s||{};var a,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\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(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&isFinite(e))return s.long?(a=e,(u=Math.abs(a))>=o?i(a,u,o,"day"):u>=n?i(a,u,n,"hour"):u>=r?i(a,u,r,"minute"):u>=t?i(a,u,t,"second"):a+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9500:(e,t,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&u&&"function"==typeof u.get?u.get:null,l=a&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,g=Function.prototype.toString,b=String.prototype.match,m=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,E=String.prototype.toLowerCase,_=RegExp.prototype.test,S=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,R=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,N="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,j=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function B(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-R(-e):R(e);if(n!==e){var o=String(n),i=m.call(t,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var L=r(3260),M=L.custom,k=H(M)?M:null;function F(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function $(e){return v.call(String(e),/"/g,"&quot;")}function U(e){return!("[object Array]"!==V(e)||N&&"object"==typeof e&&N in e)}function D(e){return!("[object RegExp]"!==V(e)||N&&"object"==typeof e&&N in e)}function H(e){if(T)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var a=r||{};if(z(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!z(a,"customInspect")||a.customInspect;if("boolean"!=typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(z(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return y?B(t,w):w}if("bigint"==typeof t){var _=String(t)+"n";return y?B(t,_):_}var R=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=R&&R>0&&"object"==typeof t)return U(t)?"[Array]":"[Object]";var I,M=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=A.call(Array(e.indent+1)," ")}return{base:r,prev:A.call(Array(t+1),r)}}(a,n);if(void 0===o)o=[];else if(q(o,t)>=0)return"[Circular]";function W(t,r,i){if(r&&(o=O.call(o)).push(r),i){var s={depth:a.depth};return z(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,n+1,o)}return e(t,a,n+1,o)}if("function"==typeof t&&!D(t)){var J=function(e){if(e.name)return e.name;var t=b.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Q(t,W);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(ee.length>0?" { "+A.call(ee,", ")+" }":"")}if(H(t)){var te=T?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||T?te:K(te)}if((I=t)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var re="<"+E.call(String(t.nodeName)),ne=t.attributes||[],oe=0;oe<ne.length;oe++)re+=" "+ne[oe].name+"="+F($(ne[oe].value),"double",a);return re+=">",t.childNodes&&t.childNodes.length&&(re+="..."),re+"</"+E.call(String(t.nodeName))+">"}if(U(t)){if(0===t.length)return"[]";var ie=Q(t,W);return M&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(ie)?"["+Z(ie,M)+"]":"[ "+A.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||N&&"object"==typeof e&&N in e)}(t)){var se=Q(t,W);return"cause"in Error.prototype||!("cause"in t)||j.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+A.call(se,", ")+" }":"{ ["+String(t)+"] "+A.call(S.call("[cause]: "+W(t.cause),se),", ")+" }"}if("object"==typeof t&&u){if(k&&"function"==typeof t[k]&&L)return L(t,{depth:R-n});if("symbol"!==u&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s&&s.call(t,(function(e,r){ae.push(W(r,t,!0)+" => "+W(e,t))})),X("Map",i.call(t),ae,M)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ue=[];return l&&l.call(t,(function(e){ue.push(W(e,t))})),X("Set",c.call(t),ue,M)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==V(e)||N&&"object"==typeof e&&N in e)}(t))return K(W(Number(t)));if(function(e){if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}(t))return K(W(x.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||N&&"object"==typeof e&&N in e)}(t))return K(p.call(t));if(function(e){return!("[object String]"!==V(e)||N&&"object"==typeof e&&N in e)}(t))return K(W(String(t)));if(!function(e){return!("[object Date]"!==V(e)||N&&"object"==typeof e&&N in e)}(t)&&!D(t)){var ce=Q(t,W),le=C?C(t)===Object.prototype:t instanceof Object||t.constructor===Object,fe=t instanceof Object?"":"null prototype",de=!le&&N&&Object(t)===t&&N in t?m.call(V(t),8,-1):fe?"Object":"",he=(le||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||fe?"["+A.call(S.call([],de||[],fe||[]),": ")+"] ":"");return 0===ce.length?he+"{}":M?he+"{"+Z(ce,M)+"}":he+"{ "+A.call(ce,", ")+" }"}return String(t)};var W=Object.prototype.hasOwnProperty||function(e){return e in this};function z(e,t){return W.call(e,t)}function V(e){return y.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function G(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return G(m.call(e,0,t.maxStringLength),t)+n}return F(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,J),"single",t)}function J(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function K(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function X(e,t,r,n){return e+" ("+t+") {"+(n?Z(r,n):A.call(r,", "))+"}"}function Z(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+A.call(e,","+r)+"\n"+t.prev}function Q(e,t){var r=U(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=z(e,o)?t(e[o],e):""}var i,s="function"==typeof I?I(e):[];if(T){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var u in e)z(e,u)&&(r&&String(Number(u))===u&&u<e.length||T&&i["$"+u]instanceof Symbol||(_.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof I)for(var c=0;c<s.length;c++)j.call(e,s[c])&&n.push("["+t(s[c])+"]: "+t(e[s[c]],e));return n}},7033:(e,t,r)=>{var n=r(8892);function o(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function i(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}e.exports=n(o),e.exports.strict=n(i),o.proto=o((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return o(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return i(this)},configurable:!0})}))},4406:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,u=[],c=!1,l=-1;function f(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&d())}function d(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}n.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];u.push(new h(e,t)),1!==u.length||c||s(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},3171:(e,t,r)=>{var n=r(4406),o=r(7033),i=r(8797),s=r(3558),a=function(){},u=/^v?\.0/.test(n.version),c=function(e){return"function"==typeof e},l=function(e){e()},f=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=c(t[t.length-1]||a)&&t.pop()||a;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(f,d){var h=d<t.length-1;return function(e,t,r,n){n=o(n);var l=!1;e.on("close",(function(){l=!0})),i(e,{readable:t,writable:r},(function(e){if(e)return n(e);l=!0,n()}));var f=!1;return function(t){if(!l&&!f)return f=!0,function(e){return!!u&&!!s&&(e instanceof(s.ReadStream||a)||e instanceof(s.WriteStream||a))&&c(e.close)}(e)?e.close(a):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void n(t||new Error("stream was destroyed"))}}(f,h,d>0,(function(t){e||(e=t),t&&n.forEach(l),h||(n.forEach(l),r(e))}))}));return t.reduce(f)}},5527:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},9126:(e,t,r)=>{"use strict";var n=r(6845),o=r(9166),i=r(5527);e.exports={formats:i,parse:o,stringify:n}},9166:(e,t,r)=>{"use strict";var n=r(2493),o=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},u=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),c=a?i.slice(0,a.index):i,l=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(a=s.exec(i))&&f<r.depth;){if(f+=1,!r.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(a[1])}return a&&l.push("["+i.slice(a.index)+"]"),function(e,t,r,n){for(var o=n?t:u(t,r),i=e.length-1;i>=0;--i){var s,a=e[i];if("[]"===a&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==c&&(s[c]=o):s={0:o}}o=s}return o}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,c={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,f),h=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r<d.length;++r)0===d[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[r]?p="utf-8":"utf8=%26%2310003%3B"===d[r]&&(p="iso-8859-1"),h=r,r=d.length);for(r=0;r<d.length;++r)if(r!==h){var y,g,b=d[r],m=b.indexOf("]="),v=-1===m?b.indexOf("="):m+1;-1===v?(y=t.decoder(b,s.decoder,p,"key"),g=t.strictNullHandling?null:""):(y=t.decoder(b.slice(0,v),s.decoder,p,"key"),g=n.maybeMap(u(b.slice(v+1),t),(function(e){return t.decoder(e,s.decoder,p,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=a(g)),b.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(c,y)?c[y]=n.combine(c[y],g):c[y]=g}return c}(e,r):e,f=r.plainObjects?Object.create(null):{},d=Object.keys(l),h=0;h<d.length;++h){var p=d[h],y=c(p,l[p],r,"string"==typeof e);f=n.merge(f,y,r)}return!0===r.allowSparse?f:n.compact(f)}},6845:(e,t,r)=>{"use strict";var n=r(4294),o=r(2493),i=r(5527),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,d=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p={},y=function e(t,r,i,s,a,c,f,d,y,g,b,m,v,w,E,_){for(var S,A=t,O=_,R=0,x=!1;void 0!==(O=O.get(p))&&!x;){var I=O.get(t);if(R+=1,void 0!==I){if(I===R)throw new RangeError("Cyclic object value");x=!0}void 0===O.get(p)&&(R=0)}if("function"==typeof d?A=d(r,A):A instanceof Date?A=b(A):"comma"===i&&u(A)&&(A=o.maybeMap(A,(function(e){return e instanceof Date?b(e):e}))),null===A){if(a)return f&&!w?f(r,h.encoder,E,"key",m):r;A=""}if("string"==typeof(S=A)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(A))return f?[v(w?r:f(r,h.encoder,E,"key",m))+"="+v(f(A,h.encoder,E,"value",m))]:[v(r)+"="+v(String(A))];var P,T=[];if(void 0===A)return T;if("comma"===i&&u(A))w&&f&&(A=o.maybeMap(A,f)),P=[{value:A.length>0?A.join(",")||null:void 0}];else if(u(d))P=d;else{var N=Object.keys(A);P=y?N.sort(y):N}for(var j=s&&u(A)&&1===A.length?r+"[]":r,C=0;C<P.length;++C){var B=P[C],L="object"==typeof B&&void 0!==B.value?B.value:A[B];if(!c||null!==L){var M=u(A)?"function"==typeof i?i(j,B):j:j+(g?"."+B:"["+B+"]");_.set(t,R);var k=n();k.set(p,_),l(T,e(L,M,i,s,a,c,"comma"===i&&w&&u(A)?null:f,d,y,g,b,m,v,w,E,k))}}return T};e.exports=function(e,t){var r,o=e,c=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!s.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=h.filter;return("function"==typeof e.filter||u(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?o=(0,c.filter)("",o):u(c.filter)&&(r=c.filter);var f,d=[];if("object"!=typeof o||null===o)return"";f=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var p=a[f];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===p&&t&&t.commaRoundTrip;r||(r=Object.keys(o)),c.sort&&r.sort(c.sort);for(var b=n(),m=0;m<r.length;++m){var v=r[m];c.skipNulls&&null===o[v]||l(d,y(o[v],v,p,g,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,b))}var w=d.join(c.delimiter),E=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),w.length>0?E+w:""}},2493:(e,t,r)=>{"use strict";var n=r(5527),o=Object.prototype.hasOwnProperty,i=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],s=o.obj[o.prop],a=Object.keys(s),u=0;u<a.length;++u){var c=a[u],l=s[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",c=0;c<a.length;++c){var l=a.charCodeAt(c);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)?u+=a.charAt(c):l<128?u+=s[l]:l<2048?u+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?u+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(c+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(c)),u+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var s=t;return i(t)&&!i(r)&&(s=a(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var s=t[i];s&&"object"==typeof s&&r&&"object"==typeof r?t[i]=e(s,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var s=r[i];return o.call(t,i)?t[i]=e(t[i],s,n):t[i]=s,t}),s)}}},7834:(e,t,r)=>{var n=r(8834),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},3321:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o){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?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?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 o))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=i(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(">")))}}e.exports=o;const i=r(1388),{safeRe:s,t:a}=r(4808),u=r(8117),c=r(952),l=r(2435),f=r(6843)},6843:(e,t,r)=>{class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)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))).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&&y))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(i,P(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=>v(e,this.options))).join(" ").split(/\s+/).map((e=>I(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,m=u.map((e=>new s(e,this.options)));for(const e of m){if(g(e))return[e];b.set(e.value,e)}b.size>1&&b.has("")&&b.delete("");const w=[...b.values()];return o.set(t,w),w}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>m(r,t)&&e.set.some((e=>m(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(T(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=new(r(293))({max:1e3}),i=r(1388),s=r(3321),a=r(952),u=r(2435),{safeRe:c,t:l,comparatorTrimReplace:f,tildeTrimReplace:d,caretTrimReplace:h}=r(4808),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:y}=r(5558),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,m=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},v=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=E(e,t),a("tildes",e),e=O(e,t),a("xrange",e),e=x(e,t),a("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map((e=>_(e,t))).join(" "),_=(e,t)=>{const r=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(r,((t,r,n,o,i)=>{let s;return a("tilde",e,t,r,n,o,i),w(r)?s="":w(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:w(o)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(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,o,i,s)=>{let u;return a("caret",e,t,r,o,i,s),w(r)?u="":w(o)?u=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(i)?u="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),u="0"===r?"0"===o?`>=${r}.${o}.${i}-${s} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${s} <${+r+1}.0.0-0`):(a("no pr"),u="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),a("caret return",u),u}))},O=(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,o,i,s,u)=>{a("xRange",e,r,n,o,i,s,u);const c=w(o),l=c||w(i),f=l||w(s),d=f;return"="===n&&d&&(n=""),u=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),"<"===n&&(u="-0"),r=`${n+o}.${i}.${s}${u}`):l?r=`>=${o}.0.0${u} <${+o+1}.0.0-0`:f&&(r=`>=${o}.${i}.0${u} <${o}.${+i+1}.0-0`),a("xRange return",r),r}))},x=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[l.STAR],"")),I=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),P=e=>(t,r,n,o,i,s,a,u,c,l,f,d,h)=>`${r=w(n)?"":w(o)?`>=${n}.0.0${e?"-0":""}`:w(i)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=w(c)?"":w(l)?`<${+c+1}.0.0-0`:w(f)?`<${c}.${+l+1}.0-0`:d?`<=${c}.${l}.${f}-${d}`:e?`<${c}.${l}.${+f+1}-0`:`<=${u}`}`.trim(),T=(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!==s.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}},2435:(e,t,r)=>{const n=r(952),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(5558),{safeRe:s,t:a}=r(4808),u=r(1388),{compareIdentifiers:c}=r(4935);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>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[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>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||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<i)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],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return c(r,o)}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}}e.exports=l},6694:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},8117:(e,t,r)=>{const n=r(3276),o=r(7893),i=r(6379),s=r(8463),a=r(1897),u=r(506);e.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 o(e,r,c);case">":return i(e,r,c);case">=":return s(e,r,c);case"<":return a(e,r,c);case"<=":return u(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},8686:(e,t,r)=>{const n=r(2435),o=r(9943),{safeRe:i,t:s}=r(4808);e.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=i[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[s.COERCERTL].lastIndex=-1}else r=e.match(i[s.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},5914:(e,t,r)=>{const n=r(2435);e.exports=(e,t,r)=>{const o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},5404:(e,t,r)=>{const n=r(2271);e.exports=(e,t)=>n(e,t,!0)},2271:(e,t,r)=>{const n=r(2435);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},6007:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;const s=i>0,a=s?r:o,u=s?o: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!==o.major?l+"major":r.minor!==o.minor?l+"minor":r.patch!==o.patch?l+"patch":"prerelease"}},3276:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>0===n(e,t,r)},6379:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)>0},8463:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)>=0},6360:(e,t,r)=>{const n=r(2435);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},1897:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)<0},506:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(e,t,r)<=0},4551:(e,t,r)=>{const n=r(2435);e.exports=(e,t)=>new n(e,t).major},469:(e,t,r)=>{const n=r(2435);e.exports=(e,t)=>new n(e,t).minor},7893:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>0!==n(e,t,r)},9943:(e,t,r)=>{const n=r(2435);e.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}}},8341:(e,t,r)=>{const n=r(2435);e.exports=(e,t)=>new n(e,t).patch},8204:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},733:(e,t,r)=>{const n=r(2271);e.exports=(e,t,r)=>n(t,e,r)},2961:(e,t,r)=>{const n=r(5914);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},9844:(e,t,r)=>{const n=r(6843);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},1116:(e,t,r)=>{const n=r(5914);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},7230:(e,t,r)=>{const n=r(9943);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},7699:(e,t,r)=>{const n=r(4808),o=r(5558),i=r(2435),s=r(4935),a=r(9943),u=r(7230),c=r(6694),l=r(6360),f=r(6007),d=r(4551),h=r(469),p=r(8341),y=r(8204),g=r(2271),b=r(733),m=r(5404),v=r(5914),w=r(1116),E=r(2961),_=r(6379),S=r(1897),A=r(3276),O=r(7893),R=r(8463),x=r(506),I=r(8117),P=r(8686),T=r(3321),N=r(6843),j=r(9844),C=r(8865),B=r(3727),L=r(4338),M=r(1542),k=r(6240),F=r(9106),$=r(995),U=r(7805),D=r(2013),H=r(1338),W=r(3122);e.exports={parse:a,valid:u,clean:c,inc:l,diff:f,major:d,minor:h,patch:p,prerelease:y,compare:g,rcompare:b,compareLoose:m,compareBuild:v,sort:w,rsort:E,gt:_,lt:S,eq:A,neq:O,gte:R,lte:x,cmp:I,coerce:P,Comparator:T,Range:N,satisfies:j,toComparators:C,maxSatisfying:B,minSatisfying:L,minVersion:M,validRange:k,outside:F,gtr:$,ltr:U,intersects:D,simplifyRange:H,subset:W,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},5558:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},952:(e,t,r)=>{var n=r(4406);const o="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=o},4935:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},1388:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},4808:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o}=r(5558),i=r(952),s=(t=e.exports={}).re=[],a=t.safeRe=[],u=t.src=[],c=t.t={};let l=0;const f="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[f,o]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=l++;i(e,o,t),c[e]=o,u[o]=t,s[o]=new RegExp(t,r?"g":void 0),a[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),h("MAINVERSION",`(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})\\.(${u[c.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})\\.(${u[c.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[c.NUMERICIDENTIFIER]}|${u[c.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[c.NUMERICIDENTIFIERLOOSE]}|${u[c.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${u[c.PRERELEASEIDENTIFIER]}(?:\\.${u[c.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[c.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${f}+`),h("BUILD",`(?:\\+(${u[c.BUILDIDENTIFIER]}(?:\\.${u[c.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[c.MAINVERSION]}${u[c.PRERELEASE]}?${u[c.BUILD]}?`),h("FULL",`^${u[c.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[c.MAINVERSIONLOOSE]}${u[c.PRERELEASELOOSE]}?${u[c.BUILD]}?`),h("LOOSE",`^${u[c.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[c.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:\\.(${u[c.XRANGEIDENTIFIER]})(?:${u[c.PRERELEASE]})?${u[c.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[c.XRANGEIDENTIFIERLOOSE]})(?:${u[c.PRERELEASELOOSE]})?${u[c.BUILD]}?)?)?`),h("XRANGE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[c.GTLT]}\\s*${u[c.XRANGEPLAINLOOSE]}$`),h("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),h("COERCERTL",u[c.COERCE],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[c.LONETILDE]}${u[c.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[c.LONECARET]}${u[c.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[c.LONECARET]}${u[c.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[c.GTLT]}\\s*(${u[c.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[c.GTLT]}\\s*(${u[c.LOOSEPLAIN]}|${u[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[c.XRANGEPLAIN]})\\s+-\\s+(${u[c.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[c.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},293:(e,t,r)=>{"use strict";const n=r(4301),o=Symbol("max"),i=Symbol("length"),s=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,y=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(g(e,t)){if(m(e,n),!e[a])return}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[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const r=t.prev;m(e,t),t=r}},m=(e,t)=>{if(t){const r=t.value;e[c]&&e[c](r.key,r.value),e[i]-=r.length,e[d].delete(r.key),e[f].removeNode(t)}};class v{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const w=(e,t,r,n)=>{let o=r.value;g(e,o)&&(m(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.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[o]=e.max||1/0;const t=e.length||p;if(this[s]="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[o]=e||1/0,b(this)}get max(){return this[o]}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[s]&&(this[s]=e,this[i]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),b(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(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[i]=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[s](t,e);if(this[d].has(e)){if(a>this[o])return m(this,this[d].get(e)),!1;const s=this[d].get(e).value;return this[c]&&(this[l]||this[c](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),b(this),!0}const h=new v(e,t,a,n,r);return h.length>this[o]?(this[c]&&this[c](e,t),!1):(this[i]+=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 y(this,e,!0)}peek(e){return y(this,e,!1)}pop(){const e=this[f].tail;return e?(m(this,e),e.value):null}del(e){m(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],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>y(this,t,!1)))}}},5690:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4301:(e,t,r)=>{"use strict";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,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(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 i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(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}e.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++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){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){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,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.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 o=0;null!==n;o++)r=e(r,n.value,o),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 o=this.length-1;null!==n;o--)r=e(r,n.value,o),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 o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.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 o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.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,i=this.head;null!==i&&n<e;n++)i=i.next;var s=[];for(n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);for(null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev),n=0;n<r.length;n++)i=o(this,i,r[n]);return s},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{r(5690)(n)}catch(e){}},995:(e,t,r)=>{const n=r(9106);e.exports=(e,t,r)=>n(e,t,">",r)},2013:(e,t,r)=>{const n=r(6843);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},7805:(e,t,r)=>{const n=r(9106);e.exports=(e,t,r)=>n(e,t,"<",r)},3727:(e,t,r)=>{const n=r(2435),o=r(6843);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},4338:(e,t,r)=>{const n=r(2435),o=r(6843);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},1542:(e,t,r)=>{const n=r(2435),o=r(6843),i=r(6379);e.exports=(e,t)=>{e=new o(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 o=e.set[t];let s=null;o.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">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!i(r,s)||(r=s)}return r&&e.test(r)?r:null}},9106:(e,t,r)=>{const n=r(2435),o=r(3321),{ANY:i}=o,s=r(6843),a=r(9844),u=r(6379),c=r(1897),l=r(506),f=r(8463);e.exports=(e,t,r,d)=>{let h,p,y,g,b;switch(e=new n(e,d),t=new s(t,d),r){case">":h=u,p=l,y=c,g=">",b=">=";break;case"<":h=c,p=f,y=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 s=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,h(e.semver,s.semver,d)?s=e:y(e.semver,a.semver,d)&&(a=e)})),s.operator===g||s.operator===b)return!1;if((!a.operator||a.operator===g)&&p(e,a.semver))return!1;if(a.operator===b&&y(e,a.semver))return!1}return!0}},1338:(e,t,r)=>{const n=r(9844),o=r(2271);e.exports=(e,t,r)=>{const i=[];let s=null,a=null;const u=e.sort(((e,t)=>o(e,t,r)));for(const e of u)n(e,t,r)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null);s&&i.push([s,null]);const c=[];for(const[e,t]of i)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}},3122:(e,t,r)=>{const n=r(6843),o=r(3321),{ANY:i}=o,s=r(9844),a=r(2271),u=[new o(">=0.0.0-0")],c=[new o(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?u:c}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=c}const n=new Set;let o,l,h,p,y,g,b;for(const t of e)">"===t.operator||">="===t.operator?o=f(o,t,r):"<"===t.operator||"<="===t.operator?l=d(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(h=a(o.semver,l.semver,r),h>0)return null;if(0===h&&(">="!==o.operator||"<="!==l.operator))return null}for(const e of n){if(o&&!s(e,String(o),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let m=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;m&&1===m.prerelease.length&&"<"===l.operator&&0===m.prerelease[0]&&(m=!1);for(const e of t){if(b=b||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,o)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(p=f(o,e,r),p===e&&p!==o)return!1}else if(">="===o.operator&&!s(o.semver,String(e),r))return!1;if(l)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),"<"===e.operator||"<="===e.operator){if(y=d(l,e,r),y===e&&y!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==h)return!1}return!(o&&g&&!l&&0!==h||l&&b&&!o&&0!==h||v||m)},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};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},8865:(e,t,r)=>{const n=r(6843);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},6240:(e,t,r)=>{const n=r(6843);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},4294:(e,t,r)=>{"use strict";var n=r(7286),o=r(2680),i=r(9500),s=n("%TypeError%"),a=n("%WeakMap%",!0),u=n("%Map%",!0),c=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),d=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),p=o("Map.prototype.has",!0),y=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new s("Side channel does not contain "+i(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return c(e,n)}else if(u){if(t)return d(t,n)}else if(r)return function(e,t){var r=y(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return f(e,n)}else if(u){if(t)return p(t,n)}else if(r)return function(e,t){return!!y(e,t)}(r,n);return!1},set:function(n,o){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),l(e,n,o)):u?(t||(t=new u),h(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=y(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},214:(e,t,r)=>{"use strict";var n=r(7834).Buffer,o=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 i(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===o||!o(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 s(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 void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function 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):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=s(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||-2===o?0:(o=s(t[n]))>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||-2===o?0:(o=s(t[n]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):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)},i.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}},9639:function(e,t,r){var n;e=r.nmd(e),function(o){t&&t.nodeType,e&&e.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var s,a=2147483647,u=36,c=26,l=38,f=700,d=/^xn--/,h=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=u-1,b=Math.floor,m=String.fromCharCode;function v(e){throw new RangeError(y[e])}function w(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function E(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+w((e=e.replace(p,".")).split("."),t).join(".")}function _(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function S(e){return w(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+m(e)})).join("")}function A(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,r){var n=0;for(e=r?b(e/f):e>>1,e+=b(e/t);e>g*c>>1;n+=u)e=b(e/g);return b(n+(g+1)*e/(e+l))}function R(e){var t,r,n,o,i,s,l,f,d,h,p,y=[],g=e.length,m=0,w=128,E=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&v("not-basic"),y.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<g;){for(i=m,s=1,l=u;o>=g&&v("invalid-input"),((f=(p=e.charCodeAt(o++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||f>b((a-m)/s))&&v("overflow"),m+=f*s,!(f<(d=l<=E?1:l>=E+c?c:l-E));l+=u)s>b(a/(h=u-d))&&v("overflow"),s*=h;E=O(m-i,t=y.length+1,0==i),b(m/t)>a-w&&v("overflow"),w+=b(m/t),m%=t,y.splice(m++,0,w)}return S(y)}function x(e){var t,r,n,o,i,s,l,f,d,h,p,y,g,w,E,S=[];for(y=(e=_(e)).length,t=128,r=0,i=72,s=0;s<y;++s)(p=e[s])<128&&S.push(m(p));for(n=o=S.length,o&&S.push("-");n<y;){for(l=a,s=0;s<y;++s)(p=e[s])>=t&&p<l&&(l=p);for(l-t>b((a-r)/(g=n+1))&&v("overflow"),r+=(l-t)*g,t=l,s=0;s<y;++s)if((p=e[s])<t&&++r>a&&v("overflow"),p==t){for(f=r,d=u;!(f<(h=d<=i?1:d>=i+c?c:d-i));d+=u)E=f-h,w=u-h,S.push(m(A(h+E%w,0))),f=b(E/w);S.push(m(A(f,0))),i=O(r,g,n==o),r=0,++n}++r,++t}return S.join("")}s={version:"1.4.1",ucs2:{decode:_,encode:S},decode:R,encode:x,toASCII:function(e){return E(e,(function(e){return h.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return E(e,(function(e){return d.test(e)?R(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},883:(e,t,r)=>{"use strict";var n=r(9639);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(9126);function m(e,t,r){if(e&&"object"==typeof e&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var m=e=u.join(s);if(m=m.trim(),!r&&1===e.split("#").length){var v=a.exec(m);if(v)return this.path=m,this.href=m,this.pathname=v[1],v[2]?(this.search=v[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=i.exec(m);if(w){var E=(w=w[0]).toLowerCase();this.protocol=E,m=m.substr(w.length)}if(r||w||m.match(/^\/\/[^@/]+@[^@/]+/)){var _="//"===m.substr(0,2);!_||w&&y[w]||(m=m.substr(2),this.slashes=!0)}if(!y[w]&&(_||w&&!g[w])){for(var S,A,O=-1,R=0;R<f.length;R++)-1!==(x=m.indexOf(f[R]))&&(-1===O||x<O)&&(O=x);for(-1!==(A=-1===O?m.lastIndexOf("@"):m.lastIndexOf("@",O))&&(S=m.slice(0,A),m=m.slice(A+1),this.auth=decodeURIComponent(S)),O=-1,R=0;R<l.length;R++){var x;-1!==(x=m.indexOf(l[R]))&&(-1===O||x<O)&&(O=x)}-1===O&&(O=m.length),this.host=m.slice(0,O),m=m.slice(O),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var P=this.hostname.split(/\./),T=(R=0,P.length);R<T;R++){var N=P[R];if(N&&!N.match(d)){for(var j="",C=0,B=N.length;C<B;C++)N.charCodeAt(C)>127?j+="x":j+=N[C];if(!j.match(d)){var L=P.slice(0,R),M=P.slice(R+1),k=N.match(h);k&&(L.push(k[1]),M.unshift(k[2])),M.length&&(m="/"+M.join(".")+m),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",$=this.hostname||"";this.host=$+F,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!p[E])for(R=0,T=c.length;R<T;R++){var U=c[R];if(-1!==m.indexOf(U)){var D=encodeURIComponent(U);D===U&&(D=escape(U)),m=m.split(U).join(D)}}var H=m.indexOf("#");-1!==H&&(this.hash=m.substr(H),m=m.slice(0,H));var W=m.indexOf("?");if(-1!==W?(this.search=m.substr(W),this.query=m.substr(W+1),t&&(this.query=b.parse(this.query)),m=m.slice(0,W)):t&&(this.search="",this.query={}),m&&(this.pathname=m),g[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var z=this.search||"";this.path=F+z}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=b.stringify(this.query));var s=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(m(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if("string"==typeof e){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),i=0;i<n.length;i++){var s=n[i];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var c=a[u];"protocol"!==c&&(r[c]=e[c])}return g[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!g[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var d=l[f];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||y[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var p=r.pathname||"",b=r.search||"";r.path=p+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var m=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=v||m||r.host&&e.pathname,E=w,_=r.pathname&&r.pathname.split("/")||[],S=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!g[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),w=w&&(""===h[0]||""===_[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,_=h;else if(h.length)_||(_=[]),_.pop(),_=_.concat(h),r.search=e.search,r.query=e.query;else if(null!=e.search)return S&&(r.host=_.shift(),r.hostname=r.host,(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.hostname=I.shift(),r.host=r.hostname)),r.search=e.search,r.query=e.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var A=_.slice(-1)[0],O=(r.host||e.host||_.length>1)&&("."===A||".."===A)||""===A,R=0,x=_.length;x>=0;x--)"."===(A=_[x])?_.splice(x,1):".."===A?(_.splice(x,1),R++):R&&(_.splice(x,1),R--);if(!w&&!E)for(;R--;R)_.unshift("..");!w||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),O&&"/"!==_.join("/").substr(-1)&&_.push("");var I,P=""===_[0]||_[0]&&"/"===_[0].charAt(0);return S&&(r.hostname=P?"":_.length?_.shift():"",r.host=r.hostname,(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.hostname=I.shift(),r.host=r.hostname)),(w=w||r.host&&_.length)&&!P&&_.unshift(""),_.length>0?r.pathname=_.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=m,t.resolve=function(e,t){return m(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?m(e,!1,!0).resolveObject(t):t},t.format=function(e){return"string"==typeof e&&(e=m(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o},82:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},4895:(e,t,r)=>{"use strict";var n=r(2635),o=r(3138),i=r(2094),s=r(198);function a(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=a(Object.prototype.toString),f=a(Number.prototype.valueOf),d=a(String.prototype.valueOf),h=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var y=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===l(e)}function m(e){return"[object Set]"===l(e)}function v(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function E(e){return"[object ArrayBuffer]"===l(e)}function _(e){return"undefined"!=typeof ArrayBuffer&&(E.working?E(e):e instanceof ArrayBuffer)}function S(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(S.working?S(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(m.working?m(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},E.working="undefined"!=typeof ArrayBuffer&&E(new ArrayBuffer),t.isArrayBuffer=_,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function R(e){return"[object SharedArrayBuffer]"===l(e)}function x(e){return void 0!==O&&(void 0===R.working&&(R.working=R(new O)),R.working?R(e):e instanceof O)}function I(e){return g(e,f)}function P(e){return g(e,d)}function T(e){return g(e,h)}function N(e){return u&&g(e,p)}function j(e){return c&&g(e,y)}t.isSharedArrayBuffer=x,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=I,t.isStringObject=P,t.isBooleanObject=T,t.isBigIntObject=N,t.isSymbolObject=j,t.isBoxedPrimitive=function(e){return I(e)||P(e)||T(e)||N(e)||j(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(_(e)||x(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},3335:(e,t,r)=>{var n=r(4406),o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(e).replace(i,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<o;a=n[++r])b(a)||!_(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),d(n,e,n.depth)}function l(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function f(e,t){return e}function d(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=d(e,o,n)),o}var i=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),A(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(E(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return h(r)}var c,l="",f=!1,_=["{","}"];return y(r)&&(f=!0,_=["[","]"]),O(r)&&(l=" [Function"+(r.name?": "+r.name:"")+"]"),E(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),A(r)&&(l=" "+h(r)),0!==s.length||f&&0!=r.length?n<0?E(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)P(t,String(s))?i.push(p(e,t,r,n,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(p(e,t,r,n,o,!0))})),i}(e,r,n,a,s):s.map((function(t){return p(e,r,n,a,t,f)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,_)):_[0]+l+_[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),P(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=b(r)?d(e,u.value,null):d(e,u.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function b(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function E(e){return _(e)&&"[object RegExp]"===R(e)}function _(e){return"object"==typeof e&&null!==e}function S(e){return _(e)&&"[object Date]"===R(e)}function A(e){return _(e)&&("[object Error]"===R(e)||e instanceof Error)}function O(e){return"function"==typeof e}function R(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(4895),t.isArray=y,t.isBoolean=g,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=E,t.types.isRegExp=E,t.isObject=_,t.isDate=S,t.types.isDate=S,t.isError=A,t.types.isNativeError=A,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(82);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[x((e=new Date).getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(1285),t._extend=function(e,t){if(!t||!_(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),T&&Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=T,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,s=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(s.bind(null,null,e))}),(function(e){n.nextTick(N.bind(null,e,s))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,o(e)),t}},2094:(e,t,r)=>{"use strict";var n=r(3243),o=r(2191),i=r(2680),s=r(326),a=i("Object.prototype.toString"),u=r(7226)(),c="undefined"==typeof globalThis?r.g:globalThis,l=o(),f=i("String.prototype.slice"),d={},h=Object.getPrototypeOf;u&&s&&h&&n(l,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var r=h(t),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}d[e]=n.get}}}));var p=r(198);e.exports=function(e){return!!p(e)&&(u&&Symbol.toStringTag in e?function(e){var t=!1;return n(d,(function(r,n){if(!t)try{var o=r.call(e);o===n&&(t=o)}catch(e){}})),t}(e):f(a(e),8,-1))}},8892:e=>{e.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),o=e[e.length-1];return"function"==typeof n&&n!==o&&Object.keys(o).forEach((function(e){n[e]=o[e]})),n}}},732:()=>{},3406:()=>{},4087:()=>{},3260:()=>{},3558:()=>{},2191:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}},6686:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>O,array:()=>R,assert:()=>f,assign:()=>g,bigint:()=>x,boolean:()=>I,coerce:()=>Y,create:()=>d,date:()=>P,defaulted:()=>X,define:()=>b,deprecated:()=>m,dynamic:()=>v,empty:()=>Q,enums:()=>T,func:()=>N,instance:()=>j,integer:()=>C,intersection:()=>B,is:()=>p,lazy:()=>w,literal:()=>L,map:()=>M,mask:()=>h,max:()=>te,min:()=>re,never:()=>k,nonempty:()=>ne,nullable:()=>F,number:()=>$,object:()=>U,omit:()=>E,optional:()=>D,partial:()=>_,pattern:()=>oe,pick:()=>S,record:()=>H,refine:()=>se,regexp:()=>W,set:()=>z,size:()=>ie,string:()=>V,struct:()=>A,trimmed:()=>Z,tuple:()=>q,type:()=>G,union:()=>J,unknown:()=>K,validate:()=>y});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...i}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function o(e){return"object"==typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=r,{refinement:u,message:c=`Expected a value of type \`${a}\`${u?` with refinement \`${u}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:u,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*u(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*c(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,u={path:n,branch:i};if(s&&(e=t.coercer(e,u),a&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,u))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,d,h]of t.entries(e,u)){const t=c(d,h,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,d],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(d=r[1],void 0===f?e=d:e instanceof Map?e.set(f,d):e instanceof Set?e.add(d):o(e)&&(void 0!==d||f in e)&&(e[f]=d))}if("not_valid"!==l)for(const n of t.refiner(e,u))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=i,this.validator=n?(e,t)=>u(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>u(o(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return d(e,this,t)}is(e){return p(e,this)}mask(e,t){return h(e,this,t)}validate(e,t={}){return y(e,this,t)}}function f(e,t,r){const n=y(e,t,{message:r});if(n[0])throw n[0]}function d(e,t,r){const n=y(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function h(e,t,r){const n=y(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t){return!y(e,t)[0]}function y(e,t,r={}){const o=c(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function g(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?G(n):U(n)}function b(e,t){return new l({type:e,schema:null,validator:t})}function m(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function v(e){return new l({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)})}function w(e){let t;return new l({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))})}function E(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?G(n):U(n)}function _(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=D(t[e]);return U(t)}function S(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return U(n)}function A(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),b(e,t)}function O(){return b("any",(()=>!0))}function R(e){return new l({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: ${s(e)}`})}function x(){return b("bigint",(e=>"bigint"==typeof e))}function I(){return b("boolean",(e=>"boolean"==typeof e))}function P(){return b("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function T(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function N(){return b("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function j(e){return b("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function C(){return b("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function B(e){return new l({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)}})}function L(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function M(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,o]of r.entries())yield[n,n,e],yield[n,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function k(){return b("never",(()=>!1))}function F(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function $(){return b("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function U(e){const t=e?Object.keys(e):[],r=k();return new l({type:"object",schema:e||null,*entries(n){if(e&&o(n)){const o=new Set(Object.keys(n));for(const r of t)o.delete(r),yield[r,n[r],e[r]];for(const e of o)yield[e,n[e],r]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function D(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function H(e,t){return new l({type:"record",schema:null,*entries(r){if(o(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`})}function W(){return b("regexp",(e=>e instanceof RegExp))}function z(e){return new l({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: ${s(e)}`})}function V(){return b("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function q(e){const t=k();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})}function G(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(o(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function J(e){const t=e.map((e=>e.type)).join(" | ");return new l({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 o=[];for(const t of e){const[...e]=c(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...o]}})}function K(){return b("unknown",(()=>!0))}function Y(e,t,r){return new l({...e,coercer:(n,o)=>p(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}function X(e,t,r={}){return Y(e,K(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&i(e)&&i(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function Z(e){return Y(e,V(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))}function re(e,t,r={}){const{exclusive:n}=r;return se(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function oe(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function ie(e,t,r=t){const n=`Expected a ${e.type}`,o=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${o} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${o} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${o} but received one with a length of \`${i}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,o){yield*e.refiner(n,o);const i=u(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,n){return(r=function(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(r)?r:String(r)}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}r.r(n),r.d(n,{Web3AuthNoModal:()=>$e}),r(1149);var o=r(2699),i=r(7847),s=r.n(i),a=r(774);function u(e,t,r){try{Reflect.apply(e,t,r)}catch(e){setTimeout((()=>{throw e}))}}r(8797),r(7033),r(3171);class c extends o.EventEmitter{emit(e){let t="error"===e;const r=this._events;if(void 0!==r)t=t&&void 0===r.error;else if(!t)return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(t){let e;if(o.length>0&&([e]=o),e instanceof Error)throw e;const t=new Error("Unhandled error."+(e?` (${e.message})`:""));throw t.context=e,t}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)u(s,this,o);else{const e=s.length,t=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 r=0;r<e;r+=1)u(t[r],this,o)}return!0}}class l extends Error{constructor(e){let{code:r,message:n,data:o}=e;if(!Number.isInteger(r))throw new Error("code must be an integer");if(!n||"string"!=typeof n)throw new Error("message must be string");super(n),t(this,"code",void 0),t(this,"data",void 0),this.code=r,void 0!==o&&(this.data=o)}toString(){return s()({code:this.code,message:this.message,data:this.data,stack:this.stack})}}function f(e){return async(t,r,n,o)=>{let i;const s=new Promise((e=>{i=e}));let a=null,u=!1;const c=async()=>{u=!0,n((e=>{a=e,i()})),await s};try{await e(t,r,c),u?(await s,a(null)):o(null)}catch(e){a?a(e):o(e)}}}function d(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 h(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?d(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class p extends c{constructor(){super(),t(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(e,t,r){const n=[];let o=null,i=!1;for(const s of r)if([o,i]=await p._runMiddleware(e,t,s,n),i)break;return[o,i,n.reverse()]}static _runMiddleware(e,t,r,n){return new Promise((o=>{const i=e=>{const r=e||t.error;r&&(t.error=(0,a.Xy)(r)),o([r,!0])},s=e=>{t.error?i(t.error):(e&&("function"!=typeof e&&i(new l({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),n.push(e)),o([null,!1]))};try{r(e,t,s,i)}catch(e){i(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 l({code:-32603,message:"Response has no error or result for request"});if(!r)throw new l({code:-32603,message:"Nothing ended request"})}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[o,i,s]=await p._runAllMiddleware(e,t,this._middleware);return i?(await p._runReturnHandlers(s),n(o)):r((async e=>{try{await p._runReturnHandlers(s)}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 e=new l({code:-32603,message:"request must be plain object"});return t(e,{id:void 0,jsonrpc:"2.0",error:e})}if("string"!=typeof e.method){const r=new l({code:-32603,message:"method must be string"});return t(r,{id:e.id,jsonrpc:"2.0",error:r})}const r=h({},e),n={id:r.id,jsonrpc:r.jsonrpc};let o=null;try{await this._processRequest(r,n)}catch(e){o=e}return o&&(delete n.result,n.error||(n.error=(0,a.Xy)(o))),t(o,n)}async _processRequest(e,t){const[r,n,o]=await p._runAllMiddleware(e,t,this._middleware);if(p._checkForCompletion(e,t,n),await p._runReturnHandlers(o),r)throw r}}function y(e){const t=new c;return t.sendAsync=async t=>{const r=await e.handle(t);if(r.error){var n,o;const e=(0,a.Xy)(r.error,{fallbackError:{message:(null===(n=r.error)||void 0===n?void 0:n.message)||r.error.toString(),code:(null===(o=r.error)||void 0===o?void 0:o.code)||-32603}});throw a.PY.internal(e)}return r.result},t.send=(t,r)=>{if("function"!=typeof r)throw new Error('Must provide callback to "send" method.');e.handle(t,r)},e.on&&e.on("notification",(e=>{t.emit("data",null,e)})),t.request=async e=>{const r=h(h({},e),{},{id:Math.random().toString(36).slice(2),jsonrpc:"2.0"});return await t.sendAsync(r)},t}function g(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const o="__storage_test__";return t.setItem(o,o),t.removeItem(o),!0}catch(e){return e&&(22===e.code||1014===e.code||"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&r&&0!==n}}Symbol("IGNORE_SUBSTREAM"),r(9487);class b{constructor(){t(this,"store",{})}getItem(e){return this.store[e]||null}setItem(e,t){this.store[e]=t}}t(class{constructor(e,r){t(this,"storage",void 0),t(this,"_storeKey",void 0),this.storage=r,this._storeKey=e;try{r.getItem(e)||this.resetStore()}catch(e){}}static getInstance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"local";if(!this.instance){let r;r="local"===t&&g("localStorage")?window.localStorage:"session"===t&&g("sessionStorage")?window.sessionStorage:new b,this.instance=new this(e,r)}return this.instance}toJSON(){return this.storage.getItem(this._storeKey)}resetStore(){const e=this.getStore();return this.storage.setItem(this._storeKey,JSON.stringify({})),e}getStore(){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")}get(e){return JSON.parse(this.storage.getItem(this._storeKey)||"{}")[e]}set(e,t){const r=JSON.parse(this.storage.getItem(this._storeKey)||"{}");r[e]=t,this.storage.setItem(this._storeKey,JSON.stringify(r))}},"instance",void 0);var m,v=(m=function(e,t){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},m(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),w=function(e){function t(t,r){var n,o,i,s=this.constructor,a=e.call(this,t,r)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),n=a,o=s.prototype,(i=Object.setPrototypeOf)?i(n,o):n.__proto__=o,function(e,t){void 0===t&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}(a),a}return v(t,e),t}(Error);r(1344);var E=r(9640),_=r.n(E);function S(e){this.message=e}function A(e){this.message=e}_().getLogger("http-helpers").setLevel(E.levels.INFO),S.prototype=new Error,S.prototype.name="InvalidCharacterError","undefined"!=typeof window&&window.atob&&window.atob.bind(window),A.prototype=new Error,A.prototype.name="InvalidTokenError";const O={EIP155:"eip155",SOLANA:"solana",OTHER:"other"},R="multichain",x=(e,t)=>{if(e===O.OTHER)return null;const r=t?"number"==typeof t?t:parseInt(t,16):(e=>{if(e===O.EIP155)return 1;if(e===O.SOLANA)return 1;throw new Error(`Chain namespace ${e} is not supported`)})(e);return e===O.EIP155?(e=>{const t=O.EIP155;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/eth",displayName:"Ethereum Mainnet",blockExplorer:"https://etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:5===e?{chainNamespace:t,chainId:"0x5",rpcTarget:"https://rpc.ankr.com/eth_goerli",displayName:"Goerli Testnet",blockExplorer:"https://goerli.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:11155111===e?{chainNamespace:t,chainId:"0xaa36a7",rpcTarget:"https://rpc.ankr.com/eth_sepolia",displayName:"Sepolia Testnet",blockExplorer:"https://sepolia.etherscan.io/",ticker:"ETH",tickerName:"Ethereum",decimals:18}:137===e?{chainNamespace:t,chainId:"0x89",rpcTarget:"https://rpc.ankr.com/polygon",displayName:"Polygon Mainnet",blockExplorer:"https://polygonscan.com",ticker:"MATIC",tickerName:"Polygon"}:80001===e?{chainNamespace:t,chainId:"0x13881",rpcTarget:"https://rpc.ankr.com/polygon_mumbai",displayName:"Polygon Mumbai Testnet",blockExplorer:"https://mumbai.polygonscan.com/",ticker:"MATIC",tickerName:"Polygon",decimals:18}:56===e?{chainNamespace:t,chainId:"0x38",rpcTarget:"https://rpc.ankr.com/bsc",displayName:"Binance SmartChain Mainnet",blockExplorer:"https://bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:97===e?{chainNamespace:t,chainId:"0x61",rpcTarget:"https://rpc.ankr.com/bsc_testnet_chapel",displayName:"Binance SmartChain Testnet",blockExplorer:"https://testnet.bscscan.com",ticker:"BNB",tickerName:"Binance SmartChain",decimals:18}:25===e?{chainNamespace:t,chainId:"0x19",rpcTarget:"https://rpc.cronos.org",displayName:"Cronos Mainnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos"}:338===e?{chainNamespace:t,chainId:"0x152",rpcTarget:"https://rpc-t3.cronos.org/",displayName:"Cronos Testnet",blockExplorer:"https://cronoscan.com/",ticker:"CRO",tickerName:"Cronos",decimals:18}:8217===e?{chainNamespace:t,chainId:"0x2019",rpcTarget:"https://public-node-api.klaytnapi.com/v1/cypress",displayName:"Klaytn Mainnet",blockExplorer:"https://scope.klaytn.com",ticker:"KLAY",tickerName:"Klaytn",decimals:18}:null})(r):e===O.SOLANA?(e=>{const t=O.SOLANA;return 1===e?{chainNamespace:t,chainId:"0x1",rpcTarget:"https://rpc.ankr.com/solana",displayName:"Solana Mainnet",blockExplorer:"https://explorer.solana.com",ticker:"SOL",tickerName:"Solana",decimals:9}:2===e?{chainNamespace:t,chainId:"0x2",rpcTarget:"https://api.testnet.solana.com",displayName:"Solana Testnet",blockExplorer:"https://explorer.solana.com?cluster=testnet",ticker:"SOL",tickerName:"Solana",decimals:9}:3===e?{chainNamespace:t,chainId:"0x3",rpcTarget:"https://api.devnet.solana.com",displayName:"Solana Devnet",blockExplorer:"https://explorer.solana.com?cluster=devnet",ticker:"SOL",tickerName:"Solana",decimals:9}:null})(r):null};class I extends w{constructor(e,r){super(r),t(this,"code",void 0),t(this,"message",void 0),this.code=e,this.message=r||"",Object.defineProperty(this,"name",{value:"Web3AuthError"})}toJSON(){return{name:this.name,code:this.code,message:this.message}}toString(){return JSON.stringify(this.toJSON())}}class P extends I{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletInitializationError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new P(e,`${P.messages[e]}, ${t}`)}static notFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5001,e)}static notInstalled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5002,e)}static notReady(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5003,e)}static windowBlocked(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5004,e)}static windowClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5005,e)}static incompatibleChainNameSpace(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5006,e)}static duplicateAdapterError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5007,e)}static invalidProviderConfigError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5008,e)}static providerNotReadyError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5009,e)}static rpcConnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5010,e)}static invalidParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5011,e)}static invalidNetwork(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return P.fromCode(5013,e)}}t(P,"messages",{5e3:"Custom",5001:"Wallet is not found",5002:"Wallet is not installed",5003:"Wallet is not ready yet",5004:"Wallet window is blocked",5005:"Wallet window has been closed by the user",5006:"Incompatible chain namespace provided",5007:"Adapter has already been included",5008:"Invalid provider Config",5009:"Provider is not ready yet",5010:"Failed to connect with rpc url",5011:"Invalid params passed in",5013:"Invalid network provided"});class T extends I{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletLoginError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new T(e,`${T.messages[e]}. ${t}`)}static connectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5111,e)}static disconnectionError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5112,e)}static notConnectedError(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5113,e)}static popupClosed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5114,e)}static mfaEnabled(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5115,e)}static chainConfigNotAdded(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5116,e)}static unsupportedOperation(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5117,e)}static coreKitKeyNotFound(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5118,e)}static userNotLoggedIn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return T.fromCode(5119,e)}}t(T,"messages",{5e3:"Custom",5111:"Failed to connect with wallet",5112:"Failed to disconnect from wallet",5113:"Wallet is not connected",5114:"Wallet popup has been closed by the user",5115:"User has already enabled mfa, please use the @web3auth/web3auth-web sdk for login with mfa",5116:"Chain config has not been added. Please add the chain config before calling switchChain",5117:"Unsupported operation",5118:"useCoreKitKey flag is enabled but coreKitKey is not available",5119:"User not logged in."});class N extends I{constructor(e,t){super(e,t),Object.defineProperty(this,"name",{value:"WalletOperationsError"})}static fromCode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new N(e,`${N.messages[e]}, ${t}`)}static chainIDNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5201,e)}static operationNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5202,e)}static chainNamespaceNotAllowed(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return N.fromCode(5203,e)}}function j(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 C(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?j(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(N,"messages",{5e3:"Custom",5201:"Provided chainId is not allowed",5202:"This operation is not allowed"});const B={OPENLOGIN:"openlogin",WALLET_CONNECT_V1:"wallet-connect-v1",WALLET_CONNECT_V2:"wallet-connect-v2"},L=C({TORUS_SOLANA:"torus-solana",PHANTOM:"phantom",SOLFLARE:"solflare",SLOPE:"slope"},B),M=C({TORUS_EVM:"torus-evm",METAMASK:"metamask",COINBASE:"coinbase"},B),k=C(C({},M),L);function F(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 $(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?F(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}L.TORUS_SOLANA,L.PHANTOM,L.SOLFLARE,L.SLOPE,M.TORUS_EVM,M.METAMASK,M.COINBASE;const U={NOT_READY:"not_ready",READY:"ready",CONNECTING:"connecting",CONNECTED:"connected",DISCONNECTED:"disconnected",ERRORED:"errored"},D=$($({},U),{},{ADAPTER_DATA_UPDATED:"adapter_data_updated",CACHE_CLEAR:"cache_clear"});var H=_().getLogger("web3auth-logger");function W(e){let t,r=!1,n=0;try{t=window[e],r=!0,n=t.length;const o="__storage_test__";return t.setItem(o,o),t.removeItem(o),!0}catch(e){const t=e;return!(!t||22!==t.code&&1014!==t.code&&"QuotaExceededError"!==t.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==t.name||!r||0===n)}}function z(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 V(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?z(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const q=V(V({},O),{},{MULTICHAIN:"multichain"});r(5372);var G=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,J=Math.ceil,K=Math.floor,Y="[BigNumber Error] ",X=Y+"Number primitive has more than 15 significant digits: ",Z=1e14,Q=14,ee=9007199254740991,te=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],re=1e7,ne=1e9;function oe(e){var t=0|e;return e>0||e===t?t:t-1}function ie(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=Q-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function se(e,t){var r,n,o=e.c,i=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=o.length)<(c=i.length)?u:c,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function ae(e,t,r,n){if(e<t||e>r||e!==K(e))throw Error(Y+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ue(e){var t=e.c.length-1;return oe(e.e/Q)==t&&e.c[t]%2!=0}function ce(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function le(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function fe(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 de(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?fe(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function e(t){var r,n,o,i,s,a,u,c,l,f,d=R.prototype={constructor:R,toString:null,valueOf:null},h=new R(1),p=20,y=4,g=-7,b=21,m=-1e7,v=1e7,w=!1,E=1,_=0,S={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",O=!0;function R(e,t){var r,i,s,a,u,c,l,f,d=this;if(!(d instanceof R))return new R(e,t);if(null==t){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>v?d.c=d.e=null:e.e<m?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,u=e;u>=10;u/=10,a++);return void(a>v?d.c=d.e=null:(d.e=a,d.c=[e]))}f=String(e)}else{if(!G.test(f=String(e)))return o(d,f,c);d.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(a=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(a<0&&(a=u),a+=+f.slice(u+1),f=f.substring(0,u)):a<0&&(a=f.length)}else{if(ae(t,2,A.length,"Base"),10==t&&O)return T(d=new R(e),p+d.e+1,y);if(f=String(e),c="number"==typeof e){if(0*e!=0)return o(d,f,c,t);if(d.s=1/e<0?(f=f.slice(1),-1):1,R.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(X+e)}else d.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=A.slice(0,t),a=u=0,l=f.length;u<l;u++)if(r.indexOf(i=f.charAt(u))<0){if("."==i){if(u>a){a=l;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,u=-1,a=0;continue}return o(d,String(e),c,t)}c=!1,(a=(f=n(f,t,10,d.s)).indexOf("."))>-1?f=f.replace(".",""):a=f.length}for(u=0;48===f.charCodeAt(u);u++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(u,++l)){if(l-=u,c&&R.DEBUG&&l>15&&(e>ee||e!==K(e)))throw Error(X+d.s*e);if((a=a-u-1)>v)d.c=d.e=null;else if(a<m)d.c=[d.e=0];else{if(d.e=a,d.c=[],u=(a+1)%Q,a<0&&(u+=Q),u<l){for(u&&d.c.push(+f.slice(0,u)),l-=Q;u<l;)d.c.push(+f.slice(u,u+=Q));u=Q-(f=f.slice(u)).length}else u-=l;for(;u--;f+="0");d.c.push(+f)}}else d.c=[d.e=0]}function x(e,t,r,n){var o,i,s,a,u;if(null==r?r=y:ae(r,0,8),!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)u=ie(e.c),u=1==n||2==n&&(s<=g||s>=b)?ce(u,s):le(u,s,"0");else if(i=(e=T(new R(e),t,r)).e,a=(u=ie(e.c)).length,1==n||2==n&&(t<=i||i<=g)){for(;a<t;u+="0",a++);u=ce(u,i)}else if(t-=s,u=le(u,i,"0"),i+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-a)>0)for(i+1==a&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function I(e,t){for(var r,n=1,o=new R(e[0]);n<e.length;n++){if(!(r=new R(e[n])).s){o=r;break}t.call(o,r)&&(o=r)}return o}function P(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*Q-1)>v?e.c=e.e=null:r<m?e.c=[e.e=0]:(e.e=r,e.c=t),e}function T(e,t,r,n){var o,i,s,a,u,c,l,f=e.c,d=te;if(f){e:{for(o=1,a=f[0];a>=10;a/=10,o++);if((i=t-o)<0)i+=Q,s=t,l=(u=f[c=0])/d[o-s-1]%10|0;else if((c=J((i+1)/Q))>=f.length){if(!n)break e;for(;f.length<=c;f.push(0));u=l=0,o=1,s=(i%=Q)-Q+1}else{for(u=a=f[c],o=1;a>=10;a/=10,o++);l=(s=(i%=Q)-Q+o)<0?0:u/d[o-s-1]%10|0}if(n=n||t<0||null!=f[c+1]||(s<0?u:u%d[o-s-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(i>0?s>0?u/d[o-s]:0:f[c-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=d[(Q-t%Q)%Q],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=c,a=1,c--):(f.length=c+1,a=d[Q-i],f[c]=s>0?K(u/d[o-s]%d[s])*a:0),n)for(;;){if(0==c){for(i=1,s=f[0];s>=10;s/=10,i++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);i!=a&&(e.e++,f[0]==Z&&(f[0]=1));break}if(f[c]+=a,f[c]!=Z)break;f[c--]=0,a=1}for(i=f.length;0===f[--i];f.pop());}e.e>v?e.c=e.e=null:e.e<m&&(e.c=[e.e=0])}return e}function N(e){var t,r=e.e;return null===r?e.toString():(t=ie(e.c),t=r<=g||r>=b?ce(t,r):le(t,r,"0"),e.s<0?"-"+t:t)}return R.clone=e,R.ROUND_UP=0,R.ROUND_DOWN=1,R.ROUND_CEIL=2,R.ROUND_FLOOR=3,R.ROUND_HALF_UP=4,R.ROUND_HALF_DOWN=5,R.ROUND_HALF_EVEN=6,R.ROUND_HALF_CEIL=7,R.ROUND_HALF_FLOOR=8,R.EUCLID=9,R.config=R.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Y+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ae(r=e[t],0,ne,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ae(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ae(r[0],-ne,0,t),ae(r[1],0,ne,t),g=r[0],b=r[1]):(ae(r,-ne,ne,t),g=-(b=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ae(r[0],-ne,-1,t),ae(r[1],1,ne,t),m=r[0],v=r[1];else{if(ae(r,-ne,ne,t),!r)throw Error(Y+t+" cannot be zero: "+r);m=-(v=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Y+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(Y+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ae(r=e[t],0,9,t),E=r),e.hasOwnProperty(t="POW_PRECISION")&&(ae(r=e[t],0,ne,t),_=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Y+t+" not an object: "+r);S=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Y+t+" invalid: "+r);O="0123456789"==r.slice(0,10),A=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:y,EXPONENTIAL_AT:[g,b],RANGE:[m,v],CRYPTO:w,MODULO_MODE:E,POW_PRECISION:_,FORMAT:S,ALPHABET:A}},R.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!R.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-ne&&o<=ne&&o===K(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%Q)<1&&(t+=Q),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Z||r!==K(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(Y+"Invalid BigNumber: "+e)},R.maximum=R.max=function(){return I(arguments,d.lt)},R.minimum=R.min=function(){return I(arguments,d.gt)},R.random=(i=9007199254740992,s=Math.random()*i&2097151?function(){return K(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,a=0,u=[],c=new R(h);if(null==e?e=p:ae(e,0,ne),o=J(e/Q),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)(i=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(u.push(i%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw w=!1,Error(Y+"crypto unavailable");for(t=crypto.randomBytes(o*=7);a<o;)(i=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(u.push(i%1e14),a+=7);a=o/7}if(!w)for(;a<o;)(i=s())<9e15&&(u[a++]=i%1e14);for(o=u[--a],e%=Q,o&&e&&(i=te[Q-e],u[a]=K(o/i)*i);0===u[a];u.pop(),a--);if(a<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=Q);for(a=1,i=u[0];i>=10;i/=10,a++);a<Q&&(n-=Q-a)}return c.e=n,c.c=u,c}),R.sum=function(){for(var e=1,t=arguments,r=new R(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var o,i,s=[0],a=0,u=e.length;a<u;){for(i=s.length;i--;s[i]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),o=0;o<s.length;o++)s[o]>r-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(n,o,i,s,a){var u,c,l,f,d,h,g,b,m=n.indexOf("."),v=p,w=y;for(m>=0&&(f=_,_=0,n=n.replace(".",""),h=(b=new R(o)).pow(n.length-m),_=f,b.c=t(le(ie(h.c),h.e,"0"),10,i,e),b.e=b.c.length),l=f=(g=t(n,o,i,a?(u=A,e):(u=e,A))).length;0==g[--f];g.pop());if(!g[0])return u.charAt(0);if(m<0?--l:(h.c=g,h.e=l,h.s=s,g=(h=r(h,b,v,w,i)).c,d=h.r,l=h.e),m=g[c=l+v+1],f=i/2,d=d||c<0||null!=g[c+1],d=w<4?(null!=m||d)&&(0==w||w==(h.s<0?3:2)):m>f||m==f&&(4==w||d||6==w&&1&g[c-1]||w==(h.s<0?8:7)),c<1||!g[0])n=d?le(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(g.length=c,d)for(--i;++g[--c]>i;)g[c]=0,c||(++l,g=[1].concat(g));for(f=g.length;!g[--f];);for(m=0,n="";m<=f;n+=u.charAt(g[m++]));n=le(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,u=e.length,c=t%re,l=t/re|0;for(e=e.slice();u--;)a=((o=c*(i=e[u]%re)+(n=l*i+(s=e[u]/re|0)*c)%re*re+a)/r|0)+(n/re|0)+l*s,e[u]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,s,a){var u,c,l,f,d,h,p,y,g,b,m,v,w,E,_,S,A,O=n.s==o.s?1:-1,x=n.c,I=o.c;if(!(x&&x[0]&&I&&I[0]))return new R(n.s&&o.s&&(x?!I||x[0]!=I[0]:I)?x&&0==x[0]||!I?0*O:O/0:NaN);for(g=(y=new R(O)).c=[],O=i+(c=n.e-o.e)+1,a||(a=Z,c=oe(n.e/Q)-oe(o.e/Q),O=O/Q|0),l=0;I[l]==(x[l]||0);l++);if(I[l]>(x[l]||0)&&c--,O<0)g.push(1),f=!0;else{for(E=x.length,S=I.length,l=0,O+=2,(d=K(a/(I[0]+1)))>1&&(I=e(I,d,a),x=e(x,d,a),S=I.length,E=x.length),w=S,m=(b=x.slice(0,S)).length;m<S;b[m++]=0);A=I.slice(),A=[0].concat(A),_=I[0],I[1]>=a/2&&_++;do{if(d=0,(u=t(I,b,S,m))<0){if(v=b[0],S!=m&&(v=v*a+(b[1]||0)),(d=K(v/_))>1)for(d>=a&&(d=a-1),p=(h=e(I,d,a)).length,m=b.length;1==t(h,b,p,m);)d--,r(h,S<p?A:I,p,a),p=h.length,u=1;else 0==d&&(u=d=1),p=(h=I.slice()).length;if(p<m&&(h=[0].concat(h)),r(b,h,m,a),m=b.length,-1==u)for(;t(I,b,S,m)<1;)d++,r(b,S<m?A:I,m,a),m=b.length}else 0===u&&(d++,b=[0]);g[l++]=d,b[0]?b[m++]=x[w]||0:(b=[x[w]],m=1)}while((w++<E||null!=b[0])&&O--);f=null!=b[0],g[0]||g.splice(0,1)}if(a==Z){for(l=1,O=g[0];O>=10;O/=10,l++);T(y,i+(y.e=l+c*Q-1)+1,s,f)}else y.e=c,y.r=+f;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(f,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(u,"$1").replace(c,"0.$1")),t!=i))return new R(i,o);if(R.DEBUG)throw Error(Y+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},d.absoluteValue=d.abs=function(){var e=new R(this);return e.s<0&&(e.s=1),e},d.comparedTo=function(e,t){return se(this,new R(e,t))},d.decimalPlaces=d.dp=function(e,t){var r,n,o,i=this;if(null!=e)return ae(e,0,ne),null==t?t=y:ae(t,0,8),T(new R(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-oe(this.e/Q))*Q,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},d.dividedBy=d.div=function(e,t){return r(this,new R(e,t),p,y)},d.dividedToIntegerBy=d.idiv=function(e,t){return r(this,new R(e,t),0,1)},d.exponentiatedBy=d.pow=function(e,t){var r,n,o,i,s,a,u,c,l=this;if((e=new R(e)).c&&!e.isInteger())throw Error(Y+"Exponent not an integer: "+N(e));if(null!=t&&(t=new R(t)),s=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new R(Math.pow(+N(l),s?e.s*(2-ue(e)):+N(e))),t?c.mod(t):c;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new R(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return i=l.s<0&&ue(e)?-0:0,l.e>-1&&(i=1/i),new R(a?1/i:i);_&&(i=J(_/Q+2))}for(s?(r=new R(.5),a&&(e.s=1),u=ue(e)):u=(o=Math.abs(+N(e)))%2,c=new R(h);;){if(u){if(!(c=c.times(l)).c)break;i?c.c.length>i&&(c.c.length=i):n&&(c=c.mod(t))}if(o){if(0===(o=K(o/2)))break;u=o%2}else if(T(e=e.times(r),e.e+1,1),e.e>14)u=ue(e);else{if(0==(o=+N(e)))break;u=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}return n?c:(a&&(c=h.div(c)),t?c.mod(t):i?T(c,_,y,void 0):c)},d.integerValue=function(e){var t=new R(this);return null==e?e=y:ae(e,0,8),T(t,t.e+1,e)},d.isEqualTo=d.eq=function(e,t){return 0===se(this,new R(e,t))},d.isFinite=function(){return!!this.c},d.isGreaterThan=d.gt=function(e,t){return se(this,new R(e,t))>0},d.isGreaterThanOrEqualTo=d.gte=function(e,t){return 1===(t=se(this,new R(e,t)))||0===t},d.isInteger=function(){return!!this.c&&oe(this.e/Q)>this.c.length-2},d.isLessThan=d.lt=function(e,t){return se(this,new R(e,t))<0},d.isLessThanOrEqualTo=d.lte=function(e,t){return-1===(t=se(this,new R(e,t)))||0===t},d.isNaN=function(){return!this.s},d.isNegative=function(){return this.s<0},d.isPositive=function(){return this.s>0},d.isZero=function(){return!!this.c&&0==this.c[0]},d.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new R(e,t)).s,!a||!t)return new R(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/Q,c=e.e/Q,l=s.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new R(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new R(l[0]?s:3==y?-0:0)}if(u=oe(u),c=oe(c),l=l.slice(),a=u-c){for((i=a<0)?(a=-a,o=l):(c=u,o=f),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=f.length))?a:t,a=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=Z-1;n>a;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Z}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?P(e,l,c):(e.s=3==y?-1:1,e.c=[e.e=0],e)},d.modulo=d.mod=function(e,t){var n,o,i=this;return e=new R(e,t),!i.c||!e.s||e.c&&!e.c[0]?new R(NaN):!e.c||i.c&&!i.c[0]?new R(i):(9==E?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,E),(e=i.minus(n.times(e))).c[0]||1!=E||(e.s=i.s),e)},d.multipliedBy=d.times=function(e,t){var r,n,o,i,s,a,u,c,l,f,d,h,p,y,g,b=this,m=b.c,v=(e=new R(e,t)).c;if(!(m&&v&&m[0]&&v[0]))return!b.s||!e.s||m&&!m[0]&&!v||v&&!v[0]&&!m?e.c=e.e=e.s=null:(e.s*=b.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=oe(b.e/Q)+oe(e.e/Q),e.s*=b.s,(u=m.length)<(f=v.length)&&(p=m,m=v,v=p,o=u,u=f,f=o),o=u+f,p=[];o--;p.push(0));for(y=Z,g=re,o=f;--o>=0;){for(r=0,d=v[o]%g,h=v[o]/g|0,i=o+(s=u);i>o;)r=((c=d*(c=m[--s]%g)+(a=h*c+(l=m[s]/g|0)*d)%g*g+p[i]+r)/y|0)+(a/g|0)+h*l,p[i--]=c%y;p[i]=r}return r?++n:p.splice(0,1),P(e,p,n)},d.negated=function(){var e=new R(this);return e.s=-e.s||null,e},d.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new R(e,t)).s,!o||!t)return new R(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/Q,s=e.e/Q,a=n.c,u=e.c;if(!i||!s){if(!a||!u)return new R(o/0);if(!a[0]||!u[0])return u[0]?e:new R(a[0]?n:0*o)}if(i=oe(i),s=oe(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/Z|0,a[t]=Z===a[t]?0:a[t]%Z;return o&&(a=[o].concat(a),++s),P(e,a,s)},d.precision=d.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return ae(e,1,ne),null==t?t=y:ae(t,0,8),T(new R(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*Q+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},d.shiftedBy=function(e){return ae(e,-9007199254740991,ee),this.times("1e"+e)},d.squareRoot=d.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,u=s.s,c=s.e,l=p+4,f=new R("0.5");if(1!==u||!a||!a[0])return new R(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+N(s)))||u==1/0?(((t=ie(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=oe((c+1)/2)-(c<0||c%2),n=new R(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new R(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(s,i,l,1))),ie(i.c).slice(0,u)===(t=ie(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(T(n,n.e+p+2,1),e=!n.times(n).eq(s));break}if(!o&&(T(i,i.e+p+2,0),i.times(i).eq(s))){n=i;break}l+=4,u+=4,o=1}return T(n,n.e+p+1,y,e)},d.toExponential=function(e,t){return null!=e&&(ae(e,0,ne),e++),x(this,e,t,1)},d.toFixed=function(e,t){return null!=e&&(ae(e,0,ne),e=e+this.e+1),x(this,e,t)},d.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=S;else if("object"!=typeof r)throw Error(Y+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",l=s[0],f=s[1],d=o.s<0,h=d?l.slice(1):l,p=h.length;if(u&&(i=a,a=u,u=i,p-=i),a>0&&p>0){for(i=p%a||a,l=h.substr(0,i);i<p;i+=a)l+=c+h.substr(i,a);u>0&&(l+=c+h.slice(i)),d&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},d.toFraction=function(e){var t,n,o,i,s,a,u,c,l,f,d,p,g=this,b=g.c;if(null!=e&&(!(u=new R(e)).isInteger()&&(u.c||1!==u.s)||u.lt(h)))throw Error(Y+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+N(u));if(!b)return new R(g);for(t=new R(h),l=n=new R(h),o=c=new R(h),p=ie(b),s=t.e=p.length-g.e-1,t.c[0]=te[(a=s%Q)<0?Q+a:a],e=!e||u.comparedTo(t)>0?s>0?t:l:u,a=v,v=1/0,u=new R(p),c.c[0]=0;f=r(u,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,l=c.plus(f.times(i=l)),c=i,t=u.minus(f.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),c=c.plus(i.times(l)),n=n.plus(i.times(o)),c.s=l.s=g.s,d=r(l,o,s*=2,y).minus(g).abs().comparedTo(r(c,n,s,y).minus(g).abs())<1?[l,o]:[c,n],v=a,d},d.toNumber=function(){return+N(this)},d.toPrecision=function(e,t){return null!=e&&ae(e,1,ne),x(this,e,t,2)},d.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=g||i>=b?ce(ie(r.c),i):le(ie(r.c),i,"0"):10===e&&O?t=le(ie((r=T(new R(r),p+i+1,y)).c),r.e,"0"):(ae(e,2,A.length,"Base"),t=n(le(ie(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},d.valueOf=d.toJSON=function(){return N(this)},d._isBigNumber=!0,d[Symbol.toStringTag]="BigNumber",d[Symbol.for("nodejs.util.inspect.custom")]=d.valueOf,null!=t&&R.set(t),R}(),r(7160),r(6635),r(8834).Buffer;class he extends c{constructor(e){let{config:r={},state:n={}}=e;super(),t(this,"defaultConfig",{}),t(this,"defaultState",{}),t(this,"disabled",!1),t(this,"name","BaseController"),t(this,"initialConfig",void 0),t(this,"initialState",void 0),t(this,"internalConfig",this.defaultConfig),t(this,"internalState",this.defaultState),this.initialState=n,this.initialConfig=r}get config(){return this.internalConfig}get state(){return this.internalState}configure(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2&&void 0!==arguments[2]&&!arguments[2])for(const t in e)void 0!==this.internalConfig[t]&&(this.internalConfig[t]=e[t],this[t]=e[t]);else{this.internalConfig=t?e:Object.assign(this.internalConfig,e);for(const e in this.internalConfig)void 0!==this.internalConfig[e]&&(this[e]=this.internalConfig[e])}}update(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.internalState=de(t?{}:de({},this.internalState),e),this.emit("store",this.internalState)}initialize(){return this.internalState=this.defaultState,this.internalConfig=this.defaultConfig,this.configure(this.initialConfig),this.update(this.initialState),this}}const pe=()=>!0,ye=["newListener","removeListener"],ge=e=>!ye.includes(e);function be(e,t){let r=(t||{}).eventFilter||pe;if("string"==typeof r&&"skipInternal"===r&&(r=ge),"function"!=typeof r)throw new Error("createEventEmitterProxy - Invalid eventFilter");let n=e,o=e=>{const t=n;n=e,t.eventNames().filter(r).forEach((r=>{(function(e,t){return void 0!==e.rawListeners?e.rawListeners(t):e.listeners(t)})(t,r).forEach((t=>e.on(r,t)))})),t.removeAllListeners()};return new Proxy({},{get:(e,t)=>"setTarget"===t?o:n[t],set:(e,t,r)=>"setTarget"===t?(o=r,!0):(n[t]=r,!0)})}const me=["Gateway timeout","ETIMEDOUT","failed to parse response body","Failed to fetch"];function ve(e){switch(e.status){case 405:throw a.PY.methodNotFound();case 418:throw a.PY.internal({message:"Request is being rate limited."});case 503:case 504:throw a.PY.internal({message:"Gateway timeout. The request took too long to process.This can happen when querying over too wide a block range."})}}function we(e){return new Promise((t=>{setTimeout(t,e)}))}function Ee(e,t){if(200!==e.status)throw a.PY.internal({message:`Non-200 status code: '${e.status}'`,data:t});if(t.error)throw a.PY.internal({data:t.error});return t.result}var _e;!function(e){e.approved="approved",e.cancelled="cancelled",e.confirmed="confirmed",e.failed="failed",e.finalized="finalized",e.processed="processed",e.rejected="rejected",e.signed="signed",e.submitted="submitted",e.unapproved="unapproved",e.dropped="dropped",e.expired="expired"}(_e||(_e={}));var Se=r(8094),Ae=r(3349),Oe=r.n(Ae);function Re(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 xe(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Re(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class Ie extends he{constructor(e){let{config:r,state:n}=e;if(super({config:r,state:n}),t(this,"_providerEngineProxy",null),!r.chainConfig)throw P.invalidProviderConfigError("Please provide chainConfig");if(!r.chainConfig.chainId)throw P.invalidProviderConfigError("Please provide chainId inside chainConfig");if(!r.chainConfig.rpcTarget)throw P.invalidProviderConfigError("Please provide rpcTarget inside chainConfig");this.defaultState={chainId:"loading"},this.defaultConfig={chainConfig:r.chainConfig,networks:{[r.chainConfig.chainId]:r.chainConfig}},super.initialize()}get currentChainConfig(){return this.config.chainConfig}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){if(!e.chainId)throw Se.Sy.rpc.invalidParams("chainId is required");if(!e.rpcTarget)throw Se.Sy.rpc.invalidParams("chainId is required");this.configure({networks:xe(xe({},this.config.networks),{},{[e.chainId]:e})})}getChainConfig(e){var t;const r=null===(t=this.config.networks)||void 0===t?void 0:t[e];if(!r)throw Se.Sy.rpc.invalidRequest(`Chain ${e} is not supported, please add chainConfig for it`);return r}getProviderEngineProxy(){return this._providerEngineProxy}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=be(e)}}function Pe(e){return(t,r,n,o)=>"chainId"===t.method?(r.result=e,o()):n()}function Te(e){return(t,r,n,o)=>"provider_config"===t.method?(r.result=e,o()):n()}function Ne(e){const{chainId:t,rpcTarget:r}=e,n=function(e){let{rpcTarget:t,originHttpHeaderKey:r}=e;return f((async(e,n,o)=>{const{fetchUrl:i,fetchParams:s}=function(e){let{req:t,rpcTarget:r,originHttpHeaderKey:n}=e;const o=new URL(r),i={id:t.id,jsonrpc:t.jsonrpc,method:t.method,params:t.params},s=t.origin,a={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)};return n&&s&&(a.headers[n]=s),{fetchUrl:o.href,fetchParams:a}}({req:e,rpcTarget:t,originHttpHeaderKey:r});for(let e=0;e<5;e++){try{const e=await fetch(i,s);ve(e);const t=await e.json(),r=Ee(e,t);return void(n.result=r)}catch(e){const t=e.toString();if(!me.some((e=>t.includes(e))))throw e}await we(1e3)}}))}({rpcTarget:r});return{networkMiddleware:function(e){const t=new p;return e.forEach((e=>t.push(e))),t.asMiddleware()}([Pe(t),Te(e),n]),fetchMiddleware:n}}class je extends Ie{constructor(e){let{config:t,state:r}=e;super({config:t,state:r})}async setupProvider(){const{networkMiddleware:e}=Ne(this.config.chainConfig),t=new p;t.push(e);const r=y(t);this.updateProviderEngineProxy(r)}async switchChain(e){if(!this._providerEngineProxy)throw Se.Sy.provider.custom({message:"Provider is not initialized",code:4902});const t=this.getChainConfig(e.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:t}),await this.setupProvider()}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=be(e)}getProviderEngineProxy(){return this._providerEngineProxy}lookupNetwork(){throw new Error("Method not implemented.")}}function Ce(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 Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ce(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(je,"getProviderInstance",(async e=>{const t=new je({config:{chainConfig:e.chainConfig}});return await t.setupProvider(),t}));class Le extends Ie{constructor(e){let{config:r,state:n}=e;super({config:{chainConfig:Be(Be({},r.chainConfig),{},{chainNamespace:O.OTHER})},state:n}),t(this,"_providerEngineProxy",null)}get provider(){return this._providerEngineProxy}set provider(e){throw new Error("Method not implemented.")}addChain(e){throw new Error("Method not implemented.")}async setupProvider(e){const t=this.getPrivKeyMiddleware(e),r=new p;r.push(t);const n=y(r);this.updateProviderEngineProxy(n)}async switchChain(e){return Promise.resolve()}getProviderEngineProxy(){return this._providerEngineProxy}async lookupNetwork(){return Promise.resolve("")}updateProviderEngineProxy(e){this._providerEngineProxy?this._providerEngineProxy.setTarget(e):this._providerEngineProxy=be(e)}getPrivKeyMiddleware(e){const t={getPrivatekey:async()=>e};return this.createPrivKeyMiddleware(t)}createPrivKeyMiddleware(e){let{getPrivatekey:t}=e;return r={private_key:f((async function(e,r){r.result=await t()}))},(e,t,n,o)=>{const i=r[e.method];return void 0===i?n():"function"==typeof i?i(e,t,n,o):(t.result=i,o())};var r}}function Me(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 ke(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Me(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t(Le,"getProviderInstance",(async e=>{const t=new Le({config:{chainConfig:e.chainConfig}});return await t.setupProvider(e.privKey),t})),Oe()();const Fe="Web3Auth-cachedAdapter";class $e extends c{constructor(e){var r,n,o,i;if(super(),t(this,"coreOptions",void 0),t(this,"connectedAdapterName",null),t(this,"status",U.NOT_READY),t(this,"cachedAdapter",null),t(this,"walletAdapters",{}),t(this,"commonJRPCProvider",null),t(this,"plugins",{}),t(this,"storage","localStorage"),!e.clientId)throw P.invalidParams("Please provide a valid clientId in constructor");if(e.enableLogging?H.enableAll():H.setLevel("error"),null===(r=e.chainConfig)||void 0===r||!r.chainNamespace||!Object.values(O).includes(null===(n=e.chainConfig)||void 0===n?void 0:n.chainNamespace))throw P.invalidParams("Please provide a valid chainNamespace in chainConfig");"session"===e.storageKey&&(this.storage="sessionStorage"),this.cachedAdapter=W(this.storage)?window[this.storage].getItem(Fe):null,this.coreOptions=ke(ke({},e),{},{chainConfig:ke(ke({},x(null===(o=e.chainConfig)||void 0===o?void 0:o.chainNamespace,null===(i=e.chainConfig)||void 0===i?void 0:i.chainId)||{}),e.chainConfig)}),this.subscribeToAdapterEvents=this.subscribeToAdapterEvents.bind(this)}get connected(){return Boolean(this.connectedAdapterName)}get provider(){return this.status!==U.NOT_READY&&this.commonJRPCProvider?this.commonJRPCProvider.provider:null}set provider(e){throw new Error("Not implemented")}async init(){this.commonJRPCProvider=await je.getProviderInstance({chainConfig:this.coreOptions.chainConfig});const e=Object.keys(this.walletAdapters).map((e=>{if(this.subscribeToAdapterEvents(this.walletAdapters[e]),this.walletAdapters[e].chainConfigProxy)this.walletAdapters[e].setAdapterSettings({sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey});else{const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw P.invalidParams("Please provide chainNamespace in chainConfig");this.walletAdapters[e].setAdapterSettings({chainConfig:t,sessionTime:this.coreOptions.sessionTime,clientId:this.coreOptions.clientId,web3AuthNetwork:this.coreOptions.web3AuthNetwork,useCoreKitKey:this.coreOptions.useCoreKitKey})}return this.walletAdapters[e].init({autoConnect:this.cachedAdapter===e}).catch((e=>H.error(e)))}));this.status=U.READY,await Promise.all(e)}configureAdapter(e){this.checkInitRequirements();const t=this.coreOptions.chainConfig;if(!t.chainNamespace)throw P.invalidParams("Please provide chainNamespace in chainConfig");if(this.walletAdapters[e.name])throw P.duplicateAdapterError(`Wallet adapter for ${e.name} already exists`);if(e.adapterNamespace!==R&&e.adapterNamespace!==t.chainNamespace)throw P.incompatibleChainNameSpace(`This wallet adapter belongs to ${e.adapterNamespace} which is incompatible with currently used namespace: ${t.chainNamespace}`);if(e.name===k.WALLET_CONNECT_V2&&this.walletAdapters[k.WALLET_CONNECT_V1])throw P.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v1 is already added to adapter lists.");if(e.name===k.WALLET_CONNECT_V1&&this.walletAdapters[k.WALLET_CONNECT_V2])throw P.invalidParams("Either one of wallet connect v2 or wallet connect v1 can be used, wallet connect v2 is already added to adapter lists.");return e.adapterNamespace===R&&e.currentChainNamespace&&t.chainNamespace!==e.currentChainNamespace&&e.setAdapterSettings({chainConfig:t}),this.walletAdapters[e.name]=e,this}clearCache(){W(this.storage)&&(window[this.storage].removeItem(Fe),this.cachedAdapter=null)}async addChain(e){if(this.status===U.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].addChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.addChain(e);throw P.notReady("No wallet is ready")}async switchChain(e){if(this.status===U.CONNECTED&&this.connectedAdapterName)return this.walletAdapters[this.connectedAdapterName].switchChain(e);if(this.commonJRPCProvider)return this.commonJRPCProvider.switchChain(e);throw P.notReady("No wallet is ready")}async connectTo(e,t){if(!this.walletAdapters[e]||!this.commonJRPCProvider)throw P.notFound(`Please add wallet adapter for ${e} wallet, before connecting`);const r=await this.walletAdapters[e].connect(t);return this.commonJRPCProvider.updateProviderEngineProxy(r),this.provider}async logout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cleanup:!1};if(this.status!==U.CONNECTED||!this.connectedAdapterName)throw T.notConnectedError("No wallet is connected");await this.walletAdapters[this.connectedAdapterName].disconnect(e)}async getUserInfo(){if(H.debug("Getting user info",this.status,this.connectedAdapterName),this.status!==U.CONNECTED||!this.connectedAdapterName)throw T.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].getUserInfo()}async authenticateUser(){if(this.status!==U.CONNECTED||!this.connectedAdapterName)throw T.notConnectedError("No wallet is connected");return this.walletAdapters[this.connectedAdapterName].authenticateUser()}async addPlugin(e){if(this.plugins[e.name])throw new Error(`Plugin ${e.name} already exist`);if(e.pluginNamespace!==q.MULTICHAIN&&e.pluginNamespace!==this.coreOptions.chainConfig.chainNamespace)throw new Error(`This plugin belongs to ${e.pluginNamespace} namespace which is incompatible with currently used namespace: ${this.coreOptions.chainConfig.chainNamespace}`);return this.plugins[e.name]=e,this}subscribeToAdapterEvents(e){e.on(D.CONNECTED,(async e=>{if(!this.commonJRPCProvider)throw P.notFound("CommonJrpcProvider not found");const{provider:t}=this.walletAdapters[e.adapter];this.commonJRPCProvider.updateProviderEngineProxy(t),this.status=U.CONNECTED,this.connectedAdapterName=e.adapter,this.cacheWallet(e.adapter),H.debug("connected",this.status,this.connectedAdapterName),Object.values(this.plugins).map((async t=>{try{if(!t.SUPPORTED_ADAPTERS.includes(e.adapter))return;await t.initWithWeb3Auth(this),await t.connect()}catch(e){if(5211===e.code)return;H.error(e)}})),this.emit(D.CONNECTED,ke({},e))})),e.on(D.DISCONNECTED,(async e=>{if(this.status=U.READY,W(this.storage)){const e=window[this.storage].getItem(Fe);this.connectedAdapterName===e&&this.clearCache()}H.debug("disconnected",this.status,this.connectedAdapterName),await Promise.all(Object.values(this.plugins).map((e=>e.disconnect().catch((e=>{5211!==e.code&&H.error(e)}))))),this.connectedAdapterName=null,this.emit(D.DISCONNECTED,e)})),e.on(D.CONNECTING,(e=>{this.status=U.CONNECTING,this.emit(D.CONNECTING,e),H.debug("connecting",this.status,this.connectedAdapterName)})),e.on(D.ERRORED,(e=>{this.status=U.ERRORED,this.clearCache(),this.emit(D.ERRORED,e),H.debug("errored",this.status,this.connectedAdapterName)})),e.on(D.ADAPTER_DATA_UPDATED,(e=>{H.debug("adapter data updated",e),this.emit(D.ADAPTER_DATA_UPDATED,e)})),e.on(D.CACHE_CLEAR,(e=>{H.debug("adapter cache clear",e),W(this.storage)&&this.clearCache()}))}checkInitRequirements(){if(this.status===U.CONNECTING)throw P.notReady("Already pending connection");if(this.status===U.CONNECTED)throw P.notReady("Already connected");if(this.status===U.READY)throw P.notReady("Adapter is already initialized")}cacheWallet(e){W(this.storage)&&(window[this.storage].setItem(Fe,e),this.cachedAdapter=e)}}})(),n})()));
3
3
  //# sourceMappingURL=noModal.umd.min.js.map