@web3mq/dapp-connect-react
Version:
DappConnect-react-components
9 lines • 56.4 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("react-dom"),n=require("@web3mq/dapp-connect");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(t);function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t,e){return t(e={exports:{}},e.exports),e.exports}var l=a((function(t){
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&t.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var l in o)e.call(o,l)&&o[l]&&t.push(l);else t.push(o.toString())}}return t.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n}()})),u="index_loadingContainer__fzCYD",c="index_defaultLoading__Cwu15",s="index_spinLoading__9GSw1",d=function(e){var n=e.type,r=e.className,i=void 0===r?"":r,a=e.style,d=void 0===a?{}:a,f=t.useCallback((function(){return"spin"===n?o.default.createElement("div",{className:s},o.default.createElement("div",null),o.default.createElement("div",null),o.default.createElement("div",null)):o.default.createElement("div",{className:c})}),[n]);return o.default.createElement("div",{style:d,className:l(i,u)},o.default.createElement(f,null))},f=i(a((function(t){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports}))),h=a((function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}));i(h);var p=a((function(t){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports}));i(p);var m=a((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports}));i(m);var g=a((function(t){t.exports=function(t,e){if(t){if("string"==typeof t)return m(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}));i(g);var v=a((function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}));i(v);var y,E,w=i(a((function(t){t.exports=function(t,e){return h(t)||p(t,e)||g(t,e)||v()},t.exports.__esModule=!0,t.exports.default=t.exports})));exports.StepStringEnum=void 0,(y=exports.StepStringEnum||(exports.StepStringEnum={})).QR_CODE="qr_code",y.CONNECT_LOADING="connect_loading",y.CONNECT_ERROR="connect_error",exports.AppTypeEnum=void 0,(E=exports.AppTypeEnum||(exports.AppTypeEnum={})).pc="pc",E.h5="h5",E.mobile="mobile";var C=o.default.createContext(void 0),x=function(t){var e=t.children,n=t.value;return o.default.createElement(C.Provider,{value:n},e)},_=function(e){var n=t.useContext(C);return n||(console.warn("The useChatContext hook was called outside of the ChatContext provider. Make sure this hook is called within a child of the Chat component. The errored call is located in the ".concat(e," component.")),{})},b=function(t){return o.default.createElement("div",t,o.default.createElement("svg",{width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.292893 0.792893C0.683418 0.402369 1.31658 0.402369 1.70711 0.792893L7 6.08579L12.2929 0.792894C12.6834 0.40237 13.3166 0.40237 13.7071 0.792894C14.0976 1.18342 14.0976 1.81658 13.7071 2.20711L8.41421 7.5L13.7071 12.7929C14.0976 13.1834 14.0976 13.8166 13.7071 14.2071C13.3166 14.5976 12.6834 14.5976 12.2929 14.2071L7 8.91421L1.70711 14.2071C1.31658 14.5976 0.683418 14.5976 0.292893 14.2071C-0.0976311 13.8166 -0.0976311 13.1834 0.292893 12.7929L5.58579 7.5L0.292893 2.20711C-0.0976311 1.81658 -0.0976311 1.18342 0.292893 0.792893Z",fill:"#18181B"})))},N=function(t){return o.default.createElement("div",t,o.default.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.9998 39.2001C30.6037 39.2001 39.1998 30.6039 39.1998 20C39.1998 9.39618 30.6037 0.800049 19.9998 0.800049C9.39594 0.800049 0.799805 9.39618 0.799805 20C0.799805 30.6039 9.39594 39.2001 19.9998 39.2001ZM16.8969 13.503C15.9596 12.5657 14.44 12.5657 13.5027 13.503C12.5655 14.4403 12.5655 15.9598 13.5027 16.8971L16.6057 20L13.5027 23.103C12.5655 24.0403 12.5655 25.5598 13.5027 26.4971C14.44 27.4344 15.9596 27.4344 16.8969 26.4971L19.9998 23.3942L23.1027 26.4971C24.04 27.4344 25.5596 27.4344 26.4969 26.4971C27.4341 25.5598 27.4341 24.0403 26.4969 23.103L23.3939 20L26.4969 16.8971C27.4341 15.9598 27.4341 14.4403 26.4969 13.503C25.5596 12.5657 24.04 12.5657 23.1027 13.503L19.9998 16.6059L16.8969 13.503Z",fill:"#EF4343"})))},M=function(t){return o.default.createElement("div",t,o.default.createElement("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M39.2001 19.9998C39.2001 30.6037 30.6039 39.1998 20 39.1998C9.39618 39.1998 0.800049 30.6037 0.800049 19.9998C0.800049 9.39594 9.39618 0.799805 20 0.799805C30.6039 0.799805 39.2001 9.39594 39.2001 19.9998ZM22.4001 29.5998C22.4001 30.9253 21.3255 31.9998 20 31.9998C18.6746 31.9998 17.6 30.9253 17.6 29.5998C17.6 28.2743 18.6746 27.1998 20 27.1998C21.3255 27.1998 22.4001 28.2743 22.4001 29.5998ZM20 7.9998C18.6746 7.9998 17.6 9.07432 17.6 10.3998V19.9998C17.6 21.3253 18.6746 22.3998 20 22.3998C21.3255 22.3998 22.4 21.3253 22.4 19.9998V10.3998C22.4 9.07432 21.3255 7.9998 20 7.9998Z",fill:"#E7B008"})))},B=function(t){return o.default.createElement("div",t,o.default.createElement("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1.33297C0 0.596588 0.596954 -0.000366211 1.33333 -0.000366211H2.66667C3.40305 -0.000366211 4 0.596588 4 1.33297V2.6663C4 3.40268 3.40305 3.99963 2.66667 3.99963H1.33333C0.596954 3.99963 0 3.40268 0 2.6663V1.33297ZM2.66667 1.33297H1.33333V2.6663H2.66667V1.33297ZM6 -0.000366211C6.36819 -0.000366211 6.66667 0.298111 6.66667 0.6663V1.33297C6.66667 1.70116 6.36819 1.99963 6 1.99963C5.63181 1.99963 5.33333 1.70116 5.33333 1.33297V0.6663C5.33333 0.298111 5.63181 -0.000366211 6 -0.000366211ZM8 1.33297C8 0.596588 8.59695 -0.000366211 9.33333 -0.000366211H10.6667C11.403 -0.000366211 12 0.596588 12 1.33297V2.6663C12 3.40268 11.403 3.99963 10.6667 3.99963H9.33333C8.59695 3.99963 8 3.40268 8 2.6663V1.33297ZM10.6667 1.33297H9.33333V2.6663H10.6667V1.33297ZM6 3.33297C6.36819 3.33297 6.66667 3.63144 6.66667 3.99963V5.33297H8.67333C9.04152 5.33297 9.34 5.63144 9.34 5.99963C9.34 6.36782 9.04152 6.6663 8.67333 6.6663H6C5.63181 6.6663 5.33333 6.36782 5.33333 5.99963V3.99963C5.33333 3.63144 5.63181 3.33297 6 3.33297ZM0 5.99963C0 5.63144 0.298477 5.33297 0.666667 5.33297H3.33333C3.70152 5.33297 4 5.63144 4 5.99963C4 6.36782 3.70152 6.6663 3.33333 6.6663H0.666667C0.298477 6.6663 0 6.36782 0 5.99963ZM10.6667 5.99963C10.6667 5.63144 10.9651 5.33297 11.3333 5.33297H11.34C11.7082 5.33297 12.0067 5.63144 12.0067 5.99963C12.0067 6.36782 11.7082 6.6663 11.34 6.6663H11.3333C10.9651 6.6663 10.6667 6.36782 10.6667 5.99963ZM0 9.33297C0 8.59659 0.596954 7.99963 1.33333 7.99963H2.66667C3.40305 7.99963 4 8.59659 4 9.33297V10.6663C4 11.4027 3.40305 11.9996 2.66667 11.9996H1.33333C0.596954 11.9996 0 11.4027 0 10.6663V9.33297ZM2.66667 9.33297H1.33333V10.6663H2.66667V9.33297ZM5.33333 8.6663C5.33333 8.29811 5.63181 7.99963 6 7.99963H7.33333C7.70152 7.99963 8 8.29811 8 8.6663C8 9.03449 7.70152 9.33297 7.33333 9.33297H6.66667V11.333C6.66667 11.7012 6.36819 11.9996 6 11.9996C5.63181 11.9996 5.33333 11.7012 5.33333 11.333V8.6663ZM9.33333 8.6663C9.33333 8.29811 9.63181 7.99963 10 7.99963H11.3333C11.7015 7.99963 12 8.29811 12 8.6663C12 9.03449 11.7015 9.33297 11.3333 9.33297H10C9.63181 9.33297 9.33333 9.03449 9.33333 8.6663ZM8 11.333C8 10.9648 8.29848 10.6663 8.66667 10.6663H11.3333C11.7015 10.6663 12 10.9648 12 11.333C12 11.7012 11.7015 11.9996 11.3333 11.9996H8.66667C8.29848 11.9996 8 11.7012 8 11.333Z",fill:"#18181B"})))},A=function(t){return o.default.createElement("div",t,o.default.createElement("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.4338 3.06614C13.4575 2.08983 11.8746 2.08983 10.8982 3.06614L9.98191 3.98248C9.65647 4.30791 9.12883 4.30791 8.8034 3.98248C8.47796 3.65704 8.47796 3.1294 8.8034 2.80397L9.71974 1.88762C11.3469 0.26044 13.9851 0.26044 15.6123 1.88762C17.2395 3.51481 17.2395 6.153 15.6123 7.78018L12.279 11.1135C10.6518 12.7407 8.01359 12.7407 6.3864 11.1135C6.06097 10.7881 6.06097 10.2604 6.3864 9.935C6.71184 9.60957 7.23948 9.60957 7.56492 9.935C8.54123 10.9113 10.1241 10.9113 11.1004 9.935L14.4338 6.60167C15.4101 5.62536 15.4101 4.04245 14.4338 3.06614ZM9.43378 8.06614C8.45747 7.08983 6.87456 7.08983 5.89825 8.06614L2.56492 11.3995C1.5886 12.3758 1.5886 13.9587 2.56492 14.935C3.54123 15.9113 5.12414 15.9113 6.10045 14.935L7.01842 14.017C7.34386 13.6916 7.87149 13.6916 8.19693 14.017C8.52237 14.3425 8.52237 14.8701 8.19693 15.1955L7.27896 16.1135C5.65178 17.7407 3.01359 17.7407 1.3864 16.1135C-0.240781 14.4863 -0.240781 11.8481 1.3864 10.221L4.71974 6.88763C6.34692 5.26044 8.98511 5.26044 10.6123 6.88762C10.9377 7.21306 10.9377 7.7407 10.6123 8.06614C10.2869 8.39157 9.75922 8.39157 9.43378 8.06614Z",fill:"white"})))},L=function(t){return o.default.createElement("div",t,o.default.createElement("svg",{width:"54",height:"47",viewBox:"0 0 54 47",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.8005 0.701608C15.0699 -0.0451104 16.7043 0.378624 17.451 1.64805L41.7548 42.9645C42.5016 44.2339 42.0778 45.8683 40.8084 46.615C39.539 47.3618 37.9046 46.938 37.1579 45.6686L12.8541 4.35215C12.1073 3.08273 12.5311 1.44833 13.8005 0.701608ZM0.333984 21.8355C0.333984 15.3293 5.60834 10.055 12.1146 10.055C13.5873 10.055 14.7812 11.2489 14.7812 12.7216C14.7812 14.1944 13.5873 15.3883 12.1146 15.3883C8.55385 15.3883 5.66732 18.2748 5.66732 21.8355V24.8735C5.66732 28.7698 8.82588 31.9284 12.7222 31.9284H23.0513C24.524 31.9284 25.718 33.1223 25.718 34.595C25.718 36.0678 24.524 37.2617 23.0513 37.2617H12.7222C5.88036 37.2617 0.333984 31.7153 0.333984 24.8735V21.8355ZM28.2834 12.7216C28.2834 11.2489 29.4773 10.055 30.95 10.055H41.2791C48.1209 10.055 53.6673 15.6013 53.6673 22.4431V25.4811C53.6673 31.9874 48.393 37.2617 41.8867 37.2617C40.414 37.2617 39.2201 36.0678 39.2201 34.595C39.2201 33.1223 40.414 31.9284 41.8867 31.9284C45.4474 31.9284 48.334 29.0418 48.334 25.4811V22.4431C48.334 18.5468 45.1754 15.3883 41.2791 15.3883H30.95C29.4773 15.3883 28.2834 14.1944 28.2834 12.7216ZM10.0555 23.6583C10.0555 22.1856 11.2494 20.9917 12.7222 20.9917H17.5829C19.0557 20.9917 20.2496 22.1856 20.2496 23.6583C20.2496 25.1311 19.0557 26.325 17.5829 26.325H12.7222C11.2494 26.325 10.0555 25.1311 10.0555 23.6583ZM34.3593 23.6583C34.3593 22.1856 35.5532 20.9917 37.026 20.9917H41.8867C43.3595 20.9917 44.5534 22.1856 44.5534 23.6583C44.5534 25.1311 43.3595 26.325 41.8867 26.325H37.026C35.5532 26.325 34.3593 25.1311 34.3593 23.6583Z",fill:"#663CEE"})))},T={modal:"index_modal__8hqpA",dialog:"index_dialog__-CY4G",mobileStyle:"index_mobileStyle__PXyyW",titleContainer:"index_titleContainer__Zh5W-",title:"index_title__slMUl",closeBtn:"index_closeBtn__wSgXt",leftBtn:"index_leftBtn__3ROua",enter:"index_enter__yf535",enterActive:"index_enterActive__JlTE1",enterDone:"index_enterDone__Uc1Qk",exit:"index_exit__j7YTj",exitActive:"index_exitActive__0X18R",exitDone:"index_exitDone__Czhm6",contentEnter:"index_contentEnter__vObje",contentEnterActive:"index_contentEnterActive__--0so",contentEnterDone:"index_contentEnterDone__NmBEt",contentExit:"index_contentExit__j47VF",contentExitActive:"index_contentExitActive__FIRqW",contentExitDone:"index_contentExitDone__MPb9B"},R=o.default.memo((function(n){var r=n.visible,i=n.appType,a=void 0===i?exports.AppTypeEnum.pc:i,u=n.closeModal,c=n.containerId,s=void 0===c?"":c,d=n.modalHeader,h=n.leftBtn,p=void 0===h?null:h,m=n.children,g=n.style,v=void 0===g?{}:g,y=n.className,E=void 0===y?"":y,C=n.title,x=void 0===C?"":C,_=n.dialogClassName,N=void 0===_?"":_,M=t.useState(!1),B=w(M,2),A=B[0],L=B[1],R=t.useState(""),S=w(R,2),I=S[0],P=S[1],k=t.useState(""),H=w(k,2),O=H[0],U=H[1],q=t.useRef(window.getComputedStyle(document.body).overflow);t.useEffect((function(){return r?(document.body.style.overflow="hidden",L(!0),P("enter"),U("contentEnter"),setTimeout((function(){P("enterActive"),U("contentEnterActive")}))):(document.body.style.overflow=q.current,P("exit"),U("contentExit"),setTimeout((function(){P("exitActive"),U("contentExitActive")}))),function(){document.body.style.overflow=q.current}}),[r]);return r||A?e.createPortal(o.default.createElement("div",{style:v,className:l(T.modal,T[I],E),onTransitionEnd:function(){P(r?"enterDone":"exitDone"),U(r?"contentEnterDone":"contentExitDone"),r||L(!1)},onClick:function(t){t.target===t.currentTarget&&u()}},o.default.createElement("div",{className:l(T.dialog,N,T[O],f({},T.mobileStyle,a!==exports.AppTypeEnum.pc))},d||o.default.createElement("div",{className:T.titleContainer},o.default.createElement("div",{className:T.leftBtn},p),o.default.createElement("div",{className:T.title},x),o.default.createElement(b,{onClick:u,className:T.closeBtn})),m)),document.getElementById(s)||document.body):null})),S={"mq-btn":"index_mq-btn__0UGyk","mq-btn-icon":"index_mq-btn-icon__cQP-g","mq-btn-default":"index_mq-btn-default__fHGCj","mq-btn-primary":"index_mq-btn-primary__H-Gct","mq-btn-ghost":"index_mq-btn-ghost__z8qbB","mq-btn-danger":"index_mq-btn-danger__xKqGv","mq-btn-sm":"index_mq-btn-sm__24w-B","mq-btn-lg":"index_mq-btn-lg__in5g4","mq-btn-block":"index_mq-btn-block__zlh0E"},I={default:"",large:"lg",small:"sm"},P=function(t){var e,n=t.block,r=void 0!==n&&n,i=t.className,a=void 0===i?"":i,u=t.children,c=t.disabled,s=void 0!==c&&c,d=t.icon,h=t.size,p=void 0===h?"default":h,m=t.type,g=void 0===m?"default":m,v=t.onClick,y=void 0===v?function(){}:v,E=t.style,w=void 0===E?{}:E;return o.default.createElement("button",{className:l(S["mq-btn"],a,(e={},f(e,S["mq-btn-".concat(g)],g),f(e,S["mq-btn-".concat(I[p])],"default"!==p),f(e,S["mq-btn-block"],r),e)),style:w,disabled:s,onClick:function(t){return y(t)}},d&&o.default.createElement("span",{className:S["mq-btn-icon"]},d),o.default.createElement("span",null,u))},k=i(a((function(t){function e(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function l(t){e(a,o,i,l,u,"next",t)}function u(t){e(a,o,i,l,u,"throw",t)}l(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports}))),H=a((function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}));i(H);var O=a((function(t){var e=H.default;function n(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var r={},o=Object.prototype,i=o.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new M(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return A()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=d;var h={};function p(){}function m(){}function g(){}var v={};s(v,l,(function(){return this}));var y=Object.getPrototypeOf,E=y&&y(y(B([])));E&&E!==o&&i.call(E,l)&&(v=E);var w=g.prototype=p.prototype=Object.create(v);function C(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,n){function r(o,a,l,u){var c=f(t[o],t,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==e(d)&&i.call(d,"__await")?n.resolve(d.__await).then((function(t){r("next",t,l,u)}),(function(t){r("throw",t,l,u)})):n.resolve(d).then((function(t){s.value=t,l(s)}),(function(t){return r("throw",t,l,u)}))}u(c.arg)}var o;this._invoke=function(t,e){function i(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(i,i):i()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function B(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:A}}function A(){return{value:void 0,done:!0}}return m.prototype=g,s(w,"constructor",g),s(g,"constructor",m),m.displayName=s(g,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,s(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},C(x.prototype),s(x.prototype,u,(function(){return this})),r.AsyncIterator=x,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new x(d(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},C(w),s(w,c,"Generator"),s(w,l,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},r.values=B,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:B(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}));i(O);var U=O(),q=U;try{regeneratorRuntime=U}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=U:Function("r","regeneratorRuntime = r")(U)}var D="index-module_qrCodeBox__5XfOD",V="index-module_title__ZlTOv",j="index-module_imgBox__pZOlu",F="index-module_openLinkBox__2e3qM",Z="index-module_openLinkText__EQe-g",z="index-module_openLinkBtn__yLq2E",Y="index-module_warningText__qKg7f",Q=function(){var e=_(),n=e.qrCodeUrl,r=e.deepLink,i=e.appType,a=t.useState(0),u=w(a,2),c=u[0],s=u[1],f=t.useRef(60);return t.useEffect((function(){var t=setInterval((function(){clearInterval(t),!n||c>=f.current||s(c+1)}),1e3);return function(){clearInterval(t)}}),[c,n]),o.default.createElement("div",{className:l(D)},n?o.default.createElement("div",{className:V},o.default.createElement(B,{style:{lineHeight:"13px"}})," Scan with your ",o.default.createElement("span",null,"Web3MQ")):o.default.createElement("div",{className:V},"Connecting"),o.default.createElement("div",{className:j},n?o.default.createElement("img",{src:n,alt:""}):o.default.createElement(d,null)),i!==exports.AppTypeEnum.pc&&r&&o.default.createElement("div",{className:F},o.default.createElement("div",{className:Z},"Or open the link in the web3mq wallet"),o.default.createElement(P,{className:z,type:"primary",icon:o.default.createElement(A,null),onClick:function(){console.log(r,"deepLink");try{window.open(r)}catch(t){console.log("open Link error:",t)}}},"Open Link")),n&&c>=f.current&&o.default.createElement("div",{className:Y},"The wallet hasn't connected yet. Have you scanned the QR code? If so, double-check if there's an issue with your wallet."))},J={dappConnectModalHead:"index-module_dappConnectModalHead__7781g",title:"index-module_title__XmVue",backBtn:"index-module_backBtn__mZVn8",closeBtn:"index-module_closeBtn__Hk0na",dappConnectModalMobileHead:"index-module_dappConnectModalMobileHead__6b0aX",modalBody:"index-module_modalBody__o2iO9"},K=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then};let G;const W=[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];var X=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},$=function(t){return W[t]},tt=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},et=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');G=t},nt=function(){return void 0!==G},rt=function(t){return G(t)},ot=a((function(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}}));function it(){this.buffer=[],this.length=0}ot.L,ot.M,ot.Q,ot.H,ot.isValid,it.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var at=it;function lt(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}lt.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},lt.prototype.get=function(t,e){return this.data[t*this.size+e]},lt.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},lt.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var ut=lt,ct=a((function(t,e){const n=X;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,r=n(t),o=145===r?26:2*Math.ceil((r-13)/(2*e-2)),i=[r-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}}));ct.getRowColCoords,ct.getPositions;const st=X;var dt=function(t){const e=st(t);return[[0,0],[e-7,0],[0,e-7]]},ft=a((function(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,i=10;function a(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let r=0,o=0,i=0,a=null,l=null;for(let u=0;u<e;u++){o=i=0,a=l=null;for(let c=0;c<e;c++){let e=t.get(u,c);e===a?o++:(o>=5&&(r+=n+(o-5)),a=e,o=1),e=t.get(c,u),e===l?i++:(i>=5&&(r+=n+(i-5)),l=e,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return n*r},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,i=0;for(let o=0;o<e;o++){r=i=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,o),a>=10&&(1488===i||93===i)&&n++}return n*o},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*i},e.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,a(t,o,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}}));ft.Patterns,ft.isValid,ft.getPenaltyN1,ft.getPenaltyN2,ft.getPenaltyN3,ft.getPenaltyN4,ft.applyMask,ft.getBestMask;const ht=[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],pt=[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];var mt=function(t,e){switch(e){case ot.L:return ht[4*(t-1)+0];case ot.M:return ht[4*(t-1)+1];case ot.Q:return ht[4*(t-1)+2];case ot.H:return ht[4*(t-1)+3];default:return}},gt=function(t,e){switch(e){case ot.L:return pt[4*(t-1)+0];case ot.M:return pt[4*(t-1)+1];case ot.Q:return pt[4*(t-1)+2];case ot.H:return pt[4*(t-1)+3];default:return}};const vt=new Uint8Array(512),yt=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)vt[e]=t,yt[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)vt[t]=vt[t-255]}();var Et=function(t){return vt[t]},wt=function(t,e){return 0===t||0===e?0:vt[yt[t]+yt[e]]},Ct=a((function(t,e){e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let r=0;r<t.length;r++)for(let o=0;o<e.length;o++)n[r+o]^=wt(t[r],e[o]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let r=0;r<e.length;r++)n[r]^=wt(e[r],t);let r=0;for(;r<n.length&&0===n[r];)r++;n=n.slice(r)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let r=0;r<t;r++)n=e.mul(n,new Uint8Array([1,Et(r)]));return n}}));function xt(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}Ct.mul,Ct.mod,Ct.generateECPolynomial,xt.prototype.initialize=function(t){this.degree=t,this.genPoly=Ct.generateECPolynomial(this.degree)},xt.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=Ct.mod(e,this.genPoly),r=this.degree-n.length;if(r>0){const t=new Uint8Array(this.degree);return t.set(n,r),t}return n};var _t=xt,bt=function(t){return!isNaN(t)&&t>=1&&t<=40};let Nt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Nt=Nt.replace(/u/g,"\\u");const Mt="(?:(?![A-Z0-9 $%*+\\-./:]|"+Nt+")(?:.|[\r\n]))+";var Bt=new RegExp(Nt,"g"),At=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Lt=new RegExp(Mt,"g"),Tt=new RegExp("[0-9]+","g"),Rt=new RegExp("[A-Z $%*+\\-./:]+","g");const St=new RegExp("^"+Nt+"$"),It=new RegExp("^[0-9]+$"),Pt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");var kt={KANJI:Bt,BYTE_KANJI:At,BYTE:Lt,NUMERIC:Tt,ALPHANUMERIC:Rt,testKanji:function(t){return St.test(t)},testNumeric:function(t){return It.test(t)},testAlphanumeric:function(t){return Pt.test(t)}},Ht=a((function(t,e){e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!bt(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return kt.testNumeric(t)?e.NUMERIC:kt.testAlphanumeric(t)?e.ALPHANUMERIC:kt.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}}));Ht.NUMERIC,Ht.ALPHANUMERIC,Ht.BYTE,Ht.KANJI,Ht.MIXED,Ht.getCharCountIndicator,Ht.getBestModeForData,Ht.isValid;var Ot=a((function(t,e){const n=tt(7973);function r(t,e){return Ht.getCharCountIndicator(t,e)+4}function o(t,e){let n=0;return t.forEach((function(t){const o=r(t.mode,e);n+=o+t.getBitsLength()})),n}e.from=function(t,e){return bt(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!bt(t))throw new Error("Invalid QR Code version");void 0===n&&(n=Ht.BYTE);const o=8*($(t)-gt(t,e));if(n===Ht.MIXED)return o;const i=o-r(n,t);switch(n){case Ht.NUMERIC:return Math.floor(i/10*3);case Ht.ALPHANUMERIC:return Math.floor(i/11*2);case Ht.KANJI:return Math.floor(i/13);case Ht.BYTE:default:return Math.floor(i/8)}},e.getBestVersionForData=function(t,n){let r;const i=ot.from(n,ot.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(o(t,r)<=e.getCapacity(r,n,Ht.MIXED))return r}(t,i);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),i)},e.getEncodedBits=function(t){if(!bt(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;tt(e)-n>=0;)e^=7973<<tt(e)-n;return t<<12|e}}));Ot.getCapacity,Ot.getBestVersionForData,Ot.getEncodedBits;const Ut=tt(1335);var qt=function(t,e){const n=t.bit<<3|e;let r=n<<10;for(;tt(r)-Ut>=0;)r^=1335<<tt(r)-Ut;return 21522^(n<<10|r)};function Dt(t){this.mode=Ht.NUMERIC,this.data=t.toString()}Dt.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},Dt.prototype.getLength=function(){return this.data.length},Dt.prototype.getBitsLength=function(){return Dt.getBitsLength(this.data.length)},Dt.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))};var Vt=Dt;const jt=["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 Ft(t){this.mode=Ht.ALPHANUMERIC,this.data=t}Ft.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},Ft.prototype.getLength=function(){return this.data.length},Ft.prototype.getBitsLength=function(){return Ft.getBitsLength(this.data.length)},Ft.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*jt.indexOf(this.data[e]);n+=jt.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(jt.indexOf(this.data[e]),6)};var Zt=Ft;function zt(t){this.mode=Ht.BYTE,"string"==typeof t&&(t=function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t.charCodeAt(r);if(o>=55296&&o<=56319&&n>r+1){var i=t.charCodeAt(r+1);i>=56320&&i<=57343&&(o=1024*(o-55296)+i-56320+65536,r+=1)}o<128?e.push(o):o<2048?(e.push(o>>6|192),e.push(63&o|128)):o<55296||o>=57344&&o<65536?(e.push(o>>12|224),e.push(o>>6&63|128),e.push(63&o|128)):o>=65536&&o<=1114111?(e.push(o>>18|240),e.push(o>>12&63|128),e.push(o>>6&63|128),e.push(63&o|128)):e.push(239,191,189)}return new Uint8Array(e).buffer}(t)),this.data=new Uint8Array(t)}zt.getBitsLength=function(t){return 8*t},zt.prototype.getLength=function(){return this.data.length},zt.prototype.getBitsLength=function(){return zt.getBitsLength(this.data.length)},zt.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)};var Yt=zt;function Qt(t){this.mode=Ht.KANJI,this.data=t}Qt.getBitsLength=function(t){return 13*t},Qt.prototype.getLength=function(){return this.data.length},Qt.prototype.getBitsLength=function(){return Qt.getBitsLength(this.data.length)},Qt.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=rt(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}};var Jt=Qt,Kt=a((function(t){var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,l,u,c,s,d,f,h=e.PriorityQueue.make();for(h.push(n,0);!h.empty();)for(u in l=(a=h.pop()).value,c=a.cost,s=t[l]||{})s.hasOwnProperty(u)&&(d=c+s[u],f=i[u],(void 0===i[u]||f>d)&&(i[u]=d,h.push(u,d),o[u]=l));if(void 0!==r&&void 0===i[r]){var p=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e})),Gt=a((function(t,e){function n(t){return unescape(encodeURIComponent(t)).length}function r(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function o(t){const e=r(kt.NUMERIC,Ht.NUMERIC,t),n=r(kt.ALPHANUMERIC,Ht.ALPHANUMERIC,t);let o,i;nt()?(o=r(kt.BYTE,Ht.BYTE,t),i=r(kt.KANJI,Ht.KANJI,t)):(o=r(kt.BYTE_KANJI,Ht.BYTE,t),i=[]);return e.concat(n,o,i).sort((function(t,e){return t.index-e.index})).map((function(t){return{data:t.data,mode:t.mode,length:t.length}}))}function i(t,e){switch(e){case Ht.NUMERIC:return Vt.getBitsLength(t);case Ht.ALPHANUMERIC:return Zt.getBitsLength(t);case Ht.KANJI:return Jt.getBitsLength(t);case Ht.BYTE:return Yt.getBitsLength(t)}}function a(t,e){let n;const r=Ht.getBestModeForData(t);if(n=Ht.from(e,r),n!==Ht.BYTE&&n.bit<r.bit)throw new Error('"'+t+'" cannot be encoded with mode '+Ht.toString(n)+".\n Suggested mode is: "+Ht.toString(r));switch(n!==Ht.KANJI||nt()||(n=Ht.BYTE),n){case Ht.NUMERIC:return new Vt(t);case Ht.ALPHANUMERIC:return new Zt(t);case Ht.KANJI:return new Jt(t);case Ht.BYTE:return new Yt(t)}}e.fromArray=function(t){return t.reduce((function(t,e){return"string"==typeof e?t.push(a(e,null)):e.data&&t.push(a(e.data,e.mode)),t}),[])},e.fromString=function(t,r){const a=function(t){const e=[];for(let r=0;r<t.length;r++){const o=t[r];switch(o.mode){case Ht.NUMERIC:e.push([o,{data:o.data,mode:Ht.ALPHANUMERIC,length:o.length},{data:o.data,mode:Ht.BYTE,length:o.length}]);break;case Ht.ALPHANUMERIC:e.push([o,{data:o.data,mode:Ht.BYTE,length:o.length}]);break;case Ht.KANJI:e.push([o,{data:o.data,mode:Ht.BYTE,length:n(o.data)}]);break;case Ht.BYTE:e.push([{data:o.data,mode:Ht.BYTE,length:n(o.data)}])}}return e}(o(t)),l=function(t,e){const n={},r={start:{}};let o=["start"];for(let a=0;a<t.length;a++){const l=t[a],u=[];for(let t=0;t<l.length;t++){const c=l[t],s=""+a+t;u.push(s),n[s]={node:c,lastCount:0},r[s]={};for(let t=0;t<o.length;t++){const a=o[t];n[a]&&n[a].node.mode===c.mode?(r[a][s]=i(n[a].lastCount+c.length,c.mode)-i(n[a].lastCount,c.mode),n[a].lastCount+=c.length):(n[a]&&(n[a].lastCount=c.length),r[a][s]=i(c.length,c.mode)+4+Ht.getCharCountIndicator(c.mode,e))}}o=u}for(let t=0;t<o.length;t++)r[o[t]].end=0;return{map:r,table:n}}(a,r),u=Kt.find_path(l.map,"start","end"),c=[];for(let t=1;t<u.length-1;t++)c.push(l.table[u[t]].node);return e.fromArray(function(t){return t.reduce((function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)}),[])}(c))},e.rawSplit=function(t){return e.fromArray(o(t))}}));function Wt(t,e,n){const r=t.size,o=qt(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function Xt(t,e,n){const r=new at;n.forEach((function(e){r.put(e.mode.bit,4),r.put(e.getLength(),Ht.getCharCountIndicator(e.mode,t)),e.write(r)}));const o=8*($(t)-gt(t,e));for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(0);const i=(o-r.getLengthInBits())/8;for(let t=0;t<i;t++)r.put(t%2?17:236,8);return function(t,e,n){const r=$(e),o=gt(e,n),i=r-o,a=mt(e,n),l=a-r%a,u=Math.floor(r/a),c=Math.floor(i/a),s=c+1,d=u-c,f=new _t(d);let h=0;const p=new Array(a),m=new Array(a);let g=0;const v=new Uint8Array(t.buffer);for(let t=0;t<a;t++){const e=t<l?c:s;p[t]=v.slice(h,h+e),m[t]=f.encode(p[t]),h+=e,g=Math.max(g,e)}const y=new Uint8Array(r);let E,w,C=0;for(E=0;E<g;E++)for(w=0;w<a;w++)E<p[w].length&&(y[C++]=p[w][E]);for(E=0;E<d;E++)for(w=0;w<a;w++)y[C++]=m[w][E];return y}(r,t,e)}function $t(t,e,n,r){let o;if(Array.isArray(t))o=Gt.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=Gt.rawSplit(t);r=Ot.getBestVersionForData(e,n)}o=Gt.fromString(t,r||40)}}const i=Ot.getBestVersionForData(o,n);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<i)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+i+".\n")}else e=i;const a=Xt(e,n,o),l=X(e),u=new ut(l);return function(t,e){const n=t.size,r=dt(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(u,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(u),function(t,e){const n=ct.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(u,e),Wt(u,n,0),e>=7&&function(t,e){const n=t.size,r=Ot.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(u,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let l=n-1;l>0;l-=2)for(6===l&&l--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,l-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,l-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(u,a),isNaN(r)&&(r=ft.getBestMask(u,Wt.bind(null,u,n))),ft.applyMask(r,u),Wt(u,n,r),{modules:u,version:e,errorCorrectionLevel:n,maskPattern:r,segments:o}}Gt.fromArray,Gt.fromString,Gt.rawSplit;var te=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,r,o=ot.M;return void 0!==e&&(o=ot.from(e.errorCorrectionLevel,ot.M),n=Ot.from(e.version),r=ft.from(e.maskPattern),e.toSJISFunc&&et(e.toSJISFunc)),$t(t,n,o,r)},ee=a((function(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map((function(t){return[t,t]})))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),l=Math.floor((o+2*r.margin)*a),u=r.margin*a,c=[r.color.light,r.color.dark];for(let e=0;e<l;e++)for(let n=0;n<l;n++){let s=4*(e*l+n),d=r.color.light;if(e>=u&&n>=u&&e<l-u&&n<l-u){d=c[i[Math.floor((e-u)/a)*o+Math.floor((n-u)/a)]?1:0]}t[s++]=d.r,t[s++]=d.g,t[s++]=d.b,t[s]=d.a}}}));ee.getOptions,ee.getScale,ee.getImageWidth,ee.qrToImageData;var ne=a((function(t,e){e.render=function(t,e,n){let r=n,o=e;void 0!==r||e&&e.getContext||(r=e,e=void 0),e||(o=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),r=ee.getOptions(r);const i=ee.getImageWidth(t.modules.size,r),a=o.getContext("2d"),l=a.createImageData(i,i);return ee.qrToImageData(l.data,t,r),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(a,o,i),a.putImageData(l,0,0),o},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",l=o.rendererOpts||{};return i.toDataURL(a,l.quality)}}));function re(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function oe(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}ne.render,ne.renderToDataURL;var ie=function(t,e,n){const r=ee.getOptions(e),o=t.modules.size,i=t.modules.data,a=o+2*r.margin,l=r.color.light.a?"<path "+re(r.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+re(r.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,i=!1,a=0;for(let l=0;l<t.length;l++){const u=Math.floor(l%e),c=Math.floor(l/e);u||i||(i=!0),t[l]?(a++,l>0&&u>0&&t[l-1]||(r+=i?oe("M",u+n,.5+c+n):oe("m",o,0),o=0,i=!1),u+1<e&&t[l+1]||(r+=oe("h",a),a=0)):o++}return r}(i,o,r.margin)+'"/>',c='viewBox="0 0 '+a+" "+a+'"',s='<svg xmlns="http://www.w3.org/2000/svg" '+(r.width?'width="'+r.width+'" height="'+r.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+u+"</svg>\n";return"function"==typeof n&&n(null,s),s};function ae(t,e,n,r,o){const i=[].slice.call(arguments,1),a=i.length,l="function"==typeof i[a-1];if(!l&&!K())throw new Error("Callback required as last argument");if(!l){if(a<1)throw new Error("Too few arguments provided");return 1===a?(n=e,e=r=void 0):2!==a||e.getContext||(r=n,n=e,e=void 0),new Promise((function(o,i){try{const i=te(n,r);o(t(i,e,r))}catch(t){i(t)}}))}if(a<2)throw new Error("Too few arguments provided");2===a?(o=n,n=e,e=r=void 0):3===a&&(e.getContext&&void 0===o?(o=r,r=void 0):(o=r,r=n,n=e,e=void 0));try{const i=te(n,r);o(null,t(i,e,r))}catch(t){o(t)}}var le={create:te,toCanvas:ae.bind(null,ne.render),toDataURL:ae.bind(null,ne.renderToDataURL),toString:ae.bind(null,(function(t,e,n){return ie(t,n)}))},ue=function(){var t=k(q.mark((function t(e){return q.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,le.toDataURL(e);case 3:return t.abrupt("return",t.sent);case 6:throw t.prev=6,t.t0=t.catch(0),new Error(t.t0.message);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e){return t.apply(this,arguments)}}(),ce={iconBox:"index-module_iconBox__7pQ24",title:"index-module_title__e2Tzy",textContent:"index-module_textContent__Swtps",buttonBox:"index-module_buttonBox__G-nGE"},se=function(){var t=_(),e=t.setStep,r=t.errorInfo,i=t.client,a=t.setQrCodeUrl;if(!r)return null;var u=function(){var t=k(q.mark((function t(){return q.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(![n.ErrorCodeType["connect-error"],n.ErrorCodeType["connect-closed"],n.ErrorCodeType["connect-timeout"],n.ErrorCodeType["wallet-connect-timeout"],n.ErrorCodeType["wallet-connect-error"],n.ErrorCodeType["unknown-error"],5e3,5001,5002,5100,5101,5102,5103,5104].includes(r.type)){t.next=5;break}return e(exports.StepStringEnum.QR_CODE),a(""),t.next=5,i.init();case 5:case"end":retur