@dcl/governance-site 1.13.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{n as g,X as w,Y as y,Z as A,c as k,_ as u,B as m,A as p}from"./core-8353fb8a.js";import"./index-e8960b68.js";import"./index-38a0d3f6.js";class N{constructor(e){this.getNonce=e.getNonce}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:typeof document>"u"?"Unknown Domain":document.location.host,uri:typeof document>"u"?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){var n;const t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?`
1
+ import{n as g,X as w,Y as y,Z as A,c as k,_ as u,B as m,A as p}from"./core-a0883ed5.js";import"./index-aa7d7c43.js";import"./index-2406a93c.js";class N{constructor(e){this.getNonce=e.getNonce}async createMessage(e){const t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:typeof document>"u"?"Unknown Domain":document.location.host,uri:typeof document>"u"?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){var n;const t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?`
2
2
  ${e.statement}
3
3
  `:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${e.chainId}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,((n=e.resources)==null?void 0:n.length)&&e.resources.reduce((s,o)=>`${s}
4
4
  - ${o}`,"Resources:")].filter(s=>typeof s=="string").join(`
@@ -1,4 +1,4 @@
1
- import{h as Z}from"./index-e8960b68.js";function $(h,y){for(var a=0;a<y.length;a++){const r=y[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in h)){const u=Object.getOwnPropertyDescriptor(r,o);u&&Object.defineProperty(h,o,u.get?u:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var z=function(h){var y={};function a(r){if(y[r])return y[r].exports;var o=y[r]={i:r,l:!1,exports:{}};return h[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=h,a.c=y,a.d=function(r,o,u){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:u})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)a.d(u,l,(function(R){return r[R]}).bind(null,l));return u},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(h,y){h.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(h,y){h.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(h,y,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(y,"__esModule",{value:!0}),y.sendAsyncWrapper=function(o,u){var l=this;return new Promise(function(R,x){l.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:u||[]},function(O,T){O?x(O):R(T.result)})})},y.sendFortmaticAsyncWrapper=function(o){var u=this;return new Promise(function(l,R){u.getProvider().sendFortmaticAsync(o,function(x,O){x?R(x):l(O?O.result:{})})})},y.randomId=r,y.findExistingResponse=function(o,u){for(var l=0;l<o.length;l++)if(o[l].id===u)return o[l];return null}},function(h,y,a){h.exports=a(4)},function(h,y,a){var r=a(0),o=r(a(1)),u=r(a(5)),l=a(2),R="fm_composeSend",x="fm_logout",O="fm_get_balances",T="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};h.exports=function b(_,A,I){var v=this;if((0,o.default)(this,b),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=A,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:A})),this.transactions={send:function(m,M){var C=new g(R,{to:m.to,value:m.amount});v.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(v.queryParams)]||(f["fortmatic-".concat(v.queryParams)]=new u.default(v.fortmaticClient,{API_KEY:_,ETH_NETWORK:A})),f["fortmatic-".concat(v.queryParams)]},this.user={login:function(){return v.getProvider().enable()},logout:function(){v.getProvider().account=null,v.getProvider().network=null;var m=new g(x);return l.sendFortmaticAsyncWrapper.call(v,m)},getUser:function(){var m=new g(s);return l.sendFortmaticAsyncWrapper.call(v,m)},getBalances:function(){var m=new g(O);return l.sendFortmaticAsyncWrapper.call(v,m)},getTransactions:function(){var m=new g(T);return l.sendFortmaticAsyncWrapper.call(v,m)},isLoggedIn:function(){var m=new g(w);return l.sendFortmaticAsyncWrapper.call(v,m)},settings:function(){var m=new g(P);return l.sendFortmaticAsyncWrapper.call(v,m)},deposit:function(m){var M=new g(n,m);return l.sendFortmaticAsyncWrapper.call(v,M)}},this.configure=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new g(c);return M.params=[m],l.sendFortmaticAsyncWrapper.call(v,M)}};var g=function b(_,A){(0,o.default)(this,b),this.id=(0,l.randomId)(),this.method=_,this.params=A?[A]:[{}]}},function(h,y,a){var r=a(0);Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var o=r(a(6)),u=r(a(9)),l=r(a(1)),R=r(a(10)),x=a(11),O=r(a(12)),T=a(2),w=function(){function P(n,s){if((0,l.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var A=!0,I=!1,v=void 0;try{for(var m,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(A=(m=M.next()).done);A=!0)if(m.value.src.includes(n.queryParams))return!1}catch(C){I=!0,v=C}finally{try{A||M.return==null||M.return()}finally{if(I)throw v}}return!0}()){var g=document.createElement("style");g.innerHTML=O.default.css,g.type="text/css",document.head.appendChild(g);var b=document.createElement("iframe");b.className="fortmatic-iframe",b.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(b);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:b})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,T.randomId)(),batch:n.map(function(c){return c.id=(0,T.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return T.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,u.default)(o.default.mark(function s(){var c,f,g,b=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,g=c.cb,f.id=(0,T.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(A){b.requests[A.id]={parentId:f.id,payload:A,cb:function(I,v){var m=b.requests[f.id].batchResponse;if(I&&I.response&&!(0,T.findExistingResponse)(m,I.response.id))throw m.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),b.requests[f.id].cb(null,m),I.response;if(v&&v.result&&!(0,T.findExistingResponse)(m,v.id))return m.push(v);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:g,batchResponse:[]}):this.requests[f.id]={payload:f,cb:g},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,u.default)(o.default.mark(function s(c,f){var g;return o.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.overlay;case 2:if(!(g=b.sent).iframe.contentWindow){b.next=7;break}g.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),b.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return b.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return T.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var g=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",b=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:g,code:b,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();y.default=w},function(h,y,a){h.exports=a(7)},function(h,y,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,u=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,h.exports=a(8),o)r.regeneratorRuntime=u;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(h,y){(function(a){var r,o=Object.prototype,u=o.hasOwnProperty,l=typeof Symbol=="function"?Symbol:{},R=l.iterator||"@@iterator",x=l.asyncIterator||"@@asyncIterator",O=l.toStringTag||"@@toStringTag",T=typeof h=="object",w=a.regeneratorRuntime;if(w)T&&(h.exports=w);else{(w=a.regeneratorRuntime=T?h.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},g={};g[R]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(G([])));_&&_!==o&&u.call(_,R)&&(g=_);var A=C.prototype=m.prototype=Object.create(g);M.prototype=A.constructor=C,C.constructor=M,C[O]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,O in t||(t[O]="GeneratorFunction")),t.prototype=Object.create(A),t},w.awrap=function(t){return{__await:t}},V(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},V(A),A[O]="Generator",A[R]=function(){return this},A.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=u.call(i,"catchLoc"),q=u.call(i,"finallyLoc");if(j&&q){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&u.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof m?e:m,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(q,W,E){var L=P;return function(S,D){if(L===s)throw new Error("Generator is already running");if(L===c){if(S==="throw")throw D;return Q()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var N=B(H,E);if(N){if(N===f)continue;return N}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(L===P)throw L=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);L=s;var k=v(q,W,E);if(k.type==="normal"){if(L=E.done?c:n,k.arg===f)continue;return{value:k.arg,done:E.done}}k.type==="throw"&&(L=c,E.method="throw",E.arg=k.arg)}}}(t,d,j),F}function v(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function m(){}function M(){}function C(){}function V(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function q(W,E,L,S){var D=v(t[W],t,E);if(D.type!=="throw"){var H=D.arg,N=H.value;return N&&typeof N=="object"&&u.call(N,"__await")?Promise.resolve(N.__await).then(function(k){q("next",k,L,S)},function(k){q("throw",k,L,S)}):Promise.resolve(N).then(function(k){H.value=k,L(H)},function(k){return q("throw",k,L,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function B(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,B(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=v(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function J(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(J,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(u.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:Q}}function Q(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(h,y){function a(r,o,u,l,R,x,O){try{var T=r[x](O),w=T.value}catch(P){return void u(P)}T.done?o(w):Promise.resolve(w).then(l,R)}h.exports=function(r){return function(){var o=this,u=arguments;return new Promise(function(l,R){var x=r.apply(o,u);function O(w){a(x,l,R,O,T,"next",w)}function T(w){a(x,l,R,O,T,"throw",w)}O(void 0)})}}},function(h,y){function a(r,o){for(var u=0;u<o.length;u++){var l=o[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(r,l.key,l)}}h.exports=function(r,o,u){return o&&a(r.prototype,o),u&&a(r,u),r}},function(h){h.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(h,y,a){y.css=`
1
+ import{h as Z}from"./index-aa7d7c43.js";function $(h,y){for(var a=0;a<y.length;a++){const r=y[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in h)){const u=Object.getOwnPropertyDescriptor(r,o);u&&Object.defineProperty(h,o,u.get?u:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var z=function(h){var y={};function a(r){if(y[r])return y[r].exports;var o=y[r]={i:r,l:!1,exports:{}};return h[r].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=h,a.c=y,a.d=function(r,o,u){a.o(r,o)||Object.defineProperty(r,o,{enumerable:!0,get:u})},a.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},a.t=function(r,o){if(1&o&&(r=a(r)),8&o||4&o&&typeof r=="object"&&r&&r.__esModule)return r;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:r}),2&o&&typeof r!="string")for(var l in r)a.d(u,l,(function(R){return r[R]}).bind(null,l));return u},a.n=function(r){var o=r&&r.__esModule?function(){return r.default}:function(){return r};return a.d(o,"a",o),o},a.o=function(r,o){return Object.prototype.hasOwnProperty.call(r,o)},a.p="",a(a.s=3)}([function(h,y){h.exports=function(a){return a&&a.__esModule?a:{default:a}}},function(h,y){h.exports=function(a,r){if(!(a instanceof r))throw new TypeError("Cannot call a class as a function")}},function(h,y,a){function r(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(y,"__esModule",{value:!0}),y.sendAsyncWrapper=function(o,u){var l=this;return new Promise(function(R,x){l.sendAsync({jsonrpc:"2.0",id:r(),method:o,params:u||[]},function(O,T){O?x(O):R(T.result)})})},y.sendFortmaticAsyncWrapper=function(o){var u=this;return new Promise(function(l,R){u.getProvider().sendFortmaticAsync(o,function(x,O){x?R(x):l(O?O.result:{})})})},y.randomId=r,y.findExistingResponse=function(o,u){for(var l=0;l<o.length;l++)if(o[l].id===u)return o[l];return null}},function(h,y,a){h.exports=a(4)},function(h,y,a){var r=a(0),o=r(a(1)),u=r(a(5)),l=a(2),R="fm_composeSend",x="fm_logout",O="fm_get_balances",T="fm_get_transactions",w="fm_is_logged_in",P="fm_accountSettings",n="fm_deposit",s="fm_get_user",c="fm_configure",f={};h.exports=function b(_,A,I){var v=this;if((0,o.default)(this,b),this.fortmaticClient="https://x2.fortmatic.com",!_)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=_,this.options=I,this.ethNetwork=A,this.queryParams=btoa(JSON.stringify({API_KEY:_,ETH_NETWORK:A})),this.transactions={send:function(m,M){var C=new g(R,{to:m.to,value:m.amount});v.getProvider().sendFortmaticAsync(C,M)}},this.getProvider=function(){return f["fortmatic-".concat(v.queryParams)]||(f["fortmatic-".concat(v.queryParams)]=new u.default(v.fortmaticClient,{API_KEY:_,ETH_NETWORK:A})),f["fortmatic-".concat(v.queryParams)]},this.user={login:function(){return v.getProvider().enable()},logout:function(){v.getProvider().account=null,v.getProvider().network=null;var m=new g(x);return l.sendFortmaticAsyncWrapper.call(v,m)},getUser:function(){var m=new g(s);return l.sendFortmaticAsyncWrapper.call(v,m)},getBalances:function(){var m=new g(O);return l.sendFortmaticAsyncWrapper.call(v,m)},getTransactions:function(){var m=new g(T);return l.sendFortmaticAsyncWrapper.call(v,m)},isLoggedIn:function(){var m=new g(w);return l.sendFortmaticAsyncWrapper.call(v,m)},settings:function(){var m=new g(P);return l.sendFortmaticAsyncWrapper.call(v,m)},deposit:function(m){var M=new g(n,m);return l.sendFortmaticAsyncWrapper.call(v,M)}},this.configure=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=new g(c);return M.params=[m],l.sendFortmaticAsyncWrapper.call(v,M)}};var g=function b(_,A){(0,o.default)(this,b),this.id=(0,l.randomId)(),this.method=_,this.params=A?[A]:[{}]}},function(h,y,a){var r=a(0);Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var o=r(a(6)),u=r(a(9)),l=r(a(1)),R=r(a(10)),x=a(11),O=r(a(12)),T=a(2),w=function(){function P(n,s){if((0,l.default)(this,P),this.fortmaticClient=n,this.requests={},this.queue=[],this.account=null,this.network=null,this.isFortmatic=!0,this.overlayReady=!1,this.isLoggedIn=!1,this.postMessages={FORTMATIC_HANDLE_BATCH_REQUEST:"FORTMATIC_HANDLE_BATCH_REQUEST",FORTMATIC_HANDLE_REQUEST:"FORTMATIC_HANDLE_REQUEST",FORTMATIC_HANDLE_FORTMATIC_REQUEST:"FORTMATIC_HANDLE_FORTMATIC_REQUEST",FORTMATIC_HANDLE_RESPONSE:"FORTMATIC_HANDLE_RESPONSE",FORTMATIC_OVERLAY_READY:"FORTMATIC_OVERLAY_READY",FORTMATIC_SHOW_OVERLAY:"FORTMATIC_SHOW_OVERLAY",FORTMATIC_HIDE_OVERLAY:"FORTMATIC_HIDE_OVERLAY",FORTMATIC_USER_DENIED:"FORTMATIC_USER_DENIED",FORTMATIC_USER_LOGOUT:"FORTMATIC_USER_LOGOUT",FORTMATIC_UNAUTHORIZED_API_KEY:"FORTMATIC_UNAUTHORIZED_API_KEY"},!s.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:s.API_KEY,ETH_NETWORK:s.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:x.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,R.default)(P,[{key:"constructPostMessage",value:function(){var n=this;Object.keys(this.postMessages).map(function(s){n.postMessages[s]+="-".concat(n.queryParams)})}},{key:"createOverlay",value:function(){var n=this;return new Promise(function(s,c){var f=function(){if(function(){var A=!0,I=!1,v=void 0;try{for(var m,M=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(A=(m=M.next()).done);A=!0)if(m.value.src.includes(n.queryParams))return!1}catch(C){I=!0,v=C}finally{try{A||M.return==null||M.return()}finally{if(I)throw v}}return!0}()){var g=document.createElement("style");g.innerHTML=O.default.css,g.type="text/css",document.head.appendChild(g);var b=document.createElement("iframe");b.className="fortmatic-iframe",b.src="".concat(n.fortmaticClient,"/send?params=").concat(n.queryParams),document.body.appendChild(b);var _=document.createElement("img");_.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(_),s({iframe:b})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?f():window.addEventListener("load",f.bind(n),!1)})}},{key:"showOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="block";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var n=(0,u.default)(o.default.mark(function s(){return o.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,this.overlay;case 2:c.sent.iframe.style.display="none";case 4:case"end":return c.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"sendAsync",value:function(n,s){n.length>0?this.enqueue({payload:{id:(0,T.randomId)(),batch:n.map(function(c){return c.id=(0,T.randomId)(),c}),method:"eth_batchRequest"},cb:s}):this.enqueue({payload:n,cb:s})}},{key:"sendFortmaticAsync",value:function(n,s){this.enqueue({payload:n,cb:s,isNative:!0})}},{key:"send",value:function(n,s){if(typeof n=="string")return T.sendAsyncWrapper.call(this,n,s);if(!s){console.warn("Non-async web3 methods will be deprecated in web3 > 1.0, and are not supported by the Fortmatic provider. An async method to be used instead."),this.sendAsync(n,function(){});var c={};switch(n.method){case"eth_accounts":c=this.account?[this.account]:[];break;case"eth_coinbase":c=this.account;break;case"net_version":c=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":c=!0;break;default:c={}}return{id:n.id,jsonrpc:n.jsonrpc,result:c}}this.sendAsync(n,s)}},{key:"enqueue",value:function(n){this.queue.push(n),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var n=(0,u.default)(o.default.mark(function s(){var c,f,g,b=this;return o.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(this.queue.length!==0){_.next=2;break}return _.abrupt("return");case 2:if(!(c=this.queue.shift())){_.next=11;break}return f=c.payload,g=c.cb,f.id=(0,T.randomId)(),_.next=9,this.postMessage(c.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,c.payload);case 9:f.batch&&f.batch.length>0?(f.batch.forEach(function(A){b.requests[A.id]={parentId:f.id,payload:A,cb:function(I,v){var m=b.requests[f.id].batchResponse;if(I&&I.response&&!(0,T.findExistingResponse)(m,I.response.id))throw m.push({jsonrpc:"2.0",id:I.response.id,error:{code:I.response.code,message:I.response.message}}),b.requests[f.id].cb(null,m),I.response;if(v&&v.result&&!(0,T.findExistingResponse)(m,v.id))return m.push(v);throw new Error("Fortmatic: unexpected callback behavior")}}}),this.requests[f.id]={payload:f,cb:g,batchResponse:[]}):this.requests[f.id]={payload:f,cb:g},this.dequeue();case 11:case"end":return _.stop()}},s,this)}));return function(){return n.apply(this,arguments)}}()},{key:"postMessage",value:function(){var n=(0,u.default)(o.default.mark(function s(c,f){var g;return o.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,this.overlay;case 2:if(!(g=b.sent).iframe.contentWindow){b.next=7;break}g.iframe.contentWindow.postMessage({msgType:c,payload:f},"*"),b.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return b.stop()}},s,this)}));return function(s,c){return n.apply(this,arguments)}}()},{key:"enable",value:function(){return T.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var n=this;window.addEventListener("message",function(s){if(s.origin===n.fortmaticClient){var c=s.data.response?s.data.response.id:null;switch(s.data.msgType){case n.postMessages.FORTMATIC_OVERLAY_READY:n.overlayReady=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HANDLE_RESPONSE:try{n.requests[c].cb(null,s.data.response);var f=n.requests[c].parentId;f&&n.requests[f].payload.batch.length===n.requests[f].batchResponse.length&&n.requests[f].cb(null,n.requests[f].batchResponse),n.requests[c].payload.method==="eth_accounts"?n.account=s.data.response.result[0]:n.requests[c].payload.method==="eth_coinbase"?n.account=s.data.response.result:n.requests[c].payload.method==="net_version"&&(n.network=s.data.response.result)}catch{}n.isLoggedIn=!0,n.dequeue();break;case n.postMessages.FORTMATIC_HIDE_OVERLAY:n.hideOverlay();break;case n.postMessages.FORTMATIC_SHOW_OVERLAY:n.showOverlay();break;case n.postMessages.FORTMATIC_USER_LOGOUT:n.account=null,n.network=null,n.isLoggedIn=!1;break;case n.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw n.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case n.postMessages.FORTMATIC_USER_DENIED:if(c){var g=s.data.response&&s.data.response.message?s.data.response.message:"Fortmatic: Modal was closed without executing action!",b=s.data.response&&s.data.response.code?s.data.response.code:1;n.requests[c].cb({message:g,code:b,response:s.data.response})}else n.queue.forEach(function(_){return _.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})});n.dequeue()}}})}}]),P}();y.default=w},function(h,y,a){h.exports=a(7)},function(h,y,a){var r=function(){return this||typeof self=="object"&&self}()||Function("return this")(),o=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,u=o&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,h.exports=a(8),o)r.regeneratorRuntime=u;else try{delete r.regeneratorRuntime}catch{r.regeneratorRuntime=void 0}},function(h,y){(function(a){var r,o=Object.prototype,u=o.hasOwnProperty,l=typeof Symbol=="function"?Symbol:{},R=l.iterator||"@@iterator",x=l.asyncIterator||"@@asyncIterator",O=l.toStringTag||"@@toStringTag",T=typeof h=="object",w=a.regeneratorRuntime;if(w)T&&(h.exports=w);else{(w=a.regeneratorRuntime=T?h.exports:{}).wrap=I;var P="suspendedStart",n="suspendedYield",s="executing",c="completed",f={},g={};g[R]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(G([])));_&&_!==o&&u.call(_,R)&&(g=_);var A=C.prototype=m.prototype=Object.create(g);M.prototype=A.constructor=C,C.constructor=M,C[O]=M.displayName="GeneratorFunction",w.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===M||(e.displayName||e.name)==="GeneratorFunction")},w.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,O in t||(t[O]="GeneratorFunction")),t.prototype=Object.create(A),t},w.awrap=function(t){return{__await:t}},V(U.prototype),U.prototype[x]=function(){return this},w.AsyncIterator=U,w.async=function(t,e,d,p){var i=new U(I(t,e,d,p));return w.isGeneratorFunction(e)?i:i.next().then(function(F){return F.done?F.value:i.next()})},V(A),A[O]="Generator",A[R]=function(){return this},A.toString=function(){return"[object Generator]"},w.keys=function(t){var e=[];for(var d in t)e.push(d);return e.reverse(),function p(){for(;e.length;){var i=e.pop();if(i in t)return p.value=i,p.done=!1,p}return p.done=!0,p}},w.values=G,K.prototype={constructor:K,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(Y),!t)for(var e in this)e.charAt(0)==="t"&&u.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function d(W,E){return F.type="throw",F.arg=t,e.next=W,E&&(e.method="next",e.arg=r),!!E}for(var p=this.tryEntries.length-1;p>=0;--p){var i=this.tryEntries[p],F=i.completion;if(i.tryLoc==="root")return d("end");if(i.tryLoc<=this.prev){var j=u.call(i,"catchLoc"),q=u.call(i,"finallyLoc");if(j&&q){if(this.prev<i.catchLoc)return d(i.catchLoc,!0);if(this.prev<i.finallyLoc)return d(i.finallyLoc)}else if(j){if(this.prev<i.catchLoc)return d(i.catchLoc,!0)}else{if(!q)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return d(i.finallyLoc)}}}},abrupt:function(t,e){for(var d=this.tryEntries.length-1;d>=0;--d){var p=this.tryEntries[d];if(p.tryLoc<=this.prev&&u.call(p,"finallyLoc")&&this.prev<p.finallyLoc){var i=p;break}}i&&(t==="break"||t==="continue")&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var F=i?i.completion:{};return F.type=t,F.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(F)},complete:function(t,e){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.finallyLoc===t)return this.complete(d.completion,d.afterLoc),Y(d),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var d=this.tryEntries[e];if(d.tryLoc===t){var p=d.completion;if(p.type==="throw"){var i=p.arg;Y(d)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,d){return this.delegate={iterator:G(t),resultName:e,nextLoc:d},this.method==="next"&&(this.arg=r),f}}}function I(t,e,d,p){var i=e&&e.prototype instanceof m?e:m,F=Object.create(i.prototype),j=new K(p||[]);return F._invoke=function(q,W,E){var L=P;return function(S,D){if(L===s)throw new Error("Generator is already running");if(L===c){if(S==="throw")throw D;return Q()}for(E.method=S,E.arg=D;;){var H=E.delegate;if(H){var N=B(H,E);if(N){if(N===f)continue;return N}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(L===P)throw L=c,E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);L=s;var k=v(q,W,E);if(k.type==="normal"){if(L=E.done?c:n,k.arg===f)continue;return{value:k.arg,done:E.done}}k.type==="throw"&&(L=c,E.method="throw",E.arg=k.arg)}}}(t,d,j),F}function v(t,e,d){try{return{type:"normal",arg:t.call(e,d)}}catch(p){return{type:"throw",arg:p}}}function m(){}function M(){}function C(){}function V(t){["next","throw","return"].forEach(function(e){t[e]=function(d){return this._invoke(e,d)}})}function U(t){var e;this._invoke=function(d,p){function i(){return new Promise(function(F,j){(function q(W,E,L,S){var D=v(t[W],t,E);if(D.type!=="throw"){var H=D.arg,N=H.value;return N&&typeof N=="object"&&u.call(N,"__await")?Promise.resolve(N.__await).then(function(k){q("next",k,L,S)},function(k){q("throw",k,L,S)}):Promise.resolve(N).then(function(k){H.value=k,L(H)},function(k){return q("throw",k,L,S)})}S(D.arg)})(d,p,F,j)})}return e=e?e.then(i,i):i()}}function B(t,e){var d=t.iterator[e.method];if(d===r){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=r,B(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var p=v(d,t.iterator,e.arg);if(p.type==="throw")return e.method="throw",e.arg=p.arg,e.delegate=null,f;var i=p.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=r),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function J(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function Y(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function K(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(J,this),this.reset(!0)}function G(t){if(t){var e=t[R];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var d=-1,p=function i(){for(;++d<t.length;)if(u.call(t,d))return i.value=t[d],i.done=!1,i;return i.value=r,i.done=!0,i};return p.next=p}}return{next:Q}}function Q(){return{value:r,done:!0}}})(function(){return this||typeof self=="object"&&self}()||Function("return this")())},function(h,y){function a(r,o,u,l,R,x,O){try{var T=r[x](O),w=T.value}catch(P){return void u(P)}T.done?o(w):Promise.resolve(w).then(l,R)}h.exports=function(r){return function(){var o=this,u=arguments;return new Promise(function(l,R){var x=r.apply(o,u);function O(w){a(x,l,R,O,T,"next",w)}function T(w){a(x,l,R,O,T,"throw",w)}O(void 0)})}}},function(h,y){function a(r,o){for(var u=0;u<o.length;u++){var l=o[u];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(r,l.key,l)}}h.exports=function(r,o,u){return o&&a(r.prototype,o),u&&a(r,u),r}},function(h){h.exports={name:"fortmatic",version:"1.1.3",description:"Fortmatic Javascript SDK",main:"lib/fortmatic.js",scripts:{build:"WEBPACK_ENV=production webpack","build:dev":"WEBPACK_ENV=development BABEL_ENV=development webpack --progress --colors --watch",test:"nyc --reporter=lcov --reporter=text-summary ava"},author:"Fortmatic <team@fortmatic.com> (https://fortmatic.com/)",license:"MIT",repository:{type:"git",url:"https://github.com/fortmatic/fortmatic-js"},keywords:["Auth","Login","Web3","Crypto","Ethereum","MetaMask","Wallet","Blockchain","Dapp"],homepage:"https://www.fortmatic.com",ava:{require:["@babel/register"],files:["test/**/*.spec.js"],babel:{testOptions:{presets:["@babel/env"],plugins:["@babel/plugin-proposal-function-bind","@babel/plugin-transform-runtime"]}},verbose:!0},nyc:{all:!1,"check-coverage":!0,"per-file":!0,lines:80,statements:80,functions:80,branches:80,include:["src/**/*.js"],exclude:["*/style.js"],require:[],reporter:["html","lcov"]},dependencies:{"@babel/runtime":"7.3.4"},devDependencies:{"@babel/core":"7.3.4","@babel/plugin-proposal-function-bind":"7.2.0","@babel/plugin-transform-modules-commonjs":"7.2.0","@babel/plugin-transform-runtime":"7.3.4","@babel/preset-env":"7.3.4","@babel/register":"7.0.0",ava:"2.2.0","babel-eslint":"10.0.1","babel-loader":"8.0.5",eslint:"5.9.0",lodash:"4.17.11",nyc:"13.1.0",sinon:"7.1.1",webpack:"4.26.1","webpack-cli":"3.1.2"}}},function(h,y,a){y.css=`
2
2
  .fortmatic-iframe {
3
3
  display: none;
4
4
  position: fixed;