@vue/devtools-kit 7.3.9 → 7.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -18,18 +18,18 @@ var __copyProps = (to, from, except, desc) => {
18
18
  }
19
19
  return to;
20
20
  };
21
- var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ var __toESM = (mod, isNodeMode, target22) => (target22 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
22
  // If the importer is in node compatibility mode or this is not an ESM
23
23
  // file that has been converted to a CommonJS file using a Babel-
24
24
  // compatible transform (i.e. "__esModule" has not been set), then set
25
25
  // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target21, "default", { value: mod, enumerable: true }) : target21,
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target22, "default", { value: mod, enumerable: true }) : target22,
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.1__@swc+core@1.5.29_jiti@1.21.6__n4f3octckgstnpji6t2ezjmcwu/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.3__@swc+core@1.5.29_jiti@1.21.6__poim247rgdwcqyeqwscqjhxddq/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.1__@swc+core@1.5.29_jiti@1.21.6__n4f3octckgstnpji6t2ezjmcwu/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.3__@swc+core@1.5.29_jiti@1.21.6__poim247rgdwcqyeqwscqjhxddq/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -1581,8 +1581,8 @@ import { isNuxtApp, target as target13 } from "@vue/devtools-shared";
1581
1581
 
1582
1582
  // src/hook/index.ts
1583
1583
  init_esm_shims();
1584
- import { target } from "@vue/devtools-shared";
1585
- import { createHooks } from "hookable";
1584
+ import { target as target10 } from "@vue/devtools-shared";
1585
+ import { createHooks as createHooks2 } from "hookable";
1586
1586
 
1587
1587
  // src/types/index.ts
1588
1588
  init_esm_shims();
@@ -1614,118 +1614,13 @@ init_esm_shims();
1614
1614
  // src/types/router.ts
1615
1615
  init_esm_shims();
1616
1616
 
1617
- // src/hook/index.ts
1618
- var _a, _b;
1619
- var devtoolsHooks = (_b = (_a = target).__VUE_DEVTOOLS_HOOK) != null ? _b : _a.__VUE_DEVTOOLS_HOOK = createHooks();
1620
- var on = {
1621
- vueAppInit(fn) {
1622
- devtoolsHooks.hook("app:init" /* APP_INIT */, fn);
1623
- },
1624
- vueAppUnmount(fn) {
1625
- devtoolsHooks.hook("app:unmount" /* APP_UNMOUNT */, fn);
1626
- },
1627
- vueAppConnected(fn) {
1628
- devtoolsHooks.hook("app:connected" /* APP_CONNECTED */, fn);
1629
- },
1630
- componentAdded(fn) {
1631
- return devtoolsHooks.hook("component:added" /* COMPONENT_ADDED */, fn);
1632
- },
1633
- componentUpdated(fn) {
1634
- return devtoolsHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
1635
- },
1636
- componentRemoved(fn) {
1637
- return devtoolsHooks.hook("component:removed" /* COMPONENT_REMOVED */, fn);
1638
- },
1639
- setupDevtoolsPlugin(fn) {
1640
- devtoolsHooks.hook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, fn);
1641
- }
1642
- };
1643
- function createDevToolsHook() {
1644
- return {
1645
- id: "vue-devtools-next",
1646
- devtoolsVersion: "7.0",
1647
- enabled: false,
1648
- appRecords: [],
1649
- apps: [],
1650
- events: /* @__PURE__ */ new Map(),
1651
- on(event, fn) {
1652
- var _a24;
1653
- if (!this.events.has(event))
1654
- this.events.set(event, []);
1655
- (_a24 = this.events.get(event)) == null ? void 0 : _a24.push(fn);
1656
- return () => this.off(event, fn);
1657
- },
1658
- once(event, fn) {
1659
- const onceFn = (...args) => {
1660
- this.off(event, onceFn);
1661
- fn(...args);
1662
- };
1663
- this.on(event, onceFn);
1664
- return [event, onceFn];
1665
- },
1666
- off(event, fn) {
1667
- if (this.events.has(event)) {
1668
- const eventCallbacks = this.events.get(event);
1669
- const index = eventCallbacks.indexOf(fn);
1670
- if (index !== -1)
1671
- eventCallbacks.splice(index, 1);
1672
- }
1673
- },
1674
- emit(event, ...payload) {
1675
- if (this.events.has(event))
1676
- this.events.get(event).forEach((fn) => fn(...payload));
1677
- }
1678
- };
1679
- }
1680
- function subscribeDevToolsHook() {
1681
- const hook2 = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
1682
- hook2.on("app:init" /* APP_INIT */, (app, version) => {
1683
- var _a24, _b24, _c;
1684
- if ((_c = (_b24 = (_a24 = app == null ? void 0 : app._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
1685
- return;
1686
- devtoolsHooks.callHook("app:init" /* APP_INIT */, app, version);
1687
- });
1688
- hook2.on("app:unmount" /* APP_UNMOUNT */, (app) => {
1689
- devtoolsHooks.callHook("app:unmount" /* APP_UNMOUNT */, app);
1690
- });
1691
- hook2.on("component:added" /* COMPONENT_ADDED */, async (app, uid, parentUid, component) => {
1692
- var _a24, _b24, _c;
1693
- if ((_c = (_b24 = (_a24 = app == null ? void 0 : app._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
1694
- return;
1695
- if (!app || typeof uid !== "number" && !uid || !component)
1696
- return;
1697
- devtoolsHooks.callHook("component:added" /* COMPONENT_ADDED */, app, uid, parentUid, component);
1698
- });
1699
- hook2.on("component:updated" /* COMPONENT_UPDATED */, (app, uid, parentUid, component) => {
1700
- if (!app || typeof uid !== "number" && !uid || !component)
1701
- return;
1702
- devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, app, uid, parentUid, component);
1703
- });
1704
- hook2.on("component:removed" /* COMPONENT_REMOVED */, async (app, uid, parentUid, component) => {
1705
- if (!app || typeof uid !== "number" && !uid || !component)
1706
- return;
1707
- devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
1708
- });
1709
- hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {
1710
- if ((options == null ? void 0 : options.target) === "legacy")
1711
- return;
1712
- devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
1713
- });
1714
- }
1715
- var hook = {
1716
- on,
1717
- setupDevToolsPlugin(pluginDescriptor, setupFn) {
1718
- return devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
1719
- }
1720
- };
1721
-
1722
1617
  // src/ctx/index.ts
1723
1618
  init_esm_shims();
1724
- import { target as target10 } from "@vue/devtools-shared";
1619
+ import { target as target9 } from "@vue/devtools-shared";
1725
1620
 
1726
1621
  // src/ctx/hook.ts
1727
1622
  init_esm_shims();
1728
- import { createHooks as createHooks2 } from "hookable";
1623
+ import { createHooks } from "hookable";
1729
1624
 
1730
1625
  // src/core/component-highlighter/index.ts
1731
1626
  init_esm_shims();
@@ -1793,21 +1688,21 @@ async function getComponentId(options) {
1793
1688
  }
1794
1689
  }
1795
1690
  function isFragment(instance) {
1796
- var _a24;
1797
- const subTreeType = (_a24 = instance.subTree) == null ? void 0 : _a24.type;
1691
+ var _a25;
1692
+ const subTreeType = (_a25 = instance.subTree) == null ? void 0 : _a25.type;
1798
1693
  return subTreeType === Fragment;
1799
1694
  }
1800
1695
  function isBeingDestroyed(instance) {
1801
1696
  return instance._isBeingDestroyed || instance.isUnmounted;
1802
1697
  }
1803
1698
  function getInstanceName(instance) {
1804
- var _a24, _b24, _c;
1699
+ var _a25, _b25, _c;
1805
1700
  const name = getComponentTypeName((instance == null ? void 0 : instance.type) || {});
1806
1701
  if (name)
1807
1702
  return name;
1808
1703
  if ((instance == null ? void 0 : instance.root) === instance)
1809
1704
  return "Root";
1810
- for (const key in (_b24 = (_a24 = instance.parent) == null ? void 0 : _a24.type) == null ? void 0 : _b24.components) {
1705
+ for (const key in (_b25 = (_a25 = instance.parent) == null ? void 0 : _a25.type) == null ? void 0 : _b25.components) {
1811
1706
  if (instance.parent.type.components[key] === (instance == null ? void 0 : instance.type))
1812
1707
  return saveComponentGussedName(instance, key);
1813
1708
  }
@@ -1821,8 +1716,8 @@ function getInstanceName(instance) {
1821
1716
  return "Anonymous Component";
1822
1717
  }
1823
1718
  function getUniqueComponentId(instance) {
1824
- var _a24, _b24, _c;
1825
- const appId = (_c = (_b24 = (_a24 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a24.app) == null ? void 0 : _b24.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? _c : 0;
1719
+ var _a25, _b25, _c;
1720
+ const appId = (_c = (_b25 = (_a25 = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a25.app) == null ? void 0 : _b25.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? _c : 0;
1826
1721
  const instanceId = instance === (instance == null ? void 0 : instance.root) ? "root" : instance.uid;
1827
1722
  return `${appId}:${instanceId}`;
1828
1723
  }
@@ -2012,9 +1907,9 @@ function getStyles(bounds) {
2012
1907
  };
2013
1908
  }
2014
1909
  function create(options) {
2015
- var _a24;
1910
+ var _a25;
2016
1911
  const containerEl = document.createElement("div");
2017
- containerEl.id = (_a24 = options.elementId) != null ? _a24 : CONTAINER_ELEMENT_ID;
1912
+ containerEl.id = (_a25 = options.elementId) != null ? _a25 : CONTAINER_ELEMENT_ID;
2018
1913
  Object.assign(containerEl.style, {
2019
1914
  ...containerStyles,
2020
1915
  ...getStyles(options.bounds),
@@ -2069,9 +1964,9 @@ function unhighlight() {
2069
1964
  }
2070
1965
  var inspectInstance = null;
2071
1966
  function inspectFn(e) {
2072
- const target21 = e.target;
2073
- if (target21) {
2074
- const instance = target21.__vueParentComponent;
1967
+ const target22 = e.target;
1968
+ if (target22) {
1969
+ const instance = target22.__vueParentComponent;
2075
1970
  if (instance) {
2076
1971
  inspectInstance = instance;
2077
1972
  const el = instance.vnode.el;
@@ -2085,11 +1980,11 @@ function inspectFn(e) {
2085
1980
  }
2086
1981
  }
2087
1982
  function selectComponentFn(e, cb) {
2088
- var _a24;
1983
+ var _a25;
2089
1984
  e.preventDefault();
2090
1985
  e.stopPropagation();
2091
1986
  if (inspectInstance) {
2092
- const app = (_a24 = activeAppRecord.value) == null ? void 0 : _a24.app;
1987
+ const app = (_a25 = activeAppRecord.value) == null ? void 0 : _a25.app;
2093
1988
  getComponentId({
2094
1989
  app,
2095
1990
  uid: app.uid,
@@ -2167,23 +2062,23 @@ function scrollToComponent(options) {
2167
2062
 
2168
2063
  // src/ctx/inspector.ts
2169
2064
  init_esm_shims();
2170
- import { target as target3 } from "@vue/devtools-shared";
2065
+ import { target as target2 } from "@vue/devtools-shared";
2171
2066
  import { debounce as debounce2 } from "perfect-debounce";
2172
2067
 
2173
2068
  // src/ctx/state.ts
2174
2069
  init_esm_shims();
2175
2070
  import { target as global, isUrlString } from "@vue/devtools-shared";
2176
2071
  import { debounce } from "perfect-debounce";
2072
+ var _a, _b;
2073
+ (_b = (_a = global).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b : _a.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
2177
2074
  var _a2, _b2;
2178
- (_b2 = (_a2 = global).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null ? _b2 : _a2.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = [];
2075
+ (_b2 = (_a2 = global).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b2 : _a2.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};
2179
2076
  var _a3, _b3;
2180
- (_b3 = (_a3 = global).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {};
2077
+ (_b3 = (_a3 = global).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b3 : _a3.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "";
2181
2078
  var _a4, _b4;
2182
- (_b4 = (_a4 = global).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "";
2079
+ (_b4 = (_a4 = global).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b4 : _a4.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];
2183
2080
  var _a5, _b5;
2184
- (_b5 = (_a5 = global).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = [];
2185
- var _a6, _b6;
2186
- (_b6 = (_a6 = global).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b6 : _a6.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
2081
+ (_b5 = (_a5 = global).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null ? _b5 : _a5.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = [];
2187
2082
  var STATE_KEY = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
2188
2083
  function initStateFactory() {
2189
2084
  return {
@@ -2194,11 +2089,12 @@ function initStateFactory() {
2194
2089
  activeAppRecordId: "",
2195
2090
  tabs: [],
2196
2091
  commands: [],
2197
- highPerfModeEnabled: false
2092
+ highPerfModeEnabled: true,
2093
+ devtoolsClientDetected: {}
2198
2094
  };
2199
2095
  }
2200
- var _a7, _b7;
2201
- (_b7 = (_a7 = global)[STATE_KEY]) != null ? _b7 : _a7[STATE_KEY] = initStateFactory();
2096
+ var _a6, _b6;
2097
+ (_b6 = (_a6 = global)[STATE_KEY]) != null ? _b6 : _a6[STATE_KEY] = initStateFactory();
2202
2098
  var callStateUpdatedHook = debounce((state) => {
2203
2099
  devtoolsContext.hooks.callHook("devtoolsStateUpdated" /* DEVTOOLS_STATE_UPDATED */, { state });
2204
2100
  });
@@ -2248,7 +2144,7 @@ function setActiveAppRecordId(id) {
2248
2144
  updateAllStates();
2249
2145
  }
2250
2146
  var devtoolsState = new Proxy(global[STATE_KEY], {
2251
- get(target21, property) {
2147
+ get(target22, property) {
2252
2148
  if (property === "appRecords") {
2253
2149
  return devtoolsAppRecords;
2254
2150
  } else if (property === "activeAppRecordId") {
@@ -2260,13 +2156,13 @@ var devtoolsState = new Proxy(global[STATE_KEY], {
2260
2156
  }
2261
2157
  return global[STATE_KEY][property];
2262
2158
  },
2263
- deleteProperty(target21, property) {
2264
- delete target21[property];
2159
+ deleteProperty(target22, property) {
2160
+ delete target22[property];
2265
2161
  return true;
2266
2162
  },
2267
- set(target21, property, value) {
2163
+ set(target22, property, value) {
2268
2164
  const oldState = { ...global[STATE_KEY] };
2269
- target21[property] = value;
2165
+ target22[property] = value;
2270
2166
  global[STATE_KEY][property] = value;
2271
2167
  return true;
2272
2168
  }
@@ -2348,12 +2244,12 @@ function toggleClientConnected(state) {
2348
2244
 
2349
2245
  // src/ctx/timeline.ts
2350
2246
  init_esm_shims();
2351
- import { target as target2 } from "@vue/devtools-shared";
2352
- var _a8, _b8;
2353
- (_b8 = (_a8 = target2).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];
2354
- var devtoolsTimelineLayers = new Proxy(target2.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
2355
- get(target21, prop, receiver) {
2356
- return Reflect.get(target21, prop, receiver);
2247
+ import { target } from "@vue/devtools-shared";
2248
+ var _a7, _b7;
2249
+ (_b7 = (_a7 = target).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null ? _b7 : _a7.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = [];
2250
+ var devtoolsTimelineLayers = new Proxy(target.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
2251
+ get(target22, prop, receiver) {
2252
+ return Reflect.get(target22, prop, receiver);
2357
2253
  }
2358
2254
  });
2359
2255
  function addTimelineLayer(options, descriptor) {
@@ -2365,11 +2261,11 @@ function addTimelineLayer(options, descriptor) {
2365
2261
  }
2366
2262
 
2367
2263
  // src/ctx/inspector.ts
2368
- var _a9, _b9;
2369
- (_b9 = (_a9 = target3).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b9 : _a9.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];
2370
- var devtoolsInspector = new Proxy(target3.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
2371
- get(target21, prop, receiver) {
2372
- return Reflect.get(target21, prop, receiver);
2264
+ var _a8, _b8;
2265
+ (_b8 = (_a8 = target2).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null ? _b8 : _a8.__VUE_DEVTOOLS_KIT_INSPECTOR__ = [];
2266
+ var devtoolsInspector = new Proxy(target2.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
2267
+ get(target22, prop, receiver) {
2268
+ return Reflect.get(target22, prop, receiver);
2373
2269
  }
2374
2270
  });
2375
2271
  var callInspectorUpdatedHook = debounce2(() => {
@@ -2387,14 +2283,14 @@ function addInspector(inspector, descriptor) {
2387
2283
  }
2388
2284
  function getActiveInspectors() {
2389
2285
  return devtoolsInspector.filter((inspector) => inspector.descriptor.app === activeAppRecord.value.app).filter((inspector) => inspector.descriptor.id !== "components").map((inspector) => {
2390
- var _a24;
2286
+ var _a25;
2391
2287
  const descriptor = inspector.descriptor;
2392
2288
  const options = inspector.options;
2393
2289
  return {
2394
2290
  id: options.id,
2395
2291
  label: options.label,
2396
2292
  logo: descriptor.logo,
2397
- icon: `custom-ic-baseline-${(_a24 = options == null ? void 0 : options.icon) == null ? void 0 : _a24.replace(/_/g, "-")}`,
2293
+ icon: `custom-ic-baseline-${(_a25 = options == null ? void 0 : options.icon) == null ? void 0 : _a25.replace(/_/g, "-")}`,
2398
2294
  packageName: descriptor.packageName,
2399
2295
  homepage: descriptor.homepage
2400
2296
  };
@@ -2471,13 +2367,13 @@ var DevToolsMessagingHookKeys = /* @__PURE__ */ ((DevToolsMessagingHookKeys2) =>
2471
2367
  return DevToolsMessagingHookKeys2;
2472
2368
  })(DevToolsMessagingHookKeys || {});
2473
2369
  function createDevToolsCtxHooks() {
2474
- const hooks2 = createHooks2();
2370
+ const hooks2 = createHooks();
2475
2371
  hooks2.hook("addInspector" /* ADD_INSPECTOR */, ({ inspector, plugin }) => {
2476
2372
  addInspector(inspector, plugin.descriptor);
2477
2373
  });
2478
2374
  hooks2.hook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, async ({ inspectorId, plugin }) => {
2479
- var _a24;
2480
- if (!inspectorId || !((_a24 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a24.app))
2375
+ var _a25;
2376
+ if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
2481
2377
  return;
2482
2378
  const inspector = getInspector(inspectorId, plugin.descriptor.app);
2483
2379
  const _payload = {
@@ -2500,8 +2396,8 @@ function createDevToolsCtxHooks() {
2500
2396
  }, "sendInspectorTreeToClient" /* SEND_INSPECTOR_TREE_TO_CLIENT */);
2501
2397
  });
2502
2398
  hooks2.hook("sendInspectorState" /* SEND_INSPECTOR_STATE */, async ({ inspectorId, plugin }) => {
2503
- var _a24;
2504
- if (!inspectorId || !((_a24 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a24.app))
2399
+ var _a25;
2400
+ if (!inspectorId || !((_a25 = plugin == null ? void 0 : plugin.descriptor) == null ? void 0 : _a25.app))
2505
2401
  return;
2506
2402
  const inspector = getInspector(inspectorId, plugin.descriptor.app);
2507
2403
  const _payload = {
@@ -2573,7 +2469,7 @@ function createDevToolsCtxHooks() {
2573
2469
 
2574
2470
  // src/ctx/api.ts
2575
2471
  init_esm_shims();
2576
- import { target as target8 } from "@vue/devtools-shared";
2472
+ import { target as target7 } from "@vue/devtools-shared";
2577
2473
 
2578
2474
  // src/core/component/state/editor.ts
2579
2475
  init_esm_shims();
@@ -2646,9 +2542,9 @@ var StateEditor = class {
2646
2542
  else Reflect.deleteProperty(object, field);
2647
2543
  }
2648
2544
  if (!state.remove) {
2649
- const target21 = object[state.newKey || field];
2650
- if (this.refEditor.isRef(target21))
2651
- this.refEditor.set(target21, value);
2545
+ const target22 = object[state.newKey || field];
2546
+ if (this.refEditor.isRef(target22))
2547
+ this.refEditor.set(target22, value);
2652
2548
  else if (toRaw(object) instanceof Map)
2653
2549
  object.set(state.newKey || field, value);
2654
2550
  else if (toRaw(object) instanceof Set)
@@ -2700,15 +2596,15 @@ async function editComponentState(payload, stateEditor2) {
2700
2596
  if (!instance)
2701
2597
  return;
2702
2598
  const targetPath = path.slice();
2703
- let target21;
2599
+ let target22;
2704
2600
  if (instance.devtoolsRawSetupState && Object.keys(instance.devtoolsRawSetupState).includes(path[0]))
2705
- target21 = instance.devtoolsRawSetupState;
2601
+ target22 = instance.devtoolsRawSetupState;
2706
2602
  if (instance.data && Object.keys(instance.data).includes(path[0]))
2707
- target21 = instance.data;
2708
- if (target21 && targetPath) {
2603
+ target22 = instance.data;
2604
+ if (target22 && targetPath) {
2709
2605
  if (state.type === "object" && type === "reactive") {
2710
2606
  }
2711
- stateEditor2.set(target21, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
2607
+ stateEditor2.set(target22, targetPath, state.value, stateEditor2.createDefaultSetCallback(state));
2712
2608
  }
2713
2609
  }
2714
2610
  var stateEditor = new StateEditor();
@@ -2718,17 +2614,17 @@ async function editState(payload) {
2718
2614
 
2719
2615
  // src/core/open-in-editor/index.ts
2720
2616
  init_esm_shims();
2721
- import { target as target4 } from "@vue/devtools-shared";
2617
+ import { target as target3 } from "@vue/devtools-shared";
2722
2618
  function setOpenInEditorBaseUrl(url) {
2723
- target4.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ = url;
2619
+ target3.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ = url;
2724
2620
  }
2725
2621
  function openInEditor(options = {}) {
2726
- var _a24, _b24, _c;
2622
+ var _a25, _b25, _c;
2727
2623
  const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
2728
2624
  if (file) {
2729
2625
  if (host === "chrome-extension") {
2730
2626
  const fileName = file.replace(/\\/g, "\\\\");
2731
- const _baseUrl = (_b24 = (_a24 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a24.openInEditorHost) != null ? _b24 : "/";
2627
+ const _baseUrl = (_b25 = (_a25 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a25.openInEditorHost) != null ? _b25 : "/";
2732
2628
  fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
2733
2629
  if (!response.ok) {
2734
2630
  const msg = `Opening component ${fileName} failed`;
@@ -2736,8 +2632,8 @@ function openInEditor(options = {}) {
2736
2632
  }
2737
2633
  });
2738
2634
  } else if (devtoolsState.vitePluginDetected) {
2739
- const _baseUrl = (_c = target4.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
2740
- target4.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
2635
+ const _baseUrl = (_c = target3.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
2636
+ target3.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
2741
2637
  }
2742
2638
  }
2743
2639
  }
@@ -2752,20 +2648,20 @@ init_esm_shims();
2752
2648
  import { target as global2 } from "@vue/devtools-shared";
2753
2649
  var ROUTER_KEY = "__VUE_DEVTOOLS_ROUTER__";
2754
2650
  var ROUTER_INFO_KEY = "__VUE_DEVTOOLS_ROUTER_INFO__";
2755
- var _a10, _b10;
2756
- (_b10 = (_a10 = global2)[ROUTER_INFO_KEY]) != null ? _b10 : _a10[ROUTER_INFO_KEY] = {
2651
+ var _a9, _b9;
2652
+ (_b9 = (_a9 = global2)[ROUTER_INFO_KEY]) != null ? _b9 : _a9[ROUTER_INFO_KEY] = {
2757
2653
  currentRoute: null,
2758
2654
  routes: []
2759
2655
  };
2760
- var _a11, _b11;
2761
- (_b11 = (_a11 = global2)[ROUTER_KEY]) != null ? _b11 : _a11[ROUTER_KEY] = {};
2656
+ var _a10, _b10;
2657
+ (_b10 = (_a10 = global2)[ROUTER_KEY]) != null ? _b10 : _a10[ROUTER_KEY] = {};
2762
2658
  var devtoolsRouterInfo = new Proxy(global2[ROUTER_INFO_KEY], {
2763
- get(target21, property) {
2659
+ get(target22, property) {
2764
2660
  return global2[ROUTER_INFO_KEY][property];
2765
2661
  }
2766
2662
  });
2767
2663
  var devtoolsRouter = new Proxy(global2[ROUTER_KEY], {
2768
- get(target21, property) {
2664
+ get(target22, property) {
2769
2665
  if (property === "value") {
2770
2666
  return global2[ROUTER_KEY];
2771
2667
  }
@@ -2779,13 +2675,14 @@ function getRoutes(router) {
2779
2675
  }
2780
2676
  function filterRoutes(routes) {
2781
2677
  return routes.map((item) => {
2782
- let { path, name, children } = item;
2678
+ let { path, name, children, meta } = item;
2783
2679
  if (children == null ? void 0 : children.length)
2784
2680
  children = filterRoutes(children);
2785
2681
  return {
2786
2682
  path,
2787
2683
  name,
2788
- children
2684
+ children,
2685
+ meta
2789
2686
  };
2790
2687
  });
2791
2688
  }
@@ -2807,8 +2704,8 @@ function filterCurrentRoute(route) {
2807
2704
  }
2808
2705
  function normalizeRouterInfo(appRecord, activeAppRecord2) {
2809
2706
  function init() {
2810
- var _a24;
2811
- const router = (_a24 = appRecord.app) == null ? void 0 : _a24.config.globalProperties.$router;
2707
+ var _a25;
2708
+ const router = (_a25 = appRecord.app) == null ? void 0 : _a25.config.globalProperties.$router;
2812
2709
  const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
2813
2710
  const routes = filterRoutes(getRoutes(router));
2814
2711
  const c = console.warn;
@@ -2823,8 +2720,8 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
2823
2720
  }
2824
2721
  init();
2825
2722
  hook.on.componentUpdated(debounce3(() => {
2826
- var _a24;
2827
- if (((_a24 = activeAppRecord2.value) == null ? void 0 : _a24.app) !== appRecord.app)
2723
+ var _a25;
2724
+ if (((_a25 = activeAppRecord2.value) == null ? void 0 : _a25.app) !== appRecord.app)
2828
2725
  return;
2829
2726
  init();
2830
2727
  devtoolsContext.hooks.callHook("routerInfoUpdated" /* ROUTER_INFO_UPDATED */, { state: global3[ROUTER_INFO_KEY] });
@@ -2833,16 +2730,16 @@ function normalizeRouterInfo(appRecord, activeAppRecord2) {
2833
2730
 
2834
2731
  // src/core/component-inspector/index.ts
2835
2732
  init_esm_shims();
2836
- import { target as target5 } from "@vue/devtools-shared";
2837
- var _a12, _b12;
2838
- (_b12 = (_a12 = target5).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b12 : _a12.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
2733
+ import { target as target4 } from "@vue/devtools-shared";
2734
+ var _a11, _b11;
2735
+ (_b11 = (_a11 = target4).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null ? _b11 : _a11.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = true;
2839
2736
  function toggleComponentInspectorEnabled(enabled) {
2840
- target5.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = enabled;
2737
+ target4.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = enabled;
2841
2738
  }
2842
2739
  function waitForInspectorInit(cb) {
2843
2740
  let total = 0;
2844
2741
  const timer = setInterval(() => {
2845
- if (target5.__VUE_INSPECTOR__) {
2742
+ if (target4.__VUE_INSPECTOR__) {
2846
2743
  clearInterval(timer);
2847
2744
  total += 30;
2848
2745
  cb();
@@ -2853,7 +2750,7 @@ function waitForInspectorInit(cb) {
2853
2750
  }, 30);
2854
2751
  }
2855
2752
  function setupInspector() {
2856
- const inspector = target5.__VUE_INSPECTOR__;
2753
+ const inspector = target4.__VUE_INSPECTOR__;
2857
2754
  const _openInEditor = inspector.openInEditor;
2858
2755
  inspector.openInEditor = async (...params) => {
2859
2756
  inspector.disable();
@@ -2864,9 +2761,9 @@ function getComponentInspector() {
2864
2761
  return new Promise((resolve) => {
2865
2762
  function setup() {
2866
2763
  setupInspector();
2867
- resolve(target5.__VUE_INSPECTOR__);
2764
+ resolve(target4.__VUE_INSPECTOR__);
2868
2765
  }
2869
- if (!target5.__VUE_INSPECTOR__) {
2766
+ if (!target4.__VUE_INSPECTOR__) {
2870
2767
  waitForInspectorInit(() => {
2871
2768
  setup();
2872
2769
  });
@@ -2878,7 +2775,7 @@ function getComponentInspector() {
2878
2775
 
2879
2776
  // src/core/plugin/index.ts
2880
2777
  init_esm_shims();
2881
- import { target as target7 } from "@vue/devtools-shared";
2778
+ import { target as target6 } from "@vue/devtools-shared";
2882
2779
 
2883
2780
  // src/api/index.ts
2884
2781
  init_esm_shims();
@@ -2886,20 +2783,82 @@ init_esm_shims();
2886
2783
  // src/api/v6/index.ts
2887
2784
  init_esm_shims();
2888
2785
 
2786
+ // src/core/plugin/plugin-settings.ts
2787
+ init_esm_shims();
2788
+
2889
2789
  // src/ctx/plugin.ts
2890
2790
  init_esm_shims();
2891
- import { target as target6 } from "@vue/devtools-shared";
2892
- var _a13, _b13;
2893
- (_b13 = (_a13 = target6).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b13 : _a13.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];
2894
- var devtoolsPluginBuffer = new Proxy(target6.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
2895
- get(target21, prop, receiver) {
2896
- return Reflect.get(target21, prop, receiver);
2791
+ import { target as target5 } from "@vue/devtools-shared";
2792
+ var _a12, _b12;
2793
+ (_b12 = (_a12 = target5).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null ? _b12 : _a12.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = [];
2794
+ var devtoolsPluginBuffer = new Proxy(target5.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
2795
+ get(target22, prop, receiver) {
2796
+ return Reflect.get(target22, prop, receiver);
2897
2797
  }
2898
2798
  });
2899
2799
  function addDevToolsPluginToBuffer(pluginDescriptor, setupFn) {
2900
2800
  devtoolsPluginBuffer.push([pluginDescriptor, setupFn]);
2901
2801
  }
2902
2802
 
2803
+ // src/core/plugin/plugin-settings.ts
2804
+ function _getSettings(settings) {
2805
+ const _settings = {};
2806
+ Object.keys(settings).forEach((key) => {
2807
+ _settings[key] = settings[key].defaultValue;
2808
+ });
2809
+ return _settings;
2810
+ }
2811
+ function getPluginLocalKey(pluginId) {
2812
+ return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${pluginId}__`;
2813
+ }
2814
+ function getPluginSettingsOptions(pluginId) {
2815
+ var _a25, _b25, _c, _d;
2816
+ const descriptor = (_a25 = getInspector(pluginId)) == null ? void 0 : _a25.descriptor;
2817
+ const item = (_c = (_b25 = devtoolsPluginBuffer.find((item2) => item2[0].id === (descriptor == null ? void 0 : descriptor.id))) == null ? void 0 : _b25[0]) != null ? _c : null;
2818
+ return (_d = item == null ? void 0 : item.settings) != null ? _d : null;
2819
+ }
2820
+ function getPluginSettings(pluginId, fallbackValue) {
2821
+ var _a25, _b25, _c;
2822
+ const localKey = getPluginLocalKey(pluginId);
2823
+ if (localKey) {
2824
+ const localSettings = localStorage.getItem(localKey);
2825
+ if (localSettings) {
2826
+ return JSON.parse(localSettings);
2827
+ }
2828
+ }
2829
+ if (pluginId) {
2830
+ const item = (_b25 = (_a25 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a25[0]) != null ? _b25 : null;
2831
+ return _getSettings((_c = item == null ? void 0 : item.settings) != null ? _c : {});
2832
+ }
2833
+ return _getSettings(fallbackValue);
2834
+ }
2835
+ function initPluginSettings(pluginId, settings) {
2836
+ const localKey = getPluginLocalKey(pluginId);
2837
+ const localSettings = localStorage.getItem(localKey);
2838
+ if (!localSettings) {
2839
+ localStorage.setItem(localKey, JSON.stringify(_getSettings(settings)));
2840
+ }
2841
+ }
2842
+ function setPluginSettings(pluginId, key, value) {
2843
+ const localKey = getPluginLocalKey(pluginId);
2844
+ const localSettings = localStorage.getItem(localKey);
2845
+ const parsedLocalSettings = JSON.parse(localSettings || "{}");
2846
+ const updated = {
2847
+ ...parsedLocalSettings,
2848
+ [key]: value
2849
+ };
2850
+ localStorage.setItem(localKey, JSON.stringify(updated));
2851
+ devtoolsContext.hooks.callHookWith((callbacks) => {
2852
+ callbacks.forEach((cb) => cb({
2853
+ pluginId,
2854
+ key,
2855
+ oldValue: parsedLocalSettings[key],
2856
+ newValue: value,
2857
+ settings: updated
2858
+ }));
2859
+ }, "setPluginSettings" /* SET_PLUGIN_SETTINGS */);
2860
+ }
2861
+
2903
2862
  // src/api/v6/index.ts
2904
2863
  var DevToolsV6PluginAPI = class {
2905
2864
  constructor({ plugin, ctx }) {
@@ -2943,14 +2902,14 @@ var DevToolsV6PluginAPI = class {
2943
2902
  }
2944
2903
  // component inspector
2945
2904
  notifyComponentUpdate(instance) {
2946
- var _a24;
2905
+ var _a25;
2947
2906
  const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
2948
2907
  if (inspector == null ? void 0 : inspector.id) {
2949
2908
  if (instance) {
2950
2909
  const args = [
2951
2910
  instance.appContext.app,
2952
2911
  instance.uid,
2953
- (_a24 = instance.parent) == null ? void 0 : _a24.uid,
2912
+ (_a25 = instance.parent) == null ? void 0 : _a25.uid,
2954
2913
  instance
2955
2914
  ];
2956
2915
  devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, ...args);
@@ -2963,6 +2922,9 @@ var DevToolsV6PluginAPI = class {
2963
2922
  // custom inspector
2964
2923
  addInspector(options) {
2965
2924
  this.hooks.callHook("addInspector" /* ADD_INSPECTOR */, { inspector: options, plugin: this.plugin });
2925
+ if (this.plugin.descriptor.settings) {
2926
+ initPluginSettings(options.id, this.plugin.descriptor.settings);
2927
+ }
2966
2928
  }
2967
2929
  sendInspectorTree(inspectorId) {
2968
2930
  this.hooks.callHook("sendInspectorTree" /* SEND_INSPECTOR_TREE */, { inspectorId, plugin: this.plugin });
@@ -2985,20 +2947,8 @@ var DevToolsV6PluginAPI = class {
2985
2947
  }
2986
2948
  // settings
2987
2949
  getSettings(pluginId) {
2988
- var _a24, _b24, _c;
2989
- function _getSettings(settings) {
2990
- const _settings = {};
2991
- Object.keys(settings).forEach((key) => {
2992
- _settings[key] = settings[key].defaultValue;
2993
- });
2994
- return _settings;
2995
- }
2996
- if (pluginId) {
2997
- const item = (_b24 = (_a24 = devtoolsPluginBuffer.find((item2) => item2[0].id === pluginId)) == null ? void 0 : _a24[0]) != null ? _b24 : null;
2998
- return (_c = _getSettings(item == null ? void 0 : item.settings)) != null ? _c : _getSettings(this.plugin.descriptor.settings);
2999
- } else {
3000
- return _getSettings(this.plugin.descriptor.settings);
3001
- }
2950
+ const inspector = getActiveInspectors().find((i) => i.packageName === this.plugin.descriptor.packageName);
2951
+ return getPluginSettings(pluginId != null ? pluginId : inspector == null ? void 0 : inspector.id, this.plugin.descriptor.settings);
3002
2952
  }
3003
2953
  // utilities
3004
2954
  getComponentInstances(app) {
@@ -3095,7 +3045,7 @@ var ComponentWalker = class {
3095
3045
  * @return {object}
3096
3046
  */
3097
3047
  async capture(instance, depth) {
3098
- var _a24;
3048
+ var _a25;
3099
3049
  if (!instance)
3100
3050
  return null;
3101
3051
  const id = this.captureId(instance);
@@ -3150,7 +3100,7 @@ var ComponentWalker = class {
3150
3100
  } else {
3151
3101
  treeNode.domOrder = [-1];
3152
3102
  }
3153
- if ((_a24 = instance.suspense) == null ? void 0 : _a24.suspenseKey) {
3103
+ if ((_a25 = instance.suspense) == null ? void 0 : _a25.suspenseKey) {
3154
3104
  treeNode.tags.push({
3155
3105
  label: instance.suspense.suspenseKey,
3156
3106
  backgroundColor: 14979812,
@@ -3169,8 +3119,8 @@ var ComponentWalker = class {
3169
3119
  * @return {Vue|Array}
3170
3120
  */
3171
3121
  async findQualifiedChildren(instance, depth) {
3172
- var _a24;
3173
- if (this.componentFilter.isQualified(instance) && !((_a24 = instance.type.devtools) == null ? void 0 : _a24.hide)) {
3122
+ var _a25;
3123
+ if (this.componentFilter.isQualified(instance) && !((_a25 = instance.type.devtools) == null ? void 0 : _a25.hide)) {
3174
3124
  return [await this.capture(instance, depth)];
3175
3125
  } else if (instance.subTree) {
3176
3126
  const list = this.isKeepAlive(instance) ? this.getKeepAliveCachedInstances(instance) : this.getInternalInstanceChildren(instance.subTree);
@@ -3190,8 +3140,8 @@ var ComponentWalker = class {
3190
3140
  */
3191
3141
  async findQualifiedChildrenFromList(instances, depth) {
3192
3142
  instances = instances.filter((child) => {
3193
- var _a24;
3194
- return !isBeingDestroyed(child) && !((_a24 = child.type.devtools) == null ? void 0 : _a24.hide);
3143
+ var _a25;
3144
+ return !isBeingDestroyed(child) && !((_a25 = child.type.devtools) == null ? void 0 : _a25.hide);
3195
3145
  });
3196
3146
  if (!this.componentFilter.filter)
3197
3147
  return Promise.all(instances.map((child) => this.capture(child, depth)));
@@ -3219,8 +3169,8 @@ var ComponentWalker = class {
3219
3169
  }
3220
3170
  }
3221
3171
  return list.filter((child) => {
3222
- var _a24;
3223
- return !isBeingDestroyed(child) && !((_a24 = child.type.devtools) == null ? void 0 : _a24.hide);
3172
+ var _a25;
3173
+ return !isBeingDestroyed(child) && !((_a25 = child.type.devtools) == null ? void 0 : _a25.hide);
3224
3174
  });
3225
3175
  }
3226
3176
  /**
@@ -3501,7 +3451,7 @@ function getStateTypeAndName(info) {
3501
3451
  function processSetupState(instance) {
3502
3452
  const raw = instance.devtoolsRawSetupState || {};
3503
3453
  return Object.keys(instance.setupState).filter((key) => !vueBuiltins.has(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
3504
- var _a24, _b24, _c, _d;
3454
+ var _a25, _b25, _c, _d;
3505
3455
  const value = returnError(() => toRaw2(instance.setupState[key]));
3506
3456
  const rawData = raw[key];
3507
3457
  let result;
@@ -3510,7 +3460,7 @@ function processSetupState(instance) {
3510
3460
  const info = getSetupStateType(rawData);
3511
3461
  const { stateType, stateTypeName } = getStateTypeAndName(info);
3512
3462
  const isState = info.ref || info.computed || info.reactive;
3513
- const raw2 = ensurePropertyExists(rawData, "effect") ? ((_b24 = (_a24 = rawData.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
3463
+ const raw2 = ensurePropertyExists(rawData, "effect") ? ((_b25 = (_a25 = rawData.effect) == null ? void 0 : _a25.raw) == null ? void 0 : _b25.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
3514
3464
  if (stateType)
3515
3465
  isOtherType = false;
3516
3466
  result = {
@@ -3540,8 +3490,8 @@ function processComputed(instance, mergedType) {
3540
3490
  type: type2,
3541
3491
  key,
3542
3492
  value: returnError(() => {
3543
- var _a24;
3544
- return (_a24 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a24[key];
3493
+ var _a25;
3494
+ return (_a25 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a25[key];
3545
3495
  }),
3546
3496
  editable: typeof def.set === "function"
3547
3497
  });
@@ -3603,10 +3553,10 @@ function processRefs(instance) {
3603
3553
  }));
3604
3554
  }
3605
3555
  function processEventListeners(instance) {
3606
- var _a24, _b24;
3556
+ var _a25, _b25;
3607
3557
  const emitsDefinition = instance.type.emits;
3608
3558
  const declaredEmits = Array.isArray(emitsDefinition) ? emitsDefinition : Object.keys(emitsDefinition != null ? emitsDefinition : {});
3609
- const keys = Object.keys((_b24 = (_a24 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a24.props) != null ? _b24 : {});
3559
+ const keys = Object.keys((_b25 = (_a25 = instance == null ? void 0 : instance.vnode) == null ? void 0 : _a25.props) != null ? _b25 : {});
3610
3560
  const result = [];
3611
3561
  for (const key of keys) {
3612
3562
  const [prefix, ...eventNameParts] = key.split(/(?=[A-Z])/);
@@ -3645,11 +3595,11 @@ function processInstanceState(instance) {
3645
3595
 
3646
3596
  // src/core/component/state/index.ts
3647
3597
  function getInstanceState(params) {
3648
- var _a24;
3598
+ var _a25;
3649
3599
  const instance = getComponentInstance(activeAppRecord.value, params.instanceId);
3650
3600
  const id = getUniqueComponentId(instance);
3651
3601
  const name = getInstanceName(instance);
3652
- const file = (_a24 = instance == null ? void 0 : instance.type) == null ? void 0 : _a24.__file;
3602
+ const file = (_a25 = instance == null ? void 0 : instance.type) == null ? void 0 : _a25.__file;
3653
3603
  const state = processInstanceState(instance);
3654
3604
  return {
3655
3605
  id,
@@ -3711,13 +3661,13 @@ function createComponentsDevToolsPlugin(app) {
3711
3661
  }
3712
3662
  });
3713
3663
  api.on.getInspectorState(async (payload) => {
3714
- var _a24;
3664
+ var _a25;
3715
3665
  if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {
3716
3666
  const result = getInstanceState({
3717
3667
  instanceId: payload.nodeId
3718
3668
  });
3719
3669
  const componentInstance = result.instance;
3720
- const app2 = (_a24 = result.instance) == null ? void 0 : _a24.appContext.app;
3670
+ const app2 = (_a25 = result.instance) == null ? void 0 : _a25.appContext.app;
3721
3671
  const _payload = {
3722
3672
  componentInstance,
3723
3673
  app: app2,
@@ -3743,10 +3693,10 @@ function createComponentsDevToolsPlugin(app) {
3743
3693
  api.sendInspectorState(INSPECTOR_ID);
3744
3694
  }, 120);
3745
3695
  const componentAddedCleanup = hook.on.componentAdded(async (app2, uid, parentUid, component) => {
3746
- var _a24, _b24, _c;
3696
+ var _a25, _b25, _c;
3747
3697
  if (devtoolsState.highPerfModeEnabled)
3748
3698
  return;
3749
- if ((_c = (_b24 = (_a24 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
3699
+ if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
3750
3700
  return;
3751
3701
  if (!app2 || typeof uid !== "number" && !uid || !component)
3752
3702
  return;
@@ -3770,10 +3720,10 @@ function createComponentsDevToolsPlugin(app) {
3770
3720
  debounceSendInspectorTree();
3771
3721
  });
3772
3722
  const componentUpdatedCleanup = hook.on.componentUpdated(async (app2, uid, parentUid, component) => {
3773
- var _a24, _b24, _c;
3723
+ var _a25, _b25, _c;
3774
3724
  if (devtoolsState.highPerfModeEnabled)
3775
3725
  return;
3776
- if ((_c = (_b24 = (_a24 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
3726
+ if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
3777
3727
  return;
3778
3728
  if (!app2 || typeof uid !== "number" && !uid || !component)
3779
3729
  return;
@@ -3798,10 +3748,10 @@ function createComponentsDevToolsPlugin(app) {
3798
3748
  debounceSendInspectorState();
3799
3749
  });
3800
3750
  const componentRemovedCleanup = hook.on.componentRemoved(async (app2, uid, parentUid, component) => {
3801
- var _a24, _b24, _c;
3751
+ var _a25, _b25, _c;
3802
3752
  if (devtoolsState.highPerfModeEnabled)
3803
3753
  return;
3804
- if ((_c = (_b24 = (_a24 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a24.type) == null ? void 0 : _b24.devtools) == null ? void 0 : _c.hide)
3754
+ if ((_c = (_b25 = (_a25 = app2 == null ? void 0 : app2._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
3805
3755
  return;
3806
3756
  if (!app2 || typeof uid !== "number" && !uid || !component)
3807
3757
  return;
@@ -3823,8 +3773,8 @@ function createComponentsDevToolsPlugin(app) {
3823
3773
  }
3824
3774
 
3825
3775
  // src/core/plugin/index.ts
3826
- var _a14, _b14;
3827
- (_b14 = (_a14 = target7).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b14 : _a14.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();
3776
+ var _a13, _b13;
3777
+ (_b13 = (_a13 = target6).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null ? _b13 : _a13.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set();
3828
3778
  function setupDevToolsPlugin(pluginDescriptor, setupFn) {
3829
3779
  return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
3830
3780
  }
@@ -3845,14 +3795,21 @@ function callDevToolsPluginSetupFn(plugin, app) {
3845
3795
  });
3846
3796
  }
3847
3797
  setupFn(api);
3798
+ if (pluginDescriptor.settings) {
3799
+ const inspector = devtoolsInspector.find((inspector2) => inspector2.descriptor.id === pluginDescriptor.id);
3800
+ if (inspector) {
3801
+ inspector.descriptor.settings = pluginDescriptor.settings;
3802
+ initPluginSettings(inspector.options.id, pluginDescriptor.settings);
3803
+ }
3804
+ }
3848
3805
  }
3849
3806
  function removeRegisteredPluginApp(app) {
3850
- target7.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
3807
+ target6.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.delete(app);
3851
3808
  }
3852
3809
  function registerDevToolsPlugin(app) {
3853
- if (target7.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app))
3810
+ if (target6.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(app))
3854
3811
  return;
3855
- target7.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
3812
+ target6.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(app);
3856
3813
  devtoolsPluginBuffer.forEach((plugin) => {
3857
3814
  callDevToolsPluginSetupFn(plugin, app);
3858
3815
  });
@@ -3955,34 +3912,43 @@ function createDevToolsApi(hooks2) {
3955
3912
  if (instance) {
3956
3913
  const [el] = getRootElementsFromComponentInstance(instance);
3957
3914
  if (el) {
3958
- target8.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
3915
+ target7.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = el;
3959
3916
  }
3960
3917
  }
3918
+ },
3919
+ updatePluginSettings(pluginId, key, value) {
3920
+ setPluginSettings(pluginId, key, value);
3921
+ },
3922
+ getPluginSettings(pluginId) {
3923
+ return {
3924
+ options: getPluginSettingsOptions(pluginId),
3925
+ values: getPluginSettings(pluginId)
3926
+ };
3961
3927
  }
3962
3928
  };
3963
3929
  }
3964
3930
 
3965
3931
  // src/ctx/env.ts
3966
3932
  init_esm_shims();
3967
- import { target as target9 } from "@vue/devtools-shared";
3968
- var _a15, _b15;
3969
- (_b15 = (_a15 = target9).__VUE_DEVTOOLS_ENV__) != null ? _b15 : _a15.__VUE_DEVTOOLS_ENV__ = {
3933
+ import { target as target8 } from "@vue/devtools-shared";
3934
+ var _a14, _b14;
3935
+ (_b14 = (_a14 = target8).__VUE_DEVTOOLS_ENV__) != null ? _b14 : _a14.__VUE_DEVTOOLS_ENV__ = {
3970
3936
  vitePluginDetected: false
3971
3937
  };
3972
3938
  function getDevToolsEnv() {
3973
- return target9.__VUE_DEVTOOLS_ENV__;
3939
+ return target8.__VUE_DEVTOOLS_ENV__;
3974
3940
  }
3975
3941
  function setDevToolsEnv(env) {
3976
- target9.__VUE_DEVTOOLS_ENV__ = {
3977
- ...target9.__VUE_DEVTOOLS_ENV__,
3942
+ target8.__VUE_DEVTOOLS_ENV__ = {
3943
+ ...target8.__VUE_DEVTOOLS_ENV__,
3978
3944
  ...env
3979
3945
  };
3980
3946
  }
3981
3947
 
3982
3948
  // src/ctx/index.ts
3983
3949
  var hooks = createDevToolsCtxHooks();
3984
- var _a16, _b16;
3985
- (_b16 = (_a16 = target10).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b16 : _a16.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
3950
+ var _a15, _b15;
3951
+ (_b15 = (_a15 = target9).__VUE_DEVTOOLS_KIT_CONTEXT__) != null ? _b15 : _a15.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
3986
3952
  hooks,
3987
3953
  get state() {
3988
3954
  return {
@@ -3994,7 +3960,112 @@ var _a16, _b16;
3994
3960
  },
3995
3961
  api: createDevToolsApi(hooks)
3996
3962
  };
3997
- var devtoolsContext = target10.__VUE_DEVTOOLS_KIT_CONTEXT__;
3963
+ var devtoolsContext = target9.__VUE_DEVTOOLS_KIT_CONTEXT__;
3964
+
3965
+ // src/hook/index.ts
3966
+ var _a16, _b16;
3967
+ var devtoolsHooks = (_b16 = (_a16 = target10).__VUE_DEVTOOLS_HOOK) != null ? _b16 : _a16.__VUE_DEVTOOLS_HOOK = createHooks2();
3968
+ var on = {
3969
+ vueAppInit(fn) {
3970
+ devtoolsHooks.hook("app:init" /* APP_INIT */, fn);
3971
+ },
3972
+ vueAppUnmount(fn) {
3973
+ devtoolsHooks.hook("app:unmount" /* APP_UNMOUNT */, fn);
3974
+ },
3975
+ vueAppConnected(fn) {
3976
+ devtoolsHooks.hook("app:connected" /* APP_CONNECTED */, fn);
3977
+ },
3978
+ componentAdded(fn) {
3979
+ return devtoolsHooks.hook("component:added" /* COMPONENT_ADDED */, fn);
3980
+ },
3981
+ componentUpdated(fn) {
3982
+ return devtoolsHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
3983
+ },
3984
+ componentRemoved(fn) {
3985
+ return devtoolsHooks.hook("component:removed" /* COMPONENT_REMOVED */, fn);
3986
+ },
3987
+ setupDevtoolsPlugin(fn) {
3988
+ devtoolsHooks.hook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, fn);
3989
+ }
3990
+ };
3991
+ function createDevToolsHook() {
3992
+ return {
3993
+ id: "vue-devtools-next",
3994
+ devtoolsVersion: "7.0",
3995
+ enabled: false,
3996
+ appRecords: [],
3997
+ apps: [],
3998
+ events: /* @__PURE__ */ new Map(),
3999
+ on(event, fn) {
4000
+ var _a25;
4001
+ if (!this.events.has(event))
4002
+ this.events.set(event, []);
4003
+ (_a25 = this.events.get(event)) == null ? void 0 : _a25.push(fn);
4004
+ return () => this.off(event, fn);
4005
+ },
4006
+ once(event, fn) {
4007
+ const onceFn = (...args) => {
4008
+ this.off(event, onceFn);
4009
+ fn(...args);
4010
+ };
4011
+ this.on(event, onceFn);
4012
+ return [event, onceFn];
4013
+ },
4014
+ off(event, fn) {
4015
+ if (this.events.has(event)) {
4016
+ const eventCallbacks = this.events.get(event);
4017
+ const index = eventCallbacks.indexOf(fn);
4018
+ if (index !== -1)
4019
+ eventCallbacks.splice(index, 1);
4020
+ }
4021
+ },
4022
+ emit(event, ...payload) {
4023
+ if (this.events.has(event))
4024
+ this.events.get(event).forEach((fn) => fn(...payload));
4025
+ }
4026
+ };
4027
+ }
4028
+ function subscribeDevToolsHook() {
4029
+ const hook2 = target10.__VUE_DEVTOOLS_GLOBAL_HOOK__;
4030
+ hook2.on("app:init" /* APP_INIT */, (app, version) => {
4031
+ var _a25, _b25, _c;
4032
+ if ((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide)
4033
+ return;
4034
+ devtoolsHooks.callHook("app:init" /* APP_INIT */, app, version);
4035
+ });
4036
+ hook2.on("app:unmount" /* APP_UNMOUNT */, (app) => {
4037
+ devtoolsHooks.callHook("app:unmount" /* APP_UNMOUNT */, app);
4038
+ });
4039
+ hook2.on("component:added" /* COMPONENT_ADDED */, async (app, uid, parentUid, component) => {
4040
+ var _a25, _b25, _c;
4041
+ if (((_c = (_b25 = (_a25 = app == null ? void 0 : app._instance) == null ? void 0 : _a25.type) == null ? void 0 : _b25.devtools) == null ? void 0 : _c.hide) || devtoolsState.highPerfModeEnabled)
4042
+ return;
4043
+ if (!app || typeof uid !== "number" && !uid || !component)
4044
+ return;
4045
+ devtoolsHooks.callHook("component:added" /* COMPONENT_ADDED */, app, uid, parentUid, component);
4046
+ });
4047
+ hook2.on("component:updated" /* COMPONENT_UPDATED */, (app, uid, parentUid, component) => {
4048
+ if (!app || typeof uid !== "number" && !uid || !component || devtoolsState.highPerfModeEnabled)
4049
+ return;
4050
+ devtoolsHooks.callHook("component:updated" /* COMPONENT_UPDATED */, app, uid, parentUid, component);
4051
+ });
4052
+ hook2.on("component:removed" /* COMPONENT_REMOVED */, async (app, uid, parentUid, component) => {
4053
+ if (!app || typeof uid !== "number" && !uid || !component || devtoolsState.highPerfModeEnabled)
4054
+ return;
4055
+ devtoolsHooks.callHook("component:removed" /* COMPONENT_REMOVED */, app, uid, parentUid, component);
4056
+ });
4057
+ hook2.on("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, (pluginDescriptor, setupFn, options) => {
4058
+ if ((options == null ? void 0 : options.target) === "legacy")
4059
+ return;
4060
+ devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
4061
+ });
4062
+ }
4063
+ var hook = {
4064
+ on,
4065
+ setupDevToolsPlugin(pluginDescriptor, setupFn) {
4066
+ return devtoolsHooks.callHook("devtools-plugin:setup" /* SETUP_DEVTOOLS_PLUGIN */, pluginDescriptor, setupFn);
4067
+ }
4068
+ };
3998
4069
 
3999
4070
  // src/compat/index.ts
4000
4071
  init_esm_shims();
@@ -4023,14 +4094,14 @@ var appRecordInfo = (_b17 = (_a17 = target12).__VUE_DEVTOOLS_NEXT_APP_RECORD_INF
4023
4094
  appIds: /* @__PURE__ */ new Set()
4024
4095
  };
4025
4096
  function getAppRecordName(app, fallbackName) {
4026
- var _a24;
4027
- return ((_a24 = app == null ? void 0 : app._component) == null ? void 0 : _a24.name) || `App ${fallbackName}`;
4097
+ var _a25;
4098
+ return ((_a25 = app == null ? void 0 : app._component) == null ? void 0 : _a25.name) || `App ${fallbackName}`;
4028
4099
  }
4029
4100
  function getAppRootInstance(app) {
4030
- var _a24, _b24, _c, _d;
4101
+ var _a25, _b25, _c, _d;
4031
4102
  if (app._instance)
4032
4103
  return app._instance;
4033
- else if ((_b24 = (_a24 = app._container) == null ? void 0 : _a24._vnode) == null ? void 0 : _b24.component)
4104
+ else if ((_b25 = (_a25 = app._container) == null ? void 0 : _a25._vnode) == null ? void 0 : _b25.component)
4034
4105
  return (_d = (_c = app._container) == null ? void 0 : _c._vnode) == null ? void 0 : _d.component;
4035
4106
  }
4036
4107
  function removeAppRecordId(app) {
@@ -4078,11 +4149,11 @@ function createAppRecord(app) {
4078
4149
 
4079
4150
  // src/core/index.ts
4080
4151
  function initDevTools() {
4081
- var _a24;
4152
+ var _a25;
4082
4153
  updateDevToolsState({
4083
4154
  vitePluginDetected: getDevToolsEnv().vitePluginDetected
4084
4155
  });
4085
- const isDevToolsNext = ((_a24 = target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a24.id) === "vue-devtools-next";
4156
+ const isDevToolsNext = ((_a25 = target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) == null ? void 0 : _a25.id) === "vue-devtools-next";
4086
4157
  if (target13.__VUE_DEVTOOLS_GLOBAL_HOOK__ && isDevToolsNext)
4087
4158
  return;
4088
4159
  if (!target13.__VUE_DEVTOOLS_GLOBAL_HOOK__) {
@@ -4093,9 +4164,9 @@ function initDevTools() {
4093
4164
  }
4094
4165
  }
4095
4166
  hook.on.setupDevtoolsPlugin((pluginDescriptor, setupFn) => {
4096
- var _a25;
4167
+ var _a26;
4097
4168
  addDevToolsPluginToBuffer(pluginDescriptor, setupFn);
4098
- const { app } = (_a25 = activeAppRecord) != null ? _a25 : {};
4169
+ const { app } = (_a26 = activeAppRecord) != null ? _a26 : {};
4099
4170
  if (!app)
4100
4171
  return;
4101
4172
  callDevToolsPluginSetupFn([pluginDescriptor, setupFn], app);
@@ -4780,7 +4851,7 @@ function generateReferentialEqualityAnnotations(identitites, dedupe) {
4780
4851
  }
4781
4852
  }
4782
4853
  var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPath = [], seenObjects = /* @__PURE__ */ new Map()) => {
4783
- var _a24;
4854
+ var _a25;
4784
4855
  const primitive = isPrimitive2(object);
4785
4856
  if (!primitive) {
4786
4857
  addIdentity(object, path, identities);
@@ -4810,7 +4881,7 @@ var walker = (object, identities, superJson, dedupe, path = [], objectsInThisPat
4810
4881
  };
4811
4882
  }
4812
4883
  const transformationResult = transformValue(object, superJson);
4813
- const transformed = (_a24 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a24 : object;
4884
+ const transformed = (_a25 = transformationResult == null ? void 0 : transformationResult.value) != null ? _a25 : object;
4814
4885
  const transformedValue = isArray(transformed) ? [] : {};
4815
4886
  const innerAnnotations = {};
4816
4887
  forEach(transformed, (value, index) => {
@@ -4882,22 +4953,22 @@ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
4882
4953
  });
4883
4954
  }
4884
4955
  }
4885
- function copy(target21, options = {}) {
4886
- if (isArray2(target21)) {
4887
- return target21.map((item) => copy(item, options));
4956
+ function copy(target22, options = {}) {
4957
+ if (isArray2(target22)) {
4958
+ return target22.map((item) => copy(item, options));
4888
4959
  }
4889
- if (!isPlainObject3(target21)) {
4890
- return target21;
4960
+ if (!isPlainObject3(target22)) {
4961
+ return target22;
4891
4962
  }
4892
- const props = Object.getOwnPropertyNames(target21);
4893
- const symbols = Object.getOwnPropertySymbols(target21);
4963
+ const props = Object.getOwnPropertyNames(target22);
4964
+ const symbols = Object.getOwnPropertySymbols(target22);
4894
4965
  return [...props, ...symbols].reduce((carry, key) => {
4895
4966
  if (isArray2(options.props) && !options.props.includes(key)) {
4896
4967
  return carry;
4897
4968
  }
4898
- const val = target21[key];
4969
+ const val = target22[key];
4899
4970
  const newVal = copy(val, options);
4900
- assignProp(carry, key, newVal, target21, options.nonenumerable);
4971
+ assignProp(carry, key, newVal, target22, options.nonenumerable);
4901
4972
  return carry;
4902
4973
  }, {});
4903
4974
  }
@@ -4910,8 +4981,8 @@ var SuperJSON = class {
4910
4981
  constructor({ dedupe = false } = {}) {
4911
4982
  this.classRegistry = new ClassRegistry();
4912
4983
  this.symbolRegistry = new Registry((s) => {
4913
- var _a24;
4914
- return (_a24 = s.description) != null ? _a24 : "";
4984
+ var _a25;
4985
+ return (_a25 = s.description) != null ? _a25 : "";
4915
4986
  });
4916
4987
  this.customTransformerRegistry = new CustomTransformerRegistry();
4917
4988
  this.allowedErrorProps = [];
@@ -5042,9 +5113,9 @@ function createIframeServerChannel() {
5042
5113
  }
5043
5114
  return {
5044
5115
  post: (data) => {
5045
- var _a24;
5116
+ var _a25;
5046
5117
  const iframe = getIframeServerContext();
5047
- (_a24 = iframe == null ? void 0 : iframe.contentWindow) == null ? void 0 : _a24.postMessage(SuperJSON.stringify({
5118
+ (_a25 = iframe == null ? void 0 : iframe.contentWindow) == null ? void 0 : _a25.postMessage(SuperJSON.stringify({
5048
5119
  event: __DEVTOOLS_KIT_IFRAME_MESSAGING_EVENT_KEY,
5049
5120
  data
5050
5121
  }), "*");
@@ -5136,9 +5207,9 @@ function createViteClientChannel() {
5136
5207
  // src/messaging/presets/vite/server.ts
5137
5208
  init_esm_shims();
5138
5209
  function createViteServerChannel() {
5139
- var _a24;
5210
+ var _a25;
5140
5211
  const viteServer = getViteServerContext();
5141
- const ws = (_a24 = viteServer.hot) != null ? _a24 : viteServer.ws;
5212
+ const ws = (_a25 = viteServer.hot) != null ? _a25 : viteServer.ws;
5142
5213
  return {
5143
5214
  post: (data) => ws == null ? void 0 : ws.send(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, SuperJSON.stringify(data)),
5144
5215
  on: (handler) => ws == null ? void 0 : ws.on(__DEVTOOLS_KIT_VITE_MESSAGING_EVENT_KEY, (event) => {
@@ -5702,13 +5773,13 @@ function tryGetRefValue(ref) {
5702
5773
  }
5703
5774
  }
5704
5775
  function getObjectDetails(object) {
5705
- var _a24, _b24, _c, _d;
5776
+ var _a25, _b25, _c, _d;
5706
5777
  const info = getSetupStateType(object);
5707
5778
  const isState = info.ref || info.computed || info.reactive;
5708
5779
  if (isState) {
5709
5780
  const stateTypeName = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
5710
5781
  const value = toRaw2(info.reactive ? object : tryGetRefValue(object));
5711
- const raw = ensurePropertyExists(object, "effect") ? ((_b24 = (_a24 = object.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
5782
+ const raw = ensurePropertyExists(object, "effect") ? ((_b25 = (_a25 = object.effect) == null ? void 0 : _a25.raw) == null ? void 0 : _b25.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
5712
5783
  return {
5713
5784
  _custom: {
5714
5785
  type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),
@@ -5730,7 +5801,7 @@ function getObjectDetails(object) {
5730
5801
 
5731
5802
  // src/core/component/state/replacer.ts
5732
5803
  function stringifyReplacer(key, _value, depth, seenInstance) {
5733
- var _a24;
5804
+ var _a25;
5734
5805
  if (key === "compilerOptions")
5735
5806
  return;
5736
5807
  const val = this[key];
@@ -5792,7 +5863,7 @@ function stringifyReplacer(key, _value, depth, seenInstance) {
5792
5863
  return `[native VNode <${val.tag}>]`;
5793
5864
  } else if (typeof HTMLElement !== "undefined" && val instanceof HTMLElement) {
5794
5865
  return getHTMLElementDetails(val);
5795
- } else if (((_a24 = val.constructor) == null ? void 0 : _a24.name) === "Store" && "_wrappedGetters" in val) {
5866
+ } else if (((_a25 = val.constructor) == null ? void 0 : _a25.name) === "Store" && "_wrappedGetters" in val) {
5796
5867
  return "[object Store]";
5797
5868
  } else if (ensurePropertyExists(val, "currentRoute", true)) {
5798
5869
  return "[object Router]";
@@ -5956,8 +6027,8 @@ function stringifyCircularAutoChunks(data, replacer = null, space = null) {
5956
6027
  let result;
5957
6028
  try {
5958
6029
  result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) => {
5959
- var _a24;
5960
- return (_a24 = replacer == null ? void 0 : replacer(k, v)) == null ? void 0 : _a24.call(this);
6030
+ var _a25;
6031
+ return (_a25 = replacer == null ? void 0 : replacer(k, v)) == null ? void 0 : _a25.call(this);
5961
6032
  }, space);
5962
6033
  } catch (e) {
5963
6034
  result = stringifyStrictCircularAutoChunks(data, replacer, space);
@@ -6019,7 +6090,7 @@ function getInspectorStateValueType(value, raw = true) {
6019
6090
  }
6020
6091
  }
6021
6092
  function formatInspectorStateValue(value, quotes = false, options) {
6022
- var _a24, _b24, _c;
6093
+ var _a25, _b25, _c;
6023
6094
  const { customClass } = options != null ? options : {};
6024
6095
  let result;
6025
6096
  const type = getInspectorStateValueType(value, false);
@@ -6028,14 +6099,14 @@ function formatInspectorStateValue(value, quotes = false, options) {
6028
6099
  if (result = internalStateTokenToString(value)) {
6029
6100
  return result;
6030
6101
  } else if (type === "custom") {
6031
- const nestedName = ((_a24 = value._custom.value) == null ? void 0 : _a24._custom) && formatInspectorStateValue(value._custom.value, quotes, options);
6102
+ const nestedName = ((_a25 = value._custom.value) == null ? void 0 : _a25._custom) && formatInspectorStateValue(value._custom.value, quotes, options);
6032
6103
  return nestedName || value._custom.displayText || value._custom.display;
6033
6104
  } else if (type === "array") {
6034
6105
  return `Array[${value.length}]`;
6035
6106
  } else if (type === "plain-object") {
6036
6107
  return `Object${Object.keys(value).length ? "" : " (empty)"}`;
6037
6108
  } else if (type == null ? void 0 : type.includes("native")) {
6038
- return escape((_b24 = specialTypeRE.exec(value)) == null ? void 0 : _b24[2]);
6109
+ return escape((_b25 = specialTypeRE.exec(value)) == null ? void 0 : _b25[2]);
6039
6110
  } else if (typeof value === "string") {
6040
6111
  const typeMatch = value.match(rawTypeRE);
6041
6112
  if (typeMatch) {
@@ -6052,14 +6123,14 @@ function escapeString(value) {
6052
6123
  return escape(value).replace(/ /g, "&nbsp;").replace(/\n/g, "<span>\\n</span>");
6053
6124
  }
6054
6125
  function getRaw(value) {
6055
- var _a24, _b24, _c;
6126
+ var _a25, _b25, _c;
6056
6127
  let customType;
6057
6128
  const isCustom = getInspectorStateValueType(value) === "custom";
6058
6129
  let inherit = {};
6059
6130
  if (isCustom) {
6060
6131
  const data = value;
6061
- const customValue = (_a24 = data._custom) == null ? void 0 : _a24.value;
6062
- const currentCustomType = (_b24 = data._custom) == null ? void 0 : _b24.type;
6132
+ const customValue = (_a25 = data._custom) == null ? void 0 : _a25.value;
6133
+ const currentCustomType = (_b25 = data._custom) == null ? void 0 : _b25.type;
6063
6134
  const nestedCustom = typeof customValue === "object" && customValue !== null && "_custom" in customValue ? getRaw(customValue) : { inherit: void 0, value: void 0, customType: void 0 };
6064
6135
  inherit = nestedCustom.inherit || ((_c = data._custom) == null ? void 0 : _c.fields) || {};
6065
6136
  value = nestedCustom.value || customValue;
@@ -6100,6 +6171,20 @@ init_esm_shims();
6100
6171
  // src/shared/env.ts
6101
6172
  init_esm_shims();
6102
6173
 
6174
+ // src/core/devtools-client/detected.ts
6175
+ init_esm_shims();
6176
+ import { target as target21 } from "@vue/devtools-shared";
6177
+ function updateDevToolsClientDetected(params) {
6178
+ devtoolsState.devtoolsClientDetected = {
6179
+ ...devtoolsState.devtoolsClientDetected,
6180
+ ...params
6181
+ };
6182
+ const devtoolsClientVisible = Object.values(devtoolsState.devtoolsClientDetected).some(Boolean);
6183
+ toggleHighPerfMode(!devtoolsClientVisible);
6184
+ }
6185
+ var _a24, _b24;
6186
+ (_b24 = (_a24 = target21).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null ? _b24 : _a24.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = updateDevToolsClientDetected;
6187
+
6103
6188
  // src/index.ts
6104
6189
  var devtools = {
6105
6190
  hook,
@@ -6192,5 +6277,6 @@ export {
6192
6277
  toggleClientConnected,
6193
6278
  toggleComponentInspectorEnabled,
6194
6279
  toggleHighPerfMode,
6280
+ updateDevToolsClientDetected,
6195
6281
  updateDevToolsState
6196
6282
  };