@elliemae/pui-app-bridge 2.3.1 → 2.4.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.
- package/dist/cjs/appBridge.js +0 -11
- package/dist/cjs/config/app.js +0 -4
- package/dist/cjs/eventManager.js +0 -5
- package/dist/cjs/microfeHost.js +0 -8
- package/dist/esm/appBridge.js +0 -11
- package/dist/esm/config/app.js +0 -4
- package/dist/esm/eventManager.js +0 -5
- package/dist/esm/microfeHost.js +0 -8
- package/dist/public/creditService/latest/creditService.checksum.js.gz +0 -0
- package/dist/public/frame.html +1 -1
- package/dist/public/guest/businessObjects.js.gz +0 -0
- package/dist/public/guest/util.js.gz +0 -0
- package/dist/public/index.html +1 -1
- package/dist/public/init.js.gz +0 -0
- package/dist/public/js/{emuiAppBridge.a90a617911b273467444.js → emuiAppBridge.da937d9d01527da3925b.js} +1 -1
- package/dist/public/js/emuiAppBridge.da937d9d01527da3925b.js.br +0 -0
- package/dist/public/js/emuiAppBridge.da937d9d01527da3925b.js.gz +0 -0
- package/dist/public/js/{emuiAppBridge.a90a617911b273467444.js.map → emuiAppBridge.da937d9d01527da3925b.js.map} +1 -1
- package/dist/public/loan-object.js.gz +0 -0
- package/dist/public/loanValidation/latest/loanValidation.checksum.js.gz +0 -0
- package/dist/public/pricingService/latest/pricingService.checksum.js.gz +0 -0
- package/dist/public/utils.js.gz +0 -0
- package/dist/types/appBridge.d.ts +0 -14
- package/dist/types/config/app.d.ts +0 -4
- package/dist/types/eventManager.d.ts +0 -3
- package/dist/types/microfeHost.d.ts +0 -9
- package/dist/types/typings/guest.d.ts +0 -4
- package/dist/types/typings/host.d.ts +0 -8
- package/dist/umd/creditService/latest/creditService.checksum.js.gz +0 -0
- package/dist/umd/guest/businessObjects.js.gz +0 -0
- package/dist/umd/guest/util.js.gz +0 -0
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/init.js.gz +0 -0
- package/dist/umd/loan-object.js.gz +0 -0
- package/dist/umd/loanValidation/latest/loanValidation.checksum.js.gz +0 -0
- package/dist/umd/pricingService/latest/pricingService.checksum.js.gz +0 -0
- package/dist/umd/utils.js.gz +0 -0
- package/package.json +5 -5
- package/dist/public/js/emuiAppBridge.a90a617911b273467444.js.br +0 -0
- package/dist/public/js/emuiAppBridge.a90a617911b273467444.js.gz +0 -0
package/dist/cjs/appBridge.js
CHANGED
|
@@ -45,7 +45,6 @@ class CAppBridge {
|
|
|
45
45
|
#activeApps = /* @__PURE__ */ new Map();
|
|
46
46
|
/**
|
|
47
47
|
* Create a new instance of the AppBridge
|
|
48
|
-
*
|
|
49
48
|
* @param {AppBridgeParams} params - parameter for the constructor
|
|
50
49
|
*/
|
|
51
50
|
constructor(params) {
|
|
@@ -216,7 +215,6 @@ class CAppBridge {
|
|
|
216
215
|
};
|
|
217
216
|
/**
|
|
218
217
|
* registers scripting object to the host
|
|
219
|
-
*
|
|
220
218
|
* @param {ValueOf<AppObjects>} so scripting object
|
|
221
219
|
* @param {AddScriptingObjectParams} params params to add scripting object
|
|
222
220
|
*/
|
|
@@ -231,7 +229,6 @@ class CAppBridge {
|
|
|
231
229
|
};
|
|
232
230
|
/**
|
|
233
231
|
* Close guest micro frontend application
|
|
234
|
-
*
|
|
235
232
|
* @param id unique id of guest application
|
|
236
233
|
*/
|
|
237
234
|
closeApp = async (id) => {
|
|
@@ -256,20 +253,17 @@ class CAppBridge {
|
|
|
256
253
|
};
|
|
257
254
|
/**
|
|
258
255
|
* dispatch event to guest microfrontend application
|
|
259
|
-
*
|
|
260
256
|
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
261
257
|
*/
|
|
262
258
|
dispatchEvent = async (params) => this.#eventManager.dispatchEvent(params);
|
|
263
259
|
/**
|
|
264
260
|
* Get guest by id
|
|
265
|
-
*
|
|
266
261
|
* @param id unique id of guest
|
|
267
262
|
* @returns guest instance
|
|
268
263
|
*/
|
|
269
264
|
getGuest = (id) => this.#activeApps.get(id)?.guest;
|
|
270
265
|
/**
|
|
271
266
|
* Get list of active guests
|
|
272
|
-
*
|
|
273
267
|
* @returns list of active guests
|
|
274
268
|
*/
|
|
275
269
|
getGuests = () => [...this.#activeApps.values()].map((app) => app.guest);
|
|
@@ -285,7 +279,6 @@ class CAppBridge {
|
|
|
285
279
|
};
|
|
286
280
|
/**
|
|
287
281
|
* Mount guest micro frontend application into DOM
|
|
288
|
-
*
|
|
289
282
|
* @param id unique id of guest micro frontend application
|
|
290
283
|
* @throws Error if application with given id is not found in configuration
|
|
291
284
|
*/
|
|
@@ -300,7 +293,6 @@ class CAppBridge {
|
|
|
300
293
|
};
|
|
301
294
|
/**
|
|
302
295
|
* Open guest micro frontend application
|
|
303
|
-
*
|
|
304
296
|
* @param {OpenAppParams} params - options to open guest application
|
|
305
297
|
*/
|
|
306
298
|
openApp = async (params) => {
|
|
@@ -338,7 +330,6 @@ class CAppBridge {
|
|
|
338
330
|
};
|
|
339
331
|
/**
|
|
340
332
|
* emit event to all subscribers (deprecated)
|
|
341
|
-
*
|
|
342
333
|
* @deprecated use dispatchEvent instead
|
|
343
334
|
* @param eventId unique id of the event. The format is <scripting object name>.<event name>
|
|
344
335
|
* @param data data to be sent to the subscribers of the event
|
|
@@ -353,7 +344,6 @@ class CAppBridge {
|
|
|
353
344
|
};
|
|
354
345
|
/**
|
|
355
346
|
* removes scripting object from the host
|
|
356
|
-
*
|
|
357
347
|
* @param objectId unique id of the scripting object
|
|
358
348
|
*/
|
|
359
349
|
removeScriptingObject = (objectId) => {
|
|
@@ -361,7 +351,6 @@ class CAppBridge {
|
|
|
361
351
|
};
|
|
362
352
|
/**
|
|
363
353
|
* Unmount guest micro frontend application from DOM
|
|
364
|
-
*
|
|
365
354
|
* @param id unique id of guest micro frontend application
|
|
366
355
|
* @throws Error if application with given id is not found in configuration
|
|
367
356
|
*/
|
package/dist/cjs/config/app.js
CHANGED
|
@@ -56,7 +56,6 @@ class CAppConfig {
|
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
58
|
* Get value for the given app config key
|
|
59
|
-
*
|
|
60
59
|
* @param key key to get value for
|
|
61
60
|
* @param defaultValue default value to return if key is not found
|
|
62
61
|
* @returns value for the given key
|
|
@@ -64,7 +63,6 @@ class CAppConfig {
|
|
|
64
63
|
get = (key = "", defaultValue = null) => (0, import_clone.default)((0, import_get.default)(this.#gAppConfig, key, defaultValue));
|
|
65
64
|
/**
|
|
66
65
|
* Set value for the given app config key
|
|
67
|
-
*
|
|
68
66
|
* @param key key to set value for
|
|
69
67
|
* @param value value to set
|
|
70
68
|
* @returns app config instance
|
|
@@ -72,14 +70,12 @@ class CAppConfig {
|
|
|
72
70
|
set = (key, value) => (0, import_set.default)(this.#gAppConfig, key, value);
|
|
73
71
|
/**
|
|
74
72
|
* Check if the given key exists in app config
|
|
75
|
-
*
|
|
76
73
|
* @param key key to check
|
|
77
74
|
* @returns true if key exists
|
|
78
75
|
*/
|
|
79
76
|
has = (key = "") => (0, import_has.default)(this.#gAppConfig, key);
|
|
80
77
|
/**
|
|
81
78
|
* load application configuration from the given asset path
|
|
82
|
-
*
|
|
83
79
|
* @param assetPath url path to load app config from
|
|
84
80
|
* @param configUrl
|
|
85
81
|
*/
|
package/dist/cjs/eventManager.js
CHANGED
|
@@ -40,7 +40,6 @@ class EventManager {
|
|
|
40
40
|
#listeners = /* @__PURE__ */ new Map();
|
|
41
41
|
/**
|
|
42
42
|
* call an async function with a timeout
|
|
43
|
-
*
|
|
44
43
|
* @param promise async function to call
|
|
45
44
|
* @param feedbackWaitTime timeout in milliseconds
|
|
46
45
|
* @returns result of the async function or undefined if timeout
|
|
@@ -55,7 +54,6 @@ class EventManager {
|
|
|
55
54
|
};
|
|
56
55
|
/**
|
|
57
56
|
* emit an event to set of listeners
|
|
58
|
-
*
|
|
59
57
|
* @param {EmitEventParam} param - parameters for emitting an event
|
|
60
58
|
*/
|
|
61
59
|
#emitEvent = (param) => {
|
|
@@ -95,7 +93,6 @@ class EventManager {
|
|
|
95
93
|
};
|
|
96
94
|
/**
|
|
97
95
|
* dispatch an event
|
|
98
|
-
*
|
|
99
96
|
* @param {DispatchEventParam<EventId, Params>} param - parameters for dispatching an event
|
|
100
97
|
*/
|
|
101
98
|
dispatchEvent = async (param) => {
|
|
@@ -126,7 +123,6 @@ class EventManager {
|
|
|
126
123
|
};
|
|
127
124
|
/**
|
|
128
125
|
* Subscribe to an event
|
|
129
|
-
*
|
|
130
126
|
* @param {SubscribeParam<EventId, AppEvents[EventId]>} param - parameters for subscribing to an event
|
|
131
127
|
*/
|
|
132
128
|
subscribe = (param) => {
|
|
@@ -146,7 +142,6 @@ class EventManager {
|
|
|
146
142
|
};
|
|
147
143
|
/**
|
|
148
144
|
* Unsubscribe from an event
|
|
149
|
-
*
|
|
150
145
|
* @param {UnsubscribeParam<EventId>} param - parameters for unsubscribing from an event
|
|
151
146
|
*/
|
|
152
147
|
unsubscribe = (param) => {
|
package/dist/cjs/microfeHost.js
CHANGED
|
@@ -32,7 +32,6 @@ class CMicroFEHost {
|
|
|
32
32
|
#eventManager;
|
|
33
33
|
/**
|
|
34
34
|
* Create new instance of the host frontend application
|
|
35
|
-
*
|
|
36
35
|
* @param {CMicroFEHostParams} params - constructor parameters
|
|
37
36
|
*/
|
|
38
37
|
constructor(params) {
|
|
@@ -44,14 +43,12 @@ class CMicroFEHost {
|
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* add listener to the scripting object event
|
|
47
|
-
*
|
|
48
46
|
* @param {SubscribeParam<EventId, EventListener>} params - parameters to add event listener
|
|
49
47
|
* @returns subscription id
|
|
50
48
|
*/
|
|
51
49
|
addEventListener = (params) => this.#eventManager.subscribe(params);
|
|
52
50
|
/**
|
|
53
51
|
* application release version
|
|
54
|
-
*
|
|
55
52
|
* @returns release version
|
|
56
53
|
*/
|
|
57
54
|
get version() {
|
|
@@ -59,7 +56,6 @@ class CMicroFEHost {
|
|
|
59
56
|
}
|
|
60
57
|
/**
|
|
61
58
|
* Get reference to the scripting object (or proxy) by name
|
|
62
|
-
*
|
|
63
59
|
* @param name unique name of the scripting object
|
|
64
60
|
* @param objectId
|
|
65
61
|
* @returns scripting object reference
|
|
@@ -67,7 +63,6 @@ class CMicroFEHost {
|
|
|
67
63
|
getObject = (objectId) => Promise.resolve(this.#soManager.getObject(objectId, this.#guest));
|
|
68
64
|
/**
|
|
69
65
|
* removes listener from the scripting object event
|
|
70
|
-
*
|
|
71
66
|
* @param {UnsubscribeParam<EventId>} params - parameters to remove event listener
|
|
72
67
|
*/
|
|
73
68
|
removeEventListener = (params) => {
|
|
@@ -75,7 +70,6 @@ class CMicroFEHost {
|
|
|
75
70
|
};
|
|
76
71
|
/**
|
|
77
72
|
* set the size of the guest application iframe window
|
|
78
|
-
*
|
|
79
73
|
* @param {AppWindowSize} appSize window size of the application
|
|
80
74
|
*/
|
|
81
75
|
setAppWindowSize = (appSize) => {
|
|
@@ -90,7 +84,6 @@ class CMicroFEHost {
|
|
|
90
84
|
// deprecated legacy eventing methods (to be removed)
|
|
91
85
|
/**
|
|
92
86
|
* subscribe to an scripting object event (deprecated)
|
|
93
|
-
*
|
|
94
87
|
* @param eventId unique id of the event. The format is <scripting object name>.<event name>
|
|
95
88
|
* @param listener callback function to be called when the event is fired
|
|
96
89
|
* @returns token to be used to unsubscribe
|
|
@@ -99,7 +92,6 @@ class CMicroFEHost {
|
|
|
99
92
|
subscribe = (eventId, listener) => (0, import_pubsub_js.subscribe)(eventId, listener);
|
|
100
93
|
/**
|
|
101
94
|
* unsubscribe from an scripting object event (deprecated)
|
|
102
|
-
*
|
|
103
95
|
* @param token unique token returned by subscribe
|
|
104
96
|
* @param eventId unique id of the event. The format is <scripting object name>.<event name>
|
|
105
97
|
*/
|
package/dist/esm/appBridge.js
CHANGED
|
@@ -22,7 +22,6 @@ class CAppBridge {
|
|
|
22
22
|
#activeApps = /* @__PURE__ */ new Map();
|
|
23
23
|
/**
|
|
24
24
|
* Create a new instance of the AppBridge
|
|
25
|
-
*
|
|
26
25
|
* @param {AppBridgeParams} params - parameter for the constructor
|
|
27
26
|
*/
|
|
28
27
|
constructor(params) {
|
|
@@ -193,7 +192,6 @@ class CAppBridge {
|
|
|
193
192
|
};
|
|
194
193
|
/**
|
|
195
194
|
* registers scripting object to the host
|
|
196
|
-
*
|
|
197
195
|
* @param {ValueOf<AppObjects>} so scripting object
|
|
198
196
|
* @param {AddScriptingObjectParams} params params to add scripting object
|
|
199
197
|
*/
|
|
@@ -208,7 +206,6 @@ class CAppBridge {
|
|
|
208
206
|
};
|
|
209
207
|
/**
|
|
210
208
|
* Close guest micro frontend application
|
|
211
|
-
*
|
|
212
209
|
* @param id unique id of guest application
|
|
213
210
|
*/
|
|
214
211
|
closeApp = async (id) => {
|
|
@@ -233,20 +230,17 @@ class CAppBridge {
|
|
|
233
230
|
};
|
|
234
231
|
/**
|
|
235
232
|
* dispatch event to guest microfrontend application
|
|
236
|
-
*
|
|
237
233
|
* @param {DispatchEventParams<EventId, Params>} params - event parameters
|
|
238
234
|
*/
|
|
239
235
|
dispatchEvent = async (params) => this.#eventManager.dispatchEvent(params);
|
|
240
236
|
/**
|
|
241
237
|
* Get guest by id
|
|
242
|
-
*
|
|
243
238
|
* @param id unique id of guest
|
|
244
239
|
* @returns guest instance
|
|
245
240
|
*/
|
|
246
241
|
getGuest = (id) => this.#activeApps.get(id)?.guest;
|
|
247
242
|
/**
|
|
248
243
|
* Get list of active guests
|
|
249
|
-
*
|
|
250
244
|
* @returns list of active guests
|
|
251
245
|
*/
|
|
252
246
|
getGuests = () => [...this.#activeApps.values()].map((app) => app.guest);
|
|
@@ -262,7 +256,6 @@ class CAppBridge {
|
|
|
262
256
|
};
|
|
263
257
|
/**
|
|
264
258
|
* Mount guest micro frontend application into DOM
|
|
265
|
-
*
|
|
266
259
|
* @param id unique id of guest micro frontend application
|
|
267
260
|
* @throws Error if application with given id is not found in configuration
|
|
268
261
|
*/
|
|
@@ -277,7 +270,6 @@ class CAppBridge {
|
|
|
277
270
|
};
|
|
278
271
|
/**
|
|
279
272
|
* Open guest micro frontend application
|
|
280
|
-
*
|
|
281
273
|
* @param {OpenAppParams} params - options to open guest application
|
|
282
274
|
*/
|
|
283
275
|
openApp = async (params) => {
|
|
@@ -315,7 +307,6 @@ class CAppBridge {
|
|
|
315
307
|
};
|
|
316
308
|
/**
|
|
317
309
|
* emit event to all subscribers (deprecated)
|
|
318
|
-
*
|
|
319
310
|
* @deprecated use dispatchEvent instead
|
|
320
311
|
* @param eventId unique id of the event. The format is <scripting object name>.<event name>
|
|
321
312
|
* @param data data to be sent to the subscribers of the event
|
|
@@ -330,7 +321,6 @@ class CAppBridge {
|
|
|
330
321
|
};
|
|
331
322
|
/**
|
|
332
323
|
* removes scripting object from the host
|
|
333
|
-
*
|
|
334
324
|
* @param objectId unique id of the scripting object
|
|
335
325
|
*/
|
|
336
326
|
removeScriptingObject = (objectId) => {
|
|
@@ -338,7 +328,6 @@ class CAppBridge {
|
|
|
338
328
|
};
|
|
339
329
|
/**
|
|
340
330
|
* Unmount guest micro frontend application from DOM
|
|
341
|
-
*
|
|
342
331
|
* @param id unique id of guest micro frontend application
|
|
343
332
|
* @throws Error if application with given id is not found in configuration
|
|
344
333
|
*/
|
package/dist/esm/config/app.js
CHANGED
|
@@ -23,7 +23,6 @@ class CAppConfig {
|
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Get value for the given app config key
|
|
26
|
-
*
|
|
27
26
|
* @param key key to get value for
|
|
28
27
|
* @param defaultValue default value to return if key is not found
|
|
29
28
|
* @returns value for the given key
|
|
@@ -31,7 +30,6 @@ class CAppConfig {
|
|
|
31
30
|
get = (key = "", defaultValue = null) => lodashClone(lodashGet(this.#gAppConfig, key, defaultValue));
|
|
32
31
|
/**
|
|
33
32
|
* Set value for the given app config key
|
|
34
|
-
*
|
|
35
33
|
* @param key key to set value for
|
|
36
34
|
* @param value value to set
|
|
37
35
|
* @returns app config instance
|
|
@@ -39,14 +37,12 @@ class CAppConfig {
|
|
|
39
37
|
set = (key, value) => lodashSet(this.#gAppConfig, key, value);
|
|
40
38
|
/**
|
|
41
39
|
* Check if the given key exists in app config
|
|
42
|
-
*
|
|
43
40
|
* @param key key to check
|
|
44
41
|
* @returns true if key exists
|
|
45
42
|
*/
|
|
46
43
|
has = (key = "") => lodashHas(this.#gAppConfig, key);
|
|
47
44
|
/**
|
|
48
45
|
* load application configuration from the given asset path
|
|
49
|
-
*
|
|
50
46
|
* @param assetPath url path to load app config from
|
|
51
47
|
* @param configUrl
|
|
52
48
|
*/
|
package/dist/esm/eventManager.js
CHANGED
|
@@ -17,7 +17,6 @@ class EventManager {
|
|
|
17
17
|
#listeners = /* @__PURE__ */ new Map();
|
|
18
18
|
/**
|
|
19
19
|
* call an async function with a timeout
|
|
20
|
-
*
|
|
21
20
|
* @param promise async function to call
|
|
22
21
|
* @param feedbackWaitTime timeout in milliseconds
|
|
23
22
|
* @returns result of the async function or undefined if timeout
|
|
@@ -32,7 +31,6 @@ class EventManager {
|
|
|
32
31
|
};
|
|
33
32
|
/**
|
|
34
33
|
* emit an event to set of listeners
|
|
35
|
-
*
|
|
36
34
|
* @param {EmitEventParam} param - parameters for emitting an event
|
|
37
35
|
*/
|
|
38
36
|
#emitEvent = (param) => {
|
|
@@ -72,7 +70,6 @@ class EventManager {
|
|
|
72
70
|
};
|
|
73
71
|
/**
|
|
74
72
|
* dispatch an event
|
|
75
|
-
*
|
|
76
73
|
* @param {DispatchEventParam<EventId, Params>} param - parameters for dispatching an event
|
|
77
74
|
*/
|
|
78
75
|
dispatchEvent = async (param) => {
|
|
@@ -103,7 +100,6 @@ class EventManager {
|
|
|
103
100
|
};
|
|
104
101
|
/**
|
|
105
102
|
* Subscribe to an event
|
|
106
|
-
*
|
|
107
103
|
* @param {SubscribeParam<EventId, AppEvents[EventId]>} param - parameters for subscribing to an event
|
|
108
104
|
*/
|
|
109
105
|
subscribe = (param) => {
|
|
@@ -123,7 +119,6 @@ class EventManager {
|
|
|
123
119
|
};
|
|
124
120
|
/**
|
|
125
121
|
* Unsubscribe from an event
|
|
126
|
-
*
|
|
127
122
|
* @param {UnsubscribeParam<EventId>} param - parameters for unsubscribing from an event
|
|
128
123
|
*/
|
|
129
124
|
unsubscribe = (param) => {
|
package/dist/esm/microfeHost.js
CHANGED
|
@@ -9,7 +9,6 @@ class CMicroFEHost {
|
|
|
9
9
|
#eventManager;
|
|
10
10
|
/**
|
|
11
11
|
* Create new instance of the host frontend application
|
|
12
|
-
*
|
|
13
12
|
* @param {CMicroFEHostParams} params - constructor parameters
|
|
14
13
|
*/
|
|
15
14
|
constructor(params) {
|
|
@@ -21,14 +20,12 @@ class CMicroFEHost {
|
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
23
22
|
* add listener to the scripting object event
|
|
24
|
-
*
|
|
25
23
|
* @param {SubscribeParam<EventId, EventListener>} params - parameters to add event listener
|
|
26
24
|
* @returns subscription id
|
|
27
25
|
*/
|
|
28
26
|
addEventListener = (params) => this.#eventManager.subscribe(params);
|
|
29
27
|
/**
|
|
30
28
|
* application release version
|
|
31
|
-
*
|
|
32
29
|
* @returns release version
|
|
33
30
|
*/
|
|
34
31
|
get version() {
|
|
@@ -36,7 +33,6 @@ class CMicroFEHost {
|
|
|
36
33
|
}
|
|
37
34
|
/**
|
|
38
35
|
* Get reference to the scripting object (or proxy) by name
|
|
39
|
-
*
|
|
40
36
|
* @param name unique name of the scripting object
|
|
41
37
|
* @param objectId
|
|
42
38
|
* @returns scripting object reference
|
|
@@ -44,7 +40,6 @@ class CMicroFEHost {
|
|
|
44
40
|
getObject = (objectId) => Promise.resolve(this.#soManager.getObject(objectId, this.#guest));
|
|
45
41
|
/**
|
|
46
42
|
* removes listener from the scripting object event
|
|
47
|
-
*
|
|
48
43
|
* @param {UnsubscribeParam<EventId>} params - parameters to remove event listener
|
|
49
44
|
*/
|
|
50
45
|
removeEventListener = (params) => {
|
|
@@ -52,7 +47,6 @@ class CMicroFEHost {
|
|
|
52
47
|
};
|
|
53
48
|
/**
|
|
54
49
|
* set the size of the guest application iframe window
|
|
55
|
-
*
|
|
56
50
|
* @param {AppWindowSize} appSize window size of the application
|
|
57
51
|
*/
|
|
58
52
|
setAppWindowSize = (appSize) => {
|
|
@@ -67,7 +61,6 @@ class CMicroFEHost {
|
|
|
67
61
|
// deprecated legacy eventing methods (to be removed)
|
|
68
62
|
/**
|
|
69
63
|
* subscribe to an scripting object event (deprecated)
|
|
70
|
-
*
|
|
71
64
|
* @param eventId unique id of the event. The format is <scripting object name>.<event name>
|
|
72
65
|
* @param listener callback function to be called when the event is fired
|
|
73
66
|
* @returns token to be used to unsubscribe
|
|
@@ -76,7 +69,6 @@ class CMicroFEHost {
|
|
|
76
69
|
subscribe = (eventId, listener) => subscribe(eventId, listener);
|
|
77
70
|
/**
|
|
78
71
|
* unsubscribe from an scripting object event (deprecated)
|
|
79
|
-
*
|
|
80
72
|
* @param token unique token returned by subscribe
|
|
81
73
|
* @param eventId unique id of the event. The format is <scripting object name>.<event name>
|
|
82
74
|
*/
|
|
Binary file
|
package/dist/public/frame.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="mobile-web-app-capable" content="yes"/><link rel="icon" href="/favicon.ico"/><title>Application</title><script>!function(e,t,n,a,c,o,s){e.GoogleAnalyticsObject=c,e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},e[c].l=1*new Date,o=t.createElement(n),s=t.getElementsByTagName(n)[0],o.async=1,o.src="https://www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s)}(window,document,"script",0,"ga")</script><style>.full-width{width:100%}.full-height{height:100%}</style><script defer="defer" src="js/emuiAppBridge.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="mobile-web-app-capable" content="yes"/><link rel="icon" href="/favicon.ico"/><title>Application</title><script>!function(e,t,n,a,c,o,s){e.GoogleAnalyticsObject=c,e[c]=e[c]||function(){(e[c].q=e[c].q||[]).push(arguments)},e[c].l=1*new Date,o=t.createElement(n),s=t.getElementsByTagName(n)[0],o.async=1,o.src="https://www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s)}(window,document,"script",0,"ga")</script><style>.full-width{width:100%}.full-height{height:100%}</style><script defer="defer" src="js/emuiAppBridge.da937d9d01527da3925b.js"></script></head><body class="full-width full-height"><noscript>If you're seeing this message, that means <strong>JavaScript has been disabled on your browser</strong>, please <strong>enable JS</strong> to make this app work.</noscript><div id="pui-app-container-" class="full-width full-height"></div></body></html>
|
|
Binary file
|
|
Binary file
|
package/dist/public/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Host</title><script src="https://cdn.tailwindcss.com?plugins=forms"></script><script src="https://qa.assets.rd.elliemae.io/pui-diagnostics@3"></script><script defer="defer" src="js/emuiAppBridge.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Host</title><script src="https://cdn.tailwindcss.com?plugins=forms"></script><script src="https://qa.assets.rd.elliemae.io/pui-diagnostics@3"></script><script defer="defer" src="js/emuiAppBridge.da937d9d01527da3925b.js"></script></head><body><header class="bg-indigo-300 h-10 flex place-items-center"><div class="px-2">ICE Mortgage Product</div></header><main class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8"><div class="min-w-0 flex-1 mt-4"><h1 class="text-2xl font-bold leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight">Loan Application</h1></div><div id="successFeedback" class="hidden rounded-md bg-green-50 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"/></svg></div><div class="ml-3"><p class="text-sm font-medium text-green-800">Loan Saved Successfully</p></div></div></div><div id="errorFeedback" class="hidden rounded-md bg-red-50 p-4"><div class="flex"><div class="flex-shrink-0"><svg class="h-5 w-5 text-red-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd"/></svg></div><div class="ml-3"><h3 class="text-sm font-medium text-red-800">Credit Score is not meeting the requirement</h3></div></div></div><div class="mt-2 sm:grid sm:grid-cols-2 sm:gap-2"><form class="px-2 py-2 space-y-8 divide-y divide-gray-200 bg-gray-50"><div class="space-y-8 divide-y divide-gray-200 sm:space-y-5"><div class="space-y-6 sm:space-y-5"><div><h3 class="text-lg font-medium leading-6 text-gray-900">Personal Information</h3></div><div class="space-y-6 sm:space-y-5"><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="firstName" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">First name</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input name="firstName" id="firstName" autocomplete="given-name" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="John" placeholder="John"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="lastName" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Last name</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input name="lastName" id="lastName" autocomplete="family-name" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="Doe" placeholder="Doe"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="ssn" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">SSN</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="ssn" id="ssn" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="123456789" placeholder="123456789"/></div></div></div><div><h3 class="text-lg font-medium leading-6 text-gray-900">Loan Information</h3></div><div class="space-y-6 sm:space-y-5"><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="amount" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Amount</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="amount" id="amount" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="500000" placeholder="500000"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="Term" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Term (years)</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="term" id="term" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="30" placeholder="30"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="downPayment" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Down Payment</label><div class="mt-1 sm:col-span-2 sm:mt-0"><input type="number" name="downPayment" id="downPayment" class="block w-full max-w-lg rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:max-w-xs sm:text-sm" value="50000" placeholder="50000"/></div></div><div class="sm:grid sm:grid-cols-3 sm:items-start sm:gap-4 sm:border-gray-200"><label for="creditScore" class="block text-sm font-medium text-gray-700 sm:mt-px sm:pt-2">Credit Score</label><div class="mt-1 sm:mt-0"><output id="creditScore" class="block w-full max-w-lg pl-2 pt-2 sm:max-w-xs sm:text-sm">NA</output></div><div class="mt-1 sm:mt-0"><button id="getCreditScore" type="button" class="inline-flex items-center rounded-full border border-transparent bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/></svg></button></div></div></div></div></div><button id="saveLoan" type="button" class="inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">Save</button></form><div id="aside-container" class="flex flex-col gap-4 items-start mt-4 border-2 p-2 rounded-lg border-dashed border-cyan-300 sm:mt-0"></div></div><div id="bottom-container" class="flex flex-col gap-4 items-start mt-4 p-2 sm:mt-0"></div></main><script src="./init.js" type="module"></script></body></html>
|
package/dist/public/init.js.gz
CHANGED
|
Binary file
|
|
@@ -21,4 +21,4 @@ object-assign
|
|
|
21
21
|
`),f=[],y=0,w=o.length;y<w;y++){var C=o[y].trim();if(C){var I=C.match(at);if(I){var z=0|parseInt(I[1],10),D=I[2];z!==0&&(Vt(D,z),Nt(t,D,I[3]),t.getTag().insertRules(z,f)),f.length=0}else f.push(C)}}},jt=function(){return ee.nc},Tt=function(t){var n=document.head,o=t||n,f=document.createElement("style"),y=function(I){for(var z=I.childNodes,D=z.length;D>=0;D--){var K=z[D];if(K&&K.nodeType===1&&K.hasAttribute(qe))return K}}(o),w=y!==void 0?y.nextSibling:null;f.setAttribute(qe,"active"),f.setAttribute("data-styled-version","5.3.11");var C=jt();return C&&f.setAttribute("nonce",C),o.insertBefore(f,w),f},et=function(){function t(o){var f=this.element=Tt(o);f.appendChild(document.createTextNode("")),this.sheet=function(y){if(y.sheet)return y.sheet;for(var w=document.styleSheets,C=0,I=w.length;C<I;C++){var z=w[C];if(z.ownerNode===y)return z}Me(17)}(f),this.length=0}var n=t.prototype;return n.insertRule=function(o,f){try{return this.sheet.insertRule(f,o),this.length++,!0}catch{return!1}},n.deleteRule=function(o){this.sheet.deleteRule(o),this.length--},n.getRule=function(o){var f=this.sheet.cssRules[o];return f!==void 0&&typeof f.cssText=="string"?f.cssText:""},t}(),st=function(){function t(o){var f=this.element=Tt(o);this.nodes=f.childNodes,this.length=0}var n=t.prototype;return n.insertRule=function(o,f){if(o<=this.length&&o>=0){var y=document.createTextNode(f),w=this.nodes[o];return this.element.insertBefore(y,w||null),this.length++,!0}return!1},n.deleteRule=function(o){this.element.removeChild(this.nodes[o]),this.length--},n.getRule=function(o){return o<this.length?this.nodes[o].textContent:""},t}(),Pr=function(){function t(o){this.rules=[],this.length=0}var n=t.prototype;return n.insertRule=function(o,f){return o<=this.length&&(this.rules.splice(o,0,f),this.length++,!0)},n.deleteRule=function(o){this.rules.splice(o,1),this.length--},n.getRule=function(o){return o<this.length?this.rules[o]:""},t}(),ar=Ct,Ir={isServer:!Ct,useCSSOMInjection:!ve},vt=function(){function t(o,f,y){o===void 0&&(o=_e),f===void 0&&(f={}),this.options=te({},Ir,{},o),this.gs=f,this.names=new Map(y),this.server=!!o.isServer,!this.server&&Ct&&ar&&(ar=!1,function(w){for(var C=document.querySelectorAll(Dt),I=0,z=C.length;I<z;I++){var D=C[I];D&&D.getAttribute(qe)!=="active"&&(Lt(w,D),D.parentNode&&D.parentNode.removeChild(D))}}(this))}t.registerId=function(o){return ot(o)};var n=t.prototype;return n.reconstructWithOptions=function(o,f){return f===void 0&&(f=!0),new t(te({},this.options,{},o),this.gs,f&&this.names||void 0)},n.allocateGSInstance=function(o){return this.gs[o]=(this.gs[o]||0)+1},n.getTag=function(){return this.tag||(this.tag=(y=(f=this.options).isServer,w=f.useCSSOMInjection,C=f.target,o=y?new Pr(C):w?new et(C):new st(C),new Ht(o)));var o,f,y,w,C},n.hasNameForId=function(o,f){return this.names.has(o)&&this.names.get(o).has(f)},n.registerName=function(o,f){if(ot(o),this.names.has(o))this.names.get(o).add(f);else{var y=new Set;y.add(f),this.names.set(o,y)}},n.insertRules=function(o,f,y){this.registerName(o,f),this.getTag().insertRules(ot(o),y)},n.clearNames=function(o){this.names.has(o)&&this.names.get(o).clear()},n.clearRules=function(o){this.getTag().clearGroup(ot(o)),this.clearNames(o)},n.clearTag=function(){this.tag=void 0},n.toString=function(){return function(o){for(var f=o.getTag(),y=f.length,w="",C=0;C<y;C++){var I=mt(C);if(I!==void 0){var z=o.names.get(I),D=f.getGroup(C);if(z&&D&&z.size){var K=qe+".g"+C+'[id="'+I+'"]',Q="";z!==void 0&&z.forEach(function(ae){ae.length>0&&(Q+=ae+",")}),w+=""+D+K+'{content:"'+Q+`"}/*!sc*/
|
|
22
22
|
`}}}return w}(this)},t}(),Rr=/(a)(d)/gi,cr=function(t){return String.fromCharCode(t+(t>25?39:97))};function Wt(t){var n,o="";for(n=Math.abs(t);n>52;n=n/52|0)o=cr(n%52)+o;return(cr(n%52)+o).replace(Rr,"$1-$2")}var yt=function(t,n){for(var o=n.length;o;)t=33*t^n.charCodeAt(--o);return t},lr=function(t){return yt(5381,t)};function ur(t){for(var n=0;n<t.length;n+=1){var o=t[n];if(it(o)&&!Et(o))return!1}return!0}var Fr=lr("5.3.11"),$r=function(){function t(n,o,f){this.rules=n,this.staticRulesId="",this.isStatic=(f===void 0||f.isStatic)&&ur(n),this.componentId=o,this.baseHash=yt(Fr,o),this.baseStyle=f,vt.registerId(o)}return t.prototype.generateAndInjectStyles=function(n,o,f){var y=this.componentId,w=[];if(this.baseStyle&&w.push(this.baseStyle.generateAndInjectStyles(n,o,f)),this.isStatic&&!f.hash)if(this.staticRulesId&&o.hasNameForId(y,this.staticRulesId))w.push(this.staticRulesId);else{var C=ft(this.rules,n,o,f).join(""),I=Wt(yt(this.baseHash,C)>>>0);if(!o.hasNameForId(y,I)){var z=f(C,"."+I,void 0,y);o.insertRules(y,I,z)}w.push(I),this.staticRulesId=I}else{for(var D=this.rules.length,K=yt(this.baseHash,f.hash),Q="",ae=0;ae<D;ae++){var Ce=this.rules[ae];if(typeof Ce=="string")Q+=Ce;else if(Ce){var ne=ft(Ce,n,o,f),ue=Array.isArray(ne)?ne.join(""):ne;K=yt(K,ue+ae),Q+=ue}}if(Q){var q=Wt(K>>>0);if(!o.hasNameForId(y,q)){var Ae=f(Q,"."+q,void 0,y);o.insertRules(y,q,Ae)}w.push(q)}}return w.join(" ")},t}(),Mr=/^\s*\/\/.*$/gm,kr=[":","[",".","#"];function pr(t){var n,o,f,y,w=t===void 0?_e:t,C=w.options,I=C===void 0?_e:C,z=w.plugins,D=z===void 0?ht:z,K=new At(I),Q=[],ae=function(ue){function q(Ae){if(Ae)try{ue(Ae+"}")}catch{}}return function(Ae,oe,$e,Te,Ie,ct,xt,Ke,tt,lt){switch(Ae){case 1:if(tt===0&&oe.charCodeAt(0)===64)return ue(oe+";"),"";break;case 2:if(Ke===0)return oe+"/*|*/";break;case 3:switch(Ke){case 102:case 112:return ue($e[0]+oe),"";default:return oe+(lt===0?"/*|*/":"")}case-2:oe.split("/*|*/}").forEach(q)}}}(function(ue){Q.push(ue)}),Ce=function(ue,q,Ae){return q===0&&kr.indexOf(Ae[o.length])!==-1||Ae.match(y)?ue:"."+n};function ne(ue,q,Ae,oe){oe===void 0&&(oe="&");var $e=ue.replace(Mr,""),Te=q&&Ae?Ae+" "+q+" { "+$e+" }":$e;return n=oe,o=q,f=new RegExp("\\"+o+"\\b","g"),y=new RegExp("(\\"+o+"\\b){2,}"),K(Ae||!q?"":q,Te)}return K.use([].concat(D,[function(ue,q,Ae){ue===2&&Ae.length&&Ae[0].lastIndexOf(o)>0&&(Ae[0]=Ae[0].replace(f,Ce))},ae,function(ue){if(ue===-2){var q=Q;return Q=[],q}}])),ne.hash=D.length?D.reduce(function(ue,q){return q.name||Me(15),yt(ue,q.name)},5381).toString():"",ne}var Kt=re.createContext(),Tn=Kt.Consumer,Yt=re.createContext(),fr=(Yt.Consumer,new vt),Xt=pr();function Zt(){return(0,re.useContext)(Kt)||fr}function dr(){return(0,re.useContext)(Yt)||Xt}function Dr(t){var n=(0,re.useState)(t.stylisPlugins),o=n[0],f=n[1],y=Zt(),w=(0,re.useMemo)(function(){var I=y;return t.sheet?I=t.sheet:t.target&&(I=I.reconstructWithOptions({target:t.target},!1)),t.disableCSSOMInjection&&(I=I.reconstructWithOptions({useCSSOMInjection:!1})),I},[t.disableCSSOMInjection,t.sheet,t.target]),C=(0,re.useMemo)(function(){return pr({options:{prefix:!t.disableVendorPrefixes},plugins:o})},[t.disableVendorPrefixes,o]);return(0,re.useEffect)(function(){Qe()(o,t.stylisPlugins)||f(t.stylisPlugins)},[t.stylisPlugins]),re.createElement(Kt.Provider,{value:w},re.createElement(Yt.Provider,{value:C},t.children))}var hr=function(){function t(n,o){var f=this;this.inject=function(y,w){w===void 0&&(w=Xt);var C=f.name+w.hash;y.hasNameForId(f.id,C)||y.insertRules(f.id,C,w(f.rules,C,"@keyframes"))},this.toString=function(){return Me(12,String(f.name))},this.name=n,this.id="sc-keyframes-"+n,this.rules=o}return t.prototype.getName=function(n){return n===void 0&&(n=Xt),this.name+n.hash},t}(),Nr=/([A-Z])/,Lr=/([A-Z])/g,zr=/^ms-/,Ur=function(t){return"-"+t.toLowerCase()};function gr(t){return Nr.test(t)?t.replace(Lr,Ur).replace(zr,"-ms-"):t}var mr=function(t){return t==null||t===!1||t===""};function ft(t,n,o,f){if(Array.isArray(t)){for(var y,w=[],C=0,I=t.length;C<I;C+=1)(y=ft(t[C],n,o,f))!==""&&(Array.isArray(y)?w.push.apply(w,y):w.push(y));return w}if(mr(t))return"";if(Et(t))return"."+t.styledComponentId;if(it(t)){if(typeof(D=t)!="function"||D.prototype&&D.prototype.isReactComponent||!n)return t;var z=t(n);return ft(z,n,o,f)}var D;return t instanceof hr?o?(t.inject(o,f),t.getName(f)):t:ke(t)?function K(Q,ae){var Ce,ne,ue=[];for(var q in Q)Q.hasOwnProperty(q)&&!mr(Q[q])&&(Array.isArray(Q[q])&&Q[q].isCss||it(Q[q])?ue.push(gr(q)+":",Q[q],";"):ke(Q[q])?ue.push.apply(ue,K(Q[q],q)):ue.push(gr(q)+": "+(Ce=q,(ne=Q[q])==null||typeof ne=="boolean"||ne===""?"":typeof ne!="number"||ne===0||Ce in F||Ce.startsWith("--")?String(ne).trim():ne+"px")+";"));return ae?[ae+" {"].concat(ue,["}"]):ue}(t):t.toString()}var vr=function(t){return Array.isArray(t)&&(t.isCss=!0),t};function Pt(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),f=1;f<n;f++)o[f-1]=arguments[f];return it(t)||ke(t)?vr(ft(xe(ht,[t].concat(o)))):o.length===0&&t.length===1&&typeof t[0]=="string"?t:vr(ft(xe(t,o)))}var Pn=/invalid hook call/i,In=new Set,Rn=function(t,n){if(0)var o,f,y},Jt=function(t,n,o){return o===void 0&&(o=_e),t.theme!==o.theme&&t.theme||n||o.theme},Br=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Gr=/(^-|-$)/g;function Qt(t){return t.replace(Br,"-").replace(Gr,"")}var _t=function(t){return Wt(lr(t)>>>0)};function zt(t){return typeof t=="string"&&!0}var qt=function(t){return typeof t=="function"||typeof t=="object"&&t!==null&&!Array.isArray(t)},Hr=function(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"};function Vr(t,n,o){var f=t[o];qt(n)&&qt(f)?yr(f,n):t[o]=n}function yr(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),f=1;f<n;f++)o[f-1]=arguments[f];for(var y=0,w=o;y<w.length;y++){var C=w[y];if(qt(C))for(var I in C)Hr(I)&&Vr(t,C[I],I)}return t}var dt=re.createContext(),Fn=dt.Consumer;function $n(t){var n=s(dt),o=i(function(){return function(f,y){if(!f)return Me(14);if(it(f)){var w=f(y);return w}return Array.isArray(f)||typeof f!="object"?Me(8):y?te({},y,{},f):f}(t.theme,n)},[t.theme,n]);return t.children?r.createElement(dt.Provider,{value:o},t.children):null}var er={};function br(t,n,o){var f=Et(t),y=!zt(t),w=n.attrs,C=w===void 0?ht:w,I=n.componentId,z=I===void 0?function(oe,$e){var Te=typeof oe!="string"?"sc":Qt(oe);er[Te]=(er[Te]||0)+1;var Ie=Te+"-"+_t("5.3.11"+Te+er[Te]);return $e?$e+"-"+Ie:Ie}(n.displayName,n.parentComponentId):I,D=n.displayName,K=D===void 0?function(oe){return zt(oe)?"styled."+oe:"Styled("+Ot(oe)+")"}(t):D,Q=n.displayName&&n.componentId?Qt(n.displayName)+"-"+n.componentId:n.componentId||z,ae=f&&t.attrs?Array.prototype.concat(t.attrs,C).filter(Boolean):C,Ce=n.shouldForwardProp;f&&t.shouldForwardProp&&(Ce=n.shouldForwardProp?function(oe,$e,Te){return t.shouldForwardProp(oe,$e,Te)&&n.shouldForwardProp(oe,$e,Te)}:t.shouldForwardProp);var ne,ue=new $r(o,Q,f?t.componentStyle:void 0),q=ue.isStatic&&C.length===0,Ae=function(oe,$e){return function(Te,Ie,ct,xt){var Ke=Te.attrs,tt=Te.componentStyle,lt=Te.defaultProps,wt=Te.foldedComponentIds,We=Te.shouldForwardProp,Xe=Te.styledComponentId,rt=Te.target,Ue=function(Z,O,pe){Z===void 0&&(Z=_e);var $=te({},O,{theme:Z}),Pe={};return pe.forEach(function(fe){var me,J,De,Be=fe;for(me in it(Be)&&(Be=Be($)),Be)$[me]=Pe[me]=me==="className"?(J=Pe[me],De=Be[me],J&&De?J+" "+De:J||De):Be[me]}),[$,Pe]}(Jt(Ie,(0,re.useContext)(dt),lt)||_e,Ie,Ke),It=Ue[0],Ze=Ue[1],Ye=function(Z,O,pe,$){var Pe=Zt(),fe=dr(),me=O?Z.generateAndInjectStyles(_e,Pe,fe):Z.generateAndInjectStyles(pe,Pe,fe);return me}(tt,xt,It,void 0),Rt=ct,St=Ze.$as||Ie.$as||Ze.as||Ie.as||rt,Ft=zt(St),G=Ze!==Ie?te({},Ie,{},Ze):Ie,U={};for(var B in G)B[0]!=="$"&&B!=="as"&&(B==="forwardedAs"?U.as=G[B]:(We?We(B,ie,St):!Ft||ie(B))&&(U[B]=G[B]));return Ie.style&&Ze.style!==Ie.style&&(U.style=te({},Ie.style,{},Ze.style)),U.className=Array.prototype.concat(wt,Xe,Ye!==Xe?Ye:null,Ie.className,Ze.className).filter(Boolean).join(" "),U.ref=Rt,(0,re.createElement)(St,U)}(ne,oe,$e,q)};return Ae.displayName=K,(ne=re.forwardRef(Ae)).attrs=ae,ne.componentStyle=ue,ne.displayName=K,ne.shouldForwardProp=Ce,ne.foldedComponentIds=f?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):ht,ne.styledComponentId=Q,ne.target=f?t.target:t,ne.withComponent=function(oe){var $e=n.componentId,Te=function(ct,xt){if(ct==null)return{};var Ke,tt,lt={},wt=Object.keys(ct);for(tt=0;tt<wt.length;tt++)Ke=wt[tt],xt.indexOf(Ke)>=0||(lt[Ke]=ct[Ke]);return lt}(n,["componentId"]),Ie=$e&&$e+"-"+(zt(oe)?oe:Qt(Ot(oe)));return br(oe,te({},Te,{attrs:ae,componentId:Ie}),o)},Object.defineProperty(ne,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(oe){this._foldedDefaultProps=f?yr({},t.defaultProps,oe):oe}}),Object.defineProperty(ne,"toString",{value:function(){return"."+ne.styledComponentId}}),y&&je()(ne,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),ne}var xr=function(t){return function n(o,f,y){if(y===void 0&&(y=_e),!(0,W.isValidElementType)(f))return Me(1,String(f));var w=function(){return o(f,y,Pt.apply(void 0,arguments))};return w.withConfig=function(C){return n(o,f,te({},y,{},C))},w.attrs=function(C){return n(o,f,te({},y,{attrs:Array.prototype.concat(y.attrs,C).filter(Boolean)}))},w}(br,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(t){xr[t]=xr(t)});var Wr=function(){function t(o,f){this.rules=o,this.componentId=f,this.isStatic=ur(o),vt.registerId(this.componentId+1)}var n=t.prototype;return n.createStyles=function(o,f,y,w){var C=w(ft(this.rules,f,y,w).join(""),""),I=this.componentId+o;y.insertRules(I,I,C)},n.removeStyles=function(o,f){f.clearRules(this.componentId+o)},n.renderStyles=function(o,f,y,w){o>2&&vt.registerId(this.componentId+o),this.removeStyles(o,y),this.createStyles(o,f,y,w)},t}();function Mn(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),f=1;f<n;f++)o[f-1]=arguments[f];var y=Pt.apply(void 0,[t].concat(o)),w="sc-global-"+_t(JSON.stringify(y)),C=new Wr(y,w);function I(D){var K=Zt(),Q=dr(),ae=s(dt),Ce=c(K.allocateGSInstance(w)).current;return K.server&&z(Ce,D,K,ae,Q),l(function(){if(!K.server)return z(Ce,D,K,ae,Q),function(){return C.removeStyles(Ce,K)}},[Ce,D,K,ae,Q]),null}function z(D,K,Q,ae,Ce){if(C.isStatic)C.renderStyles(D,gt,Q,Ce);else{var ne=te({},K,{theme:Jt(K,ae,I.defaultProps)});C.renderStyles(D,ne,Q,Ce)}}return r.memo(I)}function kn(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),f=1;f<n;f++)o[f-1]=arguments[f];var y=Pt.apply(void 0,[t].concat(o)).join(""),w=_t(y);return new hr(w,y)}var Dn=function(){function t(){var o=this;this._emitSheetCSS=function(){var f=o.instance.toString();if(!f)return"";var y=jt();return"<style "+[y&&'nonce="'+y+'"',qe+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+f+"</style>"},this.getStyleTags=function(){return o.sealed?Me(2):o._emitSheetCSS()},this.getStyleElement=function(){var f;if(o.sealed)return Me(2);var y=((f={})[qe]="",f["data-styled-version"]="5.3.11",f.dangerouslySetInnerHTML={__html:o.instance.toString()},f),w=jt();return w&&(y.nonce=w),[re.createElement("style",te({},y,{key:"sc-0-0"}))]},this.seal=function(){o.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}var n=t.prototype;return n.collectStyles=function(o){return this.sealed?Me(2):re.createElement(Dr,{sheet:this.instance},o)},n.interleaveWithNodeStream=function(o){return Me(3)},t}(),Nn=function(t){var n=r.forwardRef(function(o,f){var y=s(dt),w=t.defaultProps,C=Jt(o,y,w);return r.createElement(t,te({},o,{theme:C,ref:f}))});return m(n,t),n.displayName="WithTheme("+Ot(t)+")",n},Ln=function(){return s(dt)},zn={StyleSheet:vt,masterSheet:fr};const Un=null,Kr=t=>Object.keys(t).reduce((n,o)=>(n[o]=(f,...y)=>Pt(["@media (max-width:","){",";}"],t[o],Pt(f,...y)),n),{}),Yr=t=>({space:{...t.spaces,xxxs:t.spaces[1],xxs:t.spaces[2],xxs2:t.spaces[3],xs:t.spaces[4],s:t.spaces[5],m:t.spaces[6],l:t.spaces[7],xl:t.spaces[8],xxl:t.spaces[9]},fontSizes:{...t.fontSizes,title:{500:t.fontSizes[3],600:t.fontSizes[4],700:t.fontSizes[5],800:t.fontSizes[6],900:t.fontSizes[7]},subTitle:{300:t.fontSizes[1],400:t.fontSizes[2]},label:{200:t.fontSizes[0],300:t.fontSizes[1],400:t.fontSizes[2]},value:{300:t.fontSizes[1],400:t.fontSizes[2],500:t.fontSizes[3],600:t.fontSizes[4]},hyperlink:{200:t.fontSizes[0],300:t.fontSizes[1],400:t.fontSizes[2]},microText:{200:t.fontSizes[0]}},fontWeights:{...t.fontWeights,thin:t.fontWeights[0],light:t.fontWeights[1],regular:t.fontWeights[3],semibold:t.fontWeights[5],bold:t.fontWeights[8]},lineHeights:{...t.lineHeights,r:t.lineHeights[0],m:t.lineHeights[1],l:t.lineHeights[2],xl:t.lineHeights[3]},letterSpacings:{normal:t.letterSpacings[0],tracked:t.letterSpacings[1],tight:t.letterSpacings[2],mega:t.letterSpacings[3]},fonts:{...t.fonts,default:t.fonts[0]},colors:{neutral:{"000":t.colors.neutral[0],"050":t.colors.neutral[1],"080":t.colors.neutral[2],100:t.colors.neutral[3],200:t.colors.neutral[4],300:t.colors.neutral[5],400:t.colors.neutral[6],500:t.colors.neutral[7],600:t.colors.neutral[8],700:t.colors.neutral[9],800:t.colors.neutral[10]},brand:{100:t.colors.brand[0],200:t.colors.brand[1],300:t.colors.brand[2],400:t.colors.brand[3],500:t.colors.brand[4],600:t.colors.brand[5],700:t.colors.brand[6],800:t.colors.brand[7]},success:{300:t.colors.success[0],900:t.colors.success[1]},warning:{400:t.colors.warning[0],500:t.colors.warning[1],600:t.colors.warning[1],900:t.colors.warning[2]},danger:{200:t.colors.danger[0],900:t.colors.danger[1]}},shadows:{xs:t.shadows[0],s:t.shadows[1],m:t.shadows[2],l:t.shadows[3],xl:t.shadows[4]},breakpoints:{...t.breakpoints,small:t.breakpoints[0],medium:t.breakpoints[1],large:t.breakpoints[2]},media:Kr({small:t.breakpoints[0],medium:t.breakpoints[1],large:t.breakpoints[2]}),zIndex:{dialog:t.zIndex[0],popper:t.zIndex[1],tooltip:t.zIndex[2],backdrop:t.zIndex[3],loader:t.zIndex[4]},states:{_:t.states[0],motionSafe:t.states[1],motionReduce:t.states[2],first:t.states[3],last:t.states[4],odd:t.states[5],even:t.states[6],visited:t.states[7],checked:t.states[8],focusWithin:t.states[9],hover:t.states[10],focus:t.states[11],focusVisible:t.states[12],active:t.states[13],disabled:t.states[14],placeholder:t.states[15]}}),Xr=((t=Se())=>()=>Yr(t))(),Gn=()=>{try{return window.parent.document,window.parent}catch{return window}},tr=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),wr=t=>Number(t.replace("px","")),Sr=()=>{const{width:t}=tr(),{breakpoints:n}=Xr();return t<=wr(n.small)?"small":t<=wr(n.medium)?"medium":"large"};var Zr=ee(7953),Jr=ee.n(Zr),Qr=ee(3546),_r=ee.n(Qr),qr=ee(6226),en=ee.n(qr),tn=ee(5346),rn=ee.n(tn),nn=ee(8469),Ar=ee.n(nn);const on=JSON.parse('{"appId":"microfe","activeEnv":"localhost","googleTagManager":true,"sessionTimeoutWarnInterval":"7200000","sessionTimeoutInterval":"9000000","microFrontendApps":{"loanapp":{"name":"Loan","hostUrl":"./loan","development":{"files":["index.js"]},"production":{"files":["index.js"]}},"taskapp":{"name":"Task","hostUrl":"./task","mode":"development","development":{"files":["index.dev.js"]},"production":{"files":["index.js"]}},"travelhub":{"name":"TravelHub","hostUrl":"./travelhub","development":{"files":["app.js","landing.js","app.css","landing.css"]},"production":{"files":["app.js","landing.js","app.css","landing.css"]}},"flights":{"name":"Flights","hostUrl":"./flights","development":{"files":["app.js","app.css"]},"production":{"files":["app.js","app.css"]}},"hotels":{"name":"Hotels","hostUrl":"./hotels","development":{"files":["app.js","app.css"]},"production":{"files":["app.js","app.css"]}}},"serviceEndpoints":{"api":"","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"},"env":{"localhost":{"serviceEndpoints":{"api":"","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"dev":{"serviceEndpoints":{"api":"https://dev.api.puiservice.rd.elliemae.io","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"dev2":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa":{"serviceEndpoints":{"api":"https://dev.api.puiservice.rd.elliemae.io","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa2":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa3":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"int":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-osb1":{"serviceEndpoints":{"api":"https://encompass-peg-api.elliemae.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-osb2":{"serviceEndpoints":{"api":"https://encompass-peg2-api.elliemae.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg":{"serviceEndpoints":{"api":"https://peg2-west.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-oapi-west":{"serviceEndpoints":{"api":"https://peg2-west.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-oapi-east":{"serviceEndpoints":{"api":"https://peg2-east.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg2-oapi-east":{"serviceEndpoints":{"api":"https://peg2-east.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg3":{"serviceEndpoints":{"api":"https://pel1.api.ellielabs.com","idp":"https://peg3.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"stage":{"serviceEndpoints":{"api":"https://stg.api.elliemae.com","idp":"https://stg.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"beta":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"demo":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"epc":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"prod":{"serviceEndpoints":{"api":"https://api.elliemae.com","idp":"https://idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}}}}'),bt="latest",rr=t=>t.replace(/([^:]\/)\/+/g,"$1"),Hn=t=>{const n=document.createElement("a");return n.href=t,n.href},Ut=t=>t?.replace?.(/\/?$/,"/"),sn=()=>window.navigator.userAgent.includes("jsdom");class an{#e=on;#t;#r;constructor(n){this.#t=n?.version||bt,this.#r=Ut(n?.baseUrl||"")}#n=n=>{const{activeEnv:o}=n,f=n.env[o]||{};n.env&&delete n.env,this.#e=Ar()(n,f)};get=(n="",o=null)=>Jr()(_r()(this.#e,n,o));set=(n,o)=>en()(this.#e,n,o);has=(n="")=>rn()(this.#e,n);load=async n=>{const o=this.#t.match(/^(?:\d+\.\d+)*/g),f=n??`${this.#r}${o&&o[0]||bt}/app.config.json`,y=await fetch(f);if(y.ok)try{const w=await y.json();this.#n(w)}catch(w){if(!n&&this.#t!==bt)await this.load(`${this.#r}latest/app.config.json`);else throw new Error("Failed to parse app config",{cause:w})}else{if(!n&&this.#t!==bt){await this.load(`${this.#r}latest/app.config.json`);return}throw new Error("Failed to load app config")}}}const cn="microFrontendApps",ln=()=>!0,un=t=>ln()?!0:t?t==="production":!0,pn=t=>t?new URL(t).pathname:"",fn=t=>{const n=document.createElement("a");return n.href=t,n.href},dn=(t,n)=>{const o=n.match(/^(?:\d+\.\d+)*/g);return t.replace(/{SYSTEM_VERSION}/,o&&o[0]||bt)},Or=t=>!t||!t.length?!1:t.every(n=>typeof n=="string"),hn=(t,n)=>{const{mode:o="production"}=n;if(o!=="production"&&o!=="development")throw new Error(`invalid mode '${o}' for ${t}`);const{production:f,development:y}=n;if(o==="production"){if(!f)throw new Error(`microFrontendApps.${t} is missing production section in app.config.json`);if(!Or(f.files))throw new Error("invalid value for production.files")}if(o==="development"){if(!y)throw new Error(`microFrontendApps.${t} is missing development section in app.config.json`);if(!Or(y.files))throw new Error("invalid value for development.files")}},gn=({id:t,config:n,version:o="latest"})=>{const{mode:f="production"}=n,y=un(f)?n.production:n.development;n.production&&delete n.production,n.development&&delete n.development;const w=Ar()({id:t},{name:t,mode:"production",manifestPath:"./{SYSTEM_VERSION}/",securityContext:u.USER},n,y);return w.hostUrl=Ut(fn(w.hostUrl||"")),w.homeRoute=Ut(w.homeRoute)||pn(w.hostUrl),w.manifestPath=Ut(dn(w.manifestPath,o)),w};class mn{#e=[];init=({version:n,appConfig:o})=>{const f=o.get(cn);if(!f)throw new Error("app.config.json is missing microFrontendApps section");this.#e=Object.keys(f).map(y=>(hn(y,f[y]),gn({id:y,config:f[y],version:n})))};getConfigById=n=>this.#e.find(o=>o.id===n)}const vn="ice-script-",yn=/(?:emuiDiagnostics|global|global-prod|emuiUserMonitoring)(?:..*)?.js/,bn=t=>!yn.test(t);class xn{#e;constructor(n){this.#e=n}add=({name:n,hostUrl:o,documentEle:f,fileName:y,index:w})=>new Promise((C,I)=>{const z=new URL(y,o),D=f.createElement("script");D.id=`${vn}${n.toLowerCase()}-${w}`,D.src=rr(z.href),D.onload=C.bind(null,D.id),D.onerror=K=>{I(new Error(`Unable to load script ${D.src}`,{cause:new Error(K)}))},D.async=!1,!sn()&&bn(D.src)&&(D.defer=!0),f.head.appendChild(D)});remove=(n="",o=document)=>new Promise(f=>{const y=o.getElementById(n);y||(this.#e.warn(`script with id ${n} not found`),f()),y.remove(),f()});removeDynamicImportedScripts=(n,o)=>{const f=new RegExp(n,"i"),y=o.getElementsByTagName("script");for(let w=y.length-1;w>=0;w-=1){const C=y[w],{src:I}=C;f.test(I)&&C.remove()}};removePrefetchLinks=(n,o)=>{const f=new RegExp(n,"i"),y=o.querySelectorAll('[rel="prefetch"]');for(let w=y.length-1;w>=0;w-=1){const C=y[w],{href:I}=C;f.test(I)&&C.remove()}}}const wn="ice-style-";class Sn{#e;constructor(n){this.#e=n}add=({name:n,hostUrl:o,documentEle:f,fileName:y,index:w})=>new Promise((C,I)=>{const z=f.createElement("link");z.id=`${wn}${n.toLowerCase()}-${w}`,z.rel="stylesheet";const D=new URL(y,o);z.href=rr(D.href),z.onload=C.bind(null,z.id),z.onerror=K=>{I(new Error(`Unable to load stylesheet ${z.href}`,{cause:new Error(K)}))},f.head.appendChild(z)});remove=(n="",o=document)=>new Promise(f=>{const y=o.getElementById(n);y||(this.#e.warn(`style with id ${n} not found`),f()),y.remove(),f()});removeDynamicImportedStyles=(n,o)=>{const f=new RegExp(n,"i"),y=o.querySelectorAll('[rel="stylesheet"]');for(let w=y.length-1;w>=0;w-=1){const C=y[w],{href:I}=C;f.test(I)&&C.remove()}}}const Er=t=>t.replace(/\/\d+\.\d+/,"/latest"),An=t=>{let n;try{n=new URL(t)}catch{return!1}return n.protocol==="http:"||n.protocol==="https:"},Cr=async({hostUrl:t,manifestPath:n})=>{const o=new URL(`${n}manifest.json`,t),f=await fetch(rr(o.href));if(f.ok){const{headers:w}=f;if((w?.get?.("content-type")??"").includes("application/json"))return await f.json();throw new Error(`manifest ${o.href} is not a valid json`)}const y=Er(n);if(n!==y)return Cr({hostUrl:t,manifestPath:Er(n)});throw new Error(`unable to get manifest ${o.href}`)},jr={get:Cr,getFullFileNameofAssets:(t,n=[])=>n.reduce((o,f)=>{const y=t[f];if(y)o.push(y);else if(An(f))o.push(f);else throw new Error(`unable to locate ${f} in manifest`);return o},[])};class On{#e;#t;#r;#n;#o;constructor(n){this.#t=n.guest,this.#e=n.logger,this.#r=n?.version||bt,this.#n=n.soManager,this.#o=n.eventManager}addEventListener=n=>this.#o.subscribe(n);get version(){return this.#r}getObject=n=>Promise.resolve(this.#n.getObject(n,this.#t));removeEventListener=n=>{this.#o.unsubscribe(n)};setAppWindowSize=n=>{const{appId:o,size:f}=n,y=document.getElementById(`${P}${o}`);y&&(y.style.height=`${f.height}px`)};subscribe=(n,o)=>(0,v.subscribe)(n,o);unsubscribe=n=>{(0,v.unsubscribe)(n)}}const Tr="pui-app-container-",En=/\.css$/,Cn=t=>En.test(t);class jn{#e;#t;#r;#n;#o;#s=new mn;#i;#c;#a=new Map;constructor(n){const{logger:o}=n;if(!o)throw new Error("logger is required");this.#e=n.logger,this.#t=n.version,this.#o=new an({version:n.version,baseUrl:n.appConfigBaseUrl}),this.#r=new xn(o),this.#n=new Sn(o),this.#i=new x,this.#c=new he}#f=(n,o=document)=>{const{elementIds:f}=this.#a.get(n)||{};f&&f.forEach(y=>{const w=o.getElementById(y);w&&w.remove()})};#d=(n,o,f)=>{const y=window.emui?.[n]||{};this.#a.set(n,{elementIds:f,guest:{guestWindow:o?.defaultView,...y}})};#h=(n,o)=>{const{id:f,name:y,hostUrl:w,manifestPath:C,homeRoute:I,history:z,theme:D,documentEle:K}=n;return Promise.all(o).then(this.#d.bind(null,f,K)).then(this.#g.bind(null,{id:f,name:y,hostUrl:w,manifestPath:C,homeRoute:I,history:z,theme:D})).catch(Q=>{const ae=`Application load failed. Unable to load one or more resources for appId: ${n.id}. ${Q.message}`;throw this.#e.error({message:ae,appId:n.id,exception:Q}),new Error(ae)})};#g=async({id:n,name:o,hostUrl:f,manifestPath:y,homeRoute:w,history:C,theme:I})=>{const z=window.emui?.[n];if(!z)throw new Error(`Application ${o} with ${n} is not found. Most probably the appId property of app.config.json is not set to ${n}`);if(!z.init||typeof z.init!="function")throw new Error(`Application ${o} with id ${n} doesn't expose init method`);const D=new On({guest:{id:n},version:this.#t,logger:this.#e,soManager:this.#i,eventManager:this.#c});return z.init({host:D,hostUrl:f,manifestPath:y,homeRoute:w,prevState:null,history:C,theme:I,hostBreakpoint:Sr(),hostViewportSize:tr(),logger:this.#e})};#m=async n=>{const{id:o,files:f,name:y,hostUrl:w,documentEle:C}=n;this.#e.debug(`Application ${o} is loading...`);let I=f;const z=await jr.get(n);I=jr.getFullFileNameofAssets(z,f);let D=0;const K=I.map(Q=>{D+=1;const ae={name:y,hostUrl:w,documentEle:C,fileName:Q,index:D};return Cn(Q)?this.#n.add(ae):this.#r.add(ae)});await this.#h(n,K),this.#e.audit({message:"Application loaded",appId:o})};#l=({id:n,hostUrl:o,documentEle:f})=>{this.#e.debug(`Application ${n} unloading...`),window.emui?.[n]&&(this.#f(n,f),this.#r.removeDynamicImportedScripts(o,f),this.#r.removePrefetchLinks(o,f),this.#n.removeDynamicImportedStyles(o,f),window.emui?.[n]&&delete window.emui[n],this.#a.delete(n),this.#e.info({message:"Application unloaded",appId:n}))};#u=async({id:n,name:o})=>{const f=window.emui?.[n]||{};if(!f?.mount||typeof f?.mount!="function")throw new Error(`Application ${o} with id ${n} doesn't expose mount method`);return f.mount({containerId:`${Tr}${n}`,hostBreakpoint:Sr(),hostViewportSize:tr()})};#p=({id:n,name:o})=>{const f=window.emui?.[n]||{};if(!f?.unmount)return null;if(typeof f.unmount!="function")throw new Error(`Application ${o} with id ${n} doesn't expose unmount method`);return f.unmount({containerId:`${Tr}${n}`})};addScriptingObject=(n,o)=>{this.#i.addScriptingObject(n,o)};closeAllApps=async()=>{await Promise.all([...this.#a.keys()].map(this.closeApp))};closeApp=async n=>{if(!n)throw new Error("id is required");const o=this.#s.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);const{name:f,hostUrl:y}=o;try{await this.#p({id:n,name:f})}finally{const w=we.get(n);if(!w?.contentDocument)throw new Error(`Iframe for application with id ${n} is not found`);this.#l({id:n,hostUrl:y,documentEle:w.contentDocument}),this.#i.removeAllScriptingObjects(n),we.remove(n)}};dispatchEvent=async n=>this.#c.dispatchEvent(n);getGuest=n=>this.#a.get(n)?.guest;getGuests=()=>[...this.#a.values()].map(n=>n.guest);init=async()=>{await this.#o.load(),this.#s.init({version:this.#t,appConfig:this.#o})};mountApp=async n=>{if(!n)throw new Error("id is required");const o=this.#s.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);await this.#u(o)};openApp=async n=>{const{id:o,frameOptions:f,history:y,theme:w}=n,C=this.#s.getConfigById(o);if(!C)throw new Error(`Application with id ${o} is not found`);if(we.get(o))throw new Error(`Application with id ${o} is already open`);const I=await we.create(o,{title:C.name,...f});if(!I?.contentDocument)throw new Error("unable to create iframe for the microapp");try{return await this.#m({...C,history:y,theme:w,documentEle:I.contentDocument}),await this.#u(C),this.#a.get(o)?.guest}catch(z){throw this.#l({id:o,hostUrl:C.hostUrl,documentEle:I.contentDocument}),we.remove(o),z}};publish=(n,o)=>(0,v.publish)(n,o);removeAllEventListeners=()=>{this.#c.unsubscribeAll()};removeScriptingObject=n=>{this.#i.removeScriptingObject(n)};unmountApp=async n=>{if(!n)throw new Error("id is required");const o=this.#s.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);await this.#p(o)}}})(),Gt})());
|
|
23
23
|
|
|
24
|
-
//# sourceMappingURL=emuiAppBridge.
|
|
24
|
+
//# sourceMappingURL=emuiAppBridge.da937d9d01527da3925b.js.map
|
|
Binary file
|
|
Binary file
|