@wormhole-foundation/wormhole-connect 2.2.0 → 2.3.0-beta.0-development

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +0 -1
  2. package/dist/main.js +108 -108
  3. package/dist/src/config/tokens.d.ts +1 -1
  4. package/dist/src/config/tokens.d.ts.map +1 -1
  5. package/dist/src/consts/wallet.d.ts.map +1 -1
  6. package/dist/src/hooks/useConfirmTransaction.d.ts +12 -0
  7. package/dist/src/hooks/useConfirmTransaction.d.ts.map +1 -0
  8. package/dist/src/hooks/useGasSlider.d.ts +1 -2
  9. package/dist/src/hooks/useGasSlider.d.ts.map +1 -1
  10. package/dist/src/index.d.ts +3 -3
  11. package/dist/src/index.d.ts.map +1 -1
  12. package/dist/src/routes/operator.d.ts +0 -1
  13. package/dist/src/routes/operator.d.ts.map +1 -1
  14. package/dist/src/routes/sdkv2/route.d.ts +0 -1
  15. package/dist/src/routes/sdkv2/route.d.ts.map +1 -1
  16. package/dist/src/store/transferInput.d.ts +2 -4
  17. package/dist/src/store/transferInput.d.ts.map +1 -1
  18. package/dist/src/utils/wallet/index.d.ts +1 -1
  19. package/dist/src/utils/wallet/index.d.ts.map +1 -1
  20. package/dist/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  21. package/dist/src/views/v2/Bridge/AssetPicker/SearchableList/index.d.ts.map +1 -1
  22. package/dist/src/views/v2/Bridge/AssetPicker/index.d.ts +1 -0
  23. package/dist/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
  24. package/dist/src/views/v2/Bridge/{ReviewTransaction/GasSlider.d.ts → GasSlider/index.d.ts} +1 -1
  25. package/dist/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -0
  26. package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  27. package/dist/src/views/v2/Bridge/SwapInputs/index.d.ts.map +1 -1
  28. package/dist/src/views/v2/Bridge/WalletConnector/Controller.d.ts.map +1 -1
  29. package/dist/src/views/v2/Bridge/index.d.ts.map +1 -1
  30. package/dist/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
  31. package/dist/src/views/v2/TxHistory/Widget/Item.d.ts +1 -0
  32. package/dist/src/views/v2/TxHistory/Widget/Item.d.ts.map +1 -1
  33. package/dist/src/views/v2/TxHistory/Widget/index.d.ts +3 -1
  34. package/dist/src/views/v2/TxHistory/Widget/index.d.ts.map +1 -1
  35. package/lib/{aptos-CWfp2v_P.js → aptos-C8wWowIo.js} +2 -2
  36. package/lib/{aptos-7dMQQEIW.mjs → aptos-D7c67ZLW.mjs} +5 -5
  37. package/lib/{aptos-BUemveTM.mjs → aptos-DDn36CHg.mjs} +2 -2
  38. package/lib/{aptos-umg2ncs_.js → aptos-DdE-0VJe.js} +1 -1
  39. package/lib/{base64-CIH-T7Pn.mjs → base64-DDHFdAly.mjs} +1 -1
  40. package/lib/{base64-BlOlyzUY.js → base64-ezgPiVRC.js} +1 -1
  41. package/lib/{ccip-CdkU-__S.js → ccip-CcmdyG6F.js} +1 -1
  42. package/lib/{ccip-BhU7SDb9.mjs → ccip-cCuo9AgF.mjs} +1 -1
  43. package/lib/{chunk-IMTC3J2M-Bm_KxGLU.mjs → chunk-IMTC3J2M-CVDcZzUA.mjs} +3 -3
  44. package/lib/{chunk-IMTC3J2M-CG7LPkYt.js → chunk-IMTC3J2M-DxYYEZPQ.js} +1 -1
  45. package/lib/{events-jQ_Do8B1.js → events-BJ__ydp1.js} +1 -1
  46. package/lib/{events-hPS-mKjU.mjs → events-Cx0TtMEs.mjs} +1 -1
  47. package/lib/{evm-D4OaAvxv.js → evm-0ozMa6lt.js} +1 -1
  48. package/lib/{evm-DvlAO_-c.mjs → evm-B2N6Szko.mjs} +5 -5
  49. package/lib/{evm-Ck-LC8K1.js → evm-C1P39f42.js} +3 -3
  50. package/lib/{evm-AFZ_po3U.mjs → evm-DnyX6-E0.mjs} +5 -5
  51. package/lib/{index-ihbUzPuY.mjs → index-B2v3lWOA.mjs} +1 -1
  52. package/lib/{index-DyvLFo_F.mjs → index-BAH37FLm.mjs} +2 -2
  53. package/lib/{index-Bu1PkKLG.js → index-BCYsl46V.js} +1 -1
  54. package/lib/{index-CUR8Z8Cf.js → index-BD2_PLZI.js} +1 -1
  55. package/lib/{index-BZs20N4K.mjs → index-Be1t7NdK.mjs} +2 -2
  56. package/lib/{index-B3nUhqKI.mjs → index-Bj6DHbUk.mjs} +2 -2
  57. package/lib/{index-BUDas0Q7.mjs → index-Bu-ZkvDv.mjs} +1 -1
  58. package/lib/{index-JVwNffKI.mjs → index-BuYa5pxo.mjs} +2 -2
  59. package/lib/{index-C0ecUbom.mjs → index-BxP3fEtC.mjs} +2 -2
  60. package/lib/{index-MxqIZiRX.mjs → index-BxXt3T2L.mjs} +2 -2
  61. package/lib/{index-BWsfR9uT.mjs → index-BzcZiOc0.mjs} +1 -1
  62. package/lib/{index-hus1Sl4S.js → index-C6dpONOU.js} +1 -1
  63. package/lib/{index-D9o7O_OT.js → index-C7o_1w2b.js} +1 -1
  64. package/lib/{index-DV2Mc1nu.js → index-C8klYEIV.js} +1 -1
  65. package/lib/{index-BNe7LUKU.mjs → index-CFMLZ1vA.mjs} +5 -5
  66. package/lib/{index-DTfWrGt3.mjs → index-CUb31_lx.mjs} +1 -1
  67. package/lib/{index-CHWND-D1.mjs → index-CeGgtsu2.mjs} +3 -3
  68. package/lib/{index-BKBGPzmc.mjs → index-Cfoq6joM.mjs} +1 -1
  69. package/lib/{index-BFXBE_Mo.js → index-CkwnTFud.js} +1 -1
  70. package/lib/{index-BbSC7v8g.js → index-CyQ9IEH0.js} +1 -1
  71. package/lib/{index-KdiLn9Rj.js → index-D4vjV5Cn.js} +1 -1
  72. package/lib/{index-AVSrA-i6.js → index-D5xbHPoy.js} +1 -1
  73. package/lib/{index-nWaQESZp.mjs → index-DH7AJ70P.mjs} +1 -1
  74. package/lib/{index-Bi5J2r-k.js → index-DLxALGi6.js} +1 -1
  75. package/lib/{index-BEhe2aRM.js → index-DP4LajXh.js} +99 -99
  76. package/lib/{index-WPYOQdpa.js → index-DPCJduN1.js} +1 -1
  77. package/lib/{index-D1q2O2Av.mjs → index-DPf2pllz.mjs} +3 -3
  78. package/lib/{index-D0QNNKvo.mjs → index-DRcPh_kU.mjs} +4 -4
  79. package/lib/{index-PNYcH9VB.js → index-DTPmVH0m.js} +1 -1
  80. package/lib/{index-D5fAF0iQ.js → index-DcIAHxwS.js} +1 -1
  81. package/lib/{index-CaNzAG1x.mjs → index-DiGgidBd.mjs} +7604 -7681
  82. package/lib/{index-NWE7RRiw.mjs → index-DvpfNUKf.mjs} +2 -2
  83. package/lib/{index-CtS6jcgq.js → index-DzM-GaLm.js} +1 -1
  84. package/lib/{index-Derjp7Zu.mjs → index-DziLpE9R.mjs} +2 -2
  85. package/lib/{index-wHDS4NqS.js → index-JqJdK8nh.js} +1 -1
  86. package/lib/{index-Bd3pCFb1.js → index-LbLfiRUY.js} +1 -1
  87. package/lib/{index-Dhyj87bh.mjs → index-PlcYoJ_e.mjs} +1 -1
  88. package/lib/{index-B9WBHQFN.js → index-ZFWFaT_g.js} +1 -1
  89. package/lib/{index-CdrPNIu_.js → index-mCqIYfBy.js} +1 -1
  90. package/lib/{index-BchoBDpT.mjs → index-uXXxfGyN.mjs} +2 -2
  91. package/lib/{index-Df5E8ttw.js → index-vipvKyDe.js} +1 -1
  92. package/lib/{index-DirgoiOD.js → index-wzIjatvw.js} +1 -1
  93. package/lib/{index.es-D6eM34wK.mjs → index.es-CGjw8LBi.mjs} +6 -6
  94. package/lib/{index.es-CJrTwrY5.js → index.es-D45qOiuD.js} +2 -2
  95. package/lib/index.js +1 -1
  96. package/lib/index.mjs +1 -1
  97. package/lib/{signer-C1hgiPI9.js → signer-DteZwBbB.js} +1 -1
  98. package/lib/{signer-CXxUSLSd.mjs → signer-StZFWU4E.mjs} +1 -1
  99. package/lib/{solana-XXmHFxEb.js → solana-643BgaAW.js} +1 -1
  100. package/lib/solana-BuuMVrdp.js +1 -0
  101. package/lib/{solana-D4eoBu_Q.mjs → solana-IP1dZh2r.mjs} +4 -4
  102. package/lib/{solana-C06kaujM.mjs → solana-oxjhG-3b.mjs} +5 -5
  103. package/lib/{solanaEmbed.esm-CBSm6nV9.js → solanaEmbed.esm-Cp1hmjAh.js} +1 -1
  104. package/lib/{solanaEmbed.esm-dce8g5AQ.mjs → solanaEmbed.esm-nYODBqHJ.mjs} +2 -2
  105. package/lib/src/config/tokens.d.ts +1 -1
  106. package/lib/src/config/tokens.d.ts.map +1 -1
  107. package/lib/src/consts/wallet.d.ts.map +1 -1
  108. package/lib/src/hooks/useConfirmTransaction.d.ts +12 -0
  109. package/lib/src/hooks/useConfirmTransaction.d.ts.map +1 -0
  110. package/lib/src/hooks/useGasSlider.d.ts +1 -2
  111. package/lib/src/hooks/useGasSlider.d.ts.map +1 -1
  112. package/lib/src/index.d.ts +3 -3
  113. package/lib/src/index.d.ts.map +1 -1
  114. package/lib/src/routes/operator.d.ts +0 -1
  115. package/lib/src/routes/operator.d.ts.map +1 -1
  116. package/lib/src/routes/sdkv2/route.d.ts +0 -1
  117. package/lib/src/routes/sdkv2/route.d.ts.map +1 -1
  118. package/lib/src/store/transferInput.d.ts +2 -4
  119. package/lib/src/store/transferInput.d.ts.map +1 -1
  120. package/lib/src/utils/wallet/index.d.ts +1 -1
  121. package/lib/src/utils/wallet/index.d.ts.map +1 -1
  122. package/lib/src/views/v2/Bridge/AmountInput/index.d.ts.map +1 -1
  123. package/lib/src/views/v2/Bridge/AssetPicker/SearchableList/index.d.ts.map +1 -1
  124. package/lib/src/views/v2/Bridge/AssetPicker/index.d.ts +1 -0
  125. package/lib/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
  126. package/lib/src/views/v2/Bridge/{ReviewTransaction/GasSlider.d.ts → GasSlider/index.d.ts} +1 -1
  127. package/lib/src/views/v2/Bridge/GasSlider/index.d.ts.map +1 -0
  128. package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  129. package/lib/src/views/v2/Bridge/SwapInputs/index.d.ts.map +1 -1
  130. package/lib/src/views/v2/Bridge/WalletConnector/Controller.d.ts.map +1 -1
  131. package/lib/src/views/v2/Bridge/index.d.ts.map +1 -1
  132. package/lib/src/views/v2/TxHistory/Item/index.d.ts.map +1 -1
  133. package/lib/src/views/v2/TxHistory/Widget/Item.d.ts +1 -0
  134. package/lib/src/views/v2/TxHistory/Widget/Item.d.ts.map +1 -1
  135. package/lib/src/views/v2/TxHistory/Widget/index.d.ts +3 -1
  136. package/lib/src/views/v2/TxHistory/Widget/index.d.ts.map +1 -1
  137. package/lib/{sui-BDZkyTVG.js → sui-BV_WN62T.js} +1 -1
  138. package/lib/{sui-BEvt3G9o.mjs → sui-DbQenqxx.mjs} +1 -1
  139. package/lib/{sui-CrYGHvcd.js → sui-DdU63C8s.js} +2 -2
  140. package/lib/{sui-D8i87rc-.mjs → sui-OujMcwQK.mjs} +5 -5
  141. package/package.json +18 -18
  142. package/dist/src/hooks/useComputeSourceTokens.d.ts +0 -15
  143. package/dist/src/hooks/useComputeSourceTokens.d.ts.map +0 -1
  144. package/dist/src/views/v2/Bridge/ReviewTransaction/GasSlider.d.ts.map +0 -1
  145. package/dist/src/views/v2/Bridge/ReviewTransaction/SendError.d.ts +0 -8
  146. package/dist/src/views/v2/Bridge/ReviewTransaction/SendError.d.ts.map +0 -1
  147. package/dist/src/views/v2/Bridge/ReviewTransaction/index.d.ts +0 -9
  148. package/dist/src/views/v2/Bridge/ReviewTransaction/index.d.ts.map +0 -1
  149. package/lib/solana-B0ZJBh57.js +0 -1
  150. package/lib/src/hooks/useComputeSourceTokens.d.ts +0 -15
  151. package/lib/src/hooks/useComputeSourceTokens.d.ts.map +0 -1
  152. package/lib/src/views/v2/Bridge/ReviewTransaction/GasSlider.d.ts.map +0 -1
  153. package/lib/src/views/v2/Bridge/ReviewTransaction/SendError.d.ts +0 -8
  154. package/lib/src/views/v2/Bridge/ReviewTransaction/SendError.d.ts.map +0 -1
  155. package/lib/src/views/v2/Bridge/ReviewTransaction/index.d.ts +0 -9
  156. package/lib/src/views/v2/Bridge/ReviewTransaction/index.d.ts.map +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./index-BEhe2aRM.js"),gl=require("./dijkstra-CtFxn7S9.js"),Re=require("./events-jQ_Do8B1.js"),I=require("./index-wHDS4NqS.js"),_=require("./index-Bu1PkKLG.js"),W=require("./index-AVSrA-i6.js");let yl=class extends _.r{constructor(e){super(e),this.events=new Re.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(_.formatJsonRpcRequest(e.method,e.params||[],e.id||_.getBigIntRpcId().toString()),t)}async requestStrict(e,t){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{_.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,t)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),_.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var ml=function(){var r=document.getSelection();if(!r.rangeCount)return function(){};for(var e=document.activeElement,t=[],i=0;i<r.rangeCount;i++)t.push(r.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return r.removeAllRanges(),function(){r.type==="Caret"&&r.removeAllRanges(),r.rangeCount||t.forEach(function(n){r.addRange(n)}),e&&e.focus()}},vl=ml,Dn={"text/plain":"Text","text/html":"Url",default:"Text"},wl="Copy to clipboard: #{key}, Enter";function _l(r){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return r.replace(/#{\s*key\s*}/g,e)}function bl(r,e){var t,i,n,s,o,a,c=!1;e||(e={}),t=e.debug||!1;try{n=vl(),s=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=r,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Dn[e.format]||Dn.default;window.clipboardData.setData(h,r)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,r);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){t&&console.error("unable to copy using execCommand: ",u),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",r),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(h){t&&console.error("unable to copy using clipboardData: ",h),t&&console.error("falling back to prompt"),i=_l("message"in e?e.message:wl),window.prompt(i,r)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),n()}return c}var El=bl,Sl={}.toString,rn=Array.isArray||function(r){return Sl.call(r)=="[object Array]"},Il=E.requireElliptic(),nn={},Q={};Object.defineProperty(Q,"__esModule",{value:!0});var ko=Q.getLocalStorage=Vo=Q.getLocalStorageOrThrow=Ko=Q.getCrypto=zo=Q.getCryptoOrThrow=jo=Q.getLocation=Uo=Q.getLocationOrThrow=Bo=Q.getNavigator=qo=Q.getNavigatorOrThrow=Fo=Q.getDocument=Do=Q.getDocumentOrThrow=Lo=Q.getFromWindowOrThrow=Mo=Q.getFromWindow=void 0;function wt(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}var Mo=Q.getFromWindow=wt;function qt(r){const e=wt(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}var Lo=Q.getFromWindowOrThrow=qt;function xl(){return qt("document")}var Do=Q.getDocumentOrThrow=xl;function Pl(){return wt("document")}var Fo=Q.getDocument=Pl;function Al(){return qt("navigator")}var qo=Q.getNavigatorOrThrow=Al;function Rl(){return wt("navigator")}var Bo=Q.getNavigator=Rl;function Nl(){return qt("location")}var Uo=Q.getLocationOrThrow=Nl;function Tl(){return wt("location")}var jo=Q.getLocation=Tl;function Cl(){return qt("crypto")}var zo=Q.getCryptoOrThrow=Cl;function Ol(){return wt("crypto")}var Ko=Q.getCrypto=Ol;function $l(){return qt("localStorage")}var Vo=Q.getLocalStorageOrThrow=$l;function kl(){return wt("localStorage")}ko=Q.getLocalStorage=kl;Object.defineProperty(nn,"__esModule",{value:!0});var Wo=nn.getWindowMetadata=void 0;const Fn=Q;function Ml(){let r,e;try{r=Fn.getDocumentOrThrow(),e=Fn.getLocationOrThrow()}catch{return null}function t(){const h=r.getElementsByTagName("link"),p=[];for(let d=0;d<h.length;d++){const f=h[d],g=f.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const y=f.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let m=e.protocol+"//"+e.host;if(y.indexOf("/")===0)m+=y;else{const v=e.pathname.split("/");v.pop();const b=v.join("/");m+=b+"/"+y}p.push(m)}else if(y.indexOf("//")===0){const m=e.protocol+y;p.push(m)}else p.push(y)}}return p}function i(...h){const p=r.getElementsByTagName("meta");for(let d=0;d<p.length;d++){const f=p[d],g=["itemprop","property","name"].map(y=>f.getAttribute(y)).filter(y=>y?h.includes(y):!1);if(g.length&&g){const y=f.getAttribute("content");if(y)return y}}return""}function n(){let h=i("name","og:site_name","og:title","twitter:title");return h||(h=r.title),h}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),a=s(),c=e.origin,l=t();return{description:a,url:c,icons:l,name:o}}Wo=nn.getWindowMetadata=Ml;var Ll=function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var i=Array(r),n=0,e=0;e<t;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i},Dl=function(){function r(e,t,i){this.name=e,this.version=t,this.os=i,this.type="browser"}return r}(),Fl=function(){function r(e){this.version=e,this.type="node",this.name="node",this.os=E.dist.process.platform}return r}(),ql=function(){function r(e,t,i,n){this.name=e,this.version=t,this.os=i,this.bot=n,this.type="bot-device"}return r}(),Bl=function(){function r(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return r}(),Ul=function(){function r(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return r}(),jl=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,zl=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,qn=3,Kl=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",jl]],Bn=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Vl(r){return r?Un(r):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Ul:typeof navigator<"u"?Un(navigator.userAgent):Jl()}function Wl(r){return r!==""&&Kl.reduce(function(e,t){var i=t[0],n=t[1];if(e)return e;var s=n.exec(r);return!!s&&[i,s]},!1)}function Un(r){var e=Wl(r);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new Bl;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<qn&&(n=Ll(n,Gl(qn-n.length))):n=[];var s=n.join("."),o=Hl(r),a=zl.exec(r);return a&&a[1]?new ql(t,s,o,a[1]):new Dl(t,s,o)}function Hl(r){for(var e=0,t=Bn.length;e<t;e++){var i=Bn[e],n=i[0],s=i[1],o=s.exec(r);if(o)return n}return null}function Jl(){var r=typeof E.dist.process<"u"&&E.dist.process.version;return r?new Fl(E.dist.process.version.slice(1)):null}function Gl(r){for(var e=[],t=0;t<r;t++)e.push("0");return e}function sn(r){return Vl(r)}function Vr(){const r=sn();return r&&r.os?r.os:void 0}function Ho(){const r=Vr();return r?r.toLowerCase().includes("android"):!1}function Jo(){const r=Vr();return r?r.toLowerCase().includes("ios")||r.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Yl(){return Vr()?Ho()||Jo():!1}function Go(){const r=sn();return r&&r.name?r.name.toLowerCase()==="node":!1}function Ql(){return!Go()&&!!Yo()}const Xl=Mo,Zl=Lo,eu=Do,tu=Fo,ru=qo,Yo=Bo,iu=Uo,nu=jo,su=zo,ou=Ko,au=Vo,Wr=ko;function cu(){return Wo()}function lu(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return JSON.parse(r)}catch{return r}}function uu(r){return typeof r=="string"?r:JSON.stringify(r)}const Qo=lu,Xo=uu;function Zo(r,e){const t=Xo(e),i=Wr();i&&i.setItem(r,t)}function hu(r){let e=null,t=null;const i=Wr();return i&&(t=i.getItem(r)),e=t&&Qo(t),e}function du(r){const e=Wr();e&&e.removeItem(r)}const ea="WALLETCONNECT_DEEPLINK_CHOICE";function fu(r,e){const t=encodeURIComponent(r);return e.universalLink?`${e.universalLink}/wc?uri=${t}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${t}`:""}function pu(r){const e=r.href.split("?")[0];Zo(ea,Object.assign(Object.assign({},r),{href:e}))}function ta(r,e){return r.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))[0]}function gu(r,e){let t=r;return e&&(t=e.map(i=>ta(r,i)).filter(Boolean)),t}const ra="https://registry.walletconnect.com";function yu(){return ra+"/api/v2/wallets"}function mu(){return ra+"/api/v2/dapps"}function ia(r,e="mobile"){var t;return{name:r.name||"",shortName:r.metadata.shortName||"",color:r.metadata.colors.primary||"",logo:(t=r.image_url.sm)!==null&&t!==void 0?t:"",universalLink:r[e].universal||"",deepLink:r[e].native||""}}function vu(r,e="mobile"){return Object.values(r).filter(t=>!!t[e].universal||!!t[e].native).map(t=>ia(t,e))}const wu=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:sn,detectOS:Vr,formatIOSMobile:fu,formatMobileRegistry:vu,formatMobileRegistryEntry:ia,getClientMeta:cu,getCrypto:ou,getCryptoOrThrow:su,getDappRegistryUrl:mu,getDocument:tu,getDocumentOrThrow:eu,getFromWindow:Xl,getFromWindowOrThrow:Zl,getLocal:hu,getLocalStorage:Wr,getLocalStorageOrThrow:au,getLocation:nu,getLocationOrThrow:iu,getMobileLinkRegistry:gu,getMobileRegistryEntry:ta,getNavigator:Yo,getNavigatorOrThrow:ru,getWalletRegistryUrl:yu,isAndroid:Ho,isBrowser:Ql,isIOS:Jo,isMobile:Yl,isNode:Go,mobileLinkChoiceKey:ea,removeLocal:du,safeJsonParse:Qo,safeJsonStringify:Xo,saveMobileLinkInfo:pu,setLocal:Zo},Symbol.toStringTag,{value:"Module"})),_u=E.getAugmentedNamespace(wu);var hr={},bu=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},na={},ct={},Eu=rn;function Su(){try{var r=new Uint8Array(1);return r.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},r.foo()===42}catch{return!1}}j.TYPED_ARRAY_SUPPORT=Su();var jn=j.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function j(r,e,t){return!j.TYPED_ARRAY_SUPPORT&&!(this instanceof j)?new j(r,e,t):typeof r=="number"?sa(this,r):Tu(this,r,e,t)}j.TYPED_ARRAY_SUPPORT&&(j.prototype.__proto__=Uint8Array.prototype,j.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&j[Symbol.species]===j&&Object.defineProperty(j,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function on(r){if(r>=jn)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+jn.toString(16)+" bytes");return r|0}function Iu(r){return r!==r}function Tt(r,e){var t;return j.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=j.prototype):(t=r,t===null&&(t=new j(e)),t.length=e),t}function sa(r,e){var t=Tt(r,e<0?0:on(e)|0);if(!j.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function xu(r,e){var t=aa(e)|0,i=Tt(r,t),n=i.write(e);return n!==t&&(i=i.slice(0,n)),i}function $i(r,e){for(var t=e.length<0?0:on(e.length)|0,i=Tt(r,t),n=0;n<t;n+=1)i[n]=e[n]&255;return i}function Pu(r,e,t,i){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");var n;return t===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,i),j.TYPED_ARRAY_SUPPORT?n.__proto__=j.prototype:n=$i(r,n),n}function Au(r,e){if(j.isBuffer(e)){var t=on(e.length)|0,i=Tt(r,t);return i.length===0||e.copy(i,0,0,t),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Iu(e.length)?Tt(r,0):$i(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return $i(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oa(r,e){e=e||1/0;for(var t,i=r.length,n=null,s=[],o=0;o<i;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function aa(r){if(j.isBuffer(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;return e===0?0:oa(r).length}function Ru(r,e,t,i){for(var n=0;n<i&&!(n+t>=e.length||n>=r.length);++n)e[n+t]=r[n];return n}function Nu(r,e,t,i){return Ru(oa(e,r.length-t),r,t,i)}function Tu(r,e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Pu(r,e,t,i):typeof e=="string"?xu(r,e):Au(r,e)}j.prototype.write=function(e,t,i){t===void 0?(i=this.length,t=0):i===void 0&&typeof t=="string"?(i=this.length,t=0):isFinite(t)&&(t=t|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-t;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Nu(this,e,t,i)};j.prototype.slice=function(e,t){var i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);var n;if(j.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=j.prototype;else{var s=t-e;n=new j(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};j.prototype.copy=function(e,t,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s=n-i,o;if(this===e&&i<t&&t<n)for(o=s-1;o>=0;--o)e[o+t]=this[o+i];else if(s<1e3||!j.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),t);return s};j.prototype.fill=function(e,t,i){if(typeof e=="string"){if(typeof t=="string"?(t=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=t;s<i;++s)this[s]=e;else{var o=j.isBuffer(e)?e:new j(e),a=o.length;for(s=0;s<i-t;++s)this[s+t]=o[s%a]}return this};j.concat=function(e,t){if(!Eu(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Tt(null,0);var i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=sa(null,t),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!j.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};j.byteLength=aa;j.prototype._isBuffer=!0;j.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};ct.alloc=function(r){var e=new j(r);return e.fill(0),e};ct.from=function(r){return new j(r)};var _e={},an,Cu=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_e.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};_e.getSymbolTotalCodewords=function(e){return Cu[e]};_e.getBCHDigit=function(r){for(var e=0;r!==0;)e++,r>>>=1;return e};_e.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');an=e};_e.isKanjiModeEnabled=function(){return typeof an<"u"};_e.toSJIS=function(e){return an(e)};var Hr={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");var i=t.toLowerCase();switch(i){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}})(Hr);function ca(){this.buffer=[],this.length=0}ca.prototype={get:function(r){var e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(var t=0;t<e;t++)this.putBit((r>>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Ou=ca,zn=ct;function dr(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=zn.alloc(r*r),this.reservedBit=zn.alloc(r*r)}dr.prototype.set=function(r,e,t,i){var n=r*this.size+e;this.data[n]=t,i&&(this.reservedBit[n]=!0)};dr.prototype.get=function(r,e){return this.data[r*this.size+e]};dr.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};dr.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var $u=dr,la={};(function(r){var e=_e.getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7],c=1;c<n-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},r.getPositions=function(i){for(var n=[],s=r.getRowColCoords(i),o=s.length,a=0;a<o;a++)for(var c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||n.push([s[a],s[c]]);return n}})(la);var ua={},ku=_e.getSymbolSize,Kn=7;ua.getPositions=function(e){var t=ku(e);return[[0,0],[t-Kn,0],[0,t-Kn]]};var ha={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};r.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){for(var s=n.size,o=0,a=0,c=0,l=null,u=null,h=0;h<s;h++){a=c=0,l=u=null;for(var p=0;p<s;p++){var d=n.get(h,p);d===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=d,a=1),d=n.get(p,h),d===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=d,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},r.getPenaltyN2=function(n){for(var s=n.size,o=0,a=0;a<s-1;a++)for(var c=0;c<s-1;c++){var l=n.get(a,c)+n.get(a,c+1)+n.get(a+1,c)+n.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},r.getPenaltyN3=function(n){for(var s=n.size,o=0,a=0,c=0,l=0;l<s;l++){a=c=0;for(var u=0;u<s;u++)a=a<<1&2047|n.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|n.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){for(var s=0,o=n.data.length,a=0;a<o;a++)s+=n.data[a];var c=Math.abs(Math.ceil(s*100/o/5)-10);return c*e.N4};function t(i,n,s){switch(i){case r.Patterns.PATTERN000:return(n+s)%2===0;case r.Patterns.PATTERN001:return n%2===0;case r.Patterns.PATTERN010:return s%3===0;case r.Patterns.PATTERN011:return(n+s)%3===0;case r.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case r.Patterns.PATTERN101:return n*s%2+n*s%3===0;case r.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case r.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.applyMask=function(n,s){for(var o=s.size,a=0;a<o;a++)for(var c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,t(n,c,a))},r.getBestMask=function(n,s){for(var o=Object.keys(r.Patterns).length,a=0,c=1/0,l=0;l<o;l++){s(l),r.applyMask(l,n);var u=r.getPenaltyN1(n)+r.getPenaltyN2(n)+r.getPenaltyN3(n)+r.getPenaltyN4(n);r.applyMask(l,n),u<c&&(c=u,a=l)}return a}})(ha);var Jr={},rt=Hr,_r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],br=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Jr.getBlocksCount=function(e,t){switch(t){case rt.L:return _r[(e-1)*4+0];case rt.M:return _r[(e-1)*4+1];case rt.Q:return _r[(e-1)*4+2];case rt.H:return _r[(e-1)*4+3];default:return}};Jr.getTotalCodewordsCount=function(e,t){switch(t){case rt.L:return br[(e-1)*4+0];case rt.M:return br[(e-1)*4+1];case rt.Q:return br[(e-1)*4+2];case rt.H:return br[(e-1)*4+3];default:return}};var da={},Gr={},fa=ct,er=fa.alloc(512),$r=fa.alloc(256);(function(){for(var e=1,t=0;t<255;t++)er[t]=e,$r[e]=t,e<<=1,e&256&&(e^=285);for(t=255;t<512;t++)er[t]=er[t-255]})();Gr.log=function(e){if(e<1)throw new Error("log("+e+")");return $r[e]};Gr.exp=function(e){return er[e]};Gr.mul=function(e,t){return e===0||t===0?0:er[$r[e]+$r[t]]};(function(r){var e=ct,t=Gr;r.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),a=0;a<n.length;a++)for(var c=0;c<s.length;c++)o[a+c]^=t.mul(n[a],s[c]);return o},r.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var a=o[0],c=0;c<s.length;c++)o[c]^=t.mul(s[c],a);for(var l=0;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},r.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=r.mul(s,[1,t.exp(o)]);return s}})(da);var Vn=ct,pa=da,Mu=E.bufferPolyfill.Buffer;function cn(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}cn.prototype.initialize=function(e){this.degree=e,this.genPoly=pa.generateECPolynomial(this.degree)};cn.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=Vn.alloc(this.degree),i=Mu.concat([e,t],e.length+this.degree),n=pa.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=Vn.alloc(this.degree);return n.copy(o,s),o}return n};var Lu=cn,ga={},lt={},ln={};ln.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var ze={},ya="[0-9]+",Du="[A-Z $%*+\\-./:]+",sr="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";sr=sr.replace(/u/g,"\\u");var Fu="(?:(?![A-Z0-9 $%*+\\-./:]|"+sr+`)(?:.|[\r
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./index-DP4LajXh.js"),gl=require("./dijkstra-CtFxn7S9.js"),Re=require("./events-BJ__ydp1.js"),I=require("./index-JqJdK8nh.js"),_=require("./index-BCYsl46V.js"),W=require("./index-D5xbHPoy.js");let yl=class extends _.r{constructor(e){super(e),this.events=new Re.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(_.formatJsonRpcRequest(e.method,e.params||[],e.id||_.getBigIntRpcId().toString()),t)}async requestStrict(e,t){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{_.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,t)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),_.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var ml=function(){var r=document.getSelection();if(!r.rangeCount)return function(){};for(var e=document.activeElement,t=[],i=0;i<r.rangeCount;i++)t.push(r.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return r.removeAllRanges(),function(){r.type==="Caret"&&r.removeAllRanges(),r.rangeCount||t.forEach(function(n){r.addRange(n)}),e&&e.focus()}},vl=ml,Dn={"text/plain":"Text","text/html":"Url",default:"Text"},wl="Copy to clipboard: #{key}, Enter";function _l(r){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return r.replace(/#{\s*key\s*}/g,e)}function bl(r,e){var t,i,n,s,o,a,c=!1;e||(e={}),t=e.debug||!1;try{n=vl(),s=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=r,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),e.format)if(u.preventDefault(),typeof u.clipboardData>"u"){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=Dn[e.format]||Dn.default;window.clipboardData.setData(h,r)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,r);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){t&&console.error("unable to copy using execCommand: ",u),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",r),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(h){t&&console.error("unable to copy using clipboardData: ",h),t&&console.error("falling back to prompt"),i=_l("message"in e?e.message:wl),window.prompt(i,r)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),n()}return c}var El=bl,Sl={}.toString,rn=Array.isArray||function(r){return Sl.call(r)=="[object Array]"},Il=E.requireElliptic(),nn={},Q={};Object.defineProperty(Q,"__esModule",{value:!0});var ko=Q.getLocalStorage=Vo=Q.getLocalStorageOrThrow=Ko=Q.getCrypto=zo=Q.getCryptoOrThrow=jo=Q.getLocation=Uo=Q.getLocationOrThrow=Bo=Q.getNavigator=qo=Q.getNavigatorOrThrow=Fo=Q.getDocument=Do=Q.getDocumentOrThrow=Lo=Q.getFromWindowOrThrow=Mo=Q.getFromWindow=void 0;function wt(r){let e;return typeof window<"u"&&typeof window[r]<"u"&&(e=window[r]),e}var Mo=Q.getFromWindow=wt;function qt(r){const e=wt(r);if(!e)throw new Error(`${r} is not defined in Window`);return e}var Lo=Q.getFromWindowOrThrow=qt;function xl(){return qt("document")}var Do=Q.getDocumentOrThrow=xl;function Pl(){return wt("document")}var Fo=Q.getDocument=Pl;function Al(){return qt("navigator")}var qo=Q.getNavigatorOrThrow=Al;function Rl(){return wt("navigator")}var Bo=Q.getNavigator=Rl;function Nl(){return qt("location")}var Uo=Q.getLocationOrThrow=Nl;function Tl(){return wt("location")}var jo=Q.getLocation=Tl;function Cl(){return qt("crypto")}var zo=Q.getCryptoOrThrow=Cl;function Ol(){return wt("crypto")}var Ko=Q.getCrypto=Ol;function $l(){return qt("localStorage")}var Vo=Q.getLocalStorageOrThrow=$l;function kl(){return wt("localStorage")}ko=Q.getLocalStorage=kl;Object.defineProperty(nn,"__esModule",{value:!0});var Wo=nn.getWindowMetadata=void 0;const Fn=Q;function Ml(){let r,e;try{r=Fn.getDocumentOrThrow(),e=Fn.getLocationOrThrow()}catch{return null}function t(){const h=r.getElementsByTagName("link"),p=[];for(let d=0;d<h.length;d++){const f=h[d],g=f.getAttribute("rel");if(g&&g.toLowerCase().indexOf("icon")>-1){const y=f.getAttribute("href");if(y)if(y.toLowerCase().indexOf("https:")===-1&&y.toLowerCase().indexOf("http:")===-1&&y.indexOf("//")!==0){let m=e.protocol+"//"+e.host;if(y.indexOf("/")===0)m+=y;else{const v=e.pathname.split("/");v.pop();const b=v.join("/");m+=b+"/"+y}p.push(m)}else if(y.indexOf("//")===0){const m=e.protocol+y;p.push(m)}else p.push(y)}}return p}function i(...h){const p=r.getElementsByTagName("meta");for(let d=0;d<p.length;d++){const f=p[d],g=["itemprop","property","name"].map(y=>f.getAttribute(y)).filter(y=>y?h.includes(y):!1);if(g.length&&g){const y=f.getAttribute("content");if(y)return y}}return""}function n(){let h=i("name","og:site_name","og:title","twitter:title");return h||(h=r.title),h}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),a=s(),c=e.origin,l=t();return{description:a,url:c,icons:l,name:o}}Wo=nn.getWindowMetadata=Ml;var Ll=function(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var i=Array(r),n=0,e=0;e<t;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i},Dl=function(){function r(e,t,i){this.name=e,this.version=t,this.os=i,this.type="browser"}return r}(),Fl=function(){function r(e){this.version=e,this.type="node",this.name="node",this.os=E.dist.process.platform}return r}(),ql=function(){function r(e,t,i,n){this.name=e,this.version=t,this.os=i,this.bot=n,this.type="bot-device"}return r}(),Bl=function(){function r(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return r}(),Ul=function(){function r(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return r}(),jl=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,zl=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,qn=3,Kl=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",jl]],Bn=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function Vl(r){return r?Un(r):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Ul:typeof navigator<"u"?Un(navigator.userAgent):Jl()}function Wl(r){return r!==""&&Kl.reduce(function(e,t){var i=t[0],n=t[1];if(e)return e;var s=n.exec(r);return!!s&&[i,s]},!1)}function Un(r){var e=Wl(r);if(!e)return null;var t=e[0],i=e[1];if(t==="searchbot")return new Bl;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<qn&&(n=Ll(n,Gl(qn-n.length))):n=[];var s=n.join("."),o=Hl(r),a=zl.exec(r);return a&&a[1]?new ql(t,s,o,a[1]):new Dl(t,s,o)}function Hl(r){for(var e=0,t=Bn.length;e<t;e++){var i=Bn[e],n=i[0],s=i[1],o=s.exec(r);if(o)return n}return null}function Jl(){var r=typeof E.dist.process<"u"&&E.dist.process.version;return r?new Fl(E.dist.process.version.slice(1)):null}function Gl(r){for(var e=[],t=0;t<r;t++)e.push("0");return e}function sn(r){return Vl(r)}function Vr(){const r=sn();return r&&r.os?r.os:void 0}function Ho(){const r=Vr();return r?r.toLowerCase().includes("android"):!1}function Jo(){const r=Vr();return r?r.toLowerCase().includes("ios")||r.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function Yl(){return Vr()?Ho()||Jo():!1}function Go(){const r=sn();return r&&r.name?r.name.toLowerCase()==="node":!1}function Ql(){return!Go()&&!!Yo()}const Xl=Mo,Zl=Lo,eu=Do,tu=Fo,ru=qo,Yo=Bo,iu=Uo,nu=jo,su=zo,ou=Ko,au=Vo,Wr=ko;function cu(){return Wo()}function lu(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return JSON.parse(r)}catch{return r}}function uu(r){return typeof r=="string"?r:JSON.stringify(r)}const Qo=lu,Xo=uu;function Zo(r,e){const t=Xo(e),i=Wr();i&&i.setItem(r,t)}function hu(r){let e=null,t=null;const i=Wr();return i&&(t=i.getItem(r)),e=t&&Qo(t),e}function du(r){const e=Wr();e&&e.removeItem(r)}const ea="WALLETCONNECT_DEEPLINK_CHOICE";function fu(r,e){const t=encodeURIComponent(r);return e.universalLink?`${e.universalLink}/wc?uri=${t}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${t}`:""}function pu(r){const e=r.href.split("?")[0];Zo(ea,Object.assign(Object.assign({},r),{href:e}))}function ta(r,e){return r.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))[0]}function gu(r,e){let t=r;return e&&(t=e.map(i=>ta(r,i)).filter(Boolean)),t}const ra="https://registry.walletconnect.com";function yu(){return ra+"/api/v2/wallets"}function mu(){return ra+"/api/v2/dapps"}function ia(r,e="mobile"){var t;return{name:r.name||"",shortName:r.metadata.shortName||"",color:r.metadata.colors.primary||"",logo:(t=r.image_url.sm)!==null&&t!==void 0?t:"",universalLink:r[e].universal||"",deepLink:r[e].native||""}}function vu(r,e="mobile"){return Object.values(r).filter(t=>!!t[e].universal||!!t[e].native).map(t=>ia(t,e))}const wu=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:sn,detectOS:Vr,formatIOSMobile:fu,formatMobileRegistry:vu,formatMobileRegistryEntry:ia,getClientMeta:cu,getCrypto:ou,getCryptoOrThrow:su,getDappRegistryUrl:mu,getDocument:tu,getDocumentOrThrow:eu,getFromWindow:Xl,getFromWindowOrThrow:Zl,getLocal:hu,getLocalStorage:Wr,getLocalStorageOrThrow:au,getLocation:nu,getLocationOrThrow:iu,getMobileLinkRegistry:gu,getMobileRegistryEntry:ta,getNavigator:Yo,getNavigatorOrThrow:ru,getWalletRegistryUrl:yu,isAndroid:Ho,isBrowser:Ql,isIOS:Jo,isMobile:Yl,isNode:Go,mobileLinkChoiceKey:ea,removeLocal:du,safeJsonParse:Qo,safeJsonStringify:Xo,saveMobileLinkInfo:pu,setLocal:Zo},Symbol.toStringTag,{value:"Module"})),_u=E.getAugmentedNamespace(wu);var hr={},bu=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},na={},ct={},Eu=rn;function Su(){try{var r=new Uint8Array(1);return r.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},r.foo()===42}catch{return!1}}j.TYPED_ARRAY_SUPPORT=Su();var jn=j.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function j(r,e,t){return!j.TYPED_ARRAY_SUPPORT&&!(this instanceof j)?new j(r,e,t):typeof r=="number"?sa(this,r):Tu(this,r,e,t)}j.TYPED_ARRAY_SUPPORT&&(j.prototype.__proto__=Uint8Array.prototype,j.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&j[Symbol.species]===j&&Object.defineProperty(j,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function on(r){if(r>=jn)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+jn.toString(16)+" bytes");return r|0}function Iu(r){return r!==r}function Tt(r,e){var t;return j.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=j.prototype):(t=r,t===null&&(t=new j(e)),t.length=e),t}function sa(r,e){var t=Tt(r,e<0?0:on(e)|0);if(!j.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function xu(r,e){var t=aa(e)|0,i=Tt(r,t),n=i.write(e);return n!==t&&(i=i.slice(0,n)),i}function $i(r,e){for(var t=e.length<0?0:on(e.length)|0,i=Tt(r,t),n=0;n<t;n+=1)i[n]=e[n]&255;return i}function Pu(r,e,t,i){if(t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");var n;return t===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,i),j.TYPED_ARRAY_SUPPORT?n.__proto__=j.prototype:n=$i(r,n),n}function Au(r,e){if(j.isBuffer(e)){var t=on(e.length)|0,i=Tt(r,t);return i.length===0||e.copy(i,0,0,t),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Iu(e.length)?Tt(r,0):$i(r,e);if(e.type==="Buffer"&&Array.isArray(e.data))return $i(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oa(r,e){e=e||1/0;for(var t,i=r.length,n=null,s=[],o=0;o<i;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&s.push(239,191,189),n=t;continue}t=(n-55296<<10|t-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;s.push(t)}else if(t<2048){if((e-=2)<0)break;s.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;s.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;s.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return s}function aa(r){if(j.isBuffer(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;return e===0?0:oa(r).length}function Ru(r,e,t,i){for(var n=0;n<i&&!(n+t>=e.length||n>=r.length);++n)e[n+t]=r[n];return n}function Nu(r,e,t,i){return Ru(oa(e,r.length-t),r,t,i)}function Tu(r,e,t,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Pu(r,e,t,i):typeof e=="string"?xu(r,e):Au(r,e)}j.prototype.write=function(e,t,i){t===void 0?(i=this.length,t=0):i===void 0&&typeof t=="string"?(i=this.length,t=0):isFinite(t)&&(t=t|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-t;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Nu(this,e,t,i)};j.prototype.slice=function(e,t){var i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);var n;if(j.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=j.prototype;else{var s=t-e;n=new j(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};j.prototype.copy=function(e,t,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-i&&(n=e.length-t+i);var s=n-i,o;if(this===e&&i<t&&t<n)for(o=s-1;o>=0;--o)e[o+t]=this[o+i];else if(s<1e3||!j.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),t);return s};j.prototype.fill=function(e,t,i){if(typeof e=="string"){if(typeof t=="string"?(t=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=t;s<i;++s)this[s]=e;else{var o=j.isBuffer(e)?e:new j(e),a=o.length;for(s=0;s<i-t;++s)this[s+t]=o[s%a]}return this};j.concat=function(e,t){if(!Eu(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return Tt(null,0);var i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=sa(null,t),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!j.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};j.byteLength=aa;j.prototype._isBuffer=!0;j.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};ct.alloc=function(r){var e=new j(r);return e.fill(0),e};ct.from=function(r){return new j(r)};var _e={},an,Cu=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_e.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};_e.getSymbolTotalCodewords=function(e){return Cu[e]};_e.getBCHDigit=function(r){for(var e=0;r!==0;)e++,r>>>=1;return e};_e.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');an=e};_e.isKanjiModeEnabled=function(){return typeof an<"u"};_e.toSJIS=function(e){return an(e)};var Hr={};(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");var i=t.toLowerCase();switch(i){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}})(Hr);function ca(){this.buffer=[],this.length=0}ca.prototype={get:function(r){var e=Math.floor(r/8);return(this.buffer[e]>>>7-r%8&1)===1},put:function(r,e){for(var t=0;t<e;t++)this.putBit((r>>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(r){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),r&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Ou=ca,zn=ct;function dr(r){if(!r||r<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=r,this.data=zn.alloc(r*r),this.reservedBit=zn.alloc(r*r)}dr.prototype.set=function(r,e,t,i){var n=r*this.size+e;this.data[n]=t,i&&(this.reservedBit[n]=!0)};dr.prototype.get=function(r,e){return this.data[r*this.size+e]};dr.prototype.xor=function(r,e,t){this.data[r*this.size+e]^=t};dr.prototype.isReserved=function(r,e){return this.reservedBit[r*this.size+e]};var $u=dr,la={};(function(r){var e=_e.getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7],c=1;c<n-1;c++)a[c]=a[c-1]-o;return a.push(6),a.reverse()},r.getPositions=function(i){for(var n=[],s=r.getRowColCoords(i),o=s.length,a=0;a<o;a++)for(var c=0;c<o;c++)a===0&&c===0||a===0&&c===o-1||a===o-1&&c===0||n.push([s[a],s[c]]);return n}})(la);var ua={},ku=_e.getSymbolSize,Kn=7;ua.getPositions=function(e){var t=ku(e);return[[0,0],[t-Kn,0],[0,t-Kn]]};var ha={};(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};r.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){for(var s=n.size,o=0,a=0,c=0,l=null,u=null,h=0;h<s;h++){a=c=0,l=u=null;for(var p=0;p<s;p++){var d=n.get(h,p);d===l?a++:(a>=5&&(o+=e.N1+(a-5)),l=d,a=1),d=n.get(p,h),d===u?c++:(c>=5&&(o+=e.N1+(c-5)),u=d,c=1)}a>=5&&(o+=e.N1+(a-5)),c>=5&&(o+=e.N1+(c-5))}return o},r.getPenaltyN2=function(n){for(var s=n.size,o=0,a=0;a<s-1;a++)for(var c=0;c<s-1;c++){var l=n.get(a,c)+n.get(a,c+1)+n.get(a+1,c)+n.get(a+1,c+1);(l===4||l===0)&&o++}return o*e.N2},r.getPenaltyN3=function(n){for(var s=n.size,o=0,a=0,c=0,l=0;l<s;l++){a=c=0;for(var u=0;u<s;u++)a=a<<1&2047|n.get(l,u),u>=10&&(a===1488||a===93)&&o++,c=c<<1&2047|n.get(u,l),u>=10&&(c===1488||c===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){for(var s=0,o=n.data.length,a=0;a<o;a++)s+=n.data[a];var c=Math.abs(Math.ceil(s*100/o/5)-10);return c*e.N4};function t(i,n,s){switch(i){case r.Patterns.PATTERN000:return(n+s)%2===0;case r.Patterns.PATTERN001:return n%2===0;case r.Patterns.PATTERN010:return s%3===0;case r.Patterns.PATTERN011:return(n+s)%3===0;case r.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case r.Patterns.PATTERN101:return n*s%2+n*s%3===0;case r.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case r.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.applyMask=function(n,s){for(var o=s.size,a=0;a<o;a++)for(var c=0;c<o;c++)s.isReserved(c,a)||s.xor(c,a,t(n,c,a))},r.getBestMask=function(n,s){for(var o=Object.keys(r.Patterns).length,a=0,c=1/0,l=0;l<o;l++){s(l),r.applyMask(l,n);var u=r.getPenaltyN1(n)+r.getPenaltyN2(n)+r.getPenaltyN3(n)+r.getPenaltyN4(n);r.applyMask(l,n),u<c&&(c=u,a=l)}return a}})(ha);var Jr={},rt=Hr,_r=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],br=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Jr.getBlocksCount=function(e,t){switch(t){case rt.L:return _r[(e-1)*4+0];case rt.M:return _r[(e-1)*4+1];case rt.Q:return _r[(e-1)*4+2];case rt.H:return _r[(e-1)*4+3];default:return}};Jr.getTotalCodewordsCount=function(e,t){switch(t){case rt.L:return br[(e-1)*4+0];case rt.M:return br[(e-1)*4+1];case rt.Q:return br[(e-1)*4+2];case rt.H:return br[(e-1)*4+3];default:return}};var da={},Gr={},fa=ct,er=fa.alloc(512),$r=fa.alloc(256);(function(){for(var e=1,t=0;t<255;t++)er[t]=e,$r[e]=t,e<<=1,e&256&&(e^=285);for(t=255;t<512;t++)er[t]=er[t-255]})();Gr.log=function(e){if(e<1)throw new Error("log("+e+")");return $r[e]};Gr.exp=function(e){return er[e]};Gr.mul=function(e,t){return e===0||t===0?0:er[$r[e]+$r[t]]};(function(r){var e=ct,t=Gr;r.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),a=0;a<n.length;a++)for(var c=0;c<s.length;c++)o[a+c]^=t.mul(n[a],s[c]);return o},r.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var a=o[0],c=0;c<s.length;c++)o[c]^=t.mul(s[c],a);for(var l=0;l<o.length&&o[l]===0;)l++;o=o.slice(l)}return o},r.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=r.mul(s,[1,t.exp(o)]);return s}})(da);var Vn=ct,pa=da,Mu=E.bufferPolyfill.Buffer;function cn(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}cn.prototype.initialize=function(e){this.degree=e,this.genPoly=pa.generateECPolynomial(this.degree)};cn.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var t=Vn.alloc(this.degree),i=Mu.concat([e,t],e.length+this.degree),n=pa.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=Vn.alloc(this.degree);return n.copy(o,s),o}return n};var Lu=cn,ga={},lt={},ln={};ln.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var ze={},ya="[0-9]+",Du="[A-Z $%*+\\-./:]+",sr="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";sr=sr.replace(/u/g,"\\u");var Fu="(?:(?![A-Z0-9 $%*+\\-./:]|"+sr+`)(?:.|[\r
2
2
  ]))+`;ze.KANJI=new RegExp(sr,"g");ze.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");ze.BYTE=new RegExp(Fu,"g");ze.NUMERIC=new RegExp(ya,"g");ze.ALPHANUMERIC=new RegExp(Du,"g");var qu=new RegExp("^"+sr+"$"),Bu=new RegExp("^"+ya+"$"),Uu=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");ze.testKanji=function(e){return qu.test(e)};ze.testNumeric=function(e){return Bu.test(e)};ze.testAlphanumeric=function(e){return Uu.test(e)};(function(r){var e=ln,t=ze;r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");var s=n.toLowerCase();switch(s){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}})(lt);(function(r){var e=_e,t=Jr,i=Hr,n=lt,s=ln,o=rn,a=7973,c=e.getBCHDigit(a);function l(d,f,g){for(var y=1;y<=40;y++)if(f<=r.getCapacity(y,g,d))return y}function u(d,f){return n.getCharCountIndicator(d,f)+4}function h(d,f){var g=0;return d.forEach(function(y){var m=u(y.mode,f);g+=m+y.getBitsLength()}),g}function p(d,f){for(var g=1;g<=40;g++){var y=h(d,g);if(y<=r.getCapacity(g,f,n.MIXED))return g}}r.from=function(f,g){return s.isValid(f)?parseInt(f,10):g},r.getCapacity=function(f,g,y){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=n.BYTE);var m=e.getSymbolTotalCodewords(f),v=t.getTotalCodewordsCount(f,g),b=(m-v)*8;if(y===n.MIXED)return b;var w=b-u(y,f);switch(y){case n.NUMERIC:return Math.floor(w/10*3);case n.ALPHANUMERIC:return Math.floor(w/11*2);case n.KANJI:return Math.floor(w/13);case n.BYTE:default:return Math.floor(w/8)}},r.getBestVersionForData=function(f,g){var y,m=i.from(g,i.M);if(o(f)){if(f.length>1)return p(f,m);if(f.length===0)return 1;y=f[0]}else y=f;return l(y.mode,y.getLength(),m)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");for(var g=f<<12;e.getBCHDigit(g)-c>=0;)g^=a<<e.getBCHDigit(g)-c;return f<<12|g}})(ga);var ma={},ki=_e,va=1335,ju=21522,Wn=ki.getBCHDigit(va);ma.getEncodedBits=function(e,t){for(var i=e.bit<<3|t,n=i<<10;ki.getBCHDigit(n)-Wn>=0;)n^=va<<ki.getBCHDigit(n)-Wn;return(i<<10|n)^ju};var wa={},zu=lt;function Ct(r){this.mode=zu.NUMERIC,this.data=r.toString()}Ct.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Ct.prototype.getLength=function(){return this.data.length};Ct.prototype.getBitsLength=function(){return Ct.getBitsLength(this.data.length)};Ct.prototype.write=function(e){var t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),e.put(n,10);var s=this.data.length-t;s>0&&(i=this.data.substr(t),n=parseInt(i,10),e.put(n,s*3+1))};var Ku=Ct,Vu=lt,hi=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Ot(r){this.mode=Vu.ALPHANUMERIC,this.data=r}Ot.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Ot.prototype.getLength=function(){return this.data.length};Ot.prototype.getBitsLength=function(){return Ot.getBitsLength(this.data.length)};Ot.prototype.write=function(e){var t;for(t=0;t+2<=this.data.length;t+=2){var i=hi.indexOf(this.data[t])*45;i+=hi.indexOf(this.data[t+1]),e.put(i,11)}this.data.length%2&&e.put(hi.indexOf(this.data[t]),6)};var Wu=Ot,Hu=ct,Ju=lt;function $t(r){this.mode=Ju.BYTE,this.data=Hu.from(r)}$t.getBitsLength=function(e){return e*8};$t.prototype.getLength=function(){return this.data.length};$t.prototype.getBitsLength=function(){return $t.getBitsLength(this.data.length)};$t.prototype.write=function(r){for(var e=0,t=this.data.length;e<t;e++)r.put(this.data[e],8)};var Gu=$t,Yu=lt,Qu=_e;function kt(r){this.mode=Yu.KANJI,this.data=r}kt.getBitsLength=function(e){return e*13};kt.prototype.getLength=function(){return this.data.length};kt.prototype.getBitsLength=function(){return kt.getBitsLength(this.data.length)};kt.prototype.write=function(r){var e;for(e=0;e<this.data.length;e++){var t=Qu.toSJIS(this.data[e]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
3
  Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),r.put(t,13)}};var Xu=kt;(function(r){var e=lt,t=Ku,i=Wu,n=Gu,s=Xu,o=ze,a=_e,c=gl.dijkstraExports;function l(m){return unescape(encodeURIComponent(m)).length}function u(m,v,b){for(var w=[],S;(S=m.exec(b))!==null;)w.push({data:S[0],index:S.index,mode:v,length:S[0].length});return w}function h(m){var v=u(o.NUMERIC,e.NUMERIC,m),b=u(o.ALPHANUMERIC,e.ALPHANUMERIC,m),w,S;a.isKanjiModeEnabled()?(w=u(o.BYTE,e.BYTE,m),S=u(o.KANJI,e.KANJI,m)):(w=u(o.BYTE_KANJI,e.BYTE,m),S=[]);var x=v.concat(b,w,S);return x.sort(function(P,A){return P.index-A.index}).map(function(P){return{data:P.data,mode:P.mode,length:P.length}})}function p(m,v){switch(v){case e.NUMERIC:return t.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function d(m){return m.reduce(function(v,b){var w=v.length-1>=0?v[v.length-1]:null;return w&&w.mode===b.mode?(v[v.length-1].data+=b.data,v):(v.push(b),v)},[])}function f(m){for(var v=[],b=0;b<m.length;b++){var w=m[b];switch(w.mode){case e.NUMERIC:v.push([w,{data:w.data,mode:e.ALPHANUMERIC,length:w.length},{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.ALPHANUMERIC:v.push([w,{data:w.data,mode:e.BYTE,length:w.length}]);break;case e.KANJI:v.push([w,{data:w.data,mode:e.BYTE,length:l(w.data)}]);break;case e.BYTE:v.push([{data:w.data,mode:e.BYTE,length:l(w.data)}])}}return v}function g(m,v){for(var b={},w={start:{}},S=["start"],x=0;x<m.length;x++){for(var P=m[x],A=[],C=0;C<P.length;C++){var O=P[C],$=""+x+C;A.push($),b[$]={node:O,lastCount:0},w[$]={};for(var D=0;D<S.length;D++){var k=S[D];b[k]&&b[k].node.mode===O.mode?(w[k][$]=p(b[k].lastCount+O.length,O.mode)-p(b[k].lastCount,O.mode),b[k].lastCount+=O.length):(b[k]&&(b[k].lastCount=O.length),w[k][$]=p(O.length,O.mode)+4+e.getCharCountIndicator(O.mode,v))}}S=A}for(D=0;D<S.length;D++)w[S[D]].end=0;return{map:w,table:b}}function y(m,v){var b,w=e.getBestModeForData(m);if(b=e.from(v,w),b!==e.BYTE&&b.bit<w.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(b)+`.
4
4
  Suggested mode is: `+e.toString(w));switch(b===e.KANJI&&!a.isKanjiModeEnabled()&&(b=e.BYTE),b){case e.NUMERIC:return new t(m);case e.ALPHANUMERIC:return new i(m);case e.KANJI:return new s(m);case e.BYTE:return new n(m)}}r.fromArray=function(v){return v.reduce(function(b,w){return typeof w=="string"?b.push(y(w,null)):w.data&&b.push(y(w.data,w.mode)),b},[])},r.fromString=function(v,b){for(var w=h(v,a.isKanjiModeEnabled()),S=f(w),x=g(S,b),P=c.find_path(x.map,"start","end"),A=[],C=1;C<P.length-1;C++)A.push(x.table[P[C]].node);return r.fromArray(d(A))},r.rawSplit=function(v){return r.fromArray(h(v,a.isKanjiModeEnabled()))}})(wa);var Hn=ct,Yr=_e,di=Hr,Zu=Ou,eh=$u,th=la,rh=ua,Mi=ha,Li=Jr,ih=Lu,kr=ga,nh=ma,sh=lt,fi=wa,oh=rn;function ah(r,e){for(var t=r.size,i=rh.getPositions(e),n=0;n<i.length;n++)for(var s=i[n][0],o=i[n][1],a=-1;a<=7;a++)if(!(s+a<=-1||t<=s+a))for(var c=-1;c<=7;c++)o+c<=-1||t<=o+c||(a>=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?r.set(s+a,o+c,!0,!0):r.set(s+a,o+c,!1,!0))}function ch(r){for(var e=r.size,t=8;t<e-8;t++){var i=t%2===0;r.set(t,6,i,!0),r.set(6,t,i,!0)}}function lh(r,e){for(var t=th.getPositions(e),i=0;i<t.length;i++)for(var n=t[i][0],s=t[i][1],o=-2;o<=2;o++)for(var a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?r.set(n+o,s+a,!0,!0):r.set(n+o,s+a,!1,!0)}function uh(r,e){for(var t=r.size,i=kr.getEncodedBits(e),n,s,o,a=0;a<18;a++)n=Math.floor(a/3),s=a%3+t-8-3,o=(i>>a&1)===1,r.set(n,s,o,!0),r.set(s,n,o,!0)}function pi(r,e,t){var i=r.size,n=nh.getEncodedBits(e,t),s,o;for(s=0;s<15;s++)o=(n>>s&1)===1,s<6?r.set(s,8,o,!0):s<8?r.set(s+1,8,o,!0):r.set(i-15+s,8,o,!0),s<8?r.set(8,i-s-1,o,!0):s<9?r.set(8,15-s-1+1,o,!0):r.set(8,15-s-1,o,!0);r.set(i-8,8,1,!0)}function hh(r,e){for(var t=r.size,i=-1,n=t-1,s=7,o=0,a=t-1;a>0;a-=2)for(a===6&&a--;;){for(var c=0;c<2;c++)if(!r.isReserved(n,a-c)){var l=!1;o<e.length&&(l=(e[o]>>>s&1)===1),r.set(n,a-c,l),s--,s===-1&&(o++,s=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function dh(r,e,t){var i=new Zu;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),sh.getCharCountIndicator(l.mode,r)),l.write(i)});var n=Yr.getSymbolTotalCodewords(r),s=Li.getTotalCodewordsCount(r,e),o=(n-s)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);for(var a=(o-i.getLengthInBits())/8,c=0;c<a;c++)i.put(c%2?17:236,8);return fh(i,r,e)}function fh(r,e,t){for(var i=Yr.getSymbolTotalCodewords(e),n=Li.getTotalCodewordsCount(e,t),s=i-n,o=Li.getBlocksCount(e,t),a=i%o,c=o-a,l=Math.floor(i/o),u=Math.floor(s/o),h=u+1,p=l-u,d=new ih(p),f=0,g=new Array(o),y=new Array(o),m=0,v=Hn.from(r.buffer),b=0;b<o;b++){var w=b<c?u:h;g[b]=v.slice(f,f+w),y[b]=d.encode(g[b]),f+=w,m=Math.max(m,w)}var S=Hn.alloc(i),x=0,P,A;for(P=0;P<m;P++)for(A=0;A<o;A++)P<g[A].length&&(S[x++]=g[A][P]);for(P=0;P<p;P++)for(A=0;A<o;A++)S[x++]=y[A][P];return S}function ph(r,e,t,i){var n;if(oh(r))n=fi.fromArray(r);else if(typeof r=="string"){var s=e;if(!s){var o=fi.rawSplit(r);s=kr.getBestVersionForData(o,t)}n=fi.fromString(r,s||40)}else throw new Error("Invalid data");var a=kr.getBestVersionForData(n,t);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=a;else if(e<a)throw new Error(`
@@ -1,9 +1,9 @@
1
- import { ct as Wl, V as R, cr as sa, aD as Hl, X as oa, c5 as L, ae as Jl, ai as Gl } from "./index-CaNzAG1x.mjs";
1
+ import { ct as Wl, V as R, cr as sa, aD as Hl, X as oa, c5 as L, ae as Jl, ai as Gl } from "./index-DiGgidBd.mjs";
2
2
  import { d as Yl } from "./dijkstra-BZM-8g-B.mjs";
3
- import { e as He, s as aa } from "./events-hPS-mKjU.mjs";
4
- import { c as I, a as Ye } from "./index-nWaQESZp.mjs";
5
- import { r as Ql, a as It, g as xt, i as qe, b as ni, I as Rt, f as Ce, t as fe, w as Hi, c as Si, C as Xl, d as Zl, e as ns, h as eu, j as tu, k as vn, p as ru, l as wn, A as iu, E as pe, m as nu, y as be, P as ss, Q as su, n as ou, T as ca, o as _n, q as bn, s as Qe, _ as au, u as vt } from "./index-MxqIZiRX.mjs";
6
- import { s as la, a as Re, h as ua, L as cu, d as nr, l as lu, e as Ii, g as uu, i as os, k as hu } from "./index-BKBGPzmc.mjs";
3
+ import { e as He, s as aa } from "./events-Cx0TtMEs.mjs";
4
+ import { c as I, a as Ye } from "./index-DH7AJ70P.mjs";
5
+ import { r as Ql, a as It, g as xt, i as qe, b as ni, I as Rt, f as Ce, t as fe, w as Hi, c as Si, C as Xl, d as Zl, e as ns, h as eu, j as tu, k as vn, p as ru, l as wn, A as iu, E as pe, m as nu, y as be, P as ss, Q as su, n as ou, T as ca, o as _n, q as bn, s as Qe, _ as au, u as vt } from "./index-BxXt3T2L.mjs";
6
+ import { s as la, a as Re, h as ua, L as cu, d as nr, l as lu, e as Ii, g as uu, i as os, k as hu } from "./index-Cfoq6joM.mjs";
7
7
  let du = class extends Ql {
8
8
  constructor(e) {
9
9
  super(e), this.events = new He.EventEmitter(), this.hasRegisteredEventListeners = !1, this.connection = this.setConnection(e), this.connection.connected && this.registerEventListeners();
@@ -1,7 +1,7 @@
1
1
  var Z = Object.defineProperty;
2
2
  var j = (t, e, s) => e in t ? Z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var y = (t, e, s) => j(t, typeof e != "symbol" ? e + "" : e, s);
4
- import { ae as u, a_ as Y, a$ as I, b0 as x, b1 as ee, b2 as ne, b3 as se, V as M, bP as O, bH as ae, bU as E, bV as N, cb as B, c5 as _, bv as U, r as te, f as b, e as ie, bw as D, ai as T, bu as re, at as me, bx as R, ca as oe, bj as ue, g as le } from "./index-CaNzAG1x.mjs";
4
+ import { ae as u, a_ as Y, a$ as I, b0 as x, b1 as ee, b2 as ne, b3 as se, V as M, bP as O, bH as ae, bU as E, bV as N, cb as B, c5 as _, bv as U, r as te, f as b, e as ie, bw as D, ai as T, bu as re, at as me, bx as R, ca as oe, bj as ue, g as le } from "./index-DiGgidBd.mjs";
5
5
  const h = new u("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
6
6
  new u("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
7
7
  const A = new u("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
@@ -1,9 +1,9 @@
1
1
  var A = Object.defineProperty;
2
2
  var B = (d, e, s) => e in d ? A(d, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[e] = s;
3
3
  var o = (d, e, s) => B(d, typeof e != "symbol" ? e + "" : e, s);
4
- import { N as g, l as p, O as w, P as u } from "./chunk-IMTC3J2M-Bm_KxGLU.mjs";
5
- import { cj as S, bw as I, bu as U, bD as D, r as f, bv as l, bx as T, bj as R } from "./index-CaNzAG1x.mjs";
6
- import { A as E } from "./aptos-7dMQQEIW.mjs";
4
+ import { N as g, l as p, O as w, P as u } from "./chunk-IMTC3J2M-CVDcZzUA.mjs";
5
+ import { cj as S, bw as I, bu as U, bD as D, r as f, bv as l, bx as T, bj as R } from "./index-DiGgidBd.mjs";
6
+ import { A as E } from "./aptos-D7c67ZLW.mjs";
7
7
  import { A as $ } from "./unsignedTransaction-BDOQhqcZ.mjs";
8
8
  const N = [
9
9
  [
@@ -1,4 +1,4 @@
1
- import { c5 as J, cv as Z } from "./index-CaNzAG1x.mjs";
1
+ import { c5 as J, cv as Z } from "./index-DiGgidBd.mjs";
2
2
  const j = "logger/5.7.0";
3
3
  let F = !1, k = !1;
4
4
  const U = { debug: 1, default: 2, info: 2, warning: 3, error: 4, off: 5 };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CUR8Z8Cf.js"),ko=require("./dijkstra-CtFxn7S9.js"),Mo=require("./index-BEhe2aRM.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-BD2_PLZI.js"),ko=require("./dijkstra-CtFxn7S9.js"),Mo=require("./index-DP4LajXh.js");/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause