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