@onepercentio/one-ui 0.9.5 → 0.9.6
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.
- package/package.json +1 -1
- package/.firebase/hosting.c3Rvcnlib29rLXN0YXRpYw.cache +0 -75
- package/storybook-static/0.e5489f12ab94aa497491.manager.bundle.js +0 -2
- package/storybook-static/0.e5489f12ab94aa497491.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.7d0dd704b26935d06a04.manager.bundle.js +0 -1
- package/storybook-static/10.398dd7a0522c1ff2b3a8.manager.bundle.js +0 -1
- package/storybook-static/138.6187167c.iframe.bundle.js +0 -1
- package/storybook-static/220.674c0bf1.iframe.bundle.js +0 -1
- package/storybook-static/229.f9ea1466.iframe.bundle.js +0 -1
- package/storybook-static/273.da38e6e3.iframe.bundle.js +0 -2
- package/storybook-static/273.da38e6e3.iframe.bundle.js.LICENSE.txt +0 -28
- package/storybook-static/352.294a6a74.iframe.bundle.js +0 -1
- package/storybook-static/363.f17b422d.iframe.bundle.js +0 -2
- package/storybook-static/363.f17b422d.iframe.bundle.js.LICENSE.txt +0 -6
- package/storybook-static/412.733afc6e.iframe.bundle.js +0 -1
- package/storybook-static/452.99cd3b8c.iframe.bundle.js +0 -1
- package/storybook-static/46.ee106131.iframe.bundle.js +0 -1
- package/storybook-static/5.23ef655b5acff6eac8ad.manager.bundle.js +0 -1
- package/storybook-static/51.8e7baa4a.iframe.bundle.js +0 -2
- package/storybook-static/51.8e7baa4a.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/551.c2ccadd6.iframe.bundle.js +0 -1
- package/storybook-static/553.652f0995.iframe.bundle.js +0 -2
- package/storybook-static/553.652f0995.iframe.bundle.js.LICENSE.txt +0 -23
- package/storybook-static/559.577b26d7.iframe.bundle.js +0 -1
- package/storybook-static/581.da7fce5d.iframe.bundle.js +0 -1
- package/storybook-static/6.d2f96bcf3b11b0f1a44b.manager.bundle.js +0 -1
- package/storybook-static/629.45033b3b.iframe.bundle.js +0 -2
- package/storybook-static/629.45033b3b.iframe.bundle.js.LICENSE.txt +0 -1
- package/storybook-static/630.f2f00783.iframe.bundle.js +0 -1
- package/storybook-static/645.2498ba11.iframe.bundle.js +0 -2
- package/storybook-static/645.2498ba11.iframe.bundle.js.LICENSE.txt +0 -14
- package/storybook-static/7.a1c5467faea0833b53d1.manager.bundle.js +0 -1
- package/storybook-static/701.24112ab9.iframe.bundle.js +0 -1
- package/storybook-static/71.7abff480.iframe.bundle.js +0 -2
- package/storybook-static/71.7abff480.iframe.bundle.js.LICENSE.txt +0 -10
- package/storybook-static/745.6b9017a1.iframe.bundle.js +0 -1
- package/storybook-static/792.22a9b462.iframe.bundle.js +0 -1
- package/storybook-static/8.65ec2749796fb05c258c.manager.bundle.js +0 -2
- package/storybook-static/8.65ec2749796fb05c258c.manager.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/806.11577851.iframe.bundle.js +0 -1
- package/storybook-static/807.8b5924ce.iframe.bundle.js +0 -2
- package/storybook-static/807.8b5924ce.iframe.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/85.1ef0d41f.iframe.bundle.js +0 -2
- package/storybook-static/85.1ef0d41f.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/866.2b96cc93.iframe.bundle.js +0 -2
- package/storybook-static/866.2b96cc93.iframe.bundle.js.LICENSE.txt +0 -211
- package/storybook-static/878.e3547f8c.iframe.bundle.js +0 -1
- package/storybook-static/897.685241f9.iframe.bundle.js +0 -2
- package/storybook-static/897.685241f9.iframe.bundle.js.LICENSE.txt +0 -12
- package/storybook-static/9.acd0ef9064e0667433ac.manager.bundle.js +0 -2
- package/storybook-static/9.acd0ef9064e0667433ac.manager.bundle.js.LICENSE.txt +0 -31
- package/storybook-static/90.30e727d2.iframe.bundle.js +0 -1
- package/storybook-static/929.9aa2f85f.iframe.bundle.js +0 -1
- package/storybook-static/935.9c449351.iframe.bundle.js +0 -1
- package/storybook-static/950.78af67e2.iframe.bundle.js +0 -1
- package/storybook-static/962.08244f28.iframe.bundle.js +0 -1
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +0 -364
- package/storybook-static/index.html +0 -51
- package/storybook-static/main.221efcc3.iframe.bundle.js +0 -2
- package/storybook-static/main.221efcc3.iframe.bundle.js.LICENSE.txt +0 -1
- package/storybook-static/main.3fb8cb266a67ec5355cf.manager.bundle.js +0 -2
- package/storybook-static/main.3fb8cb266a67ec5355cf.manager.bundle.js.LICENSE.txt +0 -54
- package/storybook-static/project.json +0 -1
- package/storybook-static/runtime~main.64947dad.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.8e5cf3a9715a0d32d390.manager.bundle.js +0 -1
- package/storybook-static/static/media/Cipher.cf0cd97b.png +0 -0
- package/storybook-static/static/media/Fortmatic.4324caad.svg +0 -1
- package/storybook-static/static/media/Frame.aa35d8c0.png +0 -0
- package/storybook-static/static/media/Metamask.30eeac05.png +0 -0
- package/storybook-static/static/media/Portis.4676caf6.svg +0 -1
- package/storybook-static/static/media/Status.20751041.png +0 -0
- package/storybook-static/static/media/checkbox.1b6c2edc.svg +0 -3
- package/storybook-static/static/media/wallet.f29cb53a.svg +0 -1
- package/storybook-static/static/media/walletconnect.9b7e021b.png +0 -0
- package/storybook-static/vendors~main.7c47903ea43e951c3707.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.7c47903ea43e951c3707.manager.bundle.js.LICENSE.txt +0 -55
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* The buffer module from node.js, for the browser.
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* https://github.com/es-shims/es5-shim
|
|
10
|
-
* @license es5-shim Copyright 2009-2020 by contributors, MIT License
|
|
11
|
-
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*!
|
|
15
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
18
|
-
* Released under the MIT License.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/*!
|
|
22
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
23
|
-
*
|
|
24
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
25
|
-
* Released under the MIT License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/*!
|
|
29
|
-
* matter-js 0.18.0 by @liabru
|
|
30
|
-
* http://brm.io/matter-js/
|
|
31
|
-
* License MIT
|
|
32
|
-
*
|
|
33
|
-
* The MIT License (MIT)
|
|
34
|
-
*
|
|
35
|
-
* Copyright (c) Liam Brummitt and contributors.
|
|
36
|
-
*
|
|
37
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
38
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
39
|
-
* in the Software without restriction, including without limitation the rights
|
|
40
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
41
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
42
|
-
* furnished to do so, subject to the following conditions:
|
|
43
|
-
*
|
|
44
|
-
* The above copyright notice and this permission notice shall be included in
|
|
45
|
-
* all copies or substantial portions of the Software.
|
|
46
|
-
*
|
|
47
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
48
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
49
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
50
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
51
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
52
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
53
|
-
* THE SOFTWARE.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @license
|
|
58
|
-
* Lodash <https://lodash.com/>
|
|
59
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
60
|
-
* Released under MIT license <https://lodash.com/license>
|
|
61
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
62
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* @license React
|
|
67
|
-
* react-dom-server-legacy.browser.production.min.js
|
|
68
|
-
*
|
|
69
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the MIT license found in the
|
|
72
|
-
* LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @license React
|
|
77
|
-
* react-dom-server.browser.production.min.js
|
|
78
|
-
*
|
|
79
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the MIT license found in the
|
|
82
|
-
* LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @license React
|
|
87
|
-
* react-dom.production.min.js
|
|
88
|
-
*
|
|
89
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the MIT license found in the
|
|
92
|
-
* LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @license React
|
|
97
|
-
* react-jsx-runtime.production.min.js
|
|
98
|
-
*
|
|
99
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the MIT license found in the
|
|
102
|
-
* LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @license React
|
|
107
|
-
* react.production.min.js
|
|
108
|
-
*
|
|
109
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the MIT license found in the
|
|
112
|
-
* LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @license React
|
|
117
|
-
* scheduler.production.min.js
|
|
118
|
-
*
|
|
119
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the MIT license found in the
|
|
122
|
-
* LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
127
|
-
*
|
|
128
|
-
* @version 0.8.0
|
|
129
|
-
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
130
|
-
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
131
|
-
* @license MIT
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* chroma.js - JavaScript library for color conversions
|
|
136
|
-
*
|
|
137
|
-
* Copyright (c) 2011-2019, Gregor Aisch
|
|
138
|
-
* All rights reserved.
|
|
139
|
-
*
|
|
140
|
-
* Redistribution and use in source and binary forms, with or without
|
|
141
|
-
* modification, are permitted provided that the following conditions are met:
|
|
142
|
-
*
|
|
143
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
144
|
-
* list of conditions and the following disclaimer.
|
|
145
|
-
*
|
|
146
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
147
|
-
* this list of conditions and the following disclaimer in the documentation
|
|
148
|
-
* and/or other materials provided with the distribution.
|
|
149
|
-
*
|
|
150
|
-
* 3. The name Gregor Aisch may not be used to endorse or promote products
|
|
151
|
-
* derived from this software without specific prior written permission.
|
|
152
|
-
*
|
|
153
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
154
|
-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
155
|
-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
156
|
-
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
157
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
158
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
159
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
|
160
|
-
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
161
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
162
|
-
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
163
|
-
*
|
|
164
|
-
* -------------------------------------------------------
|
|
165
|
-
*
|
|
166
|
-
* chroma.js includes colors from colorbrewer2.org, which are released under
|
|
167
|
-
* the following license:
|
|
168
|
-
*
|
|
169
|
-
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
|
|
170
|
-
* and The Pennsylvania State University.
|
|
171
|
-
*
|
|
172
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
173
|
-
* you may not use this file except in compliance with the License.
|
|
174
|
-
* You may obtain a copy of the License at
|
|
175
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
176
|
-
*
|
|
177
|
-
* Unless required by applicable law or agreed to in writing,
|
|
178
|
-
* software distributed under the License is distributed on an
|
|
179
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
180
|
-
* either express or implied. See the License for the specific
|
|
181
|
-
* language governing permissions and limitations under the License.
|
|
182
|
-
*
|
|
183
|
-
* ------------------------------------------------------
|
|
184
|
-
*
|
|
185
|
-
* Named colors are taken from X11 Color Names.
|
|
186
|
-
* http://www.w3.org/TR/css3-color/#svg-color
|
|
187
|
-
*
|
|
188
|
-
* @preserve
|
|
189
|
-
*/
|
|
190
|
-
|
|
191
|
-
/** @license React v16.13.1
|
|
192
|
-
* react-is.production.min.js
|
|
193
|
-
*
|
|
194
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the MIT license found in the
|
|
197
|
-
* LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/
|
|
199
|
-
|
|
200
|
-
/** @license React v17.0.2
|
|
201
|
-
* react-is.production.min.js
|
|
202
|
-
*
|
|
203
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the MIT license found in the
|
|
206
|
-
* LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
//! stable.js 0.1.8, https://github.com/Two-Screen/stable
|
|
210
|
-
|
|
211
|
-
//! © 2018 Angry Bytes and contributors. MIT licensed.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_onepercentio_one_ui=self.webpackChunk_onepercentio_one_ui||[]).push([[878],{"./node_modules/fortmatic/lib/fortmatic.js":function(module){module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";function n(){return Math.floor(9e4*Math.random())+1e4}Object.defineProperty(t,"__esModule",{value:!0}),t.sendAsyncWrapper=function(e,t){var r=this;return new Promise((function(o,a){r.sendAsync({jsonrpc:"2.0",id:n(),method:e,params:t||[]},(function(e,t){e?a(e):o(t.result)}))}))},t.sendFortmaticAsyncWrapper=function(e){var t=this;return new Promise((function(r,n){t.getProvider().sendFortmaticAsync(e,(function(e,t){e?n(e):r(t?t.result:{})}))}))},t.randomId=n,t.findExistingResponse=function(e,t){for(var r=0;r<e.length;r++)if(e[r].id===t)return e[r];return null}},function(e,t,r){e.exports=r(4)},function(e,t,r){"use strict";var n=r(0),o=n(r(1)),a=n(r(5)),i=r(2),m="fm_configure",y={};e.exports=function e(t,r,n){var g=this;if((0,o.default)(this,e),this.fortmaticClient="https://x2.fortmatic.com",!t)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.apiKey=t,this.options=n,this.ethNetwork=r,this.queryParams=btoa(JSON.stringify({API_KEY:t,ETH_NETWORK:r})),this.transactions={send:function(e,t){var r=new v("fm_composeSend",{to:e.to,value:e.amount});g.getProvider().sendFortmaticAsync(r,t)}},this.getProvider=function(){return y["fortmatic-".concat(g.queryParams)]||(y["fortmatic-".concat(g.queryParams)]=new a.default(g.fortmaticClient,{API_KEY:t,ETH_NETWORK:r})),y["fortmatic-".concat(g.queryParams)]},this.user={login:function(){return g.getProvider().enable()},logout:function(){g.getProvider().account=null,g.getProvider().network=null;var e=new v("fm_logout");return i.sendFortmaticAsyncWrapper.call(g,e)},getUser:function(){var e=new v("fm_get_user");return i.sendFortmaticAsyncWrapper.call(g,e)},getBalances:function(){var e=new v("fm_get_balances");return i.sendFortmaticAsyncWrapper.call(g,e)},getTransactions:function(){var e=new v("fm_get_transactions");return i.sendFortmaticAsyncWrapper.call(g,e)},isLoggedIn:function(){var e=new v("fm_is_logged_in");return i.sendFortmaticAsyncWrapper.call(g,e)},settings:function(){var e=new v("fm_accountSettings");return i.sendFortmaticAsyncWrapper.call(g,e)},deposit:function(e){var t=new v("fm_deposit",e);return i.sendFortmaticAsyncWrapper.call(g,t)}},this.configure=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new v(m);return t.params=[e],i.sendFortmaticAsyncWrapper.call(g,t)}};var v=function e(t,r){(0,o.default)(this,e),this.id=(0,i.randomId)(),this.method=t,this.params=r?[r]:[{}]}},function(e,t,r){"use strict";var n=r(0);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r(6)),a=n(r(9)),i=n(r(1)),s=n(r(10)),c=r(11),u=n(r(12)),l=r(2),f=function(){function e(t,r){if((0,i.default)(this,e),this.fortmaticClient=t,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"},!r.API_KEY)throw new Error("Please provide a Fortmatic API key that you acquired from the developer dashboard.");this.options={API_KEY:r.API_KEY,ETH_NETWORK:r.ETH_NETWORK,DOMAIN_ORIGIN:window.location?window.location.origin:"",version:c.version},this.queryParams=btoa(JSON.stringify(this.options)),this.constructPostMessage(),this.overlay=this.createOverlay(),this.listenMessage()}return(0,s.default)(e,[{key:"constructPostMessage",value:function(){var e=this;Object.keys(this.postMessages).map((function(t){e.postMessages[t]+="-".concat(e.queryParams)}))}},{key:"createOverlay",value:function(){var e=this;return new Promise((function(t,r){var n=function(){if(function(){var t=!0,r=!1,n=void 0;try{for(var o,a=document.getElementsByClassName("fortmatic-iframe")[Symbol.iterator]();!(t=(o=a.next()).done);t=!0)if(o.value.src.includes(e.queryParams))return!1}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}return!0}()){var r=document.createElement("style");r.innerHTML=u.default.css,r.type="text/css",document.head.appendChild(r);var n=document.createElement("iframe");n.className="fortmatic-iframe",n.src="".concat(e.fortmaticClient,"/send?params=").concat(e.queryParams),document.body.appendChild(n);var o=document.createElement("img");o.src="https://static.fortmatic.com/assets/trans.gif",document.body.appendChild(o),t({iframe:n})}else console.error("Fortmatic: Duplicate instances found.")};["loaded","interactive","complete"].indexOf(document.readyState)>-1?n():window.addEventListener("load",n.bind(e),!1)}))}},{key:"showOverlay",value:function(){var e=(0,a.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.overlay;case 2:e.sent.iframe.style.display="block";case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hideOverlay",value:function(){var e=(0,a.default)(o.default.mark((function e(){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.overlay;case 2:e.sent.iframe.style.display="none";case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"sendAsync",value:function(e,t){e.length>0?this.enqueue({payload:{id:(0,l.randomId)(),batch:e.map((function(e){return e.id=(0,l.randomId)(),e})),method:"eth_batchRequest"},cb:t}):this.enqueue({payload:e,cb:t})}},{key:"sendFortmaticAsync",value:function(e,t){this.enqueue({payload:e,cb:t,isNative:!0})}},{key:"send",value:function(e,t){if("string"==typeof e)return l.sendAsyncWrapper.call(this,e,t);if(!t){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(e,(function(){}));var r={};switch(e.method){case"eth_accounts":r=this.account?[this.account]:[];break;case"eth_coinbase":r=this.account;break;case"net_version":r=this.network||(this.options.API_KEY.startsWith("pk_live")?1:4);break;case"eth_uninstallFilter":r=!0;break;default:r={}}return{id:e.id,jsonrpc:e.jsonrpc,result:r}}this.sendAsync(e,t)}},{key:"enqueue",value:function(e){this.queue.push(e),this.overlayReady&&this.dequeue()}},{key:"dequeue",value:function(){var e=(0,a.default)(o.default.mark((function e(){var t,r,n,a=this;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this.queue.length){e.next=2;break}return e.abrupt("return");case 2:if(!(t=this.queue.shift())){e.next=11;break}return r=t.payload,n=t.cb,r.id=(0,l.randomId)(),e.next=9,this.postMessage(t.isNative?this.postMessages.FORTMATIC_HANDLE_FORTMATIC_REQUEST:this.postMessages.FORTMATIC_HANDLE_REQUEST,t.payload);case 9:r.batch&&r.batch.length>0?(r.batch.forEach((function(e){a.requests[e.id]={parentId:r.id,payload:e,cb:function(e,t){var n=a.requests[r.id].batchResponse;if(e&&e.response&&!(0,l.findExistingResponse)(n,e.response.id))throw n.push({jsonrpc:"2.0",id:e.response.id,error:{code:e.response.code,message:e.response.message}}),a.requests[r.id].cb(null,n),e.response;if(t&&t.result&&!(0,l.findExistingResponse)(n,t.id))return n.push(t);throw new Error("Fortmatic: unexpected callback behavior")}}})),this.requests[r.id]={payload:r,cb:n,batchResponse:[]}):this.requests[r.id]={payload:r,cb:n},this.dequeue();case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"postMessage",value:function(){var e=(0,a.default)(o.default.mark((function e(t,r){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.overlay;case 2:if(!(n=e.sent).iframe.contentWindow){e.next=7;break}n.iframe.contentWindow.postMessage({msgType:t,payload:r},"*"),e.next=8;break;case 7:throw new Error("Fortmatic: Modal is not ready.");case 8:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"enable",value:function(){return l.sendAsyncWrapper.call(this,"eth_accounts")}},{key:"listenMessage",value:function(){var e=this;window.addEventListener("message",(function(t){if(t.origin===e.fortmaticClient){var r=t.data.response?t.data.response.id:null;switch(t.data.msgType){case e.postMessages.FORTMATIC_OVERLAY_READY:e.overlayReady=!0,e.dequeue();break;case e.postMessages.FORTMATIC_HANDLE_RESPONSE:try{e.requests[r].cb(null,t.data.response);var n=e.requests[r].parentId;n&&e.requests[n].payload.batch.length===e.requests[n].batchResponse.length&&e.requests[n].cb(null,e.requests[n].batchResponse),"eth_accounts"===e.requests[r].payload.method?e.account=t.data.response.result[0]:"eth_coinbase"===e.requests[r].payload.method?e.account=t.data.response.result:"net_version"===e.requests[r].payload.method&&(e.network=t.data.response.result)}catch(e){}e.isLoggedIn=!0,e.dequeue();break;case e.postMessages.FORTMATIC_HIDE_OVERLAY:e.hideOverlay();break;case e.postMessages.FORTMATIC_SHOW_OVERLAY:e.showOverlay();break;case e.postMessages.FORTMATIC_USER_LOGOUT:e.account=null,e.network=null,e.isLoggedIn=!1;break;case e.postMessages.FORTMATIC_UNAUTHORIZED_API_KEY:throw e.overlayReady=!1,new Error("Given API key is not authorized to access the resource.");case e.postMessages.FORTMATIC_USER_DENIED:if(r){var o=t.data.response&&t.data.response.message?t.data.response.message:"Fortmatic: Modal was closed without executing action!",a=t.data.response&&t.data.response.code?t.data.response.code:1;e.requests[r].cb({message:o,code:a,response:t.data.response})}else e.queue.forEach((function(e){return e.cb({message:"Fortmatic: Modal was closed without executing action!",code:1})}));e.dequeue()}}}))}}]),e}();t.default=f},function(e,t,r){e.exports=r(7)},function(e,t,r){var n=function(){return this||"object"==typeof self&&self}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,a=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r(8),o)n.regeneratorRuntime=a;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",u="object"==typeof e,l=t.regeneratorRuntime;if(l)u&&(e.exports=l);else{(l=t.regeneratorRuntime=u?e.exports:{}).wrap=_;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",m={},y={};y[i]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(L([])));g&&g!==n&&o.call(g,i)&&(y=g);var b=A.prototype=w.prototype=Object.create(y);T.prototype=b.constructor=A,A.constructor=T,A[c]=T.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===T||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(b),e},l.awrap=function(e){return{__await:e}},O(R.prototype),R.prototype[s]=function(){return this},l.AsyncIterator=R,l.async=function(e,t,r,n){var o=new R(_(e,t,r,n));return l.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},O(b),b[c]="Generator",b[i]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=L,F.prototype={constructor:F,reset:function(e){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(M),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return s.type="throw",s.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}}}function _(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),i=new F(n||[]);return a._invoke=function(e,t,r){var n=f;return function(o,a){if(n===h)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw a;return k()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=I(i,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=E(e,t,r);if("normal"===c.type){if(n=r.done?p:d,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=p,r.method="throw",r.arg=c.arg)}}}(e,r,i),a}function E(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function w(){}function T(){}function A(){}function O(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function R(e){var t;this._invoke=function(r,n){function a(){return new Promise((function(t,a){!function t(r,n,a,i){var s=E(e[r],e,n);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then((function(e){t("next",e,a,i)}),(function(e){t("throw",e,a,i)})):Promise.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return t("throw",e,a,i)}))}i(s.arg)}(r,n,t,a)}))}return t=t?t.then(a,a):a()}}function I(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,I(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=E(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function L(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}return{next:k}}function k(){return{value:r,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t){function r(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function s(e){r(i,o,a,s,c,"next",e)}function c(e){r(i,o,a,s,c,"throw",e)}s(void 0)}))}}},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e){e.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(e,t,r){"use strict";t.css="\n .fortmatic-iframe {\n display: none;\n position: fixed;\n top: 0;\n right: 0;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: 0;\n z-index: 2147483647;\n }\n"}])}}]);
|