@simple-code-inspector/core 1.6.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/README.md +396 -0
- package/dist/client.iife.js +1 -0
- package/dist/client.umd.js +1 -0
- package/dist/index.js +15 -0
- package/dist/index.mjs +197972 -0
- package/package.json +73 -0
- package/types/client/index.d.ts +173 -0
- package/types/index.d.ts +3 -0
- package/types/server/clipboard.d.ts +5 -0
- package/types/server/index.d.ts +3 -0
- package/types/server/server.d.ts +8 -0
- package/types/server/transform/index.d.ts +12 -0
- package/types/server/transform/scan-html-tag.d.ts +5 -0
- package/types/server/transform/transform-astro.d.ts +2 -0
- package/types/server/transform/transform-jsx.d.ts +35 -0
- package/types/server/transform/transform-mdx.d.ts +2 -0
- package/types/server/transform/transform-svelte.d.ts +2 -0
- package/types/server/transform/transform-vue-pug.d.ts +44 -0
- package/types/server/transform/transform-vue.d.ts +5 -0
- package/types/server/use-client.d.ts +16 -0
- package/types/shared/constant.d.ts +8 -0
- package/types/shared/index.d.ts +4 -0
- package/types/shared/record-cache.d.ts +5 -0
- package/types/shared/type.d.ts +165 -0
- package/types/shared/utils.d.ts +157 -0
package/README.md
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://github.com/lakphy/simple-code-inspector/assets/73059627/842c3e88-dca7-4743-854c-d61093d3d34f" width="160px" style="margin-bottom: 12px;" />
|
|
3
|
+
|
|
4
|
+
<p align="center">
|
|
5
|
+
<h2>simple-code-inspector</h2>
|
|
6
|
+
<a href="https://inspector.fe-dev.cn">中文文档</a> | <a href="https://inspector.fe-dev.cn/en">Documentation</a>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/simple-code-inspector-plugin)
|
|
10
|
+
[](https://github.com/lakphy/simple-code-inspector)
|
|
11
|
+
[](https://npmcharts.netlify.app/compare/simple-code-inspector-plugin?minimal=true)
|
|
12
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
|
+
[](https://github.com/lakphy/simple-code-inspector)
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<hr />
|
|
18
|
+
|
|
19
|
+
## 📖 Introduction
|
|
20
|
+
|
|
21
|
+
Click the element on the page, it copies the source code location of the element to your clipboard.
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
## 💻 Try it out online
|
|
26
|
+
|
|
27
|
+
- [vue online demo](https://stackblitz.com/edit/vitejs-vite-4pseos?file=vite.config.ts)
|
|
28
|
+
- [react online demo](https://stackblitz.com/edit/vitejs-vite-svtwrr?file=vite.config.ts)
|
|
29
|
+
- [preact online demo](https://stackblitz.com/edit/vitejs-vite-iyawbf?file=vite.config.ts)
|
|
30
|
+
- [solid online demo](https://stackblitz.com/edit/solidjs-templates-6u76jn?file=vite.config.ts)
|
|
31
|
+
- [qwik online demo](https://stackblitz.com/edit/vitejs-vite-antzds?file=vite.config.ts)
|
|
32
|
+
- [svelte online demo](https://stackblitz.com/edit/vitejs-vite-zoncqr?file=vite.config.ts)
|
|
33
|
+
- [astro online demo](https://stackblitz.com/edit/withastro-astro-f5xq1t?file=astro.config.mjs)
|
|
34
|
+
|
|
35
|
+
## 🎨 Support
|
|
36
|
+
|
|
37
|
+
The following are which compilers and web frameworks we supported now:
|
|
38
|
+
|
|
39
|
+
- The following bundlers are currently supported:<br />
|
|
40
|
+
✅ webpack<br />
|
|
41
|
+
✅ vite<br />
|
|
42
|
+
✅ rspack / rsbuild<br />
|
|
43
|
+
✅ farm<br />
|
|
44
|
+
✅ esbuild<br />
|
|
45
|
+
✅ turbopack<br />
|
|
46
|
+
✅ mako<br />
|
|
47
|
+
- The following Web frameworks are currently supported:<br />
|
|
48
|
+
✅ vue2 / vue3 / nuxt<br />
|
|
49
|
+
✅ react / nextjs / umijs<br />
|
|
50
|
+
✅ preact<br />
|
|
51
|
+
✅ solid<br />
|
|
52
|
+
✅ qwik<br />
|
|
53
|
+
✅ svelte<br />
|
|
54
|
+
✅ astro<br />
|
|
55
|
+
|
|
56
|
+
## 🚀 Install
|
|
57
|
+
|
|
58
|
+
```perl
|
|
59
|
+
npm i simple-code-inspector-plugin -D
|
|
60
|
+
# or
|
|
61
|
+
yarn add simple-code-inspector-plugin -D
|
|
62
|
+
# or
|
|
63
|
+
pnpm add simple-code-inspector-plugin -D
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 🌈 Usage
|
|
67
|
+
|
|
68
|
+
Please check here for more usage information: [simple-code-inspector-plugin configuration](https://inspector.fe-dev.cn/en/guide/start.html#configuration)
|
|
69
|
+
|
|
70
|
+
- 1.Configuring Build Tools
|
|
71
|
+
|
|
72
|
+
<details>
|
|
73
|
+
<summary>Click to expand configuration about: <b>webpack</b></summary>
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
// webpack.config.js
|
|
77
|
+
const { codeInspectorPlugin } = require('simple-code-inspector-plugin');
|
|
78
|
+
|
|
79
|
+
module.exports = () => ({
|
|
80
|
+
plugins: [
|
|
81
|
+
codeInspectorPlugin({
|
|
82
|
+
bundler: 'webpack',
|
|
83
|
+
}),
|
|
84
|
+
],
|
|
85
|
+
});
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary>Click to expand configuration about: <b>vite</b></summary>
|
|
92
|
+
|
|
93
|
+
```js
|
|
94
|
+
// vite.config.js
|
|
95
|
+
import { defineConfig } from 'vite';
|
|
96
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
97
|
+
|
|
98
|
+
export default defineConfig({
|
|
99
|
+
plugins: [
|
|
100
|
+
codeInspectorPlugin({
|
|
101
|
+
bundler: 'vite',
|
|
102
|
+
}),
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
</details>
|
|
108
|
+
|
|
109
|
+
<details>
|
|
110
|
+
<summary>Click to expand configuration about: <b>rspack</b></summary>
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
// rspack.config.js
|
|
114
|
+
const { codeInspectorPlugin } = require('simple-code-inspector-plugin');
|
|
115
|
+
|
|
116
|
+
module.exports = {
|
|
117
|
+
// other config...
|
|
118
|
+
plugins: [
|
|
119
|
+
codeInspectorPlugin({
|
|
120
|
+
bundler: 'rspack',
|
|
121
|
+
}),
|
|
122
|
+
// other plugins...
|
|
123
|
+
],
|
|
124
|
+
};
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
</details>
|
|
128
|
+
|
|
129
|
+
<details>
|
|
130
|
+
<summary>Click to expand configuration about: <b>rsbuild</b></summary>
|
|
131
|
+
|
|
132
|
+
```js
|
|
133
|
+
// rsbuild.config.js
|
|
134
|
+
const { codeInspectorPlugin } = require('simple-code-inspector-plugin');
|
|
135
|
+
|
|
136
|
+
module.exports = {
|
|
137
|
+
// other config...
|
|
138
|
+
tools: {
|
|
139
|
+
rspack: {
|
|
140
|
+
plugins: [
|
|
141
|
+
codeInspectorPlugin({
|
|
142
|
+
bundler: 'rspack',
|
|
143
|
+
}),
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
</details>
|
|
151
|
+
|
|
152
|
+
<details>
|
|
153
|
+
<summary>Click to expand configuration about: <b>esbuild</b></summary>
|
|
154
|
+
|
|
155
|
+
```js
|
|
156
|
+
// esbuild.config.js
|
|
157
|
+
const esbuild = require('esbuild');
|
|
158
|
+
const { codeInspectorPlugin } = require('simple-code-inspector-plugin');
|
|
159
|
+
|
|
160
|
+
esbuild.build({
|
|
161
|
+
// other configs...
|
|
162
|
+
// [注意] esbuild 中使用时,dev 函数的返回值需自己根据环境判断,本地开发的环境返回 true,线上打包返回 false
|
|
163
|
+
plugins: [codeInspectorPlugin({ bundler: 'esbuild', dev: () => true })],
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary>Click to expand configuration about: <b>farm</b></summary>
|
|
171
|
+
|
|
172
|
+
```js
|
|
173
|
+
// farm.config.js
|
|
174
|
+
import { defineConfig } from '@farmfe/core';
|
|
175
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
176
|
+
|
|
177
|
+
export default defineConfig({
|
|
178
|
+
vitePlugins: [
|
|
179
|
+
codeInspectorPlugin({
|
|
180
|
+
bundler: 'vite',
|
|
181
|
+
}),
|
|
182
|
+
// ...other code
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
</details>
|
|
188
|
+
|
|
189
|
+
<details>
|
|
190
|
+
<summary>Click to expand configuration about: <b>vue-cli</b></summary>
|
|
191
|
+
|
|
192
|
+
```js
|
|
193
|
+
// vue.config.js
|
|
194
|
+
const { codeInspectorPlugin } = require('simple-code-inspector-plugin');
|
|
195
|
+
|
|
196
|
+
module.exports = {
|
|
197
|
+
// ...other code
|
|
198
|
+
chainWebpack: (config) => {
|
|
199
|
+
config.plugin('simple-code-inspector-plugin').use(
|
|
200
|
+
codeInspectorPlugin({
|
|
201
|
+
bundler: 'webpack',
|
|
202
|
+
})
|
|
203
|
+
);
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
</details>
|
|
209
|
+
|
|
210
|
+
<details>
|
|
211
|
+
<summary>Click to expand configuration about: <b>nuxt</b></summary>
|
|
212
|
+
|
|
213
|
+
- For nuxt3.x :
|
|
214
|
+
|
|
215
|
+
```js
|
|
216
|
+
// nuxt.config.js
|
|
217
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
218
|
+
|
|
219
|
+
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
220
|
+
export default defineNuxtConfig({
|
|
221
|
+
vite: {
|
|
222
|
+
plugins: [codeInspectorPlugin({ bundler: 'vite' })],
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
- For nuxt2.x :
|
|
228
|
+
|
|
229
|
+
```js
|
|
230
|
+
// nuxt.config.js
|
|
231
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
232
|
+
|
|
233
|
+
export default {
|
|
234
|
+
build: {
|
|
235
|
+
extend(config) {
|
|
236
|
+
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
|
|
237
|
+
return config;
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
</details>
|
|
244
|
+
|
|
245
|
+
<details>
|
|
246
|
+
<summary>Click to expand configuration about: <b>next.js</b></summary>
|
|
247
|
+
|
|
248
|
+
- For next.js(<= 14.x):
|
|
249
|
+
|
|
250
|
+
```js
|
|
251
|
+
// next.config.js
|
|
252
|
+
const { codeInspectorPlugin } = require('simple-code-inspector-plugin');
|
|
253
|
+
|
|
254
|
+
const nextConfig = {
|
|
255
|
+
webpack: (config, { dev, isServer }) => {
|
|
256
|
+
config.plugins.push(codeInspectorPlugin({ bundler: 'webpack' }));
|
|
257
|
+
return config;
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
module.exports = nextConfig;
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
- For next.js(15.0.x ~ 15.2.x):
|
|
265
|
+
|
|
266
|
+
```js
|
|
267
|
+
import type { NextConfig } from 'next';
|
|
268
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
269
|
+
|
|
270
|
+
const nextConfig: NextConfig = {
|
|
271
|
+
experimental: {
|
|
272
|
+
turbo: {
|
|
273
|
+
rules: codeInspectorPlugin({
|
|
274
|
+
bundler: 'turbopack',
|
|
275
|
+
}),
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
export default nextConfig;
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
- For next.js(>= 15.3.x):
|
|
284
|
+
|
|
285
|
+
```js
|
|
286
|
+
// next.config.js
|
|
287
|
+
import type { NextConfig } from 'next';
|
|
288
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
289
|
+
|
|
290
|
+
const nextConfig: NextConfig = {
|
|
291
|
+
turbopack: {
|
|
292
|
+
rules: codeInspectorPlugin({
|
|
293
|
+
bundler: 'turbopack',
|
|
294
|
+
}),
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
export default nextConfig;
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
</details>
|
|
302
|
+
|
|
303
|
+
<details>
|
|
304
|
+
<summary>Click to expand configuration about: <b>umi.js</b></summary>
|
|
305
|
+
|
|
306
|
+
- With webpack:
|
|
307
|
+
|
|
308
|
+
```js
|
|
309
|
+
// umi.config.js or umirc.js
|
|
310
|
+
import { defineConfig } from '@umijs/max';
|
|
311
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
312
|
+
|
|
313
|
+
export default defineConfig({
|
|
314
|
+
chainWebpack(memo) {
|
|
315
|
+
memo.plugin('simple-code-inspector-plugin').use(
|
|
316
|
+
codeInspectorPlugin({
|
|
317
|
+
bundler: 'webpack',
|
|
318
|
+
})
|
|
319
|
+
);
|
|
320
|
+
},
|
|
321
|
+
// other config
|
|
322
|
+
});
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
- With mako:
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
// .umirc.ts
|
|
329
|
+
import { defineConfig } from 'umi';
|
|
330
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
331
|
+
|
|
332
|
+
export default defineConfig({
|
|
333
|
+
// other config...
|
|
334
|
+
mako: {
|
|
335
|
+
plugins: [
|
|
336
|
+
codeInspectorPlugin({
|
|
337
|
+
bundler: 'mako',
|
|
338
|
+
}),
|
|
339
|
+
],
|
|
340
|
+
},
|
|
341
|
+
});
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
</details>
|
|
345
|
+
|
|
346
|
+
<details>
|
|
347
|
+
<summary>Click to expand configuration about: <b>astro</b></summary>
|
|
348
|
+
|
|
349
|
+
```js
|
|
350
|
+
// astro.config.mjs
|
|
351
|
+
import { defineConfig } from 'astro/config';
|
|
352
|
+
import { codeInspectorPlugin } from 'simple-code-inspector-plugin';
|
|
353
|
+
|
|
354
|
+
export default defineConfig({
|
|
355
|
+
vite: {
|
|
356
|
+
plugins: [codeInspectorPlugin({ bundler: 'vite' })],
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
</details>
|
|
362
|
+
|
|
363
|
+
- 2.Using the function
|
|
364
|
+
|
|
365
|
+
Now you can enjoy using it!~
|
|
366
|
+
|
|
367
|
+
When pressing the combination keys on the page, moving the mouse over the page will display a mask layer on the DOM with relevant information. Clicking will copy the corresponding source code location (e.g. `/src/App.tsx:12:3 <div>`) to your clipboard. (The default combination keys for Mac are `Option + Shift`; for Windows, it's `Alt + Shift`, and the browser console will output related combination key prompts)
|
|
368
|
+
|
|
369
|
+
<img src="https://cdn.jsdelivr.net/gh/zh-lx/static-img/code-inspector/console-success.png" width="700px" />
|
|
370
|
+
|
|
371
|
+
## 👨💻 Contributors
|
|
372
|
+
|
|
373
|
+
Special thanks to the contributors of this project:<br />
|
|
374
|
+
|
|
375
|
+
<img src="https://contrib.rocks/image?repo=lakphy/simple-code-inspector" height="40" />
|
|
376
|
+
|
|
377
|
+
## 📧 Communication and Feedback
|
|
378
|
+
|
|
379
|
+
For any usage issues, please leave a message below my [Twitter](https://twitter.com/zhulxing312147) post or [submit an issue](https://github.com/lakphy/simple-code-inspector/issues) on Github.
|
|
380
|
+
|
|
381
|
+
For Chinese users, you can join the QQ group `769748484` or add the author's WeiXin account `zhoulx1688888` for consultation and feedback:
|
|
382
|
+
|
|
383
|
+
<div style="display: flex; column-gap: 16px; row-gap: 16px; flex-wrap: wrap;">
|
|
384
|
+
<img src="https://cdn.jsdelivr.net/gh/zh-lx/static-img/code-inspector/qq-group.png" width="200" height="272" />
|
|
385
|
+
<img src="https://cdn.jsdelivr.net/gh/zh-lx/static-img/code-inspector/wx-group.jpg" width="200" height="272" />
|
|
386
|
+
<img src="https://cdn.jsdelivr.net/gh/zh-lx/static-img/code-inspector/wx-qrcode.jpg" width="200" height="272" />
|
|
387
|
+
</div>
|
|
388
|
+
|
|
389
|
+
## 💖 Sponsor
|
|
390
|
+
|
|
391
|
+
Sponsoring this project can help the author create better. If you are willing, you can sponsor me through Alipay or WeChatPay:
|
|
392
|
+
|
|
393
|
+
<div style="display: flex; column-gap: 16px; row-gap: 16px; flex-wrap: wrap;">
|
|
394
|
+
<img src="https://cdn.jsdelivr.net/gh/zh-lx/static-img/code-inspector/wxpay.jpg" width="200" height="272" />
|
|
395
|
+
<img src="https://cdn.jsdelivr.net/gh/zh-lx/static-img/code-inspector/alipay.jpg" width="180" height="272" />
|
|
396
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ht,Lt,Dt,Ot,Vt,Bt,vueInspectorClient=function(g){"use strict";var kt=Object.freeze,Rt=Object.defineProperty,ne=Object.defineProperties;var se=Object.getOwnPropertyDescriptors;var zt=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var Ut=(g,m,v)=>m in g?Rt(g,m,{enumerable:!0,configurable:!0,writable:!0,value:v}):g[m]=v,S=(g,m)=>{for(var v in m||(m={}))re.call(m,v)&&Ut(g,v,m[v]);if(zt)for(var v of zt(m))le.call(m,v)&&Ut(g,v,m[v]);return g},P=(g,m)=>ne(g,se(m));var U=(g,m)=>kt(Rt(g,"raw",{value:kt(m||g.slice())})),R=(g,m,v)=>new Promise((j,W)=>{var tt=_=>{try{M(v.next(_))}catch(H){W(H)}},et=_=>{try{M(v.throw(_))}catch(H){W(H)}},M=_=>_.done?j(_.value):Promise.resolve(_.value).then(tt,et);M((v=v.apply(g,m)).next())});const m=window,v=m.ShadowRoot&&(m.ShadyCSS===void 0||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,j=Symbol(),W=new WeakMap;let tt=class{constructor(o,t,e){if(this._$cssResult$=!0,e!==j)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=t}get styleSheet(){let o=this.o;const t=this.t;if(v&&o===void 0){const e=t!==void 0&&t.length===1;e&&(o=W.get(t)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),e&&W.set(t,o))}return o}toString(){return this.cssText}};const et=v?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(i=>new tt(typeof i=="string"?i:i+"",void 0,j))(e)})(o):o;var M;const _=window,H=_.trustedTypes,It=H?H.emptyScript:"",vt=_.reactiveElementPolyfillSupport,rt={toAttribute(o,t){switch(t){case Boolean:o=o?It:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(i){e=null}}return e}},gt=(o,t)=>t!==o&&(t==t||o==o),lt={attribute:!0,type:String,converter:rt,reflect:!1,hasChanged:gt};let L=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(o){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(o)}static get observedAttributes(){this.finalize();const o=[];return this.elementProperties.forEach((t,e)=>{const i=this._$Ep(e,t);i!==void 0&&(this._$Ev.set(i,e),o.push(i))}),o}static createProperty(o,t=lt){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(o,t),!t.noAccessor&&!this.prototype.hasOwnProperty(o)){const e=typeof o=="symbol"?Symbol():"__"+o,i=this.getPropertyDescriptor(o,e,t);i!==void 0&&Object.defineProperty(this.prototype,o,i)}}static getPropertyDescriptor(o,t,e){return{get(){return this[t]},set(i){const n=this[o];this[t]=i,this.requestUpdate(o,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)||lt}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const o=Object.getPrototypeOf(this);if(o.finalize(),o.h!==void 0&&(this.h=[...o.h]),this.elementProperties=new Map(o.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(o){const t=[];if(Array.isArray(o)){const e=new Set(o.flat(1/0).reverse());for(const i of e)t.unshift(et(i))}else o!==void 0&&t.push(et(o));return t}static _$Ep(o,t){const e=t.attribute;return e===!1?void 0:typeof e=="string"?e:typeof o=="string"?o.toLowerCase():void 0}u(){var o;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(o=this.constructor.h)===null||o===void 0||o.forEach(t=>t(this))}addController(o){var t,e;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(o),this.renderRoot!==void 0&&this.isConnected&&((e=o.hostConnected)===null||e===void 0||e.call(o))}removeController(o){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(o)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((o,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var o;const t=(o=this.shadowRoot)!==null&&o!==void 0?o:this.attachShadow(this.constructor.shadowRootOptions);return((e,i)=>{v?e.adoptedStyleSheets=i.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):i.forEach(n=>{const s=document.createElement("style"),r=m.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=n.cssText,e.appendChild(s)})})(t,this.constructor.elementStyles),t}connectedCallback(){var o;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(o=this._$ES)===null||o===void 0||o.forEach(t=>{var e;return(e=t.hostConnected)===null||e===void 0?void 0:e.call(t)})}enableUpdating(o){}disconnectedCallback(){var o;(o=this._$ES)===null||o===void 0||o.forEach(t=>{var e;return(e=t.hostDisconnected)===null||e===void 0?void 0:e.call(t)})}attributeChangedCallback(o,t,e){this._$AK(o,e)}_$EO(o,t,e=lt){var i;const n=this.constructor._$Ep(o,e);if(n!==void 0&&e.reflect===!0){const s=(((i=e.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?e.converter:rt).toAttribute(t,e.type);this._$El=o,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$El=null}}_$AK(o,t){var e;const i=this.constructor,n=i._$Ev.get(o);if(n!==void 0&&this._$El!==n){const s=i.getPropertyOptions(n),r=typeof s.converter=="function"?{fromAttribute:s.converter}:((e=s.converter)===null||e===void 0?void 0:e.fromAttribute)!==void 0?s.converter:rt;this._$El=n,this[n]=r.fromAttribute(t,s.type),this._$El=null}}requestUpdate(o,t,e){let i=!0;o!==void 0&&(((e=e||this.constructor.getPropertyOptions(o)).hasChanged||gt)(this[o],t)?(this._$AL.has(o)||this._$AL.set(o,t),e.reflect===!0&&this._$El!==o&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(o,e))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return R(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const o=this.scheduleUpdate();return o!=null&&(yield o),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,n)=>this[n]=i),this._$Ei=void 0);let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$ES)===null||o===void 0||o.forEach(i=>{var n;return(n=i.hostUpdate)===null||n===void 0?void 0:n.call(i)}),this.update(e)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(e)}willUpdate(o){}_$AE(o){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostUpdated)===null||i===void 0?void 0:i.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(o){return!0}update(o){this._$EC!==void 0&&(this._$EC.forEach((t,e)=>this._$EO(e,this[e],t)),this._$EC=void 0),this._$Ek()}updated(o){}firstUpdated(o){}};var ht;L.finalized=!0,L.elementProperties=new Map,L.elementStyles=[],L.shadowRootOptions={mode:"open"},vt==null||vt({ReactiveElement:L}),((M=_.reactiveElementVersions)!==null&&M!==void 0?M:_.reactiveElementVersions=[]).push("1.6.1");const it=window,D=it.trustedTypes,ft=D?D.createPolicy("lit-html",{createHTML:o=>o}):void 0,T="lit$".concat((Math.random()+"").slice(9),"$"),yt="?"+T,jt="<".concat(yt,">"),O=document,K=(o="")=>O.createComment(o),X=o=>o===null||typeof o!="object"&&typeof o!="function",$t=Array.isArray,Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bt=/-->/g,xt=/>/g,N=RegExp(">|[ \n\f\r](?:([^\\s\"'>=/]+)([ \n\f\r]*=[ \n\f\r]*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)","g"),wt=/'/g,_t=/"/g,At=/^(?:script|style|textarea|title)$/i,F=(o=>(t,...e)=>({_$litType$:o,strings:t,values:e}))(1),k=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),St=new WeakMap,V=O.createTreeWalker(O,129,null,!1),Wt=(o,t)=>{const e=o.length-1,i=[];let n,s=t===2?"<svg>":"",r=Y;for(let l=0;l<e;l++){const a=o[l];let x,p,u=-1,y=0;for(;y<a.length&&(r.lastIndex=y,p=r.exec(a),p!==null);)y=r.lastIndex,r===Y?p[1]==="!--"?r=bt:p[1]!==void 0?r=xt:p[2]!==void 0?(At.test(p[2])&&(n=RegExp("</"+p[2],"g")),r=N):p[3]!==void 0&&(r=N):r===N?p[0]===">"?(r=n!=null?n:Y,u=-1):p[1]===void 0?u=-2:(u=r.lastIndex-p[2].length,x=p[1],r=p[3]===void 0?N:p[3]==='"'?_t:wt):r===_t||r===wt?r=N:r===bt||r===xt?r=Y:(r=N,n=void 0);const w=r===N&&o[l+1].startsWith("/>")?" ":"";s+=r===Y?a+jt:u>=0?(i.push(x),a.slice(0,u)+"$lit$"+a.slice(u)+T+w):a+T+(u===-2?(i.push(void 0),l):w)}const h=s+(o[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return[ft!==void 0?ft.createHTML(h):h,i]};class q{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,r=0;const h=t.length-1,l=this.parts,[a,x]=Wt(t,e);if(this.el=q.createElement(a,i),V.currentNode=this.el.content,e===2){const p=this.el.content,u=p.firstChild;u.remove(),p.append(...u.childNodes)}for(;(n=V.nextNode())!==null&&l.length<h;){if(n.nodeType===1){if(n.hasAttributes()){const p=[];for(const u of n.getAttributeNames())if(u.endsWith("$lit$")||u.startsWith(T)){const y=x[r++];if(p.push(u),y!==void 0){const w=n.getAttribute(y.toLowerCase()+"$lit$").split(T),A=/([.?@])?(.*)/.exec(y);l.push({type:1,index:s,name:A[2],strings:w,ctor:A[1]==="."?Xt:A[1]==="?"?Ft:A[1]==="@"?qt:ot})}else l.push({type:6,index:s})}for(const u of p)n.removeAttribute(u)}if(At.test(n.tagName)){const p=n.textContent.split(T),u=p.length-1;if(u>0){n.textContent=D?D.emptyScript:"";for(let y=0;y<u;y++)n.append(p[y],K()),V.nextNode(),l.push({type:2,index:++s});n.append(p[u],K())}}}else if(n.nodeType===8)if(n.data===yt)l.push({type:2,index:s});else{let p=-1;for(;(p=n.data.indexOf(T,p+1))!==-1;)l.push({type:7,index:s}),p+=T.length-1}s++}}static createElement(t,e){const i=O.createElement("template");return i.innerHTML=t,i}}function B(o,t,e=o,i){var n,s,r,h;if(t===k)return t;let l=i!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[i]:e._$Cl;const a=X(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==a&&((s=l==null?void 0:l._$AO)===null||s===void 0||s.call(l,!1),a===void 0?l=void 0:(l=new a(o),l._$AT(o,e,i)),i!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=B(o,l._$AS(o,t.values),l,i)),t}class Kt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:n}=this._$AD,s=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:O).importNode(i,!0);V.currentNode=s;let r=V.nextNode(),h=0,l=0,a=n[0];for(;a!==void 0;){if(h===a.index){let x;a.type===2?x=new Z(r,r.nextSibling,this,t):a.type===1?x=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(x=new Zt(r,this,t)),this.u.push(x),a=n[++l]}h!==(a==null?void 0:a.index)&&(r=V.nextNode(),h++)}return s}p(t){let e=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Z{constructor(t,e,i,n){var s;this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cm=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),X(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==k&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):(i=>$t(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function")(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==f&&X(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=q.createElement(n.h,this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===s)this._$AH.p(i);else{const r=new Kt(s,this),h=r.v(this.options);r.p(i),this.T(h),this._$AH=r}}_$AC(t){let e=St.get(t.strings);return e===void 0&&St.set(t.strings,e=new q(t)),e}k(t){$t(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new Z(this.O(K()),this.O(K()),this,this.options)):i=e[n],i._$AI(s),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class ot{constructor(t,e,i,n,s){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=f}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let r=!1;if(s===void 0)t=B(this,t,e,0),r=!X(t)||t!==this._$AH&&t!==k,r&&(this._$AH=t);else{const h=t;let l,a;for(t=s[0],l=0;l<s.length-1;l++)a=B(this,h[i+l],e,l),a===k&&(a=this._$AH[l]),r||(r=!X(a)||a!==this._$AH[l]),a===f?t=f:t!==f&&(t+=(a!=null?a:"")+s[l+1]),this._$AH[l]=a}r&&!n&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Xt extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}}const Yt=D?D.emptyScript:"";class Ft extends ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==f?this.element.setAttribute(this.name,Yt):this.element.removeAttribute(this.name)}}class qt extends ot{constructor(t,e,i,n,s){super(t,e,i,n,s),this.type=5}_$AI(t,e=this){var i;if((t=(i=B(this,t,e,0))!==null&&i!==void 0?i:f)===k)return;const n=this._$AH,s=t===f&&n!==f||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==f&&(n===f||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Zt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const Et=it.litHtmlPolyfillSupport;Et==null||Et(q,Z),((ht=it.litHtmlVersions)!==null&&ht!==void 0?ht:it.litHtmlVersions=[]).push("2.6.1");var at,dt;class G extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((i,n,s)=>{var r,h;const l=(r=s==null?void 0:s.renderBefore)!==null&&r!==void 0?r:n;let a=l._$litPart$;if(a===void 0){const x=(h=s==null?void 0:s.renderBefore)!==null&&h!==void 0?h:null;l._$litPart$=a=new Z(n.insertBefore(K(),x),x,void 0,s!=null?s:{})}return a._$AI(i),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return k}}G.finalized=!0,G._$litElement$=!0,(at=globalThis.litElementHydrateSupport)===null||at===void 0||at.call(globalThis,{LitElement:G});const Ct=globalThis.litElementPolyfillSupport;Ct==null||Ct({LitElement:G}),((dt=globalThis.litElementVersions)!==null&&dt!==void 0?dt:globalThis.litElementVersions=[]).push("3.2.2");const Gt=(o,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?P(S({},t),{finisher(e){e.createProperty(t.key,o)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,o)}};function E(o){return(t,e)=>e!==void 0?((i,n,s)=>{n.constructor.createProperty(s,i)})(o,t,e):Gt(o,t)}function $(o){return E(P(S({},o),{state:!0}))}function I(o,t){return(({finisher:e,descriptor:i})=>(n,s)=>{var r;if(s===void 0){const h=(r=n.originalKey)!==null&&r!==void 0?r:n.key,l=i!=null?{kind:"method",placement:"prototype",key:h,descriptor:i(n.key)}:P(S({},n),{key:h});return e!=null&&(l.finisher=function(a){e(a,h)}),l}{const h=n.constructor;i!==void 0&&Object.defineProperty(n,s,i(s)),e==null||e(h,s)}})({descriptor:e=>{const i={get(){var n,s;return(s=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(o))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(t){const n=typeof e=="symbol"?Symbol():"__"+e;i.get=function(){var s,r;return this[n]===void 0&&(this[n]=(r=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(o))!==null&&r!==void 0?r:null),this[n]}}return i}})}var ct;(ct=window.HTMLSlotElement)===null||ct===void 0||ct.prototype.assignedElements;const Jt=1;let Qt=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,t,e){this._$Ct=o,this._$AM=t,this._$Ci=e}_$AS(o,t){return this.update(o,t)}update(o,t){return this.render(...t)}};const C=(o=>(...t)=>({_$litDirective$:o,values:t}))(class extends Qt{constructor(o){var t;if(super(o),o.type!==Jt||o.name!=="style"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{const i=o[e];return i==null?t:t+"".concat(e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")},"")}update(o,[t]){const{style:e}=o.element;if(this.vt===void 0){this.vt=new Set;for(const i in t)this.vt.add(i);return this.render(t)}this.vt.forEach(i=>{t[i]==null&&(this.vt.delete(i),i.includes("-")?e.removeProperty(i):e[i]="")});for(const i in t){const n=t[i];n!=null&&(this.vt.add(i),i.includes("-")?e.setProperty(i,n):e[i]=n)}return k}}),nt="data-insp-path";var te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,c=(o,t,e,i)=>{for(var n,s=i>1?void 0:i?ee(t,e):t,r=o.length-1;r>=0;r--)(n=o[r])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&te(t,e,s),s};const pt="__code-inspector-unique-id",ie={ctrlKey:"^control",altKey:"⌥option",metaKey:"⌘command",shiftKey:"shift"},oe={ctrlKey:"Ctrl",altKey:"Alt",metaKey:"⊞Windows",shiftKey:"Shift"},J=300;function Tt(){return new Promise(o=>{requestAnimationFrame(o)})}class d extends G{constructor(){super(...arguments),this.hotKeys="shiftKey,altKey",this.port=5678,this.showSwitch=!1,this.autoToggle=!1,this.hideConsole=!1,this.targetNode=null,this.ip="localhost",this.serverEnabled=!0,this.wheelThrottling=!1,this.position={top:0,right:0,bottom:0,left:0,padding:{top:0,right:0,bottom:0,left:0},border:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0}},this.element={name:"",line:0,column:0,path:""},this.elementTipStyle={vertical:"",horizon:"",visibility:""},this.show=!1,this.showNodeTree=!1,this.nodeTreePosition={},this.nodeTree=null,this.dragging=!1,this.mousePosition={baseX:0,baseY:0,moveX:0,moveY:0},this.draggingTarget="switch",this.open=!1,this.moved=!1,this.hoverSwitch=!1,this.preUserSelect="",this.sendType="xhr",this.activeNode={},this.eventListeners=[],this.isTracking=t=>this.hotKeys&&this.hotKeys.split(",").every(e=>t[e.trim()]),this.getDomPropertyValue=(t,e)=>{const i=window.getComputedStyle(t);return Number(i.getPropertyValue(e).replace("px",""))},this.calculateElementInfoPosition=t=>R(this,null,function*(){var Mt,Nt;const{top:e,right:i,bottom:n,left:s}=t.getBoundingClientRect(),r=document.documentElement.clientHeight,h=document.documentElement.clientWidth,l=this.getDomPropertyValue(t,"margin-top"),a=this.getDomPropertyValue(t,"margin-right"),x=this.getDomPropertyValue(t,"margin-bottom"),p=this.getDomPropertyValue(t,"margin-left");yield Tt();const{width:u,height:y}=this.elementInfoRef.getBoundingClientRect(),w=e-l,A=i+a,st=n+x,Q=s-p,ut=[{vertical:"element-info-bottom",horizon:"element-info-right",top:st,left:Q,isExternal:!0},{vertical:"element-info-bottom",horizon:"element-info-left",top:st,left:A-u,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-right",top:w-y,left:Q,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-left",top:w-y,left:A-u,isExternal:!0},{vertical:"element-info-bottom-inner",horizon:"element-info-right",top:st-y,left:Q,isExternal:!1},{vertical:"element-info-bottom-inner",horizon:"element-info-left",top:st-y,left:A-u,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-right",top:w,left:Q,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:w,left:A-u,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:Math.max(0,w),left:A-u,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-w),"px)")}},{vertical:"element-info-top-inner",horizon:"element-info-right",top:Math.max(0,w),left:A-u,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-w),"px)")}}],Pt=b=>b.left<0||b.left+u>h||b.top<0||b.top+y>r;for(const b of ut)if(!Pt(b)&&b.isExternal)return b;for(const b of ut){const mt=S({},b);if(b.horizon.endsWith("right")){const z=Q+u-h;z>0&&(b.additionStyle={transform:"translateX(-".concat(z+4,"px) ").concat(((Mt=b.additionStyle)==null?void 0:Mt.transform)||"")},mt.left-=z+4)}else{const z=u-A;z>0&&(b.additionStyle={transform:"translateX(".concat(z+4,"px) ").concat(((Nt=b.additionStyle)==null?void 0:Nt.transform)||"")},mt.left+=z+4)}if(!Pt(mt))return b}return ut[0]}),this.renderCover=t=>R(this,null,function*(){if(t===this.targetNode)return;this.targetNode=t;const{top:e,right:i,bottom:n,left:s}=t.getBoundingClientRect();if(this.position={top:e,right:i,bottom:n,left:s,border:{top:this.getDomPropertyValue(t,"border-top-width"),right:this.getDomPropertyValue(t,"border-right-width"),bottom:this.getDomPropertyValue(t,"border-bottom-width"),left:this.getDomPropertyValue(t,"border-left-width")},padding:{top:this.getDomPropertyValue(t,"padding-top"),right:this.getDomPropertyValue(t,"padding-right"),bottom:this.getDomPropertyValue(t,"padding-bottom"),left:this.getDomPropertyValue(t,"padding-left")},margin:{top:this.getDomPropertyValue(t,"margin-top"),right:this.getDomPropertyValue(t,"margin-right"),bottom:this.getDomPropertyValue(t,"margin-bottom"),left:this.getDomPropertyValue(t,"margin-left")}},this.elementTipStyle={vertical:"",horizon:"",visibility:"hidden"},this.addGlobalCursorStyle(),this.preUserSelect||(this.preUserSelect=getComputedStyle(document.body).userSelect),document.body.style.userSelect="none",this.element=this.getSourceInfo(t),this.show=!0,!this.showNodeTree){const{vertical:r,horizon:h,additionStyle:l}=yield this.calculateElementInfoPosition(t);this.elementTipStyle={vertical:r,horizon:h,visibility:"visible",additionStyle:l}}}),this.getSourceInfo=t=>{var h;let e=((h=t.getAttribute)==null?void 0:h.call(t,nt))||t[nt];if(!e)return null;const i=e.split(":"),n=i[i.length-1],s=Number(i[i.length-2]),r=Number(i[i.length-3]);return{name:n,path:i.slice(0,i.length-3).join(":"),line:r,column:s}},this.removeCover=t=>{t!==!0&&this.nodeTree||(this.targetNode=null,this.show=!1,this.removeGlobalCursorStyle(),document.body.style.userSelect=this.preUserSelect,this.preUserSelect="")},this.renderLayerPanel=(t,{x:e,y:i})=>{const n=document.documentElement.clientWidth,s=document.documentElement.clientHeight,r=n-e,h=s-i;let l={};r<e?(l.right=r+"px",e<J&&(l.transform="translateX(".concat(J-e,"px)"))):(l.left=e+"px",r<J&&(l.transform="translateX(-".concat(J-r,"px)"))),h<i?(l.bottom=h+"px",l.maxHeight=i-10+"px"):(l.top=i+"px",l.maxHeight=s-i-10+"px"),this.nodeTreePosition=l,this.nodeTree=t,this.showNodeTree=!0},this.removeLayerPanel=()=>{this.showNodeTree=!1,this.nodeTree=null,this.activeNode={}},this.addGlobalCursorStyle=()=>{if(!document.getElementById(pt)){const t=document.createElement("style");t.setAttribute("id",pt),t.innerText="body * {\n cursor: pointer !important;\n }",document.body.appendChild(t)}},this.removeGlobalCursorStyle=()=>{const t=document.getElementById(pt);t&&t.remove()},this.buildRequestUrl=()=>{const t=encodeURIComponent(this.element.path),e=encodeURIComponent(this.element.name);return"http://".concat(this.ip,":").concat(this.port,"/?file=").concat(t,"&line=").concat(this.element.line,"&column=").concat(this.element.column,"&name=").concat(e)},this.sendXHR=()=>{const t=new XMLHttpRequest;t.open("GET",this.buildRequestUrl(),!0),t.addEventListener("load",()=>{t.status>=200&&t.status<300?this.showNotification("✓ Copied code location"):this.showNotification(t.responseText||"Failed to copy code location","error")}),t.addEventListener("error",()=>{this.sendType="img",this.sendImg()}),t.send()},this.sendImg=()=>{document.createElement("img").src=this.buildRequestUrl(),this.showNotification("Copy request sent")},this.trackCode=()=>{this.serverEnabled?this.sendType==="xhr"?this.sendXHR():this.sendImg():this.showNotification("Clipboard server is disabled","error"),window.dispatchEvent(new CustomEvent("code-inspector:trackCode",{detail:this.element}))},this.handleDrag=t=>{if(t.composedPath().includes(this)?this.hoverSwitch=!0:this.hoverSwitch=!1,this.dragging){this.moved=!0;const e=this.draggingTarget==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;return e.style.left=this.mousePosition.baseX+(this.getMousePosition(t).x-this.mousePosition.moveX)+"px",e.style.top=this.mousePosition.baseY+(this.getMousePosition(t).y-this.mousePosition.moveY)+"px",void(this.draggingTarget&&(this.nodeTreePosition.left=e.style.left,this.nodeTreePosition.top=e.style.top))}},this.getValidNodeList=t=>{const e=[];for(const i of t)(i.hasAttribute&&i.hasAttribute(nt)||i[nt])&&e.push(i);return e},this.isSamePositionNode=(t,e)=>{const i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top===n.top&&i.left===n.left&&i.right===n.right&&i.bottom===n.bottom},this.handleMouseMove=t=>R(this,null,function*(){if((this.isTracking(t)&&!this.dragging||this.open)&&!this.hoverSwitch){const e=t.composedPath(),i=this.getValidNodeList(e);let n;for(const s of i)n?this.isSamePositionNode(n,s)&&(n=s):n=s;n?this.renderCover(n):this.removeCover()}else this.removeCover()}),this.handleWheel=t=>{if(!this.targetNode||(t.stopPropagation(),t.preventDefault(),this.wheelThrottling))return;this.wheelThrottling=!0;const e=t.composedPath(),i=this.getValidNodeList(e);let n=i.findIndex(r=>r===this.targetNode);if(n===-1)return void(this.wheelThrottling=!1);const s=t.deltaX||t.deltaY;s>0?n--:s<0&&n++,n>=0&&n<i.length&&this.renderCover(i[n]),setTimeout(()=>{this.wheelThrottling=!1},200)},this.handleMouseClick=t=>{(this.isTracking(t)||this.open)&&this.show&&(t.stopPropagation(),t.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1)),t.composedPath().includes(this.nodeTreeRef)||this.removeLayerPanel()},this.handleContextMenu=t=>{if((this.isTracking(t)&&!this.dragging||this.open)&&!this.hoverSwitch){t.preventDefault();const e=t.composedPath(),i=this.generateNodeTree(e);this.renderLayerPanel(i,{x:t.clientX,y:t.clientY})}},this.generateNodeTree=t=>{let e,i=1,n=null;for(const s of t.reverse()){const r=this.getSourceInfo(s);if(!r)continue;const h=P(S({},r),{children:[],depth:i++,element:s});n?n.children.push(h):e=h,n=h}return e},this.handlePointerDown=t=>{let e=!1,i=t.target;for(;i;){if(i.disabled){e=!0;break}i=i.parentElement}e&&(this.isTracking(t)||this.open)&&this.show&&(t.stopPropagation(),t.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1))},this.handleKeyUp=t=>{this.isTracking(t)||this.open||this.removeCover()},this.printTip=()=>{const t=navigator.userAgent.toLowerCase(),e=["windows","win32","wow32","win64","wow64"].some(l=>t.toUpperCase().match(l.toUpperCase()))?oe:ie,i="%c",n=this.hotKeys.split(",").map(l=>i+e[l.trim()]),s=2*n.length+1,r=Array(s).fill("").map((l,a)=>a%2==0?"color: #00B42A; font-family: PingFang SC; font-size: 12px;":"color: #006aff; font-weight: bold; font-family: PingFang SC; font-size: 12px;"),h=["".concat(i,"[simple-code-inspector-plugin]"),"".concat(i,"• Press and hold ").concat(n.join(" ".concat(i,"+ "))," ").concat(i,"and click the DOM to copy its source code location.")].join("\n");console.log(h,"color: #006aff; font-weight: bolder; font-size: 12px;",...r)},this.getMousePosition=t=>{var e,i;return{x:t instanceof MouseEvent?t.pageX:(e=t.touches[0])==null?void 0:e.pageX,y:t instanceof MouseEvent?t.pageY:(i=t.touches[0])==null?void 0:i.pageY}},this.recordMousePosition=(t,e)=>{const i=e==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;this.mousePosition={baseX:i.offsetLeft,baseY:i.offsetTop,moveX:this.getMousePosition(t).x,moveY:this.getMousePosition(t).y},this.dragging=!0,this.draggingTarget=e,t.preventDefault()},this.handleMouseUp=t=>{this.hoverSwitch=!1,this.dragging&&(this.dragging=!1,t instanceof TouchEvent&&this.draggingTarget==="switch"&&this.switch(t))},this.switch=t=>{this.moved||(this.open=!this.open,t.preventDefault(),t.stopPropagation()),this.moved=!1},this.handleClickTreeNode=t=>{this.element=t,this.trackCode(),this.removeLayerPanel()},this.handleMouseEnterNode=(t,e)=>R(this,null,function*(){const{x:i,y:n,width:s,height:r}=t.target.getBoundingClientRect();this.activeNode={width:s-16+"px",left:i+8+"px",visibility:"hidden",top:n-4+"px",bottom:"",content:"".concat(e.path,":").concat(e.line,":").concat(e.column),class:"tooltip-top"},this.renderCover(e.element),yield Tt();const{y:h}=this.nodeTreeTooltipRef.getBoundingClientRect();h<0&&(this.activeNode=P(S({},this.activeNode),{bottom:"",top:"".concat(n+r+4,"px"),class:"tooltip-bottom"})),this.activeNode=P(S({},this.activeNode),{visibility:"visible"})}),this.handleMouseLeaveNode=()=>{this.activeNode=P(S({},this.activeNode),{visibility:"hidden"}),this.removeCover(!0)},this.renderNodeTree=t=>F(Ht||(Ht=U(['\n <div\n class="inspector-layer"\n style="padding-left: ','px;"\n @mouseenter="','"\n @mouseleave="','"\n @click="','"\n >\n <',">\n </div>\n ","\n "])),8*t.depth,e=>R(this,null,function*(){return yield this.handleMouseEnterNode(e,t)}),this.handleMouseLeaveNode,()=>this.handleClickTreeNode(t),t.name,t.children.map(e=>this.renderNodeTree(e)))}showNotification(t,e="success"){const i=document.createElement("div");i.className="code-inspector-notification code-inspector-notification-".concat(e),i.textContent=t,document.body.appendChild(i),requestAnimationFrame(()=>{i.classList.add("code-inspector-notification-show")}),setTimeout(()=>{i.classList.remove("code-inspector-notification-show"),setTimeout(()=>{document.body.removeChild(i)},300)},2e3)}attachEventListeners(){this.eventListeners.forEach(({event:t,handler:e,options:i})=>{window.addEventListener(t,e,i)})}detachEventListeners(){this.eventListeners.forEach(({event:t,handler:e,options:i})=>{window.removeEventListener(t,e,i)})}firstUpdated(){this.eventListeners=[{event:"mousemove",handler:this.handleMouseMove,options:!0},{event:"touchmove",handler:this.handleMouseMove,options:!0},{event:"mousemove",handler:this.handleDrag,options:!0},{event:"touchmove",handler:this.handleDrag,options:!0},{event:"click",handler:this.handleMouseClick,options:!0},{event:"pointerdown",handler:this.handlePointerDown,options:!0},{event:"keyup",handler:this.handleKeyUp,options:!0},{event:"mouseleave",handler:this.removeCover,options:!0},{event:"mouseup",handler:this.handleMouseUp,options:!0},{event:"touchend",handler:this.handleMouseUp,options:!0},{event:"contextmenu",handler:this.handleContextMenu,options:!0},{event:"wheel",handler:this.handleWheel,options:{passive:!1}}],this.hideConsole||this.printTip(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}render(){const t={display:this.show?"block":"none",top:this.position.top-this.position.margin.top+"px",left:this.position.left-this.position.margin.left+"px",height:"".concat(this.position.bottom-this.position.top+this.position.margin.bottom+this.position.margin.top,"px"),width:"".concat(this.position.right-this.position.left+this.position.margin.right+this.position.margin.left,"px")},e={borderTopWidth:"".concat(this.position.margin.top,"px"),borderRightWidth:"".concat(this.position.margin.right,"px"),borderBottomWidth:"".concat(this.position.margin.bottom,"px"),borderLeftWidth:"".concat(this.position.margin.left,"px")},i={borderTopWidth:"".concat(this.position.border.top,"px"),borderRightWidth:"".concat(this.position.border.right,"px"),borderBottomWidth:"".concat(this.position.border.bottom,"px"),borderLeftWidth:"".concat(this.position.border.left,"px")},n={borderTopWidth:"".concat(this.position.padding.top,"px"),borderRightWidth:"".concat(this.position.padding.right,"px"),borderBottomWidth:"".concat(this.position.padding.bottom,"px"),borderLeftWidth:"".concat(this.position.padding.left,"px")},s=S({display:this.showNodeTree?"flex":"none"},this.nodeTreePosition),r={visibility:this.activeNode.visibility,maxWidth:this.activeNode.width,top:this.activeNode.top,left:this.activeNode.left,bottom:this.activeNode.bottom,display:this.showNodeTree?"":"none"};return F(Vt||(Vt=U(['\n <div\n class="code-inspector-container"\n id="code-inspector-container"\n style=','\n >\n <div class="margin-overlay" style=','>\n <div class="border-overlay" style=','>\n <div class="padding-overlay" style=','>\n <div class="content-overlay"></div>\n </div>\n </div>\n </div>\n <div\n id="element-info"\n class="element-info '," "," ",'"\n style=','\n >\n <div class="element-info-content">\n <div class="name-line">\n <div class="element-name">\n <span class="element-title"><','></span>\n </div>\n </div>\n <div class="path-line">\n ',":",":",'\n </div>\n </div>\n </div>\n </div>\n <div\n id="inspector-switch"\n class="inspector-switch '," ",'"\n style=','\n @mousedown="','"\n @touchstart="','"\n @click="','"\n >\n ','\n </div>\n <div\n id="inspector-node-tree"\n class="element-info-content"\n style=','\n >\n <div\n class="inspector-layer-title"\n @mousedown="','"\n @touchstart="','"\n >\n <div>🔍️ Click node to locate</div>\n ','\n </div>\n\n <div\n class="node-tree-list"\n style="','"\n >\n ','\n <div style="height: 8px"></div>\n </div>\n </div>\n\n <div\n id="node-tree-tooltip"\n class="','"\n style=',"\n >\n ","\n </div>\n "])),C(t),C(e),C(i),C(n),this.elementTipStyle.vertical,this.elementTipStyle.horizon,this.elementTipStyle.visibility,C(S({width:J+"px",maxWidth:"100vw"},this.elementTipStyle.additionStyle)),this.element.name,this.element.path,this.element.line,this.element.column,this.open?"active-inspector-switch":"",this.moved?"move-inspector-switch":"",C({display:this.showSwitch?"flex":"none"}),h=>this.recordMousePosition(h,"switch"),h=>this.recordMousePosition(h,"switch"),this.switch,this.open?F(Lt||(Lt=U(['\n <svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="#34495E"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#00B42A"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F7BA1E"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F53F3F"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="#006AFF"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="#34495E"\n p-id="1116"\n ></path>\n </svg>\n ']))):F(Dt||(Dt=U(['<svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="currentColor"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="currentColor"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="currentColor"\n p-id="1116"\n ></path>\n </svg>']))),C(s),h=>this.recordMousePosition(h,"nodeTree"),h=>this.recordMousePosition(h,"nodeTree"),F(Ot||(Ot=U(['<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16"\n height="16"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="close-icon"\n @click="','"\n >\n <path d="M18 6 6 18" />\n <path d="m6 6 12 12" />\n </svg>'])),this.removeLayerPanel),C({pointerEvents:this.dragging?"none":""}),this.nodeTree?this.renderNodeTree(this.nodeTree):"",this.activeNode.class,C(r),this.activeNode.content)}}if(d.styles=((o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,n,s)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[s+1],o[0]);return new tt(e,o,j)})(Bt||(Bt=U(["\n .code-inspector-container {\n position: fixed;\n pointer-events: none;\n z-index: 9999999999999;\n font-family: 'PingFang SC';\n .margin-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 155, 0, 0.3);\n .border-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 200, 50, 0.3);\n .padding-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(77, 200, 0, 0.3);\n .content-overlay {\n position: absolute;\n inset: 0;\n background: rgba(120, 170, 210, 0.7);\n }\n }\n }\n }\n }\n .element-info {\n position: absolute;\n }\n .element-info.hidden {\n visibility: hidden;\n }\n .element-info-content {\n max-width: 100%;\n font-size: 12px;\n color: #000;\n background-color: #fff;\n word-break: break-all;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);\n box-sizing: border-box;\n padding: 4px 8px;\n border-radius: 4px;\n }\n .element-info-top {\n top: -4px;\n transform: translateY(-100%);\n }\n .element-info-bottom {\n top: calc(100% + 4px);\n }\n .element-info-top-inner {\n top: 4px;\n }\n .element-info-bottom-inner {\n bottom: 4px;\n }\n .element-info-left {\n right: 0;\n display: flex;\n justify-content: flex-end;\n }\n .element-info-right {\n left: 0;\n display: flex;\n justify-content: flex-start;\n }\n .element-name .element-title {\n color: coral;\n font-weight: bold;\n }\n .path-line {\n color: #333;\n line-height: 12px;\n margin-top: 4px;\n }\n .inspector-switch {\n position: fixed;\n z-index: 9999999999999;\n top: 50%;\n right: 24px;\n font-size: 22px;\n transform: translateY(-100%);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.8);\n color: #555;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n box-shadow: 0px 1px 2px -2px rgba(0, 0, 0, 0.2),\n 0px 3px 6px 0px rgba(0, 0, 0, 0.16),\n 0px 5px 12px 4px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n }\n .active-inspector-switch {\n color: #006aff;\n }\n .move-inspector-switch {\n cursor: move;\n }\n #inspector-node-tree {\n position: fixed;\n user-select: none;\n z-index: 9999999999999999;\n min-width: 300px;\n max-width: min(max(30vw, 300px), 400px);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n display: flex;\n flex-direction: column;\n padding: 0;\n\n .inspector-layer-title {\n border-bottom: 1px solid #eee;\n padding: 8px 8px 4px;\n margin-bottom: 8px;\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: move;\n user-select: none;\n &:hover {\n background: rgba(0, 106, 255, 0.1);\n }\n }\n\n .node-tree-list {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n }\n\n .inspector-layer {\n cursor: pointer;\n position: relative;\n padding-right: 8px;\n &:hover {\n background: #fdf4bf;\n }\n }\n\n .path-line {\n font-size: 9px;\n color: #777;\n margin-top: 1px;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n }\n }\n\n #node-tree-tooltip {\n position: fixed;\n box-sizing: border-box;\n z-index: 999999999999999999;\n background: rgba(0, 0, 0, 0.6);\n color: white;\n padding: 2px 6px;\n border-radius: 4px;\n font-size: 12px;\n white-space: wrap;\n pointer-events: none;\n word-break: break-all;\n }\n .tooltip-top {\n transform: translateY(-100%);\n }\n .close-icon {\n cursor: pointer;\n }\n\n "]))),c([E()],d.prototype,"hotKeys",2),c([E()],d.prototype,"port",2),c([E()],d.prototype,"showSwitch",2),c([E()],d.prototype,"autoToggle",2),c([E()],d.prototype,"hideConsole",2),c([E()],d.prototype,"targetNode",2),c([E()],d.prototype,"ip",2),c([E()],d.prototype,"serverEnabled",2),c([$()],d.prototype,"position",2),c([$()],d.prototype,"element",2),c([$()],d.prototype,"elementTipStyle",2),c([$()],d.prototype,"show",2),c([$()],d.prototype,"showNodeTree",2),c([$()],d.prototype,"nodeTreePosition",2),c([$()],d.prototype,"nodeTree",2),c([$()],d.prototype,"dragging",2),c([$()],d.prototype,"mousePosition",2),c([$()],d.prototype,"draggingTarget",2),c([$()],d.prototype,"open",2),c([$()],d.prototype,"moved",2),c([$()],d.prototype,"hoverSwitch",2),c([$()],d.prototype,"preUserSelect",2),c([$()],d.prototype,"sendType",2),c([$()],d.prototype,"activeNode",2),c([I("#inspector-switch")],d.prototype,"inspectorSwitchRef",2),c([I("#code-inspector-container")],d.prototype,"codeInspectorContainerRef",2),c([I("#element-info")],d.prototype,"elementInfoRef",2),c([I("#inspector-node-tree")],d.prototype,"nodeTreeRef",2),c([I(".inspector-layer-title")],d.prototype,"nodeTreeTitleRef",2),c([I("#node-tree-tooltip")],d.prototype,"nodeTreeTooltipRef",2),!document.getElementById("code-inspector-notification-styles")){const o=document.createElement("style");o.id="code-inspector-notification-styles",o.textContent="\n .code-inspector-notification {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 99999999999999999;\n padding: 12px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-weight: 500;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n opacity: 0;\n transform: translateY(-10px);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n pointer-events: none;\n }\n .code-inspector-notification-success {\n background: hsl(143, 85%, 96%);\n color: hsl(140, 100%, 27%);\n border: 1px solid hsl(145, 92%, 91%);\n }\n .code-inspector-notification-error {\n background: hsl(0, 93%, 94%);\n color: hsl(0, 84%, 40%);\n border: 1px solid hsl(0, 93%, 94%);\n }\n .code-inspector-notification-show {\n opacity: 1;\n transform: translateY(0);\n }\n ",document.head.appendChild(o)}return customElements.get("code-inspector-component")||customElements.define("code-inspector-component",d),g.CodeInspectorComponent=d,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),g}({});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(v,m){typeof exports=="object"&&typeof module!="undefined"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):m((v=typeof globalThis!="undefined"?globalThis:v||self).vueInspectorClient={})})(this,function(v){"use strict";var kt=Object.freeze,Rt=Object.defineProperty,ne=Object.defineProperties;var se=Object.getOwnPropertyDescriptors;var zt=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var Ut=(v,m,f)=>m in v?Rt(v,m,{enumerable:!0,configurable:!0,writable:!0,value:f}):v[m]=f,S=(v,m)=>{for(var f in m||(m={}))re.call(m,f)&&Ut(v,f,m[f]);if(zt)for(var f of zt(m))le.call(m,f)&&Ut(v,f,m[f]);return v},P=(v,m)=>ne(v,se(m));var U=(v,m)=>kt(Rt(v,"raw",{value:kt(m||v.slice())})),R=(v,m,f)=>new Promise((j,W)=>{var tt=_=>{try{M(f.next(_))}catch(H){W(H)}},et=_=>{try{M(f.throw(_))}catch(H){W(H)}},M=_=>_.done?j(_.value):Promise.resolve(_.value).then(tt,et);M((f=f.apply(v,m)).next())});var Ht,Lt,Dt,Ot,Vt,Bt;const m=window,f=m.ShadowRoot&&(m.ShadyCSS===void 0||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,j=Symbol(),W=new WeakMap;let tt=class{constructor(o,t,e){if(this._$cssResult$=!0,e!==j)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=t}get styleSheet(){let o=this.o;const t=this.t;if(f&&o===void 0){const e=t!==void 0&&t.length===1;e&&(o=W.get(t)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),e&&W.set(t,o))}return o}toString(){return this.cssText}};const et=f?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(i=>new tt(typeof i=="string"?i:i+"",void 0,j))(e)})(o):o;var M;const _=window,H=_.trustedTypes,It=H?H.emptyScript:"",vt=_.reactiveElementPolyfillSupport,rt={toAttribute(o,t){switch(t){case Boolean:o=o?It:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(i){e=null}}return e}},ft=(o,t)=>t!==o&&(t==t||o==o),lt={attribute:!0,type:String,converter:rt,reflect:!1,hasChanged:ft};let L=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(o){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(o)}static get observedAttributes(){this.finalize();const o=[];return this.elementProperties.forEach((t,e)=>{const i=this._$Ep(e,t);i!==void 0&&(this._$Ev.set(i,e),o.push(i))}),o}static createProperty(o,t=lt){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(o,t),!t.noAccessor&&!this.prototype.hasOwnProperty(o)){const e=typeof o=="symbol"?Symbol():"__"+o,i=this.getPropertyDescriptor(o,e,t);i!==void 0&&Object.defineProperty(this.prototype,o,i)}}static getPropertyDescriptor(o,t,e){return{get(){return this[t]},set(i){const n=this[o];this[t]=i,this.requestUpdate(o,n,e)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)||lt}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const o=Object.getPrototypeOf(this);if(o.finalize(),o.h!==void 0&&(this.h=[...o.h]),this.elementProperties=new Map(o.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(o){const t=[];if(Array.isArray(o)){const e=new Set(o.flat(1/0).reverse());for(const i of e)t.unshift(et(i))}else o!==void 0&&t.push(et(o));return t}static _$Ep(o,t){const e=t.attribute;return e===!1?void 0:typeof e=="string"?e:typeof o=="string"?o.toLowerCase():void 0}u(){var o;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(o=this.constructor.h)===null||o===void 0||o.forEach(t=>t(this))}addController(o){var t,e;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(o),this.renderRoot!==void 0&&this.isConnected&&((e=o.hostConnected)===null||e===void 0||e.call(o))}removeController(o){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(o)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((o,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var o;const t=(o=this.shadowRoot)!==null&&o!==void 0?o:this.attachShadow(this.constructor.shadowRootOptions);return((e,i)=>{f?e.adoptedStyleSheets=i.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):i.forEach(n=>{const s=document.createElement("style"),r=m.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=n.cssText,e.appendChild(s)})})(t,this.constructor.elementStyles),t}connectedCallback(){var o;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(o=this._$ES)===null||o===void 0||o.forEach(t=>{var e;return(e=t.hostConnected)===null||e===void 0?void 0:e.call(t)})}enableUpdating(o){}disconnectedCallback(){var o;(o=this._$ES)===null||o===void 0||o.forEach(t=>{var e;return(e=t.hostDisconnected)===null||e===void 0?void 0:e.call(t)})}attributeChangedCallback(o,t,e){this._$AK(o,e)}_$EO(o,t,e=lt){var i;const n=this.constructor._$Ep(o,e);if(n!==void 0&&e.reflect===!0){const s=(((i=e.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?e.converter:rt).toAttribute(t,e.type);this._$El=o,s==null?this.removeAttribute(n):this.setAttribute(n,s),this._$El=null}}_$AK(o,t){var e;const i=this.constructor,n=i._$Ev.get(o);if(n!==void 0&&this._$El!==n){const s=i.getPropertyOptions(n),r=typeof s.converter=="function"?{fromAttribute:s.converter}:((e=s.converter)===null||e===void 0?void 0:e.fromAttribute)!==void 0?s.converter:rt;this._$El=n,this[n]=r.fromAttribute(t,s.type),this._$El=null}}requestUpdate(o,t,e){let i=!0;o!==void 0&&(((e=e||this.constructor.getPropertyOptions(o)).hasChanged||ft)(this[o],t)?(this._$AL.has(o)||this._$AL.set(o,t),e.reflect===!0&&this._$El!==o&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(o,e))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}_$Ej(){return R(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const o=this.scheduleUpdate();return o!=null&&(yield o),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,n)=>this[n]=i),this._$Ei=void 0);let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$ES)===null||o===void 0||o.forEach(i=>{var n;return(n=i.hostUpdate)===null||n===void 0?void 0:n.call(i)}),this.update(e)):this._$Ek()}catch(i){throw t=!1,this._$Ek(),i}t&&this._$AE(e)}willUpdate(o){}_$AE(o){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostUpdated)===null||i===void 0?void 0:i.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(o){return!0}update(o){this._$EC!==void 0&&(this._$EC.forEach((t,e)=>this._$EO(e,this[e],t)),this._$EC=void 0),this._$Ek()}updated(o){}firstUpdated(o){}};var ht;L.finalized=!0,L.elementProperties=new Map,L.elementStyles=[],L.shadowRootOptions={mode:"open"},vt==null||vt({ReactiveElement:L}),((M=_.reactiveElementVersions)!==null&&M!==void 0?M:_.reactiveElementVersions=[]).push("1.6.1");const it=window,D=it.trustedTypes,gt=D?D.createPolicy("lit-html",{createHTML:o=>o}):void 0,T="lit$".concat((Math.random()+"").slice(9),"$"),yt="?"+T,jt="<".concat(yt,">"),O=document,K=(o="")=>O.createComment(o),X=o=>o===null||typeof o!="object"&&typeof o!="function",$t=Array.isArray,Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bt=/-->/g,xt=/>/g,N=RegExp(">|[ \n\f\r](?:([^\\s\"'>=/]+)([ \n\f\r]*=[ \n\f\r]*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)","g"),wt=/'/g,_t=/"/g,At=/^(?:script|style|textarea|title)$/i,F=(o=>(t,...e)=>({_$litType$:o,strings:t,values:e}))(1),k=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),St=new WeakMap,V=O.createTreeWalker(O,129,null,!1),Wt=(o,t)=>{const e=o.length-1,i=[];let n,s=t===2?"<svg>":"",r=Y;for(let l=0;l<e;l++){const a=o[l];let x,p,u=-1,y=0;for(;y<a.length&&(r.lastIndex=y,p=r.exec(a),p!==null);)y=r.lastIndex,r===Y?p[1]==="!--"?r=bt:p[1]!==void 0?r=xt:p[2]!==void 0?(At.test(p[2])&&(n=RegExp("</"+p[2],"g")),r=N):p[3]!==void 0&&(r=N):r===N?p[0]===">"?(r=n!=null?n:Y,u=-1):p[1]===void 0?u=-2:(u=r.lastIndex-p[2].length,x=p[1],r=p[3]===void 0?N:p[3]==='"'?_t:wt):r===_t||r===wt?r=N:r===bt||r===xt?r=Y:(r=N,n=void 0);const w=r===N&&o[l+1].startsWith("/>")?" ":"";s+=r===Y?a+jt:u>=0?(i.push(x),a.slice(0,u)+"$lit$"+a.slice(u)+T+w):a+T+(u===-2?(i.push(void 0),l):w)}const h=s+(o[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return[gt!==void 0?gt.createHTML(h):h,i]};class q{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let s=0,r=0;const h=t.length-1,l=this.parts,[a,x]=Wt(t,e);if(this.el=q.createElement(a,i),V.currentNode=this.el.content,e===2){const p=this.el.content,u=p.firstChild;u.remove(),p.append(...u.childNodes)}for(;(n=V.nextNode())!==null&&l.length<h;){if(n.nodeType===1){if(n.hasAttributes()){const p=[];for(const u of n.getAttributeNames())if(u.endsWith("$lit$")||u.startsWith(T)){const y=x[r++];if(p.push(u),y!==void 0){const w=n.getAttribute(y.toLowerCase()+"$lit$").split(T),A=/([.?@])?(.*)/.exec(y);l.push({type:1,index:s,name:A[2],strings:w,ctor:A[1]==="."?Xt:A[1]==="?"?Ft:A[1]==="@"?qt:ot})}else l.push({type:6,index:s})}for(const u of p)n.removeAttribute(u)}if(At.test(n.tagName)){const p=n.textContent.split(T),u=p.length-1;if(u>0){n.textContent=D?D.emptyScript:"";for(let y=0;y<u;y++)n.append(p[y],K()),V.nextNode(),l.push({type:2,index:++s});n.append(p[u],K())}}}else if(n.nodeType===8)if(n.data===yt)l.push({type:2,index:s});else{let p=-1;for(;(p=n.data.indexOf(T,p+1))!==-1;)l.push({type:7,index:s}),p+=T.length-1}s++}}static createElement(t,e){const i=O.createElement("template");return i.innerHTML=t,i}}function B(o,t,e=o,i){var n,s,r,h;if(t===k)return t;let l=i!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[i]:e._$Cl;const a=X(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==a&&((s=l==null?void 0:l._$AO)===null||s===void 0||s.call(l,!1),a===void 0?l=void 0:(l=new a(o),l._$AT(o,e,i)),i!==void 0?((r=(h=e)._$Co)!==null&&r!==void 0?r:h._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=B(o,l._$AS(o,t.values),l,i)),t}class Kt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:n}=this._$AD,s=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:O).importNode(i,!0);V.currentNode=s;let r=V.nextNode(),h=0,l=0,a=n[0];for(;a!==void 0;){if(h===a.index){let x;a.type===2?x=new Z(r,r.nextSibling,this,t):a.type===1?x=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(x=new Zt(r,this,t)),this.u.push(x),a=n[++l]}h!==(a==null?void 0:a.index)&&(r=V.nextNode(),h++)}return s}p(t){let e=0;for(const i of this.u)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Z{constructor(t,e,i,n){var s;this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=n,this._$Cm=(s=n==null?void 0:n.isConnected)===null||s===void 0||s}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=B(this,t,e),X(t)?t===g||t==null||t===""?(this._$AH!==g&&this._$AR(),this._$AH=g):t!==this._$AH&&t!==k&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):(i=>$t(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function")(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==g&&X(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:n}=t,s=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=q.createElement(n.h,this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===s)this._$AH.p(i);else{const r=new Kt(s,this),h=r.v(this.options);r.p(i),this.T(h),this._$AH=r}}_$AC(t){let e=St.get(t.strings);return e===void 0&&St.set(t.strings,e=new q(t)),e}k(t){$t(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const s of t)n===e.length?e.push(i=new Z(this.O(K()),this.O(K()),this,this.options)):i=e[n],i._$AI(s),n++;n<e.length&&(this._$AR(i&&i._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class ot{constructor(t,e,i,n,s){this.type=1,this._$AH=g,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=g}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const s=this.strings;let r=!1;if(s===void 0)t=B(this,t,e,0),r=!X(t)||t!==this._$AH&&t!==k,r&&(this._$AH=t);else{const h=t;let l,a;for(t=s[0],l=0;l<s.length-1;l++)a=B(this,h[i+l],e,l),a===k&&(a=this._$AH[l]),r||(r=!X(a)||a!==this._$AH[l]),a===g?t=g:t!==g&&(t+=(a!=null?a:"")+s[l+1]),this._$AH[l]=a}r&&!n&&this.j(t)}j(t){t===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}}class Xt extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===g?void 0:t}}const Yt=D?D.emptyScript:"";class Ft extends ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==g?this.element.setAttribute(this.name,Yt):this.element.removeAttribute(this.name)}}class qt extends ot{constructor(t,e,i,n,s){super(t,e,i,n,s),this.type=5}_$AI(t,e=this){var i;if((t=(i=B(this,t,e,0))!==null&&i!==void 0?i:g)===k)return;const n=this._$AH,s=t===g&&n!==g||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==g&&(n===g||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Zt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const Et=it.litHtmlPolyfillSupport;Et==null||Et(q,Z),((ht=it.litHtmlVersions)!==null&&ht!==void 0?ht:it.litHtmlVersions=[]).push("2.6.1");var at,dt;class G extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((i,n,s)=>{var r,h;const l=(r=s==null?void 0:s.renderBefore)!==null&&r!==void 0?r:n;let a=l._$litPart$;if(a===void 0){const x=(h=s==null?void 0:s.renderBefore)!==null&&h!==void 0?h:null;l._$litPart$=a=new Z(n.insertBefore(K(),x),x,void 0,s!=null?s:{})}return a._$AI(i),a})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return k}}G.finalized=!0,G._$litElement$=!0,(at=globalThis.litElementHydrateSupport)===null||at===void 0||at.call(globalThis,{LitElement:G});const Ct=globalThis.litElementPolyfillSupport;Ct==null||Ct({LitElement:G}),((dt=globalThis.litElementVersions)!==null&&dt!==void 0?dt:globalThis.litElementVersions=[]).push("3.2.2");const Gt=(o,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?P(S({},t),{finisher(e){e.createProperty(t.key,o)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,o)}};function E(o){return(t,e)=>e!==void 0?((i,n,s)=>{n.constructor.createProperty(s,i)})(o,t,e):Gt(o,t)}function $(o){return E(P(S({},o),{state:!0}))}function I(o,t){return(({finisher:e,descriptor:i})=>(n,s)=>{var r;if(s===void 0){const h=(r=n.originalKey)!==null&&r!==void 0?r:n.key,l=i!=null?{kind:"method",placement:"prototype",key:h,descriptor:i(n.key)}:P(S({},n),{key:h});return e!=null&&(l.finisher=function(a){e(a,h)}),l}{const h=n.constructor;i!==void 0&&Object.defineProperty(n,s,i(s)),e==null||e(h,s)}})({descriptor:e=>{const i={get(){var n,s;return(s=(n=this.renderRoot)===null||n===void 0?void 0:n.querySelector(o))!==null&&s!==void 0?s:null},enumerable:!0,configurable:!0};if(t){const n=typeof e=="symbol"?Symbol():"__"+e;i.get=function(){var s,r;return this[n]===void 0&&(this[n]=(r=(s=this.renderRoot)===null||s===void 0?void 0:s.querySelector(o))!==null&&r!==void 0?r:null),this[n]}}return i}})}var ct;(ct=window.HTMLSlotElement)===null||ct===void 0||ct.prototype.assignedElements;const Jt=1;let Qt=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,t,e){this._$Ct=o,this._$AM=t,this._$Ci=e}_$AS(o,t){return this.update(o,t)}update(o,t){return this.render(...t)}};const C=(o=>(...t)=>({_$litDirective$:o,values:t}))(class extends Qt{constructor(o){var t;if(super(o),o.type!==Jt||o.name!=="style"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{const i=o[e];return i==null?t:t+"".concat(e=e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")},"")}update(o,[t]){const{style:e}=o.element;if(this.vt===void 0){this.vt=new Set;for(const i in t)this.vt.add(i);return this.render(t)}this.vt.forEach(i=>{t[i]==null&&(this.vt.delete(i),i.includes("-")?e.removeProperty(i):e[i]="")});for(const i in t){const n=t[i];n!=null&&(this.vt.add(i),i.includes("-")?e.setProperty(i,n):e[i]=n)}return k}}),nt="data-insp-path";var te=Object.defineProperty,ee=Object.getOwnPropertyDescriptor,c=(o,t,e,i)=>{for(var n,s=i>1?void 0:i?ee(t,e):t,r=o.length-1;r>=0;r--)(n=o[r])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&te(t,e,s),s};const pt="__code-inspector-unique-id",ie={ctrlKey:"^control",altKey:"⌥option",metaKey:"⌘command",shiftKey:"shift"},oe={ctrlKey:"Ctrl",altKey:"Alt",metaKey:"⊞Windows",shiftKey:"Shift"},J=300;function Tt(){return new Promise(o=>{requestAnimationFrame(o)})}class d extends G{constructor(){super(...arguments),this.hotKeys="shiftKey,altKey",this.port=5678,this.showSwitch=!1,this.autoToggle=!1,this.hideConsole=!1,this.targetNode=null,this.ip="localhost",this.serverEnabled=!0,this.wheelThrottling=!1,this.position={top:0,right:0,bottom:0,left:0,padding:{top:0,right:0,bottom:0,left:0},border:{top:0,right:0,bottom:0,left:0},margin:{top:0,right:0,bottom:0,left:0}},this.element={name:"",line:0,column:0,path:""},this.elementTipStyle={vertical:"",horizon:"",visibility:""},this.show=!1,this.showNodeTree=!1,this.nodeTreePosition={},this.nodeTree=null,this.dragging=!1,this.mousePosition={baseX:0,baseY:0,moveX:0,moveY:0},this.draggingTarget="switch",this.open=!1,this.moved=!1,this.hoverSwitch=!1,this.preUserSelect="",this.sendType="xhr",this.activeNode={},this.eventListeners=[],this.isTracking=t=>this.hotKeys&&this.hotKeys.split(",").every(e=>t[e.trim()]),this.getDomPropertyValue=(t,e)=>{const i=window.getComputedStyle(t);return Number(i.getPropertyValue(e).replace("px",""))},this.calculateElementInfoPosition=t=>R(this,null,function*(){var Mt,Nt;const{top:e,right:i,bottom:n,left:s}=t.getBoundingClientRect(),r=document.documentElement.clientHeight,h=document.documentElement.clientWidth,l=this.getDomPropertyValue(t,"margin-top"),a=this.getDomPropertyValue(t,"margin-right"),x=this.getDomPropertyValue(t,"margin-bottom"),p=this.getDomPropertyValue(t,"margin-left");yield Tt();const{width:u,height:y}=this.elementInfoRef.getBoundingClientRect(),w=e-l,A=i+a,st=n+x,Q=s-p,ut=[{vertical:"element-info-bottom",horizon:"element-info-right",top:st,left:Q,isExternal:!0},{vertical:"element-info-bottom",horizon:"element-info-left",top:st,left:A-u,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-right",top:w-y,left:Q,isExternal:!0},{vertical:"element-info-top",horizon:"element-info-left",top:w-y,left:A-u,isExternal:!0},{vertical:"element-info-bottom-inner",horizon:"element-info-right",top:st-y,left:Q,isExternal:!1},{vertical:"element-info-bottom-inner",horizon:"element-info-left",top:st-y,left:A-u,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-right",top:w,left:Q,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:w,left:A-u,isExternal:!1},{vertical:"element-info-top-inner",horizon:"element-info-left",top:Math.max(0,w),left:A-u,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-w),"px)")}},{vertical:"element-info-top-inner",horizon:"element-info-right",top:Math.max(0,w),left:A-u,isExternal:!1,additionStyle:{transform:"translateY(".concat(Math.max(0,-w),"px)")}}],Pt=b=>b.left<0||b.left+u>h||b.top<0||b.top+y>r;for(const b of ut)if(!Pt(b)&&b.isExternal)return b;for(const b of ut){const mt=S({},b);if(b.horizon.endsWith("right")){const z=Q+u-h;z>0&&(b.additionStyle={transform:"translateX(-".concat(z+4,"px) ").concat(((Mt=b.additionStyle)==null?void 0:Mt.transform)||"")},mt.left-=z+4)}else{const z=u-A;z>0&&(b.additionStyle={transform:"translateX(".concat(z+4,"px) ").concat(((Nt=b.additionStyle)==null?void 0:Nt.transform)||"")},mt.left+=z+4)}if(!Pt(mt))return b}return ut[0]}),this.renderCover=t=>R(this,null,function*(){if(t===this.targetNode)return;this.targetNode=t;const{top:e,right:i,bottom:n,left:s}=t.getBoundingClientRect();if(this.position={top:e,right:i,bottom:n,left:s,border:{top:this.getDomPropertyValue(t,"border-top-width"),right:this.getDomPropertyValue(t,"border-right-width"),bottom:this.getDomPropertyValue(t,"border-bottom-width"),left:this.getDomPropertyValue(t,"border-left-width")},padding:{top:this.getDomPropertyValue(t,"padding-top"),right:this.getDomPropertyValue(t,"padding-right"),bottom:this.getDomPropertyValue(t,"padding-bottom"),left:this.getDomPropertyValue(t,"padding-left")},margin:{top:this.getDomPropertyValue(t,"margin-top"),right:this.getDomPropertyValue(t,"margin-right"),bottom:this.getDomPropertyValue(t,"margin-bottom"),left:this.getDomPropertyValue(t,"margin-left")}},this.elementTipStyle={vertical:"",horizon:"",visibility:"hidden"},this.addGlobalCursorStyle(),this.preUserSelect||(this.preUserSelect=getComputedStyle(document.body).userSelect),document.body.style.userSelect="none",this.element=this.getSourceInfo(t),this.show=!0,!this.showNodeTree){const{vertical:r,horizon:h,additionStyle:l}=yield this.calculateElementInfoPosition(t);this.elementTipStyle={vertical:r,horizon:h,visibility:"visible",additionStyle:l}}}),this.getSourceInfo=t=>{var h;let e=((h=t.getAttribute)==null?void 0:h.call(t,nt))||t[nt];if(!e)return null;const i=e.split(":"),n=i[i.length-1],s=Number(i[i.length-2]),r=Number(i[i.length-3]);return{name:n,path:i.slice(0,i.length-3).join(":"),line:r,column:s}},this.removeCover=t=>{t!==!0&&this.nodeTree||(this.targetNode=null,this.show=!1,this.removeGlobalCursorStyle(),document.body.style.userSelect=this.preUserSelect,this.preUserSelect="")},this.renderLayerPanel=(t,{x:e,y:i})=>{const n=document.documentElement.clientWidth,s=document.documentElement.clientHeight,r=n-e,h=s-i;let l={};r<e?(l.right=r+"px",e<J&&(l.transform="translateX(".concat(J-e,"px)"))):(l.left=e+"px",r<J&&(l.transform="translateX(-".concat(J-r,"px)"))),h<i?(l.bottom=h+"px",l.maxHeight=i-10+"px"):(l.top=i+"px",l.maxHeight=s-i-10+"px"),this.nodeTreePosition=l,this.nodeTree=t,this.showNodeTree=!0},this.removeLayerPanel=()=>{this.showNodeTree=!1,this.nodeTree=null,this.activeNode={}},this.addGlobalCursorStyle=()=>{if(!document.getElementById(pt)){const t=document.createElement("style");t.setAttribute("id",pt),t.innerText="body * {\n cursor: pointer !important;\n }",document.body.appendChild(t)}},this.removeGlobalCursorStyle=()=>{const t=document.getElementById(pt);t&&t.remove()},this.buildRequestUrl=()=>{const t=encodeURIComponent(this.element.path),e=encodeURIComponent(this.element.name);return"http://".concat(this.ip,":").concat(this.port,"/?file=").concat(t,"&line=").concat(this.element.line,"&column=").concat(this.element.column,"&name=").concat(e)},this.sendXHR=()=>{const t=new XMLHttpRequest;t.open("GET",this.buildRequestUrl(),!0),t.addEventListener("load",()=>{t.status>=200&&t.status<300?this.showNotification("✓ Copied code location"):this.showNotification(t.responseText||"Failed to copy code location","error")}),t.addEventListener("error",()=>{this.sendType="img",this.sendImg()}),t.send()},this.sendImg=()=>{document.createElement("img").src=this.buildRequestUrl(),this.showNotification("Copy request sent")},this.trackCode=()=>{this.serverEnabled?this.sendType==="xhr"?this.sendXHR():this.sendImg():this.showNotification("Clipboard server is disabled","error"),window.dispatchEvent(new CustomEvent("code-inspector:trackCode",{detail:this.element}))},this.handleDrag=t=>{if(t.composedPath().includes(this)?this.hoverSwitch=!0:this.hoverSwitch=!1,this.dragging){this.moved=!0;const e=this.draggingTarget==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;return e.style.left=this.mousePosition.baseX+(this.getMousePosition(t).x-this.mousePosition.moveX)+"px",e.style.top=this.mousePosition.baseY+(this.getMousePosition(t).y-this.mousePosition.moveY)+"px",void(this.draggingTarget&&(this.nodeTreePosition.left=e.style.left,this.nodeTreePosition.top=e.style.top))}},this.getValidNodeList=t=>{const e=[];for(const i of t)(i.hasAttribute&&i.hasAttribute(nt)||i[nt])&&e.push(i);return e},this.isSamePositionNode=(t,e)=>{const i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.top===n.top&&i.left===n.left&&i.right===n.right&&i.bottom===n.bottom},this.handleMouseMove=t=>R(this,null,function*(){if((this.isTracking(t)&&!this.dragging||this.open)&&!this.hoverSwitch){const e=t.composedPath(),i=this.getValidNodeList(e);let n;for(const s of i)n?this.isSamePositionNode(n,s)&&(n=s):n=s;n?this.renderCover(n):this.removeCover()}else this.removeCover()}),this.handleWheel=t=>{if(!this.targetNode||(t.stopPropagation(),t.preventDefault(),this.wheelThrottling))return;this.wheelThrottling=!0;const e=t.composedPath(),i=this.getValidNodeList(e);let n=i.findIndex(r=>r===this.targetNode);if(n===-1)return void(this.wheelThrottling=!1);const s=t.deltaX||t.deltaY;s>0?n--:s<0&&n++,n>=0&&n<i.length&&this.renderCover(i[n]),setTimeout(()=>{this.wheelThrottling=!1},200)},this.handleMouseClick=t=>{(this.isTracking(t)||this.open)&&this.show&&(t.stopPropagation(),t.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1)),t.composedPath().includes(this.nodeTreeRef)||this.removeLayerPanel()},this.handleContextMenu=t=>{if((this.isTracking(t)&&!this.dragging||this.open)&&!this.hoverSwitch){t.preventDefault();const e=t.composedPath(),i=this.generateNodeTree(e);this.renderLayerPanel(i,{x:t.clientX,y:t.clientY})}},this.generateNodeTree=t=>{let e,i=1,n=null;for(const s of t.reverse()){const r=this.getSourceInfo(s);if(!r)continue;const h=P(S({},r),{children:[],depth:i++,element:s});n?n.children.push(h):e=h,n=h}return e},this.handlePointerDown=t=>{let e=!1,i=t.target;for(;i;){if(i.disabled){e=!0;break}i=i.parentElement}e&&(this.isTracking(t)||this.open)&&this.show&&(t.stopPropagation(),t.preventDefault(),this.trackCode(),this.removeCover(),this.autoToggle&&(this.open=!1))},this.handleKeyUp=t=>{this.isTracking(t)||this.open||this.removeCover()},this.printTip=()=>{const t=navigator.userAgent.toLowerCase(),e=["windows","win32","wow32","win64","wow64"].some(l=>t.toUpperCase().match(l.toUpperCase()))?oe:ie,i="%c",n=this.hotKeys.split(",").map(l=>i+e[l.trim()]),s=2*n.length+1,r=Array(s).fill("").map((l,a)=>a%2==0?"color: #00B42A; font-family: PingFang SC; font-size: 12px;":"color: #006aff; font-weight: bold; font-family: PingFang SC; font-size: 12px;"),h=["".concat(i,"[simple-code-inspector-plugin]"),"".concat(i,"• Press and hold ").concat(n.join(" ".concat(i,"+ "))," ").concat(i,"and click the DOM to copy its source code location.")].join("\n");console.log(h,"color: #006aff; font-weight: bolder; font-size: 12px;",...r)},this.getMousePosition=t=>{var e,i;return{x:t instanceof MouseEvent?t.pageX:(e=t.touches[0])==null?void 0:e.pageX,y:t instanceof MouseEvent?t.pageY:(i=t.touches[0])==null?void 0:i.pageY}},this.recordMousePosition=(t,e)=>{const i=e==="switch"?this.inspectorSwitchRef:this.nodeTreeRef;this.mousePosition={baseX:i.offsetLeft,baseY:i.offsetTop,moveX:this.getMousePosition(t).x,moveY:this.getMousePosition(t).y},this.dragging=!0,this.draggingTarget=e,t.preventDefault()},this.handleMouseUp=t=>{this.hoverSwitch=!1,this.dragging&&(this.dragging=!1,t instanceof TouchEvent&&this.draggingTarget==="switch"&&this.switch(t))},this.switch=t=>{this.moved||(this.open=!this.open,t.preventDefault(),t.stopPropagation()),this.moved=!1},this.handleClickTreeNode=t=>{this.element=t,this.trackCode(),this.removeLayerPanel()},this.handleMouseEnterNode=(t,e)=>R(this,null,function*(){const{x:i,y:n,width:s,height:r}=t.target.getBoundingClientRect();this.activeNode={width:s-16+"px",left:i+8+"px",visibility:"hidden",top:n-4+"px",bottom:"",content:"".concat(e.path,":").concat(e.line,":").concat(e.column),class:"tooltip-top"},this.renderCover(e.element),yield Tt();const{y:h}=this.nodeTreeTooltipRef.getBoundingClientRect();h<0&&(this.activeNode=P(S({},this.activeNode),{bottom:"",top:"".concat(n+r+4,"px"),class:"tooltip-bottom"})),this.activeNode=P(S({},this.activeNode),{visibility:"visible"})}),this.handleMouseLeaveNode=()=>{this.activeNode=P(S({},this.activeNode),{visibility:"hidden"}),this.removeCover(!0)},this.renderNodeTree=t=>F(Ht||(Ht=U(['\n <div\n class="inspector-layer"\n style="padding-left: ','px;"\n @mouseenter="','"\n @mouseleave="','"\n @click="','"\n >\n <',">\n </div>\n ","\n "])),8*t.depth,e=>R(this,null,function*(){return yield this.handleMouseEnterNode(e,t)}),this.handleMouseLeaveNode,()=>this.handleClickTreeNode(t),t.name,t.children.map(e=>this.renderNodeTree(e)))}showNotification(t,e="success"){const i=document.createElement("div");i.className="code-inspector-notification code-inspector-notification-".concat(e),i.textContent=t,document.body.appendChild(i),requestAnimationFrame(()=>{i.classList.add("code-inspector-notification-show")}),setTimeout(()=>{i.classList.remove("code-inspector-notification-show"),setTimeout(()=>{document.body.removeChild(i)},300)},2e3)}attachEventListeners(){this.eventListeners.forEach(({event:t,handler:e,options:i})=>{window.addEventListener(t,e,i)})}detachEventListeners(){this.eventListeners.forEach(({event:t,handler:e,options:i})=>{window.removeEventListener(t,e,i)})}firstUpdated(){this.eventListeners=[{event:"mousemove",handler:this.handleMouseMove,options:!0},{event:"touchmove",handler:this.handleMouseMove,options:!0},{event:"mousemove",handler:this.handleDrag,options:!0},{event:"touchmove",handler:this.handleDrag,options:!0},{event:"click",handler:this.handleMouseClick,options:!0},{event:"pointerdown",handler:this.handlePointerDown,options:!0},{event:"keyup",handler:this.handleKeyUp,options:!0},{event:"mouseleave",handler:this.removeCover,options:!0},{event:"mouseup",handler:this.handleMouseUp,options:!0},{event:"touchend",handler:this.handleMouseUp,options:!0},{event:"contextmenu",handler:this.handleContextMenu,options:!0},{event:"wheel",handler:this.handleWheel,options:{passive:!1}}],this.hideConsole||this.printTip(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}render(){const t={display:this.show?"block":"none",top:this.position.top-this.position.margin.top+"px",left:this.position.left-this.position.margin.left+"px",height:"".concat(this.position.bottom-this.position.top+this.position.margin.bottom+this.position.margin.top,"px"),width:"".concat(this.position.right-this.position.left+this.position.margin.right+this.position.margin.left,"px")},e={borderTopWidth:"".concat(this.position.margin.top,"px"),borderRightWidth:"".concat(this.position.margin.right,"px"),borderBottomWidth:"".concat(this.position.margin.bottom,"px"),borderLeftWidth:"".concat(this.position.margin.left,"px")},i={borderTopWidth:"".concat(this.position.border.top,"px"),borderRightWidth:"".concat(this.position.border.right,"px"),borderBottomWidth:"".concat(this.position.border.bottom,"px"),borderLeftWidth:"".concat(this.position.border.left,"px")},n={borderTopWidth:"".concat(this.position.padding.top,"px"),borderRightWidth:"".concat(this.position.padding.right,"px"),borderBottomWidth:"".concat(this.position.padding.bottom,"px"),borderLeftWidth:"".concat(this.position.padding.left,"px")},s=S({display:this.showNodeTree?"flex":"none"},this.nodeTreePosition),r={visibility:this.activeNode.visibility,maxWidth:this.activeNode.width,top:this.activeNode.top,left:this.activeNode.left,bottom:this.activeNode.bottom,display:this.showNodeTree?"":"none"};return F(Vt||(Vt=U(['\n <div\n class="code-inspector-container"\n id="code-inspector-container"\n style=','\n >\n <div class="margin-overlay" style=','>\n <div class="border-overlay" style=','>\n <div class="padding-overlay" style=','>\n <div class="content-overlay"></div>\n </div>\n </div>\n </div>\n <div\n id="element-info"\n class="element-info '," "," ",'"\n style=','\n >\n <div class="element-info-content">\n <div class="name-line">\n <div class="element-name">\n <span class="element-title"><','></span>\n </div>\n </div>\n <div class="path-line">\n ',":",":",'\n </div>\n </div>\n </div>\n </div>\n <div\n id="inspector-switch"\n class="inspector-switch '," ",'"\n style=','\n @mousedown="','"\n @touchstart="','"\n @click="','"\n >\n ','\n </div>\n <div\n id="inspector-node-tree"\n class="element-info-content"\n style=','\n >\n <div\n class="inspector-layer-title"\n @mousedown="','"\n @touchstart="','"\n >\n <div>🔍️ Click node to locate</div>\n ','\n </div>\n\n <div\n class="node-tree-list"\n style="','"\n >\n ','\n <div style="height: 8px"></div>\n </div>\n </div>\n\n <div\n id="node-tree-tooltip"\n class="','"\n style=',"\n >\n ","\n </div>\n "])),C(t),C(e),C(i),C(n),this.elementTipStyle.vertical,this.elementTipStyle.horizon,this.elementTipStyle.visibility,C(S({width:J+"px",maxWidth:"100vw"},this.elementTipStyle.additionStyle)),this.element.name,this.element.path,this.element.line,this.element.column,this.open?"active-inspector-switch":"",this.moved?"move-inspector-switch":"",C({display:this.showSwitch?"flex":"none"}),h=>this.recordMousePosition(h,"switch"),h=>this.recordMousePosition(h,"switch"),this.switch,this.open?F(Lt||(Lt=U(['\n <svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="#34495E"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#00B42A"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F7BA1E"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="#F53F3F"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="#006AFF"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="#34495E"\n p-id="1116"\n ></path>\n </svg>\n ']))):F(Dt||(Dt=U(['<svg\n t="1677801709811"\n class="icon"\n viewBox="0 0 1024 1024"\n version="1.1"\n xmlns="http://www.w3.org/2000/svg"\n p-id="1110"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n width="1em"\n height="1em"\n >\n <path\n d="M546.56 704H128c-19.2 0-32-12.8-32-32V256h704v194.56c10.928 1.552 21.648 3.76 32 6.832V128c0-35.2-28.8-64-64-64H128C92.8 64 64 92.8 64 128v544c0 35.2 28.8 64 64 64h425.392a221.936 221.936 0 0 1-6.848-32zM96 128c0-19.2 12.8-32 32-32h640c19.2 0 32 12.8 32 32v96H96V128z"\n fill="currentColor"\n p-id="1111"\n ></path>\n <path\n d="M416 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1112"\n ></path>\n <path\n d="M288 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1113"\n ></path>\n <path\n d="M160 160m-32 0a32 32 0 1 0 64 0 32 32 0 1 0-64 0Z"\n fill="currentColor"\n p-id="1114"\n ></path>\n <path\n d="M382.848 658.928l99.376-370.88 30.912 8.272-99.36 370.88zM318.368 319.2L160 477.6l158.4 158.4 22.64-22.624-135.792-135.776 135.776-135.776zM768 480c-13.088 0-25.888 1.344-38.24 3.84l6.24-6.24-158.4-158.4-22.64 22.624 135.792 135.776-135.776 135.776 22.656 22.624 2.208-2.224a190.768 190.768 0 0 0 30.928 148.08l-116.672 116.656c-10.24 10.24-10.24 26.896 0 37.136l27.76 27.76c5.12 5.12 11.84 7.68 18.56 7.68s13.456-2.56 18.56-7.68l120.992-120.96A190.56 190.56 0 0 0 768 864c105.872 0 192-86.128 192-192s-86.128-192-192-192z m-159.12 193.136c0-88.224 71.776-160 160-160 10.656 0 21.04 1.152 31.12 3.152V672c0 19.2-12.8 32-32 32h-156a160.144 160.144 0 0 1-3.12-30.864z m-68.464 263.584l-19.632-19.632 110.336-110.336c6.464 6.656 13.392 12.848 20.752 18.528l-111.456 111.44z m228.464-103.584c-65.92 0-122.576-40.096-147.056-97.136H768c35.2 0 64-28.8 64-64v-145.776c56.896 24.544 96.88 81.12 96.88 146.912 0 88.224-71.776 160-160 160z"\n fill="currentColor"\n p-id="1115"\n ></path>\n <path\n d="M864.576 672c0 52.928-43.072 96-96 96v32a128 128 0 0 0 128-128h-32z"\n fill="currentColor"\n p-id="1116"\n ></path>\n </svg>']))),C(s),h=>this.recordMousePosition(h,"nodeTree"),h=>this.recordMousePosition(h,"nodeTree"),F(Ot||(Ot=U(['<svg\n xmlns="http://www.w3.org/2000/svg"\n width="16"\n height="16"\n viewBox="0 0 24 24"\n fill="none"\n stroke="currentColor"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n class="close-icon"\n @click="','"\n >\n <path d="M18 6 6 18" />\n <path d="m6 6 12 12" />\n </svg>'])),this.removeLayerPanel),C({pointerEvents:this.dragging?"none":""}),this.nodeTree?this.renderNodeTree(this.nodeTree):"",this.activeNode.class,C(r),this.activeNode.content)}}if(d.styles=((o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,n,s)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[s+1],o[0]);return new tt(e,o,j)})(Bt||(Bt=U(["\n .code-inspector-container {\n position: fixed;\n pointer-events: none;\n z-index: 9999999999999;\n font-family: 'PingFang SC';\n .margin-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 155, 0, 0.3);\n .border-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(255, 200, 50, 0.3);\n .padding-overlay {\n position: absolute;\n inset: 0;\n border-style: solid;\n border-color: rgba(77, 200, 0, 0.3);\n .content-overlay {\n position: absolute;\n inset: 0;\n background: rgba(120, 170, 210, 0.7);\n }\n }\n }\n }\n }\n .element-info {\n position: absolute;\n }\n .element-info.hidden {\n visibility: hidden;\n }\n .element-info-content {\n max-width: 100%;\n font-size: 12px;\n color: #000;\n background-color: #fff;\n word-break: break-all;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);\n box-sizing: border-box;\n padding: 4px 8px;\n border-radius: 4px;\n }\n .element-info-top {\n top: -4px;\n transform: translateY(-100%);\n }\n .element-info-bottom {\n top: calc(100% + 4px);\n }\n .element-info-top-inner {\n top: 4px;\n }\n .element-info-bottom-inner {\n bottom: 4px;\n }\n .element-info-left {\n right: 0;\n display: flex;\n justify-content: flex-end;\n }\n .element-info-right {\n left: 0;\n display: flex;\n justify-content: flex-start;\n }\n .element-name .element-title {\n color: coral;\n font-weight: bold;\n }\n .path-line {\n color: #333;\n line-height: 12px;\n margin-top: 4px;\n }\n .inspector-switch {\n position: fixed;\n z-index: 9999999999999;\n top: 50%;\n right: 24px;\n font-size: 22px;\n transform: translateY(-100%);\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(255, 255, 255, 0.8);\n color: #555;\n height: 32px;\n width: 32px;\n border-radius: 50%;\n box-shadow: 0px 1px 2px -2px rgba(0, 0, 0, 0.2),\n 0px 3px 6px 0px rgba(0, 0, 0, 0.16),\n 0px 5px 12px 4px rgba(0, 0, 0, 0.12);\n cursor: pointer;\n }\n .active-inspector-switch {\n color: #006aff;\n }\n .move-inspector-switch {\n cursor: move;\n }\n #inspector-node-tree {\n position: fixed;\n user-select: none;\n z-index: 9999999999999999;\n min-width: 300px;\n max-width: min(max(30vw, 300px), 400px);\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n display: flex;\n flex-direction: column;\n padding: 0;\n\n .inspector-layer-title {\n border-bottom: 1px solid #eee;\n padding: 8px 8px 4px;\n margin-bottom: 8px;\n flex-shrink: 0;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: move;\n user-select: none;\n &:hover {\n background: rgba(0, 106, 255, 0.1);\n }\n }\n\n .node-tree-list {\n flex: 1;\n overflow-y: auto;\n min-height: 0;\n }\n\n .inspector-layer {\n cursor: pointer;\n position: relative;\n padding-right: 8px;\n &:hover {\n background: #fdf4bf;\n }\n }\n\n .path-line {\n font-size: 9px;\n color: #777;\n margin-top: 1px;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n }\n }\n\n #node-tree-tooltip {\n position: fixed;\n box-sizing: border-box;\n z-index: 999999999999999999;\n background: rgba(0, 0, 0, 0.6);\n color: white;\n padding: 2px 6px;\n border-radius: 4px;\n font-size: 12px;\n white-space: wrap;\n pointer-events: none;\n word-break: break-all;\n }\n .tooltip-top {\n transform: translateY(-100%);\n }\n .close-icon {\n cursor: pointer;\n }\n\n "]))),c([E()],d.prototype,"hotKeys",2),c([E()],d.prototype,"port",2),c([E()],d.prototype,"showSwitch",2),c([E()],d.prototype,"autoToggle",2),c([E()],d.prototype,"hideConsole",2),c([E()],d.prototype,"targetNode",2),c([E()],d.prototype,"ip",2),c([E()],d.prototype,"serverEnabled",2),c([$()],d.prototype,"position",2),c([$()],d.prototype,"element",2),c([$()],d.prototype,"elementTipStyle",2),c([$()],d.prototype,"show",2),c([$()],d.prototype,"showNodeTree",2),c([$()],d.prototype,"nodeTreePosition",2),c([$()],d.prototype,"nodeTree",2),c([$()],d.prototype,"dragging",2),c([$()],d.prototype,"mousePosition",2),c([$()],d.prototype,"draggingTarget",2),c([$()],d.prototype,"open",2),c([$()],d.prototype,"moved",2),c([$()],d.prototype,"hoverSwitch",2),c([$()],d.prototype,"preUserSelect",2),c([$()],d.prototype,"sendType",2),c([$()],d.prototype,"activeNode",2),c([I("#inspector-switch")],d.prototype,"inspectorSwitchRef",2),c([I("#code-inspector-container")],d.prototype,"codeInspectorContainerRef",2),c([I("#element-info")],d.prototype,"elementInfoRef",2),c([I("#inspector-node-tree")],d.prototype,"nodeTreeRef",2),c([I(".inspector-layer-title")],d.prototype,"nodeTreeTitleRef",2),c([I("#node-tree-tooltip")],d.prototype,"nodeTreeTooltipRef",2),!document.getElementById("code-inspector-notification-styles")){const o=document.createElement("style");o.id="code-inspector-notification-styles",o.textContent="\n .code-inspector-notification {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 99999999999999999;\n padding: 12px 16px;\n border-radius: 8px;\n font-size: 14px;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;\n font-weight: 500;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n opacity: 0;\n transform: translateY(-10px);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n pointer-events: none;\n }\n .code-inspector-notification-success {\n background: hsl(143, 85%, 96%);\n color: hsl(140, 100%, 27%);\n border: 1px solid hsl(145, 92%, 91%);\n }\n .code-inspector-notification-error {\n background: hsl(0, 93%, 94%);\n color: hsl(0, 84%, 40%);\n border: 1px solid hsl(0, 93%, 94%);\n }\n .code-inspector-notification-show {\n opacity: 1;\n transform: translateY(0);\n }\n ",document.head.appendChild(o)}customElements.get("code-inspector-component")||customElements.define("code-inspector-component",d),v.CodeInspectorComponent=d,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|