@web3auth/modal 3.0.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.
@@ -0,0 +1,1145 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ 591:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+ "use strict";
8
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
+ /* harmony export */ "Jx": () => (/* binding */ defaultSolanaDappModalConfig),
10
+ /* harmony export */ "K8": () => (/* binding */ defaultSolanaWalletModalConfig),
11
+ /* harmony export */ "OW": () => (/* binding */ defaultEvmDappModalConfig),
12
+ /* harmony export */ "ql": () => (/* binding */ defaultEvmWalletModalConfig),
13
+ /* harmony export */ "ue": () => (/* binding */ defaultOtherModalConfig)
14
+ /* harmony export */ });
15
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(195);
16
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
17
+ /* harmony import */ var _web3auth_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(612);
18
+ /* harmony import */ var _web3auth_base__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_web3auth_base__WEBPACK_IMPORTED_MODULE_1__);
19
+
20
+
21
+ var _adapters, _adapters2;
22
+
23
+
24
+ var defaultSolanaDappModalConfig = {
25
+ chainNamespace: _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.CHAIN_NAMESPACES.SOLANA,
26
+ adapters: (_adapters = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.SOLANA_ADAPTERS.TORUS_SOLANA, {
27
+ label: "Torus Wallet",
28
+ showOnModal: true,
29
+ showOnMobile: true,
30
+ showOnDesktop: true
31
+ }), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.SOLANA_ADAPTERS.OPENLOGIN, {
32
+ label: "OpenLogin",
33
+ showOnModal: true,
34
+ showOnMobile: true,
35
+ showOnDesktop: true
36
+ }), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.SOLANA_ADAPTERS.PHANTOM, {
37
+ label: "Phantom",
38
+ showOnModal: true,
39
+ showOnMobile: false,
40
+ showOnDesktop: true
41
+ }), _adapters)
42
+ };
43
+ var defaultEvmDappModalConfig = {
44
+ chainNamespace: _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.CHAIN_NAMESPACES.EIP155,
45
+ adapters: (_adapters2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters2, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.EVM_ADAPTERS.TORUS_EVM, {
46
+ label: "Torus Wallet",
47
+ showOnModal: true,
48
+ showOnMobile: true,
49
+ showOnDesktop: true
50
+ }), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters2, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.EVM_ADAPTERS.METAMASK, {
51
+ label: "MetaMask",
52
+ showOnModal: true,
53
+ showOnMobile: false,
54
+ showOnDesktop: true
55
+ }), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters2, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.EVM_ADAPTERS.OPENLOGIN, {
56
+ label: "OpenLogin",
57
+ showOnModal: true,
58
+ showOnMobile: true,
59
+ showOnDesktop: true
60
+ }), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_adapters2, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.EVM_ADAPTERS.WALLET_CONNECT_V1, {
61
+ label: "Wallet Connect",
62
+ showOnModal: true,
63
+ showOnMobile: true,
64
+ showOnDesktop: true
65
+ }), _adapters2)
66
+ };
67
+ var defaultSolanaWalletModalConfig = {
68
+ chainNamespace: _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.CHAIN_NAMESPACES.SOLANA,
69
+ adapters: _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.SOLANA_ADAPTERS.OPENLOGIN, {
70
+ label: "OpenLogin",
71
+ showOnModal: true,
72
+ showOnMobile: true,
73
+ showOnDesktop: true
74
+ })
75
+ };
76
+ var defaultEvmWalletModalConfig = {
77
+ chainNamespace: _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.CHAIN_NAMESPACES.EIP155,
78
+ adapters: _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.EVM_ADAPTERS.OPENLOGIN, {
79
+ label: "OpenLogin",
80
+ showOnModal: true,
81
+ showOnMobile: true,
82
+ showOnDesktop: true
83
+ })
84
+ };
85
+ var defaultOtherModalConfig = {
86
+ chainNamespace: _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.CHAIN_NAMESPACES.OTHER,
87
+ adapters: _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, _web3auth_base__WEBPACK_IMPORTED_MODULE_1__.EVM_ADAPTERS.OPENLOGIN, {
88
+ label: "OpenLogin",
89
+ showOnModal: true,
90
+ showOnMobile: true,
91
+ showOnDesktop: true
92
+ })
93
+ };
94
+
95
+ /***/ }),
96
+
97
+ /***/ 510:
98
+ /***/ (() => {
99
+
100
+
101
+
102
+ /***/ }),
103
+
104
+ /***/ 17:
105
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
106
+
107
+ "use strict";
108
+
109
+ // EXPORTS
110
+ __webpack_require__.d(__webpack_exports__, {
111
+ "$": () => (/* binding */ Web3Auth)
112
+ });
113
+
114
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/toConsumableArray"
115
+ const toConsumableArray_namespaceObject = require("@babel/runtime/helpers/toConsumableArray");
116
+ var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_namespaceObject);
117
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/asyncToGenerator"
118
+ const asyncToGenerator_namespaceObject = require("@babel/runtime/helpers/asyncToGenerator");
119
+ var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator_namespaceObject);
120
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/classCallCheck"
121
+ const classCallCheck_namespaceObject = require("@babel/runtime/helpers/classCallCheck");
122
+ var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck_namespaceObject);
123
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/createClass"
124
+ const createClass_namespaceObject = require("@babel/runtime/helpers/createClass");
125
+ var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass_namespaceObject);
126
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/assertThisInitialized"
127
+ const assertThisInitialized_namespaceObject = require("@babel/runtime/helpers/assertThisInitialized");
128
+ var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized_namespaceObject);
129
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/get"
130
+ const get_namespaceObject = require("@babel/runtime/helpers/get");
131
+ var get_default = /*#__PURE__*/__webpack_require__.n(get_namespaceObject);
132
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/inherits"
133
+ const inherits_namespaceObject = require("@babel/runtime/helpers/inherits");
134
+ var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits_namespaceObject);
135
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/possibleConstructorReturn"
136
+ const possibleConstructorReturn_namespaceObject = require("@babel/runtime/helpers/possibleConstructorReturn");
137
+ var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn_namespaceObject);
138
+ ;// CONCATENATED MODULE: external "@babel/runtime/helpers/getPrototypeOf"
139
+ const getPrototypeOf_namespaceObject = require("@babel/runtime/helpers/getPrototypeOf");
140
+ var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf_namespaceObject);
141
+ // EXTERNAL MODULE: external "@babel/runtime/helpers/defineProperty"
142
+ var defineProperty_ = __webpack_require__(195);
143
+ var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);
144
+ ;// CONCATENATED MODULE: external "@babel/runtime/regenerator"
145
+ const regenerator_namespaceObject = require("@babel/runtime/regenerator");
146
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_namespaceObject);
147
+ // EXTERNAL MODULE: external "@web3auth/base"
148
+ var base_ = __webpack_require__(612);
149
+ ;// CONCATENATED MODULE: external "@web3auth/core"
150
+ const core_namespaceObject = require("@web3auth/core");
151
+ ;// CONCATENATED MODULE: external "@web3auth/ui"
152
+ const ui_namespaceObject = require("@web3auth/ui");
153
+ var ui_default = /*#__PURE__*/__webpack_require__.n(ui_namespaceObject);
154
+ // EXTERNAL MODULE: ./src/config.ts
155
+ var config = __webpack_require__(591);
156
+ ;// CONCATENATED MODULE: ./src/default.ts
157
+
158
+
159
+
160
+
161
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
162
+
163
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
164
+
165
+
166
+ var getDefaultAdapterModule = /*#__PURE__*/function () {
167
+ var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee(params) {
168
+ var name, customChainConfig, clientId, finalChainConfig, _yield$import, TorusWalletAdapter, adapter, _yield$import2, SolanaWalletAdapter, _adapter, _yield$import3, MetamaskAdapter, _adapter2, _yield$import4, PhantomAdapter, _adapter3, _yield$import5, WalletConnectV1Adapter, _adapter4, _yield$import6, OpenloginAdapter, getOpenloginDefaultOptions, defaultOptions, _adapter5;
169
+
170
+ return regenerator_default().wrap(function _callee$(_context) {
171
+ while (1) {
172
+ switch (_context.prev = _context.next) {
173
+ case 0:
174
+ name = params.name, customChainConfig = params.customChainConfig, clientId = params.clientId;
175
+
176
+ if (Object.values(base_.CHAIN_NAMESPACES).includes(customChainConfig.chainNamespace)) {
177
+ _context.next = 3;
178
+ break;
179
+ }
180
+
181
+ throw new Error("Invalid chainNamespace: ".concat(customChainConfig.chainNamespace));
182
+
183
+ case 3:
184
+ finalChainConfig = _objectSpread(_objectSpread({}, (0,base_.getChainConfig)(customChainConfig.chainNamespace, customChainConfig === null || customChainConfig === void 0 ? void 0 : customChainConfig.chainId)), customChainConfig || {});
185
+
186
+ if (!(name === base_.WALLET_ADAPTERS.TORUS_EVM)) {
187
+ _context.next = 13;
188
+ break;
189
+ }
190
+
191
+ _context.next = 7;
192
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 546, 23));
193
+
194
+ case 7:
195
+ _yield$import = _context.sent;
196
+ TorusWalletAdapter = _yield$import.TorusWalletAdapter;
197
+ adapter = new TorusWalletAdapter({
198
+ chainConfig: finalChainConfig,
199
+ clientId: clientId
200
+ });
201
+ return _context.abrupt("return", adapter);
202
+
203
+ case 13:
204
+ if (!(name === base_.WALLET_ADAPTERS.TORUS_SOLANA)) {
205
+ _context.next = 22;
206
+ break;
207
+ }
208
+
209
+ _context.next = 16;
210
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 5, 23));
211
+
212
+ case 16:
213
+ _yield$import2 = _context.sent;
214
+ SolanaWalletAdapter = _yield$import2.SolanaWalletAdapter;
215
+ _adapter = new SolanaWalletAdapter({
216
+ chainConfig: finalChainConfig,
217
+ clientId: clientId
218
+ });
219
+ return _context.abrupt("return", _adapter);
220
+
221
+ case 22:
222
+ if (!(name === base_.WALLET_ADAPTERS.METAMASK)) {
223
+ _context.next = 31;
224
+ break;
225
+ }
226
+
227
+ _context.next = 25;
228
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 508, 23));
229
+
230
+ case 25:
231
+ _yield$import3 = _context.sent;
232
+ MetamaskAdapter = _yield$import3.MetamaskAdapter;
233
+ _adapter2 = new MetamaskAdapter({
234
+ chainConfig: finalChainConfig,
235
+ clientId: clientId
236
+ });
237
+ return _context.abrupt("return", _adapter2);
238
+
239
+ case 31:
240
+ if (!(name === base_.WALLET_ADAPTERS.PHANTOM)) {
241
+ _context.next = 40;
242
+ break;
243
+ }
244
+
245
+ _context.next = 34;
246
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 915, 23));
247
+
248
+ case 34:
249
+ _yield$import4 = _context.sent;
250
+ PhantomAdapter = _yield$import4.PhantomAdapter;
251
+ _adapter3 = new PhantomAdapter({
252
+ chainConfig: finalChainConfig,
253
+ clientId: clientId
254
+ });
255
+ return _context.abrupt("return", _adapter3);
256
+
257
+ case 40:
258
+ if (!(name === base_.WALLET_ADAPTERS.WALLET_CONNECT_V1)) {
259
+ _context.next = 49;
260
+ break;
261
+ }
262
+
263
+ _context.next = 43;
264
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 347, 23));
265
+
266
+ case 43:
267
+ _yield$import5 = _context.sent;
268
+ WalletConnectV1Adapter = _yield$import5.WalletConnectV1Adapter;
269
+ _adapter4 = new WalletConnectV1Adapter({
270
+ chainConfig: finalChainConfig,
271
+ clientId: clientId
272
+ });
273
+ return _context.abrupt("return", _adapter4);
274
+
275
+ case 49:
276
+ if (!(name === base_.WALLET_ADAPTERS.OPENLOGIN)) {
277
+ _context.next = 58;
278
+ break;
279
+ }
280
+
281
+ _context.next = 52;
282
+ return Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 683, 23));
283
+
284
+ case 52:
285
+ _yield$import6 = _context.sent;
286
+ OpenloginAdapter = _yield$import6.OpenloginAdapter;
287
+ getOpenloginDefaultOptions = _yield$import6.getOpenloginDefaultOptions;
288
+ defaultOptions = getOpenloginDefaultOptions(customChainConfig.chainNamespace, customChainConfig === null || customChainConfig === void 0 ? void 0 : customChainConfig.chainId);
289
+ _adapter5 = new OpenloginAdapter(_objectSpread(_objectSpread({}, defaultOptions), {}, {
290
+ chainConfig: _objectSpread(_objectSpread({}, defaultOptions.chainConfig || {}), finalChainConfig),
291
+ adapterSettings: _objectSpread(_objectSpread({}, defaultOptions.adapterSettings), {}, {
292
+ clientId: clientId
293
+ })
294
+ }));
295
+ return _context.abrupt("return", _adapter5);
296
+
297
+ case 58:
298
+ throw new Error("Invalid wallet adapter name");
299
+
300
+ case 59:
301
+ case "end":
302
+ return _context.stop();
303
+ }
304
+ }
305
+ }, _callee);
306
+ }));
307
+
308
+ return function getDefaultAdapterModule(_x) {
309
+ return _ref.apply(this, arguments);
310
+ };
311
+ }();
312
+ ;// CONCATENATED MODULE: ./src/utils.ts
313
+ var languageMap = {
314
+ en: "english",
315
+ de: "german",
316
+ ja: "japanese",
317
+ ko: "korean",
318
+ zh: "mandarin",
319
+ es: "spanish"
320
+ };
321
+ var getUserLanguage = function getUserLanguage(defaultLanguage) {
322
+ var userLanguage = defaultLanguage;
323
+
324
+ if (!userLanguage) {
325
+ var browserLanguage = window.navigator.userLanguage || window.navigator.language || "en-US";
326
+ userLanguage = browserLanguage.split("-")[0];
327
+ }
328
+
329
+ return Object.prototype.hasOwnProperty.call(languageMap, userLanguage) ? userLanguage : "en";
330
+ };
331
+ ;// CONCATENATED MODULE: ./src/modalManager.ts
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+ function modalManager_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
345
+
346
+ function modalManager_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? modalManager_ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : modalManager_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
347
+
348
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = getPrototypeOf_default()(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf_default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn_default()(this, result); }; }
349
+
350
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+ var Web3Auth = /*#__PURE__*/function (_Web3AuthCore) {
359
+ inherits_default()(Web3Auth, _Web3AuthCore);
360
+
361
+ var _super = _createSuper(Web3Auth);
362
+
363
+ function Web3Auth(options) {
364
+ var _this$options$uiConfi, _this$options$uiConfi2, _this$options$uiConfi3;
365
+
366
+ var _this;
367
+
368
+ classCallCheck_default()(this, Web3Auth);
369
+
370
+ _this = _super.call(this, options);
371
+
372
+ defineProperty_default()(assertThisInitialized_default()(_this), "loginModal", void 0);
373
+
374
+ defineProperty_default()(assertThisInitialized_default()(_this), "options", void 0);
375
+
376
+ defineProperty_default()(assertThisInitialized_default()(_this), "modalConfig", config/* defaultEvmDappModalConfig */.OW);
377
+
378
+ _this.options = modalManager_objectSpread({}, options);
379
+ var providedChainConfig = _this.options.chainConfig;
380
+
381
+ if (providedChainConfig.chainNamespace === base_.CHAIN_NAMESPACES.SOLANA) {
382
+ if (options.authMode === "WALLET") {
383
+ // default config for solana wallet modal
384
+ _this.modalConfig = config/* defaultSolanaWalletModalConfig */.K8;
385
+ } else {
386
+ // default config for solana dapp modal
387
+ _this.modalConfig = config/* defaultSolanaDappModalConfig */.Jx;
388
+ }
389
+ } else if (providedChainConfig.chainNamespace === base_.CHAIN_NAMESPACES.EIP155) {
390
+ if (options.authMode === "WALLET") {
391
+ // default config for evm wallet modal
392
+ _this.modalConfig = config/* defaultEvmWalletModalConfig */.ql;
393
+ } else {
394
+ // default config for evm dapp modal
395
+ _this.modalConfig = config/* defaultEvmDappModalConfig */.OW;
396
+ }
397
+ } else if (providedChainConfig.chainNamespace === base_.CHAIN_NAMESPACES.OTHER) {
398
+ _this.modalConfig = config/* defaultOtherModalConfig */.ue;
399
+ } else {
400
+ throw new Error("Invalid chainNamespace provided: ".concat(providedChainConfig.chainNamespace));
401
+ } // get userLanguage
402
+
403
+
404
+ var defaultLanguage = getUserLanguage((_this$options$uiConfi = _this.options.uiConfig) === null || _this$options$uiConfi === void 0 ? void 0 : _this$options$uiConfi.defaultLanguage);
405
+ _this.loginModal = new (ui_default())({
406
+ theme: (_this$options$uiConfi2 = _this.options.uiConfig) === null || _this$options$uiConfi2 === void 0 ? void 0 : _this$options$uiConfi2.theme,
407
+ appLogo: ((_this$options$uiConfi3 = _this.options.uiConfig) === null || _this$options$uiConfi3 === void 0 ? void 0 : _this$options$uiConfi3.appLogo) || "",
408
+ version: "",
409
+ adapterListener: assertThisInitialized_default()(_this),
410
+ displayErrorsOnModal: _this.options.displayErrorsOnModal,
411
+ defaultLanguage: defaultLanguage
412
+ });
413
+
414
+ _this.subscribeToLoginModalEvents();
415
+
416
+ return _this;
417
+ }
418
+
419
+ createClass_default()(Web3Auth, [{
420
+ key: "initModal",
421
+ value: function () {
422
+ var _initModal = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee3(params) {
423
+ var _this2 = this;
424
+
425
+ var providedChainConfig, allAdapters, adapterConfigurationPromises, adapterNames, hasInAppWallets, initPromises, hasExternalWallets;
426
+ return regenerator_default().wrap(function _callee3$(_context3) {
427
+ while (1) {
428
+ switch (_context3.prev = _context3.next) {
429
+ case 0:
430
+ get_default()(getPrototypeOf_default()(Web3Auth.prototype), "checkInitRequirements", this).call(this);
431
+
432
+ _context3.next = 3;
433
+ return this.loginModal.initModal();
434
+
435
+ case 3:
436
+ providedChainConfig = this.options.chainConfig; // merge default adapters with the custom configured adapters.
437
+
438
+ allAdapters = toConsumableArray_default()(new Set([].concat(toConsumableArray_default()(Object.keys(this.modalConfig.adapters || {})), toConsumableArray_default()(Object.keys(this.walletAdapters)))));
439
+ adapterConfigurationPromises = allAdapters.map( /*#__PURE__*/function () {
440
+ var _ref = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee(adapterName) {
441
+ var _this2$modalConfig$ad, _params$modalConfig, _this2$modalConfig$ad2, _this2$modalConfig$ad3;
442
+
443
+ var adapterConfig, adapter, ad, _this2$modalConfig$ad4, _this2$coreOptions$ch, chainConfig;
444
+
445
+ return regenerator_default().wrap(function _callee$(_context) {
446
+ while (1) {
447
+ switch (_context.prev = _context.next) {
448
+ case 0:
449
+ // start with the default config of adapter.
450
+ adapterConfig = ((_this2$modalConfig$ad = _this2.modalConfig.adapters) === null || _this2$modalConfig$ad === void 0 ? void 0 : _this2$modalConfig$ad[adapterName]) || {
451
+ label: adapterName,
452
+ showOnModal: true,
453
+ showOnMobile: true,
454
+ showOnDesktop: true
455
+ }; // override the default config of adapter if some config is being provided by the user.
456
+
457
+ if (params !== null && params !== void 0 && (_params$modalConfig = params.modalConfig) !== null && _params$modalConfig !== void 0 && _params$modalConfig[adapterName]) {
458
+ adapterConfig = modalManager_objectSpread(modalManager_objectSpread({}, adapterConfig), params.modalConfig[adapterName]);
459
+ }
460
+
461
+ _this2.modalConfig.adapters[adapterName] = adapterConfig; // check if adapter is configured/added by user and exist in walletAdapters map.
462
+
463
+ adapter = _this2.walletAdapters[adapterName];
464
+ base_.log.debug("adapter config", adapterName, (_this2$modalConfig$ad2 = _this2.modalConfig.adapters) === null || _this2$modalConfig$ad2 === void 0 ? void 0 : _this2$modalConfig$ad2[adapterName].showOnModal, adapter); // if adapter is not custom configured then check if it is available in default adapters.
465
+ // and if adapter is not hidden by user
466
+
467
+ if (!(!adapter && (_this2$modalConfig$ad3 = _this2.modalConfig.adapters) !== null && _this2$modalConfig$ad3 !== void 0 && _this2$modalConfig$ad3[adapterName].showOnModal)) {
468
+ _context.next = 13;
469
+ break;
470
+ }
471
+
472
+ _context.next = 8;
473
+ return getDefaultAdapterModule({
474
+ name: adapterName,
475
+ customChainConfig: _this2.options.chainConfig,
476
+ clientId: _this2.options.clientId
477
+ });
478
+
479
+ case 8:
480
+ ad = _context.sent;
481
+ _this2.walletAdapters[adapterName] = ad;
482
+ return _context.abrupt("return", adapterName);
483
+
484
+ case 13:
485
+ if (!((adapter === null || adapter === void 0 ? void 0 : adapter.type) === base_.ADAPTER_CATEGORY.IN_APP || (adapter === null || adapter === void 0 ? void 0 : adapter.type) === base_.ADAPTER_CATEGORY.EXTERNAL || adapterName === _this2.cachedAdapter)) {
486
+ _context.next = 19;
487
+ break;
488
+ }
489
+
490
+ if ((_this2$modalConfig$ad4 = _this2.modalConfig.adapters) !== null && _this2$modalConfig$ad4 !== void 0 && _this2$modalConfig$ad4[adapterName].showOnModal) {
491
+ _context.next = 16;
492
+ break;
493
+ }
494
+
495
+ return _context.abrupt("return");
496
+
497
+ case 16:
498
+ // add client id to adapter, same web3auth client id can be used in adapter.
499
+ // this id is being overridden if user is also passing client id in adapter's constructor.
500
+ _this2.walletAdapters[adapterName].setAdapterSettings({
501
+ clientId: _this2.options.clientId,
502
+ sessionTime: _this2.options.sessionTime
503
+ }); // if adapter doesn't have any chainConfig then we will set the chainConfig based of passed chainNamespace
504
+ // and chainNamespace.
505
+
506
+
507
+ if (!adapter.chainConfigProxy) {
508
+ chainConfig = modalManager_objectSpread(modalManager_objectSpread({}, (0,base_.getChainConfig)(providedChainConfig.chainNamespace, (_this2$coreOptions$ch = _this2.coreOptions.chainConfig) === null || _this2$coreOptions$ch === void 0 ? void 0 : _this2$coreOptions$ch.chainId)), _this2.coreOptions.chainConfig);
509
+
510
+ _this2.walletAdapters[adapterName].setChainConfig(chainConfig);
511
+ }
512
+
513
+ return _context.abrupt("return", adapterName);
514
+
515
+ case 19:
516
+ case "end":
517
+ return _context.stop();
518
+ }
519
+ }
520
+ }, _callee);
521
+ }));
522
+
523
+ return function (_x2) {
524
+ return _ref.apply(this, arguments);
525
+ };
526
+ }());
527
+ _context3.next = 8;
528
+ return Promise.all(adapterConfigurationPromises);
529
+
530
+ case 8:
531
+ adapterNames = _context3.sent;
532
+ hasInAppWallets = Object.values(this.walletAdapters).some(function (adapter) {
533
+ var _adapter$name;
534
+
535
+ if (adapter.type !== base_.ADAPTER_CATEGORY.IN_APP) return false;
536
+ if (_this2.modalConfig.adapters[adapter.name].showOnModal !== true) return false;
537
+ if (!_this2.modalConfig.adapters[adapter.name].loginMethods) return true;
538
+ var mergedLoginMethods = (0,ui_namespaceObject.getAdapterSocialLogins)(adapter.name, _this2.walletAdapters[adapter.name], (_adapter$name = _this2.modalConfig.adapters[adapter.name]) === null || _adapter$name === void 0 ? void 0 : _adapter$name.loginMethods);
539
+ if (Object.values(mergedLoginMethods).some(function (method) {
540
+ return method.showOnModal;
541
+ })) return true;
542
+ return false;
543
+ });
544
+ base_.log.debug(hasInAppWallets, this.walletAdapters, "hasInAppWallets"); // Now, initialize the adapters.
545
+
546
+ initPromises = adapterNames.map( /*#__PURE__*/function () {
547
+ var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee2(adapterName) {
548
+ var adapter;
549
+ return regenerator_default().wrap(function _callee2$(_context2) {
550
+ while (1) {
551
+ switch (_context2.prev = _context2.next) {
552
+ case 0:
553
+ if (adapterName) {
554
+ _context2.next = 2;
555
+ break;
556
+ }
557
+
558
+ return _context2.abrupt("return");
559
+
560
+ case 2:
561
+ _context2.prev = 2;
562
+ adapter = _this2.walletAdapters[adapterName]; // only initialize a external adapter here if it is a cached adapter.
563
+
564
+ if (!(_this2.cachedAdapter !== adapterName && adapter.type === base_.ADAPTER_CATEGORY.EXTERNAL)) {
565
+ _context2.next = 6;
566
+ break;
567
+ }
568
+
569
+ return _context2.abrupt("return");
570
+
571
+ case 6:
572
+ // in-app wallets or cached wallet (being connected or already connected) are initialized first.
573
+ // if adapter is configured thn only initialize in app or cached adapter.
574
+ // external wallets are initialized on INIT_EXTERNAL_WALLET event.
575
+ _this2.subscribeToAdapterEvents(adapter);
576
+
577
+ if (!(adapter.status === base_.ADAPTER_STATUS.NOT_READY)) {
578
+ _context2.next = 10;
579
+ break;
580
+ }
581
+
582
+ _context2.next = 10;
583
+ return adapter.init({
584
+ autoConnect: _this2.cachedAdapter === adapterName
585
+ });
586
+
587
+ case 10:
588
+ // note: not adding cachedWallet to modal if it is external wallet.
589
+ // adding it later if no in-app wallets are available.
590
+ if (adapter.type === base_.ADAPTER_CATEGORY.IN_APP) {
591
+ _this2.initializeInAppWallet(adapterName);
592
+ }
593
+
594
+ _context2.next = 16;
595
+ break;
596
+
597
+ case 13:
598
+ _context2.prev = 13;
599
+ _context2.t0 = _context2["catch"](2);
600
+ base_.log.error(_context2.t0, "error while initializing adapter");
601
+
602
+ case 16:
603
+ case "end":
604
+ return _context2.stop();
605
+ }
606
+ }
607
+ }, _callee2, null, [[2, 13]]);
608
+ }));
609
+
610
+ return function (_x3) {
611
+ return _ref2.apply(this, arguments);
612
+ };
613
+ }());
614
+ this.status = base_.ADAPTER_STATUS.READY;
615
+ _context3.next = 15;
616
+ return Promise.all(initPromises);
617
+
618
+ case 15:
619
+ hasExternalWallets = allAdapters.some(function (adapterName) {
620
+ var _this2$walletAdapters, _this2$modalConfig$ad5;
621
+
622
+ return ((_this2$walletAdapters = _this2.walletAdapters[adapterName]) === null || _this2$walletAdapters === void 0 ? void 0 : _this2$walletAdapters.type) === base_.ADAPTER_CATEGORY.EXTERNAL && ((_this2$modalConfig$ad5 = _this2.modalConfig.adapters) === null || _this2$modalConfig$ad5 === void 0 ? void 0 : _this2$modalConfig$ad5[adapterName].showOnModal);
623
+ });
624
+
625
+ if (hasExternalWallets) {
626
+ this.loginModal.initExternalWalletContainer();
627
+ } // variable to check if we have any in app wallets
628
+ // currently all default in app and external wallets can be hidden or shown based on config.
629
+
630
+
631
+ if (!(!hasInAppWallets && hasExternalWallets)) {
632
+ _context3.next = 20;
633
+ break;
634
+ }
635
+
636
+ _context3.next = 20;
637
+ return this.initExternalWalletAdapters(false, {
638
+ showExternalWalletsOnly: true
639
+ });
640
+
641
+ case 20:
642
+ case "end":
643
+ return _context3.stop();
644
+ }
645
+ }
646
+ }, _callee3, this);
647
+ }));
648
+
649
+ function initModal(_x) {
650
+ return _initModal.apply(this, arguments);
651
+ }
652
+
653
+ return initModal;
654
+ }()
655
+ }, {
656
+ key: "connect",
657
+ value: function () {
658
+ var _connect = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee4() {
659
+ var _this3 = this;
660
+
661
+ return regenerator_default().wrap(function _callee4$(_context4) {
662
+ while (1) {
663
+ switch (_context4.prev = _context4.next) {
664
+ case 0:
665
+ if (!this.provider) {
666
+ _context4.next = 2;
667
+ break;
668
+ }
669
+
670
+ return _context4.abrupt("return", this.provider);
671
+
672
+ case 2:
673
+ this.loginModal.open();
674
+ return _context4.abrupt("return", new Promise(function (resolve, reject) {
675
+ _this3.once(base_.ADAPTER_EVENTS.CONNECTED, function () {
676
+ return resolve(_this3.provider);
677
+ });
678
+
679
+ _this3.once(base_.ADAPTER_EVENTS.ERRORED, function (err) {
680
+ return reject(err);
681
+ });
682
+ }));
683
+
684
+ case 4:
685
+ case "end":
686
+ return _context4.stop();
687
+ }
688
+ }
689
+ }, _callee4, this);
690
+ }));
691
+
692
+ function connect() {
693
+ return _connect.apply(this, arguments);
694
+ }
695
+
696
+ return connect;
697
+ }()
698
+ }, {
699
+ key: "initExternalWalletAdapters",
700
+ value: function () {
701
+ var _initExternalWalletAdapters = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee6(externalWalletsInitialized, options) {
702
+ var _this4 = this;
703
+
704
+ var adaptersConfig, adaptersData, adapterPromises, adapterInitResults, finalAdaptersConfig;
705
+ return regenerator_default().wrap(function _callee6$(_context6) {
706
+ while (1) {
707
+ switch (_context6.prev = _context6.next) {
708
+ case 0:
709
+ if (!externalWalletsInitialized) {
710
+ _context6.next = 2;
711
+ break;
712
+ }
713
+
714
+ return _context6.abrupt("return");
715
+
716
+ case 2:
717
+ adaptersConfig = {};
718
+ adaptersData = {};
719
+ adapterPromises = Object.keys(this.walletAdapters).map( /*#__PURE__*/function () {
720
+ var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee5(adapterName) {
721
+ var adapter;
722
+ return regenerator_default().wrap(function _callee5$(_context5) {
723
+ while (1) {
724
+ switch (_context5.prev = _context5.next) {
725
+ case 0:
726
+ _context5.prev = 0;
727
+ adapter = _this4.walletAdapters[adapterName];
728
+
729
+ if (!((adapter === null || adapter === void 0 ? void 0 : adapter.type) === base_.ADAPTER_CATEGORY.EXTERNAL)) {
730
+ _context5.next = 11;
731
+ break;
732
+ }
733
+
734
+ base_.log.debug("init external wallet", _this4.cachedAdapter, adapterName);
735
+
736
+ _this4.subscribeToAdapterEvents(adapter); // we are not initializing cached adapter here as it is already being initialized in initModal before.
737
+
738
+
739
+ if (!(_this4.cachedAdapter === adapterName)) {
740
+ _context5.next = 7;
741
+ break;
742
+ }
743
+
744
+ return _context5.abrupt("return");
745
+
746
+ case 7:
747
+ if (!(adapter.status === base_.ADAPTER_STATUS.NOT_READY)) {
748
+ _context5.next = 11;
749
+ break;
750
+ }
751
+
752
+ _context5.next = 10;
753
+ return Promise.race([adapter.init({
754
+ autoConnect: _this4.cachedAdapter === adapterName
755
+ }).then(function () {
756
+ adaptersConfig[adapterName] = _this4.modalConfig.adapters[adapterName];
757
+ adaptersData[adapterName] = adapter.adapterData || {};
758
+ return adapterName;
759
+ }), new Promise(function (resolve) {
760
+ setTimeout(function () {
761
+ return resolve(null);
762
+ }, 5000);
763
+ })]);
764
+
765
+ case 10:
766
+ return _context5.abrupt("return", _context5.sent);
767
+
768
+ case 11:
769
+ _context5.next = 16;
770
+ break;
771
+
772
+ case 13:
773
+ _context5.prev = 13;
774
+ _context5.t0 = _context5["catch"](0);
775
+ base_.log.error(_context5.t0, "error while initializing adapter");
776
+
777
+ case 16:
778
+ case "end":
779
+ return _context5.stop();
780
+ }
781
+ }
782
+ }, _callee5, null, [[0, 13]]);
783
+ }));
784
+
785
+ return function (_x6) {
786
+ return _ref3.apply(this, arguments);
787
+ };
788
+ }());
789
+ _context6.next = 7;
790
+ return Promise.all(adapterPromises);
791
+
792
+ case 7:
793
+ adapterInitResults = _context6.sent;
794
+ finalAdaptersConfig = {};
795
+ adapterInitResults.forEach(function (result) {
796
+ if (result) {
797
+ finalAdaptersConfig[result] = adaptersConfig[result];
798
+ }
799
+ });
800
+ this.loginModal.addWalletLogins(finalAdaptersConfig, {
801
+ showExternalWalletsOnly: !!(options !== null && options !== void 0 && options.showExternalWalletsOnly)
802
+ });
803
+
804
+ case 11:
805
+ case "end":
806
+ return _context6.stop();
807
+ }
808
+ }
809
+ }, _callee6, this);
810
+ }));
811
+
812
+ function initExternalWalletAdapters(_x4, _x5) {
813
+ return _initExternalWalletAdapters.apply(this, arguments);
814
+ }
815
+
816
+ return initExternalWalletAdapters;
817
+ }()
818
+ }, {
819
+ key: "initializeInAppWallet",
820
+ value: function initializeInAppWallet(adapterName) {
821
+ base_.log.info("adapterInitResults", adapterName);
822
+
823
+ if (this.walletAdapters[adapterName].type === base_.ADAPTER_CATEGORY.IN_APP) {
824
+ var _adapterName, _this$options$uiConfi4;
825
+
826
+ this.loginModal.addSocialLogins(adapterName, (0,ui_namespaceObject.getAdapterSocialLogins)(adapterName, this.walletAdapters[adapterName], (_adapterName = this.modalConfig.adapters[adapterName]) === null || _adapterName === void 0 ? void 0 : _adapterName.loginMethods), ((_this$options$uiConfi4 = this.options.uiConfig) === null || _this$options$uiConfi4 === void 0 ? void 0 : _this$options$uiConfi4.loginMethodsOrder) || ui_namespaceObject.OPENLOGIN_PROVIDERS);
827
+ }
828
+ }
829
+ }, {
830
+ key: "subscribeToLoginModalEvents",
831
+ value: function subscribeToLoginModalEvents() {
832
+ var _this5 = this;
833
+
834
+ this.loginModal.on(ui_namespaceObject.LOGIN_MODAL_EVENTS.LOGIN, /*#__PURE__*/function () {
835
+ var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee7(params) {
836
+ return regenerator_default().wrap(function _callee7$(_context7) {
837
+ while (1) {
838
+ switch (_context7.prev = _context7.next) {
839
+ case 0:
840
+ _context7.prev = 0;
841
+ _context7.next = 3;
842
+ return _this5.connectTo(params.adapter, params.loginParams);
843
+
844
+ case 3:
845
+ _context7.next = 8;
846
+ break;
847
+
848
+ case 5:
849
+ _context7.prev = 5;
850
+ _context7.t0 = _context7["catch"](0);
851
+ base_.log.error("Error while connecting to adapter: ".concat(params.adapter), _context7.t0);
852
+
853
+ case 8:
854
+ case "end":
855
+ return _context7.stop();
856
+ }
857
+ }
858
+ }, _callee7, null, [[0, 5]]);
859
+ }));
860
+
861
+ return function (_x7) {
862
+ return _ref4.apply(this, arguments);
863
+ };
864
+ }());
865
+ this.loginModal.on(ui_namespaceObject.LOGIN_MODAL_EVENTS.INIT_EXTERNAL_WALLETS, /*#__PURE__*/function () {
866
+ var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee8(params) {
867
+ return regenerator_default().wrap(function _callee8$(_context8) {
868
+ while (1) {
869
+ switch (_context8.prev = _context8.next) {
870
+ case 0:
871
+ _context8.next = 2;
872
+ return _this5.initExternalWalletAdapters(params.externalWalletsInitialized);
873
+
874
+ case 2:
875
+ case "end":
876
+ return _context8.stop();
877
+ }
878
+ }
879
+ }, _callee8);
880
+ }));
881
+
882
+ return function (_x8) {
883
+ return _ref5.apply(this, arguments);
884
+ };
885
+ }());
886
+ this.loginModal.on(ui_namespaceObject.LOGIN_MODAL_EVENTS.DISCONNECT, /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee9() {
887
+ return regenerator_default().wrap(function _callee9$(_context9) {
888
+ while (1) {
889
+ switch (_context9.prev = _context9.next) {
890
+ case 0:
891
+ _context9.prev = 0;
892
+ _context9.next = 3;
893
+ return _this5.logout();
894
+
895
+ case 3:
896
+ _context9.next = 8;
897
+ break;
898
+
899
+ case 5:
900
+ _context9.prev = 5;
901
+ _context9.t0 = _context9["catch"](0);
902
+ base_.log.error("Error while disconnecting", _context9.t0);
903
+
904
+ case 8:
905
+ case "end":
906
+ return _context9.stop();
907
+ }
908
+ }
909
+ }, _callee9, null, [[0, 5]]);
910
+ })));
911
+ this.loginModal.on(ui_namespaceObject.LOGIN_MODAL_EVENTS.MODAL_VISIBILITY, /*#__PURE__*/function () {
912
+ var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regenerator_default().mark(function _callee10(visibility) {
913
+ var _this5$walletAdapters;
914
+
915
+ var walletConnectStatus;
916
+ return regenerator_default().wrap(function _callee10$(_context10) {
917
+ while (1) {
918
+ switch (_context10.prev = _context10.next) {
919
+ case 0:
920
+ base_.log.debug("is login modal visible", visibility);
921
+
922
+ _this5.emit(ui_namespaceObject.LOGIN_MODAL_EVENTS.MODAL_VISIBILITY, visibility);
923
+
924
+ walletConnectStatus = (_this5$walletAdapters = _this5.walletAdapters[base_.WALLET_ADAPTERS.WALLET_CONNECT_V1]) === null || _this5$walletAdapters === void 0 ? void 0 : _this5$walletAdapters.status;
925
+
926
+ if (visibility && walletConnectStatus === base_.ADAPTER_STATUS.READY) {
927
+ // refreshing session for wallet connect whenever modal is opened.
928
+ try {
929
+ _this5.walletAdapters[base_.WALLET_ADAPTERS.WALLET_CONNECT_V1].connect();
930
+ } catch (error) {
931
+ base_.log.error("Error while disconnecting to wallet connect in core", error);
932
+ }
933
+ }
934
+
935
+ case 4:
936
+ case "end":
937
+ return _context10.stop();
938
+ }
939
+ }
940
+ }, _callee10);
941
+ }));
942
+
943
+ return function (_x9) {
944
+ return _ref7.apply(this, arguments);
945
+ };
946
+ }());
947
+ }
948
+ }]);
949
+
950
+ return Web3Auth;
951
+ }(core_namespaceObject.Web3AuthCore);
952
+
953
+ /***/ }),
954
+
955
+ /***/ 195:
956
+ /***/ ((module) => {
957
+
958
+ "use strict";
959
+ module.exports = require("@babel/runtime/helpers/defineProperty");
960
+
961
+ /***/ }),
962
+
963
+ /***/ 612:
964
+ /***/ ((module) => {
965
+
966
+ "use strict";
967
+ module.exports = require("@web3auth/base");
968
+
969
+ /***/ }),
970
+
971
+ /***/ 508:
972
+ /***/ ((module) => {
973
+
974
+ "use strict";
975
+ module.exports = require("@web3auth/metamask-adapter");
976
+
977
+ /***/ }),
978
+
979
+ /***/ 683:
980
+ /***/ ((module) => {
981
+
982
+ "use strict";
983
+ module.exports = require("@web3auth/openlogin-adapter");
984
+
985
+ /***/ }),
986
+
987
+ /***/ 915:
988
+ /***/ ((module) => {
989
+
990
+ "use strict";
991
+ module.exports = require("@web3auth/phantom-adapter");
992
+
993
+ /***/ }),
994
+
995
+ /***/ 546:
996
+ /***/ ((module) => {
997
+
998
+ "use strict";
999
+ module.exports = require("@web3auth/torus-evm-adapter");
1000
+
1001
+ /***/ }),
1002
+
1003
+ /***/ 5:
1004
+ /***/ ((module) => {
1005
+
1006
+ "use strict";
1007
+ module.exports = require("@web3auth/torus-solana-adapter");
1008
+
1009
+ /***/ }),
1010
+
1011
+ /***/ 347:
1012
+ /***/ ((module) => {
1013
+
1014
+ "use strict";
1015
+ module.exports = require("@web3auth/wallet-connect-v1-adapter");
1016
+
1017
+ /***/ })
1018
+
1019
+ /******/ });
1020
+ /************************************************************************/
1021
+ /******/ // The module cache
1022
+ /******/ var __webpack_module_cache__ = {};
1023
+ /******/
1024
+ /******/ // The require function
1025
+ /******/ function __webpack_require__(moduleId) {
1026
+ /******/ // Check if module is in cache
1027
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
1028
+ /******/ if (cachedModule !== undefined) {
1029
+ /******/ return cachedModule.exports;
1030
+ /******/ }
1031
+ /******/ // Create a new module (and put it into the cache)
1032
+ /******/ var module = __webpack_module_cache__[moduleId] = {
1033
+ /******/ // no module.id needed
1034
+ /******/ // no module.loaded needed
1035
+ /******/ exports: {}
1036
+ /******/ };
1037
+ /******/
1038
+ /******/ // Execute the module function
1039
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1040
+ /******/
1041
+ /******/ // Return the exports of the module
1042
+ /******/ return module.exports;
1043
+ /******/ }
1044
+ /******/
1045
+ /************************************************************************/
1046
+ /******/ /* webpack/runtime/compat get default export */
1047
+ /******/ (() => {
1048
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
1049
+ /******/ __webpack_require__.n = (module) => {
1050
+ /******/ var getter = module && module.__esModule ?
1051
+ /******/ () => (module['default']) :
1052
+ /******/ () => (module);
1053
+ /******/ __webpack_require__.d(getter, { a: getter });
1054
+ /******/ return getter;
1055
+ /******/ };
1056
+ /******/ })();
1057
+ /******/
1058
+ /******/ /* webpack/runtime/create fake namespace object */
1059
+ /******/ (() => {
1060
+ /******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
1061
+ /******/ var leafPrototypes;
1062
+ /******/ // create a fake namespace object
1063
+ /******/ // mode & 1: value is a module id, require it
1064
+ /******/ // mode & 2: merge all properties of value into the ns
1065
+ /******/ // mode & 4: return value when already ns object
1066
+ /******/ // mode & 16: return value when it's Promise-like
1067
+ /******/ // mode & 8|1: behave like require
1068
+ /******/ __webpack_require__.t = function(value, mode) {
1069
+ /******/ if(mode & 1) value = this(value);
1070
+ /******/ if(mode & 8) return value;
1071
+ /******/ if(typeof value === 'object' && value) {
1072
+ /******/ if((mode & 4) && value.__esModule) return value;
1073
+ /******/ if((mode & 16) && typeof value.then === 'function') return value;
1074
+ /******/ }
1075
+ /******/ var ns = Object.create(null);
1076
+ /******/ __webpack_require__.r(ns);
1077
+ /******/ var def = {};
1078
+ /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
1079
+ /******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
1080
+ /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
1081
+ /******/ }
1082
+ /******/ def['default'] = () => (value);
1083
+ /******/ __webpack_require__.d(ns, def);
1084
+ /******/ return ns;
1085
+ /******/ };
1086
+ /******/ })();
1087
+ /******/
1088
+ /******/ /* webpack/runtime/define property getters */
1089
+ /******/ (() => {
1090
+ /******/ // define getter functions for harmony exports
1091
+ /******/ __webpack_require__.d = (exports, definition) => {
1092
+ /******/ for(var key in definition) {
1093
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1094
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1095
+ /******/ }
1096
+ /******/ }
1097
+ /******/ };
1098
+ /******/ })();
1099
+ /******/
1100
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
1101
+ /******/ (() => {
1102
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1103
+ /******/ })();
1104
+ /******/
1105
+ /******/ /* webpack/runtime/make namespace object */
1106
+ /******/ (() => {
1107
+ /******/ // define __esModule on exports
1108
+ /******/ __webpack_require__.r = (exports) => {
1109
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1110
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1111
+ /******/ }
1112
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1113
+ /******/ };
1114
+ /******/ })();
1115
+ /******/
1116
+ /************************************************************************/
1117
+ var __webpack_exports__ = {};
1118
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1119
+ (() => {
1120
+ "use strict";
1121
+ __webpack_require__.r(__webpack_exports__);
1122
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1123
+ /* harmony export */ "Web3Auth": () => (/* reexport safe */ _modalManager__WEBPACK_IMPORTED_MODULE_2__.$),
1124
+ /* harmony export */ "defaultEvmDappModalConfig": () => (/* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_0__.OW),
1125
+ /* harmony export */ "defaultEvmWalletModalConfig": () => (/* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_0__.ql),
1126
+ /* harmony export */ "defaultOtherModalConfig": () => (/* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_0__.ue),
1127
+ /* harmony export */ "defaultSolanaDappModalConfig": () => (/* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_0__.Jx),
1128
+ /* harmony export */ "defaultSolanaWalletModalConfig": () => (/* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_0__.K8)
1129
+ /* harmony export */ });
1130
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(591);
1131
+ /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(510);
1132
+ /* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_1__);
1133
+ /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
1134
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_1__) if(["default","defaultEvmDappModalConfig","defaultEvmWalletModalConfig","defaultOtherModalConfig","defaultSolanaDappModalConfig","defaultSolanaWalletModalConfig"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_1__[__WEBPACK_IMPORT_KEY__]
1135
+ /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
1136
+ /* harmony import */ var _modalManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
1137
+
1138
+
1139
+
1140
+ })();
1141
+
1142
+ module.exports = __webpack_exports__;
1143
+ /******/ })()
1144
+ ;
1145
+ //# sourceMappingURL=modal.cjs.js.map