-
Notifications
You must be signed in to change notification settings - Fork 0
/
5782.918e333222908255696a.js
1 lines (1 loc) · 68.5 KB
/
5782.918e333222908255696a.js
1
"use strict";(self.webpackChunktimeless_frontend=self.webpackChunktimeless_frontend||[]).push([[5782],{96971:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseConnectSettings=e.getEnv=void 0;const i=n(52936);e.getEnv=()=>{var s;if("undefined"!=typeof chrome&&void 0!==(null===(s=chrome.runtime)||void 0===s?void 0:s.onConnect))return"webextension";if("undefined"!=typeof navigator){if("string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase())return"react-native";if(navigator.userAgent.toLowerCase().indexOf(" electron/")>-1)return"electron"}return"web"},e.parseConnectSettings=(s={})=>{var o;const p=Object.assign({popup:!0},s);let c;if("undefined"!=typeof window?c=window.__TREZOR_CONNECT_SRC:"undefined"!=typeof global&&(c=global.__TREZOR_CONNECT_SRC),"string"==typeof c&&(p.connectSrc=c,p.debug=!0),"undefined"!=typeof window&&"string"==typeof(null===(o=window.location)||void 0===o?void 0:o.search)){const f=((s,o)=>{const p=new URLSearchParams(s),c={};return Array.from(p.entries()).forEach(([I,S])=>{o.includes(I)&&(c[I]=decodeURIComponent(S))}),c})(window.location.search,["trezor-connect-src"]);f["trezor-connect-src"]&&(p.debug=!0,p.connectSrc=f["trezor-connect-src"])}return"string"!=typeof s.env&&(p.env=(0,e.getEnv)()),(0,i.parseConnectSettings)(p)}},13058:(y,e,n)=>{var i=n(31325).default;Object.defineProperty(e,"__esModule",{value:!0}),e.initIframeLogger=e.clearTimeout=e.postMessage=e.init=e.dispose=e.messagePromises=e.error=e.timeout=e.initPromise=e.origin=e.instance=void 0;const u=n(97582),a=n(16260),r=n(52936),s=n(82050),o=n(59309),p=u.__importDefault(n(93528));e.initPromise=(0,a.createDeferred)(),e.timeout=0;let c=0;e.messagePromises={},e.dispose=()=>{if(e.instance&&e.instance.parentNode)try{e.instance.parentNode.removeChild(e.instance)}catch{}e.instance=null,e.timeout=0};const v=function(){var h=i(function*(R){e.initPromise=(0,a.createDeferred)();const P=document.getElementById("trezorconnect");let T;if(P?e.instance=P:(e.instance=document.createElement("iframe"),e.instance.frameBorder="0",e.instance.width="0px",e.instance.height="0px",e.instance.style.position="absolute",e.instance.style.display="none",e.instance.style.border="0px",e.instance.style.width="0px",e.instance.style.height="0px",e.instance.id="trezorconnect"),"web"===R.env){const m=R.manifest?JSON.stringify(R.manifest):"undefined",E=`version=${R.version}&manifest=${encodeURIComponent(btoa(JSON.stringify(m)))}`;T=`${R.iframeSrc}?${E}`}else T=R.iframeSrc;e.instance.setAttribute("src",T),R.webusb&&console.warn('webusb option is deprecated. use `transports: ["WebUsbTransport"] instead`'),navigator.usb&&e.instance.setAttribute("allow","usb"),e.origin=(0,s.getOrigin)(e.instance.src),e.timeout=window.setTimeout(()=>{e.initPromise.reject(r.ERRORS.TypedError("Init_IframeTimeout"))},1e4);const l=()=>{var m,E;if(!e.instance)return void e.initPromise.reject(r.ERRORS.TypedError("Init_IframeBlocked"));try{const N=null===(m=e.instance.contentWindow)||void 0===m?void 0:m.location.origin;if(!N||"null"===N)return window.clearTimeout(e.timeout),e.error=r.ERRORS.TypedError("Init_IframeBlocked"),(0,e.dispose)(),void e.initPromise.reject(e.error)}catch{}let g;"undefined"!=typeof chrome&&chrome.runtime&&void 0!==chrome.runtime.onConnect&&(chrome.runtime.onConnect.addListener(()=>{}),g=chrome.runtime.id),null===(E=e.instance.contentWindow)||void 0===E||E.postMessage({type:r.IFRAME.INIT,payload:{settings:R,extension:g}},e.origin),e.instance.onload=null};e.instance.attachEvent?e.instance.attachEvent("onload",l):e.instance.onload=l,document.body&&(document.body.appendChild(e.instance),(()=>{if(!e.instance)throw r.ERRORS.TypedError("Init_IframeBlocked");const h=e.instance.ownerDocument,R=h.head||h.getElementsByTagName("head")[0],P=document.createElement("style");P.setAttribute("type","text/css"),P.setAttribute("id","TrezorConnectStylesheet"),P.styleSheet?(P.styleSheet.cssText=p.default,R.appendChild(P)):(P.appendChild(document.createTextNode(p.default)),R.append(P))})());try{yield e.initPromise.promise}catch(m){throw e.instance&&(e.instance.parentNode&&e.instance.parentNode.removeChild(e.instance),e.instance=null),m}finally{window.clearTimeout(e.timeout),e.timeout=0}});return function(P){return h.apply(this,arguments)}}();e.init=v,e.postMessage=(h,R=!0)=>{var P,T;if(!e.instance)throw r.ERRORS.TypedError("Init_IframeBlocked");if(R){c++,h.id=c,e.messagePromises[c]=(0,a.createDeferred)();const{promise:l}=e.messagePromises[c];return null===(P=e.instance.contentWindow)||void 0===P||P.postMessage(h,e.origin),l}return null===(T=e.instance.contentWindow)||void 0===T||T.postMessage(h,e.origin),null},e.clearTimeout=()=>{window.clearTimeout(e.timeout)},e.initIframeLogger=()=>{(0,o.setLogWriter)(()=>({add:R=>{(0,e.postMessage)({event:r.UI_EVENT,type:r.IFRAME.LOG,payload:R})}}))}},93528:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default='.trezorconnect-container{position:fixed!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical!important;-webkit-box-direction:normal!important;-webkit-flex-direction:column!important;-ms-flex-direction:column!important;flex-direction:column!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important;z-index:10000!important;width:100%!important;height:100%!important;top:0!important;left:0!important;background:rgba(0,0,0,.35)!important;overflow:auto!important;padding:20px!important;margin:0!important}.trezorconnect-container .trezorconnect-window{position:relative!important;display:block!important;width:370px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif!important;margin:auto!important;border-radius:3px!important;background-color:#fff!important;text-align:center!important;overflow:hidden!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head{text-align:left;padding:12px 24px!important;display:-webkit-box!important;display:-webkit-flex!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-align:center!important;-webkit-align-items:center!important;-ms-flex-align:center!important;align-items:center!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-logo{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-close{cursor:pointer!important;height:24px!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-close svg{fill:#757575;-webkit-transition:fill .3s ease-in-out!important;transition:fill .3s ease-in-out!important}.trezorconnect-container .trezorconnect-window .trezorconnect-head .trezorconnect-close:hover svg{fill:#494949}.trezorconnect-container .trezorconnect-window .trezorconnect-body{padding:24px 24px 32px!important;background:#FBFBFB!important;border-top:1px solid #EBEBEB}.trezorconnect-container .trezorconnect-window .trezorconnect-body h3{color:#505050!important;font-size:16px!important;font-weight:500!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body p{margin:8px 0 24px!important;font-weight:400!important;color:#A9A9A9!important;font-size:12px!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body button{width:100%!important;padding:12px 24px!important;margin:0!important;border-radius:3px!important;font-size:14px!important;font-weight:300!important;cursor:pointer!important;background:#01B757!important;color:#fff!important;border:0!important;-webkit-transition:background-color .3s ease-in-out!important;transition:background-color .3s ease-in-out!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body button:hover{background-color:#00AB51!important}.trezorconnect-container .trezorconnect-window .trezorconnect-body button:active{background-color:#009546!important}/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0IiwiJHN0ZGluIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNBLHlCQUNJLFNBQUEsZ0JBQ0EsUUFBQSxzQkFDQSxRQUFBLHVCQUNBLFFBQUEsc0JBRUEsUUFBQSxlQUNBLG1CQUFBLG1CQUNBLHNCQUFBLGlCQUNBLHVCQUFBLGlCQUNBLG1CQUFBLGlCQUNBLGVBQUEsaUJBRUEsa0JBQUEsaUJBQ0Esb0JBQUEsaUJBQ0EsZUFBQSxpQkNmTSxZQUFhLGlCREFyQixRQUFTLGdCQWtCSCxNQUFBLGVBQ0EsT0FBQSxlQUNBLElBQUEsWUFDQSxLQUFBLFlBQ0EsV0FBQSwwQkFDQSxTQUFBLGVBQ0EsUUFBQSxlQUNBLE9BQUEsWUNkUiwrQ0RYRSxTQUFVLG1CQTZCQSxRQUFBLGdCQUNBLE1BQUEsZ0JBQ0EsWUFBQSxjQUFBLG1CQUFBLFdBQUEsT0FBQSxpQkFBQSxNQUFBLHFCQUNBLE9BQUEsZUNmVixjQUFlLGNEakJmLGlCQWlCRSxlQWtCWSxXQUFBLGlCQ2ZkLFNBQVUsaUJEbUJJLG1FQUNBLFdBQUEsS0NoQmQsUUFBUyxLQUFLLGVEeEJkLFFBQVMsc0JBMENTLFFBQUEsdUJBQ0EsUUFBQSxzQkNmbEIsUUFBUyxlRGlCSyxrQkE1QlosaUJBOEJvQixvQkFBQSxpQkNoQmxCLGVBQWdCLGlCRC9CWixZQWlCTixpQkFzQ1EsdUZBQ0EsaUJBQUEsRUNwQlYsYUFBYyxFRHBDVixTQUFVLEVBMkRBLEtBQUEsRUFFQSx3RkNwQmQsT0FBUSxrQkR6Q1IsT0FBUSxlQWlFTSw0RkFDQSxLQUFBLFFBQ0EsbUJBQUEsS0FBQSxJQUFBLHNCQ3BCZCxXQUFZLEtBQUssSUFBSyxzQkR3QlIsa0dBQ0EsS0FBQSxRQUVBLG1FQUNBLFFBQUEsS0FBQSxLQUFBLGVBQ0EsV0FBQSxrQkFDQSxXQUFBLElBQUEsTUFBQSxRQUVBLHNFQUNBLE1BQUEsa0JBQ0EsVUFBQSxlQ3JCZCxZQUFhLGNEd0JLLHFFQ3JCbEIsT0FBUSxJQUFJLEVBQUksZUR3QkYsWUFBQSxjQUNJLE1BQUEsa0JDdEJsQixVQUFXLGVBRWIsMEVBQ0UsTUFBTyxlQUNQLFFBQVMsS0FBSyxlQUNkLE9BQVEsWUFDUixjQUFlLGNBQ2YsVUFBVyxlQUNYLFlBQWEsY0FDYixPQUFRLGtCQUNSLFdBQVksa0JBQ1osTUFBTyxlQUNQLE9BQVEsWUFDUixtQkFBb0IsaUJBQWlCLElBQUssc0JBQzFDLFdBQVksaUJBQWlCLElBQUssc0JBRXBDLGdGQUNFLGlCQUFrQixrQkFFcEIsaUZBQ0UsaUJBQWtCIn0= */'},75782:(y,e,n)=>{var i=n(31325).default;Object.defineProperty(e,"__esModule",{value:!0});const u=n(97582),a=u.__importDefault(n(93105)),r=n(52936),s=n(72846),o=n(59309),p=n(71998),c=u.__importStar(n(13058)),f=u.__importStar(n(62450)),I=u.__importDefault(n(46321)),S=n(96971),v=new a.default,_=(0,o.initLog)("@trezor/connect-web");let t,d=(0,S.parseConnectSettings)();const h=()=>{const M=new f.PopupManager(d);return M.on(r.POPUP.CLOSED,b=>{c.postMessage({type:r.POPUP.CLOSED,payload:b?{error:b}:null},!1)}),M},P=()=>(v.removeAllListeners(),c.dispose(),d=(0,S.parseConnectSettings)(),t&&t.close(),Promise.resolve(void 0)),l=M=>{if(M.origin!==c.origin)return;const b=(0,r.parseMessage)(M.data),A=b.id||0;switch(_.log("handleMessage",b),b.event){case r.RESPONSE_EVENT:c.messagePromises[A]?(c.messagePromises[A].resolve({id:A,success:b.success,payload:b.payload}),delete c.messagePromises[A]):_.warn(`Unknown message id ${A}`);break;case r.DEVICE_EVENT:case r.TRANSPORT_EVENT:case r.BLOCKCHAIN_EVENT:v.emit(b.event,b),v.emit(b.type,b.payload);break;case r.UI_EVENT:if(b.type===r.IFRAME.BOOTSTRAP){c.clearTimeout();break}b.type===r.IFRAME.LOADED&&c.initPromise.resolve(),b.type===r.IFRAME.ERROR&&c.initPromise.reject(b.payload.error),v.emit(b.event,b),v.emit(b.type,b.payload);break;default:_.log("Undefined message",b.event,M.data)}},m=function(){var M=i(function*(b={}){var A;if(c.instance)throw r.ERRORS.TypedError("Init_AlreadyInitialized");if(d=(0,S.parseConnectSettings)(Object.assign(Object.assign({},d),b)),!d.manifest)throw r.ERRORS.TypedError("Init_ManifestMissing");(null===(A=d.transports)||void 0===A?void 0:A.length)||(d.transports=["BridgeTransport","WebUsbTransport"]),d.lazyLoad?d.lazyLoad=!1:(t||(t=h()),_.enabled=!!d.debug,window.addEventListener("message",l),window.addEventListener("unload",P),yield c.init(d),!1!==d.sharedLogger&&c.initIframeLogger())});return function(){return M.apply(this,arguments)}}(),E=function(){var M=i(function*(b){if(!c.instance&&!c.timeout){if(d=(0,S.parseConnectSettings)(d),!d.manifest)return(0,r.createErrorMessage)(r.ERRORS.TypedError("Init_ManifestMissing"));t||(t=h()),t.request();try{yield m(d)}catch(A){return t&&(["Init_IframeBlocked","Init_IframeTimeout"].includes(A.code)?t.postMessage((0,r.createUiMessage)(r.UI.IFRAME_FAILURE)):t.clear()),(0,r.createErrorMessage)(A)}}if(c.timeout)return(0,r.createErrorMessage)(r.ERRORS.TypedError("Init_ManifestMissing"));if(c.error)return(0,r.createErrorMessage)(c.error);d.popup&&t&&t.request();try{const A=yield c.postMessage({type:r.IFRAME.CALL,payload:b});return A?(!A.success&&"Device_CallInProgress"!==A.payload.code&&t&&t.unlock(),A):(t&&t.unlock(),(0,r.createErrorMessage)(r.ERRORS.TypedError("Method_NoResponse")))}catch(A){return _.error("__call error",A),t&&t.clear(),(0,r.createErrorMessage)(A)}});return function(A){return M.apply(this,arguments)}}(),O=function(){var M=i(function*(b){if("function"==typeof b.callback){const{callback:A}=b,F=function(){var j=i(function*(k){const{data:L}=k;if(L&&L.type===r.UI.LOGIN_CHALLENGE_REQUEST)try{const U=yield A();c.postMessage({event:r.UI_EVENT,type:r.UI.LOGIN_CHALLENGE_RESPONSE,payload:U})}catch(U){c.postMessage({event:r.UI_EVENT,type:r.UI.LOGIN_CHALLENGE_RESPONSE,payload:U.message})}});return function(L){return j.apply(this,arguments)}}();window.addEventListener("message",F,!1);const z=yield E(Object.assign(Object.assign({method:"requestLogin"},b),{asyncChallenge:!0,callback:null}));return window.removeEventListener("message",F),z}return E(Object.assign({method:"requestLogin"},b))});return function(A){return M.apply(this,arguments)}}(),w=(0,s.factory)({eventEmitter:v,manifest:M=>{d=(0,S.parseConnectSettings)(Object.assign(Object.assign({},d),{manifest:M}))},init:m,call:E,requestLogin:O,uiResponse:M=>{if(!c.instance)throw r.ERRORS.TypedError("Init_NotInitialized");const{type:b,payload:A}=M;c.postMessage({event:r.UI_EVENT,type:b,payload:A})},renderWebUSBButton:M=>{(0,I.default)(M,d.webusbSrc)},disableWebUSB:()=>{if(!c.instance)throw r.ERRORS.TypedError("Init_NotInitialized");c.postMessage({event:r.UI_EVENT,type:r.TRANSPORT.DISABLE_WEBUSB})},requestWebUSBDevice:function(){var M=i(function*(){try{yield window.navigator.usb.requestDevice({filters:p.config.webusb}),c.postMessage({event:r.UI_EVENT,type:r.TRANSPORT.REQUEST_DEVICE})}catch{}});return function(){return M.apply(this,arguments)}}(),cancel:M=>{t&&t.emit(r.POPUP.CLOSED,M)},dispose:P});e.default=w,u.__exportStar(n(52936),e)},62450:(y,e,n)=>{var i=n(31325).default;Object.defineProperty(e,"__esModule",{value:!0}),e.PopupManager=void 0;const a=n(97582).__importDefault(n(93105)),r=n(16260),s=n(52936),o=n(82050),p=n(18491);e.PopupManager=class extends a.default{constructor(_){super(),this.locked=!1,this.requestTimeout=0,this.closeInterval=0,this.extensionTabId=0,this.settings=_,this.origin=(0,o.getOrigin)(_.popupSrc),this.handleMessage=this.handleMessage.bind(this),this.iframeHandshake=(0,r.createDeferred)(s.IFRAME.LOADED),"webextension"===this.settings.env&&(this.handleExtensionConnect=this.handleExtensionConnect.bind(this),this.handleExtensionMessage=this.handleExtensionMessage.bind(this),chrome.runtime.onConnect.addListener(this.handleExtensionConnect)),window.addEventListener("message",this.handleMessage,!1)}request(){if(this.locked)return void(this.popupWindow&&("webextension"===this.settings.env?chrome.tabs.update(this.popupWindow.id,{active:!0}):this.popupWindow.focus()));this.popupWindow&&!this.locked&&this.close();const _=this.open.bind(this);this.locked=!0,this.requestTimeout=window.setTimeout(()=>{this.requestTimeout=0,_()},"webextension"===this.settings.env?1:850)}unlock(){this.locked=!1}open(){const _=this.settings.popupSrc;this.popupPromise=(0,r.createDeferred)(s.POPUP.LOADED),this.openWrapper(_),this.closeInterval=window.setInterval(()=>{!this.popupWindow||("webextension"===this.settings.env?chrome.tabs.get(this.popupWindow.id,d=>{d||(this.emit(s.POPUP.CLOSED),this.clear())}):this.popupWindow.closed&&(this.clear(),this.emit(s.POPUP.CLOSED)))},500),this.openTimeout=setTimeout(()=>{this.clear(),(0,p.showPopupRequest)(this.open.bind(this),()=>{this.emit(s.POPUP.CLOSED)})},3e3)}openWrapper(_){"webextension"===this.settings.env?chrome.windows.getCurrent(d=>{"normal"!==d.type?chrome.windows.create({url:_},t=>{chrome.tabs.query({windowId:null==t?void 0:t.id,active:!0},h=>{this.popupWindow=h[0]})}):chrome.tabs.query({currentWindow:!0,active:!0},t=>{this.extensionTabId=t[0].id,chrome.tabs.create({url:_,index:t[0].index+1},h=>{this.popupWindow=h})})}):"electron"===this.settings.env?this.popupWindow=window.open(_,"modal"):(this.popupWindow=window.open("","_blank"),this.popupWindow&&(this.popupWindow.location.href=_))}handleExtensionConnect(_){var d,t;"trezor-connect"===_.name&&(!this.popupWindow||this.popupWindow&&this.popupWindow.id!==(null===(t=null===(d=_.sender)||void 0===d?void 0:d.tab)||void 0===t?void 0:t.id)||(this.openTimeout&&clearTimeout(this.openTimeout),this.extensionPort=_,this.extensionPort.onMessage.addListener(this.handleExtensionMessage)))}handleExtensionMessage(_){if(!this.extensionPort)return;const d=this.extensionPort,{data:t}=_;if(t&&"object"==typeof t)if(t.type===s.POPUP.ERROR){const h=t.payload&&"string"==typeof t.payload.error?t.payload.error:null;this.emit(s.POPUP.CLOSED,h?`Popup error: ${h}`:null),this.clear()}else t.type===s.POPUP.LOADED?(this.popupPromise&&this.popupPromise.resolve(),this.iframeHandshake.promise.then(h=>{d.postMessage({type:s.POPUP.INIT,payload:Object.assign(Object.assign({},h),{settings:this.settings})})})):t.type===s.POPUP.EXTENSION_USB_PERMISSIONS?chrome.tabs.query({currentWindow:!0,active:!0},h=>{chrome.tabs.create({url:"trezor-usb-permissions.html",index:h[0].index+1},R=>{})}):t.type===s.POPUP.CLOSE_WINDOW&&this.clear()}handleMessage(_){const{data:d}=_;if((0,o.getOrigin)(_.origin)===this.origin&&d&&"object"==typeof d)if(d.type===s.IFRAME.LOADED)this.iframeHandshake.resolve(d.payload);else if(d.type===s.POPUP.BOOTSTRAP)this.openTimeout&&clearTimeout(this.openTimeout);else if(d.type===s.POPUP.ERROR&&this.popupWindow){const t=d.payload&&"string"==typeof d.payload.error?d.payload.error:null;this.emit(s.POPUP.CLOSED,t?`Popup error: ${t}`:null),this.clear()}else d.type===s.POPUP.LOADED?(this.popupPromise&&this.popupPromise.resolve(),this.iframeHandshake.promise.then(t=>{this.popupWindow.postMessage({type:s.POPUP.INIT,payload:Object.assign(Object.assign({},t),{settings:this.settings})},this.origin)})):(d.type===s.POPUP.CANCEL_POPUP_REQUEST||d.type===s.UI.CLOSE_UI_WINDOW)&&this.clear(!1)}clear(_=!0){this.locked=!1,this.popupPromise=void 0,this.requestTimeout&&(window.clearTimeout(this.requestTimeout),this.requestTimeout=0),this.openTimeout&&(clearTimeout(this.openTimeout),this.openTimeout=void 0),this.closeInterval&&(window.clearInterval(this.closeInterval),this.closeInterval=0),this.extensionPort&&(this.extensionPort.disconnect(),this.extensionPort=void 0),_&&this.extensionTabId&&(chrome.tabs.update(this.extensionTabId,{active:!0}),this.extensionTabId=0)}close(){if(this.popupWindow){if("webextension"===this.settings.env){let _=chrome.runtime.lastError;return void chrome.tabs.remove(this.popupWindow.id,()=>{_=chrome.runtime.lastError})}this.popupWindow.close(),this.popupWindow=null}}postMessage(_){var d=this;return i(function*(){if(!d.popupWindow&&_.type!==s.UI.REQUEST_UI_WINDOW&&d.openTimeout)return d.clear(),void(0,p.showPopupRequest)(d.open.bind(d),()=>{d.emit(s.POPUP.CLOSED)});d.popupPromise&&(yield d.popupPromise.promise),d.popupWindow&&d.popupWindow.postMessage(_,d.origin)})()}}},18491:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.showPopupRequest=void 0;const n="TrezorConnectInteractionLayer",i=`\n <div class="trezorconnect-container" id="${n}">\n <div class="trezorconnect-window">\n <div class="trezorconnect-head">\n <svg class="trezorconnect-logo" x="0px" y="0px" viewBox="0 0 163.7 41.9" width="78px" height="20px" preserveAspectRatio="xMinYMin meet">\n <polygon points="101.1,12.8 118.2,12.8 118.2,17.3 108.9,29.9 118.2,29.9 118.2,35.2 101.1,35.2 101.1,30.7 110.4,18.1 101.1,18.1"/>\n <path d="M158.8,26.9c2.1-0.8,4.3-2.9,4.3-6.6c0-4.5-3.1-7.4-7.7-7.4h-10.5v22.3h5.8v-7.5h2.2l4.1,7.5h6.7L158.8,26.9z M154.7,22.5 h-4V18h4c1.5,0,2.5,0.9,2.5,2.2C157.2,21.6,156.2,22.5,154.7,22.5z"/>\n <path d="M130.8,12.5c-6.8,0-11.6,4.9-11.6,11.5s4.9,11.5,11.6,11.5s11.7-4.9,11.7-11.5S137.6,12.5,130.8,12.5z M130.8,30.3 c-3.4,0-5.7-2.6-5.7-6.3c0-3.8,2.3-6.3,5.7-6.3c3.4,0,5.8,2.6,5.8,6.3C136.6,27.7,134.2,30.3,130.8,30.3z"/>\n <polygon points="82.1,12.8 98.3,12.8 98.3,18 87.9,18 87.9,21.3 98,21.3 98,26.4 87.9,26.4 87.9,30 98.3,30 98.3,35.2 82.1,35.2 "/>\n <path d="M24.6,9.7C24.6,4.4,20,0,14.4,0S4.2,4.4,4.2,9.7v3.1H0v22.3h0l14.4,6.7l14.4-6.7h0V12.9h-4.2V9.7z M9.4,9.7 c0-2.5,2.2-4.5,5-4.5s5,2,5,4.5v3.1H9.4V9.7z M23,31.5l-8.6,4l-8.6-4V18.1H23V31.5z"/>\n <path d="M79.4,20.3c0-4.5-3.1-7.4-7.7-7.4H61.2v22.3H67v-7.5h2.2l4.1,7.5H80l-4.9-8.3C77.2,26.1,79.4,24,79.4,20.3z M71,22.5h-4V18 h4c1.5,0,2.5,0.9,2.5,2.2C73.5,21.6,72.5,22.5,71,22.5z"/>\n <polygon points="40.5,12.8 58.6,12.8 58.6,18.1 52.4,18.1 52.4,35.2 46.6,35.2 46.6,18.1 40.5,18.1 "/>\n </svg>\n <div class="trezorconnect-close">\n <svg x="0px" y="0px" viewBox="24 24 60 60" width="24px" height="24px" preserveAspectRatio="xMinYMin meet">\n <polygon class="st0" points="40,67.9 42.1,70 55,57.1 67.9,70 70,67.9 57.1,55 70,42.1 67.9,40 55,52.9 42.1,40 40,42.1 52.9,55 "/>\n </svg>\n </div>\n </div>\n <div class="trezorconnect-body">\n <h3>Popup was blocked</h3>\n <p>Please click to "Continue" to open popup manually</p>\n <button class="trezorconnect-open">Continue</button>\n </div>\n </div>\n </div>\n`;e.showPopupRequest=(a,r)=>{if(document.getElementById(n))return;const s=document.createElement("div");s.id=n,s.className="trezorconnect-container",s.innerHTML=i,document.body&&document.body.appendChild(s),s.getElementsByClassName("trezorconnect-open")[0].onclick=()=>{a(),document.body&&document.body.removeChild(s)},s.getElementsByClassName("trezorconnect-close")[0].onclick=()=>{r(),document.body&&document.body.removeChild(s)}}},46321:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=(i="",u)=>{const r=document.querySelectorAll(i||".trezor-webusb-button"),s=`${u}?${Date.now()}`;r.forEach(o=>{if(o.getElementsByTagName("iframe").length<1){const p=o.getBoundingClientRect(),c=document.createElement("iframe");c.frameBorder="0",c.width=`${Math.round(p.width)}px`,c.height=`${Math.round(p.height)}px`,c.style.position="absolute",c.style.top="0px",c.style.left="0px",c.style.zIndex="1",c.setAttribute("allow","usb"),c.setAttribute("scrolling","no"),c.src=s,o.append(c)}})}},63141:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NETWORK_IDS=e.PROTOCOL_MAGICS=void 0},22244:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LIBUSB_ERROR_MESSAGE=e.serializeError=e.TypedError=e.TrezorError=e.ERROR_CODES=void 0,e.ERROR_CODES={Init_NotInitialized:"TrezorConnect not initialized",Init_AlreadyInitialized:"TrezorConnect has been already initialized",Init_IframeBlocked:"Iframe blocked",Init_IframeTimeout:"Iframe timeout",Init_ManifestMissing:"Manifest not set. Read more at https://github.com/trezor/trezor-suite/blob/develop/docs/packages/connect/index.md",Popup_ConnectionMissing:"Unable to establish connection with iframe",Transport_Missing:"Transport is missing",Transport_InvalidProtobuf:"",Method_InvalidPackage:"This package is not suitable to work with browser. Use @trezor/connect-web package instead",Method_InvalidParameter:"",Method_NotAllowed:"Method not allowed for this configuration",Method_PermissionsNotGranted:"Permissions not granted",Method_Cancel:"Cancelled",Method_Interrupted:"Popup closed",Method_UnknownCoin:"Coin not found",Method_AddressNotMatch:"Addresses do not match",Method_FirmwareUpdate_DownloadFailed:"Failed to download firmware binary",Method_Discovery_BundleException:"",Method_Override:"override",Method_NoResponse:"Call resolved without response",Backend_NotSupported:"BlockchainLink settings not found in coins.json",Backend_WorkerMissing:"",Backend_Disconnected:"Backend disconnected",Backend_Invalid:"Invalid backend",Backend_Error:"",Runtime:"",Device_NotFound:"Device not found",Device_InitializeFailed:"",Device_FwException:"",Device_ModeException:"",Device_Disconnected:"Device disconnected",Device_UsedElsewhere:"Device is used in another window",Device_InvalidState:"Passphrase is incorrect",Device_CallInProgress:"Device call in progress"};class n extends Error{constructor(r,s){super(s),this.code=r,this.message=s}}e.TrezorError=n,e.TypedError=(a,r)=>new n(a,r||e.ERROR_CODES[a]),e.serializeError=a=>a&&a.error instanceof Error?{error:a.error.message,code:a.error.code}:a,e.LIBUSB_ERROR_MESSAGE="LIBUSB_ERROR"},35082:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PROTO=e.NEM=e.CARDANO=e.NETWORK=e.ERRORS=void 0;const i=n(97582);e.ERRORS=i.__importStar(n(22244)),e.NETWORK=i.__importStar(n(34374)),e.CARDANO=i.__importStar(n(63141)),e.NEM=i.__importStar(n(65043)),e.PROTO=i.__importStar(n(23263))},65043:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TxVersion=e.TxType=e.Networks=void 0},34374:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MODULES=e.TYPES=void 0,e.TYPES={bitcoin:"Bitcoin",ethereum:"Ethereum",eos:"Eos",nem:"NEM",stellar:"Stellar",cardano:"Cardano",ripple:"Ripple",tezos:"Tezos",binance:"Binance",solana:"Solana"},e.MODULES=["binance","cardano","eos","ethereum","nem","ripple","solana","stellar","tezos"]},71998:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.config=void 0;const i=n(12942);e.config={webusb:i.TREZOR_USB_DESCRIPTORS,whitelist:[{origin:"chrome-extension://imloifkgjagghnncjkhggdhalmcnfklk",priority:1},{origin:"chrome-extension://niebkpllfhmpfbffbfifagfgoamhpflf",priority:1},{origin:"file://",priority:2},{origin:"trezor.io",priority:0},{origin:"sldev.cz",priority:0},{origin:"localhost",priority:0},{origin:"trezoriovpjcahpzkrewelclulmszwbqpzmzgub37gbcjlvluxtruqad.onion",priority:0}],management:[{origin:"trezor.io"},{origin:"sldev.cz"},{origin:"localhost"}],knownHosts:[{origin:"imloifkgjagghnncjkhggdhalmcnfklk",label:"Trezor Password Manager (Develop)",icon:""},{origin:"niebkpllfhmpfbffbfifagfgoamhpflf",label:"Trezor Password Manager",icon:""},{origin:"mnpfhpndmjholfdlhpkjfmjkgppmodaf",label:"MetaMask",icon:""},{origin:"[email protected]",label:"MetaMask",icon:""},{origin:"nkbihfbeogaeaoehlefnkodbefgpgknn",label:"MetaMask",icon:""},{origin:"file://",label:" ",icon:""}],onionDomains:{"trezor.io":"trezoriovpjcahpzkrewelclulmszwbqpzmzgub37gbcjlvluxtruqad.onion"},assets:[{name:"coins",url:"./data/coins.json"},{name:"coinsEth",url:"./data/coins-eth.json"},{name:"bridge",url:"./data/bridge/releases.json"},{name:"firmware-t1b1",url:"./data/firmware/t1b1/releases.json"},{name:"firmware-t2t1",url:"./data/firmware/t2t1/releases.json"},{name:"firmware-t2b1",url:"./data/firmware/t2b1/releases.json"}],messages:"./data/messages/messages.json",supportedBrowsers:{chrome:{version:59,download:"https://www.google.com/chrome/",update:"https://support.google.com/chrome/answer/95414"},chromium:{version:59,download:"https://www.chromium.org/",update:"https://www.chromium.org/"},electron:{version:0,download:"https://www.electronjs.org/",update:"https://www.electronjs.org/"},firefox:{version:54,download:"https://www.mozilla.org/en-US/firefox/new/",update:"https://support.mozilla.org/en-US/kb/update-firefox-latest-version"}},supportedFirmware:[{coin:["xrp","txrp"],methods:["getAccountInfo"],min:{T1B1:"0",T2T1:"2.1.0"},max:void 0,comment:["Since firmware 2.1.0 there is a new protobuf field 'destination_tag' in RippleSignTx"]},{coin:["bnb"],min:{T1B1:"1.9.0",T2T1:"2.3.0"},comment:["There were protobuf backwards incompatible changes with introduction of 1.9.0/2.3.0 firmwares"]},{coin:["eth","tsep","tgor"],min:{T1B1:"1.8.0",T2T1:"2.1.0"},comment:["There were protobuf backwards incompatible changes."]},{methods:["rippleGetAddress","rippleSignTransaction"],min:{T1B1:"0",T2T1:"2.1.0"},comment:["Since firmware 2.1.0 there is a new protobuf field 'destination_tag' in RippleSignTx"]},{methods:["cardanoGetAddress","cardanoGetPublicKey"],min:{T1B1:"0",T2T1:"2.3.2"},comment:["Shelley fork support since firmware 2.3.2"]},{methods:["cardanoSignTransaction"],min:{T1B1:"0",T2T1:"2.4.2"},comment:["Non-streamed signing no longer supported"]},{methods:["cardanoGetNativeScriptHash"],min:{T1B1:"0",T2T1:"2.4.3"},comment:["Cardano GetNativeScriptHash call added in 2.4.3"]},{methods:["tezosSignTransaction"],min:{T1B1:"0",T2T1:"2.1.8"},comment:["Since 2.1.8 there are new protobuf fields in tezos transaction (Babylon fork)"]},{methods:["stellarSignTransaction"],min:{T1B1:"1.9.0",T2T1:"2.3.0"},comment:["There were protobuf backwards incompatible changes with introduction of 1.9.0/2.3.0 firmwares"]},{capabilities:["replaceTransaction","amountUnit"],min:{T1B1:"1.9.4",T2T1:"2.3.5"},comment:["new sign tx process since 1.9.4/2.3.5"]},{capabilities:["decreaseOutput"],min:{T1B1:"1.10.0",T2T1:"2.4.0"},comment:["allow reduce output in RBF transaction since 1.10.0/2.4.0"]},{capabilities:["eip1559"],min:{T1B1:"1.10.4",T2T1:"2.4.2"},comment:["new eth transaction pricing mechanism (EIP1559) since 1.10.4/2.4.2"]},{capabilities:["taproot","signMessageNoScriptType"],min:{T1B1:"1.10.4",T2T1:"2.4.3"},comment:["new btc accounts taproot since 1.10.4/2.4.3 (BTC + TEST only)","SignMessage with no_script_type support"]},{coin:["dcr","tdcr"],methods:["signTransaction"],min:{T1B1:"1.10.1",T2T1:"2.4.0"},comment:[""]},{methods:["ethereumSignTypedData"],min:{T1B1:"1.10.5",T2T1:"2.4.3"},comment:["EIP-712 typed signing support added in 1.10.5/2.4.3"]},{capabilities:["eip712-domain-only"],min:{T1B1:"1.10.6",T2T1:"2.4.4"},comment:["EIP-712 domain-only signing, when primaryType=EIP712Domain"]},{capabilities:["coinjoin"],methods:["authorizeCoinjoin","cancelCoinjoinAuthorization","getOwnershipId","getOwnershipProof","setBusy","unlockPath"],min:{T1B1:"1.12.1",T2T1:"2.5.3"}},{methods:["showDeviceTutorial","authenticateDevice"],min:{T1B1:"0",T2T1:"0",T2B1:"2.6.1"},comment:["Only on T2B1"]},{methods:["rebootToBootloader"],min:{T1B1:"1.11.0",T2T1:"2.6.0"}},{methods:["getFirmwareHash"],min:{T1B1:"1.11.1",T2T1:"2.5.1"}},{methods:["solanaGetPublicKey","solanaGetAddress","solanaSignTransaction"],min:{T1B1:"0",T2T1:"2.7.0",T2B1:"2.7.0"}}]}},11116:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseConnectSettings=e.corsValidator=e.DEFAULT_PRIORITY=void 0;const i=n(24350);e.DEFAULT_PRIORITY=2;const u={configSrc:"./data/config.json",version:i.VERSION,debug:!1,priority:e.DEFAULT_PRIORITY,trustedHost:!0,connectSrc:i.DEFAULT_DOMAIN,iframeSrc:`${i.DEFAULT_DOMAIN}iframe.html`,popup:!1,popupSrc:`${i.DEFAULT_DOMAIN}popup.html`,webusbSrc:`${i.DEFAULT_DOMAIN}webusb.html`,transports:void 0,pendingTransportEvent:!0,env:"node",lazyLoad:!1,timestamp:(new Date).getTime(),interactionTimeout:600,sharedLogger:!0};e.corsValidator=o=>{if("string"==typeof o&&(o.match(/^https:\/\/([A-Za-z0-9\-_]+\.)*trezor\.io\//)||o.match(/^https?:\/\/localhost:[58][0-9]{3}\//)||o.match(/^https:\/\/([A-Za-z0-9\-_]+\.)*sldev\.cz\//)||o.match(/^https?:\/\/([A-Za-z0-9\-_]+\.)*trezoriovpjcahpzkrewelclulmszwbqpzmzgub37gbcjlvluxtruqad\.onion\//)))return o},e.parseConnectSettings=(o={})=>{var p;const c={...u};"debug"in o&&("boolean"==typeof o.debug?c.debug=o.debug:"string"==typeof o.debug&&(c.debug="true"===o.debug)),!1===o.trustedHost&&(c.trustedHost=o.trustedHost),"string"==typeof o.connectSrc&&(null===(p=o.connectSrc)||void 0===p?void 0:p.startsWith("http"))?c.connectSrc=(0,e.corsValidator)(o.connectSrc):c.trustedHost&&(c.connectSrc=o.connectSrc);const f=c.connectSrc||i.DEFAULT_DOMAIN;return c.iframeSrc=`${f}iframe.html`,c.popupSrc=`${f}popup.html`,c.webusbSrc=`${f}webusb.html`,"boolean"==typeof o.transportReconnect&&(c.transportReconnect=o.transportReconnect),"boolean"==typeof o.webusb&&(c.webusb=o.webusb),Array.isArray(o.transports)&&(c.transports=o.transports),"boolean"==typeof o.popup&&(c.popup=o.popup),"boolean"==typeof o.lazyLoad&&(c.lazyLoad=o.lazyLoad),"boolean"==typeof o.pendingTransportEvent&&(c.pendingTransportEvent=o.pendingTransportEvent),"string"==typeof o.extension&&(c.extension=o.extension),"string"==typeof o.env&&(c.env=o.env),"number"==typeof o.timestamp&&(c.timestamp=o.timestamp),"number"==typeof o.interactionTimeout&&(c.interactionTimeout=o.interactionTimeout),"object"==typeof o.manifest&&(c.manifest=(o=>{if(o&&"string"==typeof o.email&&"string"==typeof o.appUrl)return{email:o.email,appUrl:o.appUrl}})(o.manifest)),"boolean"==typeof o.sharedLogger&&(c.sharedLogger=o.sharedLogger),c}},24350:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_DOMAIN=e.VERSION=void 0,e.VERSION="9.1.6";const n=e.VERSION.split(".").map(i=>parseInt(i,10));e.DEFAULT_DOMAIN=`https://connect.trezor.io/${n[0]}/`},68433:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createBlockchainMessage=e.BLOCKCHAIN=e.BLOCKCHAIN_EVENT=void 0,e.BLOCKCHAIN_EVENT="BLOCKCHAIN_EVENT",e.BLOCKCHAIN={CONNECT:"blockchain-connect",ERROR:"blockchain-error",BLOCK:"blockchain-block",NOTIFICATION:"blockchain-notification",FIAT_RATES_UPDATE:"fiat-rates-update"},e.createBlockchainMessage=(i,u)=>({event:e.BLOCKCHAIN_EVENT,type:i,payload:u})},1540:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createResponseMessage=e.RESPONSE_EVENT=void 0;const i=n(22244);e.RESPONSE_EVENT="RESPONSE_EVENT",e.createResponseMessage=(a,r,s)=>({event:e.RESPONSE_EVENT,type:e.RESPONSE_EVENT,id:a,success:r,payload:r?s:(0,i.serializeError)(s)})},39658:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorMessage=e.parseMessage=e.CORE_EVENT=void 0,e.CORE_EVENT="CORE_EVENT",e.parseMessage=u=>{const a={event:u.event,type:u.type,payload:u.payload};return"number"==typeof u.id&&(a.id=u.id),"boolean"==typeof u.success&&(a.success=u.success),a},e.createErrorMessage=u=>({success:!1,payload:{error:u.message,code:u.code}})},99397:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDeviceMessage=e.DEVICE=e.DEVICE_EVENT=void 0,e.DEVICE_EVENT="DEVICE_EVENT",e.DEVICE={CONNECT:"device-connect",CONNECT_UNACQUIRED:"device-connect_unacquired",DISCONNECT:"device-disconnect",CHANGED:"device-changed",ACQUIRE:"device-acquire",RELEASE:"device-release",ACQUIRED:"device-acquired",RELEASED:"device-released",USED_ELSEWHERE:"device-used_elsewhere",LOADING:"device-loading",BUTTON:"button",PIN:"pin",PASSPHRASE:"passphrase",PASSPHRASE_ON_DEVICE:"passphrase_on_device",WORD:"word"},e.createDeviceMessage=(i,u)=>({event:e.DEVICE_EVENT,type:i,payload:u})},60580:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createIFrameMessage=e.IFRAME=void 0;const i=n(93020);e.IFRAME={BOOTSTRAP:"iframe-bootstrap",LOADED:"iframe-loaded",INIT:"iframe-init",ERROR:"iframe-error",CALL:"iframe-call",LOG:"iframe-log"},e.createIFrameMessage=(a,r)=>({event:i.UI_EVENT,type:a,payload:r})},90956:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UI=void 0;const i=n(97582),u=n(93020),a=n(85220);i.__exportStar(n(68433),e),i.__exportStar(n(1540),e),i.__exportStar(n(39658),e),i.__exportStar(n(99397),e),i.__exportStar(n(60580),e),i.__exportStar(n(92507),e),i.__exportStar(n(55047),e),i.__exportStar(n(52883),e),i.__exportStar(n(93020),e),i.__exportStar(n(85220),e),e.UI={...u.UI_REQUEST,...a.UI_RESPONSE}},92507:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createPopupMessage=e.POPUP=void 0;const i=n(93020);e.POPUP={BOOTSTRAP:"popup-bootstrap",LOADED:"popup-loaded",CORE_LOADED:"popup-core-loaded",INIT:"popup-init",ERROR:"popup-error",EXTENSION_USB_PERMISSIONS:"open-usb-permissions",HANDSHAKE:"popup-handshake",CLOSED:"popup-closed",CANCEL_POPUP_REQUEST:"ui-cancel-popup-request",CLOSE_WINDOW:"window.close",ANALYTICS_RESPONSE:"popup-analytics-response",CONTENT_SCRIPT_LOADED:"popup-content-script-loaded",METHOD_INFO:"popup-method-info"},e.createPopupMessage=(a,r)=>({event:i.UI_EVENT,type:a,payload:r})},55047:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createTransportMessage=e.TRANSPORT_EVENT=e.TRANSPORT=void 0;const i=n(22244);var u=n(12942);Object.defineProperty(e,"TRANSPORT",{enumerable:!0,get:function(){return u.TRANSPORT}}),e.TRANSPORT_EVENT="TRANSPORT_EVENT",e.createTransportMessage=(r,s)=>({event:e.TRANSPORT_EVENT,type:r,payload:"error"in s?(0,i.serializeError)(s):s})},52883:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},93020:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createUiMessage=e.UI_REQUEST=e.UI_EVENT=void 0,e.UI_EVENT="UI_EVENT",e.UI_REQUEST={TRANSPORT:"ui-no_transport",BOOTLOADER:"ui-device_bootloader_mode",NOT_IN_BOOTLOADER:"ui-device_not_in_bootloader_mode",REQUIRE_MODE:"ui-device_require_mode",INITIALIZE:"ui-device_not_initialized",SEEDLESS:"ui-device_seedless",FIRMWARE_OLD:"ui-device_firmware_old",FIRMWARE_OUTDATED:"ui-device_firmware_outdated",FIRMWARE_NOT_SUPPORTED:"ui-device_firmware_unsupported",FIRMWARE_NOT_COMPATIBLE:"ui-device_firmware_not_compatible",FIRMWARE_NOT_INSTALLED:"ui-device_firmware_not_installed",FIRMWARE_PROGRESS:"ui-firmware-progress",DEVICE_NEEDS_BACKUP:"ui-device_needs_backup",REQUEST_UI_WINDOW:"ui-request_window",CLOSE_UI_WINDOW:"ui-close_window",REQUEST_PERMISSION:"ui-request_permission",REQUEST_CONFIRMATION:"ui-request_confirmation",REQUEST_PIN:"ui-request_pin",INVALID_PIN:"ui-invalid_pin",REQUEST_PASSPHRASE:"ui-request_passphrase",REQUEST_PASSPHRASE_ON_DEVICE:"ui-request_passphrase_on_device",INVALID_PASSPHRASE:"ui-invalid_passphrase",CONNECT:"ui-connect",LOADING:"ui-loading",SET_OPERATION:"ui-set_operation",SELECT_DEVICE:"ui-select_device",SELECT_ACCOUNT:"ui-select_account",SELECT_FEE:"ui-select_fee",UPDATE_CUSTOM_FEE:"ui-update_custom_fee",INSUFFICIENT_FUNDS:"ui-insufficient_funds",REQUEST_BUTTON:"ui-button",REQUEST_WORD:"ui-request_word",LOGIN_CHALLENGE_REQUEST:"ui-login_challenge_request",BUNDLE_PROGRESS:"ui-bundle_progress",ADDRESS_VALIDATION:"ui-address_validation",IFRAME_FAILURE:"ui-iframe_failure"},e.createUiMessage=(i,u)=>({event:e.UI_EVENT,type:i,payload:u})},85220:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createUiResponse=e.UI_RESPONSE=void 0;const i=n(93020);e.UI_RESPONSE={RECEIVE_PERMISSION:"ui-receive_permission",RECEIVE_CONFIRMATION:"ui-receive_confirmation",RECEIVE_PIN:"ui-receive_pin",RECEIVE_PASSPHRASE:"ui-receive_passphrase",RECEIVE_DEVICE:"ui-receive_device",RECEIVE_ACCOUNT:"ui-receive_account",RECEIVE_FEE:"ui-receive_fee",RECEIVE_WORD:"ui-receive_word",INVALID_PASSPHRASE_ACTION:"ui-invalid_passphrase_action",CHANGE_SETTINGS:"ui-change_settings",LOGIN_CHALLENGE_RESPONSE:"ui-login_challenge_response"},e.createUiResponse=(a,r)=>({event:i.UI_EVENT,type:a,payload:r})},52936:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseConnectSettings=void 0;const i=n(97582);i.__exportStar(n(35082),e),i.__exportStar(n(90956),e),i.__exportStar(n(56826),e);var u=n(11116);Object.defineProperty(e,"parseConnectSettings",{enumerable:!0,get:function(){return u.parseConnectSettings}})},72846:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.factory=void 0;const i=n(90956);e.factory=({eventEmitter:a,manifest:r,init:s,call:o,requestLogin:p,uiResponse:c,renderWebUSBButton:f,disableWebUSB:I,requestWebUSBDevice:S,cancel:v,dispose:_})=>({manifest:r,init:s,getSettings:()=>o({method:"getSettings"}),on:(t,h)=>{a.on(t,h)},off:(t,h)=>{a.removeListener(t,h)},removeAllListeners:t=>{"string"==typeof t?a.removeAllListeners(t):a.removeAllListeners()},uiResponse:c,blockchainGetAccountBalanceHistory:t=>o({...t,method:"blockchainGetAccountBalanceHistory"}),blockchainGetCurrentFiatRates:t=>o({...t,method:"blockchainGetCurrentFiatRates"}),blockchainGetFiatRatesForTimestamps:t=>o({...t,method:"blockchainGetFiatRatesForTimestamps"}),blockchainDisconnect:t=>o({...t,method:"blockchainDisconnect"}),blockchainEstimateFee:t=>o({...t,method:"blockchainEstimateFee"}),blockchainGetTransactions:t=>o({...t,method:"blockchainGetTransactions"}),blockchainSetCustomBackend:t=>o({...t,method:"blockchainSetCustomBackend"}),blockchainSubscribe:t=>o({...t,method:"blockchainSubscribe"}),blockchainSubscribeFiatRates:t=>o({...t,method:"blockchainSubscribeFiatRates"}),blockchainUnsubscribe:t=>o({...t,method:"blockchainUnsubscribe"}),blockchainUnsubscribeFiatRates:t=>o({...t,method:"blockchainUnsubscribeFiatRates"}),requestLogin:t=>p(t),cardanoGetAddress:t=>o({...t,method:"cardanoGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),cardanoGetNativeScriptHash:t=>o({...t,method:"cardanoGetNativeScriptHash"}),cardanoGetPublicKey:t=>o({...t,method:"cardanoGetPublicKey"}),cardanoSignTransaction:t=>o({...t,method:"cardanoSignTransaction"}),cardanoComposeTransaction:t=>o({...t,method:"cardanoComposeTransaction"}),cipherKeyValue:t=>o({...t,method:"cipherKeyValue"}),composeTransaction:t=>o({...t,method:"composeTransaction"}),ethereumGetAddress:t=>o({...t,method:"ethereumGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),ethereumGetPublicKey:t=>o({...t,method:"ethereumGetPublicKey"}),ethereumSignMessage:t=>o({...t,method:"ethereumSignMessage"}),ethereumSignTransaction:t=>o({...t,method:"ethereumSignTransaction"}),ethereumSignTypedData:t=>o({...t,method:"ethereumSignTypedData"}),ethereumVerifyMessage:t=>o({...t,method:"ethereumVerifyMessage"}),getAccountDescriptor:t=>o({...t,method:"getAccountDescriptor"}),getAccountInfo:t=>o({...t,method:"getAccountInfo"}),getAddress:t=>o({...t,method:"getAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),getDeviceState:t=>o({...t,method:"getDeviceState"}),getFeatures:t=>o({...t,method:"getFeatures"}),getFirmwareHash:t=>o({...t,method:"getFirmwareHash"}),getOwnershipId:t=>o({...t,method:"getOwnershipId"}),getOwnershipProof:t=>o({...t,method:"getOwnershipProof"}),getPublicKey:t=>o({...t,method:"getPublicKey"}),nemGetAddress:t=>o({...t,method:"nemGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),nemSignTransaction:t=>o({...t,method:"nemSignTransaction"}),pushTransaction:t=>o({...t,method:"pushTransaction"}),rippleGetAddress:t=>o({...t,method:"rippleGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),rippleSignTransaction:t=>o({...t,method:"rippleSignTransaction"}),signMessage:t=>o({...t,method:"signMessage"}),signTransaction:t=>o({...t,method:"signTransaction"}),solanaGetPublicKey:t=>o({...t,method:"solanaGetPublicKey"}),solanaGetAddress:t=>o({...t,method:"solanaGetAddress"}),solanaSignTransaction:t=>o({...t,method:"solanaSignTransaction"}),stellarGetAddress:t=>o({...t,method:"stellarGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),stellarSignTransaction:t=>o({...t,method:"stellarSignTransaction"}),tezosGetAddress:t=>o({...t,method:"tezosGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),tezosGetPublicKey:t=>o({...t,method:"tezosGetPublicKey"}),tezosSignTransaction:t=>o({...t,method:"tezosSignTransaction"}),unlockPath:t=>o({...t,method:"unlockPath"}),eosGetPublicKey:t=>o({...t,method:"eosGetPublicKey"}),eosSignTransaction:t=>o({...t,method:"eosSignTransaction"}),binanceGetAddress:t=>o({...t,method:"binanceGetAddress",useEventListener:a.listenerCount(i.UI.ADDRESS_VALIDATION)>0}),binanceGetPublicKey:t=>o({...t,method:"binanceGetPublicKey"}),binanceSignTransaction:t=>o({...t,method:"binanceSignTransaction"}),verifyMessage:t=>o({...t,method:"verifyMessage"}),resetDevice:t=>o({...t,method:"resetDevice"}),wipeDevice:t=>o({...t,method:"wipeDevice"}),checkFirmwareAuthenticity:t=>o({...t,method:"checkFirmwareAuthenticity"}),applyFlags:t=>o({...t,method:"applyFlags"}),applySettings:t=>o({...t,method:"applySettings"}),authenticateDevice:t=>o({...t,method:"authenticateDevice"}),authorizeCoinjoin:t=>o({...t,method:"authorizeCoinjoin"}),cancelCoinjoinAuthorization:t=>o({...t,method:"cancelCoinjoinAuthorization"}),showDeviceTutorial:t=>o({...t,method:"showDeviceTutorial"}),backupDevice:t=>o({...t,method:"backupDevice"}),changePin:t=>o({...t,method:"changePin"}),firmwareUpdate:t=>o({...t,method:"firmwareUpdate"}),recoveryDevice:t=>o({...t,method:"recoveryDevice"}),getCoinInfo:t=>o({...t,method:"getCoinInfo"}),rebootToBootloader:t=>o({...t,method:"rebootToBootloader"}),setBusy:t=>o({...t,method:"setBusy"}),setProxy:t=>o({...t,method:"setProxy"}),dispose:_,cancel:v,renderWebUSBButton:f,disableWebUSB:I,requestWebUSBDevice:S})},17316:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},66415:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},81331:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},12709:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},50148:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},13350:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},85597:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},52700:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},61749:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},10353:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},59044:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},53054:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},45292:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeviceModelInternal=e.FirmwareType=void 0;var u=n(23263);Object.defineProperty(e,"DeviceModelInternal",{enumerable:!0,get:function(){return u.DeviceModelInternal}})},3956:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},45866:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},56826:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});const i=n(97582);i.__exportStar(n(85597),e),i.__exportStar(n(17316),e),i.__exportStar(n(53054),e),i.__exportStar(n(45292),e),i.__exportStar(n(3956),e),i.__exportStar(n(45866),e),i.__exportStar(n(5543),e),i.__exportStar(n(98198),e),i.__exportStar(n(12709),e),i.__exportStar(n(66415),e),i.__exportStar(n(81331),e),i.__exportStar(n(50148),e),i.__exportStar(n(52700),e),i.__exportStar(n(13350),e),i.__exportStar(n(61749),e),i.__exportStar(n(10353),e),i.__exportStar(n(59044),e)},5543:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},98198:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},59309:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getLog=e.enableLogByPrefix=e.enableLog=e.setLogWriter=e.initLog=e.Log=void 0;const n="#bada55",i="#20abd8",u="#f4a744",r={"@trezor/connect":`color: ${i}; background: #000;`,"@trezor/connect-web":`color: ${i}; background: #000;`,IFrame:`color: ${u}; background: #000;`,Core:`color: ${u}; background: #000;`,DeviceList:`color: ${n}; background: #000;`,Device:`color: ${n}; background: #000;`,DeviceCommands:`color: ${n}; background: #000;`,"@trezor/transport":`color: ${n}; background: #000;`,InteractionTimeout:`color: ${n}; background: #000;`,"@trezor/connect-popup":"color: #fbd948; background: #000;"};class o{constructor(t,h,R){this.prefix=t,this.enabled=h,this.messages=[],this.css="undefined"!=typeof window&&r[t]?r[t]:"",R&&(this.logWriter=R)}addMessage(t,h,...R){const P={level:t,prefix:h,css:this.css,message:R,timestamp:Date.now()};if(this.messages.push(P),this.logWriter)try{this.logWriter.add(P)}catch(T){console.error("There was an error adding log message",T,P)}this.messages.length>100&&this.messages.shift()}setWriter(t){this.logWriter=t}log(...t){this.addMessage("log",this.prefix,...t),this.enabled&&console.log(`%c${this.prefix}`,this.css,...t)}error(...t){this.addMessage("error",this.prefix,...t),this.enabled&&console.error(`%c${this.prefix}`,this.css,...t)}warn(...t){this.addMessage("warn",this.prefix,...t),this.enabled&&console.warn(`%c${this.prefix}`,this.css,...t)}debug(...t){this.addMessage("debug",this.prefix,...t),this.enabled&&(this.css?console.log(`%c${this.prefix}`,this.css,...t):console.log(this.prefix,...t))}}e.Log=o;const p={};let c;e.initLog=(d,t,h)=>{const P=new o(d,!!t,h||c);return p[d]=P,P},e.setLogWriter=d=>{Object.keys(p).forEach(t=>{if(c=d(),c){p[t].setWriter(c);const{messages:h}=p[t];h.forEach(R=>{null==c||c.add(R)})}})},e.enableLog=d=>{Object.keys(p).forEach(t=>{p[t].enabled=!!d})},e.enableLogByPrefix=(d,t)=>{p[d]&&(p[d].enabled=t)},e.getLog=()=>{let d=[];return Object.keys(p).forEach(t=>{d=d.concat(p[t].messages)}),d.sort((t,h)=>t.timestamp-h.timestamp),d}},82050:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getOnionDomain=e.getHost=e.getOrigin=void 0;const i=n(16260);e.getOrigin=s=>{var o;if("string"!=typeof s)return"unknown";if(0===s.indexOf("file://"))return"file://";const[p]=null!==(o=s.match(/^https?:\/\/[^/]+/))&&void 0!==o?o:[];return p??"unknown"},e.getHost=s=>{var o;if("string"!=typeof s)return;const[,,p]=null!==(o=s.match(/^(https?):\/\/([^:/]+)?/i))&&void 0!==o?o:[];if(p){const c=p.split(".");return c.length>2?c.slice(c.length-2,c.length).join("."):p}},e.getOnionDomain=(s,o)=>{var p;return Array.isArray(s)?s.map(c=>{var f;return null!==(f=(0,i.urlToOnion)(c,o))&&void 0!==f?f:c}):"string"==typeof s&&null!==(p=(0,i.urlToOnion)(s,o))&&void 0!==p?p:s}},23263:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TezosBallotType=e.TezosContractType=e.StellarSignerType=e.StellarMemoType=e.StellarAssetType=e.NEMImportanceTransferMode=e.NEMModificationType=e.NEMSupplyChangeType=e.NEMMosaicLevy=e.MoneroNetworkType=e.Enum_WordRequestType=e.RecoveryDeviceType=e.SdProtectOperationType=e.Enum_Capability=e.Enum_HomescreenFormat=e.Enum_SafetyCheckLevel=e.Enum_BackupType=e.EthereumDataType=e.EthereumDefinitionType=e.DebugPhysicalButton=e.DebugButton=e.Enum_PinMatrixRequestType=e.Enum_ButtonRequestType=e.FailureType=e.CardanoTxWitnessType=e.CardanoTxSigningMode=e.CardanoCVoteRegistrationFormat=e.CardanoTxAuxiliaryDataSupplementType=e.CardanoPoolRelayType=e.CardanoCertificateType=e.CardanoTxOutputSerializationFormat=e.CardanoNativeScriptHashDisplayFormat=e.CardanoNativeScriptType=e.CardanoAddressType=e.CardanoDerivationType=e.Enum_RequestType=e.AmountUnit=e.DecredStakingSpendType=e.Enum_OutputScriptType=e.Enum_InputScriptType=e.BinanceTimeInForce=e.BinanceOrderSide=e.BinanceOrderType=e.DeviceModelInternal=void 0},12942:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TRANSPORT=e.ACTION_TIMEOUT=e.TREZOR_USB_DESCRIPTORS=e.T1_HID_VENDOR=e.ENDPOINT_ID=e.INTERFACE_ID=e.CONFIGURATION_ID=void 0,e.CONFIGURATION_ID=1,e.INTERFACE_ID=0,e.ENDPOINT_ID=1,e.T1_HID_VENDOR=21324,e.TREZOR_USB_DESCRIPTORS=[{vendorId:21324,productId:1},{vendorId:4617,productId:21440},{vendorId:4617,productId:21441}],e.ACTION_TIMEOUT=1e4,e.TRANSPORT={START:"transport-start",ERROR:"transport-error",UPDATE:"transport-update",DISABLE_WEBUSB:"transport-disable_webusb",REQUEST_DEVICE:"transport-request_device"}},52088:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addDashesToSpaces=void 0,e.addDashesToSpaces=i=>i.replace(/\s+/g,"-")},75021:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.arrayDistinct=void 0,e.arrayDistinct=(i,u,a)=>a.indexOf(i)===u},52581:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.arrayPartition=void 0,e.arrayPartition=(i,u)=>i.reduce(([a,r],s)=>u(s)?[[...a,s],r]:[a,[...r,s]],[[],[]])},81917:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.arrayShuffle=void 0,e.arrayShuffle=i=>{const u=i.slice();for(let a=u.length-1;a>0;a--){const r=Math.floor(Math.random()*(a+1));[u[a],u[r]]=[u[r],u[a]]}return u}},92676:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.arrayToDictionary=void 0;const n=u=>!!["string","number"].includes(typeof u);e.arrayToDictionary=(u,a,r)=>u.reduce(r?(s,o)=>{var p;const c=a(o);return n(c)?Object.assign(Object.assign({},s),{[c]:[...null!==(p=s[c])&&void 0!==p?p:[],o]}):s}:(s,o)=>{const p=a(o);return n(p)?Object.assign(Object.assign({},s),{[p]:o}):s},{})},5518:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getChunkSize=e.reverseBuffer=void 0,e.reverseBuffer=u=>{if(u.length<1)return u;const a=Buffer.alloc(u.length);let r=a.length-1;for(let s=0;s<a.length/2;s++)a[s]=u[r],a[r]=u[s],r--;return a},e.getChunkSize=u=>{const a=Buffer.allocUnsafe(1);return a.writeUInt8(u),a}},44371:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.bytesToHumanReadable=void 0;const n=["B","KB","MB","GB","TB"];e.bytesToHumanReadable=u=>{let a=Math.abs(u),r=0;for(;a>=1024||r>=n.length;)a/=1024,r++;return`${a.toFixed(1)} ${n[r]}`}},69453:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.capitalizeFirstLetter=void 0,e.capitalizeFirstLetter=i=>i.charAt(0).toUpperCase()+i.slice(1)},75387:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.cloneObject=void 0,e.cloneObject=i=>{const u=JSON.stringify(i);return void 0===u?i:JSON.parse(u)}},27371:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.countBytesInString=void 0,e.countBytesInString=i=>encodeURI(i).split(/%..|./).length-1},30009:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createCooldown=void 0,e.createCooldown=i=>{let u=0;return()=>{const a=Date.now();return a-u>=i&&(u=a,!0)}}},95867:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createDeferred=void 0,e.createDeferred=i=>{let u=()=>{},a=()=>{};const r=new Promise((s,o)=>{u=s,a=o});return{id:i,resolve:u,reject:a,promise:r}}},51293:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createTimeoutPromise=void 0,e.createTimeoutPromise=i=>new Promise(u=>setTimeout(u,i))},67682:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getValueByKey=e.getKeyByValue=void 0,e.getKeyByValue=function(u,a){return u&&Object.keys(u).find(r=>u[r]===a)},e.getValueByKey=function(u,a){const r=u&&Object.keys(u).find(s=>s===a);return r&&u[r]}},67539:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getLocaleSeparators=void 0,e.getLocaleSeparators=i=>{var u,a;const s=new Intl.NumberFormat(i).formatToParts(10000.1);return{decimalSeparator:null===(u=s.find(({type:c})=>"decimal"===c))||void 0===u?void 0:u.value,thousandsSeparator:null===(a=s.find(({type:c})=>"group"===c))||void 0===a?void 0:a.value}}},65548:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getNumberFromPixelString=void 0,e.getNumberFromPixelString=i=>parseInt(i.replace("px",""),10)},9830:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRandomNumberInRange=void 0,e.getRandomNumberInRange=(i,u)=>Math.floor(Math.random()*(u-i+1))+i},60299:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSynchronize=void 0,e.getSynchronize=()=>{let i;return u=>{const a=(i??Promise.resolve()).catch(()=>{}).then(u).finally(()=>{i===a&&(i=void 0)});return i=a,i}}},27749:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getWeakRandomId=void 0,e.getWeakRandomId=i=>{let u="";const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r<i;r++)u+=a.charAt(Math.floor(Math.random()*a.length));return u}},91873:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.hasUppercaseLetter=void 0;const n=new RegExp("^(.*[A-Z].*)$");e.hasUppercaseLetter=u=>n.test(u)},16260:function(y,e,n){var i=this&&this.__createBinding||(Object.create?function(s,o,p,c){void 0===c&&(c=p);var f=Object.getOwnPropertyDescriptor(o,p);(!f||("get"in f?!o.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return o[p]}}),Object.defineProperty(s,c,f)}:function(s,o,p,c){void 0===c&&(c=p),s[c]=o[p]}),u=this&&this.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),a=this&&this.__exportStar||function(s,o){for(var p in s)"default"!==p&&!Object.prototype.hasOwnProperty.call(o,p)&&i(o,s,p)},r=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(null!=s)for(var p in s)"default"!==p&&Object.prototype.hasOwnProperty.call(s,p)&&i(o,s,p);return u(o,s),o};Object.defineProperty(e,"__esModule",{value:!0}),e.xssFilters=e.versionUtils=e.enumUtils=e.bufferUtils=void 0,a(n(75021),e),a(n(52581),e),a(n(81917),e),a(n(92676),e),e.bufferUtils=r(n(5518)),a(n(44371),e),a(n(69453),e),a(n(75387),e),a(n(27371),e),a(n(30009),e),a(n(95867),e),a(n(51293),e),e.enumUtils=r(n(67682)),a(n(65548),e),a(n(9830),e),a(n(60299),e),a(n(27749),e),a(n(91873),e),a(n(59777),e),a(n(62880),e),a(n(25733),e),a(n(46346),e),a(n(88933),e),a(n(59827),e),a(n(45400),e),a(n(53380),e),a(n(4415),e),a(n(54891),e),a(n(76312),e),a(n(10987),e),a(n(91248),e),a(n(5210),e),a(n(82317),e),e.versionUtils=r(n(92565)),e.xssFilters=r(n(73225)),a(n(67539),e),a(n(52088),e)},59777:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isAscii=void 0,e.isAscii=function(i){return!i||/^[\x00-\x7F]*$/.test(i)}},62880:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isHex=void 0,e.isHex=i=>/^(0x|0X)?[0-9A-Fa-f]+$/g.test(i)},25733:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNotUndefined=void 0,e.isNotUndefined=i=>void 0!==i},46346:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isUrl=void 0;const n=/^(http|ws)s?:\/\/[a-z0-9]([a-z0-9.-]+)?(:[0-9]{1,5})?((\/)?(([a-z0-9-_])+(\/)?)+)$/i;e.isUrl=u=>n.test(u)},88933:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mergeDeepObject=void 0;const n=a=>{if("object"==typeof a&&null!==a){if("function"==typeof Object.getPrototypeOf){const r=Object.getPrototypeOf(a);return r===Object.prototype||null===r}return"[object Object]"===Object.prototype.toString.call(a)}return!1};e.mergeDeepObject=(...a)=>a.reduce((r,s)=>{if(Array.isArray(s))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(s).forEach(o=>{["__proto__","constructor","prototype"].includes(o)||(r[o]=Array.isArray(r[o])&&Array.isArray(s[o])?e.mergeDeepObject.options.mergeArrays?Array.from(new Set(r[o].concat(s[o]))):s[o]:n(r[o])&&n(s[o])?(0,e.mergeDeepObject)(r[o],s[o]):s[o])}),r},{});const u={mergeArrays:!0};e.mergeDeepObject.options=u,e.mergeDeepObject.withOptions=(a,...r)=>{e.mergeDeepObject.options=Object.assign({mergeArrays:!0},a);const s=(0,e.mergeDeepObject)(...r);return e.mergeDeepObject.options=u,s}},59827:function(y,e){var n=this&&this.__rest||function(u,a){var r={};for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&a.indexOf(s)<0&&(r[s]=u[s]);if(null!=u&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(u);o<s.length;o++)a.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(u,s[o])&&(r[s[o]]=u[s[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.objectPartition=void 0,e.objectPartition=(u,a)=>a.reduce(([r,s],o)=>{const f=s[o],I=n(s,["symbol"==typeof o?o:o+""]);return void 0!==f?[Object.assign(Object.assign({},r),{[o]:f}),I]:[r,s]},[{},u])},45400:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseElectrumUrl=void 0;const n=/^(?:([a-zA-Z0-9.-]+)|\[([a-f0-9:]+)\]):([0-9]{1,5}):([ts])$/;e.parseElectrumUrl=u=>{var a;const r=u.match(n);if(r)return{host:null!==(a=r[1])&&void 0!==a?a:r[2],port:Number.parseInt(r[3],10),protocol:r[4]}}},53380:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseHostname=void 0;const n=/^([a-z0-9.+-]+:\/\/)?([a-z0-9.-]+)([:/][^:/]+)*\/?$/i;e.parseHostname=u=>{var a,r;return null===(r=null===(a=u.match(n))||void 0===a?void 0:a[2])||void 0===r?void 0:r.toLowerCase()}},4415:function(y,e){var n=this&&this.__awaiter||function(u,a,r,s){return new(r||(r=Promise))(function(p,c){function f(v){try{S(s.next(v))}catch(_){c(_)}}function I(v){try{S(s.throw(v))}catch(_){c(_)}}function S(v){v.done?p(v.value):function(p){return p instanceof r?p:new r(function(c){c(p)})}(v.value).then(f,I)}S((s=s.apply(u,a||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.promiseAllSequence=void 0,e.promiseAllSequence=u=>n(void 0,void 0,void 0,function*(){const a=[];for(let r=0;r<u.length;++r){const s=yield u[r]();a.push(s)}return a})},54891:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.redactUserPathFromString=e.startOfUserPathRegex=void 0,e.startOfUserPathRegex=/([/\\][Uu]sers[/\\]{1,4})([^"^'^[^\]^/^\\]*)/g,e.redactUserPathFromString=i=>i.replace(e.startOfUserPathRegex,"$1[*]")},76312:function(y,e){var n=this&&this.__awaiter||function(S,v,_,d){return new(_||(_=Promise))(function(h,R){function P(m){try{l(d.next(m))}catch(E){R(E)}}function T(m){try{l(d.throw(m))}catch(E){R(E)}}function l(m){m.done?h(m.value):function(h){return h instanceof _?h:new _(function(R){R(h)})}(m.value).then(P,T)}l((d=d.apply(S,v||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.scheduleAction=void 0;const i=S=>Array.isArray(S),u=()=>new Error("Aborted by signal"),a=()=>new Error("Aborted by deadline"),r=()=>new Error("Aborted by timeout"),s=(S,v)=>new Promise((_,d)=>{if(v.aborted)return d();if(void 0===S)return _();const t=setTimeout(_,S),h=()=>{clearTimeout(t),v.removeEventListener("abort",h),d()};v.addEventListener("abort",h)}),o=(S,v,_)=>new Promise((d,t)=>{if(_.aborted)return t();const h=void 0!==S?setTimeout(()=>t(v()),S):void 0,R=()=>{clearTimeout(h),_.removeEventListener("abort",R),t()};_.addEventListener("abort",R)}),p=(S,v)=>new Promise((_,d)=>{if(v.aborted)return d();if(null==S?void 0:S.aborted)return d(u());const t=()=>d(u());null==S||S.addEventListener("abort",t);const h=()=>{null==S||S.removeEventListener("abort",t),v.removeEventListener("abort",h),d()};v.addEventListener("abort",h)}),c=(S,v)=>n(void 0,void 0,void 0,function*(){const _=new AbortController,d=()=>_.abort();v.aborted&&d(),v.addEventListener("abort",d);try{return yield new Promise(t=>t(S(_.signal)))}finally{v.removeEventListener("abort",d)}});e.scheduleAction=(S,v)=>n(void 0,void 0,void 0,function*(){const{signal:_,delay:d,attempts:t,timeout:h,deadline:R,gap:P}=v,T=R&&R-Date.now(),l=i(t)?t.length:t??(R?1/0:1),m=new AbortController,E=m.signal,g=i(t)?N=>t[N]:()=>({timeout:h,gap:P});try{return yield Promise.race([p(_,E),o(T,a,E),s(d,E).then(()=>((S,v,_,d)=>n(void 0,void 0,void 0,function*(){for(let t=0;t<S-1&&!d.aborted;t++){const h=new AbortController,R=()=>h.abort();d.addEventListener("abort",R);try{return yield v(t,h.signal)}catch{R(),yield(N=t,O=void 0,s(null!==(O=g(N).gap)&&void 0!==O?O:0,E))}finally{d.removeEventListener("abort",R)}}var N,O;return d.aborted?Promise.reject():v(S-1,d)}))(l,(N,O)=>Promise.race([o(g(N).timeout,r,E),c(S,O)]),0,E))])}finally{m.abort()}})},10987:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=void 0,e.throwError=i=>{throw new Error(i)}},5210:(y,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.topologicalSort=void 0;const i=n(52581);e.topologicalSort=(a,r,s)=>{const o=[],p=f=>(0,i.arrayPartition)(f,I=>!f.some(S=>r(S,I)));let c=a;for(;c.length;){const[f,I]=p(c);if(!f.length)throw new Error("Cycle detected");o.push(...s?f.sort(s):f),c=I}return o}},91248:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.truncateMiddle=void 0,e.truncateMiddle=(i,u,a)=>i.length<=u+a?i:`${i.substring(0,u)}\u2026${i.substring(i.length-a,i.length)}`},82317:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.urlToOnion=void 0,e.urlToOnion=(i,u)=>{var a;const[,r,s,o,p]=null!==(a=i.match(/^(http|ws)s?:\/\/([^:/]+\.)?([^/.]+\.[^/.]+)(\/.*)?$/i))&&void 0!==a?a:[];if(o&&u[o])return`${r}://${s??""}${u[o]}${p??""}`}},92565:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeVersion=e.isNewerOrEqual=e.isEqual=e.isNewer=e.isVersionArray=void 0,e.isVersionArray=c=>{if(!Array.isArray(c)||3!==c.length)return!1;for(let f=0;f<c.length;f++){const I=c[f];if("number"!=typeof I||I<0)return!1}return!0};const i=c=>({major:c[0],minor:c[1],patch:c[2]}),u=c=>{const f=c.split(".").map(I=>Number(I));if(!(0,e.isVersionArray)(f))throw new Error(`version string is in wrong format: ${c}`);return f},a=c=>`${c[0]}.${c[1]}.${c[2]}`;e.isNewer=(c,f)=>{const I=i("string"==typeof c?u(c):c),S=i("string"==typeof f?u(f):f);return I.major-S.major!=0?I.major>S.major:I.minor-S.minor!=0?I.minor>S.minor:I.patch-S.patch!=0&&I.patch>S.patch},e.isEqual=(c,f)=>("string"==typeof c?c:a(c))===("string"==typeof f?f:a(f)),e.isNewerOrEqual=(c,f)=>(0,e.isNewer)(c,f)||(0,e.isEqual)(c,f),e.normalizeVersion=c=>c.replace(/\b0+(\d)/g,"$1")},73225:(y,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.inDoubleQuotes=e.inSingleQuotes=e.inHTML=void 0;const n=/</g,i=/'/g,u=/"/g;e.inHTML=o=>o.replace(n,"<"),e.inSingleQuotes=o=>o.replace(i,"'"),e.inDoubleQuotes=o=>o.replace(u,""")},93105:y=>{var i,e="object"==typeof Reflect?Reflect:null,n=e&&"function"==typeof e.apply?e.apply:function(l,m,E){return Function.prototype.apply.call(l,m,E)};i=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:function(l){return Object.getOwnPropertyNames(l)};var a=Number.isNaN||function(l){return l!=l};function r(){r.init.call(this)}y.exports=r,y.exports.once=function(T,l){return new Promise(function(m,E){function g(O){T.removeListener(l,N),E(O)}function N(){"function"==typeof T.removeListener&&T.removeListener("error",g),m([].slice.call(arguments))}P(T,l,N,{once:!0}),"error"!==l&&function(T,l,m){"function"==typeof T.on&&P(T,"error",l,{once:!0})}(T,g)})},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var s=10;function o(T){if("function"!=typeof T)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}function p(T){return void 0===T._maxListeners?r.defaultMaxListeners:T._maxListeners}function c(T,l,m,E){var g,N,O;if(o(m),void 0===(N=T._events)?(N=T._events=Object.create(null),T._eventsCount=0):(void 0!==N.newListener&&(T.emit("newListener",l,m.listener?m.listener:m),N=T._events),O=N[l]),void 0===O)O=N[l]=m,++T._eventsCount;else if("function"==typeof O?O=N[l]=E?[m,O]:[O,m]:E?O.unshift(m):O.push(m),(g=p(T))>0&&O.length>g&&!O.warned){O.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+O.length+" "+String(l)+" listeners added. Use emitter.setMaxListeners() to increase limit");B.name="MaxListenersExceededWarning",B.emitter=T,B.type=l,B.count=O.length,function(T){console&&console.warn&&console.warn(T)}(B)}return T}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function I(T,l,m){var E={fired:!1,wrapFn:void 0,target:T,type:l,listener:m},g=f.bind(E);return g.listener=m,E.wrapFn=g,g}function S(T,l,m){var E=T._events;if(void 0===E)return[];var g=E[l];return void 0===g?[]:"function"==typeof g?m?[g.listener||g]:[g]:m?function(T){for(var l=new Array(T.length),m=0;m<l.length;++m)l[m]=T[m].listener||T[m];return l}(g):_(g,g.length)}function v(T){var l=this._events;if(void 0!==l){var m=l[T];if("function"==typeof m)return 1;if(void 0!==m)return m.length}return 0}function _(T,l){for(var m=new Array(l),E=0;E<l;++E)m[E]=T[E];return m}function P(T,l,m,E){if("function"==typeof T.on)E.once?T.once(l,m):T.on(l,m);else{if("function"!=typeof T.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof T);T.addEventListener(l,function g(N){E.once&&T.removeEventListener(l,g),m(N)})}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(T){if("number"!=typeof T||T<0||a(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");s=T}}),r.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(l){if("number"!=typeof l||l<0||a(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this},r.prototype.getMaxListeners=function(){return p(this)},r.prototype.emit=function(l){for(var m=[],E=1;E<arguments.length;E++)m.push(arguments[E]);var g="error"===l,N=this._events;if(void 0!==N)g=g&&void 0===N.error;else if(!g)return!1;if(g){var O;if(m.length>0&&(O=m[0]),O instanceof Error)throw O;var B=new Error("Unhandled error."+(O?" ("+O.message+")":""));throw B.context=O,B}var D=N[l];if(void 0===D)return!1;if("function"==typeof D)n(D,this,m);else{var w=D.length,M=_(D,w);for(E=0;E<w;++E)n(M[E],this,m)}return!0},r.prototype.on=r.prototype.addListener=function(l,m){return c(this,l,m,!1)},r.prototype.prependListener=function(l,m){return c(this,l,m,!0)},r.prototype.once=function(l,m){return o(m),this.on(l,I(this,l,m)),this},r.prototype.prependOnceListener=function(l,m){return o(m),this.prependListener(l,I(this,l,m)),this},r.prototype.off=r.prototype.removeListener=function(l,m){var E,g,N,O,B;if(o(m),void 0===(g=this._events))return this;if(void 0===(E=g[l]))return this;if(E===m||E.listener===m)0==--this._eventsCount?this._events=Object.create(null):(delete g[l],g.removeListener&&this.emit("removeListener",l,E.listener||m));else if("function"!=typeof E){for(N=-1,O=E.length-1;O>=0;O--)if(E[O]===m||E[O].listener===m){B=E[O].listener,N=O;break}if(N<0)return this;0===N?E.shift():function(T,l){for(;l+1<T.length;l++)T[l]=T[l+1];T.pop()}(E,N),1===E.length&&(g[l]=E[0]),void 0!==g.removeListener&&this.emit("removeListener",l,B||m)}return this},r.prototype.removeAllListeners=function(l){var m,E,g;if(void 0===(E=this._events))return this;if(void 0===E.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==E[l]&&(0==--this._eventsCount?this._events=Object.create(null):delete E[l]),this;if(0===arguments.length){var O,N=Object.keys(E);for(g=0;g<N.length;++g)"removeListener"!==(O=N[g])&&this.removeAllListeners(O);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(m=E[l]))this.removeListener(l,m);else if(void 0!==m)for(g=m.length-1;g>=0;g--)this.removeListener(l,m[g]);return this},r.prototype.listeners=function(l){return S(this,l,!0)},r.prototype.rawListeners=function(l){return S(this,l,!1)},r.listenerCount=function(T,l){return"function"==typeof T.listenerCount?T.listenerCount(l):v.call(T,l)},r.prototype.listenerCount=v,r.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}}}]);