text: (this["webpackJsonpiearn-finance"]=this["webpackJsonpiearn-finance"]||[]).push([[7],{1439:function(e,t,n){"use strict";var r=n(1569),a=n(50);t.__esModule=!0;var o={UI_EVENT:!0,DEVICE_EVENT:!0,RESPONSE_EVENT:!0,TRANSPORT_EVENT:!0,BLOCKCHAIN_EVENT:!0,TRANSPORT:!0,UI:!0,DEVICE:!0,BLOCKCHAIN:!0};t.BLOCKCHAIN=t.DEVICE=t.UI=t.TRANSPORT=t.default=void 0;var i=a(n(627)),u=a(n(1523)),s=a(n(1524)),c=a(n(46)),d=n(1659);t.UI_EVENT=d.UI_EVENT,t.DEVICE_EVENT=d.DEVICE_EVENT,t.RESPONSE_EVENT=d.RESPONSE_EVENT,t.TRANSPORT_EVENT=d.TRANSPORT_EVENT,t.BLOCKCHAIN_EVENT=d.BLOCKCHAIN_EVENT;var f=r(n(1660));t.TRANSPORT=f;var p=r(n(1612)),l=r(n(1813)),E=r(n(1613));t.UI=E;var h=r(n(1661));t.DEVICE=h;var m=r(n(1662));t.BLOCKCHAIN=m;var _=r(n(1614)),v=a(n(1818)),S=r(n(1821)),w=a(n(1823)),T=r(n(1824)),N=n(1825),b=n(1826),O=(r(n(1827)),n(1839));Object.keys(O).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||(t[e]=O[e]))}));var I=n(1840);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(n,!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||(t[e]=I[e]))}));var y,g,A=new c.default,C=(0,T.init)("[trezor-connect.js]"),L=function(){var e=new v.default(y);return e.on(p.CLOSED,(function(){S.postMessage({type:p.CLOSED},!1)})),e},U=function(e){if(e.origin===S.origin){var t=(0,N.parseMessage)(e.data),n=t.id||0,r=t.event,a=t.type,o=t.payload;switch(C.log("handleMessage",t),r){case d.RESPONSE_EVENT:S.messagePromises[n]?(delete t.type,delete t.event,S.messagePromises[n].resolve(t),delete S.messagePromises[n]):C.warn("Unknown message id "+n);break;case d.DEVICE_EVENT:case d.TRANSPORT_EVENT:case d.BLOCKCHAIN_EVENT:A.emit(r,t),A.emit(a,o);break;case d.UI_EVENT:if(a===l.BOOTSTRAP){S.clearTimeout();break}if(a===p.BOOTSTRAP){g.cancelOpenTimeout();break}A.emit(r,t),A.emit(a,o),a===E.IFRAME_HANDSHAKE?o.error?S.initPromise.reject(new Error(o.error)):(g.setBroadcast(o.broadcast),S.initPromise.resolve()):a===p.CANCEL_POPUP_REQUEST?g.cancel():a===E.CLOSE_UI_WINDOW&&g.close();break;default:C.log("Undefined message",r,e)}}},D=function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===t&&(t={}),!S.instance){e.next=3;break}throw _.IFRAME_INITIALIZED;case 3:if(y||(y=(0,b.parse)(t)),y.manifest){e.next=6;break}throw _.MANIFEST_NOT_SET;case 6:if(y.supportedBrowser){e.next=8;break}throw _.BROWSER_NOT_SUPPORTED;case 8:return g||(g=L()),C.enabled=y.debug,window.addEventListener("message",U),window.addEventListener("beforeunload",(function(){g&&g.onBeforeUnload(),S.dispose()})),e.next=14,S.init(y);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S.instance||S.timeout){e.next=19;break}if((y=(0,b.parse)(y)).manifest){e.next=4;break}return e.abrupt("return",{success:!1,payload:{error:_.MANIFEST_NOT_SET.message}});case 4:if(y.supportedBrowser){e.next=6;break}return e.abrupt("return",{success:!1,payload:{error:_.BROWSER_NOT_SUPPORTED.message}});case 6:return(g=L()).request(!0),e.prev=8,e.next=11,D(y);case 11:return e.next=13,g.resolveLazyLoad();case 13:e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(8),g.close(),e.abrupt("return",{success:!1,payload:{error:e.t0}});case 19:if(!S.timeout){e.next=23;break}return e.abrupt("return",{success:!1,payload:{error:_.NO_IFRAME.message}});case 23:if(!S.error){e.next=25;break}return e.abrupt("return",{success:!1,payload:{error:S.error}});case 25:return y.popup&&g.request(),e.prev=26,e.next=29,S.postMessage({type:l.CALL,payload:t});case 29:if(!(n=e.sent)){e.next=35;break}return n.payload.error!==_.DEVICE_CALL_IN_PROGRESS.message&&g.unlock(),e.abrupt("return",n);case 35:return g.unlock(),e.abrupt("return",{success:!1,payload:{error:"No response from iframe"}});case 37:e.next=43;break;case 39:return e.prev=39,e.t1=e.catch(26),C.error("__call error",e.t1),e.abrupt("return",e.t1);case 43:case"end":return e.stop()}}),e,null,[[8,15],[26,39]])})));return function(t){return e.apply(this,arguments)}}(),B=function(e){S.postMessage({event:d.UI_EVENT,type:E.CUSTOM_MESSAGE_RESPONSE,payload:e})},k=function(){};(0,i.default)(k,"manifest",(function(e){y=(0,b.parse)({manifest:e})})),(0,i.default)(k,"getSettings",(0,s.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S.instance){e.next=2;break}return e.abrupt("return",{success:!1,payload:{error:"Iframe not initialized yet, you need to call TrezorConnect.init or any other method first."}});case 2:return e.next=4,P({method:"getSettings"});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))),(0,i.default)(k,"init",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"on",(function(e,t){A.on(e,t)})),(0,i.default)(k,"off",(function(e,t){A.removeListener(e,t)})),(0,i.default)(k,"uiResponse",(function(e){S.postMessage(x({event:d.UI_EVENT},e))})),(0,i.default)(k,"changeSettings",(function(e){var t=(0,b.parse)(e);C.enabled=t.debug,S.postMessage({type:E.CHANGE_SETTINGS,payload:t},!1)})),(0,i.default)(k,"blockchainDisconnect",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"blockchainDisconnect"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"blockchainEstimateFee",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"blockchainEstimateFee"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"blockchainSubscribe",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"blockchainSubscribe"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"blockchainUnsubscribe",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"blockchainUnsubscribe"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"customMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){var n,r,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"===typeof t.callback){e.next=2;break}return e.abrupt("return",{success:!1,payload:{error:'Parameter "callback" is not a function'}});case 2:return n=t.callback,delete t.callback,r=function(){var e=(0,s.default)(u.default.mark((function e(t){var r,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.data)||r.type!==E.CUSTOM_MESSAGE_REQUEST){e.next=6;break}return e.next=4,n(r.payload);case 4:a=e.sent,B(a||{message:"release"});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),window.addEventListener("message",r,!1),e.next=8,P(x({method:"customMessage"},t));case 8:return a=e.sent,window.removeEventListener("message",r),e.abrupt("return",a);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"requestLogin",function(){var e=(0,s.default)(u.default.mark((function e(t){var n,r,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!==typeof t.callback){e.next=12;break}return n=t.callback,delete t.callback,r=function(){var e=(0,s.default)(u.default.mark((function e(t){var r,a;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.data)||r.type!==E.LOGIN_CHALLENGE_REQUEST){e.next=13;break}return e.prev=2,e.next=5,n();case 5:a=e.sent,S.postMessage({event:d.UI_EVENT,type:E.LOGIN_CHALLENGE_RESPONSE,payload:a}),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.warn("TrezorConnect.requestLogin: callback error",e.t0),S.postMessage({event:d.UI_EVENT,type:E.LOGIN_CHALLENGE_RESPONSE,payload:e.t0.message});case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),window.addEventListener("message",r,!1),e.next=7,P(x({method:"requestLogin"},t,{asyncChallenge:!0}));case 7:return a=e.sent,window.removeEventListener("message",r),e.abrupt("return",a);case 12:return e.next=14,P(x({method:"requestLogin"},t));case 14:return e.abrupt("return",e.sent);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"resetDevice",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"resetDevice"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"cardanoGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"cardanoGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"cardanoGetPublicKey",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"cardanoGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"cardanoSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"cardanoSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"cipherKeyValue",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"cipherKeyValue"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"composeTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"composeTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"debugLinkDecision",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"debugLinkDecision"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"debugLinkGetState",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"debugLinkGetState"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"ethereumGetAccountInfo",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"ethereumGetAccountInfo"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"ethereumGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"ethereumGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"ethereumGetPublicKey",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"ethereumGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"ethereumSignMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"ethereumSignMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"ethereumSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"ethereumSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"ethereumVerifyMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"ethereumVerifyMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"getAccountInfo",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"getAccountInfo"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"getAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"getAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"getDeviceState",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"getDeviceState"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"getFeatures",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"getFeatures"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"getPublicKey",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"getPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"liskGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"liskGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"liskGetPublicKey",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"liskGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"liskSignMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"liskSignMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"liskSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"liskSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"liskVerifyMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"liskVerifyMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"nemGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"nemGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"nemSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"nemSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"pushTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"pushTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"rippleGetAccountInfo",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"rippleGetAccountInfo"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"rippleGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"rippleGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"rippleSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"rippleSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"signMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"signMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"signTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"signTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"stellarGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"stellarGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"stellarSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"stellarSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"tezosGetAddress",function(){var e=(0,s.default)(u.default.mark((function e(t){var n;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A.listenerCount(E.ADDRESS_VALIDATION)>0,e.next=3,P(x({method:"tezosGetAddress"},t,{useEventListener:n}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"tezosGetPublicKey",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"tezosGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"tezosSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"tezosSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"eosGetPublicKey",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"eosGetPublicKey"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"eosSignTransaction",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"eosSignTransaction"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"verifyMessage",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"verifyMessage"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"wipeDevice",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"wipeDevice"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"applyFlags",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"applyFlags"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"applySettings",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"applySettings"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"backupDevice",(0,s.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P({method:"backupDevice"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))),(0,i.default)(k,"changePin",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"changePin"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"firmwareErase",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"firmwareErase"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"firmwareUpload",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"firmwareUpload"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"firmwareUpdate",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"firmwareUpdate"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"recoveryDevice",function(){var e=(0,s.default)(u.default.mark((function e(t){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(x({method:"recoveryDevice"},t));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),(0,i.default)(k,"dispose",(function(){S.dispose(),g&&g.close()})),(0,i.default)(k,"cancel",(function(){g&&g.emit(p.CLOSED)})),(0,i.default)(k,"renderWebUSBButton",(function(e){(0,w.default)(e,y.webusbSrc,S.origin)}));var Q=k;t.default=Q},1523:function(e,t,n){e.exports=n(631)},1524:function(e,t){function n(e,t,n,r,a,o,i){try{var u=e[o](i),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var i=e.apply(t,r);function u(e){n(i,a,o,u,s,"next",e)}function s(e){n(i,a,o,u,s,"throw",e)}u(void 0)}))}}},1569:function(e,t,n){var r=n(132);function a(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var u=o?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(n,i,u):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}},1612:function(e,t,n){"use strict";t.__esModule=!0,t.CLOSE_WINDOW=t.CANCEL_POPUP_REQUEST=t.CLOSED=t.CLOSE=t.HANDSHAKE=t.OPEN_TIMEOUT=t.OPENED=t.LOG=t.EXTENSION_USB_PERMISSIONS=t.EXTENSION_REQUEST=t.BOOTSTRAP=t.INIT=void 0;t.INIT="popup-init";t.BOOTSTRAP="popup-bootstrap";t.EXTENSION_REQUEST="popup-extension_request";t.EXTENSION_USB_PERMISSIONS="open-usb-permissions";t.LOG="popup-log";t.OPENED="popup-opened";t.OPEN_TIMEOUT="popup-open_timeout";t.HANDSHAKE="popup-handshake";t.CLOSE="popup-close";t.CLOSED="popup-closed";t.CANCEL_POPUP_REQUEST="ui-cancel-popup-request";t.CLOSE_WINDOW="window.close"},1613:function(e,t,n){"use strict";t.__esModule=!0,t.ADDRESS_VALIDATION=t.BUNDLE_PROGRESS=t.LOGIN_CHALLENGE_RESPONSE=t.LOGIN_CHALLENGE_REQUEST=t.CUSTOM_MESSAGE_RESPONSE=t.CUSTOM_MESSAGE_REQUEST=t.CHANGE_SETTINGS=t.RECEIVE_WORD=t.RECEIVE_FEE=t.RECEIVE_ACCOUNT=t.CHANGE_ACCOUNT=t.RECEIVE_DEVICE=t.RECEIVE_PASSPHRASE=t.RECEIVE_PIN=t.RECEIVE_CONFIRMATION=t.RECEIVE_PERMISSION=t.REQUEST_WORD=t.REQUEST_BUTTON=t.INSUFFICIENT_FUNDS=t.UPDATE_CUSTOM_FEE=t.SELECT_FEE=t.SELECT_ACCOUNT=t.SELECT_DEVICE=t.SET_OPERATION=t.LOADING=t.CONNECT=t.INVALID_PASSPHRASE_ACTION=t.INVALID_PASSPHRASE=t.REQUEST_PASSPHRASE_ON_DEVICE=t.REQUEST_PASSPHRASE=t.INVALID_PIN=t.REQUEST_PIN=t.REQUEST_CONFIRMATION=t.REQUEST_PERMISSION=t.CLOSE_UI_WINDOW=t.REQUEST_UI_WINDOW=t.RECEIVE_BROWSER=t.BROWSER_OUTDATED=t.BROWSER_NOT_SUPPORTED=t.DEVICE_NEEDS_BACKUP=t.FIRMWARE_NOT_INSTALLED=t.FIRMWARE_NOT_COMPATIBLE=t.FIRMWARE_NOT_SUPPORTED=t.FIRMWARE_OUTDATED=t.FIRMWARE_OLD=t.SEEDLESS=t.INITIALIZE=t.REQUIRE_MODE=t.NOT_IN_BOOTLOADER=t.BOOTLOADER=t.TRANSPORT=t.IFRAME_HANDSHAKE=void 0;t.IFRAME_HANDSHAKE="iframe-handshake";t.TRANSPORT="ui-no_transport";t.BOOTLOADER="ui-device_bootloader_mode";t.NOT_IN_BOOTLOADER="ui-device_not_in_bootloader_mode";t.REQUIRE_MODE="ui-device_require_mode";t.INITIALIZE="ui-device_not_initialized";t.SEEDLESS="ui-device_seedless";t.FIRMWARE_OLD="ui-device_firmware_old";t.FIRMWARE_OUTDATED="ui-device_firmware_outdated";t.FIRMWARE_NOT_SUPPORTED="ui-device_firmware_unsupported";t.FIRMWARE_NOT_COMPATIBLE="ui-device_firmware_not_compatible";t.FIRMWARE_NOT_INSTALLED="ui-device_firmware_not_installed";t.DEVICE_NEEDS_BACKUP="ui-device_needs_backup";t.BROWSER_NOT_SUPPORTED="ui-browser_not_supported";t.BROWSER_OUTDATED="ui-browser_outdated";t.RECEIVE_BROWSER="ui-receive_browser";t.REQUEST_UI_WINDOW="ui-request_window";t.CLOSE_UI_WINDOW="ui-close_window";t.REQUEST_PERMISSION="ui-request_permission";t.REQUEST_CONFIRMATION="ui-request_confirmation";t.REQUEST_PIN="ui-request_pin";t.INVALID_PIN="ui-invalid_pin";t.REQUEST_PASSPHRASE="ui-request_passphrase";t.REQUEST_PASSPHRASE_ON_DEVICE="ui-request_passphrase_on_device";t.INVALID_PASSPHRASE="ui-invalid_passphrase";t.INVALID_PASSPHRASE_ACTION="ui-invalid_passphrase_action";t.CONNECT="ui-connect";t.LOADING="ui-loading";t.SET_OPERATION="ui-set_operation";t.SELECT_DEVICE="ui-select_device";t.SELECT_ACCOUNT="ui-select_account";t.SELECT_FEE="ui-select_fee";t.UPDATE_CUSTOM_FEE="ui-update_custom_fee";t.INSUFFICIENT_FUNDS="ui-insufficient_funds";t.REQUEST_BUTTON="ui-button";t.REQUEST_WORD="ui-request_word";t.RECEIVE_PERMISSION="ui-receive_permission";t.RECEIVE_CONFIRMATION="ui-receive_confirmation";t.RECEIVE_PIN="ui-receive_pin";t.RECEIVE_PASSPHRASE="ui-receive_passphrase";t.RECEIVE_DEVICE="ui-receive_device";t.CHANGE_ACCOUNT="ui-change_account";t.RECEIVE_ACCOUNT="ui-receive_account";t.RECEIVE_FEE="ui-receive_fee";t.RECEIVE_WORD="ui-receive_word";t.CHANGE_SETTINGS="ui-change_settings";t.CUSTOM_MESSAGE_REQUEST="ui-custom_request";t.CUSTOM_MESSAGE_RESPONSE="ui-custom_response";t.LOGIN_CHALLENGE_REQUEST="ui-login_challenge_request";t.LOGIN_CHALLENGE_RESPONSE="ui-login_challenge_response";t.BUNDLE_PROGRESS="ui-bundle_progress";t.ADDRESS_VALIDATION="ui-address_validation"},1614:function(e,t,n){"use strict";var r=n(50);t.__esModule=!0,t.NO_COIN_INFO=t.BACKEND_NO_URL=t.WEBUSB_ERROR_MESSAGE=t.INVALID_PIN_ERROR_MESSAGE=t.WRONG_PREVIOUS_SESSION_ERROR_MESSAGE=t.INVALID_STATE=t.CALL_OVERRIDE=t.INITIALIZATION_FAILED=t.DEVICE_USED_ELSEWHERE=t.PERMISSIONS_NOT_GRANTED=t.POPUP_CLOSED=t.INVALID_PARAMETERS=t.DEVICE_CALL_IN_PROGRESS=t.DEVICE_NOT_FOUND=t.WRONG_TRANSPORT_CONFIG=t.NO_TRANSPORT=t.MANAGEMENT_NOT_ALLOWED=t.MANIFEST_NOT_SET=t.BROWSER_NOT_SUPPORTED=t.POPUP_TIMEOUT=t.IFRAME_TIMEOUT=t.IFRAME_INITIALIZED=t.IFRAME_BLOCKED=t.NO_IFRAME=t.invalidParameter=t.TrezorError=void 0;var a=r(n(637)),o=function(e){function t(t,n){var r;return(r=e.call(this,n)||this).code=t,r.message=n,r}return(0,a.default)(t,e),t}((0,r(n(1814)).default)(Error));t.TrezorError=o;var i=function(e){return new o("Connect_InvalidParameter",e)};t.invalidParameter=i;var u=new o(100,"TrezorConnect not yet initialized");t.NO_IFRAME=u;var s=new o("iframe_blocked","TrezorConnect iframe was blocked");t.IFRAME_BLOCKED=s;var c=new o(101,"TrezorConnect has been already initialized");t.IFRAME_INITIALIZED=c;var d=new o(102,"Iframe timeout");t.IFRAME_TIMEOUT=d;var f=new o(103,"Popup timeout");t.POPUP_TIMEOUT=f;var p=new o(104,"Browser not supported");t.BROWSER_NOT_SUPPORTED=p;var l=new o(105,"Manifest not set. Read more at https://github.com/trezor/connect/blob/develop/docs/index.md");t.MANIFEST_NOT_SET=l;var E=new o(105,"Management method not allowed for this configuration");t.MANAGEMENT_NOT_ALLOWED=E;var h=new o(500,"Transport is missing");t.NO_TRANSPORT=h;var m=new o(5002,"Wrong config response");t.WRONG_TRANSPORT_CONFIG=m;var _=new o(501,"Device not found");t.DEVICE_NOT_FOUND=_;var v=new o(503,"Device call in progress");t.DEVICE_CALL_IN_PROGRESS=v;var S=new o(504,"Invalid parameters");t.INVALID_PARAMETERS=S;var w=new Error("Popup closed");t.POPUP_CLOSED=w;var T=new o(403,"Permissions not granted");t.PERMISSIONS_NOT_GRANTED=T;var N=new o(700,"Device is used in another window");t.DEVICE_USED_ELSEWHERE=N;var b=new o("Failure_Initialize","Initialization failed");t.INITIALIZATION_FAILED=b;var O=new o("Failure_ActionOverride","override");t.CALL_OVERRIDE=O;var I=new o("Failure_PassphraseState","Passphrase is incorrect");t.INVALID_STATE=I;t.WRONG_PREVIOUS_SESSION_ERROR_MESSAGE="wrong previous session";t.INVALID_PIN_ERROR_MESSAGE="PIN invalid";t.WEBUSB_ERROR_MESSAGE="NetworkError: Unable to claim interface.";var R=new o("Backend_init","Url not found");t.BACKEND_NO_URL=R;var x=i("Coin not found.");t.NO_COIN_INFO=x},1659:function(e,t,n){"use strict";t.__esModule=!0,t.BLOCKCHAIN_EVENT=t.RESPONSE_EVENT=t.TRANSPORT_EVENT=t.DEVICE_EVENT=t.UI_EVENT=t.CORE_EVENT=void 0;t.CORE_EVENT="CORE_EVENT";t.UI_EVENT="UI_EVENT";t.DEVICE_EVENT="DEVICE_EVENT";t.TRANSPORT_EVENT="TRANSPORT_EVENT";t.RESPONSE_EVENT="RESPONSE_EVENT";t.BLOCKCHAIN_EVENT="BLOCKCHAIN_EVENT"},1660:function(e,t,n){"use strict";t.__esModule=!0,t.START_PENDING=t.RECONNECT=t.REQUEST=t.STREAM=t.UPDATE=t.ERROR=t.START=void 0;t.START="transport-start";t.ERROR="transport-error";t.UPDATE="transport-update";t.STREAM="transport-stream";t.REQUEST="transport-request_device";t.RECONNECT="transport-reconnect";t.START_PENDING="transport-start_pending"},1661:function(e,t,n){"use strict";t.__esModule=!0,t.UNREADABLE=t.WAIT_FOR_SELECTION=t.WORD=t.PASSPHRASE_ON_DEVICE=t.PASSPHRASE=t.PIN=t.BUTTON=t.LOADING=t.USED_ELSEWHERE=t.RELEASED=t.ACQUIRED=t.RELEASE=t.ACQUIRE=t.CHANGED=t.DISCONNECT=t.CONNECT_UNACQUIRED=t.CONNECT=void 0;t.CONNECT="device-connect";t.CONNECT_UNACQUIRED="device-connect_unacquired";t.DISCONNECT="device-disconnect";t.CHANGED="device-changed";t.ACQUIRE="device-acquire";t.RELEASE="device-release";t.ACQUIRED="device-acquired";t.RELEASED="device-released";t.USED_ELSEWHERE="device-used_elsewhere";t.LOADING="device-loading";t.BUTTON="button";t.PIN="pin";t.PASSPHRASE="passphrase";t.PASSPHRASE_ON_DEVICE="passphrase_on_device";t.WORD="word";t.WAIT_FOR_SELECTION="device-wait_for_selection";t.UNREADABLE="unreadable-device"},1662:function(e,t,n){"use strict";t.__esModule=!0,t.NOTIFICATION=t.BLOCK=t.CONNECT=t.ERROR=void 0;t.ERROR="blockchain-error";t.CONNECT="blockchain-connect";t.BLOCK="blockchain-block";t.NOTIFICATION="blockchain-notification"},1663:function(e,t,n){"use strict";var r=n(50);t.__esModule=!0,t.create=function(e,t){var n,r=function(e){},i=function(e){},u=new Promise(function(){var t=(0,o.default)(a.default.mark((function t(o,u){return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=o,i=u,"function"!==typeof e){t.next=11;break}return t.prev=3,t.next=6,e();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(3),u(t.t0);case 11:"string"===typeof e&&(n=e);case 12:case"end":return t.stop()}}),t,null,[[3,8]])})));return function(e,n){return t.apply(this,arguments)}}());return{id:n,device:t,resolve:r,reject:i,promise:u}},t.createAsync=function(e){var t=function(e){},n=function(e){},r=new Promise((function(e,r){t=e,n=r})),i=function(){var t=(0,o.default)(a.default.mark((function t(){return a.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{resolve:t,reject:n,promise:r,run:function(){return i(),r}}},t.resolveTimeoutPromise=function(e,t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))},t.rejectTimeoutPromise=function(e,t){return new Promise((function(n,r){setTimeout((function(){r(t)}),e)}))};var a=r(n(1523)),o=r(n(1524))},1813:function(e,t,n){"use strict";t.__esModule=!0,t.RESPONSE=t.CALL=t.ERROR=t.BOOTSTRAP=void 0;t.BOOTSTRAP="iframe-bootstrap";t.ERROR="iframe-error";t.CALL="iframe-call";t.RESPONSE="iframe-response"},1814:function(e,t,n){var r=n(87),a=n(633),o=n(1815),i=n(1816);function u(t){var n="function"===typeof Map?new Map:void 0;return e.exports=u=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return i(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),a(t,e)},u(t)}e.exports=u},1815:function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},1816:function(e,t,n){var r=n(633),a=n(1817);function o(t,n,i){return a()?e.exports=o=Reflect.construct:e.exports=o=function(e,t,n){var a=[null];a.push.apply(a,t);var o=new(Function.bind.apply(e,a));return n&&r(o,n.prototype),o},o.apply(null,arguments)}e.exports=o},1817:function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},1818:function(e,t,n){"use strict";var r=n(1569),a=n(50);t.__esModule=!0,t.default=void 0;var o=a(n(1523)),i=a(n(1524)),u=a(n(141)),s=a(n(637)),c=a(n(627)),d=a(n(46)),f=r(n(1612)),p=r(n(1614)),l=n(1819),E=n(1820),h=n(1663),m=function(e){function t(t){var n;return n=e.call(this)||this,(0,c.default)((0,u.default)(n),"requestTimeout",0),(0,c.default)((0,u.default)(n),"closeInterval",0),(0,c.default)((0,u.default)(n),"extension",!1),(0,c.default)((0,u.default)(n),"extensionTabId",0),n.settings=t,n.src=t.popupSrc,n.origin=(0,E.getOrigin)(t.popupSrc),n.handleLazyLoading=n.handleLazyLoading.bind((0,u.default)(n)),n.extension="undefined"!==typeof chrome&&chrome.runtime&&"undefined"!==typeof chrome.runtime.onConnect,n.extension&&(n.handleExtensionConnect=n.handleExtensionConnect.bind((0,u.default)(n)),n.handleExtensionMessage=n.handleExtensionMessage.bind((0,u.default)(n)),chrome.runtime.onConnect.addListener(n.handleExtensionConnect)),n}(0,s.default)(t,e);var n=t.prototype;return n.request=function(e){var t=this;if(void 0===e&&(e=!1),this.locked)this._window&&(this.extension?chrome.tabs.update(this._window.id,{active:!0}):this._window.focus());else{this.lazyLoad=e?(0,h.create)(f.INIT):null,this.lazyLoad&&(this.extension||window.addEventListener("message",this.handleLazyLoading,!1));var n=this.open.bind(this);this.locked=!0,this.settings.supportedBrowser?this.requestTimeout=window.setTimeout((function(){t.requestTimeout=0,n()}),e||this.extension?1:850):n()}},n.cancel=function(){this.close()},n.unlock=function(){this.locked=!1},n.open=function(){var e=this;this.settings.supportedBrowser?(this.openWrapper(this.lazyLoad?this.src+"#loading":this.src),this.closeInterval=window.setInterval((function(){e._window&&(e.extension?chrome.tabs.get(e._window.id,(function(t){t||(e.close(),e.emit(f.CLOSED))})):e._window.closed&&(e.close(),e.emit(f.CLOSED)))}),500),this.openTimeout=window.setTimeout((function(){e._window&&!e._window.closed||(e.close(),(0,l.showPopupRequest)(e.open.bind(e),(function(){e.emit(f.CLOSED)})))}),2e3)):this.openWrapper(this.src+"#unsupported")},n.openWrapper=function(e){var t=this;this.extension?chrome.windows.getCurrent(null,(function(n){"normal"!==n.type?chrome.windows.create({url:e},(function(e){chrome.tabs.query({windowId:e.id,active:!0},(function(e){t._window=e[0]}))})):chrome.tabs.query({currentWindow:!0,active:!0},(function(n){t.extensionTabId=n[0].id,chrome.tabs.create({url:e,index:n[0].index+1},(function(e){t._window=e}))}))})):(this._window=window.open("","_blank"),this._window&&(this._window.location.href=e))},n.handleExtensionConnect=function(e){if("trezor-connect"===e.name){if(!this._window||this._window&&this._window.id!==e.sender.tab.id)return void e.disconnect();this.extensionPort=e,this.extensionPort.onMessage.addListener(this.handleExtensionMessage)}else"trezor-usb-permissions"===e.name&&e.postMessage({broadcast:this.broadcast})},n.handleExtensionMessage=function(e){this.extensionPort&&(e===f.EXTENSION_REQUEST?this.extensionPort.postMessage({type:f.EXTENSION_REQUEST,broadcast:this.broadcast}):e===f.INIT&&this.lazyLoad?this.lazyLoad.resolve(!0):e===f.EXTENSION_USB_PERMISSIONS?chrome.tabs.query({currentWindow:!0,active:!0},(function(e){chrome.tabs.create({url:"trezor-usb-permissions.html",index:e[0].index+1},(function(e){}))})):e===f.CLOSE_WINDOW&&(this.emit(f.CLOSED),this.close()))},n.setBroadcast=function(e){this.broadcast=e},n.handleLazyLoading=function(e){this.lazyLoad&&e.data&&e.data===f.INIT&&(this.lazyLoad.resolve(!0),window.removeEventListener("message",this.handleLazyLoading,!1))},n.resolveLazyLoad=function(){var e=(0,i.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.lazyLoad){e.next=5;break}return e.next=3,this.lazyLoad.promise;case 3:e.next=6;break;case 5:throw p.POPUP_CLOSED.message;case 6:this.extension?this.extensionPort&&this.extensionPort.postMessage({type:f.INIT}):this._window&&this._window.postMessage({type:f.INIT},this.origin);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),n.close=function(){this.locked=!1,this.requestTimeout&&(window.clearTimeout(this.requestTimeout),this.requestTimeout=0),this.openTimeout&&(window.clearTimeout(this.openTimeout),this.openTimeout=0),this.closeInterval&&(window.clearInterval(this.closeInterval),this.closeInterval=0),this.extensionPort&&(this.extensionPort.disconnect(),this.extensionPort=null),this.extensionTabId&&(chrome.tabs.update(this.extensionTabId,{active:!0}),this.extensionTabId=0),this.lazyLoad&&(this.lazyLoad=null),this._window&&(this.extension?chrome.tabs.remove(this._window.id):this._window.close(),this._window=null)},n.postMessage=function(e){var t=this;if(!this.requestTimeout)return!this._window&&"ui_request_window"!==e.type&&this.openTimeout?(this.close(),void(0,l.showPopupRequest)(this.open.bind(this),(function(){t.emit(f.CLOSED)}))):void(this._window&&this._window.postMessage(e,this.origin))},n.onBeforeUnload=function(){this.close()},n.cancelOpenTimeout=function(){window.clearTimeout(this.openTimeout)},t}(d.default);t.default=m},1819:function(e,t,n){"use strict";t.__esModule=!0,t.showPopupRequest=void 0;var r="TrezorConnectInteractionLayer";t.showPopupRequest=function(e,t){if(!document.getElementById(r)){var n=document.createElement("div");n.id=r,n.className="trezorconnect-container",n.innerHTML='\n    <div class="trezorconnect-container" id="TrezorConnectInteractionLayer">\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 \u201cContinue\u201d to open popup manually</p>\n                <button class="trezorconnect-open">Continue</button>\n            </div>\n        </div>\n    </div>\n',document.body&&document.body.appendChild(n),n.getElementsByClassName("trezorconnect-open")[0].onclick=function(){e(),document.body&&document.body.removeChild(n)},n.getElementsByClassName("trezorconnect-close")[0].onclick=function(){t(),document.body&&document.body.removeChild(n)}}}},1820:function(e,t,n){"use strict";var r=n(50);t.__esModule=!0,t.getOrigin=t.httpRequest=void 0;var a=r(n(1523)),o=r(n(1524));n(646);var i=function(){var e=(0,o.default)(a.default.mark((function e(t,n){var r,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===n&&(n="text"),e.next=3,fetch(t,{credentials:"same-origin"});case 3:if(!(r=e.sent).ok){e.next=23;break}if("json"!==n){e.next=12;break}return e.next=8,r.text();case 8:return o=e.sent,e.abrupt("return",JSON.parse(o));case 12:if("binary"!==n){e.next=18;break}return e.next=15,r.arrayBuffer();case 15:return e.abrupt("return",e.sent);case 18:return e.next=20,r.text();case 20:return e.abrupt("return",e.sent);case 21:e.next=24;break;case 23:throw new Error("httpRequest error: "+t+" "+r.statusText);case 24:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();t.httpRequest=i;t.getOrigin=function(e){var t=e.match(/^.+\:\/\/[^\/]+/);return Array.isArray(t)&&t.length>0?t[0]:"unknown"}},1821:function(e,t,n){"use strict";var r=n(50);t.__esModule=!0,t.clearTimeout=t.dispose=t.postMessage=t.init=t.messagePromises=t.error=t.timeout=t.initPromise=t.origin=t.instance=void 0;var a,o,i=r(n(1523)),u=r(n(1524)),s=n(1663),c=n(1613),d=n(1614),f=r(n(1822));t.instance=a,t.origin=o;var p=(0,s.create)();t.initPromise=p;var l,E=0;t.timeout=E,t.error=l;var h=0,m={};t.messagePromises=m;var _=function(){var e=(0,u.default)(i.default.mark((function e(n){var r,u,s,f,l,h;return i.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=document.getElementById("trezorconnect"))?t.instance=a=r:(t.instance=a=document.createElement("iframe"),a.frameBorder="0",a.width="0px",a.height="0px",a.style.position="absolute",a.style.display="none",a.style.border="0px",a.style.width="0px",a.style.height="0px",a.id="trezorconnect"),u=n.manifest?JSON.stringify(n.manifest):"undefined",s="&version="+n.version+"&manifest="+encodeURIComponent(btoa(JSON.stringify(u))),f=n.iframeSrc+"?"+Date.now()+s,a.setAttribute("src",f),n.webusb&&a.setAttribute("allow","usb"),(l=a.src.match(/^.+\:\/\/[^\/]+/))&&l.length>0&&(t.origin=o=l[0]),t.timeout=E=window.setTimeout((function(){p.reject(d.IFRAME_TIMEOUT)}),1e4),h=function(){if(a){try{var e=a.contentWindow.location.origin;if(!e||"null"===e)return void S()}catch(r){}var t;"undefined"!==typeof chrome&&chrome.runtime&&"undefined"!==typeof chrome.runtime.onConnect&&(chrome.runtime.onConnect.addListener((function(){})),t=chrome.runtime.id),a.contentWindow.postMessage({type:c.IFRAME_HANDSHAKE,payload:{settings:n,extension:t}},o),a.onload=void 0}else p.reject(d.IFRAME_BLOCKED)},a.attachEvent?a.attachEvent("onload",h):a.onload=h,document.body&&(document.body.appendChild(a),v()),e.prev=13,e.next=16,p.promise;case 16:e.next=21;break;case 18:throw e.prev=18,e.t0=e.catch(13),e.t0.message||e.t0;case 21:return e.prev=21,window.clearTimeout(E),t.timeout=E=0,e.finish(21);case 25:case"end":return e.stop()}}),e,null,[[13,18,21,25]])})));return function(t){return e.apply(this,arguments)}}();t.init=_;var v=function(){if(!a)throw d.IFRAME_BLOCKED;var e=a.ownerDocument,t=e.head||e.getElementsByTagName("head")[0],n=document.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id","TrezorConnectStylesheet"),n.styleSheet?n.styleSheet.cssText=f.default:n.appendChild(document.createTextNode(f.default)),t.append(n)},S=function(){window.clearTimeout(E),t.error=l=d.IFRAME_BLOCKED.message,w(),p.reject(d.IFRAME_BLOCKED)};t.postMessage=function(e,t){if(void 0===t&&(t=!0),!a)throw d.IFRAME_BLOCKED;return t?(h++,e.id=h,m[h]=(0,s.create)(),a.contentWindow.postMessage(e,o),m[h].promise):(a.contentWindow.postMessage(e,o),null)};var w=function(){if(a&&a.parentNode)try{a.parentNode.removeChild(a)}catch(l){}t.instance=a=null,t.timeout=E=0};t.dispose=w;t.clearTimeout=function(){window.clearTimeout(E)}},1822:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;t.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= */'},1823:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e,t,n){var r=e||".trezor-webusb-button",a=document.querySelectorAll(r),o=t+"?"+Date.now();a.forEach((function(e){if(e.getElementsByTagName("iframe").length<1){var t=e.getBoundingClientRect(),r=document.createElement("iframe");r.frameBorder="0",r.width=Math.round(t.width)+"px",r.height=Math.round(t.height)+"px",r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex="1",r.setAttribute("allow","usb"),r.setAttribute("scrolling","no"),r.onload=function(){r.contentWindow.postMessage({},n)},r.src=o,e.append(r)}}))};t.default=r},1824:function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.popupConsole=t.enableByPrefix=t.getLog=t.enable=t.init=t.default=void 0;var n={DescriptorStream:"color: #77ab59",DeviceList:"color: #36802d",Device:"color: #bada55",Core:"color: #c9df8a",IFrame:"color: #FFFFFF; background: #f4a742;",Popup:"color: #f48a00"},r=function(){function e(e,t){void 0===t&&(t=!1),this.prefix=e,this.enabled=t,this.messages=[],this.css=n[e]||"color: #000000; background: #FFFFFF;"}var t=e.prototype;return t.addMessage=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];this.messages.push({level:e,prefix:t,message:r,timestamp:(new Date).getTime()})},t.log=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;(this.addMessage.apply(this,["log",this.prefix].concat(t)),this.enabled)&&(r=console).log.apply(r,[this.prefix].concat(t))},t.error=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;(this.addMessage.apply(this,["error",this.prefix].concat(t)),this.enabled)&&(r=console).error.apply(r,[this.prefix].concat(t))},t.warn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;(this.addMessage.apply(this,["warn",this.prefix].concat(t)),this.enabled)&&(r=console).warn.apply(r,[this.prefix].concat(t))},t.debug=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;(this.addMessage.apply(this,["debug",this.prefix].concat(t)),this.enabled)&&(r=console).log.apply(r,["%c"+this.prefix,this.css].concat(t))},e}();t.default=r;var a={};t.init=function(e,t){var n=new r(e,"boolean"===typeof t&&t);return a[e]=n,n};t.enable=function(e){for(var t=0,n=Object.keys(a);t<n.length;t++){var r=n[t];a[r].enabled=e}};t.getLog=function(e){for(var t=[],n=0,r=Object.keys(a);n<r.length;n++){var o=r[n];t=t.concat(a[o].messages)}return t.sort((function(e,t){return e.timestamp-t.timestamp})),t};t.enableByPrefix=function(e,t){a[e]&&(a[e].enabled=t)};t.popupConsole=function(t,n){var r=e.console,a={error:r.error,info:r.info,debug:r.debug,log:r.log},o=[],i=function(e,a){return function(){for(var i=(new Date).toUTCString(),u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];return o.push([a,i].concat(s)),n.apply(void 0,[{type:t,level:a,time:i,args:JSON.stringify(s)}]),e.apply(r,s)}};for(var u in a)r[u]=i(a[u],u)}}).call(this,n(27))},1825:function(e,t,n){"use strict";t.__esModule=!0,t.parseMessage=void 0;t.parseMessage=function(e){var t={event:e.event,type:e.type,payload:e.payload};return"number"===typeof e.id&&(t.id=e.id),"boolean"===typeof e.success&&(t.success=e.success),t}},1826:function(e,t,n){"use strict";var r=n(50);t.__esModule=!0,t.parse=t.DEFAULT_PRIORITY=void 0;var a=r(n(627));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i="7.0.5".split(".").map((function(e){return parseInt(e)})),u="https://connect.trezor.io/"+(i[0]+(i[1]>0?"."+i[1]:"")+"/");t.DEFAULT_PRIORITY=2;var s={configSrc:"data/config.json",version:"7.0.5",debug:!1,origin:null,priority:2,trustedHost:!1,connectSrc:u,iframeSrc:u+"iframe.html",popup:!0,popupSrc:u+"popup.html",webusbSrc:u+"webusb.html",transportReconnect:!1,webusb:!0,pendingTransportEvent:!0,supportedBrowser:"undefined"===typeof navigator||!/Trident|MSIE/.test(navigator.userAgent),extension:null,manifest:null};t.parse=function(e){if(!e)return s;var t,n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s);return e.hasOwnProperty("debug")&&(Array.isArray(e),"boolean"===typeof e.debug?n.debug=e.debug:"string"===typeof e.debug&&(n.debug="true"===e.debug)),"string"===typeof e.connectSrc?n.connectSrc=e.connectSrc:"undefined"!==typeof window&&"string"===typeof window.__TREZOR_CONNECT_SRC&&(n.connectSrc=window.__TREZOR_CONNECT_SRC),n.iframeSrc=n.connectSrc+"iframe.html",n.popupSrc=n.connectSrc+"popup.html",n.webusbSrc=n.connectSrc+"webusb.html","boolean"===typeof e.transportReconnect&&(n.transportReconnect=e.transportReconnect),"boolean"===typeof e.webusb&&(n.webusb=e.webusb),"boolean"===typeof e.popup&&(n.popup=e.popup),"boolean"===typeof e.pendingTransportEvent&&(n.pendingTransportEvent=e.pendingTransportEvent),"undefined"!==typeof window&&"file:"===window.location.protocol&&(n.origin="file://"+window.location.pathname,n.webusb=!1),"string"===typeof e.extension&&(n.extension=e.extension),"object"===typeof e.manifest&&(n.manifest="string"!==typeof(t=e.manifest).email||"string"!==typeof t.appUrl?null:{email:t.email,appUrl:t.appUrl}),s=n}},1827:function(e,t,n){"use strict";var r=n(1569);t.__esModule=!0;n(1659),r(n(1660)),r(n(1612)),r(n(1613)),r(n(1661)),r(n(1828));var a=r(n(1829));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=a[e])}));r(n(1830)),r(n(1831)),r(n(1832)),r(n(1833)),r(n(1834)),r(n(1835)),r(n(1836)),r(n(1837));var o=n(1838);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=o[e])}))},1828:function(e,t,n){},1829:function(e,t,n){},1830:function(e,t,n){},1831:function(e,t,n){},1832:function(e,t,n){},1833:function(e,t,n){},1834:function(e,t,n){},1835:function(e,t,n){},1836:function(e,t,n){},1837:function(e,t,n){},1838:function(e,t,n){},1839:function(e,t,n){"use strict";n(1569)(n(1662))},1840:function(e,t,n){}}]);
  //# sourceMappingURL=7.024a0ed5.chunk.js.map