@dengzhibo/vitepress-example 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3808 @@
1
+ //#region node_modules/.pnpm/@vue+devtools-shared@8.2.1/node_modules/@vue/devtools-shared/dist/index.js
2
+ var __create$1 = Object.create;
3
+ var __defProp$1 = Object.defineProperty;
4
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
6
+ var __getProtoOf$1 = Object.getPrototypeOf;
7
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
8
+ var __commonJSMin$1 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
+ var __copyProps$1 = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ var isBrowser = typeof navigator !== "undefined";
24
+ var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
25
+ typeof target.chrome !== "undefined" && target.chrome.devtools;
26
+ isBrowser && (target.self, target.top);
27
+ typeof navigator !== "undefined" && navigator.userAgent?.toLowerCase().includes("electron");
28
+ typeof window !== "undefined" && window.__NUXT__;
29
+ var import_rfdc = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
30
+ module.exports = rfdc;
31
+ function copyBuffer(cur) {
32
+ if (cur instanceof Buffer) return Buffer.from(cur);
33
+ return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
34
+ }
35
+ function rfdc(opts) {
36
+ opts = opts || {};
37
+ if (opts.circles) return rfdcCircles(opts);
38
+ const constructorHandlers = /* @__PURE__ */ new Map();
39
+ constructorHandlers.set(Date, (o) => new Date(o));
40
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
41
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
42
+ if (opts.constructorHandlers) for (const handler of opts.constructorHandlers) constructorHandlers.set(handler[0], handler[1]);
43
+ let handler = null;
44
+ return opts.proto ? cloneProto : clone;
45
+ function cloneArray(a, fn) {
46
+ const keys = Object.keys(a);
47
+ const a2 = new Array(keys.length);
48
+ for (let i = 0; i < keys.length; i++) {
49
+ const k = keys[i];
50
+ const cur = a[k];
51
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
52
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
53
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
54
+ else a2[k] = fn(cur);
55
+ }
56
+ return a2;
57
+ }
58
+ function clone(o) {
59
+ if (typeof o !== "object" || o === null) return o;
60
+ if (Array.isArray(o)) return cloneArray(o, clone);
61
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
62
+ const o2 = {};
63
+ for (const k in o) {
64
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
65
+ const cur = o[k];
66
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
67
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
68
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
69
+ else o2[k] = clone(cur);
70
+ }
71
+ return o2;
72
+ }
73
+ function cloneProto(o) {
74
+ if (typeof o !== "object" || o === null) return o;
75
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
76
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
77
+ const o2 = {};
78
+ for (const k in o) {
79
+ const cur = o[k];
80
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
81
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
82
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
83
+ else o2[k] = cloneProto(cur);
84
+ }
85
+ return o2;
86
+ }
87
+ }
88
+ function rfdcCircles(opts) {
89
+ const refs = [];
90
+ const refsNew = [];
91
+ const constructorHandlers = /* @__PURE__ */ new Map();
92
+ constructorHandlers.set(Date, (o) => new Date(o));
93
+ constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
94
+ constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
95
+ if (opts.constructorHandlers) for (const handler of opts.constructorHandlers) constructorHandlers.set(handler[0], handler[1]);
96
+ let handler = null;
97
+ return opts.proto ? cloneProto : clone;
98
+ function cloneArray(a, fn) {
99
+ const keys = Object.keys(a);
100
+ const a2 = new Array(keys.length);
101
+ for (let i = 0; i < keys.length; i++) {
102
+ const k = keys[i];
103
+ const cur = a[k];
104
+ if (typeof cur !== "object" || cur === null) a2[k] = cur;
105
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) a2[k] = handler(cur, fn);
106
+ else if (ArrayBuffer.isView(cur)) a2[k] = copyBuffer(cur);
107
+ else {
108
+ const index = refs.indexOf(cur);
109
+ if (index !== -1) a2[k] = refsNew[index];
110
+ else a2[k] = fn(cur);
111
+ }
112
+ }
113
+ return a2;
114
+ }
115
+ function clone(o) {
116
+ if (typeof o !== "object" || o === null) return o;
117
+ if (Array.isArray(o)) return cloneArray(o, clone);
118
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, clone);
119
+ const o2 = {};
120
+ refs.push(o);
121
+ refsNew.push(o2);
122
+ for (const k in o) {
123
+ if (Object.hasOwnProperty.call(o, k) === false) continue;
124
+ const cur = o[k];
125
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
126
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, clone);
127
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
128
+ else {
129
+ const i = refs.indexOf(cur);
130
+ if (i !== -1) o2[k] = refsNew[i];
131
+ else o2[k] = clone(cur);
132
+ }
133
+ }
134
+ refs.pop();
135
+ refsNew.pop();
136
+ return o2;
137
+ }
138
+ function cloneProto(o) {
139
+ if (typeof o !== "object" || o === null) return o;
140
+ if (Array.isArray(o)) return cloneArray(o, cloneProto);
141
+ if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) return handler(o, cloneProto);
142
+ const o2 = {};
143
+ refs.push(o);
144
+ refsNew.push(o2);
145
+ for (const k in o) {
146
+ const cur = o[k];
147
+ if (typeof cur !== "object" || cur === null) o2[k] = cur;
148
+ else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) o2[k] = handler(cur, cloneProto);
149
+ else if (ArrayBuffer.isView(cur)) o2[k] = copyBuffer(cur);
150
+ else {
151
+ const i = refs.indexOf(cur);
152
+ if (i !== -1) o2[k] = refsNew[i];
153
+ else o2[k] = cloneProto(cur);
154
+ }
155
+ }
156
+ refs.pop();
157
+ refsNew.pop();
158
+ return o2;
159
+ }
160
+ }
161
+ })))(), 1);
162
+ var classifyRE = /(?:^|[-_/])(\w)/g;
163
+ function toUpper(_, c) {
164
+ return c ? c.toUpperCase() : "";
165
+ }
166
+ function classify(str) {
167
+ return str && `${str}`.replace(classifyRE, toUpper);
168
+ }
169
+ function basename(filename, ext) {
170
+ let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
171
+ if (normalizedFilename.endsWith(`index${ext}`)) normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
172
+ const lastSlashIndex = normalizedFilename.lastIndexOf("/");
173
+ const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
174
+ if (ext) {
175
+ const extIndex = baseNameWithExt.lastIndexOf(ext);
176
+ return baseNameWithExt.substring(0, extIndex);
177
+ }
178
+ return "";
179
+ }
180
+ var HTTP_URL_RE = /^https?:\/\//;
181
+ /**
182
+ * Check a string is start with `/` or a valid http url
183
+ */
184
+ function isUrlString(str) {
185
+ return str.startsWith("/") || HTTP_URL_RE.test(str);
186
+ }
187
+ /**
188
+ * @copyright [rfdc](https://github.com/davidmarkclements/rfdc)
189
+ * @description A really fast deep clone alternative
190
+ */
191
+ var deepClone = (0, import_rfdc.default)({ circles: true });
192
+ //#endregion
193
+ //#region node_modules/.pnpm/perfect-debounce@2.1.0/node_modules/perfect-debounce/dist/index.mjs
194
+ var DEBOUNCE_DEFAULTS = { trailing: true };
195
+ /**
196
+ Debounce functions
197
+ @param fn - Promise-returning/async function to debounce.
198
+ @param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
199
+ @returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
200
+ @example
201
+ ```
202
+ import { debounce } from 'perfect-debounce';
203
+ const expensiveCall = async input => input;
204
+ const debouncedFn = debounce(expensiveCall, 200);
205
+ for (const number of [1, 2, 3]) {
206
+ console.log(await debouncedFn(number));
207
+ }
208
+ //=> 1
209
+ //=> 2
210
+ //=> 3
211
+ ```
212
+ */
213
+ function debounce(fn, wait = 25, options = {}) {
214
+ options = {
215
+ ...DEBOUNCE_DEFAULTS,
216
+ ...options
217
+ };
218
+ if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
219
+ let leadingValue;
220
+ let timeout;
221
+ let resolveList = [];
222
+ let currentPromise;
223
+ let trailingArgs;
224
+ const applyFn = (_this, args) => {
225
+ currentPromise = _applyPromised(fn, _this, args);
226
+ currentPromise.finally(() => {
227
+ currentPromise = null;
228
+ if (options.trailing && trailingArgs && !timeout) {
229
+ const promise = applyFn(_this, trailingArgs);
230
+ trailingArgs = null;
231
+ return promise;
232
+ }
233
+ });
234
+ return currentPromise;
235
+ };
236
+ const debounced = function(...args) {
237
+ if (options.trailing) trailingArgs = args;
238
+ if (currentPromise) return currentPromise;
239
+ return new Promise((resolve) => {
240
+ const shouldCallNow = !timeout && options.leading;
241
+ clearTimeout(timeout);
242
+ timeout = setTimeout(() => {
243
+ timeout = null;
244
+ const promise = options.leading ? leadingValue : applyFn(this, args);
245
+ trailingArgs = null;
246
+ for (const _resolve of resolveList) _resolve(promise);
247
+ resolveList = [];
248
+ }, wait);
249
+ if (shouldCallNow) {
250
+ leadingValue = applyFn(this, args);
251
+ resolve(leadingValue);
252
+ } else resolveList.push(resolve);
253
+ });
254
+ };
255
+ const _clearTimeout = (timer) => {
256
+ if (timer) {
257
+ clearTimeout(timer);
258
+ timeout = null;
259
+ }
260
+ };
261
+ debounced.isPending = () => !!timeout;
262
+ debounced.cancel = () => {
263
+ _clearTimeout(timeout);
264
+ resolveList = [];
265
+ trailingArgs = null;
266
+ };
267
+ debounced.flush = () => {
268
+ _clearTimeout(timeout);
269
+ if (!trailingArgs || currentPromise) return;
270
+ const args = trailingArgs;
271
+ trailingArgs = null;
272
+ return applyFn(this, args);
273
+ };
274
+ return debounced;
275
+ }
276
+ async function _applyPromised(fn, _this, args) {
277
+ return await fn.apply(_this, args);
278
+ }
279
+ //#endregion
280
+ //#region node_modules/.pnpm/hookable@5.5.3/node_modules/hookable/dist/index.mjs
281
+ function flatHooks(configHooks, hooks = {}, parentName) {
282
+ for (const key in configHooks) {
283
+ const subHook = configHooks[key];
284
+ const name = parentName ? `${parentName}:${key}` : key;
285
+ if (typeof subHook === "object" && subHook !== null) flatHooks(subHook, hooks, name);
286
+ else if (typeof subHook === "function") hooks[name] = subHook;
287
+ }
288
+ return hooks;
289
+ }
290
+ var defaultTask = { run: (function_) => function_() };
291
+ var _createTask = () => defaultTask;
292
+ var createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
293
+ function serialTaskCaller(hooks, args) {
294
+ const task = createTask(args.shift());
295
+ return hooks.reduce((promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))), Promise.resolve());
296
+ }
297
+ function parallelTaskCaller(hooks, args) {
298
+ const task = createTask(args.shift());
299
+ return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));
300
+ }
301
+ function callEachWith(callbacks, arg0) {
302
+ for (const callback of [...callbacks]) callback(arg0);
303
+ }
304
+ var Hookable = class {
305
+ constructor() {
306
+ this._hooks = {};
307
+ this._before = void 0;
308
+ this._after = void 0;
309
+ this._deprecatedMessages = void 0;
310
+ this._deprecatedHooks = {};
311
+ this.hook = this.hook.bind(this);
312
+ this.callHook = this.callHook.bind(this);
313
+ this.callHookWith = this.callHookWith.bind(this);
314
+ }
315
+ hook(name, function_, options = {}) {
316
+ if (!name || typeof function_ !== "function") return () => {};
317
+ const originalName = name;
318
+ let dep;
319
+ while (this._deprecatedHooks[name]) {
320
+ dep = this._deprecatedHooks[name];
321
+ name = dep.to;
322
+ }
323
+ if (dep && !options.allowDeprecated) {
324
+ let message = dep.message;
325
+ if (!message) message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
326
+ if (!this._deprecatedMessages) this._deprecatedMessages = /* @__PURE__ */ new Set();
327
+ if (!this._deprecatedMessages.has(message)) {
328
+ console.warn(message);
329
+ this._deprecatedMessages.add(message);
330
+ }
331
+ }
332
+ if (!function_.name) try {
333
+ Object.defineProperty(function_, "name", {
334
+ get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
335
+ configurable: true
336
+ });
337
+ } catch {}
338
+ this._hooks[name] = this._hooks[name] || [];
339
+ this._hooks[name].push(function_);
340
+ return () => {
341
+ if (function_) {
342
+ this.removeHook(name, function_);
343
+ function_ = void 0;
344
+ }
345
+ };
346
+ }
347
+ hookOnce(name, function_) {
348
+ let _unreg;
349
+ let _function = (...arguments_) => {
350
+ if (typeof _unreg === "function") _unreg();
351
+ _unreg = void 0;
352
+ _function = void 0;
353
+ return function_(...arguments_);
354
+ };
355
+ _unreg = this.hook(name, _function);
356
+ return _unreg;
357
+ }
358
+ removeHook(name, function_) {
359
+ if (this._hooks[name]) {
360
+ const index = this._hooks[name].indexOf(function_);
361
+ if (index !== -1) this._hooks[name].splice(index, 1);
362
+ if (this._hooks[name].length === 0) delete this._hooks[name];
363
+ }
364
+ }
365
+ deprecateHook(name, deprecated) {
366
+ this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
367
+ const _hooks = this._hooks[name] || [];
368
+ delete this._hooks[name];
369
+ for (const hook of _hooks) this.hook(name, hook);
370
+ }
371
+ deprecateHooks(deprecatedHooks) {
372
+ Object.assign(this._deprecatedHooks, deprecatedHooks);
373
+ for (const name in deprecatedHooks) this.deprecateHook(name, deprecatedHooks[name]);
374
+ }
375
+ addHooks(configHooks) {
376
+ const hooks = flatHooks(configHooks);
377
+ const removeFns = Object.keys(hooks).map((key) => this.hook(key, hooks[key]));
378
+ return () => {
379
+ for (const unreg of removeFns.splice(0, removeFns.length)) unreg();
380
+ };
381
+ }
382
+ removeHooks(configHooks) {
383
+ const hooks = flatHooks(configHooks);
384
+ for (const key in hooks) this.removeHook(key, hooks[key]);
385
+ }
386
+ removeAllHooks() {
387
+ for (const key in this._hooks) delete this._hooks[key];
388
+ }
389
+ callHook(name, ...arguments_) {
390
+ arguments_.unshift(name);
391
+ return this.callHookWith(serialTaskCaller, name, ...arguments_);
392
+ }
393
+ callHookParallel(name, ...arguments_) {
394
+ arguments_.unshift(name);
395
+ return this.callHookWith(parallelTaskCaller, name, ...arguments_);
396
+ }
397
+ callHookWith(caller, name, ...arguments_) {
398
+ const event = this._before || this._after ? {
399
+ name,
400
+ args: arguments_,
401
+ context: {}
402
+ } : void 0;
403
+ if (this._before) callEachWith(this._before, event);
404
+ const result = caller(name in this._hooks ? [...this._hooks[name]] : [], arguments_);
405
+ if (result instanceof Promise) return result.finally(() => {
406
+ if (this._after && event) callEachWith(this._after, event);
407
+ });
408
+ if (this._after && event) callEachWith(this._after, event);
409
+ return result;
410
+ }
411
+ beforeEach(function_) {
412
+ this._before = this._before || [];
413
+ this._before.push(function_);
414
+ return () => {
415
+ if (this._before !== void 0) {
416
+ const index = this._before.indexOf(function_);
417
+ if (index !== -1) this._before.splice(index, 1);
418
+ }
419
+ };
420
+ }
421
+ afterEach(function_) {
422
+ this._after = this._after || [];
423
+ this._after.push(function_);
424
+ return () => {
425
+ if (this._after !== void 0) {
426
+ const index = this._after.indexOf(function_);
427
+ if (index !== -1) this._after.splice(index, 1);
428
+ }
429
+ };
430
+ }
431
+ };
432
+ function createHooks() {
433
+ return new Hookable();
434
+ }
435
+ //#endregion
436
+ //#region node_modules/.pnpm/birpc@2.9.0/node_modules/birpc/dist/index.mjs
437
+ var { clearTimeout: clearTimeout$1, setTimeout: setTimeout$1 } = globalThis;
438
+ Math.random.bind(Math);
439
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
440
+ function getComponentTypeName(options) {
441
+ if (typeof options === "function") return options.displayName || options.name || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || "";
442
+ const name = options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
443
+ if (name === "index" && options.__file?.endsWith("index.vue")) return "";
444
+ return name;
445
+ }
446
+ function getComponentFileName(options) {
447
+ const file = options.__file;
448
+ if (file) return classify(basename(file, ".vue"));
449
+ }
450
+ function saveComponentGussedName(instance, name) {
451
+ instance.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = name;
452
+ return name;
453
+ }
454
+ function getAppRecord(instance) {
455
+ if (instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__) return instance.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
456
+ else if (instance.root) return instance.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
457
+ }
458
+ function isFragment(instance) {
459
+ const subTreeType = instance.subTree?.type;
460
+ const appRecord = getAppRecord(instance);
461
+ if (appRecord) return appRecord?.types?.Fragment === subTreeType;
462
+ return false;
463
+ }
464
+ /**
465
+ * Get the appropriate display name for an instance.
466
+ *
467
+ * @param {Vue} instance
468
+ * @return {string}
469
+ */
470
+ function getInstanceName(instance) {
471
+ const name = getComponentTypeName(instance?.type || {});
472
+ if (name) return name;
473
+ if (instance?.root === instance) return "Root";
474
+ for (const key in instance.parent?.type?.components) if (instance.parent.type.components[key] === instance?.type) return saveComponentGussedName(instance, key);
475
+ for (const key in instance.appContext?.components) if (instance.appContext.components[key] === instance?.type) return saveComponentGussedName(instance, key);
476
+ const fileName = getComponentFileName(instance?.type || {});
477
+ if (fileName) return fileName;
478
+ return "Anonymous Component";
479
+ }
480
+ /**
481
+ * Returns a devtools unique id for instance.
482
+ * @param {Vue} instance
483
+ */
484
+ function getUniqueComponentId(instance) {
485
+ return `${instance?.appContext?.app?.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__ ?? 0}:${instance === instance?.root ? "root" : instance.uid}`;
486
+ }
487
+ function getComponentInstance(appRecord, instanceId) {
488
+ instanceId = instanceId || `${appRecord.id}:root`;
489
+ return appRecord.instanceMap.get(instanceId) || appRecord.instanceMap.get(":root");
490
+ }
491
+ function createRect() {
492
+ const rect = {
493
+ top: 0,
494
+ bottom: 0,
495
+ left: 0,
496
+ right: 0,
497
+ get width() {
498
+ return rect.right - rect.left;
499
+ },
500
+ get height() {
501
+ return rect.bottom - rect.top;
502
+ }
503
+ };
504
+ return rect;
505
+ }
506
+ var range;
507
+ function getTextRect(node) {
508
+ if (!range) range = document.createRange();
509
+ range.selectNode(node);
510
+ return range.getBoundingClientRect();
511
+ }
512
+ function getFragmentRect(vnode) {
513
+ const rect = createRect();
514
+ if (!vnode.children) return rect;
515
+ for (let i = 0, l = vnode.children.length; i < l; i++) {
516
+ const childVnode = vnode.children[i];
517
+ let childRect;
518
+ if (childVnode.component) childRect = getComponentBoundingRect(childVnode.component);
519
+ else if (childVnode.el) {
520
+ const el = childVnode.el;
521
+ if (el.nodeType === 1 || el.getBoundingClientRect) childRect = el.getBoundingClientRect();
522
+ else if (el.nodeType === 3 && el.data.trim()) childRect = getTextRect(el);
523
+ }
524
+ if (childRect) mergeRects(rect, childRect);
525
+ }
526
+ return rect;
527
+ }
528
+ function mergeRects(a, b) {
529
+ if (!a.top || b.top < a.top) a.top = b.top;
530
+ if (!a.bottom || b.bottom > a.bottom) a.bottom = b.bottom;
531
+ if (!a.left || b.left < a.left) a.left = b.left;
532
+ if (!a.right || b.right > a.right) a.right = b.right;
533
+ return a;
534
+ }
535
+ var DEFAULT_RECT = {
536
+ top: 0,
537
+ left: 0,
538
+ right: 0,
539
+ bottom: 0,
540
+ width: 0,
541
+ height: 0
542
+ };
543
+ function getComponentBoundingRect(instance) {
544
+ const el = instance.subTree.el;
545
+ if (typeof window === "undefined") return DEFAULT_RECT;
546
+ if (isFragment(instance)) return getFragmentRect(instance.subTree);
547
+ else if (el?.nodeType === 1) return el?.getBoundingClientRect();
548
+ else if (instance.subTree.component) return getComponentBoundingRect(instance.subTree.component);
549
+ else return DEFAULT_RECT;
550
+ }
551
+ function getRootElementsFromComponentInstance(instance) {
552
+ if (isFragment(instance)) return getFragmentRootElements(instance.subTree);
553
+ if (!instance.subTree) return [];
554
+ return [instance.subTree.el];
555
+ }
556
+ function getFragmentRootElements(vnode) {
557
+ if (!vnode.children) return [];
558
+ const list = [];
559
+ vnode.children.forEach((childVnode) => {
560
+ if (childVnode.component) list.push(...getRootElementsFromComponentInstance(childVnode.component));
561
+ else if (childVnode?.el) list.push(childVnode.el);
562
+ });
563
+ return list;
564
+ }
565
+ var CONTAINER_ELEMENT_ID = "__vue-devtools-component-inspector__";
566
+ var CARD_ELEMENT_ID = "__vue-devtools-component-inspector__card__";
567
+ var COMPONENT_NAME_ELEMENT_ID = "__vue-devtools-component-inspector__name__";
568
+ var INDICATOR_ELEMENT_ID = "__vue-devtools-component-inspector__indicator__";
569
+ var containerStyles = {
570
+ display: "block",
571
+ zIndex: 2147483640,
572
+ position: "fixed",
573
+ backgroundColor: "#42b88325",
574
+ border: "1px solid #42b88350",
575
+ borderRadius: "5px",
576
+ transition: "all 0.1s ease-in",
577
+ pointerEvents: "none"
578
+ };
579
+ var cardStyles = {
580
+ fontFamily: "Arial, Helvetica, sans-serif",
581
+ padding: "5px 8px",
582
+ borderRadius: "4px",
583
+ textAlign: "left",
584
+ position: "absolute",
585
+ left: 0,
586
+ color: "#e9e9e9",
587
+ fontSize: "14px",
588
+ fontWeight: 600,
589
+ lineHeight: "24px",
590
+ backgroundColor: "#42b883",
591
+ boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"
592
+ };
593
+ var indicatorStyles = {
594
+ display: "inline-block",
595
+ fontWeight: 400,
596
+ fontStyle: "normal",
597
+ fontSize: "12px",
598
+ opacity: .7
599
+ };
600
+ function getContainerElement() {
601
+ return document.getElementById(CONTAINER_ELEMENT_ID);
602
+ }
603
+ function getCardElement() {
604
+ return document.getElementById(CARD_ELEMENT_ID);
605
+ }
606
+ function getIndicatorElement() {
607
+ return document.getElementById(INDICATOR_ELEMENT_ID);
608
+ }
609
+ function getNameElement() {
610
+ return document.getElementById(COMPONENT_NAME_ELEMENT_ID);
611
+ }
612
+ function getStyles(bounds) {
613
+ return {
614
+ left: `${Math.round(bounds.left * 100) / 100}px`,
615
+ top: `${Math.round(bounds.top * 100) / 100}px`,
616
+ width: `${Math.round(bounds.width * 100) / 100}px`,
617
+ height: `${Math.round(bounds.height * 100) / 100}px`
618
+ };
619
+ }
620
+ function create(options) {
621
+ const containerEl = document.createElement("div");
622
+ containerEl.id = options.elementId ?? CONTAINER_ELEMENT_ID;
623
+ Object.assign(containerEl.style, {
624
+ ...containerStyles,
625
+ ...getStyles(options.bounds),
626
+ ...options.style
627
+ });
628
+ const cardEl = document.createElement("span");
629
+ cardEl.id = CARD_ELEMENT_ID;
630
+ Object.assign(cardEl.style, {
631
+ ...cardStyles,
632
+ top: options.bounds.top < 35 ? 0 : "-35px"
633
+ });
634
+ const nameEl = document.createElement("span");
635
+ nameEl.id = COMPONENT_NAME_ELEMENT_ID;
636
+ nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
637
+ const indicatorEl = document.createElement("i");
638
+ indicatorEl.id = INDICATOR_ELEMENT_ID;
639
+ indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
640
+ Object.assign(indicatorEl.style, indicatorStyles);
641
+ cardEl.appendChild(nameEl);
642
+ cardEl.appendChild(indicatorEl);
643
+ containerEl.appendChild(cardEl);
644
+ document.body.appendChild(containerEl);
645
+ return containerEl;
646
+ }
647
+ function update(options) {
648
+ const containerEl = getContainerElement();
649
+ const cardEl = getCardElement();
650
+ const nameEl = getNameElement();
651
+ const indicatorEl = getIndicatorElement();
652
+ if (containerEl) {
653
+ Object.assign(containerEl.style, {
654
+ ...containerStyles,
655
+ ...getStyles(options.bounds)
656
+ });
657
+ Object.assign(cardEl.style, { top: options.bounds.top < 35 ? 0 : "-35px" });
658
+ nameEl.innerHTML = `&lt;${options.name}&gt;&nbsp;&nbsp;`;
659
+ indicatorEl.innerHTML = `${Math.round(options.bounds.width * 100) / 100} x ${Math.round(options.bounds.height * 100) / 100}`;
660
+ }
661
+ }
662
+ function highlight(instance) {
663
+ const bounds = getComponentBoundingRect(instance);
664
+ if (!bounds.width && !bounds.height) return;
665
+ const name = getInstanceName(instance);
666
+ getContainerElement() ? update({
667
+ bounds,
668
+ name
669
+ }) : create({
670
+ bounds,
671
+ name
672
+ });
673
+ }
674
+ function unhighlight() {
675
+ const el = getContainerElement();
676
+ if (el) el.style.display = "none";
677
+ }
678
+ var inspectInstance = null;
679
+ function inspectFn(e) {
680
+ const target = e.target;
681
+ if (target) {
682
+ const instance = target.__vueParentComponent;
683
+ if (instance) {
684
+ inspectInstance = instance;
685
+ if (instance.vnode.el) {
686
+ const bounds = getComponentBoundingRect(instance);
687
+ const name = getInstanceName(instance);
688
+ getContainerElement() ? update({
689
+ bounds,
690
+ name
691
+ }) : create({
692
+ bounds,
693
+ name
694
+ });
695
+ }
696
+ }
697
+ }
698
+ }
699
+ function selectComponentFn(e, cb) {
700
+ e.preventDefault();
701
+ e.stopPropagation();
702
+ if (inspectInstance) cb(getUniqueComponentId(inspectInstance));
703
+ }
704
+ var inspectComponentHighLighterSelectFn = null;
705
+ function cancelInspectComponentHighLighter() {
706
+ unhighlight();
707
+ window.removeEventListener("mouseover", inspectFn);
708
+ window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
709
+ inspectComponentHighLighterSelectFn = null;
710
+ }
711
+ function inspectComponentHighLighter() {
712
+ window.addEventListener("mouseover", inspectFn);
713
+ return new Promise((resolve) => {
714
+ function onSelect(e) {
715
+ e.preventDefault();
716
+ e.stopPropagation();
717
+ selectComponentFn(e, (id) => {
718
+ window.removeEventListener("click", onSelect, true);
719
+ inspectComponentHighLighterSelectFn = null;
720
+ window.removeEventListener("mouseover", inspectFn);
721
+ const el = getContainerElement();
722
+ if (el) el.style.display = "none";
723
+ resolve(JSON.stringify({ id }));
724
+ });
725
+ }
726
+ inspectComponentHighLighterSelectFn = onSelect;
727
+ window.addEventListener("click", onSelect, true);
728
+ });
729
+ }
730
+ function scrollToComponent(options) {
731
+ const instance = getComponentInstance(activeAppRecord.value, options.id);
732
+ if (instance) {
733
+ const [el] = getRootElementsFromComponentInstance(instance);
734
+ if (typeof el.scrollIntoView === "function") el.scrollIntoView({ behavior: "smooth" });
735
+ else {
736
+ const bounds = getComponentBoundingRect(instance);
737
+ const scrollTarget = document.createElement("div");
738
+ const styles = {
739
+ ...getStyles(bounds),
740
+ position: "absolute"
741
+ };
742
+ Object.assign(scrollTarget.style, styles);
743
+ document.body.appendChild(scrollTarget);
744
+ scrollTarget.scrollIntoView({ behavior: "smooth" });
745
+ setTimeout(() => {
746
+ document.body.removeChild(scrollTarget);
747
+ }, 2e3);
748
+ }
749
+ setTimeout(() => {
750
+ const bounds = getComponentBoundingRect(instance);
751
+ if (bounds.width || bounds.height) {
752
+ const name = getInstanceName(instance);
753
+ const el = getContainerElement();
754
+ el ? update({
755
+ ...options,
756
+ name,
757
+ bounds
758
+ }) : create({
759
+ ...options,
760
+ name,
761
+ bounds
762
+ });
763
+ setTimeout(() => {
764
+ if (el) el.style.display = "none";
765
+ }, 1500);
766
+ }
767
+ }, 1200);
768
+ }
769
+ }
770
+ target.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ ??= true;
771
+ function waitForInspectorInit(cb) {
772
+ let total = 0;
773
+ const timer = setInterval(() => {
774
+ if (target.__VUE_INSPECTOR__) {
775
+ clearInterval(timer);
776
+ total += 30;
777
+ cb();
778
+ }
779
+ if (total >= 5e3) clearInterval(timer);
780
+ }, 30);
781
+ }
782
+ function setupInspector() {
783
+ const inspector = target.__VUE_INSPECTOR__;
784
+ const _openInEditor = inspector.openInEditor;
785
+ inspector.openInEditor = async (...params) => {
786
+ inspector.disable();
787
+ _openInEditor(...params);
788
+ };
789
+ }
790
+ function getComponentInspector() {
791
+ return new Promise((resolve) => {
792
+ function setup() {
793
+ setupInspector();
794
+ resolve(target.__VUE_INSPECTOR__);
795
+ }
796
+ if (!target.__VUE_INSPECTOR__) waitForInspectorInit(() => {
797
+ setup();
798
+ });
799
+ else setup();
800
+ });
801
+ }
802
+ /**
803
+ * To prevent include a **HUGE** vue package in the final bundle of chrome ext / electron
804
+ * we stub the necessary vue module.
805
+ * This implementation is based on the 1c3327a0fa5983aa9078e3f7bb2330f572435425 commit
806
+ */
807
+ /**
808
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/constants.ts#L17-L23)
809
+ */
810
+ var ReactiveFlags = /* @__PURE__ */ function(ReactiveFlags) {
811
+ ReactiveFlags["SKIP"] = "__v_skip";
812
+ ReactiveFlags["IS_REACTIVE"] = "__v_isReactive";
813
+ ReactiveFlags["IS_READONLY"] = "__v_isReadonly";
814
+ ReactiveFlags["IS_SHALLOW"] = "__v_isShallow";
815
+ ReactiveFlags["RAW"] = "__v_raw";
816
+ return ReactiveFlags;
817
+ }({});
818
+ /**
819
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L330-L332)
820
+ */
821
+ function isReadonly(value) {
822
+ return !!(value && value[ReactiveFlags.IS_READONLY]);
823
+ }
824
+ /**
825
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L312-L317)
826
+ */
827
+ function isReactive$1(value) {
828
+ if (isReadonly(value)) return isReactive$1(value[ReactiveFlags.RAW]);
829
+ return !!(value && value[ReactiveFlags.IS_REACTIVE]);
830
+ }
831
+ function isRef$1(r) {
832
+ return !!(r && r.__v_isRef === true);
833
+ }
834
+ /**
835
+ * @from [@vue/reactivity](https://github.com/vuejs/core/blob/1c3327a0fa5983aa9078e3f7bb2330f572435425/packages/reactivity/src/reactive.ts#L372-L375)
836
+ */
837
+ function toRaw$1(observed) {
838
+ const raw = observed && observed[ReactiveFlags.RAW];
839
+ return raw ? toRaw$1(raw) : observed;
840
+ }
841
+ var StateEditor = class {
842
+ constructor() {
843
+ this.refEditor = new RefStateEditor();
844
+ }
845
+ set(object, path, value, cb) {
846
+ const sections = Array.isArray(path) ? path : path.split(".");
847
+ while (sections.length > 1) {
848
+ const section = sections.shift();
849
+ if (object instanceof Map) object = object.get(section);
850
+ else if (object instanceof Set) object = Array.from(object.values())[section];
851
+ else object = object[section];
852
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
853
+ }
854
+ const field = sections[0];
855
+ const item = this.refEditor.get(object)[field];
856
+ if (cb) cb(object, field, value);
857
+ else if (this.refEditor.isRef(item)) this.refEditor.set(item, value);
858
+ else object[field] = value;
859
+ }
860
+ get(object, path) {
861
+ const sections = Array.isArray(path) ? path : path.split(".");
862
+ for (let i = 0; i < sections.length; i++) {
863
+ if (object instanceof Map) object = object.get(sections[i]);
864
+ else object = object[sections[i]];
865
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
866
+ if (!object) return void 0;
867
+ }
868
+ return object;
869
+ }
870
+ has(object, path, parent = false) {
871
+ if (typeof object === "undefined") return false;
872
+ const sections = Array.isArray(path) ? path.slice() : path.split(".");
873
+ const size = !parent ? 1 : 2;
874
+ while (object && sections.length > size) {
875
+ const section = sections.shift();
876
+ object = object[section];
877
+ if (this.refEditor.isRef(object)) object = this.refEditor.get(object);
878
+ }
879
+ return object != null && Object.prototype.hasOwnProperty.call(object, sections[0]);
880
+ }
881
+ createDefaultSetCallback(state) {
882
+ return (object, field, value) => {
883
+ if (state.remove || state.newKey) if (Array.isArray(object)) object.splice(field, 1);
884
+ else if (toRaw$1(object) instanceof Map) object.delete(field);
885
+ else if (toRaw$1(object) instanceof Set) object.delete(Array.from(object.values())[field]);
886
+ else Reflect.deleteProperty(object, field);
887
+ if (!state.remove) {
888
+ const target = object[state.newKey || field];
889
+ if (this.refEditor.isRef(target)) this.refEditor.set(target, value);
890
+ else if (toRaw$1(object) instanceof Map) object.set(state.newKey || field, value);
891
+ else if (toRaw$1(object) instanceof Set) object.add(value);
892
+ else object[state.newKey || field] = value;
893
+ }
894
+ };
895
+ }
896
+ };
897
+ var RefStateEditor = class {
898
+ set(ref, value) {
899
+ if (isRef$1(ref)) ref.value = value;
900
+ else {
901
+ if (ref instanceof Set && Array.isArray(value)) {
902
+ ref.clear();
903
+ value.forEach((v) => ref.add(v));
904
+ return;
905
+ }
906
+ const currentKeys = Object.keys(value);
907
+ if (ref instanceof Map) {
908
+ const previousKeysSet = new Set(ref.keys());
909
+ currentKeys.forEach((key) => {
910
+ ref.set(key, Reflect.get(value, key));
911
+ previousKeysSet.delete(key);
912
+ });
913
+ previousKeysSet.forEach((key) => ref.delete(key));
914
+ return;
915
+ }
916
+ const previousKeysSet = new Set(Object.keys(ref));
917
+ currentKeys.forEach((key) => {
918
+ Reflect.set(ref, key, Reflect.get(value, key));
919
+ previousKeysSet.delete(key);
920
+ });
921
+ previousKeysSet.forEach((key) => Reflect.deleteProperty(ref, key));
922
+ }
923
+ }
924
+ get(ref) {
925
+ return isRef$1(ref) ? ref.value : ref;
926
+ }
927
+ isRef(ref) {
928
+ return isRef$1(ref) || isReactive$1(ref);
929
+ }
930
+ };
931
+ new StateEditor();
932
+ var TIMELINE_LAYERS_STATE_STORAGE_ID = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
933
+ function getTimelineLayersStateFromStorage() {
934
+ if (typeof window === "undefined" || !isBrowser || typeof localStorage === "undefined" || localStorage === null) return {
935
+ recordingState: false,
936
+ mouseEventEnabled: false,
937
+ keyboardEventEnabled: false,
938
+ componentEventEnabled: false,
939
+ performanceEventEnabled: false,
940
+ selected: ""
941
+ };
942
+ const state = typeof localStorage.getItem !== "undefined" ? localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID) : null;
943
+ return state ? JSON.parse(state) : {
944
+ recordingState: false,
945
+ mouseEventEnabled: false,
946
+ keyboardEventEnabled: false,
947
+ componentEventEnabled: false,
948
+ performanceEventEnabled: false,
949
+ selected: ""
950
+ };
951
+ }
952
+ target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS ??= [];
953
+ var devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, { get(target, prop, receiver) {
954
+ return Reflect.get(target, prop, receiver);
955
+ } });
956
+ function addTimelineLayer(options, descriptor) {
957
+ devtoolsState.timelineLayersState[descriptor.id] = false;
958
+ devtoolsTimelineLayers.push({
959
+ ...options,
960
+ descriptorId: descriptor.id,
961
+ appRecord: getAppRecord(descriptor.app)
962
+ });
963
+ }
964
+ target.__VUE_DEVTOOLS_KIT_INSPECTOR__ ??= [];
965
+ var devtoolsInspector = new Proxy(target.__VUE_DEVTOOLS_KIT_INSPECTOR__, { get(target, prop, receiver) {
966
+ return Reflect.get(target, prop, receiver);
967
+ } });
968
+ var callInspectorUpdatedHook = debounce(() => {
969
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.SEND_INSPECTOR_TO_CLIENT, getActiveInspectors());
970
+ });
971
+ function addInspector(inspector, descriptor) {
972
+ devtoolsInspector.push({
973
+ options: inspector,
974
+ descriptor,
975
+ treeFilterPlaceholder: inspector.treeFilterPlaceholder ?? "Search tree...",
976
+ stateFilterPlaceholder: inspector.stateFilterPlaceholder ?? "Search state...",
977
+ treeFilter: "",
978
+ selectedNodeId: "",
979
+ appRecord: getAppRecord(descriptor.app)
980
+ });
981
+ callInspectorUpdatedHook();
982
+ }
983
+ function getActiveInspectors() {
984
+ return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
985
+ const descriptor = inspector.descriptor;
986
+ const options = inspector.options;
987
+ return {
988
+ id: options.id,
989
+ label: options.label,
990
+ logo: descriptor.logo,
991
+ icon: `custom-ic-baseline-${options?.icon?.replace(/_/g, "-")}`,
992
+ packageName: descriptor.packageName,
993
+ homepage: descriptor.homepage,
994
+ pluginId: descriptor.id
995
+ };
996
+ });
997
+ }
998
+ function getInspector(id, app) {
999
+ return devtoolsInspector.find((inspector) => inspector.options.id === id && (app ? inspector.descriptor.app === app : true));
1000
+ }
1001
+ var DevToolsV6PluginAPIHookKeys = /* @__PURE__ */ function(DevToolsV6PluginAPIHookKeys) {
1002
+ DevToolsV6PluginAPIHookKeys["VISIT_COMPONENT_TREE"] = "visitComponentTree";
1003
+ DevToolsV6PluginAPIHookKeys["INSPECT_COMPONENT"] = "inspectComponent";
1004
+ DevToolsV6PluginAPIHookKeys["EDIT_COMPONENT_STATE"] = "editComponentState";
1005
+ DevToolsV6PluginAPIHookKeys["GET_INSPECTOR_TREE"] = "getInspectorTree";
1006
+ DevToolsV6PluginAPIHookKeys["GET_INSPECTOR_STATE"] = "getInspectorState";
1007
+ DevToolsV6PluginAPIHookKeys["EDIT_INSPECTOR_STATE"] = "editInspectorState";
1008
+ DevToolsV6PluginAPIHookKeys["INSPECT_TIMELINE_EVENT"] = "inspectTimelineEvent";
1009
+ DevToolsV6PluginAPIHookKeys["TIMELINE_CLEARED"] = "timelineCleared";
1010
+ DevToolsV6PluginAPIHookKeys["SET_PLUGIN_SETTINGS"] = "setPluginSettings";
1011
+ return DevToolsV6PluginAPIHookKeys;
1012
+ }({});
1013
+ var DevToolsContextHookKeys = /* @__PURE__ */ function(DevToolsContextHookKeys) {
1014
+ DevToolsContextHookKeys["ADD_INSPECTOR"] = "addInspector";
1015
+ DevToolsContextHookKeys["SEND_INSPECTOR_TREE"] = "sendInspectorTree";
1016
+ DevToolsContextHookKeys["SEND_INSPECTOR_STATE"] = "sendInspectorState";
1017
+ DevToolsContextHookKeys["CUSTOM_INSPECTOR_SELECT_NODE"] = "customInspectorSelectNode";
1018
+ DevToolsContextHookKeys["TIMELINE_LAYER_ADDED"] = "timelineLayerAdded";
1019
+ DevToolsContextHookKeys["TIMELINE_EVENT_ADDED"] = "timelineEventAdded";
1020
+ DevToolsContextHookKeys["GET_COMPONENT_INSTANCES"] = "getComponentInstances";
1021
+ DevToolsContextHookKeys["GET_COMPONENT_BOUNDS"] = "getComponentBounds";
1022
+ DevToolsContextHookKeys["GET_COMPONENT_NAME"] = "getComponentName";
1023
+ DevToolsContextHookKeys["COMPONENT_HIGHLIGHT"] = "componentHighlight";
1024
+ DevToolsContextHookKeys["COMPONENT_UNHIGHLIGHT"] = "componentUnhighlight";
1025
+ return DevToolsContextHookKeys;
1026
+ }({});
1027
+ var DevToolsMessagingHookKeys = /* @__PURE__ */ function(DevToolsMessagingHookKeys) {
1028
+ DevToolsMessagingHookKeys["SEND_INSPECTOR_TREE_TO_CLIENT"] = "sendInspectorTreeToClient";
1029
+ DevToolsMessagingHookKeys["SEND_INSPECTOR_STATE_TO_CLIENT"] = "sendInspectorStateToClient";
1030
+ DevToolsMessagingHookKeys["SEND_TIMELINE_EVENT_TO_CLIENT"] = "sendTimelineEventToClient";
1031
+ DevToolsMessagingHookKeys["SEND_INSPECTOR_TO_CLIENT"] = "sendInspectorToClient";
1032
+ DevToolsMessagingHookKeys["SEND_ACTIVE_APP_UNMOUNTED_TO_CLIENT"] = "sendActiveAppUpdatedToClient";
1033
+ DevToolsMessagingHookKeys["DEVTOOLS_STATE_UPDATED"] = "devtoolsStateUpdated";
1034
+ DevToolsMessagingHookKeys["DEVTOOLS_CONNECTED_UPDATED"] = "devtoolsConnectedUpdated";
1035
+ DevToolsMessagingHookKeys["ROUTER_INFO_UPDATED"] = "routerInfoUpdated";
1036
+ return DevToolsMessagingHookKeys;
1037
+ }({});
1038
+ function createDevToolsCtxHooks() {
1039
+ const hooks = createHooks();
1040
+ hooks.hook(DevToolsContextHookKeys.ADD_INSPECTOR, ({ inspector, plugin }) => {
1041
+ addInspector(inspector, plugin.descriptor);
1042
+ });
1043
+ const debounceSendInspectorTree = debounce(async ({ inspectorId, plugin }) => {
1044
+ if (!inspectorId || !plugin?.descriptor?.app || devtoolsState.highPerfModeEnabled) return;
1045
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1046
+ const _payload = {
1047
+ app: plugin.descriptor.app,
1048
+ inspectorId,
1049
+ filter: inspector?.treeFilter || "",
1050
+ rootNodes: []
1051
+ };
1052
+ await new Promise((resolve) => {
1053
+ hooks.callHookWith(async (callbacks) => {
1054
+ await Promise.all(callbacks.map((cb) => cb(_payload)));
1055
+ resolve();
1056
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE);
1057
+ });
1058
+ hooks.callHookWith(async (callbacks) => {
1059
+ await Promise.all(callbacks.map((cb) => cb({
1060
+ inspectorId,
1061
+ rootNodes: _payload.rootNodes
1062
+ })));
1063
+ }, DevToolsMessagingHookKeys.SEND_INSPECTOR_TREE_TO_CLIENT);
1064
+ }, 120);
1065
+ hooks.hook(DevToolsContextHookKeys.SEND_INSPECTOR_TREE, debounceSendInspectorTree);
1066
+ const debounceSendInspectorState = debounce(async ({ inspectorId, plugin }) => {
1067
+ if (!inspectorId || !plugin?.descriptor?.app || devtoolsState.highPerfModeEnabled) return;
1068
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1069
+ const _payload = {
1070
+ app: plugin.descriptor.app,
1071
+ inspectorId,
1072
+ nodeId: inspector?.selectedNodeId || "",
1073
+ state: null
1074
+ };
1075
+ const ctx = { currentTab: `custom-inspector:${inspectorId}` };
1076
+ if (_payload.nodeId) await new Promise((resolve) => {
1077
+ hooks.callHookWith(async (callbacks) => {
1078
+ await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
1079
+ resolve();
1080
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE);
1081
+ });
1082
+ hooks.callHookWith(async (callbacks) => {
1083
+ await Promise.all(callbacks.map((cb) => cb({
1084
+ inspectorId,
1085
+ nodeId: _payload.nodeId,
1086
+ state: _payload.state
1087
+ })));
1088
+ }, DevToolsMessagingHookKeys.SEND_INSPECTOR_STATE_TO_CLIENT);
1089
+ }, 120);
1090
+ hooks.hook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, debounceSendInspectorState);
1091
+ hooks.hook(DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE, ({ inspectorId, nodeId, plugin }) => {
1092
+ const inspector = getInspector(inspectorId, plugin.descriptor.app);
1093
+ if (!inspector) return;
1094
+ inspector.selectedNodeId = nodeId;
1095
+ });
1096
+ hooks.hook(DevToolsContextHookKeys.TIMELINE_LAYER_ADDED, ({ options, plugin }) => {
1097
+ addTimelineLayer(options, plugin.descriptor);
1098
+ });
1099
+ hooks.hook(DevToolsContextHookKeys.TIMELINE_EVENT_ADDED, ({ options, plugin }) => {
1100
+ if (devtoolsState.highPerfModeEnabled || !devtoolsState.timelineLayersState?.[plugin.descriptor.id] && ![
1101
+ "performance",
1102
+ "component-event",
1103
+ "keyboard",
1104
+ "mouse"
1105
+ ].includes(options.layerId)) return;
1106
+ hooks.callHookWith(async (callbacks) => {
1107
+ await Promise.all(callbacks.map((cb) => cb(options)));
1108
+ }, DevToolsMessagingHookKeys.SEND_TIMELINE_EVENT_TO_CLIENT);
1109
+ });
1110
+ hooks.hook(DevToolsContextHookKeys.GET_COMPONENT_INSTANCES, async ({ app }) => {
1111
+ const appRecord = app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
1112
+ if (!appRecord) return null;
1113
+ const appId = appRecord.id.toString();
1114
+ return [...appRecord.instanceMap].filter(([key]) => key.split(":")[0] === appId).map(([, instance]) => instance);
1115
+ });
1116
+ hooks.hook(DevToolsContextHookKeys.GET_COMPONENT_BOUNDS, async ({ instance }) => {
1117
+ return getComponentBoundingRect(instance);
1118
+ });
1119
+ hooks.hook(DevToolsContextHookKeys.GET_COMPONENT_NAME, ({ instance }) => {
1120
+ return getInstanceName(instance);
1121
+ });
1122
+ hooks.hook(DevToolsContextHookKeys.COMPONENT_HIGHLIGHT, ({ uid }) => {
1123
+ const instance = activeAppRecord.value.instanceMap.get(uid);
1124
+ if (instance) highlight(instance);
1125
+ });
1126
+ hooks.hook(DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT, () => {
1127
+ unhighlight();
1128
+ });
1129
+ return hooks;
1130
+ }
1131
+ target.__VUE_DEVTOOLS_KIT_APP_RECORDS__ ??= [];
1132
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ ??= {};
1133
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ ??= "";
1134
+ target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ ??= [];
1135
+ target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ ??= [];
1136
+ var STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
1137
+ function initStateFactory() {
1138
+ return {
1139
+ connected: false,
1140
+ clientConnected: false,
1141
+ vitePluginDetected: true,
1142
+ appRecords: [],
1143
+ activeAppRecordId: "",
1144
+ tabs: [],
1145
+ commands: [],
1146
+ highPerfModeEnabled: true,
1147
+ devtoolsClientDetected: {},
1148
+ perfUniqueGroupId: 0,
1149
+ timelineLayersState: getTimelineLayersStateFromStorage()
1150
+ };
1151
+ }
1152
+ target[STATE_KEY] ??= initStateFactory();
1153
+ var callStateUpdatedHook = debounce((state) => {
1154
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.DEVTOOLS_STATE_UPDATED, { state });
1155
+ });
1156
+ debounce((state, oldState) => {
1157
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, {
1158
+ state,
1159
+ oldState
1160
+ });
1161
+ });
1162
+ var devtoolsAppRecords = new Proxy(target.__VUE_DEVTOOLS_KIT_APP_RECORDS__, { get(_target, prop, receiver) {
1163
+ if (prop === "value") return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__;
1164
+ return target.__VUE_DEVTOOLS_KIT_APP_RECORDS__[prop];
1165
+ } });
1166
+ var activeAppRecord = new Proxy(target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__, { get(_target, prop, receiver) {
1167
+ if (prop === "value") return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__;
1168
+ else if (prop === "id") return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__;
1169
+ return target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[prop];
1170
+ } });
1171
+ function updateAllStates() {
1172
+ callStateUpdatedHook({
1173
+ ...target[STATE_KEY],
1174
+ appRecords: devtoolsAppRecords.value,
1175
+ activeAppRecordId: activeAppRecord.id,
1176
+ tabs: target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
1177
+ commands: target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
1178
+ });
1179
+ }
1180
+ function setActiveAppRecord(app) {
1181
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = app;
1182
+ updateAllStates();
1183
+ }
1184
+ function setActiveAppRecordId(id) {
1185
+ target.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = id;
1186
+ updateAllStates();
1187
+ }
1188
+ var devtoolsState = new Proxy(target[STATE_KEY], {
1189
+ get(target$3, property) {
1190
+ if (property === "appRecords") return devtoolsAppRecords;
1191
+ else if (property === "activeAppRecordId") return activeAppRecord.id;
1192
+ else if (property === "tabs") return target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
1193
+ else if (property === "commands") return target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1194
+ return target[STATE_KEY][property];
1195
+ },
1196
+ deleteProperty(target, property) {
1197
+ delete target[property];
1198
+ return true;
1199
+ },
1200
+ set(target$4, property, value) {
1201
+ target$4[property] = value;
1202
+ target[STATE_KEY][property] = value;
1203
+ return true;
1204
+ }
1205
+ });
1206
+ function onDevToolsConnected(fn) {
1207
+ return new Promise((resolve) => {
1208
+ if (devtoolsState.connected) {
1209
+ fn();
1210
+ resolve();
1211
+ }
1212
+ devtoolsContext.hooks.hook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, ({ state }) => {
1213
+ if (state.connected) {
1214
+ fn();
1215
+ resolve();
1216
+ }
1217
+ });
1218
+ });
1219
+ }
1220
+ var resolveIcon = (icon) => {
1221
+ if (!icon) return;
1222
+ if (icon.startsWith("baseline-")) return `custom-ic-${icon}`;
1223
+ if (icon.startsWith("i-") || isUrlString(icon)) return icon;
1224
+ return `custom-ic-baseline-${icon}`;
1225
+ };
1226
+ function addCustomTab(tab) {
1227
+ const tabs = target.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__;
1228
+ if (tabs.some((t) => t.name === tab.name)) return;
1229
+ tabs.push({
1230
+ ...tab,
1231
+ icon: resolveIcon(tab.icon)
1232
+ });
1233
+ updateAllStates();
1234
+ }
1235
+ function addCustomCommand(action) {
1236
+ const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1237
+ if (commands.some((t) => t.id === action.id)) return;
1238
+ commands.push({
1239
+ ...action,
1240
+ icon: resolveIcon(action.icon),
1241
+ children: action.children ? action.children.map((child) => ({
1242
+ ...child,
1243
+ icon: resolveIcon(child.icon)
1244
+ })) : void 0
1245
+ });
1246
+ updateAllStates();
1247
+ }
1248
+ function removeCustomCommand(actionId) {
1249
+ const commands = target.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__;
1250
+ const index = commands.findIndex((t) => t.id === actionId);
1251
+ if (index === -1) return;
1252
+ commands.splice(index, 1);
1253
+ updateAllStates();
1254
+ }
1255
+ function openInEditor(options = {}) {
1256
+ const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
1257
+ if (file) {
1258
+ if (host === "chrome-extension") {
1259
+ const fileName = file.replace(/\\/g, "\\\\");
1260
+ const _baseUrl = window.VUE_DEVTOOLS_CONFIG?.openInEditorHost ?? "/";
1261
+ fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
1262
+ if (!response.ok) {
1263
+ const msg = `Opening component ${fileName} failed`;
1264
+ console.log(`%c${msg}`, "color:red");
1265
+ }
1266
+ });
1267
+ } else if (devtoolsState.vitePluginDetected) {
1268
+ const _baseUrl = target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ ?? baseUrl;
1269
+ target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
1270
+ }
1271
+ }
1272
+ }
1273
+ target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ ??= [];
1274
+ var devtoolsPluginBuffer = new Proxy(target.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, { get(target, prop, receiver) {
1275
+ return Reflect.get(target, prop, receiver);
1276
+ } });
1277
+ function _getSettings(settings) {
1278
+ const _settings = {};
1279
+ Object.keys(settings).forEach((key) => {
1280
+ _settings[key] = settings[key].defaultValue;
1281
+ });
1282
+ return _settings;
1283
+ }
1284
+ function getPluginLocalKey(pluginId) {
1285
+ return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
1286
+ }
1287
+ function getPluginSettingsOptions(pluginId) {
1288
+ return (devtoolsPluginBuffer.find((item) => item[0].id === pluginId && !!item[0]?.settings)?.[0] ?? null)?.settings ?? null;
1289
+ }
1290
+ function getPluginSettings(pluginId, fallbackValue) {
1291
+ const localKey = getPluginLocalKey(pluginId);
1292
+ if (localKey) {
1293
+ const localSettings = localStorage.getItem(localKey);
1294
+ if (localSettings) return JSON.parse(localSettings);
1295
+ }
1296
+ if (pluginId) return _getSettings((devtoolsPluginBuffer.find((item) => item[0].id === pluginId)?.[0] ?? null)?.settings ?? {});
1297
+ return _getSettings(fallbackValue);
1298
+ }
1299
+ function initPluginSettings(pluginId, settings) {
1300
+ const localKey = getPluginLocalKey(pluginId);
1301
+ if (!localStorage.getItem(localKey)) localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
1302
+ }
1303
+ function setPluginSettings(pluginId, key, value) {
1304
+ const localKey = getPluginLocalKey(pluginId);
1305
+ const localSettings = localStorage.getItem(localKey);
1306
+ const parsedLocalSettings = JSON.parse(localSettings || "{}");
1307
+ const updated = {
1308
+ ...parsedLocalSettings,
1309
+ [key]: value
1310
+ };
1311
+ localStorage.setItem(localKey, JSON.stringify(updated));
1312
+ devtoolsContext.hooks.callHookWith((callbacks) => {
1313
+ callbacks.forEach((cb) => cb({
1314
+ pluginId,
1315
+ key,
1316
+ oldValue: parsedLocalSettings[key],
1317
+ newValue: value,
1318
+ settings: updated
1319
+ }));
1320
+ }, DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS);
1321
+ }
1322
+ var DevToolsHooks = /* @__PURE__ */ function(DevToolsHooks) {
1323
+ DevToolsHooks["APP_INIT"] = "app:init";
1324
+ DevToolsHooks["APP_UNMOUNT"] = "app:unmount";
1325
+ DevToolsHooks["COMPONENT_UPDATED"] = "component:updated";
1326
+ DevToolsHooks["COMPONENT_ADDED"] = "component:added";
1327
+ DevToolsHooks["COMPONENT_REMOVED"] = "component:removed";
1328
+ DevToolsHooks["COMPONENT_EMIT"] = "component:emit";
1329
+ DevToolsHooks["PERFORMANCE_START"] = "perf:start";
1330
+ DevToolsHooks["PERFORMANCE_END"] = "perf:end";
1331
+ DevToolsHooks["ADD_ROUTE"] = "router:add-route";
1332
+ DevToolsHooks["REMOVE_ROUTE"] = "router:remove-route";
1333
+ DevToolsHooks["RENDER_TRACKED"] = "render:tracked";
1334
+ DevToolsHooks["RENDER_TRIGGERED"] = "render:triggered";
1335
+ DevToolsHooks["APP_CONNECTED"] = "app:connected";
1336
+ DevToolsHooks["SETUP_DEVTOOLS_PLUGIN"] = "devtools-plugin:setup";
1337
+ return DevToolsHooks;
1338
+ }({});
1339
+ var devtoolsHooks = target.__VUE_DEVTOOLS_HOOK ??= createHooks();
1340
+ var hook = {
1341
+ on: {
1342
+ vueAppInit(fn) {
1343
+ devtoolsHooks.hook(DevToolsHooks.APP_INIT, fn);
1344
+ },
1345
+ vueAppUnmount(fn) {
1346
+ devtoolsHooks.hook(DevToolsHooks.APP_UNMOUNT, fn);
1347
+ },
1348
+ vueAppConnected(fn) {
1349
+ devtoolsHooks.hook(DevToolsHooks.APP_CONNECTED, fn);
1350
+ },
1351
+ componentAdded(fn) {
1352
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_ADDED, fn);
1353
+ },
1354
+ componentEmit(fn) {
1355
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_EMIT, fn);
1356
+ },
1357
+ componentUpdated(fn) {
1358
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_UPDATED, fn);
1359
+ },
1360
+ componentRemoved(fn) {
1361
+ return devtoolsHooks.hook(DevToolsHooks.COMPONENT_REMOVED, fn);
1362
+ },
1363
+ setupDevtoolsPlugin(fn) {
1364
+ devtoolsHooks.hook(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, fn);
1365
+ },
1366
+ perfStart(fn) {
1367
+ return devtoolsHooks.hook(DevToolsHooks.PERFORMANCE_START, fn);
1368
+ },
1369
+ perfEnd(fn) {
1370
+ return devtoolsHooks.hook(DevToolsHooks.PERFORMANCE_END, fn);
1371
+ }
1372
+ },
1373
+ setupDevToolsPlugin(pluginDescriptor, setupFn) {
1374
+ return devtoolsHooks.callHook(DevToolsHooks.SETUP_DEVTOOLS_PLUGIN, pluginDescriptor, setupFn);
1375
+ }
1376
+ };
1377
+ var DevToolsV6PluginAPI = class {
1378
+ constructor({ plugin, ctx }) {
1379
+ this.hooks = ctx.hooks;
1380
+ this.plugin = plugin;
1381
+ }
1382
+ get on() {
1383
+ return {
1384
+ visitComponentTree: (handler) => {
1385
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE, handler);
1386
+ },
1387
+ inspectComponent: (handler) => {
1388
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.INSPECT_COMPONENT, handler);
1389
+ },
1390
+ editComponentState: (handler) => {
1391
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.EDIT_COMPONENT_STATE, handler);
1392
+ },
1393
+ getInspectorTree: (handler) => {
1394
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE, handler);
1395
+ },
1396
+ getInspectorState: (handler) => {
1397
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE, handler);
1398
+ },
1399
+ editInspectorState: (handler) => {
1400
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE, handler);
1401
+ },
1402
+ inspectTimelineEvent: (handler) => {
1403
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.INSPECT_TIMELINE_EVENT, handler);
1404
+ },
1405
+ timelineCleared: (handler) => {
1406
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.TIMELINE_CLEARED, handler);
1407
+ },
1408
+ setPluginSettings: (handler) => {
1409
+ this.hooks.hook(DevToolsV6PluginAPIHookKeys.SET_PLUGIN_SETTINGS, handler);
1410
+ }
1411
+ };
1412
+ }
1413
+ notifyComponentUpdate(instance) {
1414
+ if (devtoolsState.highPerfModeEnabled) return;
1415
+ const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
1416
+ if (inspector?.id) {
1417
+ if (instance) {
1418
+ const args = [
1419
+ instance.appContext.app,
1420
+ instance.uid,
1421
+ instance.parent?.uid,
1422
+ instance
1423
+ ];
1424
+ devtoolsHooks.callHook(DevToolsHooks.COMPONENT_UPDATED, ...args);
1425
+ } else devtoolsHooks.callHook(DevToolsHooks.COMPONENT_UPDATED);
1426
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1427
+ inspectorId: inspector.id,
1428
+ plugin: this.plugin
1429
+ });
1430
+ }
1431
+ }
1432
+ addInspector(options) {
1433
+ this.hooks.callHook(DevToolsContextHookKeys.ADD_INSPECTOR, {
1434
+ inspector: options,
1435
+ plugin: this.plugin
1436
+ });
1437
+ if (this.plugin.descriptor.settings) initPluginSettings(options.id, this.plugin.descriptor.settings);
1438
+ }
1439
+ sendInspectorTree(inspectorId) {
1440
+ if (devtoolsState.highPerfModeEnabled) return;
1441
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_TREE, {
1442
+ inspectorId,
1443
+ plugin: this.plugin
1444
+ });
1445
+ }
1446
+ sendInspectorState(inspectorId) {
1447
+ if (devtoolsState.highPerfModeEnabled) return;
1448
+ this.hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1449
+ inspectorId,
1450
+ plugin: this.plugin
1451
+ });
1452
+ }
1453
+ selectInspectorNode(inspectorId, nodeId) {
1454
+ this.hooks.callHook(DevToolsContextHookKeys.CUSTOM_INSPECTOR_SELECT_NODE, {
1455
+ inspectorId,
1456
+ nodeId,
1457
+ plugin: this.plugin
1458
+ });
1459
+ }
1460
+ visitComponentTree(payload) {
1461
+ return this.hooks.callHook(DevToolsV6PluginAPIHookKeys.VISIT_COMPONENT_TREE, payload);
1462
+ }
1463
+ now() {
1464
+ if (devtoolsState.highPerfModeEnabled) return 0;
1465
+ return Date.now();
1466
+ }
1467
+ addTimelineLayer(options) {
1468
+ this.hooks.callHook(DevToolsContextHookKeys.TIMELINE_LAYER_ADDED, {
1469
+ options,
1470
+ plugin: this.plugin
1471
+ });
1472
+ }
1473
+ addTimelineEvent(options) {
1474
+ if (devtoolsState.highPerfModeEnabled) return;
1475
+ this.hooks.callHook(DevToolsContextHookKeys.TIMELINE_EVENT_ADDED, {
1476
+ options,
1477
+ plugin: this.plugin
1478
+ });
1479
+ }
1480
+ getSettings(pluginId) {
1481
+ return getPluginSettings(pluginId ?? this.plugin.descriptor.id, this.plugin.descriptor.settings);
1482
+ }
1483
+ getComponentInstances(app) {
1484
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_INSTANCES, { app });
1485
+ }
1486
+ getComponentBounds(instance) {
1487
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_BOUNDS, { instance });
1488
+ }
1489
+ getComponentName(instance) {
1490
+ return this.hooks.callHook(DevToolsContextHookKeys.GET_COMPONENT_NAME, { instance });
1491
+ }
1492
+ highlightElement(instance) {
1493
+ const uid = instance.__VUE_DEVTOOLS_NEXT_UID__;
1494
+ return this.hooks.callHook(DevToolsContextHookKeys.COMPONENT_HIGHLIGHT, { uid });
1495
+ }
1496
+ unhighlightElement() {
1497
+ return this.hooks.callHook(DevToolsContextHookKeys.COMPONENT_UNHIGHLIGHT);
1498
+ }
1499
+ };
1500
+ var DevToolsPluginAPI = DevToolsV6PluginAPI;
1501
+ var UNDEFINED = "__vue_devtool_undefined__";
1502
+ var INFINITY = "__vue_devtool_infinity__";
1503
+ var NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
1504
+ var NAN = "__vue_devtool_nan__";
1505
+ Object.entries({
1506
+ [UNDEFINED]: "undefined",
1507
+ [NAN]: "NaN",
1508
+ [INFINITY]: "Infinity",
1509
+ [NEGATIVE_INFINITY]: "-Infinity"
1510
+ }).reduce((acc, [key, value]) => {
1511
+ acc[value] = key;
1512
+ return acc;
1513
+ }, {});
1514
+ target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ ??= /* @__PURE__ */ new Set();
1515
+ function setupDevToolsPlugin(pluginDescriptor, setupFn) {
1516
+ return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
1517
+ }
1518
+ function callDevToolsPluginSetupFn(plugin, app) {
1519
+ const [pluginDescriptor, setupFn] = plugin;
1520
+ if (pluginDescriptor.app !== app) return;
1521
+ const api = new DevToolsPluginAPI({
1522
+ plugin: {
1523
+ setupFn,
1524
+ descriptor: pluginDescriptor
1525
+ },
1526
+ ctx: devtoolsContext
1527
+ });
1528
+ if (pluginDescriptor.packageName === "vuex") api.on.editInspectorState((payload) => {
1529
+ api.sendInspectorState(payload.inspectorId);
1530
+ });
1531
+ setupFn(api);
1532
+ }
1533
+ function registerDevToolsPlugin(app, options) {
1534
+ if (target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app)) return;
1535
+ if (devtoolsState.highPerfModeEnabled && !options?.inspectingComponent) return;
1536
+ target.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
1537
+ devtoolsPluginBuffer.forEach((plugin) => {
1538
+ callDevToolsPluginSetupFn(plugin, app);
1539
+ });
1540
+ }
1541
+ var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
1542
+ var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
1543
+ target[ROUTER_INFO_KEY] ??= {
1544
+ currentRoute: null,
1545
+ routes: []
1546
+ };
1547
+ target[ROUTER_KEY] ??= {};
1548
+ new Proxy(target[ROUTER_INFO_KEY], { get(target$1, property) {
1549
+ return target[ROUTER_INFO_KEY][property];
1550
+ } });
1551
+ new Proxy(target[ROUTER_KEY], { get(target$2, property) {
1552
+ if (property === "value") return target[ROUTER_KEY];
1553
+ } });
1554
+ function getRoutes(router) {
1555
+ const routesMap = /* @__PURE__ */ new Map();
1556
+ return (router?.getRoutes() || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
1557
+ }
1558
+ function filterRoutes(routes) {
1559
+ return routes.map((item) => {
1560
+ let { path, name, children, meta } = item;
1561
+ if (children?.length) children = filterRoutes(children);
1562
+ return {
1563
+ path,
1564
+ name,
1565
+ children,
1566
+ meta
1567
+ };
1568
+ });
1569
+ }
1570
+ function filterCurrentRoute(route) {
1571
+ if (route) {
1572
+ const { fullPath, hash, href, path, name, matched, params, query } = route;
1573
+ return {
1574
+ fullPath,
1575
+ hash,
1576
+ href,
1577
+ path,
1578
+ name,
1579
+ params,
1580
+ query,
1581
+ matched: filterRoutes(matched)
1582
+ };
1583
+ }
1584
+ return route;
1585
+ }
1586
+ function normalizeRouterInfo(appRecord, activeAppRecord) {
1587
+ function init() {
1588
+ const router = appRecord.app?.config.globalProperties.$router;
1589
+ const currentRoute = filterCurrentRoute(router?.currentRoute.value);
1590
+ const routes = filterRoutes(getRoutes(router));
1591
+ const c = console.warn;
1592
+ console.warn = () => {};
1593
+ target[ROUTER_INFO_KEY] = {
1594
+ currentRoute: currentRoute ? deepClone(currentRoute) : {},
1595
+ routes: deepClone(routes)
1596
+ };
1597
+ target[ROUTER_KEY] = router;
1598
+ console.warn = c;
1599
+ }
1600
+ init();
1601
+ hook.on.componentUpdated(debounce(() => {
1602
+ if (activeAppRecord.value?.app !== appRecord.app) return;
1603
+ init();
1604
+ if (devtoolsState.highPerfModeEnabled) return;
1605
+ devtoolsContext.hooks.callHook(DevToolsMessagingHookKeys.ROUTER_INFO_UPDATED, { state: target[ROUTER_INFO_KEY] });
1606
+ }, 200));
1607
+ }
1608
+ function createDevToolsApi(hooks) {
1609
+ return {
1610
+ async getInspectorTree(payload) {
1611
+ const _payload = {
1612
+ ...payload,
1613
+ app: activeAppRecord.value.app,
1614
+ rootNodes: []
1615
+ };
1616
+ await new Promise((resolve) => {
1617
+ hooks.callHookWith(async (callbacks) => {
1618
+ await Promise.all(callbacks.map((cb) => cb(_payload)));
1619
+ resolve();
1620
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_TREE);
1621
+ });
1622
+ return _payload.rootNodes;
1623
+ },
1624
+ async getInspectorState(payload) {
1625
+ const _payload = {
1626
+ ...payload,
1627
+ app: activeAppRecord.value.app,
1628
+ state: null
1629
+ };
1630
+ const ctx = { currentTab: `custom-inspector:${payload.inspectorId}` };
1631
+ await new Promise((resolve) => {
1632
+ hooks.callHookWith(async (callbacks) => {
1633
+ await Promise.all(callbacks.map((cb) => cb(_payload, ctx)));
1634
+ resolve();
1635
+ }, DevToolsV6PluginAPIHookKeys.GET_INSPECTOR_STATE);
1636
+ });
1637
+ return _payload.state;
1638
+ },
1639
+ editInspectorState(payload) {
1640
+ const stateEditor = new StateEditor();
1641
+ const _payload = {
1642
+ ...payload,
1643
+ app: activeAppRecord.value.app,
1644
+ set: (obj, path = payload.path, value = payload.state.value, cb) => {
1645
+ stateEditor.set(obj, path, value, cb || stateEditor.createDefaultSetCallback(payload.state));
1646
+ }
1647
+ };
1648
+ hooks.callHookWith((callbacks) => {
1649
+ callbacks.forEach((cb) => cb(_payload));
1650
+ }, DevToolsV6PluginAPIHookKeys.EDIT_INSPECTOR_STATE);
1651
+ },
1652
+ sendInspectorState(inspectorId) {
1653
+ const inspector = getInspector(inspectorId);
1654
+ hooks.callHook(DevToolsContextHookKeys.SEND_INSPECTOR_STATE, {
1655
+ inspectorId,
1656
+ plugin: {
1657
+ descriptor: inspector.descriptor,
1658
+ setupFn: () => ({})
1659
+ }
1660
+ });
1661
+ },
1662
+ inspectComponentInspector() {
1663
+ return inspectComponentHighLighter();
1664
+ },
1665
+ cancelInspectComponentInspector() {
1666
+ return cancelInspectComponentHighLighter();
1667
+ },
1668
+ getComponentRenderCode(id) {
1669
+ const instance = getComponentInstance(activeAppRecord.value, id);
1670
+ if (instance) return !(typeof instance?.type === "function") ? instance.render.toString() : instance.type.toString();
1671
+ },
1672
+ scrollToComponent(id) {
1673
+ return scrollToComponent({ id });
1674
+ },
1675
+ openInEditor,
1676
+ getVueInspector: getComponentInspector,
1677
+ toggleApp(id, options) {
1678
+ const appRecord = devtoolsAppRecords.value.find((record) => record.id === id);
1679
+ if (appRecord) {
1680
+ setActiveAppRecordId(id);
1681
+ setActiveAppRecord(appRecord);
1682
+ normalizeRouterInfo(appRecord, activeAppRecord);
1683
+ callInspectorUpdatedHook();
1684
+ registerDevToolsPlugin(appRecord.app, options);
1685
+ }
1686
+ },
1687
+ inspectDOM(instanceId) {
1688
+ const instance = getComponentInstance(activeAppRecord.value, instanceId);
1689
+ if (instance) {
1690
+ const [el] = getRootElementsFromComponentInstance(instance);
1691
+ if (el) target.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
1692
+ }
1693
+ },
1694
+ updatePluginSettings(pluginId, key, value) {
1695
+ setPluginSettings(pluginId, key, value);
1696
+ },
1697
+ getPluginSettings(pluginId) {
1698
+ return {
1699
+ options: getPluginSettingsOptions(pluginId),
1700
+ values: getPluginSettings(pluginId)
1701
+ };
1702
+ }
1703
+ };
1704
+ }
1705
+ target.__VUE_DEVTOOLS_ENV__ ??= { vitePluginDetected: false };
1706
+ var hooks = createDevToolsCtxHooks();
1707
+ target.__VUE_DEVTOOLS_KIT_CONTEXT__ ??= {
1708
+ hooks,
1709
+ get state() {
1710
+ return {
1711
+ ...devtoolsState,
1712
+ activeAppRecordId: activeAppRecord.id,
1713
+ activeAppRecord: activeAppRecord.value,
1714
+ appRecords: devtoolsAppRecords.value
1715
+ };
1716
+ },
1717
+ api: createDevToolsApi(hooks)
1718
+ };
1719
+ var devtoolsContext = target.__VUE_DEVTOOLS_KIT_CONTEXT__;
1720
+ var require_speakingurl$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1721
+ (function(root) {
1722
+ "use strict";
1723
+ /**
1724
+ * charMap
1725
+ * @type {Object}
1726
+ */
1727
+ var charMap = {
1728
+ "À": "A",
1729
+ "Á": "A",
1730
+ "Â": "A",
1731
+ "Ã": "A",
1732
+ "Ä": "Ae",
1733
+ "Å": "A",
1734
+ "Æ": "AE",
1735
+ "Ç": "C",
1736
+ "È": "E",
1737
+ "É": "E",
1738
+ "Ê": "E",
1739
+ "Ë": "E",
1740
+ "Ì": "I",
1741
+ "Í": "I",
1742
+ "Î": "I",
1743
+ "Ï": "I",
1744
+ "Ð": "D",
1745
+ "Ñ": "N",
1746
+ "Ò": "O",
1747
+ "Ó": "O",
1748
+ "Ô": "O",
1749
+ "Õ": "O",
1750
+ "Ö": "Oe",
1751
+ "Ő": "O",
1752
+ "Ø": "O",
1753
+ "Ù": "U",
1754
+ "Ú": "U",
1755
+ "Û": "U",
1756
+ "Ü": "Ue",
1757
+ "Ű": "U",
1758
+ "Ý": "Y",
1759
+ "Þ": "TH",
1760
+ "ß": "ss",
1761
+ "à": "a",
1762
+ "á": "a",
1763
+ "â": "a",
1764
+ "ã": "a",
1765
+ "ä": "ae",
1766
+ "å": "a",
1767
+ "æ": "ae",
1768
+ "ç": "c",
1769
+ "è": "e",
1770
+ "é": "e",
1771
+ "ê": "e",
1772
+ "ë": "e",
1773
+ "ì": "i",
1774
+ "í": "i",
1775
+ "î": "i",
1776
+ "ï": "i",
1777
+ "ð": "d",
1778
+ "ñ": "n",
1779
+ "ò": "o",
1780
+ "ó": "o",
1781
+ "ô": "o",
1782
+ "õ": "o",
1783
+ "ö": "oe",
1784
+ "ő": "o",
1785
+ "ø": "o",
1786
+ "ù": "u",
1787
+ "ú": "u",
1788
+ "û": "u",
1789
+ "ü": "ue",
1790
+ "ű": "u",
1791
+ "ý": "y",
1792
+ "þ": "th",
1793
+ "ÿ": "y",
1794
+ "ẞ": "SS",
1795
+ "ا": "a",
1796
+ "أ": "a",
1797
+ "إ": "i",
1798
+ "آ": "aa",
1799
+ "ؤ": "u",
1800
+ "ئ": "e",
1801
+ "ء": "a",
1802
+ "ب": "b",
1803
+ "ت": "t",
1804
+ "ث": "th",
1805
+ "ج": "j",
1806
+ "ح": "h",
1807
+ "خ": "kh",
1808
+ "د": "d",
1809
+ "ذ": "th",
1810
+ "ر": "r",
1811
+ "ز": "z",
1812
+ "س": "s",
1813
+ "ش": "sh",
1814
+ "ص": "s",
1815
+ "ض": "dh",
1816
+ "ط": "t",
1817
+ "ظ": "z",
1818
+ "ع": "a",
1819
+ "غ": "gh",
1820
+ "ف": "f",
1821
+ "ق": "q",
1822
+ "ك": "k",
1823
+ "ل": "l",
1824
+ "م": "m",
1825
+ "ن": "n",
1826
+ "ه": "h",
1827
+ "و": "w",
1828
+ "ي": "y",
1829
+ "ى": "a",
1830
+ "ة": "h",
1831
+ "ﻻ": "la",
1832
+ "ﻷ": "laa",
1833
+ "ﻹ": "lai",
1834
+ "ﻵ": "laa",
1835
+ "گ": "g",
1836
+ "چ": "ch",
1837
+ "پ": "p",
1838
+ "ژ": "zh",
1839
+ "ک": "k",
1840
+ "ی": "y",
1841
+ "َ": "a",
1842
+ "ً": "an",
1843
+ "ِ": "e",
1844
+ "ٍ": "en",
1845
+ "ُ": "u",
1846
+ "ٌ": "on",
1847
+ "ْ": "",
1848
+ "٠": "0",
1849
+ "١": "1",
1850
+ "٢": "2",
1851
+ "٣": "3",
1852
+ "٤": "4",
1853
+ "٥": "5",
1854
+ "٦": "6",
1855
+ "٧": "7",
1856
+ "٨": "8",
1857
+ "٩": "9",
1858
+ "۰": "0",
1859
+ "۱": "1",
1860
+ "۲": "2",
1861
+ "۳": "3",
1862
+ "۴": "4",
1863
+ "۵": "5",
1864
+ "۶": "6",
1865
+ "۷": "7",
1866
+ "۸": "8",
1867
+ "۹": "9",
1868
+ "က": "k",
1869
+ "ခ": "kh",
1870
+ "ဂ": "g",
1871
+ "ဃ": "ga",
1872
+ "င": "ng",
1873
+ "စ": "s",
1874
+ "ဆ": "sa",
1875
+ "ဇ": "z",
1876
+ "စျ": "za",
1877
+ "ည": "ny",
1878
+ "ဋ": "t",
1879
+ "ဌ": "ta",
1880
+ "ဍ": "d",
1881
+ "ဎ": "da",
1882
+ "ဏ": "na",
1883
+ "တ": "t",
1884
+ "ထ": "ta",
1885
+ "ဒ": "d",
1886
+ "ဓ": "da",
1887
+ "န": "n",
1888
+ "ပ": "p",
1889
+ "ဖ": "pa",
1890
+ "ဗ": "b",
1891
+ "ဘ": "ba",
1892
+ "မ": "m",
1893
+ "ယ": "y",
1894
+ "ရ": "ya",
1895
+ "လ": "l",
1896
+ "ဝ": "w",
1897
+ "သ": "th",
1898
+ "ဟ": "h",
1899
+ "ဠ": "la",
1900
+ "အ": "a",
1901
+ "ြ": "y",
1902
+ "ျ": "ya",
1903
+ "ွ": "w",
1904
+ "ြွ": "yw",
1905
+ "ျွ": "ywa",
1906
+ "ှ": "h",
1907
+ "ဧ": "e",
1908
+ "၏": "-e",
1909
+ "ဣ": "i",
1910
+ "ဤ": "-i",
1911
+ "ဉ": "u",
1912
+ "ဦ": "-u",
1913
+ "ဩ": "aw",
1914
+ "သြော": "aw",
1915
+ "ဪ": "aw",
1916
+ "၀": "0",
1917
+ "၁": "1",
1918
+ "၂": "2",
1919
+ "၃": "3",
1920
+ "၄": "4",
1921
+ "၅": "5",
1922
+ "၆": "6",
1923
+ "၇": "7",
1924
+ "၈": "8",
1925
+ "၉": "9",
1926
+ "္": "",
1927
+ "့": "",
1928
+ "း": "",
1929
+ "č": "c",
1930
+ "ď": "d",
1931
+ "ě": "e",
1932
+ "ň": "n",
1933
+ "ř": "r",
1934
+ "š": "s",
1935
+ "ť": "t",
1936
+ "ů": "u",
1937
+ "ž": "z",
1938
+ "Č": "C",
1939
+ "Ď": "D",
1940
+ "Ě": "E",
1941
+ "Ň": "N",
1942
+ "Ř": "R",
1943
+ "Š": "S",
1944
+ "Ť": "T",
1945
+ "Ů": "U",
1946
+ "Ž": "Z",
1947
+ "ހ": "h",
1948
+ "ށ": "sh",
1949
+ "ނ": "n",
1950
+ "ރ": "r",
1951
+ "ބ": "b",
1952
+ "ޅ": "lh",
1953
+ "ކ": "k",
1954
+ "އ": "a",
1955
+ "ވ": "v",
1956
+ "މ": "m",
1957
+ "ފ": "f",
1958
+ "ދ": "dh",
1959
+ "ތ": "th",
1960
+ "ލ": "l",
1961
+ "ގ": "g",
1962
+ "ޏ": "gn",
1963
+ "ސ": "s",
1964
+ "ޑ": "d",
1965
+ "ޒ": "z",
1966
+ "ޓ": "t",
1967
+ "ޔ": "y",
1968
+ "ޕ": "p",
1969
+ "ޖ": "j",
1970
+ "ޗ": "ch",
1971
+ "ޘ": "tt",
1972
+ "ޙ": "hh",
1973
+ "ޚ": "kh",
1974
+ "ޛ": "th",
1975
+ "ޜ": "z",
1976
+ "ޝ": "sh",
1977
+ "ޞ": "s",
1978
+ "ޟ": "d",
1979
+ "ޠ": "t",
1980
+ "ޡ": "z",
1981
+ "ޢ": "a",
1982
+ "ޣ": "gh",
1983
+ "ޤ": "q",
1984
+ "ޥ": "w",
1985
+ "ަ": "a",
1986
+ "ާ": "aa",
1987
+ "ި": "i",
1988
+ "ީ": "ee",
1989
+ "ު": "u",
1990
+ "ޫ": "oo",
1991
+ "ެ": "e",
1992
+ "ޭ": "ey",
1993
+ "ޮ": "o",
1994
+ "ޯ": "oa",
1995
+ "ް": "",
1996
+ "ა": "a",
1997
+ "ბ": "b",
1998
+ "გ": "g",
1999
+ "დ": "d",
2000
+ "ე": "e",
2001
+ "ვ": "v",
2002
+ "ზ": "z",
2003
+ "თ": "t",
2004
+ "ი": "i",
2005
+ "კ": "k",
2006
+ "ლ": "l",
2007
+ "მ": "m",
2008
+ "ნ": "n",
2009
+ "ო": "o",
2010
+ "პ": "p",
2011
+ "ჟ": "zh",
2012
+ "რ": "r",
2013
+ "ს": "s",
2014
+ "ტ": "t",
2015
+ "უ": "u",
2016
+ "ფ": "p",
2017
+ "ქ": "k",
2018
+ "ღ": "gh",
2019
+ "ყ": "q",
2020
+ "შ": "sh",
2021
+ "ჩ": "ch",
2022
+ "ც": "ts",
2023
+ "ძ": "dz",
2024
+ "წ": "ts",
2025
+ "ჭ": "ch",
2026
+ "ხ": "kh",
2027
+ "ჯ": "j",
2028
+ "ჰ": "h",
2029
+ "α": "a",
2030
+ "β": "v",
2031
+ "γ": "g",
2032
+ "δ": "d",
2033
+ "ε": "e",
2034
+ "ζ": "z",
2035
+ "η": "i",
2036
+ "θ": "th",
2037
+ "ι": "i",
2038
+ "κ": "k",
2039
+ "λ": "l",
2040
+ "μ": "m",
2041
+ "ν": "n",
2042
+ "ξ": "ks",
2043
+ "ο": "o",
2044
+ "π": "p",
2045
+ "ρ": "r",
2046
+ "σ": "s",
2047
+ "τ": "t",
2048
+ "υ": "y",
2049
+ "φ": "f",
2050
+ "χ": "x",
2051
+ "ψ": "ps",
2052
+ "ω": "o",
2053
+ "ά": "a",
2054
+ "έ": "e",
2055
+ "ί": "i",
2056
+ "ό": "o",
2057
+ "ύ": "y",
2058
+ "ή": "i",
2059
+ "ώ": "o",
2060
+ "ς": "s",
2061
+ "ϊ": "i",
2062
+ "ΰ": "y",
2063
+ "ϋ": "y",
2064
+ "ΐ": "i",
2065
+ "Α": "A",
2066
+ "Β": "B",
2067
+ "Γ": "G",
2068
+ "Δ": "D",
2069
+ "Ε": "E",
2070
+ "Ζ": "Z",
2071
+ "Η": "I",
2072
+ "Θ": "TH",
2073
+ "Ι": "I",
2074
+ "Κ": "K",
2075
+ "Λ": "L",
2076
+ "Μ": "M",
2077
+ "Ν": "N",
2078
+ "Ξ": "KS",
2079
+ "Ο": "O",
2080
+ "Π": "P",
2081
+ "Ρ": "R",
2082
+ "Σ": "S",
2083
+ "Τ": "T",
2084
+ "Υ": "Y",
2085
+ "Φ": "F",
2086
+ "Χ": "X",
2087
+ "Ψ": "PS",
2088
+ "Ω": "O",
2089
+ "Ά": "A",
2090
+ "Έ": "E",
2091
+ "Ί": "I",
2092
+ "Ό": "O",
2093
+ "Ύ": "Y",
2094
+ "Ή": "I",
2095
+ "Ώ": "O",
2096
+ "Ϊ": "I",
2097
+ "Ϋ": "Y",
2098
+ "ā": "a",
2099
+ "ē": "e",
2100
+ "ģ": "g",
2101
+ "ī": "i",
2102
+ "ķ": "k",
2103
+ "ļ": "l",
2104
+ "ņ": "n",
2105
+ "ū": "u",
2106
+ "Ā": "A",
2107
+ "Ē": "E",
2108
+ "Ģ": "G",
2109
+ "Ī": "I",
2110
+ "Ķ": "k",
2111
+ "Ļ": "L",
2112
+ "Ņ": "N",
2113
+ "Ū": "U",
2114
+ "Ќ": "Kj",
2115
+ "ќ": "kj",
2116
+ "Љ": "Lj",
2117
+ "љ": "lj",
2118
+ "Њ": "Nj",
2119
+ "њ": "nj",
2120
+ "Тс": "Ts",
2121
+ "тс": "ts",
2122
+ "ą": "a",
2123
+ "ć": "c",
2124
+ "ę": "e",
2125
+ "ł": "l",
2126
+ "ń": "n",
2127
+ "ś": "s",
2128
+ "ź": "z",
2129
+ "ż": "z",
2130
+ "Ą": "A",
2131
+ "Ć": "C",
2132
+ "Ę": "E",
2133
+ "Ł": "L",
2134
+ "Ń": "N",
2135
+ "Ś": "S",
2136
+ "Ź": "Z",
2137
+ "Ż": "Z",
2138
+ "Є": "Ye",
2139
+ "І": "I",
2140
+ "Ї": "Yi",
2141
+ "Ґ": "G",
2142
+ "є": "ye",
2143
+ "і": "i",
2144
+ "ї": "yi",
2145
+ "ґ": "g",
2146
+ "ă": "a",
2147
+ "Ă": "A",
2148
+ "ș": "s",
2149
+ "Ș": "S",
2150
+ "ț": "t",
2151
+ "Ț": "T",
2152
+ "ţ": "t",
2153
+ "Ţ": "T",
2154
+ "а": "a",
2155
+ "б": "b",
2156
+ "в": "v",
2157
+ "г": "g",
2158
+ "д": "d",
2159
+ "е": "e",
2160
+ "ё": "yo",
2161
+ "ж": "zh",
2162
+ "з": "z",
2163
+ "и": "i",
2164
+ "й": "i",
2165
+ "к": "k",
2166
+ "л": "l",
2167
+ "м": "m",
2168
+ "н": "n",
2169
+ "о": "o",
2170
+ "п": "p",
2171
+ "р": "r",
2172
+ "с": "s",
2173
+ "т": "t",
2174
+ "у": "u",
2175
+ "ф": "f",
2176
+ "х": "kh",
2177
+ "ц": "c",
2178
+ "ч": "ch",
2179
+ "ш": "sh",
2180
+ "щ": "sh",
2181
+ "ъ": "",
2182
+ "ы": "y",
2183
+ "ь": "",
2184
+ "э": "e",
2185
+ "ю": "yu",
2186
+ "я": "ya",
2187
+ "А": "A",
2188
+ "Б": "B",
2189
+ "В": "V",
2190
+ "Г": "G",
2191
+ "Д": "D",
2192
+ "Е": "E",
2193
+ "Ё": "Yo",
2194
+ "Ж": "Zh",
2195
+ "З": "Z",
2196
+ "И": "I",
2197
+ "Й": "I",
2198
+ "К": "K",
2199
+ "Л": "L",
2200
+ "М": "M",
2201
+ "Н": "N",
2202
+ "О": "O",
2203
+ "П": "P",
2204
+ "Р": "R",
2205
+ "С": "S",
2206
+ "Т": "T",
2207
+ "У": "U",
2208
+ "Ф": "F",
2209
+ "Х": "Kh",
2210
+ "Ц": "C",
2211
+ "Ч": "Ch",
2212
+ "Ш": "Sh",
2213
+ "Щ": "Sh",
2214
+ "Ъ": "",
2215
+ "Ы": "Y",
2216
+ "Ь": "",
2217
+ "Э": "E",
2218
+ "Ю": "Yu",
2219
+ "Я": "Ya",
2220
+ "ђ": "dj",
2221
+ "ј": "j",
2222
+ "ћ": "c",
2223
+ "џ": "dz",
2224
+ "Ђ": "Dj",
2225
+ "Ј": "j",
2226
+ "Ћ": "C",
2227
+ "Џ": "Dz",
2228
+ "ľ": "l",
2229
+ "ĺ": "l",
2230
+ "ŕ": "r",
2231
+ "Ľ": "L",
2232
+ "Ĺ": "L",
2233
+ "Ŕ": "R",
2234
+ "ş": "s",
2235
+ "Ş": "S",
2236
+ "ı": "i",
2237
+ "İ": "I",
2238
+ "ğ": "g",
2239
+ "Ğ": "G",
2240
+ "ả": "a",
2241
+ "Ả": "A",
2242
+ "ẳ": "a",
2243
+ "Ẳ": "A",
2244
+ "ẩ": "a",
2245
+ "Ẩ": "A",
2246
+ "đ": "d",
2247
+ "Đ": "D",
2248
+ "ẹ": "e",
2249
+ "Ẹ": "E",
2250
+ "ẽ": "e",
2251
+ "Ẽ": "E",
2252
+ "ẻ": "e",
2253
+ "Ẻ": "E",
2254
+ "ế": "e",
2255
+ "Ế": "E",
2256
+ "ề": "e",
2257
+ "Ề": "E",
2258
+ "ệ": "e",
2259
+ "Ệ": "E",
2260
+ "ễ": "e",
2261
+ "Ễ": "E",
2262
+ "ể": "e",
2263
+ "Ể": "E",
2264
+ "ỏ": "o",
2265
+ "ọ": "o",
2266
+ "Ọ": "o",
2267
+ "ố": "o",
2268
+ "Ố": "O",
2269
+ "ồ": "o",
2270
+ "Ồ": "O",
2271
+ "ổ": "o",
2272
+ "Ổ": "O",
2273
+ "ộ": "o",
2274
+ "Ộ": "O",
2275
+ "ỗ": "o",
2276
+ "Ỗ": "O",
2277
+ "ơ": "o",
2278
+ "Ơ": "O",
2279
+ "ớ": "o",
2280
+ "Ớ": "O",
2281
+ "ờ": "o",
2282
+ "Ờ": "O",
2283
+ "ợ": "o",
2284
+ "Ợ": "O",
2285
+ "ỡ": "o",
2286
+ "Ỡ": "O",
2287
+ "Ở": "o",
2288
+ "ở": "o",
2289
+ "ị": "i",
2290
+ "Ị": "I",
2291
+ "ĩ": "i",
2292
+ "Ĩ": "I",
2293
+ "ỉ": "i",
2294
+ "Ỉ": "i",
2295
+ "ủ": "u",
2296
+ "Ủ": "U",
2297
+ "ụ": "u",
2298
+ "Ụ": "U",
2299
+ "ũ": "u",
2300
+ "Ũ": "U",
2301
+ "ư": "u",
2302
+ "Ư": "U",
2303
+ "ứ": "u",
2304
+ "Ứ": "U",
2305
+ "ừ": "u",
2306
+ "Ừ": "U",
2307
+ "ự": "u",
2308
+ "Ự": "U",
2309
+ "ữ": "u",
2310
+ "Ữ": "U",
2311
+ "ử": "u",
2312
+ "Ử": "ư",
2313
+ "ỷ": "y",
2314
+ "Ỷ": "y",
2315
+ "ỳ": "y",
2316
+ "Ỳ": "Y",
2317
+ "ỵ": "y",
2318
+ "Ỵ": "Y",
2319
+ "ỹ": "y",
2320
+ "Ỹ": "Y",
2321
+ "ạ": "a",
2322
+ "Ạ": "A",
2323
+ "ấ": "a",
2324
+ "Ấ": "A",
2325
+ "ầ": "a",
2326
+ "Ầ": "A",
2327
+ "ậ": "a",
2328
+ "Ậ": "A",
2329
+ "ẫ": "a",
2330
+ "Ẫ": "A",
2331
+ "ắ": "a",
2332
+ "Ắ": "A",
2333
+ "ằ": "a",
2334
+ "Ằ": "A",
2335
+ "ặ": "a",
2336
+ "Ặ": "A",
2337
+ "ẵ": "a",
2338
+ "Ẵ": "A",
2339
+ "⓪": "0",
2340
+ "①": "1",
2341
+ "②": "2",
2342
+ "③": "3",
2343
+ "④": "4",
2344
+ "⑤": "5",
2345
+ "⑥": "6",
2346
+ "⑦": "7",
2347
+ "⑧": "8",
2348
+ "⑨": "9",
2349
+ "⑩": "10",
2350
+ "⑪": "11",
2351
+ "⑫": "12",
2352
+ "⑬": "13",
2353
+ "⑭": "14",
2354
+ "⑮": "15",
2355
+ "⑯": "16",
2356
+ "⑰": "17",
2357
+ "⑱": "18",
2358
+ "⑲": "18",
2359
+ "⑳": "18",
2360
+ "⓵": "1",
2361
+ "⓶": "2",
2362
+ "⓷": "3",
2363
+ "⓸": "4",
2364
+ "⓹": "5",
2365
+ "⓺": "6",
2366
+ "⓻": "7",
2367
+ "⓼": "8",
2368
+ "⓽": "9",
2369
+ "⓾": "10",
2370
+ "⓿": "0",
2371
+ "⓫": "11",
2372
+ "⓬": "12",
2373
+ "⓭": "13",
2374
+ "⓮": "14",
2375
+ "⓯": "15",
2376
+ "⓰": "16",
2377
+ "⓱": "17",
2378
+ "⓲": "18",
2379
+ "⓳": "19",
2380
+ "⓴": "20",
2381
+ "Ⓐ": "A",
2382
+ "Ⓑ": "B",
2383
+ "Ⓒ": "C",
2384
+ "Ⓓ": "D",
2385
+ "Ⓔ": "E",
2386
+ "Ⓕ": "F",
2387
+ "Ⓖ": "G",
2388
+ "Ⓗ": "H",
2389
+ "Ⓘ": "I",
2390
+ "Ⓙ": "J",
2391
+ "Ⓚ": "K",
2392
+ "Ⓛ": "L",
2393
+ "Ⓜ": "M",
2394
+ "Ⓝ": "N",
2395
+ "Ⓞ": "O",
2396
+ "Ⓟ": "P",
2397
+ "Ⓠ": "Q",
2398
+ "Ⓡ": "R",
2399
+ "Ⓢ": "S",
2400
+ "Ⓣ": "T",
2401
+ "Ⓤ": "U",
2402
+ "Ⓥ": "V",
2403
+ "Ⓦ": "W",
2404
+ "Ⓧ": "X",
2405
+ "Ⓨ": "Y",
2406
+ "Ⓩ": "Z",
2407
+ "ⓐ": "a",
2408
+ "ⓑ": "b",
2409
+ "ⓒ": "c",
2410
+ "ⓓ": "d",
2411
+ "ⓔ": "e",
2412
+ "ⓕ": "f",
2413
+ "ⓖ": "g",
2414
+ "ⓗ": "h",
2415
+ "ⓘ": "i",
2416
+ "ⓙ": "j",
2417
+ "ⓚ": "k",
2418
+ "ⓛ": "l",
2419
+ "ⓜ": "m",
2420
+ "ⓝ": "n",
2421
+ "ⓞ": "o",
2422
+ "ⓟ": "p",
2423
+ "ⓠ": "q",
2424
+ "ⓡ": "r",
2425
+ "ⓢ": "s",
2426
+ "ⓣ": "t",
2427
+ "ⓤ": "u",
2428
+ "ⓦ": "v",
2429
+ "ⓥ": "w",
2430
+ "ⓧ": "x",
2431
+ "ⓨ": "y",
2432
+ "ⓩ": "z",
2433
+ "“": "\"",
2434
+ "”": "\"",
2435
+ "‘": "'",
2436
+ "’": "'",
2437
+ "∂": "d",
2438
+ "ƒ": "f",
2439
+ "™": "(TM)",
2440
+ "©": "(C)",
2441
+ "œ": "oe",
2442
+ "Œ": "OE",
2443
+ "®": "(R)",
2444
+ "†": "+",
2445
+ "℠": "(SM)",
2446
+ "…": "...",
2447
+ "˚": "o",
2448
+ "º": "o",
2449
+ "ª": "a",
2450
+ "•": "*",
2451
+ "၊": ",",
2452
+ "။": ".",
2453
+ "$": "USD",
2454
+ "€": "EUR",
2455
+ "₢": "BRN",
2456
+ "₣": "FRF",
2457
+ "£": "GBP",
2458
+ "₤": "ITL",
2459
+ "₦": "NGN",
2460
+ "₧": "ESP",
2461
+ "₩": "KRW",
2462
+ "₪": "ILS",
2463
+ "₫": "VND",
2464
+ "₭": "LAK",
2465
+ "₮": "MNT",
2466
+ "₯": "GRD",
2467
+ "₱": "ARS",
2468
+ "₲": "PYG",
2469
+ "₳": "ARA",
2470
+ "₴": "UAH",
2471
+ "₵": "GHS",
2472
+ "¢": "cent",
2473
+ "¥": "CNY",
2474
+ "元": "CNY",
2475
+ "円": "YEN",
2476
+ "﷼": "IRR",
2477
+ "₠": "EWE",
2478
+ "฿": "THB",
2479
+ "₨": "INR",
2480
+ "₹": "INR",
2481
+ "₰": "PF",
2482
+ "₺": "TRY",
2483
+ "؋": "AFN",
2484
+ "₼": "AZN",
2485
+ "лв": "BGN",
2486
+ "៛": "KHR",
2487
+ "₡": "CRC",
2488
+ "₸": "KZT",
2489
+ "ден": "MKD",
2490
+ "zł": "PLN",
2491
+ "₽": "RUB",
2492
+ "₾": "GEL"
2493
+ };
2494
+ /**
2495
+ * special look ahead character array
2496
+ * These characters form with consonants to become 'single'/consonant combo
2497
+ * @type [Array]
2498
+ */
2499
+ var lookAheadCharArray = ["်", "ް"];
2500
+ /**
2501
+ * diatricMap for languages where transliteration changes entirely as more diatrics are added
2502
+ * @type {Object}
2503
+ */
2504
+ var diatricMap = {
2505
+ "ာ": "a",
2506
+ "ါ": "a",
2507
+ "ေ": "e",
2508
+ "ဲ": "e",
2509
+ "ိ": "i",
2510
+ "ီ": "i",
2511
+ "ို": "o",
2512
+ "ု": "u",
2513
+ "ူ": "u",
2514
+ "ေါင်": "aung",
2515
+ "ော": "aw",
2516
+ "ော်": "aw",
2517
+ "ေါ": "aw",
2518
+ "ေါ်": "aw",
2519
+ "်": "်",
2520
+ "က်": "et",
2521
+ "ိုက်": "aik",
2522
+ "ောက်": "auk",
2523
+ "င်": "in",
2524
+ "ိုင်": "aing",
2525
+ "ောင်": "aung",
2526
+ "စ်": "it",
2527
+ "ည်": "i",
2528
+ "တ်": "at",
2529
+ "ိတ်": "eik",
2530
+ "ုတ်": "ok",
2531
+ "ွတ်": "ut",
2532
+ "ေတ်": "it",
2533
+ "ဒ်": "d",
2534
+ "ိုဒ်": "ok",
2535
+ "ုဒ်": "ait",
2536
+ "န်": "an",
2537
+ "ာန်": "an",
2538
+ "ိန်": "ein",
2539
+ "ုန်": "on",
2540
+ "ွန်": "un",
2541
+ "ပ်": "at",
2542
+ "ိပ်": "eik",
2543
+ "ုပ်": "ok",
2544
+ "ွပ်": "ut",
2545
+ "န်ုပ်": "nub",
2546
+ "မ်": "an",
2547
+ "ိမ်": "ein",
2548
+ "ုမ်": "on",
2549
+ "ွမ်": "un",
2550
+ "ယ်": "e",
2551
+ "ိုလ်": "ol",
2552
+ "ဉ်": "in",
2553
+ "ံ": "an",
2554
+ "ိံ": "ein",
2555
+ "ုံ": "on",
2556
+ "ައް": "ah",
2557
+ "ަށް": "ah"
2558
+ };
2559
+ /**
2560
+ * langCharMap language specific characters translations
2561
+ * @type {Object}
2562
+ */
2563
+ var langCharMap = {
2564
+ "en": {},
2565
+ "az": {
2566
+ "ç": "c",
2567
+ "ə": "e",
2568
+ "ğ": "g",
2569
+ "ı": "i",
2570
+ "ö": "o",
2571
+ "ş": "s",
2572
+ "ü": "u",
2573
+ "Ç": "C",
2574
+ "Ə": "E",
2575
+ "Ğ": "G",
2576
+ "İ": "I",
2577
+ "Ö": "O",
2578
+ "Ş": "S",
2579
+ "Ü": "U"
2580
+ },
2581
+ "cs": {
2582
+ "č": "c",
2583
+ "ď": "d",
2584
+ "ě": "e",
2585
+ "ň": "n",
2586
+ "ř": "r",
2587
+ "š": "s",
2588
+ "ť": "t",
2589
+ "ů": "u",
2590
+ "ž": "z",
2591
+ "Č": "C",
2592
+ "Ď": "D",
2593
+ "Ě": "E",
2594
+ "Ň": "N",
2595
+ "Ř": "R",
2596
+ "Š": "S",
2597
+ "Ť": "T",
2598
+ "Ů": "U",
2599
+ "Ž": "Z"
2600
+ },
2601
+ "fi": {
2602
+ "ä": "a",
2603
+ "Ä": "A",
2604
+ "ö": "o",
2605
+ "Ö": "O"
2606
+ },
2607
+ "hu": {
2608
+ "ä": "a",
2609
+ "Ä": "A",
2610
+ "ö": "o",
2611
+ "Ö": "O",
2612
+ "ü": "u",
2613
+ "Ü": "U",
2614
+ "ű": "u",
2615
+ "Ű": "U"
2616
+ },
2617
+ "lt": {
2618
+ "ą": "a",
2619
+ "č": "c",
2620
+ "ę": "e",
2621
+ "ė": "e",
2622
+ "į": "i",
2623
+ "š": "s",
2624
+ "ų": "u",
2625
+ "ū": "u",
2626
+ "ž": "z",
2627
+ "Ą": "A",
2628
+ "Č": "C",
2629
+ "Ę": "E",
2630
+ "Ė": "E",
2631
+ "Į": "I",
2632
+ "Š": "S",
2633
+ "Ų": "U",
2634
+ "Ū": "U"
2635
+ },
2636
+ "lv": {
2637
+ "ā": "a",
2638
+ "č": "c",
2639
+ "ē": "e",
2640
+ "ģ": "g",
2641
+ "ī": "i",
2642
+ "ķ": "k",
2643
+ "ļ": "l",
2644
+ "ņ": "n",
2645
+ "š": "s",
2646
+ "ū": "u",
2647
+ "ž": "z",
2648
+ "Ā": "A",
2649
+ "Č": "C",
2650
+ "Ē": "E",
2651
+ "Ģ": "G",
2652
+ "Ī": "i",
2653
+ "Ķ": "k",
2654
+ "Ļ": "L",
2655
+ "Ņ": "N",
2656
+ "Š": "S",
2657
+ "Ū": "u",
2658
+ "Ž": "Z"
2659
+ },
2660
+ "pl": {
2661
+ "ą": "a",
2662
+ "ć": "c",
2663
+ "ę": "e",
2664
+ "ł": "l",
2665
+ "ń": "n",
2666
+ "ó": "o",
2667
+ "ś": "s",
2668
+ "ź": "z",
2669
+ "ż": "z",
2670
+ "Ą": "A",
2671
+ "Ć": "C",
2672
+ "Ę": "e",
2673
+ "Ł": "L",
2674
+ "Ń": "N",
2675
+ "Ó": "O",
2676
+ "Ś": "S",
2677
+ "Ź": "Z",
2678
+ "Ż": "Z"
2679
+ },
2680
+ "sv": {
2681
+ "ä": "a",
2682
+ "Ä": "A",
2683
+ "ö": "o",
2684
+ "Ö": "O"
2685
+ },
2686
+ "sk": {
2687
+ "ä": "a",
2688
+ "Ä": "A"
2689
+ },
2690
+ "sr": {
2691
+ "љ": "lj",
2692
+ "њ": "nj",
2693
+ "Љ": "Lj",
2694
+ "Њ": "Nj",
2695
+ "đ": "dj",
2696
+ "Đ": "Dj"
2697
+ },
2698
+ "tr": {
2699
+ "Ü": "U",
2700
+ "Ö": "O",
2701
+ "ü": "u",
2702
+ "ö": "o"
2703
+ }
2704
+ };
2705
+ /**
2706
+ * symbolMap language specific symbol translations
2707
+ * translations must be transliterated already
2708
+ * @type {Object}
2709
+ */
2710
+ var symbolMap = {
2711
+ "ar": {
2712
+ "∆": "delta",
2713
+ "∞": "la-nihaya",
2714
+ "♥": "hob",
2715
+ "&": "wa",
2716
+ "|": "aw",
2717
+ "<": "aqal-men",
2718
+ ">": "akbar-men",
2719
+ "∑": "majmou",
2720
+ "¤": "omla"
2721
+ },
2722
+ "az": {},
2723
+ "ca": {
2724
+ "∆": "delta",
2725
+ "∞": "infinit",
2726
+ "♥": "amor",
2727
+ "&": "i",
2728
+ "|": "o",
2729
+ "<": "menys que",
2730
+ ">": "mes que",
2731
+ "∑": "suma dels",
2732
+ "¤": "moneda"
2733
+ },
2734
+ "cs": {
2735
+ "∆": "delta",
2736
+ "∞": "nekonecno",
2737
+ "♥": "laska",
2738
+ "&": "a",
2739
+ "|": "nebo",
2740
+ "<": "mensi nez",
2741
+ ">": "vetsi nez",
2742
+ "∑": "soucet",
2743
+ "¤": "mena"
2744
+ },
2745
+ "de": {
2746
+ "∆": "delta",
2747
+ "∞": "unendlich",
2748
+ "♥": "Liebe",
2749
+ "&": "und",
2750
+ "|": "oder",
2751
+ "<": "kleiner als",
2752
+ ">": "groesser als",
2753
+ "∑": "Summe von",
2754
+ "¤": "Waehrung"
2755
+ },
2756
+ "dv": {
2757
+ "∆": "delta",
2758
+ "∞": "kolunulaa",
2759
+ "♥": "loabi",
2760
+ "&": "aai",
2761
+ "|": "noonee",
2762
+ "<": "ah vure kuda",
2763
+ ">": "ah vure bodu",
2764
+ "∑": "jumula",
2765
+ "¤": "faisaa"
2766
+ },
2767
+ "en": {
2768
+ "∆": "delta",
2769
+ "∞": "infinity",
2770
+ "♥": "love",
2771
+ "&": "and",
2772
+ "|": "or",
2773
+ "<": "less than",
2774
+ ">": "greater than",
2775
+ "∑": "sum",
2776
+ "¤": "currency"
2777
+ },
2778
+ "es": {
2779
+ "∆": "delta",
2780
+ "∞": "infinito",
2781
+ "♥": "amor",
2782
+ "&": "y",
2783
+ "|": "u",
2784
+ "<": "menos que",
2785
+ ">": "mas que",
2786
+ "∑": "suma de los",
2787
+ "¤": "moneda"
2788
+ },
2789
+ "fa": {
2790
+ "∆": "delta",
2791
+ "∞": "bi-nahayat",
2792
+ "♥": "eshgh",
2793
+ "&": "va",
2794
+ "|": "ya",
2795
+ "<": "kamtar-az",
2796
+ ">": "bishtar-az",
2797
+ "∑": "majmooe",
2798
+ "¤": "vahed"
2799
+ },
2800
+ "fi": {
2801
+ "∆": "delta",
2802
+ "∞": "aarettomyys",
2803
+ "♥": "rakkaus",
2804
+ "&": "ja",
2805
+ "|": "tai",
2806
+ "<": "pienempi kuin",
2807
+ ">": "suurempi kuin",
2808
+ "∑": "summa",
2809
+ "¤": "valuutta"
2810
+ },
2811
+ "fr": {
2812
+ "∆": "delta",
2813
+ "∞": "infiniment",
2814
+ "♥": "Amour",
2815
+ "&": "et",
2816
+ "|": "ou",
2817
+ "<": "moins que",
2818
+ ">": "superieure a",
2819
+ "∑": "somme des",
2820
+ "¤": "monnaie"
2821
+ },
2822
+ "ge": {
2823
+ "∆": "delta",
2824
+ "∞": "usasruloba",
2825
+ "♥": "siqvaruli",
2826
+ "&": "da",
2827
+ "|": "an",
2828
+ "<": "naklebi",
2829
+ ">": "meti",
2830
+ "∑": "jami",
2831
+ "¤": "valuta"
2832
+ },
2833
+ "gr": {},
2834
+ "hu": {
2835
+ "∆": "delta",
2836
+ "∞": "vegtelen",
2837
+ "♥": "szerelem",
2838
+ "&": "es",
2839
+ "|": "vagy",
2840
+ "<": "kisebb mint",
2841
+ ">": "nagyobb mint",
2842
+ "∑": "szumma",
2843
+ "¤": "penznem"
2844
+ },
2845
+ "it": {
2846
+ "∆": "delta",
2847
+ "∞": "infinito",
2848
+ "♥": "amore",
2849
+ "&": "e",
2850
+ "|": "o",
2851
+ "<": "minore di",
2852
+ ">": "maggiore di",
2853
+ "∑": "somma",
2854
+ "¤": "moneta"
2855
+ },
2856
+ "lt": {
2857
+ "∆": "delta",
2858
+ "∞": "begalybe",
2859
+ "♥": "meile",
2860
+ "&": "ir",
2861
+ "|": "ar",
2862
+ "<": "maziau nei",
2863
+ ">": "daugiau nei",
2864
+ "∑": "suma",
2865
+ "¤": "valiuta"
2866
+ },
2867
+ "lv": {
2868
+ "∆": "delta",
2869
+ "∞": "bezgaliba",
2870
+ "♥": "milestiba",
2871
+ "&": "un",
2872
+ "|": "vai",
2873
+ "<": "mazak neka",
2874
+ ">": "lielaks neka",
2875
+ "∑": "summa",
2876
+ "¤": "valuta"
2877
+ },
2878
+ "my": {
2879
+ "∆": "kwahkhyaet",
2880
+ "∞": "asaonasme",
2881
+ "♥": "akhyait",
2882
+ "&": "nhin",
2883
+ "|": "tho",
2884
+ "<": "ngethaw",
2885
+ ">": "kyithaw",
2886
+ "∑": "paungld",
2887
+ "¤": "ngwekye"
2888
+ },
2889
+ "mk": {},
2890
+ "nl": {
2891
+ "∆": "delta",
2892
+ "∞": "oneindig",
2893
+ "♥": "liefde",
2894
+ "&": "en",
2895
+ "|": "of",
2896
+ "<": "kleiner dan",
2897
+ ">": "groter dan",
2898
+ "∑": "som",
2899
+ "¤": "valuta"
2900
+ },
2901
+ "pl": {
2902
+ "∆": "delta",
2903
+ "∞": "nieskonczonosc",
2904
+ "♥": "milosc",
2905
+ "&": "i",
2906
+ "|": "lub",
2907
+ "<": "mniejsze niz",
2908
+ ">": "wieksze niz",
2909
+ "∑": "suma",
2910
+ "¤": "waluta"
2911
+ },
2912
+ "pt": {
2913
+ "∆": "delta",
2914
+ "∞": "infinito",
2915
+ "♥": "amor",
2916
+ "&": "e",
2917
+ "|": "ou",
2918
+ "<": "menor que",
2919
+ ">": "maior que",
2920
+ "∑": "soma",
2921
+ "¤": "moeda"
2922
+ },
2923
+ "ro": {
2924
+ "∆": "delta",
2925
+ "∞": "infinit",
2926
+ "♥": "dragoste",
2927
+ "&": "si",
2928
+ "|": "sau",
2929
+ "<": "mai mic ca",
2930
+ ">": "mai mare ca",
2931
+ "∑": "suma",
2932
+ "¤": "valuta"
2933
+ },
2934
+ "ru": {
2935
+ "∆": "delta",
2936
+ "∞": "beskonechno",
2937
+ "♥": "lubov",
2938
+ "&": "i",
2939
+ "|": "ili",
2940
+ "<": "menshe",
2941
+ ">": "bolshe",
2942
+ "∑": "summa",
2943
+ "¤": "valjuta"
2944
+ },
2945
+ "sk": {
2946
+ "∆": "delta",
2947
+ "∞": "nekonecno",
2948
+ "♥": "laska",
2949
+ "&": "a",
2950
+ "|": "alebo",
2951
+ "<": "menej ako",
2952
+ ">": "viac ako",
2953
+ "∑": "sucet",
2954
+ "¤": "mena"
2955
+ },
2956
+ "sr": {},
2957
+ "tr": {
2958
+ "∆": "delta",
2959
+ "∞": "sonsuzluk",
2960
+ "♥": "ask",
2961
+ "&": "ve",
2962
+ "|": "veya",
2963
+ "<": "kucuktur",
2964
+ ">": "buyuktur",
2965
+ "∑": "toplam",
2966
+ "¤": "para birimi"
2967
+ },
2968
+ "uk": {
2969
+ "∆": "delta",
2970
+ "∞": "bezkinechnist",
2971
+ "♥": "lubov",
2972
+ "&": "i",
2973
+ "|": "abo",
2974
+ "<": "menshe",
2975
+ ">": "bilshe",
2976
+ "∑": "suma",
2977
+ "¤": "valjuta"
2978
+ },
2979
+ "vn": {
2980
+ "∆": "delta",
2981
+ "∞": "vo cuc",
2982
+ "♥": "yeu",
2983
+ "&": "va",
2984
+ "|": "hoac",
2985
+ "<": "nho hon",
2986
+ ">": "lon hon",
2987
+ "∑": "tong",
2988
+ "¤": "tien te"
2989
+ }
2990
+ };
2991
+ var uricChars = [
2992
+ ";",
2993
+ "?",
2994
+ ":",
2995
+ "@",
2996
+ "&",
2997
+ "=",
2998
+ "+",
2999
+ "$",
3000
+ ",",
3001
+ "/"
3002
+ ].join("");
3003
+ var uricNoSlashChars = [
3004
+ ";",
3005
+ "?",
3006
+ ":",
3007
+ "@",
3008
+ "&",
3009
+ "=",
3010
+ "+",
3011
+ "$",
3012
+ ","
3013
+ ].join("");
3014
+ var markChars = [
3015
+ ".",
3016
+ "!",
3017
+ "~",
3018
+ "*",
3019
+ "'",
3020
+ "(",
3021
+ ")"
3022
+ ].join("");
3023
+ /**
3024
+ * getSlug
3025
+ * @param {string} input input string
3026
+ * @param {object|string} opts config object or separator string/char
3027
+ * @api public
3028
+ * @return {string} sluggified string
3029
+ */
3030
+ var getSlug = function getSlug(input, opts) {
3031
+ var separator = "-";
3032
+ var result = "";
3033
+ var diatricString = "";
3034
+ var convertSymbols = true;
3035
+ var customReplacements = {};
3036
+ var maintainCase;
3037
+ var titleCase;
3038
+ var truncate;
3039
+ var uricFlag;
3040
+ var uricNoSlashFlag;
3041
+ var markFlag;
3042
+ var symbol;
3043
+ var langChar;
3044
+ var lucky;
3045
+ var i;
3046
+ var ch;
3047
+ var l;
3048
+ var lastCharWasSymbol;
3049
+ var lastCharWasDiatric;
3050
+ var allowedChars = "";
3051
+ if (typeof input !== "string") return "";
3052
+ if (typeof opts === "string") separator = opts;
3053
+ symbol = symbolMap.en;
3054
+ langChar = langCharMap.en;
3055
+ if (typeof opts === "object") {
3056
+ maintainCase = opts.maintainCase || false;
3057
+ customReplacements = opts.custom && typeof opts.custom === "object" ? opts.custom : customReplacements;
3058
+ truncate = +opts.truncate > 1 && opts.truncate || false;
3059
+ uricFlag = opts.uric || false;
3060
+ uricNoSlashFlag = opts.uricNoSlash || false;
3061
+ markFlag = opts.mark || false;
3062
+ convertSymbols = opts.symbols === false || opts.lang === false ? false : true;
3063
+ separator = opts.separator || separator;
3064
+ if (uricFlag) allowedChars += uricChars;
3065
+ if (uricNoSlashFlag) allowedChars += uricNoSlashChars;
3066
+ if (markFlag) allowedChars += markChars;
3067
+ symbol = opts.lang && symbolMap[opts.lang] && convertSymbols ? symbolMap[opts.lang] : convertSymbols ? symbolMap.en : {};
3068
+ langChar = opts.lang && langCharMap[opts.lang] ? langCharMap[opts.lang] : opts.lang === false || opts.lang === true ? {} : langCharMap.en;
3069
+ if (opts.titleCase && typeof opts.titleCase.length === "number" && Array.prototype.toString.call(opts.titleCase)) {
3070
+ opts.titleCase.forEach(function(v) {
3071
+ customReplacements[v + ""] = v + "";
3072
+ });
3073
+ titleCase = true;
3074
+ } else titleCase = !!opts.titleCase;
3075
+ if (opts.custom && typeof opts.custom.length === "number" && Array.prototype.toString.call(opts.custom)) opts.custom.forEach(function(v) {
3076
+ customReplacements[v + ""] = v + "";
3077
+ });
3078
+ Object.keys(customReplacements).forEach(function(v) {
3079
+ var r;
3080
+ if (v.length > 1) r = new RegExp("\\b" + escapeChars(v) + "\\b", "gi");
3081
+ else r = new RegExp(escapeChars(v), "gi");
3082
+ input = input.replace(r, customReplacements[v]);
3083
+ });
3084
+ for (ch in customReplacements) allowedChars += ch;
3085
+ }
3086
+ allowedChars += separator;
3087
+ allowedChars = escapeChars(allowedChars);
3088
+ input = input.replace(/(^\s+|\s+$)/g, "");
3089
+ lastCharWasSymbol = false;
3090
+ lastCharWasDiatric = false;
3091
+ for (i = 0, l = input.length; i < l; i++) {
3092
+ ch = input[i];
3093
+ if (isReplacedCustomChar(ch, customReplacements)) lastCharWasSymbol = false;
3094
+ else if (langChar[ch]) {
3095
+ ch = lastCharWasSymbol && langChar[ch].match(/[A-Za-z0-9]/) ? " " + langChar[ch] : langChar[ch];
3096
+ lastCharWasSymbol = false;
3097
+ } else if (ch in charMap) {
3098
+ if (i + 1 < l && lookAheadCharArray.indexOf(input[i + 1]) >= 0) {
3099
+ diatricString += ch;
3100
+ ch = "";
3101
+ } else if (lastCharWasDiatric === true) {
3102
+ ch = diatricMap[diatricString] + charMap[ch];
3103
+ diatricString = "";
3104
+ } else ch = lastCharWasSymbol && charMap[ch].match(/[A-Za-z0-9]/) ? " " + charMap[ch] : charMap[ch];
3105
+ lastCharWasSymbol = false;
3106
+ lastCharWasDiatric = false;
3107
+ } else if (ch in diatricMap) {
3108
+ diatricString += ch;
3109
+ ch = "";
3110
+ if (i === l - 1) ch = diatricMap[diatricString];
3111
+ lastCharWasDiatric = true;
3112
+ } else if (symbol[ch] && !(uricFlag && uricChars.indexOf(ch) !== -1) && !(uricNoSlashFlag && uricNoSlashChars.indexOf(ch) !== -1)) {
3113
+ ch = lastCharWasSymbol || result.substr(-1).match(/[A-Za-z0-9]/) ? separator + symbol[ch] : symbol[ch];
3114
+ ch += input[i + 1] !== void 0 && input[i + 1].match(/[A-Za-z0-9]/) ? separator : "";
3115
+ lastCharWasSymbol = true;
3116
+ } else {
3117
+ if (lastCharWasDiatric === true) {
3118
+ ch = diatricMap[diatricString] + ch;
3119
+ diatricString = "";
3120
+ lastCharWasDiatric = false;
3121
+ } else if (lastCharWasSymbol && (/[A-Za-z0-9]/.test(ch) || result.substr(-1).match(/A-Za-z0-9]/))) ch = " " + ch;
3122
+ lastCharWasSymbol = false;
3123
+ }
3124
+ result += ch.replace(new RegExp("[^\\w\\s" + allowedChars + "_-]", "g"), separator);
3125
+ }
3126
+ if (titleCase) result = result.replace(/(\w)(\S*)/g, function(_, i, r) {
3127
+ var j = i.toUpperCase() + (r !== null ? r : "");
3128
+ return Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0 ? j : j.toLowerCase();
3129
+ });
3130
+ result = result.replace(/\s+/g, separator).replace(new RegExp("\\" + separator + "+", "g"), separator).replace(new RegExp("(^\\" + separator + "+|\\" + separator + "+$)", "g"), "");
3131
+ if (truncate && result.length > truncate) {
3132
+ lucky = result.charAt(truncate) === separator;
3133
+ result = result.slice(0, truncate);
3134
+ if (!lucky) result = result.slice(0, result.lastIndexOf(separator));
3135
+ }
3136
+ if (!maintainCase && !titleCase) result = result.toLowerCase();
3137
+ return result;
3138
+ };
3139
+ /**
3140
+ * createSlug curried(opts)(input)
3141
+ * @param {object|string} opts config object or input string
3142
+ * @return {Function} function getSlugWithConfig()
3143
+ **/
3144
+ var createSlug = function createSlug(opts) {
3145
+ /**
3146
+ * getSlugWithConfig
3147
+ * @param {string} input string
3148
+ * @return {string} slug string
3149
+ */
3150
+ return function getSlugWithConfig(input) {
3151
+ return getSlug(input, opts);
3152
+ };
3153
+ };
3154
+ /**
3155
+ * escape Chars
3156
+ * @param {string} input string
3157
+ */
3158
+ var escapeChars = function escapeChars(input) {
3159
+ return input.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
3160
+ };
3161
+ /**
3162
+ * check if the char is an already converted char from custom list
3163
+ * @param {char} ch character to check
3164
+ * @param {object} customReplacements custom translation map
3165
+ */
3166
+ var isReplacedCustomChar = function(ch, customReplacements) {
3167
+ for (var c in customReplacements) if (customReplacements[c] === ch) return true;
3168
+ };
3169
+ if (typeof module !== "undefined" && module.exports) {
3170
+ module.exports = getSlug;
3171
+ module.exports.createSlug = createSlug;
3172
+ } else if (typeof define !== "undefined" && define.amd) define([], function() {
3173
+ return getSlug;
3174
+ });
3175
+ else try {
3176
+ if (root.getSlug || root.createSlug) throw "speakingurl: globals exists /(getSlug|createSlug)/";
3177
+ else {
3178
+ root.getSlug = getSlug;
3179
+ root.createSlug = createSlug;
3180
+ }
3181
+ } catch (e) {}
3182
+ })(exports);
3183
+ }));
3184
+ (/* @__PURE__ */ __commonJSMin(((exports, module) => {
3185
+ module.exports = require_speakingurl$1();
3186
+ })))();
3187
+ target.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ ??= {
3188
+ id: 0,
3189
+ appIds: /* @__PURE__ */ new Set()
3190
+ };
3191
+ function onDevToolsClientConnected(fn) {
3192
+ return new Promise((resolve) => {
3193
+ if (devtoolsState.connected && devtoolsState.clientConnected) {
3194
+ fn();
3195
+ resolve();
3196
+ return;
3197
+ }
3198
+ devtoolsContext.hooks.hook(DevToolsMessagingHookKeys.DEVTOOLS_CONNECTED_UPDATED, ({ state }) => {
3199
+ if (state.connected && state.clientConnected) {
3200
+ fn();
3201
+ resolve();
3202
+ }
3203
+ });
3204
+ });
3205
+ }
3206
+ function toggleHighPerfMode(state) {
3207
+ devtoolsState.highPerfModeEnabled = state ?? !devtoolsState.highPerfModeEnabled;
3208
+ if (!state && activeAppRecord.value) registerDevToolsPlugin(activeAppRecord.value.app);
3209
+ }
3210
+ function updateDevToolsClientDetected(params) {
3211
+ devtoolsState.devtoolsClientDetected = {
3212
+ ...devtoolsState.devtoolsClientDetected,
3213
+ ...params
3214
+ };
3215
+ toggleHighPerfMode(!Object.values(devtoolsState.devtoolsClientDetected).some(Boolean));
3216
+ }
3217
+ target.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ ??= updateDevToolsClientDetected;
3218
+ var DoubleIndexedKV = class {
3219
+ constructor() {
3220
+ this.keyToValue = /* @__PURE__ */ new Map();
3221
+ this.valueToKey = /* @__PURE__ */ new Map();
3222
+ }
3223
+ set(key, value) {
3224
+ this.keyToValue.set(key, value);
3225
+ this.valueToKey.set(value, key);
3226
+ }
3227
+ getByKey(key) {
3228
+ return this.keyToValue.get(key);
3229
+ }
3230
+ getByValue(value) {
3231
+ return this.valueToKey.get(value);
3232
+ }
3233
+ clear() {
3234
+ this.keyToValue.clear();
3235
+ this.valueToKey.clear();
3236
+ }
3237
+ };
3238
+ var Registry = class {
3239
+ constructor(generateIdentifier) {
3240
+ this.generateIdentifier = generateIdentifier;
3241
+ this.kv = new DoubleIndexedKV();
3242
+ }
3243
+ register(value, identifier) {
3244
+ if (this.kv.getByValue(value)) return;
3245
+ if (!identifier) identifier = this.generateIdentifier(value);
3246
+ this.kv.set(identifier, value);
3247
+ }
3248
+ clear() {
3249
+ this.kv.clear();
3250
+ }
3251
+ getIdentifier(value) {
3252
+ return this.kv.getByValue(value);
3253
+ }
3254
+ getValue(identifier) {
3255
+ return this.kv.getByKey(identifier);
3256
+ }
3257
+ };
3258
+ var ClassRegistry = class extends Registry {
3259
+ constructor() {
3260
+ super((c) => c.name);
3261
+ this.classToAllowedProps = /* @__PURE__ */ new Map();
3262
+ }
3263
+ register(value, options) {
3264
+ if (typeof options === "object") {
3265
+ if (options.allowProps) this.classToAllowedProps.set(value, options.allowProps);
3266
+ super.register(value, options.identifier);
3267
+ } else super.register(value, options);
3268
+ }
3269
+ getAllowedProps(value) {
3270
+ return this.classToAllowedProps.get(value);
3271
+ }
3272
+ };
3273
+ function valuesOfObj(record) {
3274
+ if ("values" in Object) return Object.values(record);
3275
+ const values = [];
3276
+ for (const key in record) if (record.hasOwnProperty(key)) values.push(record[key]);
3277
+ return values;
3278
+ }
3279
+ function find(record, predicate) {
3280
+ const values = valuesOfObj(record);
3281
+ if ("find" in values) return values.find(predicate);
3282
+ const valuesNotNever = values;
3283
+ for (let i = 0; i < valuesNotNever.length; i++) {
3284
+ const value = valuesNotNever[i];
3285
+ if (predicate(value)) return value;
3286
+ }
3287
+ }
3288
+ function forEach(record, run) {
3289
+ Object.entries(record).forEach(([key, value]) => run(value, key));
3290
+ }
3291
+ function includes(arr, value) {
3292
+ return arr.indexOf(value) !== -1;
3293
+ }
3294
+ function findArr(record, predicate) {
3295
+ for (let i = 0; i < record.length; i++) {
3296
+ const value = record[i];
3297
+ if (predicate(value)) return value;
3298
+ }
3299
+ }
3300
+ var CustomTransformerRegistry = class {
3301
+ constructor() {
3302
+ this.transfomers = {};
3303
+ }
3304
+ register(transformer) {
3305
+ this.transfomers[transformer.name] = transformer;
3306
+ }
3307
+ findApplicable(v) {
3308
+ return find(this.transfomers, (transformer) => transformer.isApplicable(v));
3309
+ }
3310
+ findByName(name) {
3311
+ return this.transfomers[name];
3312
+ }
3313
+ };
3314
+ var getType$1 = (payload) => Object.prototype.toString.call(payload).slice(8, -1);
3315
+ var isUndefined$1 = (payload) => typeof payload === "undefined";
3316
+ var isNull$1 = (payload) => payload === null;
3317
+ var isPlainObject$2 = (payload) => {
3318
+ if (typeof payload !== "object" || payload === null) return false;
3319
+ if (payload === Object.prototype) return false;
3320
+ if (Object.getPrototypeOf(payload) === null) return true;
3321
+ return Object.getPrototypeOf(payload) === Object.prototype;
3322
+ };
3323
+ var isEmptyObject = (payload) => isPlainObject$2(payload) && Object.keys(payload).length === 0;
3324
+ var isArray$2 = (payload) => Array.isArray(payload);
3325
+ var isString = (payload) => typeof payload === "string";
3326
+ var isNumber = (payload) => typeof payload === "number" && !isNaN(payload);
3327
+ var isBoolean = (payload) => typeof payload === "boolean";
3328
+ var isRegExp = (payload) => payload instanceof RegExp;
3329
+ var isMap = (payload) => payload instanceof Map;
3330
+ var isSet = (payload) => payload instanceof Set;
3331
+ var isSymbol = (payload) => getType$1(payload) === "Symbol";
3332
+ var isDate = (payload) => payload instanceof Date && !isNaN(payload.valueOf());
3333
+ var isError = (payload) => payload instanceof Error;
3334
+ var isNaNValue = (payload) => typeof payload === "number" && isNaN(payload);
3335
+ var isPrimitive = (payload) => isBoolean(payload) || isNull$1(payload) || isUndefined$1(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
3336
+ var isBigint = (payload) => typeof payload === "bigint";
3337
+ var isInfinite = (payload) => payload === Infinity || payload === -Infinity;
3338
+ var isTypedArray = (payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView);
3339
+ var isURL = (payload) => payload instanceof URL;
3340
+ var escapeKey = (key) => key.replace(/\./g, "\\.");
3341
+ var stringifyPath = (path) => path.map(String).map(escapeKey).join(".");
3342
+ var parsePath = (string) => {
3343
+ const result = [];
3344
+ let segment = "";
3345
+ for (let i = 0; i < string.length; i++) {
3346
+ let char = string.charAt(i);
3347
+ if (char === "\\" && string.charAt(i + 1) === ".") {
3348
+ segment += ".";
3349
+ i++;
3350
+ continue;
3351
+ }
3352
+ if (char === ".") {
3353
+ result.push(segment);
3354
+ segment = "";
3355
+ continue;
3356
+ }
3357
+ segment += char;
3358
+ }
3359
+ const lastSegment = segment;
3360
+ result.push(lastSegment);
3361
+ return result;
3362
+ };
3363
+ function simpleTransformation(isApplicable, annotation, transform, untransform) {
3364
+ return {
3365
+ isApplicable,
3366
+ annotation,
3367
+ transform,
3368
+ untransform
3369
+ };
3370
+ }
3371
+ var simpleRules = [
3372
+ simpleTransformation(isUndefined$1, "undefined", () => null, () => void 0),
3373
+ simpleTransformation(isBigint, "bigint", (v) => v.toString(), (v) => {
3374
+ if (typeof BigInt !== "undefined") return BigInt(v);
3375
+ console.error("Please add a BigInt polyfill.");
3376
+ return v;
3377
+ }),
3378
+ simpleTransformation(isDate, "Date", (v) => v.toISOString(), (v) => new Date(v)),
3379
+ simpleTransformation(isError, "Error", (v, superJson) => {
3380
+ const baseError = {
3381
+ name: v.name,
3382
+ message: v.message
3383
+ };
3384
+ superJson.allowedErrorProps.forEach((prop) => {
3385
+ baseError[prop] = v[prop];
3386
+ });
3387
+ return baseError;
3388
+ }, (v, superJson) => {
3389
+ const e = new Error(v.message);
3390
+ e.name = v.name;
3391
+ e.stack = v.stack;
3392
+ superJson.allowedErrorProps.forEach((prop) => {
3393
+ e[prop] = v[prop];
3394
+ });
3395
+ return e;
3396
+ }),
3397
+ simpleTransformation(isRegExp, "regexp", (v) => "" + v, (regex) => {
3398
+ const body = regex.slice(1, regex.lastIndexOf("/"));
3399
+ const flags = regex.slice(regex.lastIndexOf("/") + 1);
3400
+ return new RegExp(body, flags);
3401
+ }),
3402
+ simpleTransformation(isSet, "set", (v) => [...v.values()], (v) => new Set(v)),
3403
+ simpleTransformation(isMap, "map", (v) => [...v.entries()], (v) => new Map(v)),
3404
+ simpleTransformation((v) => isNaNValue(v) || isInfinite(v), "number", (v) => {
3405
+ if (isNaNValue(v)) return "NaN";
3406
+ if (v > 0) return "Infinity";
3407
+ else return "-Infinity";
3408
+ }, Number),
3409
+ simpleTransformation((v) => v === 0 && 1 / v === -Infinity, "number", () => {
3410
+ return "-0";
3411
+ }, Number),
3412
+ simpleTransformation(isURL, "URL", (v) => v.toString(), (v) => new URL(v))
3413
+ ];
3414
+ function compositeTransformation(isApplicable, annotation, transform, untransform) {
3415
+ return {
3416
+ isApplicable,
3417
+ annotation,
3418
+ transform,
3419
+ untransform
3420
+ };
3421
+ }
3422
+ var symbolRule = compositeTransformation((s, superJson) => {
3423
+ if (isSymbol(s)) return !!superJson.symbolRegistry.getIdentifier(s);
3424
+ return false;
3425
+ }, (s, superJson) => {
3426
+ return ["symbol", superJson.symbolRegistry.getIdentifier(s)];
3427
+ }, (v) => v.description, (_, a, superJson) => {
3428
+ const value = superJson.symbolRegistry.getValue(a[1]);
3429
+ if (!value) throw new Error("Trying to deserialize unknown symbol");
3430
+ return value;
3431
+ });
3432
+ var constructorToName = [
3433
+ Int8Array,
3434
+ Uint8Array,
3435
+ Int16Array,
3436
+ Uint16Array,
3437
+ Int32Array,
3438
+ Uint32Array,
3439
+ Float32Array,
3440
+ Float64Array,
3441
+ Uint8ClampedArray
3442
+ ].reduce((obj, ctor) => {
3443
+ obj[ctor.name] = ctor;
3444
+ return obj;
3445
+ }, {});
3446
+ var typedArrayRule = compositeTransformation(isTypedArray, (v) => ["typed-array", v.constructor.name], (v) => [...v], (v, a) => {
3447
+ const ctor = constructorToName[a[1]];
3448
+ if (!ctor) throw new Error("Trying to deserialize unknown typed array");
3449
+ return new ctor(v);
3450
+ });
3451
+ function isInstanceOfRegisteredClass(potentialClass, superJson) {
3452
+ if (potentialClass?.constructor) return !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
3453
+ return false;
3454
+ }
3455
+ var classRule = compositeTransformation(isInstanceOfRegisteredClass, (clazz, superJson) => {
3456
+ return ["class", superJson.classRegistry.getIdentifier(clazz.constructor)];
3457
+ }, (clazz, superJson) => {
3458
+ const allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
3459
+ if (!allowedProps) return { ...clazz };
3460
+ const result = {};
3461
+ allowedProps.forEach((prop) => {
3462
+ result[prop] = clazz[prop];
3463
+ });
3464
+ return result;
3465
+ }, (v, a, superJson) => {
3466
+ const clazz = superJson.classRegistry.getValue(a[1]);
3467
+ if (!clazz) throw new Error(`Trying to deserialize unknown class '${a[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3468
+ return Object.assign(Object.create(clazz.prototype), v);
3469
+ });
3470
+ var customRule = compositeTransformation((value, superJson) => {
3471
+ return !!superJson.customTransformerRegistry.findApplicable(value);
3472
+ }, (value, superJson) => {
3473
+ return ["custom", superJson.customTransformerRegistry.findApplicable(value).name];
3474
+ }, (value, superJson) => {
3475
+ return superJson.customTransformerRegistry.findApplicable(value).serialize(value);
3476
+ }, (v, a, superJson) => {
3477
+ const transformer = superJson.customTransformerRegistry.findByName(a[1]);
3478
+ if (!transformer) throw new Error("Trying to deserialize unknown custom value");
3479
+ return transformer.deserialize(v);
3480
+ });
3481
+ var compositeRules = [
3482
+ classRule,
3483
+ symbolRule,
3484
+ customRule,
3485
+ typedArrayRule
3486
+ ];
3487
+ var transformValue = (value, superJson) => {
3488
+ const applicableCompositeRule = findArr(compositeRules, (rule) => rule.isApplicable(value, superJson));
3489
+ if (applicableCompositeRule) return {
3490
+ value: applicableCompositeRule.transform(value, superJson),
3491
+ type: applicableCompositeRule.annotation(value, superJson)
3492
+ };
3493
+ const applicableSimpleRule = findArr(simpleRules, (rule) => rule.isApplicable(value, superJson));
3494
+ if (applicableSimpleRule) return {
3495
+ value: applicableSimpleRule.transform(value, superJson),
3496
+ type: applicableSimpleRule.annotation
3497
+ };
3498
+ };
3499
+ var simpleRulesByAnnotation = {};
3500
+ simpleRules.forEach((rule) => {
3501
+ simpleRulesByAnnotation[rule.annotation] = rule;
3502
+ });
3503
+ var untransformValue = (json, type, superJson) => {
3504
+ if (isArray$2(type)) switch (type[0]) {
3505
+ case "symbol": return symbolRule.untransform(json, type, superJson);
3506
+ case "class": return classRule.untransform(json, type, superJson);
3507
+ case "custom": return customRule.untransform(json, type, superJson);
3508
+ case "typed-array": return typedArrayRule.untransform(json, type, superJson);
3509
+ default: throw new Error("Unknown transformation: " + type);
3510
+ }
3511
+ else {
3512
+ const transformation = simpleRulesByAnnotation[type];
3513
+ if (!transformation) throw new Error("Unknown transformation: " + type);
3514
+ return transformation.untransform(json, superJson);
3515
+ }
3516
+ };
3517
+ var getNthKey = (value, n) => {
3518
+ if (n > value.size) throw new Error("index out of bounds");
3519
+ const keys = value.keys();
3520
+ while (n > 0) {
3521
+ keys.next();
3522
+ n--;
3523
+ }
3524
+ return keys.next().value;
3525
+ };
3526
+ function validatePath(path) {
3527
+ if (includes(path, "__proto__")) throw new Error("__proto__ is not allowed as a property");
3528
+ if (includes(path, "prototype")) throw new Error("prototype is not allowed as a property");
3529
+ if (includes(path, "constructor")) throw new Error("constructor is not allowed as a property");
3530
+ }
3531
+ var getDeep = (object, path) => {
3532
+ validatePath(path);
3533
+ for (let i = 0; i < path.length; i++) {
3534
+ const key = path[i];
3535
+ if (isSet(object)) object = getNthKey(object, +key);
3536
+ else if (isMap(object)) {
3537
+ const row = +key;
3538
+ const type = +path[++i] === 0 ? "key" : "value";
3539
+ const keyOfRow = getNthKey(object, row);
3540
+ switch (type) {
3541
+ case "key":
3542
+ object = keyOfRow;
3543
+ break;
3544
+ case "value": object = object.get(keyOfRow);
3545
+ }
3546
+ } else object = object[key];
3547
+ }
3548
+ return object;
3549
+ };
3550
+ var setDeep = (object, path, mapper) => {
3551
+ validatePath(path);
3552
+ if (path.length === 0) return mapper(object);
3553
+ let parent = object;
3554
+ for (let i = 0; i < path.length - 1; i++) {
3555
+ const key = path[i];
3556
+ if (isArray$2(parent)) {
3557
+ const index = +key;
3558
+ parent = parent[index];
3559
+ } else if (isPlainObject$2(parent)) parent = parent[key];
3560
+ else if (isSet(parent)) {
3561
+ const row = +key;
3562
+ parent = getNthKey(parent, row);
3563
+ } else if (isMap(parent)) {
3564
+ if (i === path.length - 2) break;
3565
+ const row = +key;
3566
+ const type = +path[++i] === 0 ? "key" : "value";
3567
+ const keyOfRow = getNthKey(parent, row);
3568
+ switch (type) {
3569
+ case "key":
3570
+ parent = keyOfRow;
3571
+ break;
3572
+ case "value": parent = parent.get(keyOfRow);
3573
+ }
3574
+ }
3575
+ }
3576
+ const lastKey = path[path.length - 1];
3577
+ if (isArray$2(parent)) parent[+lastKey] = mapper(parent[+lastKey]);
3578
+ else if (isPlainObject$2(parent)) parent[lastKey] = mapper(parent[lastKey]);
3579
+ if (isSet(parent)) {
3580
+ const oldValue = getNthKey(parent, +lastKey);
3581
+ const newValue = mapper(oldValue);
3582
+ if (oldValue !== newValue) {
3583
+ parent.delete(oldValue);
3584
+ parent.add(newValue);
3585
+ }
3586
+ }
3587
+ if (isMap(parent)) {
3588
+ const row = +path[path.length - 2];
3589
+ const keyToRow = getNthKey(parent, row);
3590
+ switch (+lastKey === 0 ? "key" : "value") {
3591
+ case "key": {
3592
+ const newKey = mapper(keyToRow);
3593
+ parent.set(newKey, parent.get(keyToRow));
3594
+ if (newKey !== keyToRow) parent.delete(keyToRow);
3595
+ break;
3596
+ }
3597
+ case "value": parent.set(keyToRow, mapper(parent.get(keyToRow)));
3598
+ }
3599
+ }
3600
+ return object;
3601
+ };
3602
+ function traverse(tree, walker, origin = []) {
3603
+ if (!tree) return;
3604
+ if (!isArray$2(tree)) {
3605
+ forEach(tree, (subtree, key) => traverse(subtree, walker, [...origin, ...parsePath(key)]));
3606
+ return;
3607
+ }
3608
+ const [nodeValue, children] = tree;
3609
+ if (children) forEach(children, (child, key) => {
3610
+ traverse(child, walker, [...origin, ...parsePath(key)]);
3611
+ });
3612
+ walker(nodeValue, origin);
3613
+ }
3614
+ function applyValueAnnotations(plain, annotations, superJson) {
3615
+ traverse(annotations, (type, path) => {
3616
+ plain = setDeep(plain, path, (v) => untransformValue(v, type, superJson));
3617
+ });
3618
+ return plain;
3619
+ }
3620
+ function applyReferentialEqualityAnnotations(plain, annotations) {
3621
+ function apply(identicalPaths, path) {
3622
+ const object = getDeep(plain, parsePath(path));
3623
+ identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
3624
+ plain = setDeep(plain, identicalObjectPath, () => object);
3625
+ });
3626
+ }
3627
+ if (isArray$2(annotations)) {
3628
+ const [root, other] = annotations;
3629
+ root.forEach((identicalPath) => {
3630
+ plain = setDeep(plain, parsePath(identicalPath), () => plain);
3631
+ });
3632
+ if (other) forEach(other, apply);
3633
+ } else forEach(annotations, apply);
3634
+ return plain;
3635
+ }
3636
+ var isDeep = (object, superJson) => isPlainObject$2(object) || isArray$2(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
3637
+ function addIdentity(object, path, identities) {
3638
+ const existingSet = identities.get(object);
3639
+ if (existingSet) existingSet.push(path);
3640
+ else identities.set(object, [path]);
3641
+ }
3642
+ function generateReferentialEqualityAnnotations(identitites, dedupe) {
3643
+ const result = {};
3644
+ let rootEqualityPaths = void 0;
3645
+ identitites.forEach((paths) => {
3646
+ if (paths.length <= 1) return;
3647
+ if (!dedupe) paths = paths.map((path) => path.map(String)).sort((a, b) => a.length - b.length);
3648
+ const [representativePath, ...identicalPaths] = paths;
3649
+ if (representativePath.length === 0) rootEqualityPaths = identicalPaths.map(stringifyPath);
3650
+ else result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
3651
+ });
3652
+ if (rootEqualityPaths) if (isEmptyObject(result)) return [rootEqualityPaths];
3653
+ else return [rootEqualityPaths, result];
3654
+ else return isEmptyObject(result) ? void 0 : result;
3655
+ }
3656
+ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
3657
+ const primitive = isPrimitive(object);
3658
+ if (!primitive) {
3659
+ addIdentity(object, path, identities);
3660
+ const seen = seenObjects.get(object);
3661
+ if (seen) return dedupe ? { transformedValue: null } : seen;
3662
+ }
3663
+ if (!isDeep(object, superJson)) {
3664
+ const transformed = transformValue(object, superJson);
3665
+ const result = transformed ? {
3666
+ transformedValue: transformed.value,
3667
+ annotations: [transformed.type]
3668
+ } : { transformedValue: object };
3669
+ if (!primitive) seenObjects.set(object, result);
3670
+ return result;
3671
+ }
3672
+ if (includes(objectsInThisPath, object)) return { transformedValue: null };
3673
+ const transformationResult = transformValue(object, superJson);
3674
+ const transformed = transformationResult?.value ?? object;
3675
+ const transformedValue = isArray$2(transformed) ? [] : {};
3676
+ const innerAnnotations = {};
3677
+ forEach(transformed, (value, index) => {
3678
+ if (index === "__proto__" || index === "constructor" || index === "prototype") throw new Error(`Detected property ${index}. This is a prototype pollution risk, please remove it from your object.`);
3679
+ const recursiveResult = walker(value, identities, superJson, dedupe, [...path, index], [...objectsInThisPath, object], seenObjects);
3680
+ transformedValue[index] = recursiveResult.transformedValue;
3681
+ if (isArray$2(recursiveResult.annotations)) innerAnnotations[index] = recursiveResult.annotations;
3682
+ else if (isPlainObject$2(recursiveResult.annotations)) forEach(recursiveResult.annotations, (tree, key) => {
3683
+ innerAnnotations[escapeKey(index) + "." + key] = tree;
3684
+ });
3685
+ });
3686
+ const result = isEmptyObject(innerAnnotations) ? {
3687
+ transformedValue,
3688
+ annotations: !!transformationResult ? [transformationResult.type] : void 0
3689
+ } : {
3690
+ transformedValue,
3691
+ annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
3692
+ };
3693
+ if (!primitive) seenObjects.set(object, result);
3694
+ return result;
3695
+ };
3696
+ function getType(payload) {
3697
+ return Object.prototype.toString.call(payload).slice(8, -1);
3698
+ }
3699
+ function isArray$1(payload) {
3700
+ return getType(payload) === "Array";
3701
+ }
3702
+ function isPlainObject$1(payload) {
3703
+ if (getType(payload) !== "Object") return false;
3704
+ const prototype = Object.getPrototypeOf(payload);
3705
+ return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
3706
+ }
3707
+ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
3708
+ const propType = {}.propertyIsEnumerable.call(originalObject, key) ? "enumerable" : "nonenumerable";
3709
+ if (propType === "enumerable") carry[key] = newVal;
3710
+ if (includeNonenumerable && propType === "nonenumerable") Object.defineProperty(carry, key, {
3711
+ value: newVal,
3712
+ enumerable: false,
3713
+ writable: true,
3714
+ configurable: true
3715
+ });
3716
+ }
3717
+ function copy(target, options = {}) {
3718
+ if (isArray$1(target)) return target.map((item) => copy(item, options));
3719
+ if (!isPlainObject$1(target)) return target;
3720
+ const props = Object.getOwnPropertyNames(target);
3721
+ const symbols = Object.getOwnPropertySymbols(target);
3722
+ return [...props, ...symbols].reduce((carry, key) => {
3723
+ if (isArray$1(options.props) && !options.props.includes(key)) return carry;
3724
+ const val = target[key];
3725
+ assignProp(carry, key, copy(val, options), target, options.nonenumerable);
3726
+ return carry;
3727
+ }, {});
3728
+ }
3729
+ var SuperJSON = class {
3730
+ /**
3731
+ * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3732
+ */
3733
+ constructor({ dedupe = false } = {}) {
3734
+ this.classRegistry = new ClassRegistry();
3735
+ this.symbolRegistry = new Registry((s) => s.description ?? "");
3736
+ this.customTransformerRegistry = new CustomTransformerRegistry();
3737
+ this.allowedErrorProps = [];
3738
+ this.dedupe = dedupe;
3739
+ }
3740
+ serialize(object) {
3741
+ const identities = /* @__PURE__ */ new Map();
3742
+ const output = walker(object, identities, this, this.dedupe);
3743
+ const res = { json: output.transformedValue };
3744
+ if (output.annotations) res.meta = {
3745
+ ...res.meta,
3746
+ values: output.annotations
3747
+ };
3748
+ const equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
3749
+ if (equalityAnnotations) res.meta = {
3750
+ ...res.meta,
3751
+ referentialEqualities: equalityAnnotations
3752
+ };
3753
+ return res;
3754
+ }
3755
+ deserialize(payload) {
3756
+ const { json, meta } = payload;
3757
+ let result = copy(json);
3758
+ if (meta?.values) result = applyValueAnnotations(result, meta.values, this);
3759
+ if (meta?.referentialEqualities) result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
3760
+ return result;
3761
+ }
3762
+ stringify(object) {
3763
+ return JSON.stringify(this.serialize(object));
3764
+ }
3765
+ parse(string) {
3766
+ return this.deserialize(JSON.parse(string));
3767
+ }
3768
+ registerClass(v, options) {
3769
+ this.classRegistry.register(v, options);
3770
+ }
3771
+ registerSymbol(v, identifier) {
3772
+ this.symbolRegistry.register(v, identifier);
3773
+ }
3774
+ registerCustom(transformer, name) {
3775
+ this.customTransformerRegistry.register({
3776
+ name,
3777
+ ...transformer
3778
+ });
3779
+ }
3780
+ allowErrorProps(...props) {
3781
+ this.allowedErrorProps.push(...props);
3782
+ }
3783
+ };
3784
+ SuperJSON.defaultInstance = new SuperJSON();
3785
+ SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
3786
+ SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
3787
+ SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
3788
+ SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
3789
+ SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
3790
+ SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
3791
+ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
3792
+ SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
3793
+ SuperJSON.serialize;
3794
+ SuperJSON.deserialize;
3795
+ SuperJSON.stringify;
3796
+ SuperJSON.parse;
3797
+ SuperJSON.registerClass;
3798
+ SuperJSON.registerCustom;
3799
+ SuperJSON.registerSymbol;
3800
+ SuperJSON.allowErrorProps;
3801
+ target.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ ??= [];
3802
+ target.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ ??= null;
3803
+ target.__VUE_DEVTOOLS_KIT_RPC_SERVER__ ??= null;
3804
+ target.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ ??= null;
3805
+ target.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ ??= null;
3806
+ target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
3807
+ //#endregion
3808
+ export { addCustomCommand, addCustomTab, onDevToolsClientConnected, onDevToolsConnected, removeCustomCommand, setupDevToolsPlugin, setupDevToolsPlugin as setupDevtoolsPlugin };