@vue/devtools-api 8.0.5 → 8.0.7

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