@dcloudio/uni-vue-devtools 3.0.0-3061320221209001

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,3958 @@
1
+ /******/ var __webpack_modules__ = ({
2
+
3
+ /***/ "../app-backend-core/lib/hook.js":
4
+ /*!***************************************!*\
5
+ !*** ../app-backend-core/lib/hook.js ***!
6
+ \***************************************/
7
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8
+
9
+ // this script is injected into every page.
10
+
11
+ Object.defineProperty(exports, "__esModule", ({
12
+ value: true
13
+ }));
14
+ exports.installHook = void 0;
15
+ /**
16
+ * Install the hook on window, which is an event emitter.
17
+ * Note because Chrome content scripts cannot directly modify the window object,
18
+ * we are evaling this function by inserting a script tag. That's why we have
19
+ * to inline the whole event emitter implementation here.
20
+ *
21
+ * @param {Window|global} target
22
+ */
23
+
24
+ function installHook(target, isIframe = false) {
25
+ const devtoolsVersion = '6.0';
26
+ let listeners = {};
27
+
28
+ function injectIframeHook(iframe) {
29
+ if (iframe.__vdevtools__injected) return;
30
+
31
+ try {
32
+ iframe.__vdevtools__injected = true;
33
+
34
+ const inject = () => {
35
+ try {
36
+ iframe.contentWindow.__VUE_DEVTOOLS_IFRAME__ = iframe;
37
+ const script = iframe.contentDocument.createElement('script');
38
+ script.textContent = ';(' + installHook.toString() + ')(window, true)';
39
+ iframe.contentDocument.documentElement.appendChild(script);
40
+ script.parentNode.removeChild(script);
41
+ } catch (e) {// Ignore
42
+ }
43
+ };
44
+
45
+ inject();
46
+ iframe.addEventListener('load', () => inject());
47
+ } catch (e) {// Ignore
48
+ }
49
+ }
50
+
51
+ let iframeChecks = 0;
52
+
53
+ function injectToIframes() {
54
+ if (typeof window === 'undefined') return;
55
+ const iframes = document.querySelectorAll('iframe:not([data-vue-devtools-ignore])');
56
+
57
+ for (const iframe of iframes) {
58
+ injectIframeHook(iframe);
59
+ }
60
+ }
61
+
62
+ injectToIframes();
63
+ const iframeTimer = setInterval(() => {
64
+ injectToIframes();
65
+ iframeChecks++;
66
+
67
+ if (iframeChecks >= 5) {
68
+ clearInterval(iframeTimer);
69
+ }
70
+ }, 1000);
71
+
72
+ if (Object.prototype.hasOwnProperty.call(target, '__VUE_DEVTOOLS_GLOBAL_HOOK__')) {
73
+ if (target.__VUE_DEVTOOLS_GLOBAL_HOOK__.devtoolsVersion !== devtoolsVersion) {
74
+ console.error(`Another version of Vue Devtools seems to be installed. Please enable only one version at a time.`);
75
+ }
76
+
77
+ return;
78
+ }
79
+
80
+ let hook;
81
+
82
+ if (isIframe) {
83
+ const sendToParent = cb => {
84
+ try {
85
+ const hook = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
86
+
87
+ if (hook) {
88
+ return cb(hook);
89
+ } else {
90
+ console.warn('[Vue Devtools] No hook in parent window');
91
+ }
92
+ } catch (e) {
93
+ console.warn('[Vue Devtools] Failed to send message to parent window', e);
94
+ }
95
+ };
96
+
97
+ hook = {
98
+ devtoolsVersion,
99
+
100
+ // eslint-disable-next-line accessor-pairs
101
+ set Vue(value) {
102
+ sendToParent(hook => {
103
+ hook.Vue = value;
104
+ });
105
+ },
106
+
107
+ // eslint-disable-next-line accessor-pairs
108
+ set enabled(value) {
109
+ sendToParent(hook => {
110
+ hook.enabled = value;
111
+ });
112
+ },
113
+
114
+ on(event, fn) {
115
+ sendToParent(hook => hook.on(event, fn));
116
+ },
117
+
118
+ once(event, fn) {
119
+ sendToParent(hook => hook.once(event, fn));
120
+ },
121
+
122
+ off(event, fn) {
123
+ sendToParent(hook => hook.off(event, fn));
124
+ },
125
+
126
+ emit(event, ...args) {
127
+ sendToParent(hook => hook.emit(event, ...args));
128
+ },
129
+
130
+ cleanupBuffer(matchArg) {
131
+ var _a;
132
+
133
+ return (_a = sendToParent(hook => hook.cleanupBuffer(matchArg))) !== null && _a !== void 0 ? _a : false;
134
+ }
135
+
136
+ };
137
+ } else {
138
+ hook = {
139
+ devtoolsVersion,
140
+ Vue: null,
141
+ enabled: undefined,
142
+ _buffer: [],
143
+ store: null,
144
+ initialState: null,
145
+ storeModules: null,
146
+ flushStoreModules: null,
147
+ apps: [],
148
+
149
+ _replayBuffer(event) {
150
+ const buffer = this._buffer;
151
+ this._buffer = [];
152
+
153
+ for (let i = 0, l = buffer.length; i < l; i++) {
154
+ const allArgs = buffer[i];
155
+ allArgs[0] === event // eslint-disable-next-line prefer-spread
156
+ ? this.emit.apply(this, allArgs) : this._buffer.push(allArgs);
157
+ }
158
+ },
159
+
160
+ on(event, fn) {
161
+ const $event = '$' + event;
162
+
163
+ if (listeners[$event]) {
164
+ listeners[$event].push(fn);
165
+ } else {
166
+ listeners[$event] = [fn];
167
+
168
+ this._replayBuffer(event);
169
+ }
170
+ },
171
+
172
+ once(event, fn) {
173
+ const on = (...args) => {
174
+ this.off(event, on);
175
+ return fn.apply(this, args);
176
+ };
177
+
178
+ this.on(event, on);
179
+ },
180
+
181
+ off(event, fn) {
182
+ event = '$' + event;
183
+
184
+ if (!arguments.length) {
185
+ listeners = {};
186
+ } else {
187
+ const cbs = listeners[event];
188
+
189
+ if (cbs) {
190
+ if (!fn) {
191
+ listeners[event] = null;
192
+ } else {
193
+ for (let i = 0, l = cbs.length; i < l; i++) {
194
+ const cb = cbs[i];
195
+
196
+ if (cb === fn || cb.fn === fn) {
197
+ cbs.splice(i, 1);
198
+ break;
199
+ }
200
+ }
201
+ }
202
+ }
203
+ }
204
+ },
205
+
206
+ emit(event, ...args) {
207
+ const $event = '$' + event;
208
+ let cbs = listeners[$event];
209
+
210
+ if (cbs) {
211
+ cbs = cbs.slice();
212
+
213
+ for (let i = 0, l = cbs.length; i < l; i++) {
214
+ try {
215
+ const result = cbs[i].apply(this, args);
216
+
217
+ if (typeof (result === null || result === void 0 ? void 0 : result.catch) === 'function') {
218
+ result.catch(e => {
219
+ console.error(`[Hook] Error in async event handler for ${event} with args:`, args);
220
+ console.error(e);
221
+ });
222
+ }
223
+ } catch (e) {
224
+ console.error(`[Hook] Error in event handler for ${event} with args:`, args);
225
+ console.error(e);
226
+ }
227
+ }
228
+ } else {
229
+ this._buffer.push([event, ...args]);
230
+ }
231
+ },
232
+
233
+ /**
234
+ * Remove buffered events with any argument that is equal to the given value.
235
+ * @param matchArg Given value to match.
236
+ */
237
+ cleanupBuffer(matchArg) {
238
+ let wasBuffered = false;
239
+ this._buffer = this._buffer.filter(item => {
240
+ if (item.some(arg => arg === matchArg)) {
241
+ wasBuffered = true;
242
+ return false;
243
+ }
244
+
245
+ return true;
246
+ });
247
+ return wasBuffered;
248
+ }
249
+
250
+ };
251
+ hook.once('init', Vue => {
252
+ hook.Vue = Vue;
253
+
254
+ if (Vue) {
255
+ Vue.prototype.$inspect = function () {
256
+ const fn = target.__VUE_DEVTOOLS_INSPECT__;
257
+ fn && fn(this);
258
+ };
259
+ }
260
+ });
261
+ hook.on('app:init', (app, version, types) => {
262
+ const appRecord = {
263
+ app,
264
+ version,
265
+ types
266
+ };
267
+ hook.apps.push(appRecord);
268
+ hook.emit('app:add', appRecord);
269
+ });
270
+ hook.once('vuex:init', store => {
271
+ hook.store = store;
272
+ hook.initialState = clone(store.state);
273
+ const origReplaceState = store.replaceState.bind(store);
274
+
275
+ store.replaceState = state => {
276
+ hook.initialState = clone(state);
277
+ origReplaceState(state);
278
+ }; // Dynamic modules
279
+
280
+
281
+ let origRegister, origUnregister;
282
+
283
+ if (store.registerModule) {
284
+ hook.storeModules = [];
285
+ origRegister = store.registerModule.bind(store);
286
+
287
+ store.registerModule = (path, module, options) => {
288
+ if (typeof path === 'string') path = [path];
289
+ hook.storeModules.push({
290
+ path,
291
+ module,
292
+ options
293
+ });
294
+ origRegister(path, module, options);
295
+
296
+ if (true) {
297
+ // eslint-disable-next-line no-console
298
+ console.log('early register module', path, module, options);
299
+ }
300
+ };
301
+
302
+ origUnregister = store.unregisterModule.bind(store);
303
+
304
+ store.unregisterModule = path => {
305
+ if (typeof path === 'string') path = [path];
306
+ const key = path.join('/');
307
+ const index = hook.storeModules.findIndex(m => m.path.join('/') === key);
308
+ if (index !== -1) hook.storeModules.splice(index, 1);
309
+ origUnregister(path);
310
+
311
+ if (true) {
312
+ // eslint-disable-next-line no-console
313
+ console.log('early unregister module', path);
314
+ }
315
+ };
316
+ }
317
+
318
+ hook.flushStoreModules = () => {
319
+ store.replaceState = origReplaceState;
320
+
321
+ if (store.registerModule) {
322
+ store.registerModule = origRegister;
323
+ store.unregisterModule = origUnregister;
324
+ }
325
+
326
+ return hook.storeModules || [];
327
+ };
328
+ });
329
+ }
330
+
331
+ if (false) {}
332
+
333
+ Object.defineProperty(target, '__VUE_DEVTOOLS_GLOBAL_HOOK__', {
334
+ get() {
335
+ return hook;
336
+ }
337
+
338
+ }); // Handle apps initialized before hook injection
339
+
340
+ if (target.__VUE_DEVTOOLS_HOOK_REPLAY__) {
341
+ try {
342
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__.forEach(cb => cb(hook));
343
+
344
+ target.__VUE_DEVTOOLS_HOOK_REPLAY__ = [];
345
+ } catch (e) {
346
+ console.error('[vue-devtools] Error during hook replay', e);
347
+ }
348
+ } // Clone deep utility for cloning initial state of the store
349
+ // Forked from https://github.com/planttheidea/fast-copy
350
+ // Last update: 2019-10-30
351
+ // ⚠️ Don't forget to update `./hook.js`
352
+ // utils
353
+
354
+
355
+ const {
356
+ toString: toStringFunction
357
+ } = Function.prototype;
358
+ const {
359
+ create,
360
+ defineProperty,
361
+ getOwnPropertyDescriptor,
362
+ getOwnPropertyNames,
363
+ getOwnPropertySymbols,
364
+ getPrototypeOf
365
+ } = Object;
366
+ const {
367
+ hasOwnProperty,
368
+ propertyIsEnumerable
369
+ } = Object.prototype;
370
+ /**
371
+ * @enum
372
+ *
373
+ * @const {Object} SUPPORTS
374
+ *
375
+ * @property {boolean} SYMBOL_PROPERTIES are symbol properties supported
376
+ * @property {boolean} WEAKSET is WeakSet supported
377
+ */
378
+
379
+ const SUPPORTS = {
380
+ SYMBOL_PROPERTIES: typeof getOwnPropertySymbols === 'function',
381
+ WEAKSET: typeof WeakSet === 'function'
382
+ };
383
+ /**
384
+ * @function createCache
385
+ *
386
+ * @description
387
+ * get a new cache object to prevent circular references
388
+ *
389
+ * @returns the new cache object
390
+ */
391
+
392
+ const createCache = () => {
393
+ if (SUPPORTS.WEAKSET) {
394
+ return new WeakSet();
395
+ }
396
+
397
+ const object = create({
398
+ add: value => object._values.push(value),
399
+ has: value => !!~object._values.indexOf(value)
400
+ });
401
+ object._values = [];
402
+ return object;
403
+ };
404
+ /**
405
+ * @function getCleanClone
406
+ *
407
+ * @description
408
+ * get an empty version of the object with the same prototype it has
409
+ *
410
+ * @param object the object to build a clean clone from
411
+ * @param realm the realm the object resides in
412
+ * @returns the empty cloned object
413
+ */
414
+
415
+
416
+ const getCleanClone = (object, realm) => {
417
+ if (!object.constructor) {
418
+ return create(null);
419
+ } // eslint-disable-next-line no-proto
420
+
421
+
422
+ const prototype = object.__proto__ || getPrototypeOf(object);
423
+
424
+ if (object.constructor === realm.Object) {
425
+ return prototype === realm.Object.prototype ? {} : create(prototype);
426
+ }
427
+
428
+ if (~toStringFunction.call(object.constructor).indexOf('[native code]')) {
429
+ try {
430
+ return new object.constructor();
431
+ } catch (e) {// Error
432
+ }
433
+ }
434
+
435
+ return create(prototype);
436
+ };
437
+ /**
438
+ * @function getObjectCloneLoose
439
+ *
440
+ * @description
441
+ * get a copy of the object based on loose rules, meaning all enumerable keys
442
+ * and symbols are copied, but property descriptors are not considered
443
+ *
444
+ * @param object the object to clone
445
+ * @param realm the realm the object resides in
446
+ * @param handleCopy the function that handles copying the object
447
+ * @returns the copied object
448
+ */
449
+
450
+
451
+ const getObjectCloneLoose = (object, realm, handleCopy, cache) => {
452
+ const clone = getCleanClone(object, realm);
453
+
454
+ for (const key in object) {
455
+ if (hasOwnProperty.call(object, key)) {
456
+ clone[key] = handleCopy(object[key], cache);
457
+ }
458
+ }
459
+
460
+ if (SUPPORTS.SYMBOL_PROPERTIES) {
461
+ const symbols = getOwnPropertySymbols(object);
462
+
463
+ if (symbols.length) {
464
+ for (let index = 0, symbol; index < symbols.length; index++) {
465
+ symbol = symbols[index];
466
+
467
+ if (propertyIsEnumerable.call(object, symbol)) {
468
+ clone[symbol] = handleCopy(object[symbol], cache);
469
+ }
470
+ }
471
+ }
472
+ }
473
+
474
+ return clone;
475
+ };
476
+ /**
477
+ * @function getObjectCloneStrict
478
+ *
479
+ * @description
480
+ * get a copy of the object based on strict rules, meaning all keys and symbols
481
+ * are copied based on the original property descriptors
482
+ *
483
+ * @param object the object to clone
484
+ * @param realm the realm the object resides in
485
+ * @param handleCopy the function that handles copying the object
486
+ * @returns the copied object
487
+ */
488
+
489
+
490
+ const getObjectCloneStrict = (object, realm, handleCopy, cache) => {
491
+ const clone = getCleanClone(object, realm);
492
+ const properties = SUPPORTS.SYMBOL_PROPERTIES ? [].concat(getOwnPropertyNames(object), getOwnPropertySymbols(object)) : getOwnPropertyNames(object);
493
+
494
+ if (properties.length) {
495
+ for (let index = 0, property, descriptor; index < properties.length; index++) {
496
+ property = properties[index];
497
+
498
+ if (property !== 'callee' && property !== 'caller') {
499
+ descriptor = getOwnPropertyDescriptor(object, property);
500
+ descriptor.value = handleCopy(object[property], cache);
501
+ defineProperty(clone, property, descriptor);
502
+ }
503
+ }
504
+ }
505
+
506
+ return clone;
507
+ };
508
+ /**
509
+ * @function getRegExpFlags
510
+ *
511
+ * @description
512
+ * get the flags to apply to the copied regexp
513
+ *
514
+ * @param regExp the regexp to get the flags of
515
+ * @returns the flags for the regexp
516
+ */
517
+
518
+
519
+ const getRegExpFlags = regExp => {
520
+ let flags = '';
521
+
522
+ if (regExp.global) {
523
+ flags += 'g';
524
+ }
525
+
526
+ if (regExp.ignoreCase) {
527
+ flags += 'i';
528
+ }
529
+
530
+ if (regExp.multiline) {
531
+ flags += 'm';
532
+ }
533
+
534
+ if (regExp.unicode) {
535
+ flags += 'u';
536
+ }
537
+
538
+ if (regExp.sticky) {
539
+ flags += 'y';
540
+ }
541
+
542
+ return flags;
543
+ };
544
+
545
+ const {
546
+ isArray
547
+ } = Array;
548
+
549
+ const GLOBAL_THIS = (() => {
550
+ if (typeof self !== 'undefined') {
551
+ return self;
552
+ }
553
+
554
+ if (typeof window !== 'undefined') {
555
+ return window;
556
+ }
557
+
558
+ if (typeof __webpack_require__.g !== 'undefined') {
559
+ return __webpack_require__.g;
560
+ }
561
+
562
+ if (console && console.error) {
563
+ console.error('Unable to locate global object, returning "this".');
564
+ }
565
+ })();
566
+ /**
567
+ * @function clone
568
+ *
569
+ * @description
570
+ * copy an object deeply as much as possible
571
+ *
572
+ * If `strict` is applied, then all properties (including non-enumerable ones)
573
+ * are copied with their original property descriptors on both objects and arrays.
574
+ *
575
+ * The object is compared to the global constructors in the `realm` provided,
576
+ * and the native constructor is always used to ensure that extensions of native
577
+ * objects (allows in ES2015+) are maintained.
578
+ *
579
+ * @param object the object to copy
580
+ * @param [options] the options for copying with
581
+ * @param [options.isStrict] should the copy be strict
582
+ * @param [options.realm] the realm (this) object the object is copied from
583
+ * @returns the copied object
584
+ */
585
+
586
+
587
+ function clone(object, options = null) {
588
+ // manually coalesced instead of default parameters for performance
589
+ const isStrict = !!(options && options.isStrict);
590
+ const realm = options && options.realm || GLOBAL_THIS;
591
+ const getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;
592
+ /**
593
+ * @function handleCopy
594
+ *
595
+ * @description
596
+ * copy the object recursively based on its type
597
+ *
598
+ * @param object the object to copy
599
+ * @returns the copied object
600
+ */
601
+
602
+ const handleCopy = (object, cache) => {
603
+ if (!object || typeof object !== 'object' || cache.has(object)) {
604
+ return object;
605
+ } // DOM objects
606
+
607
+
608
+ if (typeof HTMLElement !== 'undefined' && object instanceof HTMLElement) {
609
+ return object.cloneNode(false);
610
+ }
611
+
612
+ const Constructor = object.constructor; // plain objects
613
+
614
+ if (Constructor === realm.Object) {
615
+ cache.add(object);
616
+ return getObjectClone(object, realm, handleCopy, cache);
617
+ }
618
+
619
+ let clone; // arrays
620
+
621
+ if (isArray(object)) {
622
+ cache.add(object); // if strict, include non-standard properties
623
+
624
+ if (isStrict) {
625
+ return getObjectCloneStrict(object, realm, handleCopy, cache);
626
+ }
627
+
628
+ clone = new Constructor();
629
+
630
+ for (let index = 0; index < object.length; index++) {
631
+ clone[index] = handleCopy(object[index], cache);
632
+ }
633
+
634
+ return clone;
635
+ } // dates
636
+
637
+
638
+ if (object instanceof realm.Date) {
639
+ return new Constructor(object.getTime());
640
+ } // regexps
641
+
642
+
643
+ if (object instanceof realm.RegExp) {
644
+ clone = new Constructor(object.source, object.flags || getRegExpFlags(object));
645
+ clone.lastIndex = object.lastIndex;
646
+ return clone;
647
+ } // maps
648
+
649
+
650
+ if (realm.Map && object instanceof realm.Map) {
651
+ cache.add(object);
652
+ clone = new Constructor();
653
+ object.forEach((value, key) => {
654
+ clone.set(key, handleCopy(value, cache));
655
+ });
656
+ return clone;
657
+ } // sets
658
+
659
+
660
+ if (realm.Set && object instanceof realm.Set) {
661
+ cache.add(object);
662
+ clone = new Constructor();
663
+ object.forEach(value => {
664
+ clone.add(handleCopy(value, cache));
665
+ });
666
+ return clone;
667
+ } // buffers (node-only)
668
+
669
+
670
+ if (realm.Buffer && realm.Buffer.isBuffer(object)) {
671
+ clone = realm.Buffer.allocUnsafe ? realm.Buffer.allocUnsafe(object.length) : new Constructor(object.length);
672
+ object.copy(clone);
673
+ return clone;
674
+ } // arraybuffers / dataviews
675
+
676
+
677
+ if (realm.ArrayBuffer) {
678
+ // dataviews
679
+ if (realm.ArrayBuffer.isView(object)) {
680
+ return new Constructor(object.buffer.slice(0));
681
+ } // arraybuffers
682
+
683
+
684
+ if (object instanceof realm.ArrayBuffer) {
685
+ return object.slice(0);
686
+ }
687
+ } // if the object cannot / should not be cloned, don't
688
+
689
+
690
+ if ( // promise-like
691
+ hasOwnProperty.call(object, 'then') && typeof object.then === 'function' || // errors
692
+ object instanceof Error || // weakmaps
693
+ realm.WeakMap && object instanceof realm.WeakMap || // weaksets
694
+ realm.WeakSet && object instanceof realm.WeakSet) {
695
+ return object;
696
+ }
697
+
698
+ cache.add(object); // assume anything left is a custom constructor
699
+
700
+ return getObjectClone(object, realm, handleCopy, cache);
701
+ };
702
+
703
+ return handleCopy(object, createCache());
704
+ }
705
+ }
706
+
707
+ exports.installHook = installHook;
708
+
709
+ /***/ }),
710
+
711
+ /***/ "../shared-utils/lib/backend.js":
712
+ /*!**************************************!*\
713
+ !*** ../shared-utils/lib/backend.js ***!
714
+ \**************************************/
715
+ /***/ ((__unused_webpack_module, exports) => {
716
+
717
+
718
+
719
+ Object.defineProperty(exports, "__esModule", ({
720
+ value: true
721
+ }));
722
+ exports.getCatchedGetters = exports.getCustomStoreDetails = exports.getCustomRouterDetails = exports.isVueInstance = exports.getCustomObjectDetails = exports.getCustomInstanceDetails = exports.getInstanceMap = exports.backendInjections = void 0;
723
+ exports.backendInjections = {
724
+ instanceMap: new Map(),
725
+ isVueInstance: () => false,
726
+ getCustomInstanceDetails: () => ({}),
727
+ getCustomObjectDetails: () => undefined
728
+ };
729
+
730
+ function getInstanceMap() {
731
+ return exports.backendInjections.instanceMap;
732
+ }
733
+
734
+ exports.getInstanceMap = getInstanceMap;
735
+
736
+ function getCustomInstanceDetails(instance) {
737
+ return exports.backendInjections.getCustomInstanceDetails(instance);
738
+ }
739
+
740
+ exports.getCustomInstanceDetails = getCustomInstanceDetails;
741
+
742
+ function getCustomObjectDetails(value, proto) {
743
+ return exports.backendInjections.getCustomObjectDetails(value, proto);
744
+ }
745
+
746
+ exports.getCustomObjectDetails = getCustomObjectDetails;
747
+
748
+ function isVueInstance(value) {
749
+ return exports.backendInjections.isVueInstance(value);
750
+ }
751
+
752
+ exports.isVueInstance = isVueInstance; // @TODO refactor
753
+
754
+ function getCustomRouterDetails(router) {
755
+ return {
756
+ _custom: {
757
+ type: 'router',
758
+ display: 'VueRouter',
759
+ value: {
760
+ options: router.options,
761
+ currentRoute: router.currentRoute
762
+ },
763
+ fields: {
764
+ abstract: true
765
+ }
766
+ }
767
+ };
768
+ }
769
+
770
+ exports.getCustomRouterDetails = getCustomRouterDetails; // @TODO refactor
771
+
772
+ function getCustomStoreDetails(store) {
773
+ return {
774
+ _custom: {
775
+ type: 'store',
776
+ display: 'Store',
777
+ value: {
778
+ state: store.state,
779
+ getters: getCatchedGetters(store)
780
+ },
781
+ fields: {
782
+ abstract: true
783
+ }
784
+ }
785
+ };
786
+ }
787
+
788
+ exports.getCustomStoreDetails = getCustomStoreDetails; // @TODO refactor
789
+
790
+ function getCatchedGetters(store) {
791
+ const getters = {};
792
+ const origGetters = store.getters || {};
793
+ const keys = Object.keys(origGetters);
794
+
795
+ for (let i = 0; i < keys.length; i++) {
796
+ const key = keys[i];
797
+ Object.defineProperty(getters, key, {
798
+ enumerable: true,
799
+ get: () => {
800
+ try {
801
+ return origGetters[key];
802
+ } catch (e) {
803
+ return e;
804
+ }
805
+ }
806
+ });
807
+ }
808
+
809
+ return getters;
810
+ }
811
+
812
+ exports.getCatchedGetters = getCatchedGetters;
813
+
814
+ /***/ }),
815
+
816
+ /***/ "../shared-utils/lib/bridge.js":
817
+ /*!*************************************!*\
818
+ !*** ../shared-utils/lib/bridge.js ***!
819
+ \*************************************/
820
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
821
+
822
+
823
+
824
+ Object.defineProperty(exports, "__esModule", ({
825
+ value: true
826
+ }));
827
+ exports.Bridge = void 0;
828
+
829
+ const events_1 = __webpack_require__(/*! events */ "../../node_modules/events/events.js");
830
+
831
+ const raf_1 = __webpack_require__(/*! ./raf */ "../shared-utils/lib/raf.js");
832
+
833
+ const BATCH_DURATION = 100;
834
+
835
+ class Bridge extends events_1.EventEmitter {
836
+ constructor(wall) {
837
+ super();
838
+ this.setMaxListeners(Infinity);
839
+ this.wall = wall;
840
+ wall.listen(messages => {
841
+ if (Array.isArray(messages)) {
842
+ messages.forEach(message => this._emit(message));
843
+ } else {
844
+ this._emit(messages);
845
+ }
846
+ });
847
+ this._batchingQueue = [];
848
+ this._sendingQueue = [];
849
+ this._receivingQueue = [];
850
+ this._sending = false;
851
+ }
852
+
853
+ on(event, listener) {
854
+ const wrappedListener = async (...args) => {
855
+ try {
856
+ await listener(...args);
857
+ } catch (e) {
858
+ console.error(`[Bridge] Error in listener for event ${event.toString()} with args:`, args);
859
+ console.error(e);
860
+ }
861
+ };
862
+
863
+ return super.on(event, wrappedListener);
864
+ }
865
+
866
+ send(event, payload) {
867
+ this._batchingQueue.push({
868
+ event,
869
+ payload
870
+ });
871
+
872
+ if (this._timer == null) {
873
+ this._timer = setTimeout(() => this._flush(), BATCH_DURATION);
874
+ }
875
+ }
876
+ /**
877
+ * Log a message to the devtools background page.
878
+ */
879
+
880
+
881
+ log(message) {
882
+ this.send('log', message);
883
+ }
884
+
885
+ _flush() {
886
+ if (this._batchingQueue.length) this._send(this._batchingQueue);
887
+ clearTimeout(this._timer);
888
+ this._timer = null;
889
+ this._batchingQueue = [];
890
+ } // @TODO types
891
+
892
+
893
+ _emit(message) {
894
+ if (typeof message === 'string') {
895
+ this.emit(message);
896
+ } else if (message._chunk) {
897
+ this._receivingQueue.push(message._chunk);
898
+
899
+ if (message.last) {
900
+ this.emit(message.event, this._receivingQueue);
901
+ this._receivingQueue = [];
902
+ }
903
+ } else if (message.event) {
904
+ this.emit(message.event, message.payload);
905
+ }
906
+ } // @TODO types
907
+
908
+
909
+ _send(messages) {
910
+ this._sendingQueue.push(messages);
911
+
912
+ this._nextSend();
913
+ }
914
+
915
+ _nextSend() {
916
+ if (!this._sendingQueue.length || this._sending) return;
917
+ this._sending = true;
918
+
919
+ const messages = this._sendingQueue.shift();
920
+
921
+ try {
922
+ this.wall.send(messages);
923
+ } catch (err) {
924
+ if (err.message === 'Message length exceeded maximum allowed length.') {
925
+ this._sendingQueue.splice(0, 0, messages.map(message => [message]));
926
+ }
927
+ }
928
+
929
+ this._sending = false;
930
+ (0, raf_1.raf)(() => this._nextSend());
931
+ }
932
+
933
+ }
934
+
935
+ exports.Bridge = Bridge;
936
+
937
+ /***/ }),
938
+
939
+ /***/ "../shared-utils/lib/consts.js":
940
+ /*!*************************************!*\
941
+ !*** ../shared-utils/lib/consts.js ***!
942
+ \*************************************/
943
+ /***/ ((__unused_webpack_module, exports) => {
944
+
945
+
946
+
947
+ Object.defineProperty(exports, "__esModule", ({
948
+ value: true
949
+ }));
950
+ exports.HookEvents = exports.BridgeSubscriptions = exports.BridgeEvents = exports.BuiltinTabs = void 0;
951
+ var BuiltinTabs;
952
+
953
+ (function (BuiltinTabs) {
954
+ BuiltinTabs["COMPONENTS"] = "components";
955
+ BuiltinTabs["TIMELINE"] = "timeline";
956
+ BuiltinTabs["PLUGINS"] = "plugins";
957
+ BuiltinTabs["SETTINGS"] = "settings";
958
+ })(BuiltinTabs = exports.BuiltinTabs || (exports.BuiltinTabs = {}));
959
+
960
+ var BridgeEvents;
961
+
962
+ (function (BridgeEvents) {
963
+ // Misc
964
+ BridgeEvents["TO_BACK_SUBSCRIBE"] = "b:subscribe";
965
+ BridgeEvents["TO_BACK_UNSUBSCRIBE"] = "b:unsubscribe";
966
+ /** Backend is ready */
967
+
968
+ BridgeEvents["TO_FRONT_READY"] = "f:ready";
969
+ /** Displays the "detected Vue" console log */
970
+
971
+ BridgeEvents["TO_BACK_LOG_DETECTED_VUE"] = "b:log-detected-vue";
972
+ /** Force refresh */
973
+
974
+ BridgeEvents["TO_BACK_REFRESH"] = "b:refresh";
975
+ /** Tab was switched */
976
+
977
+ BridgeEvents["TO_BACK_TAB_SWITCH"] = "b:tab:switch";
978
+ BridgeEvents["TO_BACK_LOG"] = "b:log";
979
+ /** Reconnected after background script is terminated (idle) */
980
+
981
+ BridgeEvents["TO_FRONT_RECONNECTED"] = "f:reconnected";
982
+ /** Change app title (electron) */
983
+
984
+ BridgeEvents["TO_FRONT_TITLE"] = "f:title"; // Apps
985
+
986
+ /** App was registered */
987
+
988
+ BridgeEvents["TO_FRONT_APP_ADD"] = "f:app:add";
989
+ /** Get app list */
990
+
991
+ BridgeEvents["TO_BACK_APP_LIST"] = "b:app:list";
992
+ BridgeEvents["TO_FRONT_APP_LIST"] = "f:app:list";
993
+ BridgeEvents["TO_FRONT_APP_REMOVE"] = "f:app:remove";
994
+ BridgeEvents["TO_BACK_APP_SELECT"] = "b:app:select";
995
+ BridgeEvents["TO_FRONT_APP_SELECTED"] = "f:app:selected";
996
+ BridgeEvents["TO_BACK_SCAN_LEGACY_APPS"] = "b:app:scan-legacy"; // Components
997
+
998
+ BridgeEvents["TO_BACK_COMPONENT_TREE"] = "b:component:tree";
999
+ BridgeEvents["TO_FRONT_COMPONENT_TREE"] = "f:component:tree";
1000
+ BridgeEvents["TO_BACK_COMPONENT_SELECTED_DATA"] = "b:component:selected-data";
1001
+ BridgeEvents["TO_FRONT_COMPONENT_SELECTED_DATA"] = "f:component:selected-data";
1002
+ BridgeEvents["TO_BACK_COMPONENT_EXPAND"] = "b:component:expand";
1003
+ BridgeEvents["TO_FRONT_COMPONENT_EXPAND"] = "f:component:expand";
1004
+ BridgeEvents["TO_BACK_COMPONENT_SCROLL_TO"] = "b:component:scroll-to";
1005
+ BridgeEvents["TO_BACK_COMPONENT_FILTER"] = "b:component:filter";
1006
+ BridgeEvents["TO_BACK_COMPONENT_MOUSE_OVER"] = "b:component:mouse-over";
1007
+ BridgeEvents["TO_BACK_COMPONENT_MOUSE_OUT"] = "b:component:mouse-out";
1008
+ BridgeEvents["TO_BACK_COMPONENT_CONTEXT_MENU_TARGET"] = "b:component:context-menu-target";
1009
+ BridgeEvents["TO_BACK_COMPONENT_EDIT_STATE"] = "b:component:edit-state";
1010
+ BridgeEvents["TO_BACK_COMPONENT_PICK"] = "b:component:pick";
1011
+ BridgeEvents["TO_FRONT_COMPONENT_PICK"] = "f:component:pick";
1012
+ BridgeEvents["TO_BACK_COMPONENT_PICK_CANCELED"] = "b:component:pick-canceled";
1013
+ BridgeEvents["TO_FRONT_COMPONENT_PICK_CANCELED"] = "f:component:pick-canceled";
1014
+ BridgeEvents["TO_BACK_COMPONENT_INSPECT_DOM"] = "b:component:inspect-dom";
1015
+ BridgeEvents["TO_FRONT_COMPONENT_INSPECT_DOM"] = "f:component:inspect-dom";
1016
+ BridgeEvents["TO_BACK_COMPONENT_RENDER_CODE"] = "b:component:render-code";
1017
+ BridgeEvents["TO_FRONT_COMPONENT_RENDER_CODE"] = "f:component:render-code";
1018
+ BridgeEvents["TO_FRONT_COMPONENT_UPDATED"] = "f:component:updated"; // Timeline
1019
+
1020
+ BridgeEvents["TO_FRONT_TIMELINE_EVENT"] = "f:timeline:event";
1021
+ BridgeEvents["TO_BACK_TIMELINE_LAYER_LIST"] = "b:timeline:layer-list";
1022
+ BridgeEvents["TO_FRONT_TIMELINE_LAYER_LIST"] = "f:timeline:layer-list";
1023
+ BridgeEvents["TO_FRONT_TIMELINE_LAYER_ADD"] = "f:timeline:layer-add";
1024
+ BridgeEvents["TO_BACK_TIMELINE_SHOW_SCREENSHOT"] = "b:timeline:show-screenshot";
1025
+ BridgeEvents["TO_BACK_TIMELINE_CLEAR"] = "b:timeline:clear";
1026
+ BridgeEvents["TO_BACK_TIMELINE_EVENT_DATA"] = "b:timeline:event-data";
1027
+ BridgeEvents["TO_FRONT_TIMELINE_EVENT_DATA"] = "f:timeline:event-data";
1028
+ BridgeEvents["TO_BACK_TIMELINE_LAYER_LOAD_EVENTS"] = "b:timeline:layer-load-events";
1029
+ BridgeEvents["TO_FRONT_TIMELINE_LAYER_LOAD_EVENTS"] = "f:timeline:layer-load-events";
1030
+ BridgeEvents["TO_BACK_TIMELINE_LOAD_MARKERS"] = "b:timeline:load-markers";
1031
+ BridgeEvents["TO_FRONT_TIMELINE_LOAD_MARKERS"] = "f:timeline:load-markers";
1032
+ BridgeEvents["TO_FRONT_TIMELINE_MARKER"] = "f:timeline:marker"; // Plugins
1033
+
1034
+ BridgeEvents["TO_BACK_DEVTOOLS_PLUGIN_LIST"] = "b:devtools-plugin:list";
1035
+ BridgeEvents["TO_FRONT_DEVTOOLS_PLUGIN_LIST"] = "f:devtools-plugin:list";
1036
+ BridgeEvents["TO_FRONT_DEVTOOLS_PLUGIN_ADD"] = "f:devtools-plugin:add";
1037
+ BridgeEvents["TO_BACK_DEVTOOLS_PLUGIN_SETTING_UPDATED"] = "b:devtools-plugin:setting-updated"; // Custom inspectors
1038
+
1039
+ BridgeEvents["TO_BACK_CUSTOM_INSPECTOR_LIST"] = "b:custom-inspector:list";
1040
+ BridgeEvents["TO_FRONT_CUSTOM_INSPECTOR_LIST"] = "f:custom-inspector:list";
1041
+ BridgeEvents["TO_FRONT_CUSTOM_INSPECTOR_ADD"] = "f:custom-inspector:add";
1042
+ BridgeEvents["TO_BACK_CUSTOM_INSPECTOR_TREE"] = "b:custom-inspector:tree";
1043
+ BridgeEvents["TO_FRONT_CUSTOM_INSPECTOR_TREE"] = "f:custom-inspector:tree";
1044
+ BridgeEvents["TO_BACK_CUSTOM_INSPECTOR_STATE"] = "b:custom-inspector:state";
1045
+ BridgeEvents["TO_FRONT_CUSTOM_INSPECTOR_STATE"] = "f:custom-inspector:state";
1046
+ BridgeEvents["TO_BACK_CUSTOM_INSPECTOR_EDIT_STATE"] = "b:custom-inspector:edit-state";
1047
+ BridgeEvents["TO_BACK_CUSTOM_INSPECTOR_ACTION"] = "b:custom-inspector:action";
1048
+ BridgeEvents["TO_BACK_CUSTOM_INSPECTOR_NODE_ACTION"] = "b:custom-inspector:node-action";
1049
+ BridgeEvents["TO_FRONT_CUSTOM_INSPECTOR_SELECT_NODE"] = "f:custom-inspector:select-node"; // Custom state
1050
+
1051
+ BridgeEvents["TO_BACK_CUSTOM_STATE_ACTION"] = "b:custom-state:action";
1052
+ })(BridgeEvents = exports.BridgeEvents || (exports.BridgeEvents = {}));
1053
+
1054
+ var BridgeSubscriptions;
1055
+
1056
+ (function (BridgeSubscriptions) {
1057
+ BridgeSubscriptions["SELECTED_COMPONENT_DATA"] = "component:selected-data";
1058
+ BridgeSubscriptions["COMPONENT_TREE"] = "component:tree";
1059
+ })(BridgeSubscriptions = exports.BridgeSubscriptions || (exports.BridgeSubscriptions = {}));
1060
+
1061
+ var HookEvents;
1062
+
1063
+ (function (HookEvents) {
1064
+ HookEvents["INIT"] = "init";
1065
+ HookEvents["APP_INIT"] = "app:init";
1066
+ HookEvents["APP_ADD"] = "app:add";
1067
+ HookEvents["APP_UNMOUNT"] = "app:unmount";
1068
+ HookEvents["COMPONENT_UPDATED"] = "component:updated";
1069
+ HookEvents["COMPONENT_ADDED"] = "component:added";
1070
+ HookEvents["COMPONENT_REMOVED"] = "component:removed";
1071
+ HookEvents["COMPONENT_EMIT"] = "component:emit";
1072
+ HookEvents["COMPONENT_HIGHLIGHT"] = "component:highlight";
1073
+ HookEvents["COMPONENT_UNHIGHLIGHT"] = "component:unhighlight";
1074
+ HookEvents["SETUP_DEVTOOLS_PLUGIN"] = "devtools-plugin:setup";
1075
+ HookEvents["TIMELINE_LAYER_ADDED"] = "timeline:layer-added";
1076
+ HookEvents["TIMELINE_EVENT_ADDED"] = "timeline:event-added";
1077
+ HookEvents["CUSTOM_INSPECTOR_ADD"] = "custom-inspector:add";
1078
+ HookEvents["CUSTOM_INSPECTOR_SEND_TREE"] = "custom-inspector:send-tree";
1079
+ HookEvents["CUSTOM_INSPECTOR_SEND_STATE"] = "custom-inspector:send-state";
1080
+ HookEvents["CUSTOM_INSPECTOR_SELECT_NODE"] = "custom-inspector:select-node";
1081
+ HookEvents["PERFORMANCE_START"] = "perf:start";
1082
+ HookEvents["PERFORMANCE_END"] = "perf:end";
1083
+ HookEvents["PLUGIN_SETTINGS_SET"] = "plugin:settings:set";
1084
+ /**
1085
+ * @deprecated
1086
+ */
1087
+
1088
+ HookEvents["FLUSH"] = "flush";
1089
+ /**
1090
+ * @deprecated
1091
+ */
1092
+
1093
+ HookEvents["TRACK_UPDATE"] = "_track-update";
1094
+ /**
1095
+ * @deprecated
1096
+ */
1097
+
1098
+ HookEvents["FLASH_UPDATE"] = "_flash-update";
1099
+ })(HookEvents = exports.HookEvents || (exports.HookEvents = {}));
1100
+
1101
+ /***/ }),
1102
+
1103
+ /***/ "../shared-utils/lib/edit.js":
1104
+ /*!***********************************!*\
1105
+ !*** ../shared-utils/lib/edit.js ***!
1106
+ \***********************************/
1107
+ /***/ ((__unused_webpack_module, exports) => {
1108
+
1109
+
1110
+
1111
+ Object.defineProperty(exports, "__esModule", ({
1112
+ value: true
1113
+ }));
1114
+ exports.StateEditor = void 0;
1115
+
1116
+ class StateEditor {
1117
+ set(object, path, value, cb = null) {
1118
+ const sections = Array.isArray(path) ? path : path.split('.');
1119
+
1120
+ while (sections.length > 1) {
1121
+ object = object[sections.shift()];
1122
+
1123
+ if (this.isRef(object)) {
1124
+ object = this.getRefValue(object);
1125
+ }
1126
+ }
1127
+
1128
+ const field = sections[0];
1129
+
1130
+ if (cb) {
1131
+ cb(object, field, value);
1132
+ } else if (this.isRef(object[field])) {
1133
+ this.setRefValue(object[field], value);
1134
+ } else {
1135
+ object[field] = value;
1136
+ }
1137
+ }
1138
+
1139
+ get(object, path) {
1140
+ const sections = Array.isArray(path) ? path : path.split('.');
1141
+
1142
+ for (let i = 0; i < sections.length; i++) {
1143
+ object = object[sections[i]];
1144
+
1145
+ if (this.isRef(object)) {
1146
+ object = this.getRefValue(object);
1147
+ }
1148
+
1149
+ if (!object) {
1150
+ return undefined;
1151
+ }
1152
+ }
1153
+
1154
+ return object;
1155
+ }
1156
+
1157
+ has(object, path, parent = false) {
1158
+ if (typeof object === 'undefined') {
1159
+ return false;
1160
+ }
1161
+
1162
+ const sections = Array.isArray(path) ? path.slice() : path.split('.');
1163
+ const size = !parent ? 1 : 2;
1164
+
1165
+ while (object && sections.length > size) {
1166
+ object = object[sections.shift()];
1167
+
1168
+ if (this.isRef(object)) {
1169
+ object = this.getRefValue(object);
1170
+ }
1171
+ }
1172
+
1173
+ return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
1174
+ }
1175
+
1176
+ createDefaultSetCallback(state) {
1177
+ return (obj, field, value) => {
1178
+ if (state.remove || state.newKey) {
1179
+ if (Array.isArray(obj)) {
1180
+ obj.splice(field, 1);
1181
+ } else {
1182
+ delete obj[field];
1183
+ }
1184
+ }
1185
+
1186
+ if (!state.remove) {
1187
+ const target = obj[state.newKey || field];
1188
+
1189
+ if (this.isRef(target)) {
1190
+ this.setRefValue(target, value);
1191
+ } else {
1192
+ obj[state.newKey || field] = value;
1193
+ }
1194
+ }
1195
+ };
1196
+ }
1197
+
1198
+ isRef(ref) {
1199
+ // To implement in subclass
1200
+ return false;
1201
+ }
1202
+
1203
+ setRefValue(ref, value) {// To implement in subclass
1204
+ }
1205
+
1206
+ getRefValue(ref) {
1207
+ // To implement in subclass
1208
+ return ref;
1209
+ }
1210
+
1211
+ }
1212
+
1213
+ exports.StateEditor = StateEditor;
1214
+
1215
+ /***/ }),
1216
+
1217
+ /***/ "../shared-utils/lib/env.js":
1218
+ /*!**********************************!*\
1219
+ !*** ../shared-utils/lib/env.js ***!
1220
+ \**********************************/
1221
+ /***/ ((__unused_webpack_module, exports) => {
1222
+
1223
+
1224
+
1225
+ Object.defineProperty(exports, "__esModule", ({
1226
+ value: true
1227
+ }));
1228
+ exports.initEnv = exports.keys = exports.isLinux = exports.isMac = exports.isWindows = exports.isFirefox = exports.isChrome = exports.target = exports.isBrowser = void 0;
1229
+ exports.isBrowser = typeof navigator !== 'undefined' && typeof window !== 'undefined';
1230
+ exports.target = exports.isBrowser ? window : typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof my !== 'undefined' ? my : {};
1231
+ exports.isChrome = typeof exports.target.chrome !== 'undefined' && !!exports.target.chrome.devtools;
1232
+ exports.isFirefox = exports.isBrowser && navigator.userAgent && navigator.userAgent.indexOf('Firefox') > -1;
1233
+ exports.isWindows = exports.isBrowser && navigator.platform.indexOf('Win') === 0;
1234
+ exports.isMac = exports.isBrowser && navigator.platform === 'MacIntel';
1235
+ exports.isLinux = exports.isBrowser && navigator.platform.indexOf('Linux') === 0;
1236
+ exports.keys = {
1237
+ ctrl: exports.isMac ? '&#8984;' : 'Ctrl',
1238
+ shift: 'Shift',
1239
+ alt: exports.isMac ? '&#8997;' : 'Alt',
1240
+ del: 'Del',
1241
+ enter: 'Enter',
1242
+ esc: 'Esc'
1243
+ };
1244
+
1245
+ function initEnv(Vue) {
1246
+ if (Vue.prototype.hasOwnProperty('$isChrome')) return;
1247
+ Object.defineProperties(Vue.prototype, {
1248
+ $isChrome: {
1249
+ get: () => exports.isChrome
1250
+ },
1251
+ $isFirefox: {
1252
+ get: () => exports.isFirefox
1253
+ },
1254
+ $isWindows: {
1255
+ get: () => exports.isWindows
1256
+ },
1257
+ $isMac: {
1258
+ get: () => exports.isMac
1259
+ },
1260
+ $isLinux: {
1261
+ get: () => exports.isLinux
1262
+ },
1263
+ $keys: {
1264
+ get: () => exports.keys
1265
+ }
1266
+ });
1267
+ if (exports.isWindows) document.body.classList.add('platform-windows');
1268
+ if (exports.isMac) document.body.classList.add('platform-mac');
1269
+ if (exports.isLinux) document.body.classList.add('platform-linux');
1270
+ }
1271
+
1272
+ exports.initEnv = initEnv;
1273
+
1274
+ /***/ }),
1275
+
1276
+ /***/ "../shared-utils/lib/index.js":
1277
+ /*!************************************!*\
1278
+ !*** ../shared-utils/lib/index.js ***!
1279
+ \************************************/
1280
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1281
+
1282
+
1283
+
1284
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
1285
+ if (k2 === undefined) k2 = k;
1286
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1287
+
1288
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1289
+ desc = {
1290
+ enumerable: true,
1291
+ get: function () {
1292
+ return m[k];
1293
+ }
1294
+ };
1295
+ }
1296
+
1297
+ Object.defineProperty(o, k2, desc);
1298
+ } : function (o, m, k, k2) {
1299
+ if (k2 === undefined) k2 = k;
1300
+ o[k2] = m[k];
1301
+ });
1302
+
1303
+ var __exportStar = this && this.__exportStar || function (m, exports) {
1304
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1305
+ };
1306
+
1307
+ Object.defineProperty(exports, "__esModule", ({
1308
+ value: true
1309
+ }));
1310
+
1311
+ __exportStar(__webpack_require__(/*! ./backend */ "../shared-utils/lib/backend.js"), exports);
1312
+
1313
+ __exportStar(__webpack_require__(/*! ./bridge */ "../shared-utils/lib/bridge.js"), exports);
1314
+
1315
+ __exportStar(__webpack_require__(/*! ./consts */ "../shared-utils/lib/consts.js"), exports);
1316
+
1317
+ __exportStar(__webpack_require__(/*! ./edit */ "../shared-utils/lib/edit.js"), exports);
1318
+
1319
+ __exportStar(__webpack_require__(/*! ./env */ "../shared-utils/lib/env.js"), exports);
1320
+
1321
+ __exportStar(__webpack_require__(/*! ./plugin-permissions */ "../shared-utils/lib/plugin-permissions.js"), exports);
1322
+
1323
+ __exportStar(__webpack_require__(/*! ./plugin-settings */ "../shared-utils/lib/plugin-settings.js"), exports);
1324
+
1325
+ __exportStar(__webpack_require__(/*! ./shared-data */ "../shared-utils/lib/shared-data.js"), exports);
1326
+
1327
+ __exportStar(__webpack_require__(/*! ./shell */ "../shared-utils/lib/shell.js"), exports);
1328
+
1329
+ __exportStar(__webpack_require__(/*! ./storage */ "../shared-utils/lib/storage.js"), exports);
1330
+
1331
+ __exportStar(__webpack_require__(/*! ./transfer */ "../shared-utils/lib/transfer.js"), exports);
1332
+
1333
+ __exportStar(__webpack_require__(/*! ./util */ "../shared-utils/lib/util.js"), exports);
1334
+
1335
+ __exportStar(__webpack_require__(/*! ./raf */ "../shared-utils/lib/raf.js"), exports);
1336
+
1337
+ /***/ }),
1338
+
1339
+ /***/ "../shared-utils/lib/plugin-permissions.js":
1340
+ /*!*************************************************!*\
1341
+ !*** ../shared-utils/lib/plugin-permissions.js ***!
1342
+ \*************************************************/
1343
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1344
+
1345
+
1346
+
1347
+ Object.defineProperty(exports, "__esModule", ({
1348
+ value: true
1349
+ }));
1350
+ exports.setPluginPermission = exports.hasPluginPermission = exports.PluginPermission = void 0;
1351
+
1352
+ const shared_data_1 = __webpack_require__(/*! ./shared-data */ "../shared-utils/lib/shared-data.js");
1353
+
1354
+ var PluginPermission;
1355
+
1356
+ (function (PluginPermission) {
1357
+ PluginPermission["ENABLED"] = "enabled";
1358
+ PluginPermission["COMPONENTS"] = "components";
1359
+ PluginPermission["CUSTOM_INSPECTOR"] = "custom-inspector";
1360
+ PluginPermission["TIMELINE"] = "timeline";
1361
+ })(PluginPermission = exports.PluginPermission || (exports.PluginPermission = {}));
1362
+
1363
+ function hasPluginPermission(pluginId, permission) {
1364
+ const result = shared_data_1.SharedData.pluginPermissions[`${pluginId}:${permission}`];
1365
+ if (result == null) return true;
1366
+ return !!result;
1367
+ }
1368
+
1369
+ exports.hasPluginPermission = hasPluginPermission;
1370
+
1371
+ function setPluginPermission(pluginId, permission, active) {
1372
+ shared_data_1.SharedData.pluginPermissions = { ...shared_data_1.SharedData.pluginPermissions,
1373
+ [`${pluginId}:${permission}`]: active
1374
+ };
1375
+ }
1376
+
1377
+ exports.setPluginPermission = setPluginPermission;
1378
+
1379
+ /***/ }),
1380
+
1381
+ /***/ "../shared-utils/lib/plugin-settings.js":
1382
+ /*!**********************************************!*\
1383
+ !*** ../shared-utils/lib/plugin-settings.js ***!
1384
+ \**********************************************/
1385
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1386
+
1387
+
1388
+
1389
+ Object.defineProperty(exports, "__esModule", ({
1390
+ value: true
1391
+ }));
1392
+ exports.getPluginDefaultSettings = exports.setPluginSettings = exports.getPluginSettings = void 0;
1393
+
1394
+ const shared_data_1 = __webpack_require__(/*! ./shared-data */ "../shared-utils/lib/shared-data.js");
1395
+
1396
+ function getPluginSettings(pluginId, defaultSettings) {
1397
+ var _a;
1398
+
1399
+ return { ...(defaultSettings !== null && defaultSettings !== void 0 ? defaultSettings : {}),
1400
+ ...((_a = shared_data_1.SharedData.pluginSettings[pluginId]) !== null && _a !== void 0 ? _a : {})
1401
+ };
1402
+ }
1403
+
1404
+ exports.getPluginSettings = getPluginSettings;
1405
+
1406
+ function setPluginSettings(pluginId, settings) {
1407
+ shared_data_1.SharedData.pluginSettings = { ...shared_data_1.SharedData.pluginSettings,
1408
+ [pluginId]: settings
1409
+ };
1410
+ }
1411
+
1412
+ exports.setPluginSettings = setPluginSettings;
1413
+
1414
+ function getPluginDefaultSettings(schema) {
1415
+ const result = {};
1416
+
1417
+ if (schema) {
1418
+ for (const id in schema) {
1419
+ const item = schema[id];
1420
+ result[id] = item.defaultValue;
1421
+ }
1422
+ }
1423
+
1424
+ return result;
1425
+ }
1426
+
1427
+ exports.getPluginDefaultSettings = getPluginDefaultSettings;
1428
+
1429
+ /***/ }),
1430
+
1431
+ /***/ "../shared-utils/lib/raf.js":
1432
+ /*!**********************************!*\
1433
+ !*** ../shared-utils/lib/raf.js ***!
1434
+ \**********************************/
1435
+ /***/ ((__unused_webpack_module, exports) => {
1436
+
1437
+
1438
+
1439
+ Object.defineProperty(exports, "__esModule", ({
1440
+ value: true
1441
+ }));
1442
+ exports.raf = void 0;
1443
+ let pendingCallbacks = [];
1444
+ /**
1445
+ * requestAnimationFrame that also works on non-browser environments like Node.
1446
+ */
1447
+
1448
+ exports.raf = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : typeof setImmediate === 'function' ? fn => {
1449
+ if (!pendingCallbacks.length) {
1450
+ setImmediate(() => {
1451
+ const now = performance.now();
1452
+ const cbs = pendingCallbacks; // in case cbs add new callbacks
1453
+
1454
+ pendingCallbacks = [];
1455
+ cbs.forEach(cb => cb(now));
1456
+ });
1457
+ }
1458
+
1459
+ pendingCallbacks.push(fn);
1460
+ } : function (callback) {
1461
+ return setTimeout(function () {
1462
+ callback(Date.now());
1463
+ }, 1000 / 60);
1464
+ };
1465
+
1466
+ /***/ }),
1467
+
1468
+ /***/ "../shared-utils/lib/shared-data.js":
1469
+ /*!******************************************!*\
1470
+ !*** ../shared-utils/lib/shared-data.js ***!
1471
+ \******************************************/
1472
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1473
+
1474
+
1475
+
1476
+ Object.defineProperty(exports, "__esModule", ({
1477
+ value: true
1478
+ }));
1479
+ exports.SharedData = exports.watchSharedData = exports.destroySharedData = exports.onSharedDataInit = exports.initSharedData = void 0;
1480
+
1481
+ const storage_1 = __webpack_require__(/*! ./storage */ "../shared-utils/lib/storage.js");
1482
+
1483
+ const env_1 = __webpack_require__(/*! ./env */ "../shared-utils/lib/env.js"); // Initial state
1484
+
1485
+
1486
+ const internalSharedData = {
1487
+ openInEditorHost: '/',
1488
+ componentNameStyle: 'class',
1489
+ theme: 'auto',
1490
+ displayDensity: 'low',
1491
+ timeFormat: 'default',
1492
+ recordVuex: true,
1493
+ cacheVuexSnapshotsEvery: 50,
1494
+ cacheVuexSnapshotsLimit: 10,
1495
+ snapshotLoading: false,
1496
+ componentEventsEnabled: true,
1497
+ performanceMonitoringEnabled: true,
1498
+ editableProps: false,
1499
+ logDetected: true,
1500
+ vuexNewBackend: false,
1501
+ vuexAutoload: false,
1502
+ vuexGroupGettersByModule: true,
1503
+ showMenuScrollTip: true,
1504
+ timelineTimeGrid: true,
1505
+ timelineScreenshots: true,
1506
+ menuStepScrolling: env_1.isMac,
1507
+ pluginPermissions: {},
1508
+ pluginSettings: {},
1509
+ pageConfig: {},
1510
+ legacyApps: false,
1511
+ trackUpdates: true,
1512
+ flashUpdates: false,
1513
+ debugInfo: false,
1514
+ isBrowser: env_1.isBrowser
1515
+ };
1516
+ const persisted = ['componentNameStyle', 'theme', 'displayDensity', 'recordVuex', 'editableProps', 'logDetected', 'vuexNewBackend', 'vuexAutoload', 'vuexGroupGettersByModule', 'timeFormat', 'showMenuScrollTip', 'timelineTimeGrid', 'timelineScreenshots', 'menuStepScrolling', 'pluginPermissions', 'pluginSettings', 'performanceMonitoringEnabled', 'componentEventsEnabled', 'trackUpdates', 'flashUpdates', 'debugInfo'];
1517
+ const storageVersion = '6.0.0-alpha.1'; // ---- INTERNALS ---- //
1518
+
1519
+ let bridge; // List of fields to persist to storage (disabled if 'false')
1520
+ // This should be unique to each shared data client to prevent conflicts
1521
+
1522
+ let persist = false;
1523
+ let data;
1524
+ let initRetryInterval;
1525
+ let initRetryCount = 0;
1526
+ const initCbs = [];
1527
+
1528
+ function initSharedData(params) {
1529
+ return new Promise(resolve => {
1530
+ // Mandatory params
1531
+ bridge = params.bridge;
1532
+ persist = !!params.persist;
1533
+
1534
+ if (persist) {
1535
+ if (true) {
1536
+ // eslint-disable-next-line no-console
1537
+ console.log('[shared data] Master init in progress...');
1538
+ } // Load persisted fields
1539
+
1540
+
1541
+ persisted.forEach(key => {
1542
+ const value = (0, storage_1.getStorage)(`vue-devtools-${storageVersion}:shared-data:${key}`);
1543
+
1544
+ if (value !== null) {
1545
+ internalSharedData[key] = value;
1546
+ }
1547
+ });
1548
+ bridge.on('shared-data:load', () => {
1549
+ // Send all fields
1550
+ Object.keys(internalSharedData).forEach(key => {
1551
+ sendValue(key, internalSharedData[key]);
1552
+ });
1553
+ bridge.send('shared-data:load-complete');
1554
+ });
1555
+ bridge.on('shared-data:init-complete', () => {
1556
+ if (true) {
1557
+ // eslint-disable-next-line no-console
1558
+ console.log('[shared data] Master init complete');
1559
+ }
1560
+
1561
+ clearInterval(initRetryInterval);
1562
+ resolve();
1563
+ });
1564
+ bridge.send('shared-data:master-init-waiting'); // In case backend init is executed after frontend
1565
+
1566
+ bridge.on('shared-data:minion-init-waiting', () => {
1567
+ bridge.send('shared-data:master-init-waiting');
1568
+ });
1569
+ initRetryCount = 0;
1570
+ clearInterval(initRetryInterval);
1571
+ initRetryInterval = setInterval(() => {
1572
+ if (true) {
1573
+ // eslint-disable-next-line no-console
1574
+ console.log('[shared data] Master init retrying...');
1575
+ }
1576
+
1577
+ bridge.send('shared-data:master-init-waiting');
1578
+ initRetryCount++;
1579
+
1580
+ if (initRetryCount > 30) {
1581
+ clearInterval(initRetryInterval);
1582
+ console.error('[shared data] Master init failed');
1583
+ }
1584
+ }, 2000);
1585
+ } else {
1586
+ if (true) {
1587
+ // eslint-disable-next-line no-console
1588
+ console.log('[shared data] Minion init in progress...');
1589
+ }
1590
+
1591
+ bridge.on('shared-data:master-init-waiting', () => {
1592
+ if (true) {
1593
+ // eslint-disable-next-line no-console
1594
+ console.log('[shared data] Minion loading data...');
1595
+ } // Load all persisted shared data
1596
+
1597
+
1598
+ bridge.send('shared-data:load');
1599
+ bridge.once('shared-data:load-complete', () => {
1600
+ if (true) {
1601
+ // eslint-disable-next-line no-console
1602
+ console.log('[shared data] Minion init complete');
1603
+ }
1604
+
1605
+ bridge.send('shared-data:init-complete');
1606
+ resolve();
1607
+ });
1608
+ });
1609
+ bridge.send('shared-data:minion-init-waiting');
1610
+ }
1611
+
1612
+ data = { ...internalSharedData
1613
+ };
1614
+
1615
+ if (params.Vue) {
1616
+ data = params.Vue.observable(data);
1617
+ } // Update value from other shared data clients
1618
+
1619
+
1620
+ bridge.on('shared-data:set', ({
1621
+ key,
1622
+ value
1623
+ }) => {
1624
+ setValue(key, value);
1625
+ });
1626
+ initCbs.forEach(cb => cb());
1627
+ });
1628
+ }
1629
+
1630
+ exports.initSharedData = initSharedData;
1631
+
1632
+ function onSharedDataInit(cb) {
1633
+ initCbs.push(cb);
1634
+ return () => {
1635
+ const index = initCbs.indexOf(cb);
1636
+ if (index !== -1) initCbs.splice(index, 1);
1637
+ };
1638
+ }
1639
+
1640
+ exports.onSharedDataInit = onSharedDataInit;
1641
+
1642
+ function destroySharedData() {
1643
+ bridge.removeAllListeners('shared-data:set');
1644
+ watchers = {};
1645
+ }
1646
+
1647
+ exports.destroySharedData = destroySharedData;
1648
+ let watchers = {};
1649
+
1650
+ function setValue(key, value) {
1651
+ // Storage
1652
+ if (persist && persisted.includes(key)) {
1653
+ (0, storage_1.setStorage)(`vue-devtools-${storageVersion}:shared-data:${key}`, value);
1654
+ }
1655
+
1656
+ const oldValue = data[key];
1657
+ data[key] = value;
1658
+ const handlers = watchers[key];
1659
+
1660
+ if (handlers) {
1661
+ handlers.forEach(h => h(value, oldValue));
1662
+ } // Validate Proxy set trap
1663
+
1664
+
1665
+ return true;
1666
+ }
1667
+
1668
+ function sendValue(key, value) {
1669
+ bridge && bridge.send('shared-data:set', {
1670
+ key,
1671
+ value
1672
+ });
1673
+ }
1674
+
1675
+ function watchSharedData(prop, handler) {
1676
+ const list = watchers[prop] || (watchers[prop] = []);
1677
+ list.push(handler);
1678
+ return () => {
1679
+ const index = list.indexOf(handler);
1680
+ if (index !== -1) list.splice(index, 1);
1681
+ };
1682
+ }
1683
+
1684
+ exports.watchSharedData = watchSharedData;
1685
+ const proxy = {};
1686
+ Object.keys(internalSharedData).forEach(key => {
1687
+ Object.defineProperty(proxy, key, {
1688
+ configurable: false,
1689
+ get: () => data[key],
1690
+ set: value => {
1691
+ sendValue(key, value);
1692
+ setValue(key, value);
1693
+ }
1694
+ });
1695
+ });
1696
+ exports.SharedData = proxy;
1697
+
1698
+ /***/ }),
1699
+
1700
+ /***/ "../shared-utils/lib/shell.js":
1701
+ /*!************************************!*\
1702
+ !*** ../shared-utils/lib/shell.js ***!
1703
+ \************************************/
1704
+ /***/ ((__unused_webpack_module, exports) => {
1705
+
1706
+
1707
+
1708
+ Object.defineProperty(exports, "__esModule", ({
1709
+ value: true
1710
+ }));
1711
+
1712
+ /***/ }),
1713
+
1714
+ /***/ "../shared-utils/lib/storage.js":
1715
+ /*!**************************************!*\
1716
+ !*** ../shared-utils/lib/storage.js ***!
1717
+ \**************************************/
1718
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1719
+
1720
+
1721
+
1722
+ Object.defineProperty(exports, "__esModule", ({
1723
+ value: true
1724
+ }));
1725
+ exports.clearStorage = exports.removeStorage = exports.setStorage = exports.getStorage = exports.initStorage = void 0;
1726
+
1727
+ const env_1 = __webpack_require__(/*! ./env */ "../shared-utils/lib/env.js"); // If we can, we use the browser extension API to store data
1728
+ // it's async though, so we synchronize changes from an intermediate
1729
+ // storageData object
1730
+
1731
+
1732
+ const useStorage = typeof env_1.target.chrome !== 'undefined' && typeof env_1.target.chrome.storage !== 'undefined';
1733
+ let storageData = null;
1734
+
1735
+ function initStorage() {
1736
+ return new Promise(resolve => {
1737
+ if (useStorage) {
1738
+ env_1.target.chrome.storage.local.get(null, result => {
1739
+ storageData = result;
1740
+ resolve();
1741
+ });
1742
+ } else {
1743
+ storageData = {};
1744
+ resolve();
1745
+ }
1746
+ });
1747
+ }
1748
+
1749
+ exports.initStorage = initStorage;
1750
+
1751
+ function getStorage(key, defaultValue = null) {
1752
+ checkStorage();
1753
+
1754
+ if (useStorage) {
1755
+ return getDefaultValue(storageData[key], defaultValue);
1756
+ } else {
1757
+ try {
1758
+ return getDefaultValue(JSON.parse(localStorage.getItem(key)), defaultValue);
1759
+ } catch (e) {}
1760
+ }
1761
+ }
1762
+
1763
+ exports.getStorage = getStorage;
1764
+
1765
+ function setStorage(key, val) {
1766
+ checkStorage();
1767
+
1768
+ if (useStorage) {
1769
+ storageData[key] = val;
1770
+ env_1.target.chrome.storage.local.set({
1771
+ [key]: val
1772
+ });
1773
+ } else {
1774
+ try {
1775
+ localStorage.setItem(key, JSON.stringify(val));
1776
+ } catch (e) {}
1777
+ }
1778
+ }
1779
+
1780
+ exports.setStorage = setStorage;
1781
+
1782
+ function removeStorage(key) {
1783
+ checkStorage();
1784
+
1785
+ if (useStorage) {
1786
+ delete storageData[key];
1787
+ env_1.target.chrome.storage.local.remove([key]);
1788
+ } else {
1789
+ try {
1790
+ localStorage.removeItem(key);
1791
+ } catch (e) {}
1792
+ }
1793
+ }
1794
+
1795
+ exports.removeStorage = removeStorage;
1796
+
1797
+ function clearStorage() {
1798
+ checkStorage();
1799
+
1800
+ if (useStorage) {
1801
+ storageData = {};
1802
+ env_1.target.chrome.storage.local.clear();
1803
+ } else {
1804
+ try {
1805
+ localStorage.clear();
1806
+ } catch (e) {}
1807
+ }
1808
+ }
1809
+
1810
+ exports.clearStorage = clearStorage;
1811
+
1812
+ function checkStorage() {
1813
+ if (!storageData) {
1814
+ throw new Error('Storage wasn\'t initialized with \'init()\'');
1815
+ }
1816
+ }
1817
+
1818
+ function getDefaultValue(value, defaultValue) {
1819
+ if (value == null) {
1820
+ return defaultValue;
1821
+ }
1822
+
1823
+ return value;
1824
+ }
1825
+
1826
+ /***/ }),
1827
+
1828
+ /***/ "../shared-utils/lib/transfer.js":
1829
+ /*!***************************************!*\
1830
+ !*** ../shared-utils/lib/transfer.js ***!
1831
+ \***************************************/
1832
+ /***/ ((__unused_webpack_module, exports) => {
1833
+
1834
+
1835
+
1836
+ Object.defineProperty(exports, "__esModule", ({
1837
+ value: true
1838
+ }));
1839
+ exports.stringifyStrictCircularAutoChunks = exports.parseCircularAutoChunks = exports.stringifyCircularAutoChunks = void 0;
1840
+ const MAX_SERIALIZED_SIZE = 512 * 1024; // 1MB
1841
+
1842
+ function encode(data, replacer, list, seen) {
1843
+ let stored, key, value, i, l;
1844
+ const seenIndex = seen.get(data);
1845
+
1846
+ if (seenIndex != null) {
1847
+ return seenIndex;
1848
+ }
1849
+
1850
+ const index = list.length;
1851
+ const proto = Object.prototype.toString.call(data);
1852
+
1853
+ if (proto === '[object Object]') {
1854
+ stored = {};
1855
+ seen.set(data, index);
1856
+ list.push(stored);
1857
+ const keys = Object.keys(data);
1858
+
1859
+ for (i = 0, l = keys.length; i < l; i++) {
1860
+ key = keys[i];
1861
+
1862
+ try {
1863
+ value = data[key];
1864
+ if (replacer) value = replacer.call(data, key, value);
1865
+ } catch (e) {
1866
+ value = e;
1867
+ }
1868
+
1869
+ stored[key] = encode(value, replacer, list, seen);
1870
+ }
1871
+ } else if (proto === '[object Array]') {
1872
+ stored = [];
1873
+ seen.set(data, index);
1874
+ list.push(stored);
1875
+
1876
+ for (i = 0, l = data.length; i < l; i++) {
1877
+ try {
1878
+ value = data[i];
1879
+ if (replacer) value = replacer.call(data, i, value);
1880
+ } catch (e) {
1881
+ value = e;
1882
+ }
1883
+
1884
+ stored[i] = encode(value, replacer, list, seen);
1885
+ }
1886
+ } else {
1887
+ list.push(data);
1888
+ }
1889
+
1890
+ return index;
1891
+ }
1892
+
1893
+ function decode(list, reviver) {
1894
+ let i = list.length;
1895
+ let j, k, data, key, value, proto;
1896
+
1897
+ while (i--) {
1898
+ data = list[i];
1899
+ proto = Object.prototype.toString.call(data);
1900
+
1901
+ if (proto === '[object Object]') {
1902
+ const keys = Object.keys(data);
1903
+
1904
+ for (j = 0, k = keys.length; j < k; j++) {
1905
+ key = keys[j];
1906
+ value = list[data[key]];
1907
+ if (reviver) value = reviver.call(data, key, value);
1908
+ data[key] = value;
1909
+ }
1910
+ } else if (proto === '[object Array]') {
1911
+ for (j = 0, k = data.length; j < k; j++) {
1912
+ value = list[data[j]];
1913
+ if (reviver) value = reviver.call(data, j, value);
1914
+ data[j] = value;
1915
+ }
1916
+ }
1917
+ }
1918
+ }
1919
+
1920
+ function stringifyCircularAutoChunks(data, replacer = null, space = null) {
1921
+ let result;
1922
+
1923
+ try {
1924
+ result = arguments.length === 1 ? JSON.stringify(data) // @ts-ignore
1925
+ : JSON.stringify(data, replacer, space);
1926
+ } catch (e) {
1927
+ result = stringifyStrictCircularAutoChunks(data, replacer, space);
1928
+ }
1929
+
1930
+ if (result.length > MAX_SERIALIZED_SIZE) {
1931
+ const chunkCount = Math.ceil(result.length / MAX_SERIALIZED_SIZE);
1932
+ const chunks = [];
1933
+
1934
+ for (let i = 0; i < chunkCount; i++) {
1935
+ chunks.push(result.slice(i * MAX_SERIALIZED_SIZE, (i + 1) * MAX_SERIALIZED_SIZE));
1936
+ }
1937
+
1938
+ return chunks;
1939
+ }
1940
+
1941
+ return result;
1942
+ }
1943
+
1944
+ exports.stringifyCircularAutoChunks = stringifyCircularAutoChunks;
1945
+
1946
+ function parseCircularAutoChunks(data, reviver = null) {
1947
+ if (Array.isArray(data)) {
1948
+ data = data.join('');
1949
+ }
1950
+
1951
+ const hasCircular = /^\s/.test(data);
1952
+
1953
+ if (!hasCircular) {
1954
+ return arguments.length === 1 ? JSON.parse(data) // @ts-ignore
1955
+ : JSON.parse(data, reviver);
1956
+ } else {
1957
+ const list = JSON.parse(data);
1958
+ decode(list, reviver);
1959
+ return list[0];
1960
+ }
1961
+ }
1962
+
1963
+ exports.parseCircularAutoChunks = parseCircularAutoChunks;
1964
+
1965
+ function stringifyStrictCircularAutoChunks(data, replacer = null, space = null) {
1966
+ const list = [];
1967
+ encode(data, replacer, list, new Map());
1968
+ return space ? ' ' + JSON.stringify(list, null, space) : ' ' + JSON.stringify(list);
1969
+ }
1970
+
1971
+ exports.stringifyStrictCircularAutoChunks = stringifyStrictCircularAutoChunks;
1972
+
1973
+ /***/ }),
1974
+
1975
+ /***/ "../shared-utils/lib/util.js":
1976
+ /*!***********************************!*\
1977
+ !*** ../shared-utils/lib/util.js ***!
1978
+ \***********************************/
1979
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1980
+
1981
+
1982
+
1983
+ var __importDefault = this && this.__importDefault || function (mod) {
1984
+ return mod && mod.__esModule ? mod : {
1985
+ "default": mod
1986
+ };
1987
+ };
1988
+
1989
+ Object.defineProperty(exports, "__esModule", ({
1990
+ value: true
1991
+ }));
1992
+ exports.isEmptyObject = exports.copyToClipboard = exports.escape = exports.openInEditor = exports.focusInput = exports.simpleGet = exports.sortByKey = exports.searchDeepInObject = exports.isPlainObject = exports.revive = exports.parse = exports.getCustomRefDetails = exports.getCustomHTMLElementDetails = exports.getCustomFunctionDetails = exports.getCustomComponentDefinitionDetails = exports.getComponentName = exports.reviveSet = exports.getCustomSetDetails = exports.reviveMap = exports.getCustomMapDetails = exports.stringify = exports.specialTokenToString = exports.MAX_ARRAY_SIZE = exports.MAX_STRING_SIZE = exports.SPECIAL_TOKENS = exports.NAN = exports.NEGATIVE_INFINITY = exports.INFINITY = exports.UNDEFINED = exports.inDoc = exports.getComponentDisplayName = exports.kebabize = exports.camelize = exports.classify = void 0;
1993
+
1994
+ const path_1 = __importDefault(__webpack_require__(/*! path */ "../../node_modules/path-browserify/index.js"));
1995
+
1996
+ const transfer_1 = __webpack_require__(/*! ./transfer */ "../shared-utils/lib/transfer.js");
1997
+
1998
+ const backend_1 = __webpack_require__(/*! ./backend */ "../shared-utils/lib/backend.js");
1999
+
2000
+ const shared_data_1 = __webpack_require__(/*! ./shared-data */ "../shared-utils/lib/shared-data.js");
2001
+
2002
+ const env_1 = __webpack_require__(/*! ./env */ "../shared-utils/lib/env.js");
2003
+
2004
+ function cached(fn) {
2005
+ const cache = Object.create(null);
2006
+ return function cachedFn(str) {
2007
+ const hit = cache[str];
2008
+ return hit || (cache[str] = fn(str));
2009
+ };
2010
+ }
2011
+
2012
+ const classifyRE = /(?:^|[-_/])(\w)/g;
2013
+ exports.classify = cached(str => {
2014
+ // fix: str.replace may causes '"replace" is not a function' exception.
2015
+ // This bug may causes the UI 'Component Filter' to not work properly
2016
+ // e.g. The type of 'str' is Number.
2017
+ // So need cover 'str' to String.
2018
+ return str && ('' + str).replace(classifyRE, toUpper);
2019
+ });
2020
+ const camelizeRE = /-(\w)/g;
2021
+ exports.camelize = cached(str => {
2022
+ return str && str.replace(camelizeRE, toUpper);
2023
+ });
2024
+ const kebabizeRE = /([a-z0-9])([A-Z])/g;
2025
+ exports.kebabize = cached(str => {
2026
+ return str && str.replace(kebabizeRE, (_, lowerCaseCharacter, upperCaseLetter) => {
2027
+ return `${lowerCaseCharacter}-${upperCaseLetter}`;
2028
+ }).toLowerCase();
2029
+ });
2030
+
2031
+ function toUpper(_, c) {
2032
+ return c ? c.toUpperCase() : '';
2033
+ }
2034
+
2035
+ function getComponentDisplayName(originalName, style = 'class') {
2036
+ switch (style) {
2037
+ case 'class':
2038
+ return (0, exports.classify)(originalName);
2039
+
2040
+ case 'kebab':
2041
+ return (0, exports.kebabize)(originalName);
2042
+
2043
+ case 'original':
2044
+ default:
2045
+ return originalName;
2046
+ }
2047
+ }
2048
+
2049
+ exports.getComponentDisplayName = getComponentDisplayName;
2050
+
2051
+ function inDoc(node) {
2052
+ if (!node) return false;
2053
+ const doc = node.ownerDocument.documentElement;
2054
+ const parent = node.parentNode;
2055
+ return doc === node || doc === parent || !!(parent && parent.nodeType === 1 && doc.contains(parent));
2056
+ }
2057
+
2058
+ exports.inDoc = inDoc;
2059
+ /**
2060
+ * Stringify/parse data using CircularJSON.
2061
+ */
2062
+
2063
+ exports.UNDEFINED = '__vue_devtool_undefined__';
2064
+ exports.INFINITY = '__vue_devtool_infinity__';
2065
+ exports.NEGATIVE_INFINITY = '__vue_devtool_negative_infinity__';
2066
+ exports.NAN = '__vue_devtool_nan__';
2067
+ exports.SPECIAL_TOKENS = {
2068
+ true: true,
2069
+ false: false,
2070
+ undefined: exports.UNDEFINED,
2071
+ null: null,
2072
+ '-Infinity': exports.NEGATIVE_INFINITY,
2073
+ Infinity: exports.INFINITY,
2074
+ NaN: exports.NAN
2075
+ };
2076
+ exports.MAX_STRING_SIZE = 10000;
2077
+ exports.MAX_ARRAY_SIZE = 5000;
2078
+
2079
+ function specialTokenToString(value) {
2080
+ if (value === null) {
2081
+ return 'null';
2082
+ } else if (value === exports.UNDEFINED) {
2083
+ return 'undefined';
2084
+ } else if (value === exports.NAN) {
2085
+ return 'NaN';
2086
+ } else if (value === exports.INFINITY) {
2087
+ return 'Infinity';
2088
+ } else if (value === exports.NEGATIVE_INFINITY) {
2089
+ return '-Infinity';
2090
+ }
2091
+
2092
+ return false;
2093
+ }
2094
+
2095
+ exports.specialTokenToString = specialTokenToString;
2096
+ /**
2097
+ * Needed to prevent stack overflow
2098
+ * while replacing complex objects
2099
+ * like components because we create
2100
+ * new objects with the CustomValue API
2101
+ * (.i.e `{ _custom: { ... } }`)
2102
+ */
2103
+
2104
+ class EncodeCache {
2105
+ constructor() {
2106
+ this.map = new Map();
2107
+ }
2108
+ /**
2109
+ * Returns a result unique to each input data
2110
+ * @param {*} data Input data
2111
+ * @param {*} factory Function used to create the unique result
2112
+ */
2113
+
2114
+
2115
+ cache(data, factory) {
2116
+ const cached = this.map.get(data);
2117
+
2118
+ if (cached) {
2119
+ return cached;
2120
+ } else {
2121
+ const result = factory(data);
2122
+ this.map.set(data, result);
2123
+ return result;
2124
+ }
2125
+ }
2126
+
2127
+ clear() {
2128
+ this.map.clear();
2129
+ }
2130
+
2131
+ }
2132
+
2133
+ const encodeCache = new EncodeCache();
2134
+
2135
+ class ReviveCache {
2136
+ constructor(maxSize) {
2137
+ this.maxSize = maxSize;
2138
+ this.map = new Map();
2139
+ this.index = 0;
2140
+ this.size = 0;
2141
+ }
2142
+
2143
+ cache(value) {
2144
+ const currentIndex = this.index;
2145
+ this.map.set(currentIndex, value);
2146
+ this.size++;
2147
+
2148
+ if (this.size > this.maxSize) {
2149
+ this.map.delete(currentIndex - this.size);
2150
+ this.size--;
2151
+ }
2152
+
2153
+ this.index++;
2154
+ return currentIndex;
2155
+ }
2156
+
2157
+ read(id) {
2158
+ return this.map.get(id);
2159
+ }
2160
+
2161
+ }
2162
+
2163
+ const reviveCache = new ReviveCache(1000);
2164
+ const replacers = {
2165
+ internal: replacerForInternal,
2166
+ user: replaceForUser
2167
+ };
2168
+
2169
+ function stringify(data, target = 'internal') {
2170
+ // Create a fresh cache for each serialization
2171
+ encodeCache.clear();
2172
+ return (0, transfer_1.stringifyCircularAutoChunks)(data, replacers[target]);
2173
+ }
2174
+
2175
+ exports.stringify = stringify;
2176
+
2177
+ function replacerForInternal(key) {
2178
+ var _a; // @ts-ignore
2179
+
2180
+
2181
+ const val = this[key];
2182
+ const type = typeof val;
2183
+
2184
+ if (Array.isArray(val)) {
2185
+ const l = val.length;
2186
+
2187
+ if (l > exports.MAX_ARRAY_SIZE) {
2188
+ return {
2189
+ _isArray: true,
2190
+ length: l,
2191
+ items: val.slice(0, exports.MAX_ARRAY_SIZE)
2192
+ };
2193
+ }
2194
+
2195
+ return val;
2196
+ } else if (typeof val === 'string') {
2197
+ if (val.length > exports.MAX_STRING_SIZE) {
2198
+ return val.substring(0, exports.MAX_STRING_SIZE) + `... (${val.length} total length)`;
2199
+ } else {
2200
+ return val;
2201
+ }
2202
+ } else if (type === 'undefined') {
2203
+ return exports.UNDEFINED;
2204
+ } else if (val === Infinity) {
2205
+ return exports.INFINITY;
2206
+ } else if (val === -Infinity) {
2207
+ return exports.NEGATIVE_INFINITY;
2208
+ } else if (type === 'function') {
2209
+ return getCustomFunctionDetails(val);
2210
+ } else if (type === 'symbol') {
2211
+ return `[native Symbol ${Symbol.prototype.toString.call(val)}]`;
2212
+ } else if (val !== null && type === 'object') {
2213
+ const proto = Object.prototype.toString.call(val);
2214
+
2215
+ if (proto === '[object Map]') {
2216
+ return encodeCache.cache(val, () => getCustomMapDetails(val));
2217
+ } else if (proto === '[object Set]') {
2218
+ return encodeCache.cache(val, () => getCustomSetDetails(val));
2219
+ } else if (proto === '[object RegExp]') {
2220
+ // special handling of native type
2221
+ return `[native RegExp ${RegExp.prototype.toString.call(val)}]`;
2222
+ } else if (proto === '[object Date]') {
2223
+ return `[native Date ${Date.prototype.toString.call(val)}]`;
2224
+ } else if (proto === '[object Error]') {
2225
+ return `[native Error ${val.message}<>${val.stack}]`;
2226
+ } else if (val.state && val._vm) {
2227
+ return encodeCache.cache(val, () => (0, backend_1.getCustomStoreDetails)(val));
2228
+ } else if (val.constructor && val.constructor.name === 'VueRouter') {
2229
+ return encodeCache.cache(val, () => (0, backend_1.getCustomRouterDetails)(val));
2230
+ } else if ((0, backend_1.isVueInstance)(val)) {
2231
+ return encodeCache.cache(val, () => (0, backend_1.getCustomInstanceDetails)(val));
2232
+ } else if (typeof val.render === 'function') {
2233
+ return encodeCache.cache(val, () => getCustomComponentDefinitionDetails(val));
2234
+ } else if (val.constructor && val.constructor.name === 'VNode') {
2235
+ return `[native VNode <${val.tag}>]`;
2236
+ } else if (typeof HTMLElement !== 'undefined' && val instanceof HTMLElement) {
2237
+ return encodeCache.cache(val, () => getCustomHTMLElementDetails(val));
2238
+ } else if (((_a = val.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Store' && val._wrappedGetters) {
2239
+ return `[object Store]`;
2240
+ } else if (val.currentRoute) {
2241
+ return `[object Router]`;
2242
+ }
2243
+
2244
+ const customDetails = (0, backend_1.getCustomObjectDetails)(val, proto);
2245
+ if (customDetails != null) return customDetails;
2246
+ } else if (Number.isNaN(val)) {
2247
+ return exports.NAN;
2248
+ }
2249
+
2250
+ return sanitize(val);
2251
+ } // @TODO revive from backend to have more data to the clipboard
2252
+
2253
+
2254
+ function replaceForUser(key) {
2255
+ // @ts-ignore
2256
+ let val = this[key];
2257
+ const type = typeof val;
2258
+
2259
+ if ((val === null || val === void 0 ? void 0 : val._custom) && 'value' in val._custom) {
2260
+ val = val._custom.value;
2261
+ }
2262
+
2263
+ if (type !== 'object') {
2264
+ if (val === exports.UNDEFINED) {
2265
+ return undefined;
2266
+ } else if (val === exports.INFINITY) {
2267
+ return Infinity;
2268
+ } else if (val === exports.NEGATIVE_INFINITY) {
2269
+ return -Infinity;
2270
+ } else if (val === exports.NAN) {
2271
+ return NaN;
2272
+ }
2273
+
2274
+ return val;
2275
+ }
2276
+
2277
+ return sanitize(val);
2278
+ }
2279
+
2280
+ function getCustomMapDetails(val) {
2281
+ const list = [];
2282
+ val.forEach((value, key) => list.push({
2283
+ key,
2284
+ value
2285
+ }));
2286
+ return {
2287
+ _custom: {
2288
+ type: 'map',
2289
+ display: 'Map',
2290
+ value: list,
2291
+ readOnly: true,
2292
+ fields: {
2293
+ abstract: true
2294
+ }
2295
+ }
2296
+ };
2297
+ }
2298
+
2299
+ exports.getCustomMapDetails = getCustomMapDetails;
2300
+
2301
+ function reviveMap(val) {
2302
+ const result = new Map();
2303
+ const list = val._custom.value;
2304
+
2305
+ for (let i = 0; i < list.length; i++) {
2306
+ const {
2307
+ key,
2308
+ value
2309
+ } = list[i];
2310
+ result.set(key, revive(value));
2311
+ }
2312
+
2313
+ return result;
2314
+ }
2315
+
2316
+ exports.reviveMap = reviveMap;
2317
+
2318
+ function getCustomSetDetails(val) {
2319
+ const list = Array.from(val);
2320
+ return {
2321
+ _custom: {
2322
+ type: 'set',
2323
+ display: `Set[${list.length}]`,
2324
+ value: list,
2325
+ readOnly: true
2326
+ }
2327
+ };
2328
+ }
2329
+
2330
+ exports.getCustomSetDetails = getCustomSetDetails;
2331
+
2332
+ function reviveSet(val) {
2333
+ const result = new Set();
2334
+ const list = val._custom.value;
2335
+
2336
+ for (let i = 0; i < list.length; i++) {
2337
+ const value = list[i];
2338
+ result.add(revive(value));
2339
+ }
2340
+
2341
+ return result;
2342
+ }
2343
+
2344
+ exports.reviveSet = reviveSet; // Use a custom basename functions instead of the shimed version
2345
+ // because it doesn't work on Windows
2346
+
2347
+ function basename(filename, ext) {
2348
+ return path_1.default.basename(filename.replace(/^[a-zA-Z]:/, '').replace(/\\/g, '/'), ext);
2349
+ }
2350
+
2351
+ function getComponentName(options) {
2352
+ const name = options.displayName || options.name || options._componentTag;
2353
+
2354
+ if (name) {
2355
+ return name;
2356
+ }
2357
+
2358
+ const file = options.__file; // injected by vue-loader
2359
+
2360
+ if (file) {
2361
+ return (0, exports.classify)(basename(file, '.vue'));
2362
+ }
2363
+ }
2364
+
2365
+ exports.getComponentName = getComponentName;
2366
+
2367
+ function getCustomComponentDefinitionDetails(def) {
2368
+ let display = getComponentName(def);
2369
+
2370
+ if (display) {
2371
+ if (def.name && def.__file) {
2372
+ display += ` <span>(${def.__file})</span>`;
2373
+ }
2374
+ } else {
2375
+ display = '<i>Unknown Component</i>';
2376
+ }
2377
+
2378
+ return {
2379
+ _custom: {
2380
+ type: 'component-definition',
2381
+ display,
2382
+ tooltip: 'Component definition',
2383
+ ...(def.__file ? {
2384
+ file: def.__file
2385
+ } : {})
2386
+ }
2387
+ };
2388
+ }
2389
+
2390
+ exports.getCustomComponentDefinitionDetails = getCustomComponentDefinitionDetails; // eslint-disable-next-line @typescript-eslint/ban-types
2391
+
2392
+ function getCustomFunctionDetails(func) {
2393
+ let string = '';
2394
+ let matches = null;
2395
+
2396
+ try {
2397
+ string = Function.prototype.toString.call(func);
2398
+ matches = String.prototype.match.call(string, /\([\s\S]*?\)/);
2399
+ } catch (e) {// Func is probably a Proxy, which can break Function.prototype.toString()
2400
+ } // Trim any excess whitespace from the argument string
2401
+
2402
+
2403
+ const match = matches && matches[0];
2404
+ const args = typeof match === 'string' ? match : '(?)';
2405
+ const name = typeof func.name === 'string' ? func.name : '';
2406
+ return {
2407
+ _custom: {
2408
+ type: 'function',
2409
+ display: `<span style="opacity:.5;">function</span> ${escape(name)}${args}`,
2410
+ tooltip: string.trim() ? `<pre>${string}</pre>` : null,
2411
+ _reviveId: reviveCache.cache(func)
2412
+ }
2413
+ };
2414
+ }
2415
+
2416
+ exports.getCustomFunctionDetails = getCustomFunctionDetails;
2417
+
2418
+ function getCustomHTMLElementDetails(value) {
2419
+ try {
2420
+ return {
2421
+ _custom: {
2422
+ type: 'HTMLElement',
2423
+ display: `<span class="opacity-30">&lt;</span><span class="text-blue-500">${value.tagName.toLowerCase()}</span><span class="opacity-30">&gt;</span>`,
2424
+ value: namedNodeMapToObject(value.attributes),
2425
+ actions: [{
2426
+ icon: 'input',
2427
+ tooltip: 'Log element to console',
2428
+ action: () => {
2429
+ // eslint-disable-next-line no-console
2430
+ console.log(value);
2431
+ }
2432
+ }]
2433
+ }
2434
+ };
2435
+ } catch (e) {
2436
+ return {
2437
+ _custom: {
2438
+ type: 'HTMLElement',
2439
+ display: `<span class="text-blue-500">${String(value)}</span>`
2440
+ }
2441
+ };
2442
+ }
2443
+ }
2444
+
2445
+ exports.getCustomHTMLElementDetails = getCustomHTMLElementDetails;
2446
+
2447
+ function namedNodeMapToObject(map) {
2448
+ const result = {};
2449
+ const l = map.length;
2450
+
2451
+ for (let i = 0; i < l; i++) {
2452
+ const node = map.item(i);
2453
+ result[node.name] = node.value;
2454
+ }
2455
+
2456
+ return result;
2457
+ }
2458
+
2459
+ function getCustomRefDetails(instance, key, ref) {
2460
+ let value;
2461
+
2462
+ if (Array.isArray(ref)) {
2463
+ value = ref.map(r => getCustomRefDetails(instance, key, r)).map(data => data.value);
2464
+ } else {
2465
+ let name;
2466
+
2467
+ if (ref._isVue) {
2468
+ name = getComponentName(ref.$options);
2469
+ } else {
2470
+ name = ref.tagName.toLowerCase();
2471
+ }
2472
+
2473
+ value = {
2474
+ _custom: {
2475
+ display: `&lt;${name}` + (ref.id ? ` <span class="attr-title">id</span>="${ref.id}"` : '') + (ref.className ? ` <span class="attr-title">class</span>="${ref.className}"` : '') + '&gt;',
2476
+ uid: instance.__VUE_DEVTOOLS_UID__,
2477
+ type: 'reference'
2478
+ }
2479
+ };
2480
+ }
2481
+
2482
+ return {
2483
+ type: '$refs',
2484
+ key: key,
2485
+ value,
2486
+ editable: false
2487
+ };
2488
+ }
2489
+
2490
+ exports.getCustomRefDetails = getCustomRefDetails;
2491
+
2492
+ function parse(data, revive = false) {
2493
+ return revive ? (0, transfer_1.parseCircularAutoChunks)(data, reviver) : (0, transfer_1.parseCircularAutoChunks)(data);
2494
+ }
2495
+
2496
+ exports.parse = parse;
2497
+ const specialTypeRE = /^\[native (\w+) (.*?)(<>((.|\s)*))?\]$/;
2498
+ const symbolRE = /^\[native Symbol Symbol\((.*)\)\]$/;
2499
+
2500
+ function reviver(key, val) {
2501
+ return revive(val);
2502
+ }
2503
+
2504
+ function revive(val) {
2505
+ if (val === exports.UNDEFINED) {
2506
+ return undefined;
2507
+ } else if (val === exports.INFINITY) {
2508
+ return Infinity;
2509
+ } else if (val === exports.NEGATIVE_INFINITY) {
2510
+ return -Infinity;
2511
+ } else if (val === exports.NAN) {
2512
+ return NaN;
2513
+ } else if (val && val._custom) {
2514
+ const {
2515
+ _custom: custom
2516
+ } = val;
2517
+
2518
+ if (custom.type === 'component') {
2519
+ return (0, backend_1.getInstanceMap)().get(custom.id);
2520
+ } else if (custom.type === 'map') {
2521
+ return reviveMap(val);
2522
+ } else if (custom.type === 'set') {
2523
+ return reviveSet(val);
2524
+ } else if (custom._reviveId) {
2525
+ return reviveCache.read(custom._reviveId);
2526
+ } else {
2527
+ return revive(custom.value);
2528
+ }
2529
+ } else if (symbolRE.test(val)) {
2530
+ const [, string] = symbolRE.exec(val);
2531
+ return Symbol.for(string);
2532
+ } else if (specialTypeRE.test(val)) {
2533
+ const [, type, string,, details] = specialTypeRE.exec(val);
2534
+ const result = new env_1.target[type](string);
2535
+
2536
+ if (type === 'Error' && details) {
2537
+ result.stack = details;
2538
+ }
2539
+
2540
+ return result;
2541
+ } else {
2542
+ return val;
2543
+ }
2544
+ }
2545
+
2546
+ exports.revive = revive;
2547
+ /**
2548
+ * Sanitize data to be posted to the other side.
2549
+ * Since the message posted is sent with structured clone,
2550
+ * we need to filter out any types that might cause an error.
2551
+ *
2552
+ * @param {*} data
2553
+ * @return {*}
2554
+ */
2555
+
2556
+ function sanitize(data) {
2557
+ if (!isPrimitive(data) && !Array.isArray(data) && !isPlainObject(data)) {
2558
+ // handle types that will probably cause issues in
2559
+ // the structured clone
2560
+ return Object.prototype.toString.call(data);
2561
+ } else {
2562
+ return data;
2563
+ }
2564
+ }
2565
+
2566
+ function isPlainObject(obj) {
2567
+ return Object.prototype.toString.call(obj) === '[object Object]';
2568
+ }
2569
+
2570
+ exports.isPlainObject = isPlainObject;
2571
+
2572
+ function isPrimitive(data) {
2573
+ if (data == null) {
2574
+ return true;
2575
+ }
2576
+
2577
+ const type = typeof data;
2578
+ return type === 'string' || type === 'number' || type === 'boolean';
2579
+ }
2580
+ /**
2581
+ * Searches a key or value in the object, with a maximum deepness
2582
+ * @param {*} obj Search target
2583
+ * @param {string} searchTerm Search string
2584
+ * @returns {boolean} Search match
2585
+ */
2586
+
2587
+
2588
+ function searchDeepInObject(obj, searchTerm) {
2589
+ const seen = new Map();
2590
+ const result = internalSearchObject(obj, searchTerm.toLowerCase(), seen, 0);
2591
+ seen.clear();
2592
+ return result;
2593
+ }
2594
+
2595
+ exports.searchDeepInObject = searchDeepInObject;
2596
+ const SEARCH_MAX_DEPTH = 10;
2597
+ /**
2598
+ * Executes a search on each field of the provided object
2599
+ * @param {*} obj Search target
2600
+ * @param {string} searchTerm Search string
2601
+ * @param {Map<any,boolean>} seen Map containing the search result to prevent stack overflow by walking on the same object multiple times
2602
+ * @param {number} depth Deep search depth level, which is capped to prevent performance issues
2603
+ * @returns {boolean} Search match
2604
+ */
2605
+
2606
+ function internalSearchObject(obj, searchTerm, seen, depth) {
2607
+ if (depth > SEARCH_MAX_DEPTH) {
2608
+ return false;
2609
+ }
2610
+
2611
+ let match = false;
2612
+ const keys = Object.keys(obj);
2613
+ let key, value;
2614
+
2615
+ for (let i = 0; i < keys.length; i++) {
2616
+ key = keys[i];
2617
+ value = obj[key];
2618
+ match = internalSearchCheck(searchTerm, key, value, seen, depth + 1);
2619
+
2620
+ if (match) {
2621
+ break;
2622
+ }
2623
+ }
2624
+
2625
+ return match;
2626
+ }
2627
+ /**
2628
+ * Executes a search on each value of the provided array
2629
+ * @param {*} array Search target
2630
+ * @param {string} searchTerm Search string
2631
+ * @param {Map<any,boolean>} seen Map containing the search result to prevent stack overflow by walking on the same object multiple times
2632
+ * @param {number} depth Deep search depth level, which is capped to prevent performance issues
2633
+ * @returns {boolean} Search match
2634
+ */
2635
+
2636
+
2637
+ function internalSearchArray(array, searchTerm, seen, depth) {
2638
+ if (depth > SEARCH_MAX_DEPTH) {
2639
+ return false;
2640
+ }
2641
+
2642
+ let match = false;
2643
+ let value;
2644
+
2645
+ for (let i = 0; i < array.length; i++) {
2646
+ value = array[i];
2647
+ match = internalSearchCheck(searchTerm, null, value, seen, depth + 1);
2648
+
2649
+ if (match) {
2650
+ break;
2651
+ }
2652
+ }
2653
+
2654
+ return match;
2655
+ }
2656
+ /**
2657
+ * Checks if the provided field matches the search terms
2658
+ * @param {string} searchTerm Search string
2659
+ * @param {string} key Field key (null if from array)
2660
+ * @param {*} value Field value
2661
+ * @param {Map<any,boolean>} seen Map containing the search result to prevent stack overflow by walking on the same object multiple times
2662
+ * @param {number} depth Deep search depth level, which is capped to prevent performance issues
2663
+ * @returns {boolean} Search match
2664
+ */
2665
+
2666
+
2667
+ function internalSearchCheck(searchTerm, key, value, seen, depth) {
2668
+ let match = false;
2669
+ let result;
2670
+
2671
+ if (key === '_custom') {
2672
+ key = value.display;
2673
+ value = value.value;
2674
+ }
2675
+
2676
+ (result = specialTokenToString(value)) && (value = result);
2677
+
2678
+ if (key && compare(key, searchTerm)) {
2679
+ match = true;
2680
+ seen.set(value, true);
2681
+ } else if (seen.has(value)) {
2682
+ match = seen.get(value);
2683
+ } else if (Array.isArray(value)) {
2684
+ seen.set(value, null);
2685
+ match = internalSearchArray(value, searchTerm, seen, depth);
2686
+ seen.set(value, match);
2687
+ } else if (isPlainObject(value)) {
2688
+ seen.set(value, null);
2689
+ match = internalSearchObject(value, searchTerm, seen, depth);
2690
+ seen.set(value, match);
2691
+ } else if (compare(value, searchTerm)) {
2692
+ match = true;
2693
+ seen.set(value, true);
2694
+ }
2695
+
2696
+ return match;
2697
+ }
2698
+ /**
2699
+ * Compares two values
2700
+ * @param {*} value Mixed type value that will be cast to string
2701
+ * @param {string} searchTerm Search string
2702
+ * @returns {boolean} Search match
2703
+ */
2704
+
2705
+
2706
+ function compare(value, searchTerm) {
2707
+ return ('' + value).toLowerCase().indexOf(searchTerm) !== -1;
2708
+ }
2709
+
2710
+ function sortByKey(state) {
2711
+ return state && state.slice().sort((a, b) => {
2712
+ if (a.key < b.key) return -1;
2713
+ if (a.key > b.key) return 1;
2714
+ return 0;
2715
+ });
2716
+ }
2717
+
2718
+ exports.sortByKey = sortByKey;
2719
+
2720
+ function simpleGet(object, path) {
2721
+ const sections = Array.isArray(path) ? path : path.split('.');
2722
+
2723
+ for (let i = 0; i < sections.length; i++) {
2724
+ object = object[sections[i]];
2725
+
2726
+ if (!object) {
2727
+ return undefined;
2728
+ }
2729
+ }
2730
+
2731
+ return object;
2732
+ }
2733
+
2734
+ exports.simpleGet = simpleGet;
2735
+
2736
+ function focusInput(el) {
2737
+ el.focus();
2738
+ el.setSelectionRange(0, el.value.length);
2739
+ }
2740
+
2741
+ exports.focusInput = focusInput;
2742
+
2743
+ function openInEditor(file) {
2744
+ // Console display
2745
+ const fileName = file.replace(/\\/g, '\\\\');
2746
+ const src = `fetch('${shared_data_1.SharedData.openInEditorHost}__open-in-editor?file=${encodeURI(file)}').then(response => {
2747
+ if (response.ok) {
2748
+ console.log('File ${fileName} opened in editor')
2749
+ } else {
2750
+ const msg = 'Opening component ${fileName} failed'
2751
+ const target = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {}
2752
+ if (target.__VUE_DEVTOOLS_TOAST__) {
2753
+ target.__VUE_DEVTOOLS_TOAST__(msg, 'error')
2754
+ } else {
2755
+ console.log('%c' + msg, 'color:red')
2756
+ }
2757
+ console.log('Check the setup of your project, see https://devtools.vuejs.org/guide/open-in-editor.html')
2758
+ }
2759
+ })`;
2760
+
2761
+ if (env_1.isChrome) {
2762
+ env_1.target.chrome.devtools.inspectedWindow.eval(src);
2763
+ } else {
2764
+ // eslint-disable-next-line no-eval
2765
+ [eval][0](src);
2766
+ }
2767
+ }
2768
+
2769
+ exports.openInEditor = openInEditor;
2770
+ const ESC = {
2771
+ '<': '&lt;',
2772
+ '>': '&gt;',
2773
+ '"': '&quot;',
2774
+ '&': '&amp;'
2775
+ };
2776
+
2777
+ function escape(s) {
2778
+ return s.replace(/[<>"&]/g, escapeChar);
2779
+ }
2780
+
2781
+ exports.escape = escape;
2782
+
2783
+ function escapeChar(a) {
2784
+ return ESC[a] || a;
2785
+ }
2786
+
2787
+ function copyToClipboard(state) {
2788
+ let text;
2789
+
2790
+ if (typeof state !== 'object') {
2791
+ text = String(state);
2792
+ } else {
2793
+ text = stringify(state, 'user');
2794
+ } // @TODO navigator.clipboard is buggy in extensions
2795
+
2796
+
2797
+ if (typeof document === 'undefined') return;
2798
+ const dummyTextArea = document.createElement('textarea');
2799
+ dummyTextArea.textContent = text;
2800
+ document.body.appendChild(dummyTextArea);
2801
+ dummyTextArea.select();
2802
+ document.execCommand('copy');
2803
+ document.body.removeChild(dummyTextArea);
2804
+ }
2805
+
2806
+ exports.copyToClipboard = copyToClipboard;
2807
+
2808
+ function isEmptyObject(obj) {
2809
+ return obj === exports.UNDEFINED || !obj || Object.keys(obj).length === 0;
2810
+ }
2811
+
2812
+ exports.isEmptyObject = isEmptyObject;
2813
+
2814
+ /***/ }),
2815
+
2816
+ /***/ "../../node_modules/events/events.js":
2817
+ /*!*******************************************!*\
2818
+ !*** ../../node_modules/events/events.js ***!
2819
+ \*******************************************/
2820
+ /***/ ((module) => {
2821
+
2822
+ // Copyright Joyent, Inc. and other Node contributors.
2823
+ //
2824
+ // Permission is hereby granted, free of charge, to any person obtaining a
2825
+ // copy of this software and associated documentation files (the
2826
+ // "Software"), to deal in the Software without restriction, including
2827
+ // without limitation the rights to use, copy, modify, merge, publish,
2828
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
2829
+ // persons to whom the Software is furnished to do so, subject to the
2830
+ // following conditions:
2831
+ //
2832
+ // The above copyright notice and this permission notice shall be included
2833
+ // in all copies or substantial portions of the Software.
2834
+ //
2835
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2836
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2837
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
2838
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
2839
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
2840
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2841
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
2842
+
2843
+
2844
+
2845
+ var R = typeof Reflect === 'object' ? Reflect : null
2846
+ var ReflectApply = R && typeof R.apply === 'function'
2847
+ ? R.apply
2848
+ : function ReflectApply(target, receiver, args) {
2849
+ return Function.prototype.apply.call(target, receiver, args);
2850
+ }
2851
+
2852
+ var ReflectOwnKeys
2853
+ if (R && typeof R.ownKeys === 'function') {
2854
+ ReflectOwnKeys = R.ownKeys
2855
+ } else if (Object.getOwnPropertySymbols) {
2856
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
2857
+ return Object.getOwnPropertyNames(target)
2858
+ .concat(Object.getOwnPropertySymbols(target));
2859
+ };
2860
+ } else {
2861
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
2862
+ return Object.getOwnPropertyNames(target);
2863
+ };
2864
+ }
2865
+
2866
+ function ProcessEmitWarning(warning) {
2867
+ if (console && console.warn) console.warn(warning);
2868
+ }
2869
+
2870
+ var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
2871
+ return value !== value;
2872
+ }
2873
+
2874
+ function EventEmitter() {
2875
+ EventEmitter.init.call(this);
2876
+ }
2877
+ module.exports = EventEmitter;
2878
+ module.exports.once = once;
2879
+
2880
+ // Backwards-compat with node 0.10.x
2881
+ EventEmitter.EventEmitter = EventEmitter;
2882
+
2883
+ EventEmitter.prototype._events = undefined;
2884
+ EventEmitter.prototype._eventsCount = 0;
2885
+ EventEmitter.prototype._maxListeners = undefined;
2886
+
2887
+ // By default EventEmitters will print a warning if more than 10 listeners are
2888
+ // added to it. This is a useful default which helps finding memory leaks.
2889
+ var defaultMaxListeners = 10;
2890
+
2891
+ function checkListener(listener) {
2892
+ if (typeof listener !== 'function') {
2893
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
2894
+ }
2895
+ }
2896
+
2897
+ Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
2898
+ enumerable: true,
2899
+ get: function() {
2900
+ return defaultMaxListeners;
2901
+ },
2902
+ set: function(arg) {
2903
+ if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
2904
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
2905
+ }
2906
+ defaultMaxListeners = arg;
2907
+ }
2908
+ });
2909
+
2910
+ EventEmitter.init = function() {
2911
+
2912
+ if (this._events === undefined ||
2913
+ this._events === Object.getPrototypeOf(this)._events) {
2914
+ this._events = Object.create(null);
2915
+ this._eventsCount = 0;
2916
+ }
2917
+
2918
+ this._maxListeners = this._maxListeners || undefined;
2919
+ };
2920
+
2921
+ // Obviously not all Emitters should be limited to 10. This function allows
2922
+ // that to be increased. Set to zero for unlimited.
2923
+ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
2924
+ if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
2925
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
2926
+ }
2927
+ this._maxListeners = n;
2928
+ return this;
2929
+ };
2930
+
2931
+ function _getMaxListeners(that) {
2932
+ if (that._maxListeners === undefined)
2933
+ return EventEmitter.defaultMaxListeners;
2934
+ return that._maxListeners;
2935
+ }
2936
+
2937
+ EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
2938
+ return _getMaxListeners(this);
2939
+ };
2940
+
2941
+ EventEmitter.prototype.emit = function emit(type) {
2942
+ var args = [];
2943
+ for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
2944
+ var doError = (type === 'error');
2945
+
2946
+ var events = this._events;
2947
+ if (events !== undefined)
2948
+ doError = (doError && events.error === undefined);
2949
+ else if (!doError)
2950
+ return false;
2951
+
2952
+ // If there is no 'error' event listener then throw.
2953
+ if (doError) {
2954
+ var er;
2955
+ if (args.length > 0)
2956
+ er = args[0];
2957
+ if (er instanceof Error) {
2958
+ // Note: The comments on the `throw` lines are intentional, they show
2959
+ // up in Node's output if this results in an unhandled exception.
2960
+ throw er; // Unhandled 'error' event
2961
+ }
2962
+ // At least give some kind of context to the user
2963
+ var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
2964
+ err.context = er;
2965
+ throw err; // Unhandled 'error' event
2966
+ }
2967
+
2968
+ var handler = events[type];
2969
+
2970
+ if (handler === undefined)
2971
+ return false;
2972
+
2973
+ if (typeof handler === 'function') {
2974
+ ReflectApply(handler, this, args);
2975
+ } else {
2976
+ var len = handler.length;
2977
+ var listeners = arrayClone(handler, len);
2978
+ for (var i = 0; i < len; ++i)
2979
+ ReflectApply(listeners[i], this, args);
2980
+ }
2981
+
2982
+ return true;
2983
+ };
2984
+
2985
+ function _addListener(target, type, listener, prepend) {
2986
+ var m;
2987
+ var events;
2988
+ var existing;
2989
+
2990
+ checkListener(listener);
2991
+
2992
+ events = target._events;
2993
+ if (events === undefined) {
2994
+ events = target._events = Object.create(null);
2995
+ target._eventsCount = 0;
2996
+ } else {
2997
+ // To avoid recursion in the case that type === "newListener"! Before
2998
+ // adding it to the listeners, first emit "newListener".
2999
+ if (events.newListener !== undefined) {
3000
+ target.emit('newListener', type,
3001
+ listener.listener ? listener.listener : listener);
3002
+
3003
+ // Re-assign `events` because a newListener handler could have caused the
3004
+ // this._events to be assigned to a new object
3005
+ events = target._events;
3006
+ }
3007
+ existing = events[type];
3008
+ }
3009
+
3010
+ if (existing === undefined) {
3011
+ // Optimize the case of one listener. Don't need the extra array object.
3012
+ existing = events[type] = listener;
3013
+ ++target._eventsCount;
3014
+ } else {
3015
+ if (typeof existing === 'function') {
3016
+ // Adding the second element, need to change to array.
3017
+ existing = events[type] =
3018
+ prepend ? [listener, existing] : [existing, listener];
3019
+ // If we've already got an array, just append.
3020
+ } else if (prepend) {
3021
+ existing.unshift(listener);
3022
+ } else {
3023
+ existing.push(listener);
3024
+ }
3025
+
3026
+ // Check for listener leak
3027
+ m = _getMaxListeners(target);
3028
+ if (m > 0 && existing.length > m && !existing.warned) {
3029
+ existing.warned = true;
3030
+ // No error code for this since it is a Warning
3031
+ // eslint-disable-next-line no-restricted-syntax
3032
+ var w = new Error('Possible EventEmitter memory leak detected. ' +
3033
+ existing.length + ' ' + String(type) + ' listeners ' +
3034
+ 'added. Use emitter.setMaxListeners() to ' +
3035
+ 'increase limit');
3036
+ w.name = 'MaxListenersExceededWarning';
3037
+ w.emitter = target;
3038
+ w.type = type;
3039
+ w.count = existing.length;
3040
+ ProcessEmitWarning(w);
3041
+ }
3042
+ }
3043
+
3044
+ return target;
3045
+ }
3046
+
3047
+ EventEmitter.prototype.addListener = function addListener(type, listener) {
3048
+ return _addListener(this, type, listener, false);
3049
+ };
3050
+
3051
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
3052
+
3053
+ EventEmitter.prototype.prependListener =
3054
+ function prependListener(type, listener) {
3055
+ return _addListener(this, type, listener, true);
3056
+ };
3057
+
3058
+ function onceWrapper() {
3059
+ if (!this.fired) {
3060
+ this.target.removeListener(this.type, this.wrapFn);
3061
+ this.fired = true;
3062
+ if (arguments.length === 0)
3063
+ return this.listener.call(this.target);
3064
+ return this.listener.apply(this.target, arguments);
3065
+ }
3066
+ }
3067
+
3068
+ function _onceWrap(target, type, listener) {
3069
+ var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
3070
+ var wrapped = onceWrapper.bind(state);
3071
+ wrapped.listener = listener;
3072
+ state.wrapFn = wrapped;
3073
+ return wrapped;
3074
+ }
3075
+
3076
+ EventEmitter.prototype.once = function once(type, listener) {
3077
+ checkListener(listener);
3078
+ this.on(type, _onceWrap(this, type, listener));
3079
+ return this;
3080
+ };
3081
+
3082
+ EventEmitter.prototype.prependOnceListener =
3083
+ function prependOnceListener(type, listener) {
3084
+ checkListener(listener);
3085
+ this.prependListener(type, _onceWrap(this, type, listener));
3086
+ return this;
3087
+ };
3088
+
3089
+ // Emits a 'removeListener' event if and only if the listener was removed.
3090
+ EventEmitter.prototype.removeListener =
3091
+ function removeListener(type, listener) {
3092
+ var list, events, position, i, originalListener;
3093
+
3094
+ checkListener(listener);
3095
+
3096
+ events = this._events;
3097
+ if (events === undefined)
3098
+ return this;
3099
+
3100
+ list = events[type];
3101
+ if (list === undefined)
3102
+ return this;
3103
+
3104
+ if (list === listener || list.listener === listener) {
3105
+ if (--this._eventsCount === 0)
3106
+ this._events = Object.create(null);
3107
+ else {
3108
+ delete events[type];
3109
+ if (events.removeListener)
3110
+ this.emit('removeListener', type, list.listener || listener);
3111
+ }
3112
+ } else if (typeof list !== 'function') {
3113
+ position = -1;
3114
+
3115
+ for (i = list.length - 1; i >= 0; i--) {
3116
+ if (list[i] === listener || list[i].listener === listener) {
3117
+ originalListener = list[i].listener;
3118
+ position = i;
3119
+ break;
3120
+ }
3121
+ }
3122
+
3123
+ if (position < 0)
3124
+ return this;
3125
+
3126
+ if (position === 0)
3127
+ list.shift();
3128
+ else {
3129
+ spliceOne(list, position);
3130
+ }
3131
+
3132
+ if (list.length === 1)
3133
+ events[type] = list[0];
3134
+
3135
+ if (events.removeListener !== undefined)
3136
+ this.emit('removeListener', type, originalListener || listener);
3137
+ }
3138
+
3139
+ return this;
3140
+ };
3141
+
3142
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
3143
+
3144
+ EventEmitter.prototype.removeAllListeners =
3145
+ function removeAllListeners(type) {
3146
+ var listeners, events, i;
3147
+
3148
+ events = this._events;
3149
+ if (events === undefined)
3150
+ return this;
3151
+
3152
+ // not listening for removeListener, no need to emit
3153
+ if (events.removeListener === undefined) {
3154
+ if (arguments.length === 0) {
3155
+ this._events = Object.create(null);
3156
+ this._eventsCount = 0;
3157
+ } else if (events[type] !== undefined) {
3158
+ if (--this._eventsCount === 0)
3159
+ this._events = Object.create(null);
3160
+ else
3161
+ delete events[type];
3162
+ }
3163
+ return this;
3164
+ }
3165
+
3166
+ // emit removeListener for all listeners on all events
3167
+ if (arguments.length === 0) {
3168
+ var keys = Object.keys(events);
3169
+ var key;
3170
+ for (i = 0; i < keys.length; ++i) {
3171
+ key = keys[i];
3172
+ if (key === 'removeListener') continue;
3173
+ this.removeAllListeners(key);
3174
+ }
3175
+ this.removeAllListeners('removeListener');
3176
+ this._events = Object.create(null);
3177
+ this._eventsCount = 0;
3178
+ return this;
3179
+ }
3180
+
3181
+ listeners = events[type];
3182
+
3183
+ if (typeof listeners === 'function') {
3184
+ this.removeListener(type, listeners);
3185
+ } else if (listeners !== undefined) {
3186
+ // LIFO order
3187
+ for (i = listeners.length - 1; i >= 0; i--) {
3188
+ this.removeListener(type, listeners[i]);
3189
+ }
3190
+ }
3191
+
3192
+ return this;
3193
+ };
3194
+
3195
+ function _listeners(target, type, unwrap) {
3196
+ var events = target._events;
3197
+
3198
+ if (events === undefined)
3199
+ return [];
3200
+
3201
+ var evlistener = events[type];
3202
+ if (evlistener === undefined)
3203
+ return [];
3204
+
3205
+ if (typeof evlistener === 'function')
3206
+ return unwrap ? [evlistener.listener || evlistener] : [evlistener];
3207
+
3208
+ return unwrap ?
3209
+ unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
3210
+ }
3211
+
3212
+ EventEmitter.prototype.listeners = function listeners(type) {
3213
+ return _listeners(this, type, true);
3214
+ };
3215
+
3216
+ EventEmitter.prototype.rawListeners = function rawListeners(type) {
3217
+ return _listeners(this, type, false);
3218
+ };
3219
+
3220
+ EventEmitter.listenerCount = function(emitter, type) {
3221
+ if (typeof emitter.listenerCount === 'function') {
3222
+ return emitter.listenerCount(type);
3223
+ } else {
3224
+ return listenerCount.call(emitter, type);
3225
+ }
3226
+ };
3227
+
3228
+ EventEmitter.prototype.listenerCount = listenerCount;
3229
+ function listenerCount(type) {
3230
+ var events = this._events;
3231
+
3232
+ if (events !== undefined) {
3233
+ var evlistener = events[type];
3234
+
3235
+ if (typeof evlistener === 'function') {
3236
+ return 1;
3237
+ } else if (evlistener !== undefined) {
3238
+ return evlistener.length;
3239
+ }
3240
+ }
3241
+
3242
+ return 0;
3243
+ }
3244
+
3245
+ EventEmitter.prototype.eventNames = function eventNames() {
3246
+ return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
3247
+ };
3248
+
3249
+ function arrayClone(arr, n) {
3250
+ var copy = new Array(n);
3251
+ for (var i = 0; i < n; ++i)
3252
+ copy[i] = arr[i];
3253
+ return copy;
3254
+ }
3255
+
3256
+ function spliceOne(list, index) {
3257
+ for (; index + 1 < list.length; index++)
3258
+ list[index] = list[index + 1];
3259
+ list.pop();
3260
+ }
3261
+
3262
+ function unwrapListeners(arr) {
3263
+ var ret = new Array(arr.length);
3264
+ for (var i = 0; i < ret.length; ++i) {
3265
+ ret[i] = arr[i].listener || arr[i];
3266
+ }
3267
+ return ret;
3268
+ }
3269
+
3270
+ function once(emitter, name) {
3271
+ return new Promise(function (resolve, reject) {
3272
+ function errorListener(err) {
3273
+ emitter.removeListener(name, resolver);
3274
+ reject(err);
3275
+ }
3276
+
3277
+ function resolver() {
3278
+ if (typeof emitter.removeListener === 'function') {
3279
+ emitter.removeListener('error', errorListener);
3280
+ }
3281
+ resolve([].slice.call(arguments));
3282
+ };
3283
+
3284
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
3285
+ if (name !== 'error') {
3286
+ addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
3287
+ }
3288
+ });
3289
+ }
3290
+
3291
+ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
3292
+ if (typeof emitter.on === 'function') {
3293
+ eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
3294
+ }
3295
+ }
3296
+
3297
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
3298
+ if (typeof emitter.on === 'function') {
3299
+ if (flags.once) {
3300
+ emitter.once(name, listener);
3301
+ } else {
3302
+ emitter.on(name, listener);
3303
+ }
3304
+ } else if (typeof emitter.addEventListener === 'function') {
3305
+ // EventTarget does not have `error` event semantics like Node
3306
+ // EventEmitters, we do not listen for `error` events here.
3307
+ emitter.addEventListener(name, function wrapListener(arg) {
3308
+ // IE does not have builtin `{ once: true }` support so we
3309
+ // have to do it manually.
3310
+ if (flags.once) {
3311
+ emitter.removeEventListener(name, wrapListener);
3312
+ }
3313
+ listener(arg);
3314
+ });
3315
+ } else {
3316
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
3317
+ }
3318
+ }
3319
+
3320
+
3321
+ /***/ }),
3322
+
3323
+ /***/ "../../node_modules/path-browserify/index.js":
3324
+ /*!***************************************************!*\
3325
+ !*** ../../node_modules/path-browserify/index.js ***!
3326
+ \***************************************************/
3327
+ /***/ ((module) => {
3328
+
3329
+ // 'path' module extracted from Node.js v8.11.1 (only the posix part)
3330
+ // transplited with Babel
3331
+
3332
+ // Copyright Joyent, Inc. and other Node contributors.
3333
+ //
3334
+ // Permission is hereby granted, free of charge, to any person obtaining a
3335
+ // copy of this software and associated documentation files (the
3336
+ // "Software"), to deal in the Software without restriction, including
3337
+ // without limitation the rights to use, copy, modify, merge, publish,
3338
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
3339
+ // persons to whom the Software is furnished to do so, subject to the
3340
+ // following conditions:
3341
+ //
3342
+ // The above copyright notice and this permission notice shall be included
3343
+ // in all copies or substantial portions of the Software.
3344
+ //
3345
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3346
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3347
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
3348
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
3349
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
3350
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
3351
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
3352
+
3353
+
3354
+
3355
+ function assertPath(path) {
3356
+ if (typeof path !== 'string') {
3357
+ throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));
3358
+ }
3359
+ }
3360
+
3361
+ // Resolves . and .. elements in a path with directory names
3362
+ function normalizeStringPosix(path, allowAboveRoot) {
3363
+ var res = '';
3364
+ var lastSegmentLength = 0;
3365
+ var lastSlash = -1;
3366
+ var dots = 0;
3367
+ var code;
3368
+ for (var i = 0; i <= path.length; ++i) {
3369
+ if (i < path.length)
3370
+ code = path.charCodeAt(i);
3371
+ else if (code === 47 /*/*/)
3372
+ break;
3373
+ else
3374
+ code = 47 /*/*/;
3375
+ if (code === 47 /*/*/) {
3376
+ if (lastSlash === i - 1 || dots === 1) {
3377
+ // NOOP
3378
+ } else if (lastSlash !== i - 1 && dots === 2) {
3379
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {
3380
+ if (res.length > 2) {
3381
+ var lastSlashIndex = res.lastIndexOf('/');
3382
+ if (lastSlashIndex !== res.length - 1) {
3383
+ if (lastSlashIndex === -1) {
3384
+ res = '';
3385
+ lastSegmentLength = 0;
3386
+ } else {
3387
+ res = res.slice(0, lastSlashIndex);
3388
+ lastSegmentLength = res.length - 1 - res.lastIndexOf('/');
3389
+ }
3390
+ lastSlash = i;
3391
+ dots = 0;
3392
+ continue;
3393
+ }
3394
+ } else if (res.length === 2 || res.length === 1) {
3395
+ res = '';
3396
+ lastSegmentLength = 0;
3397
+ lastSlash = i;
3398
+ dots = 0;
3399
+ continue;
3400
+ }
3401
+ }
3402
+ if (allowAboveRoot) {
3403
+ if (res.length > 0)
3404
+ res += '/..';
3405
+ else
3406
+ res = '..';
3407
+ lastSegmentLength = 2;
3408
+ }
3409
+ } else {
3410
+ if (res.length > 0)
3411
+ res += '/' + path.slice(lastSlash + 1, i);
3412
+ else
3413
+ res = path.slice(lastSlash + 1, i);
3414
+ lastSegmentLength = i - lastSlash - 1;
3415
+ }
3416
+ lastSlash = i;
3417
+ dots = 0;
3418
+ } else if (code === 46 /*.*/ && dots !== -1) {
3419
+ ++dots;
3420
+ } else {
3421
+ dots = -1;
3422
+ }
3423
+ }
3424
+ return res;
3425
+ }
3426
+
3427
+ function _format(sep, pathObject) {
3428
+ var dir = pathObject.dir || pathObject.root;
3429
+ var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');
3430
+ if (!dir) {
3431
+ return base;
3432
+ }
3433
+ if (dir === pathObject.root) {
3434
+ return dir + base;
3435
+ }
3436
+ return dir + sep + base;
3437
+ }
3438
+
3439
+ var posix = {
3440
+ // path.resolve([from ...], to)
3441
+ resolve: function resolve() {
3442
+ var resolvedPath = '';
3443
+ var resolvedAbsolute = false;
3444
+ var cwd;
3445
+
3446
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
3447
+ var path;
3448
+ if (i >= 0)
3449
+ path = arguments[i];
3450
+ else {
3451
+ if (cwd === undefined)
3452
+ cwd = process.cwd();
3453
+ path = cwd;
3454
+ }
3455
+
3456
+ assertPath(path);
3457
+
3458
+ // Skip empty entries
3459
+ if (path.length === 0) {
3460
+ continue;
3461
+ }
3462
+
3463
+ resolvedPath = path + '/' + resolvedPath;
3464
+ resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;
3465
+ }
3466
+
3467
+ // At this point the path should be resolved to a full absolute path, but
3468
+ // handle relative paths to be safe (might happen when process.cwd() fails)
3469
+
3470
+ // Normalize the path
3471
+ resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
3472
+
3473
+ if (resolvedAbsolute) {
3474
+ if (resolvedPath.length > 0)
3475
+ return '/' + resolvedPath;
3476
+ else
3477
+ return '/';
3478
+ } else if (resolvedPath.length > 0) {
3479
+ return resolvedPath;
3480
+ } else {
3481
+ return '.';
3482
+ }
3483
+ },
3484
+
3485
+ normalize: function normalize(path) {
3486
+ assertPath(path);
3487
+
3488
+ if (path.length === 0) return '.';
3489
+
3490
+ var isAbsolute = path.charCodeAt(0) === 47 /*/*/;
3491
+ var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;
3492
+
3493
+ // Normalize the path
3494
+ path = normalizeStringPosix(path, !isAbsolute);
3495
+
3496
+ if (path.length === 0 && !isAbsolute) path = '.';
3497
+ if (path.length > 0 && trailingSeparator) path += '/';
3498
+
3499
+ if (isAbsolute) return '/' + path;
3500
+ return path;
3501
+ },
3502
+
3503
+ isAbsolute: function isAbsolute(path) {
3504
+ assertPath(path);
3505
+ return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;
3506
+ },
3507
+
3508
+ join: function join() {
3509
+ if (arguments.length === 0)
3510
+ return '.';
3511
+ var joined;
3512
+ for (var i = 0; i < arguments.length; ++i) {
3513
+ var arg = arguments[i];
3514
+ assertPath(arg);
3515
+ if (arg.length > 0) {
3516
+ if (joined === undefined)
3517
+ joined = arg;
3518
+ else
3519
+ joined += '/' + arg;
3520
+ }
3521
+ }
3522
+ if (joined === undefined)
3523
+ return '.';
3524
+ return posix.normalize(joined);
3525
+ },
3526
+
3527
+ relative: function relative(from, to) {
3528
+ assertPath(from);
3529
+ assertPath(to);
3530
+
3531
+ if (from === to) return '';
3532
+
3533
+ from = posix.resolve(from);
3534
+ to = posix.resolve(to);
3535
+
3536
+ if (from === to) return '';
3537
+
3538
+ // Trim any leading backslashes
3539
+ var fromStart = 1;
3540
+ for (; fromStart < from.length; ++fromStart) {
3541
+ if (from.charCodeAt(fromStart) !== 47 /*/*/)
3542
+ break;
3543
+ }
3544
+ var fromEnd = from.length;
3545
+ var fromLen = fromEnd - fromStart;
3546
+
3547
+ // Trim any leading backslashes
3548
+ var toStart = 1;
3549
+ for (; toStart < to.length; ++toStart) {
3550
+ if (to.charCodeAt(toStart) !== 47 /*/*/)
3551
+ break;
3552
+ }
3553
+ var toEnd = to.length;
3554
+ var toLen = toEnd - toStart;
3555
+
3556
+ // Compare paths to find the longest common path from root
3557
+ var length = fromLen < toLen ? fromLen : toLen;
3558
+ var lastCommonSep = -1;
3559
+ var i = 0;
3560
+ for (; i <= length; ++i) {
3561
+ if (i === length) {
3562
+ if (toLen > length) {
3563
+ if (to.charCodeAt(toStart + i) === 47 /*/*/) {
3564
+ // We get here if `from` is the exact base path for `to`.
3565
+ // For example: from='/foo/bar'; to='/foo/bar/baz'
3566
+ return to.slice(toStart + i + 1);
3567
+ } else if (i === 0) {
3568
+ // We get here if `from` is the root
3569
+ // For example: from='/'; to='/foo'
3570
+ return to.slice(toStart + i);
3571
+ }
3572
+ } else if (fromLen > length) {
3573
+ if (from.charCodeAt(fromStart + i) === 47 /*/*/) {
3574
+ // We get here if `to` is the exact base path for `from`.
3575
+ // For example: from='/foo/bar/baz'; to='/foo/bar'
3576
+ lastCommonSep = i;
3577
+ } else if (i === 0) {
3578
+ // We get here if `to` is the root.
3579
+ // For example: from='/foo'; to='/'
3580
+ lastCommonSep = 0;
3581
+ }
3582
+ }
3583
+ break;
3584
+ }
3585
+ var fromCode = from.charCodeAt(fromStart + i);
3586
+ var toCode = to.charCodeAt(toStart + i);
3587
+ if (fromCode !== toCode)
3588
+ break;
3589
+ else if (fromCode === 47 /*/*/)
3590
+ lastCommonSep = i;
3591
+ }
3592
+
3593
+ var out = '';
3594
+ // Generate the relative path based on the path difference between `to`
3595
+ // and `from`
3596
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
3597
+ if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {
3598
+ if (out.length === 0)
3599
+ out += '..';
3600
+ else
3601
+ out += '/..';
3602
+ }
3603
+ }
3604
+
3605
+ // Lastly, append the rest of the destination (`to`) path that comes after
3606
+ // the common path parts
3607
+ if (out.length > 0)
3608
+ return out + to.slice(toStart + lastCommonSep);
3609
+ else {
3610
+ toStart += lastCommonSep;
3611
+ if (to.charCodeAt(toStart) === 47 /*/*/)
3612
+ ++toStart;
3613
+ return to.slice(toStart);
3614
+ }
3615
+ },
3616
+
3617
+ _makeLong: function _makeLong(path) {
3618
+ return path;
3619
+ },
3620
+
3621
+ dirname: function dirname(path) {
3622
+ assertPath(path);
3623
+ if (path.length === 0) return '.';
3624
+ var code = path.charCodeAt(0);
3625
+ var hasRoot = code === 47 /*/*/;
3626
+ var end = -1;
3627
+ var matchedSlash = true;
3628
+ for (var i = path.length - 1; i >= 1; --i) {
3629
+ code = path.charCodeAt(i);
3630
+ if (code === 47 /*/*/) {
3631
+ if (!matchedSlash) {
3632
+ end = i;
3633
+ break;
3634
+ }
3635
+ } else {
3636
+ // We saw the first non-path separator
3637
+ matchedSlash = false;
3638
+ }
3639
+ }
3640
+
3641
+ if (end === -1) return hasRoot ? '/' : '.';
3642
+ if (hasRoot && end === 1) return '//';
3643
+ return path.slice(0, end);
3644
+ },
3645
+
3646
+ basename: function basename(path, ext) {
3647
+ if (ext !== undefined && typeof ext !== 'string') throw new TypeError('"ext" argument must be a string');
3648
+ assertPath(path);
3649
+
3650
+ var start = 0;
3651
+ var end = -1;
3652
+ var matchedSlash = true;
3653
+ var i;
3654
+
3655
+ if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {
3656
+ if (ext.length === path.length && ext === path) return '';
3657
+ var extIdx = ext.length - 1;
3658
+ var firstNonSlashEnd = -1;
3659
+ for (i = path.length - 1; i >= 0; --i) {
3660
+ var code = path.charCodeAt(i);
3661
+ if (code === 47 /*/*/) {
3662
+ // If we reached a path separator that was not part of a set of path
3663
+ // separators at the end of the string, stop now
3664
+ if (!matchedSlash) {
3665
+ start = i + 1;
3666
+ break;
3667
+ }
3668
+ } else {
3669
+ if (firstNonSlashEnd === -1) {
3670
+ // We saw the first non-path separator, remember this index in case
3671
+ // we need it if the extension ends up not matching
3672
+ matchedSlash = false;
3673
+ firstNonSlashEnd = i + 1;
3674
+ }
3675
+ if (extIdx >= 0) {
3676
+ // Try to match the explicit extension
3677
+ if (code === ext.charCodeAt(extIdx)) {
3678
+ if (--extIdx === -1) {
3679
+ // We matched the extension, so mark this as the end of our path
3680
+ // component
3681
+ end = i;
3682
+ }
3683
+ } else {
3684
+ // Extension does not match, so our result is the entire path
3685
+ // component
3686
+ extIdx = -1;
3687
+ end = firstNonSlashEnd;
3688
+ }
3689
+ }
3690
+ }
3691
+ }
3692
+
3693
+ if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;
3694
+ return path.slice(start, end);
3695
+ } else {
3696
+ for (i = path.length - 1; i >= 0; --i) {
3697
+ if (path.charCodeAt(i) === 47 /*/*/) {
3698
+ // If we reached a path separator that was not part of a set of path
3699
+ // separators at the end of the string, stop now
3700
+ if (!matchedSlash) {
3701
+ start = i + 1;
3702
+ break;
3703
+ }
3704
+ } else if (end === -1) {
3705
+ // We saw the first non-path separator, mark this as the end of our
3706
+ // path component
3707
+ matchedSlash = false;
3708
+ end = i + 1;
3709
+ }
3710
+ }
3711
+
3712
+ if (end === -1) return '';
3713
+ return path.slice(start, end);
3714
+ }
3715
+ },
3716
+
3717
+ extname: function extname(path) {
3718
+ assertPath(path);
3719
+ var startDot = -1;
3720
+ var startPart = 0;
3721
+ var end = -1;
3722
+ var matchedSlash = true;
3723
+ // Track the state of characters (if any) we see before our first dot and
3724
+ // after any path separator we find
3725
+ var preDotState = 0;
3726
+ for (var i = path.length - 1; i >= 0; --i) {
3727
+ var code = path.charCodeAt(i);
3728
+ if (code === 47 /*/*/) {
3729
+ // If we reached a path separator that was not part of a set of path
3730
+ // separators at the end of the string, stop now
3731
+ if (!matchedSlash) {
3732
+ startPart = i + 1;
3733
+ break;
3734
+ }
3735
+ continue;
3736
+ }
3737
+ if (end === -1) {
3738
+ // We saw the first non-path separator, mark this as the end of our
3739
+ // extension
3740
+ matchedSlash = false;
3741
+ end = i + 1;
3742
+ }
3743
+ if (code === 46 /*.*/) {
3744
+ // If this is our first dot, mark it as the start of our extension
3745
+ if (startDot === -1)
3746
+ startDot = i;
3747
+ else if (preDotState !== 1)
3748
+ preDotState = 1;
3749
+ } else if (startDot !== -1) {
3750
+ // We saw a non-dot and non-path separator before our dot, so we should
3751
+ // have a good chance at having a non-empty extension
3752
+ preDotState = -1;
3753
+ }
3754
+ }
3755
+
3756
+ if (startDot === -1 || end === -1 ||
3757
+ // We saw a non-dot character immediately before the dot
3758
+ preDotState === 0 ||
3759
+ // The (right-most) trimmed path component is exactly '..'
3760
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
3761
+ return '';
3762
+ }
3763
+ return path.slice(startDot, end);
3764
+ },
3765
+
3766
+ format: function format(pathObject) {
3767
+ if (pathObject === null || typeof pathObject !== 'object') {
3768
+ throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject);
3769
+ }
3770
+ return _format('/', pathObject);
3771
+ },
3772
+
3773
+ parse: function parse(path) {
3774
+ assertPath(path);
3775
+
3776
+ var ret = { root: '', dir: '', base: '', ext: '', name: '' };
3777
+ if (path.length === 0) return ret;
3778
+ var code = path.charCodeAt(0);
3779
+ var isAbsolute = code === 47 /*/*/;
3780
+ var start;
3781
+ if (isAbsolute) {
3782
+ ret.root = '/';
3783
+ start = 1;
3784
+ } else {
3785
+ start = 0;
3786
+ }
3787
+ var startDot = -1;
3788
+ var startPart = 0;
3789
+ var end = -1;
3790
+ var matchedSlash = true;
3791
+ var i = path.length - 1;
3792
+
3793
+ // Track the state of characters (if any) we see before our first dot and
3794
+ // after any path separator we find
3795
+ var preDotState = 0;
3796
+
3797
+ // Get non-dir info
3798
+ for (; i >= start; --i) {
3799
+ code = path.charCodeAt(i);
3800
+ if (code === 47 /*/*/) {
3801
+ // If we reached a path separator that was not part of a set of path
3802
+ // separators at the end of the string, stop now
3803
+ if (!matchedSlash) {
3804
+ startPart = i + 1;
3805
+ break;
3806
+ }
3807
+ continue;
3808
+ }
3809
+ if (end === -1) {
3810
+ // We saw the first non-path separator, mark this as the end of our
3811
+ // extension
3812
+ matchedSlash = false;
3813
+ end = i + 1;
3814
+ }
3815
+ if (code === 46 /*.*/) {
3816
+ // If this is our first dot, mark it as the start of our extension
3817
+ if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;
3818
+ } else if (startDot !== -1) {
3819
+ // We saw a non-dot and non-path separator before our dot, so we should
3820
+ // have a good chance at having a non-empty extension
3821
+ preDotState = -1;
3822
+ }
3823
+ }
3824
+
3825
+ if (startDot === -1 || end === -1 ||
3826
+ // We saw a non-dot character immediately before the dot
3827
+ preDotState === 0 ||
3828
+ // The (right-most) trimmed path component is exactly '..'
3829
+ preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
3830
+ if (end !== -1) {
3831
+ if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);
3832
+ }
3833
+ } else {
3834
+ if (startPart === 0 && isAbsolute) {
3835
+ ret.name = path.slice(1, startDot);
3836
+ ret.base = path.slice(1, end);
3837
+ } else {
3838
+ ret.name = path.slice(startPart, startDot);
3839
+ ret.base = path.slice(startPart, end);
3840
+ }
3841
+ ret.ext = path.slice(startDot, end);
3842
+ }
3843
+
3844
+ if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';
3845
+
3846
+ return ret;
3847
+ },
3848
+
3849
+ sep: '/',
3850
+ delimiter: ':',
3851
+ win32: null,
3852
+ posix: null
3853
+ };
3854
+
3855
+ posix.posix = posix;
3856
+
3857
+ module.exports = posix;
3858
+
3859
+
3860
+ /***/ })
3861
+
3862
+ /******/ });
3863
+ /************************************************************************/
3864
+ /******/ // The module cache
3865
+ /******/ var __webpack_module_cache__ = {};
3866
+ /******/
3867
+ /******/ // The require function
3868
+ /******/ function __webpack_require__(moduleId) {
3869
+ /******/ // Check if module is in cache
3870
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
3871
+ /******/ if (cachedModule !== undefined) {
3872
+ /******/ return cachedModule.exports;
3873
+ /******/ }
3874
+ /******/ // Create a new module (and put it into the cache)
3875
+ /******/ var module = __webpack_module_cache__[moduleId] = {
3876
+ /******/ // no module.id needed
3877
+ /******/ // no module.loaded needed
3878
+ /******/ exports: {}
3879
+ /******/ };
3880
+ /******/
3881
+ /******/ // Execute the module function
3882
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
3883
+ /******/
3884
+ /******/ // Return the exports of the module
3885
+ /******/ return module.exports;
3886
+ /******/ }
3887
+ /******/
3888
+ /************************************************************************/
3889
+ /******/ /* webpack/runtime/compat get default export */
3890
+ /******/ (() => {
3891
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
3892
+ /******/ __webpack_require__.n = (module) => {
3893
+ /******/ var getter = module && module.__esModule ?
3894
+ /******/ () => (module['default']) :
3895
+ /******/ () => (module);
3896
+ /******/ __webpack_require__.d(getter, { a: getter });
3897
+ /******/ return getter;
3898
+ /******/ };
3899
+ /******/ })();
3900
+ /******/
3901
+ /******/ /* webpack/runtime/define property getters */
3902
+ /******/ (() => {
3903
+ /******/ // define getter functions for harmony exports
3904
+ /******/ __webpack_require__.d = (exports, definition) => {
3905
+ /******/ for(var key in definition) {
3906
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3907
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3908
+ /******/ }
3909
+ /******/ }
3910
+ /******/ };
3911
+ /******/ })();
3912
+ /******/
3913
+ /******/ /* webpack/runtime/global */
3914
+ /******/ (() => {
3915
+ /******/ __webpack_require__.g = (function() {
3916
+ /******/ if (typeof globalThis === 'object') return globalThis;
3917
+ /******/ try {
3918
+ /******/ return this || new Function('return this')();
3919
+ /******/ } catch (e) {
3920
+ /******/ if (typeof window === 'object') return window;
3921
+ /******/ }
3922
+ /******/ })();
3923
+ /******/ })();
3924
+ /******/
3925
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
3926
+ /******/ (() => {
3927
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3928
+ /******/ })();
3929
+ /******/
3930
+ /******/ /* webpack/runtime/make namespace object */
3931
+ /******/ (() => {
3932
+ /******/ // define __esModule on exports
3933
+ /******/ __webpack_require__.r = (exports) => {
3934
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3935
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3936
+ /******/ }
3937
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
3938
+ /******/ };
3939
+ /******/ })();
3940
+ /******/
3941
+ /************************************************************************/
3942
+ var __webpack_exports__ = {};
3943
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
3944
+ (() => {
3945
+ /*!*********************!*\
3946
+ !*** ./src/hook.ts ***!
3947
+ \*********************/
3948
+ __webpack_require__.r(__webpack_exports__);
3949
+ /* harmony import */ var _back_hook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @back/hook */ "../app-backend-core/lib/hook.js");
3950
+ /* harmony import */ var _vue_devtools_shared_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue-devtools/shared-utils */ "../shared-utils/lib/index.js");
3951
+ /* harmony import */ var _vue_devtools_shared_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vue_devtools_shared_utils__WEBPACK_IMPORTED_MODULE_1__);
3952
+
3953
+
3954
+
3955
+ (0,_back_hook__WEBPACK_IMPORTED_MODULE_0__.installHook)(_vue_devtools_shared_utils__WEBPACK_IMPORTED_MODULE_1__.target);
3956
+
3957
+ })();
3958
+