react-reinspect 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2471 @@
1
+ import { Profiler as e, createContext as t, useCallback as n, useContext as r, useEffect as i, useMemo as a, useRef as o, useState as s, useSyncExternalStore as c } from "react";
2
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
3
+ import { createPortal as f } from "react-dom";
4
+ //#region \0rolldown/runtime.js
5
+ var p = Object.create, m = Object.defineProperty, h = Object.getOwnPropertyDescriptor, g = Object.getOwnPropertyNames, _ = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty, ee = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), te = (e, t, n, r) => {
6
+ if (t && typeof t == "object" || typeof t == "function") for (var i = g(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !v.call(e, s) && s !== n && m(e, s, {
7
+ get: ((e) => t[e]).bind(null, s),
8
+ enumerable: !(r = h(t, s)) || r.enumerable
9
+ });
10
+ return e;
11
+ }, y = (e, t, n) => (n = e == null ? {} : p(_(e)), te(t || !e || !e.__esModule ? m(n, "default", {
12
+ value: e,
13
+ enumerable: !0
14
+ }) : n, e)), b = t(null), x = [
15
+ "a[href]",
16
+ "button:not([disabled])",
17
+ "input:not([disabled]):not([type=\"hidden\"])",
18
+ "select:not([disabled])",
19
+ "textarea:not([disabled])",
20
+ "[tabindex]:not([tabindex=\"-1\"])"
21
+ ].join(", ");
22
+ function S(e) {
23
+ let t = window.getComputedStyle(e);
24
+ return t.display !== "none" && t.visibility !== "hidden";
25
+ }
26
+ function C(e) {
27
+ return Array.from(e.querySelectorAll(x)).filter((e) => S(e));
28
+ }
29
+ function w(e) {
30
+ let t = C(e)[0];
31
+ if (t) {
32
+ t.focus();
33
+ return;
34
+ }
35
+ e.focus();
36
+ }
37
+ function ne(e, t) {
38
+ if (e.key !== "Tab") return;
39
+ let n = C(t);
40
+ if (n.length === 0) {
41
+ e.preventDefault(), t.focus();
42
+ return;
43
+ }
44
+ let r = n[0], i = n[n.length - 1];
45
+ if (!r || !i) {
46
+ e.preventDefault(), t.focus();
47
+ return;
48
+ }
49
+ let a = document.activeElement instanceof HTMLElement ? document.activeElement : null, o = a && t.contains(a);
50
+ if (e.shiftKey) {
51
+ (!o || a === r) && (e.preventDefault(), i.focus());
52
+ return;
53
+ }
54
+ (!o || a === i) && (e.preventDefault(), r.focus());
55
+ }
56
+ //#endregion
57
+ //#region src/reinspect/constants.ts
58
+ var T = [
59
+ "backgroundColor",
60
+ "color",
61
+ "fontSize",
62
+ "padding",
63
+ "margin",
64
+ "borderRadius",
65
+ "borderWidth",
66
+ "borderColor",
67
+ "opacity",
68
+ "width",
69
+ "height",
70
+ "gap"
71
+ ], E = "#1f2937", D = new Set([
72
+ "backgroundColor",
73
+ "color",
74
+ "borderColor"
75
+ ]), re = new Set([
76
+ "fontSize",
77
+ "padding",
78
+ "margin",
79
+ "borderRadius",
80
+ "borderWidth",
81
+ "width",
82
+ "height",
83
+ "gap"
84
+ ]), O = 2147483e3, k = "reinspect.inspectMode", A = "reinspect.inspectWhitelist", j = "reinspect.inspectBlacklist", M = "reinspect.propsSerializationMode", N = "reinspect.menuTheme", ie = "reinspect.menuOpenGesture", P = {
85
+ ctrl: !1,
86
+ alt: !1,
87
+ shift: !0,
88
+ meta: !1
89
+ }, ae = {
90
+ mode: "right-click",
91
+ modifiers: P
92
+ }, oe = [
93
+ "wrapped",
94
+ "first-party",
95
+ "all"
96
+ ], se = [
97
+ "off",
98
+ "attempts",
99
+ "commits",
100
+ "both"
101
+ ], ce = ["distilled", "complete"], le = ["light", "dark"], ue = ["right-click", "modifier-right-click"], de = !1;
102
+ function F(e) {
103
+ return typeof e == "object" && !!e;
104
+ }
105
+ function I() {
106
+ de || typeof console > "u" || (de = !0, console.warn("[react-reinspect] `shouldCountRenders` and `renderCaptureMode` are deprecated. Use `renderCounters` instead."));
107
+ }
108
+ function L(e) {
109
+ return typeof e == "string" && oe.includes(e);
110
+ }
111
+ function fe(e) {
112
+ return typeof e == "string" && se.includes(e);
113
+ }
114
+ function R(e) {
115
+ return typeof e == "string" && ce.includes(e);
116
+ }
117
+ function pe(e) {
118
+ return typeof e == "string" && le.includes(e);
119
+ }
120
+ function z(e) {
121
+ return typeof e == "string" && ue.includes(e);
122
+ }
123
+ function B(e) {
124
+ let t = {
125
+ ctrl: e?.ctrl === !0,
126
+ alt: e?.alt === !0,
127
+ shift: e?.shift === !0,
128
+ meta: e?.meta === !0
129
+ };
130
+ return t.ctrl || t.alt || t.shift || t.meta ? t : { ...P };
131
+ }
132
+ function V(e) {
133
+ return {
134
+ mode: z(e?.mode) ? e.mode : ae.mode,
135
+ modifiers: B(e?.modifiers)
136
+ };
137
+ }
138
+ function H(e) {
139
+ let t = [];
140
+ if (Array.isArray(e?.patterns)) for (let n of e.patterns) {
141
+ if (typeof n != "string") continue;
142
+ let e = n.trim();
143
+ e.length !== 0 && t.push(e);
144
+ }
145
+ return {
146
+ patterns: t,
147
+ regex: e?.regex === !0,
148
+ wholeWord: e?.wholeWord === !0,
149
+ matchCase: e?.matchCase === !0
150
+ };
151
+ }
152
+ function me() {
153
+ if (!(typeof window > "u")) try {
154
+ let e = window.sessionStorage.getItem(k);
155
+ return L(e) ? e : void 0;
156
+ } catch {
157
+ return;
158
+ }
159
+ }
160
+ function U(e) {
161
+ return me() || (L(e) ? e : "wrapped");
162
+ }
163
+ function he(e) {
164
+ if (!(typeof window > "u")) try {
165
+ window.sessionStorage.setItem(k, e);
166
+ } catch {}
167
+ }
168
+ function W(e) {
169
+ if (!(typeof window > "u")) try {
170
+ let t = window.sessionStorage.getItem(e);
171
+ if (!t) return;
172
+ let n = JSON.parse(t);
173
+ return F(n) ? H(n) : void 0;
174
+ } catch {
175
+ return;
176
+ }
177
+ }
178
+ function ge(e, t) {
179
+ return W(t) || H(e);
180
+ }
181
+ function _e(e) {
182
+ return ge(e, A);
183
+ }
184
+ function ve(e) {
185
+ return ge(e, j);
186
+ }
187
+ function ye(e, t) {
188
+ if (!(typeof window > "u")) try {
189
+ let n = H(t);
190
+ window.sessionStorage.setItem(e, JSON.stringify(n));
191
+ } catch {}
192
+ }
193
+ function be(e) {
194
+ ye(A, e);
195
+ }
196
+ function xe(e) {
197
+ ye(j, e);
198
+ }
199
+ function G() {
200
+ if (!(typeof window > "u")) try {
201
+ let e = window.sessionStorage.getItem(M);
202
+ return R(e) ? e : void 0;
203
+ } catch {
204
+ return;
205
+ }
206
+ }
207
+ function Se(e) {
208
+ return G() || (R(e) ? e : "distilled");
209
+ }
210
+ function K(e) {
211
+ if (!(typeof window > "u")) try {
212
+ window.sessionStorage.setItem(M, e);
213
+ } catch {}
214
+ }
215
+ function Ce() {
216
+ if (!(typeof window > "u")) try {
217
+ let e = window.sessionStorage.getItem(N);
218
+ return pe(e) ? e : void 0;
219
+ } catch {
220
+ return;
221
+ }
222
+ }
223
+ function we(e) {
224
+ return Ce() || (pe(e) ? e : "light");
225
+ }
226
+ function Te(e) {
227
+ if (!(typeof window > "u")) try {
228
+ window.sessionStorage.setItem(N, e);
229
+ } catch {}
230
+ }
231
+ function Ee() {
232
+ if (!(typeof window > "u")) try {
233
+ let e = window.sessionStorage.getItem(ie);
234
+ if (!e) return;
235
+ let t = JSON.parse(e);
236
+ return F(t) ? V(t) : void 0;
237
+ } catch {
238
+ return;
239
+ }
240
+ }
241
+ function De(e) {
242
+ return Ee() || V(e);
243
+ }
244
+ function Oe(e) {
245
+ if (!(typeof window > "u")) try {
246
+ let t = V(e);
247
+ window.sessionStorage.setItem(ie, JSON.stringify(t));
248
+ } catch {}
249
+ }
250
+ function q(e) {
251
+ return fe(e.renderCounters) ? e.renderCounters : ((e.shouldCountRenders !== void 0 || e.renderCaptureMode !== void 0) && I(), e.shouldCountRenders === !1 ? "off" : e.shouldCountRenders === !0 ? e.renderCaptureMode ?? "attempts" : e.renderCaptureMode ? e.renderCaptureMode : "off");
252
+ }
253
+ function ke(e) {
254
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
255
+ }
256
+ function Ae(e) {
257
+ let t = H(e), n = [], r = [], i = t.matchCase ? "" : "i";
258
+ for (let e of t.patterns) {
259
+ let a = t.regex ? e : ke(e), o = t.wholeWord ? `\\b(?:${a})\\b` : a;
260
+ try {
261
+ n.push(new RegExp(o, i));
262
+ } catch {
263
+ r.push(e);
264
+ }
265
+ }
266
+ return {
267
+ hasPatterns: n.length > 0,
268
+ invalidPatterns: r,
269
+ matches: (e) => n.some((t) => t.test(e))
270
+ };
271
+ }
272
+ function je(e, t, n) {
273
+ return !(!(!t.hasPatterns || t.matches(e)) || n.hasPatterns && n.matches(e));
274
+ }
275
+ function J(e = {}) {
276
+ let t = e.enabled ?? !1, n = e.editableProps && e.editableProps.length > 0 ? e.editableProps : T;
277
+ return {
278
+ enabled: t,
279
+ startActive: e.startActive ?? !0,
280
+ showFloatingToggle: e.showFloatingToggle ?? t,
281
+ inspectMode: U(e.inspectMode),
282
+ inspectWhitelist: _e(e.inspectWhitelist),
283
+ inspectBlacklist: ve(e.inspectBlacklist),
284
+ editableProps: n,
285
+ zIndexBase: e.zIndexBase ?? O,
286
+ renderCounters: q(e),
287
+ countRendersForComponents: e.countRendersForComponents ?? [],
288
+ propsSerializationMode: Se(e.propsSerializationMode),
289
+ menuTheme: we(e.menuTheme),
290
+ menuOpenGesture: De(e.menuOpenGesture)
291
+ };
292
+ }
293
+ function Me(e, t) {
294
+ if (!e) return {};
295
+ let n = {};
296
+ for (let r of t) {
297
+ let t = e[r];
298
+ t == null || t === "" || (n[r] = t);
299
+ }
300
+ return n;
301
+ }
302
+ function Y(e) {
303
+ let t = e.trim();
304
+ if (t.length === 0) return;
305
+ if (t.endsWith("%")) {
306
+ let e = Number(t.slice(0, -1));
307
+ return Number.isFinite(e) ? Math.min(255, Math.max(0, Math.round(e / 100 * 255))) : void 0;
308
+ }
309
+ let n = Number(t);
310
+ if (Number.isFinite(n)) return Math.min(255, Math.max(0, Math.round(n)));
311
+ }
312
+ function Ne(e) {
313
+ return e.toString(16).padStart(2, "0");
314
+ }
315
+ function Pe(e) {
316
+ if (!e) return;
317
+ let t = e.trim();
318
+ if (/^#[0-9a-fA-F]{6}$/.test(t)) return t.toLowerCase();
319
+ if (/^#[0-9a-fA-F]{3}$/.test(t)) {
320
+ let [, e = "0", n = "0", r = "0"] = t;
321
+ return `#${e}${e}${n}${n}${r}${r}`.toLowerCase();
322
+ }
323
+ let n = t.match(/^rgba?\((.+)\)$/i);
324
+ if (n) {
325
+ let e = (n[1] ?? "").replace(/\//g, " ").split(/[,\s]+/).filter((e) => e.length > 0), t = Y(e[0] ?? ""), r = Y(e[1] ?? ""), i = Y(e[2] ?? "");
326
+ if (t !== void 0 && r !== void 0 && i !== void 0) return `#${Ne(t)}${Ne(r)}${Ne(i)}`;
327
+ }
328
+ }
329
+ function Fe(e) {
330
+ if (typeof document > "u" || typeof window > "u") return;
331
+ let t = document.createElement("span");
332
+ if (t.style.position = "fixed", t.style.left = "-9999px", t.style.top = "-9999px", t.style.color = "", t.style.color = e, t.style.color) {
333
+ document.body.appendChild(t);
334
+ try {
335
+ let e = window.getComputedStyle(t).color;
336
+ return Pe(e);
337
+ } finally {
338
+ t.remove();
339
+ }
340
+ }
341
+ }
342
+ function Ie(e) {
343
+ let t = Pe(e);
344
+ if (t) return t;
345
+ if (e) {
346
+ let t = Fe(e);
347
+ if (t) return t;
348
+ }
349
+ return Fe("var(--reinspect-menu-text)") || Fe("CanvasText") || E;
350
+ }
351
+ function Le(e) {
352
+ let t = Number(e);
353
+ if (Number.isFinite(t)) return t;
354
+ }
355
+ //#endregion
356
+ //#region src/reinspect/propsInspector.ts
357
+ var Re = 4, ze = 40, Be = 40, Ve = "__reinspect_placeholder__", He = "__reinspect__displayName__", X = "display", Z = Symbol("reinspect.omitSerialization"), Ue = new Set([
358
+ "$$typeof",
359
+ "_owner",
360
+ "_store",
361
+ "_self",
362
+ "_source"
363
+ ]);
364
+ function We(e, t) {
365
+ return { [He]: t };
366
+ }
367
+ function Ge(e) {
368
+ return typeof e == "object" && !!e && !Array.isArray(e);
369
+ }
370
+ function Ke(e) {
371
+ if (!Ge(e)) return !1;
372
+ let t = Object.getPrototypeOf(e);
373
+ return t === Object.prototype || t === null;
374
+ }
375
+ function qe(e) {
376
+ if (!Ge(e)) return !1;
377
+ let t = e[Ve];
378
+ if (t !== void 0 && typeof t != "string") return !1;
379
+ let n = e[He];
380
+ if (n !== void 0 && typeof n != "string") return !1;
381
+ let r = e[X];
382
+ return r !== void 0 && typeof r != "string" ? !1 : typeof t == "string" || typeof n == "string";
383
+ }
384
+ function Je(e) {
385
+ try {
386
+ return JSON.stringify(e, null, 2);
387
+ } catch {
388
+ return null;
389
+ }
390
+ }
391
+ function Ye(e) {
392
+ try {
393
+ let t = Function.prototype.toString.call(e);
394
+ return typeof t != "string" || t.trim().length === 0 ? "[Function source unavailable]" : t;
395
+ } catch {
396
+ return "[Function source unavailable]";
397
+ }
398
+ }
399
+ function Xe(e) {
400
+ let t = e.replace(/\s+/g, " ").trim();
401
+ return t.length <= 120 ? t : `${t.slice(0, 117)}...`;
402
+ }
403
+ function Ze(e) {
404
+ return e?.mode === "complete" ? "complete" : "distilled";
405
+ }
406
+ function Qe(e) {
407
+ return "$$typeof" in e && "props" in e;
408
+ }
409
+ function $e(e, t) {
410
+ let n = Object.entries(e);
411
+ return t !== "distilled" || !Qe(e) ? n : n.filter(([e]) => !Ue.has(e));
412
+ }
413
+ function et(e, t, n, r) {
414
+ let i = (e, t) => r === "complete" ? We(e, t) : Z;
415
+ if (n > Re) return i("truncated", "[Max depth reached]");
416
+ if (e === null) return null;
417
+ let a = typeof e;
418
+ if (a === "string" || a === "boolean") return e;
419
+ if (a === "number") return Number.isFinite(e) ? e : i("non-finite-number", String(e));
420
+ if (a === "undefined") return i("undefined", "undefined");
421
+ if (a === "bigint") return i("bigint", `${String(e)}n`);
422
+ if (a === "symbol") return i("symbol", String(e));
423
+ if (a === "function") return i("function", `[Function ${e.name || "anonymous"}]`);
424
+ if (e instanceof Date) return i("date", Number.isNaN(e.getTime()) ? "Invalid Date" : e.toISOString());
425
+ if (e instanceof RegExp) return i("regexp", e.toString());
426
+ if (a === "object") {
427
+ let a = e;
428
+ if (t.has(a)) return i("circular", "[Circular]");
429
+ if (t.add(a), Array.isArray(e)) {
430
+ let o = [], s = Math.min(e.length, Be);
431
+ for (let i = 0; i < s; i += 1) {
432
+ let a = et(e[i], t, n + 1, r);
433
+ a !== Z && o.push(a);
434
+ }
435
+ if (e.length > Be) {
436
+ let t = i("truncated", `${e.length - Be} more items`);
437
+ t !== Z && o.push(t);
438
+ }
439
+ return t.delete(a), o;
440
+ }
441
+ let o = {}, s = $e(e, r), c = Math.min(s.length, ze);
442
+ for (let e = 0; e < c; e += 1) {
443
+ let i = s[e];
444
+ if (!i) continue;
445
+ let [a, c] = i, l = et(c, t, n + 1, r);
446
+ l !== Z && (o[a] = l);
447
+ }
448
+ if (s.length > ze) {
449
+ let e = i("truncated", `${s.length - ze} more keys`);
450
+ e !== Z && (o.__reinspect_truncated__ = e);
451
+ }
452
+ return t.delete(a), o;
453
+ }
454
+ return i("unsupported", "[Unsupported value]");
455
+ }
456
+ function tt(e) {
457
+ if (e === null) return {
458
+ kind: "null",
459
+ summary: "null",
460
+ copyText: "null"
461
+ };
462
+ let t = typeof e;
463
+ if (t === "undefined") return {
464
+ kind: "undefined",
465
+ summary: "undefined",
466
+ copyText: "undefined"
467
+ };
468
+ if (t === "boolean") return {
469
+ kind: "boolean",
470
+ summary: String(e),
471
+ copyText: String(e)
472
+ };
473
+ if (t === "number") return {
474
+ kind: "number",
475
+ summary: String(e),
476
+ copyText: String(e)
477
+ };
478
+ if (t === "string") return {
479
+ kind: "string",
480
+ summary: JSON.stringify(e),
481
+ copyText: String(e)
482
+ };
483
+ if (t === "bigint") return {
484
+ kind: "bigint",
485
+ summary: `${String(e)}n`,
486
+ copyText: `${String(e)}n`
487
+ };
488
+ if (t === "symbol") {
489
+ let t = String(e);
490
+ return {
491
+ kind: "symbol",
492
+ summary: t,
493
+ copyText: t
494
+ };
495
+ }
496
+ if (t === "function") {
497
+ let t = e, n = Ye(t), r = t.name || "anonymous";
498
+ return {
499
+ kind: "function",
500
+ summary: `Function ${r}(${t.length})`,
501
+ copyText: n,
502
+ functionMeta: {
503
+ name: r,
504
+ arity: t.length,
505
+ preview: Xe(n),
506
+ source: n
507
+ }
508
+ };
509
+ }
510
+ if (e instanceof Date) {
511
+ let t = Number.isNaN(e.getTime()) ? "Invalid Date" : e.toISOString();
512
+ return {
513
+ kind: "date",
514
+ summary: `Date ${t}`,
515
+ copyText: t
516
+ };
517
+ }
518
+ if (e instanceof RegExp) {
519
+ let t = e.toString();
520
+ return {
521
+ kind: "regexp",
522
+ summary: t,
523
+ copyText: t
524
+ };
525
+ }
526
+ return Array.isArray(e) ? {
527
+ kind: "array",
528
+ summary: `Array(${e.length})`
529
+ } : Ge(e) ? {
530
+ kind: "object",
531
+ summary: `Object(${Object.keys(e).length})`
532
+ } : {
533
+ kind: "unknown",
534
+ summary: String(e)
535
+ };
536
+ }
537
+ function nt(e) {
538
+ if (!qe(e)) {
539
+ if (Array.isArray(e)) {
540
+ let t = [];
541
+ for (let n of e) {
542
+ let e = nt(n);
543
+ if (e === void 0) return;
544
+ t.push(e);
545
+ }
546
+ return t;
547
+ }
548
+ if (Ge(e)) {
549
+ let t = {};
550
+ for (let [n, r] of Object.entries(e)) {
551
+ let e = nt(r);
552
+ e !== void 0 && (t[n] = e);
553
+ }
554
+ return t;
555
+ }
556
+ return e;
557
+ }
558
+ }
559
+ function rt(e) {
560
+ return Object.keys(e).map((t) => ({
561
+ key: t,
562
+ value: tt(e[t])
563
+ }));
564
+ }
565
+ function it(e, t) {
566
+ let n = et(e, /* @__PURE__ */ new WeakSet(), 0, Ze(t));
567
+ return n === Z ? "{}" : Je(n) ?? "{}";
568
+ }
569
+ function at(e, t) {
570
+ let n = et(e, /* @__PURE__ */ new WeakSet(), 0, Ze(t));
571
+ return n === Z ? null : Je(n);
572
+ }
573
+ function ot(e) {
574
+ if (e === null) return !0;
575
+ let t = typeof e;
576
+ return t === "string" || t === "number" || t === "boolean" || Array.isArray(e) ? !0 : Ke(e);
577
+ }
578
+ function st(e) {
579
+ if (e === null) return !0;
580
+ let t = typeof e;
581
+ return t === "string" || t === "number" || t === "boolean" ? !0 : Array.isArray(e) ? e.every((e) => st(e)) : !1;
582
+ }
583
+ function ct(e) {
584
+ let t = e.trim();
585
+ if (t.length === 0) return {
586
+ parsed: null,
587
+ error: "Value JSON cannot be empty."
588
+ };
589
+ try {
590
+ let e = nt(JSON.parse(t));
591
+ return e === void 0 || !ot(e) ? {
592
+ parsed: null,
593
+ error: "Only objects, arrays, and primitive JSON values are editable."
594
+ } : {
595
+ parsed: e,
596
+ error: null
597
+ };
598
+ } catch {
599
+ return {
600
+ parsed: null,
601
+ error: "Invalid JSON. Fix syntax and try Apply again."
602
+ };
603
+ }
604
+ }
605
+ function lt(e) {
606
+ let t = e.trim();
607
+ if (t.length === 0) return {
608
+ parsed: {},
609
+ error: null
610
+ };
611
+ try {
612
+ let e = JSON.parse(t);
613
+ if (typeof e != "object" || !e || Array.isArray(e)) return {
614
+ parsed: null,
615
+ error: "Props JSON must be an object (example: {\"title\":\"Demo\"})."
616
+ };
617
+ let n = {};
618
+ for (let [t, r] of Object.entries(e)) {
619
+ let e = nt(r);
620
+ e !== void 0 && (n[t] = e);
621
+ }
622
+ return {
623
+ parsed: n,
624
+ error: null
625
+ };
626
+ } catch {
627
+ return {
628
+ parsed: null,
629
+ error: "Invalid JSON. Fix syntax and try Apply again."
630
+ };
631
+ }
632
+ }
633
+ //#endregion
634
+ //#region src/reinspect/wrapMarker.ts
635
+ var ut = Symbol.for("reinspect.wrapped");
636
+ function dt(e) {
637
+ return e[ut];
638
+ }
639
+ function ft(e, t) {
640
+ e[ut] = t;
641
+ }
642
+ //#endregion
643
+ //#region src/reinspect/core/renderCounter.ts
644
+ var pt = {
645
+ attempts: 0,
646
+ commits: 0
647
+ }, Q = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
648
+ function mt(e) {
649
+ let t = Q.get(e);
650
+ if (t) return t;
651
+ let n = {
652
+ attempts: 0,
653
+ commits: 0
654
+ };
655
+ return Q.set(e, n), n;
656
+ }
657
+ function ht(e) {
658
+ let t = $.get(e);
659
+ if (t) for (let e of t) e();
660
+ }
661
+ function gt(e) {
662
+ let t = mt(e);
663
+ Q.set(e, {
664
+ attempts: t.attempts + 1,
665
+ commits: t.commits + 1
666
+ }), ht(e);
667
+ }
668
+ function _t(e) {
669
+ return Q.get(e) || pt;
670
+ }
671
+ function vt(e) {
672
+ Q.delete(e), ht(e);
673
+ }
674
+ function yt(e, t) {
675
+ let n = $.get(e);
676
+ return n ? n.add(t) : $.set(e, new Set([t])), () => {
677
+ let n = $.get(e);
678
+ n && (n.delete(t), n.size === 0 && $.delete(e));
679
+ };
680
+ }
681
+ function bt(e) {
682
+ return c(n((t) => yt(e, t), [e]), n(() => _t(e), [e]), () => pt);
683
+ }
684
+ function xt(e, t) {
685
+ return t === "commits" ? `${e.commits} commits` : t === "both" ? `${e.attempts} attempts | ${e.commits} commits` : `${e.attempts} attempts`;
686
+ }
687
+ //#endregion
688
+ //#region node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-javascript.js
689
+ var St = /* @__PURE__ */ y((/* @__PURE__ */ ee(((e, t) => {
690
+ var n = function(e) {
691
+ var t = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, n = 0, r = {}, i = {
692
+ manual: e.Prism && e.Prism.manual,
693
+ disableWorkerMessageHandler: e.Prism && e.Prism.disableWorkerMessageHandler,
694
+ util: {
695
+ encode: function e(t) {
696
+ return t instanceof a ? new a(t.type, e(t.content), t.alias) : Array.isArray(t) ? t.map(e) : t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
697
+ },
698
+ type: function(e) {
699
+ return Object.prototype.toString.call(e).slice(8, -1);
700
+ },
701
+ objId: function(e) {
702
+ return e.__id || Object.defineProperty(e, "__id", { value: ++n }), e.__id;
703
+ },
704
+ clone: function e(t, n) {
705
+ n ||= {};
706
+ var r, a;
707
+ switch (i.util.type(t)) {
708
+ case "Object":
709
+ if (a = i.util.objId(t), n[a]) return n[a];
710
+ for (var o in r = {}, n[a] = r, t) t.hasOwnProperty(o) && (r[o] = e(t[o], n));
711
+ return r;
712
+ case "Array": return a = i.util.objId(t), n[a] ? n[a] : (r = [], n[a] = r, t.forEach(function(t, i) {
713
+ r[i] = e(t, n);
714
+ }), r);
715
+ default: return t;
716
+ }
717
+ },
718
+ getLanguage: function(e) {
719
+ for (; e;) {
720
+ var n = t.exec(e.className);
721
+ if (n) return n[1].toLowerCase();
722
+ e = e.parentElement;
723
+ }
724
+ return "none";
725
+ },
726
+ setLanguage: function(e, n) {
727
+ e.className = e.className.replace(RegExp(t, "gi"), ""), e.classList.add("language-" + n);
728
+ },
729
+ currentScript: function() {
730
+ if (typeof document > "u") return null;
731
+ if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
732
+ try {
733
+ throw Error();
734
+ } catch (r) {
735
+ var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) || [])[1];
736
+ if (e) {
737
+ var t = document.getElementsByTagName("script");
738
+ for (var n in t) if (t[n].src == e) return t[n];
739
+ }
740
+ return null;
741
+ }
742
+ },
743
+ isActive: function(e, t, n) {
744
+ for (var r = "no-" + t; e;) {
745
+ var i = e.classList;
746
+ if (i.contains(t)) return !0;
747
+ if (i.contains(r)) return !1;
748
+ e = e.parentElement;
749
+ }
750
+ return !!n;
751
+ }
752
+ },
753
+ languages: {
754
+ plain: r,
755
+ plaintext: r,
756
+ text: r,
757
+ txt: r,
758
+ extend: function(e, t) {
759
+ var n = i.util.clone(i.languages[e]);
760
+ for (var r in t) n[r] = t[r];
761
+ return n;
762
+ },
763
+ insertBefore: function(e, t, n, r) {
764
+ r ||= i.languages;
765
+ var a = r[e], o = {};
766
+ for (var s in a) if (a.hasOwnProperty(s)) {
767
+ if (s == t) for (var c in n) n.hasOwnProperty(c) && (o[c] = n[c]);
768
+ n.hasOwnProperty(s) || (o[s] = a[s]);
769
+ }
770
+ var l = r[e];
771
+ return r[e] = o, i.languages.DFS(i.languages, function(t, n) {
772
+ n === l && t != e && (this[t] = o);
773
+ }), o;
774
+ },
775
+ DFS: function e(t, n, r, a) {
776
+ a ||= {};
777
+ var o = i.util.objId;
778
+ for (var s in t) if (t.hasOwnProperty(s)) {
779
+ n.call(t, s, t[s], r || s);
780
+ var c = t[s], l = i.util.type(c);
781
+ l === "Object" && !a[o(c)] ? (a[o(c)] = !0, e(c, n, null, a)) : l === "Array" && !a[o(c)] && (a[o(c)] = !0, e(c, n, s, a));
782
+ }
783
+ }
784
+ },
785
+ plugins: {},
786
+ highlightAll: function(e, t) {
787
+ i.highlightAllUnder(document, e, t);
788
+ },
789
+ highlightAllUnder: function(e, t, n) {
790
+ var r = {
791
+ callback: n,
792
+ container: e,
793
+ selector: "code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code"
794
+ };
795
+ i.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), i.hooks.run("before-all-elements-highlight", r);
796
+ for (var a = 0, o; o = r.elements[a++];) i.highlightElement(o, t === !0, r.callback);
797
+ },
798
+ highlightElement: function(t, n, r) {
799
+ var a = i.util.getLanguage(t), o = i.languages[a];
800
+ i.util.setLanguage(t, a);
801
+ var s = t.parentElement;
802
+ s && s.nodeName.toLowerCase() === "pre" && i.util.setLanguage(s, a);
803
+ var c = {
804
+ element: t,
805
+ language: a,
806
+ grammar: o,
807
+ code: t.textContent
808
+ };
809
+ function l(e) {
810
+ c.highlightedCode = e, i.hooks.run("before-insert", c), c.element.innerHTML = c.highlightedCode, i.hooks.run("after-highlight", c), i.hooks.run("complete", c), r && r.call(c.element);
811
+ }
812
+ if (i.hooks.run("before-sanity-check", c), s = c.element.parentElement, s && s.nodeName.toLowerCase() === "pre" && !s.hasAttribute("tabindex") && s.setAttribute("tabindex", "0"), !c.code) {
813
+ i.hooks.run("complete", c), r && r.call(c.element);
814
+ return;
815
+ }
816
+ if (i.hooks.run("before-highlight", c), !c.grammar) {
817
+ l(i.util.encode(c.code));
818
+ return;
819
+ }
820
+ if (n && e.Worker) {
821
+ var u = new Worker(i.filename);
822
+ u.onmessage = function(e) {
823
+ l(e.data);
824
+ }, u.postMessage(JSON.stringify({
825
+ language: c.language,
826
+ code: c.code,
827
+ immediateClose: !0
828
+ }));
829
+ } else l(i.highlight(c.code, c.grammar, c.language));
830
+ },
831
+ highlight: function(e, t, n) {
832
+ var r = {
833
+ code: e,
834
+ grammar: t,
835
+ language: n
836
+ };
837
+ if (i.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
838
+ return r.tokens = i.tokenize(r.code, r.grammar), i.hooks.run("after-tokenize", r), a.stringify(i.util.encode(r.tokens), r.language);
839
+ },
840
+ tokenize: function(e, t) {
841
+ var n = t.rest;
842
+ if (n) {
843
+ for (var r in n) t[r] = n[r];
844
+ delete t.rest;
845
+ }
846
+ var i = new c();
847
+ return l(i, i.head, e), s(e, i, t, i.head, 0), d(i);
848
+ },
849
+ hooks: {
850
+ all: {},
851
+ add: function(e, t) {
852
+ var n = i.hooks.all;
853
+ n[e] = n[e] || [], n[e].push(t);
854
+ },
855
+ run: function(e, t) {
856
+ var n = i.hooks.all[e];
857
+ if (!(!n || !n.length)) for (var r = 0, a; a = n[r++];) a(t);
858
+ }
859
+ },
860
+ Token: a
861
+ };
862
+ e.Prism = i;
863
+ function a(e, t, n, r) {
864
+ this.type = e, this.content = t, this.alias = n, this.length = (r || "").length | 0;
865
+ }
866
+ a.stringify = function e(t, n) {
867
+ if (typeof t == "string") return t;
868
+ if (Array.isArray(t)) {
869
+ var r = "";
870
+ return t.forEach(function(t) {
871
+ r += e(t, n);
872
+ }), r;
873
+ }
874
+ var a = {
875
+ type: t.type,
876
+ content: e(t.content, n),
877
+ tag: "span",
878
+ classes: ["token", t.type],
879
+ attributes: {},
880
+ language: n
881
+ }, o = t.alias;
882
+ o && (Array.isArray(o) ? Array.prototype.push.apply(a.classes, o) : a.classes.push(o)), i.hooks.run("wrap", a);
883
+ var s = "";
884
+ for (var c in a.attributes) s += " " + c + "=\"" + (a.attributes[c] || "").replace(/"/g, "&quot;") + "\"";
885
+ return "<" + a.tag + " class=\"" + a.classes.join(" ") + "\"" + s + ">" + a.content + "</" + a.tag + ">";
886
+ };
887
+ function o(e, t, n, r) {
888
+ e.lastIndex = t;
889
+ var i = e.exec(n);
890
+ if (i && r && i[1]) {
891
+ var a = i[1].length;
892
+ i.index += a, i[0] = i[0].slice(a);
893
+ }
894
+ return i;
895
+ }
896
+ function s(e, t, n, r, c, d) {
897
+ for (var f in n) if (!(!n.hasOwnProperty(f) || !n[f])) {
898
+ var p = n[f];
899
+ p = Array.isArray(p) ? p : [p];
900
+ for (var m = 0; m < p.length; ++m) {
901
+ if (d && d.cause == f + "," + m) return;
902
+ var h = p[m], g = h.inside, _ = !!h.lookbehind, v = !!h.greedy, ee = h.alias;
903
+ if (v && !h.pattern.global) {
904
+ var te = h.pattern.toString().match(/[imsuy]*$/)[0];
905
+ h.pattern = RegExp(h.pattern.source, te + "g");
906
+ }
907
+ for (var y = h.pattern || h, b = r.next, x = c; b !== t.tail && !(d && x >= d.reach); x += b.value.length, b = b.next) {
908
+ var S = b.value;
909
+ if (t.length > e.length) return;
910
+ if (!(S instanceof a)) {
911
+ var C = 1, w;
912
+ if (v) {
913
+ if (w = o(y, x, e, _), !w || w.index >= e.length) break;
914
+ var ne = w.index, T = w.index + w[0].length, E = x;
915
+ for (E += b.value.length; ne >= E;) b = b.next, E += b.value.length;
916
+ if (E -= b.value.length, x = E, b.value instanceof a) continue;
917
+ for (var D = b; D !== t.tail && (E < T || typeof D.value == "string"); D = D.next) C++, E += D.value.length;
918
+ C--, S = e.slice(x, E), w.index -= x;
919
+ } else if (w = o(y, 0, S, _), !w) continue;
920
+ var ne = w.index, re = w[0], O = S.slice(0, ne), k = S.slice(ne + re.length), A = x + S.length;
921
+ d && A > d.reach && (d.reach = A);
922
+ var j = b.prev;
923
+ O && (j = l(t, j, O), x += O.length), u(t, j, C);
924
+ var M = new a(f, g ? i.tokenize(re, g) : re, ee, re);
925
+ if (b = l(t, j, M), k && l(t, b, k), C > 1) {
926
+ var N = {
927
+ cause: f + "," + m,
928
+ reach: A
929
+ };
930
+ s(e, t, n, b.prev, x, N), d && N.reach > d.reach && (d.reach = N.reach);
931
+ }
932
+ }
933
+ }
934
+ }
935
+ }
936
+ }
937
+ function c() {
938
+ var e = {
939
+ value: null,
940
+ prev: null,
941
+ next: null
942
+ }, t = {
943
+ value: null,
944
+ prev: e,
945
+ next: null
946
+ };
947
+ e.next = t, this.head = e, this.tail = t, this.length = 0;
948
+ }
949
+ function l(e, t, n) {
950
+ var r = t.next, i = {
951
+ value: n,
952
+ prev: t,
953
+ next: r
954
+ };
955
+ return t.next = i, r.prev = i, e.length++, i;
956
+ }
957
+ function u(e, t, n) {
958
+ for (var r = t.next, i = 0; i < n && r !== e.tail; i++) r = r.next;
959
+ t.next = r, r.prev = t, e.length -= i;
960
+ }
961
+ function d(e) {
962
+ for (var t = [], n = e.head.next; n !== e.tail;) t.push(n.value), n = n.next;
963
+ return t;
964
+ }
965
+ if (!e.document) return e.addEventListener && (i.disableWorkerMessageHandler || e.addEventListener("message", function(t) {
966
+ var n = JSON.parse(t.data), r = n.language, a = n.code, o = n.immediateClose;
967
+ e.postMessage(i.highlight(a, i.languages[r], r)), o && e.close();
968
+ }, !1)), i;
969
+ var f = i.util.currentScript();
970
+ f && (i.filename = f.src, f.hasAttribute("data-manual") && (i.manual = !0));
971
+ function p() {
972
+ i.manual || i.highlightAll();
973
+ }
974
+ if (!i.manual) {
975
+ var m = document.readyState;
976
+ m === "loading" || m === "interactive" && f && f.defer ? document.addEventListener("DOMContentLoaded", p) : window.requestAnimationFrame ? window.requestAnimationFrame(p) : window.setTimeout(p, 16);
977
+ }
978
+ return i;
979
+ }(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
980
+ t !== void 0 && t.exports && (t.exports = n), typeof global < "u" && (global.Prism = n), n.languages.markup = {
981
+ comment: {
982
+ pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
983
+ greedy: !0
984
+ },
985
+ prolog: {
986
+ pattern: /<\?[\s\S]+?\?>/,
987
+ greedy: !0
988
+ },
989
+ doctype: {
990
+ pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
991
+ greedy: !0,
992
+ inside: {
993
+ "internal-subset": {
994
+ pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
995
+ lookbehind: !0,
996
+ greedy: !0,
997
+ inside: null
998
+ },
999
+ string: {
1000
+ pattern: /"[^"]*"|'[^']*'/,
1001
+ greedy: !0
1002
+ },
1003
+ punctuation: /^<!|>$|[[\]]/,
1004
+ "doctype-tag": /^DOCTYPE/i,
1005
+ name: /[^\s<>'"]+/
1006
+ }
1007
+ },
1008
+ cdata: {
1009
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1010
+ greedy: !0
1011
+ },
1012
+ tag: {
1013
+ pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
1014
+ greedy: !0,
1015
+ inside: {
1016
+ tag: {
1017
+ pattern: /^<\/?[^\s>\/]+/,
1018
+ inside: {
1019
+ punctuation: /^<\/?/,
1020
+ namespace: /^[^\s>\/:]+:/
1021
+ }
1022
+ },
1023
+ "special-attr": [],
1024
+ "attr-value": {
1025
+ pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
1026
+ inside: { punctuation: [{
1027
+ pattern: /^=/,
1028
+ alias: "attr-equals"
1029
+ }, {
1030
+ pattern: /^(\s*)["']|["']$/,
1031
+ lookbehind: !0
1032
+ }] }
1033
+ },
1034
+ punctuation: /\/?>/,
1035
+ "attr-name": {
1036
+ pattern: /[^\s>\/]+/,
1037
+ inside: { namespace: /^[^\s>\/:]+:/ }
1038
+ }
1039
+ }
1040
+ },
1041
+ entity: [{
1042
+ pattern: /&[\da-z]{1,8};/i,
1043
+ alias: "named-entity"
1044
+ }, /&#x?[\da-f]{1,8};/i]
1045
+ }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(e) {
1046
+ e.type === "entity" && (e.attributes.title = e.content.replace(/&amp;/, "&"));
1047
+ }), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(e, t) {
1048
+ var r = {};
1049
+ r["language-" + t] = {
1050
+ pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1051
+ lookbehind: !0,
1052
+ inside: n.languages[t]
1053
+ }, r.cdata = /^<!\[CDATA\[|\]\]>$/i;
1054
+ var i = { "included-cdata": {
1055
+ pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1056
+ inside: r
1057
+ } };
1058
+ i["language-" + t] = {
1059
+ pattern: /[\s\S]+/,
1060
+ inside: n.languages[t]
1061
+ };
1062
+ var a = {};
1063
+ a[e] = {
1064
+ pattern: RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)".replace(/__/g, function() {
1065
+ return e;
1066
+ }), "i"),
1067
+ lookbehind: !0,
1068
+ greedy: !0,
1069
+ inside: i
1070
+ }, n.languages.insertBefore("markup", "cdata", a);
1071
+ } }), Object.defineProperty(n.languages.markup.tag, "addAttribute", { value: function(e, t) {
1072
+ n.languages.markup.tag.inside["special-attr"].push({
1073
+ pattern: RegExp("(^|[\"'\\s])(?:" + e + ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))", "i"),
1074
+ lookbehind: !0,
1075
+ inside: {
1076
+ "attr-name": /^[^\s=]+/,
1077
+ "attr-value": {
1078
+ pattern: /=[\s\S]+/,
1079
+ inside: {
1080
+ value: {
1081
+ pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
1082
+ lookbehind: !0,
1083
+ alias: [t, "language-" + t],
1084
+ inside: n.languages[t]
1085
+ },
1086
+ punctuation: [{
1087
+ pattern: /^=/,
1088
+ alias: "attr-equals"
1089
+ }, /"|'/]
1090
+ }
1091
+ }
1092
+ }
1093
+ });
1094
+ } }), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, (function(e) {
1095
+ var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1096
+ e.languages.css = {
1097
+ comment: /\/\*[\s\S]*?\*\//,
1098
+ atrule: {
1099
+ pattern: RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|" + t.source + ")*?(?:;|(?=\\s*\\{))"),
1100
+ inside: {
1101
+ rule: /^@[\w-]+/,
1102
+ "selector-function-argument": {
1103
+ pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
1104
+ lookbehind: !0,
1105
+ alias: "selector"
1106
+ },
1107
+ keyword: {
1108
+ pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
1109
+ lookbehind: !0
1110
+ }
1111
+ }
1112
+ },
1113
+ url: {
1114
+ pattern: RegExp("\\burl\\((?:" + t.source + "|(?:[^\\\\\\r\\n()\"']|\\\\[\\s\\S])*)\\)", "i"),
1115
+ greedy: !0,
1116
+ inside: {
1117
+ function: /^url/i,
1118
+ punctuation: /^\(|\)$/,
1119
+ string: {
1120
+ pattern: RegExp("^" + t.source + "$"),
1121
+ alias: "url"
1122
+ }
1123
+ }
1124
+ },
1125
+ selector: {
1126
+ pattern: RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + t.source + ")*(?=\\s*\\{)"),
1127
+ lookbehind: !0
1128
+ },
1129
+ string: {
1130
+ pattern: t,
1131
+ greedy: !0
1132
+ },
1133
+ property: {
1134
+ pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
1135
+ lookbehind: !0
1136
+ },
1137
+ important: /!important\b/i,
1138
+ function: {
1139
+ pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
1140
+ lookbehind: !0
1141
+ },
1142
+ punctuation: /[(){};:,]/
1143
+ }, e.languages.css.atrule.inside.rest = e.languages.css;
1144
+ var n = e.languages.markup;
1145
+ n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
1146
+ })(n), n.languages.clike = {
1147
+ comment: [{
1148
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
1149
+ lookbehind: !0,
1150
+ greedy: !0
1151
+ }, {
1152
+ pattern: /(^|[^\\:])\/\/.*/,
1153
+ lookbehind: !0,
1154
+ greedy: !0
1155
+ }],
1156
+ string: {
1157
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
1158
+ greedy: !0
1159
+ },
1160
+ "class-name": {
1161
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
1162
+ lookbehind: !0,
1163
+ inside: { punctuation: /[.\\]/ }
1164
+ },
1165
+ keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
1166
+ boolean: /\b(?:false|true)\b/,
1167
+ function: /\b\w+(?=\()/,
1168
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
1169
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
1170
+ punctuation: /[{}[\];(),.:]/
1171
+ }, n.languages.javascript = n.languages.extend("clike", {
1172
+ "class-name": [n.languages.clike["class-name"], {
1173
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1174
+ lookbehind: !0
1175
+ }],
1176
+ keyword: [{
1177
+ pattern: /((?:^|\})\s*)catch\b/,
1178
+ lookbehind: !0
1179
+ }, {
1180
+ pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
1181
+ lookbehind: !0
1182
+ }],
1183
+ function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1184
+ number: {
1185
+ pattern: RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),
1186
+ lookbehind: !0
1187
+ },
1188
+ operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1189
+ }), n.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, n.languages.insertBefore("javascript", "keyword", {
1190
+ regex: {
1191
+ pattern: RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))"),
1192
+ lookbehind: !0,
1193
+ greedy: !0,
1194
+ inside: {
1195
+ "regex-source": {
1196
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1197
+ lookbehind: !0,
1198
+ alias: "language-regex",
1199
+ inside: n.languages.regex
1200
+ },
1201
+ "regex-delimiter": /^\/|\/$/,
1202
+ "regex-flags": /^[a-z]+$/
1203
+ }
1204
+ },
1205
+ "function-variable": {
1206
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
1207
+ alias: "function"
1208
+ },
1209
+ parameter: [
1210
+ {
1211
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1212
+ lookbehind: !0,
1213
+ inside: n.languages.javascript
1214
+ },
1215
+ {
1216
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1217
+ lookbehind: !0,
1218
+ inside: n.languages.javascript
1219
+ },
1220
+ {
1221
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1222
+ lookbehind: !0,
1223
+ inside: n.languages.javascript
1224
+ },
1225
+ {
1226
+ pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
1227
+ lookbehind: !0,
1228
+ inside: n.languages.javascript
1229
+ }
1230
+ ],
1231
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1232
+ }), n.languages.insertBefore("javascript", "string", {
1233
+ hashbang: {
1234
+ pattern: /^#!.*/,
1235
+ greedy: !0,
1236
+ alias: "comment"
1237
+ },
1238
+ "template-string": {
1239
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1240
+ greedy: !0,
1241
+ inside: {
1242
+ "template-punctuation": {
1243
+ pattern: /^`|`$/,
1244
+ alias: "string"
1245
+ },
1246
+ interpolation: {
1247
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1248
+ lookbehind: !0,
1249
+ inside: {
1250
+ "interpolation-punctuation": {
1251
+ pattern: /^\$\{|\}$/,
1252
+ alias: "punctuation"
1253
+ },
1254
+ rest: n.languages.javascript
1255
+ }
1256
+ },
1257
+ string: /[\s\S]+/
1258
+ }
1259
+ },
1260
+ "string-property": {
1261
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1262
+ lookbehind: !0,
1263
+ greedy: !0,
1264
+ alias: "property"
1265
+ }
1266
+ }), n.languages.insertBefore("javascript", "operator", { "literal-property": {
1267
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1268
+ lookbehind: !0,
1269
+ alias: "property"
1270
+ } }), n.languages.markup && (n.languages.markup.tag.addInlined("script", "javascript"), n.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), n.languages.js = n.languages.javascript, (function() {
1271
+ if (n === void 0 || typeof document > "u") return;
1272
+ Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
1273
+ var e = "Loading…", t = function(e, t) {
1274
+ return "✖ Error " + e + " while fetching file: " + t;
1275
+ }, r = "✖ Error: File does not exist or is empty", i = {
1276
+ js: "javascript",
1277
+ py: "python",
1278
+ rb: "ruby",
1279
+ ps1: "powershell",
1280
+ psm1: "powershell",
1281
+ sh: "bash",
1282
+ bat: "batch",
1283
+ h: "c",
1284
+ tex: "latex"
1285
+ }, a = "data-src-status", o = "loading", s = "loaded", c = "failed", l = "pre[data-src]:not([" + a + "=\"" + s + "\"]):not([" + a + "=\"" + o + "\"])";
1286
+ function u(e, n, i) {
1287
+ var a = new XMLHttpRequest();
1288
+ a.open("GET", e, !0), a.onreadystatechange = function() {
1289
+ a.readyState == 4 && (a.status < 400 && a.responseText ? n(a.responseText) : a.status >= 400 ? i(t(a.status, a.statusText)) : i(r));
1290
+ }, a.send(null);
1291
+ }
1292
+ function d(e) {
1293
+ var t = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e || "");
1294
+ if (t) {
1295
+ var n = Number(t[1]), r = t[2], i = t[3];
1296
+ return r ? i ? [n, Number(i)] : [n, void 0] : [n, n];
1297
+ }
1298
+ }
1299
+ n.hooks.add("before-highlightall", function(e) {
1300
+ e.selector += ", " + l;
1301
+ }), n.hooks.add("before-sanity-check", function(t) {
1302
+ var r = t.element;
1303
+ if (r.matches(l)) {
1304
+ t.code = "", r.setAttribute(a, o);
1305
+ var f = r.appendChild(document.createElement("CODE"));
1306
+ f.textContent = e;
1307
+ var p = r.getAttribute("data-src"), m = t.language;
1308
+ if (m === "none") {
1309
+ var h = (/\.(\w+)$/.exec(p) || [, "none"])[1];
1310
+ m = i[h] || h;
1311
+ }
1312
+ n.util.setLanguage(f, m), n.util.setLanguage(r, m);
1313
+ var g = n.plugins.autoloader;
1314
+ g && g.loadLanguages(m), u(p, function(e) {
1315
+ r.setAttribute(a, s);
1316
+ var t = d(r.getAttribute("data-range"));
1317
+ if (t) {
1318
+ var i = e.split(/\r\n?|\n/g), o = t[0], c = t[1] == null ? i.length : t[1];
1319
+ o < 0 && (o += i.length), o = Math.max(0, Math.min(o - 1, i.length)), c < 0 && (c += i.length), c = Math.max(0, Math.min(c, i.length)), e = i.slice(o, c).join("\n"), r.hasAttribute("data-start") || r.setAttribute("data-start", String(o + 1));
1320
+ }
1321
+ f.textContent = e, n.highlightElement(f);
1322
+ }, function(e) {
1323
+ r.setAttribute(a, c), f.textContent = e;
1324
+ });
1325
+ }
1326
+ }), n.plugins.fileHighlight = { highlight: function(e) {
1327
+ for (var t = (e || document).querySelectorAll(l), r = 0, i; i = t[r++];) n.highlightElement(i);
1328
+ } };
1329
+ var f = !1;
1330
+ n.fileHighlight = function() {
1331
+ f ||= (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
1332
+ };
1333
+ })();
1334
+ })))(), 1);
1335
+ Prism.languages.javascript = Prism.languages.extend("clike", {
1336
+ "class-name": [Prism.languages.clike["class-name"], {
1337
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
1338
+ lookbehind: !0
1339
+ }],
1340
+ keyword: [{
1341
+ pattern: /((?:^|\})\s*)catch\b/,
1342
+ lookbehind: !0
1343
+ }, {
1344
+ pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
1345
+ lookbehind: !0
1346
+ }],
1347
+ function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
1348
+ number: {
1349
+ pattern: RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),
1350
+ lookbehind: !0
1351
+ },
1352
+ operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
1353
+ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", {
1354
+ regex: {
1355
+ pattern: RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))"),
1356
+ lookbehind: !0,
1357
+ greedy: !0,
1358
+ inside: {
1359
+ "regex-source": {
1360
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
1361
+ lookbehind: !0,
1362
+ alias: "language-regex",
1363
+ inside: Prism.languages.regex
1364
+ },
1365
+ "regex-delimiter": /^\/|\/$/,
1366
+ "regex-flags": /^[a-z]+$/
1367
+ }
1368
+ },
1369
+ "function-variable": {
1370
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
1371
+ alias: "function"
1372
+ },
1373
+ parameter: [
1374
+ {
1375
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
1376
+ lookbehind: !0,
1377
+ inside: Prism.languages.javascript
1378
+ },
1379
+ {
1380
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
1381
+ lookbehind: !0,
1382
+ inside: Prism.languages.javascript
1383
+ },
1384
+ {
1385
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
1386
+ lookbehind: !0,
1387
+ inside: Prism.languages.javascript
1388
+ },
1389
+ {
1390
+ pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
1391
+ lookbehind: !0,
1392
+ inside: Prism.languages.javascript
1393
+ }
1394
+ ],
1395
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
1396
+ }), Prism.languages.insertBefore("javascript", "string", {
1397
+ hashbang: {
1398
+ pattern: /^#!.*/,
1399
+ greedy: !0,
1400
+ alias: "comment"
1401
+ },
1402
+ "template-string": {
1403
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
1404
+ greedy: !0,
1405
+ inside: {
1406
+ "template-punctuation": {
1407
+ pattern: /^`|`$/,
1408
+ alias: "string"
1409
+ },
1410
+ interpolation: {
1411
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
1412
+ lookbehind: !0,
1413
+ inside: {
1414
+ "interpolation-punctuation": {
1415
+ pattern: /^\$\{|\}$/,
1416
+ alias: "punctuation"
1417
+ },
1418
+ rest: Prism.languages.javascript
1419
+ }
1420
+ },
1421
+ string: /[\s\S]+/
1422
+ }
1423
+ },
1424
+ "string-property": {
1425
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
1426
+ lookbehind: !0,
1427
+ greedy: !0,
1428
+ alias: "property"
1429
+ }
1430
+ }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": {
1431
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
1432
+ lookbehind: !0,
1433
+ alias: "property"
1434
+ } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.json = {
1435
+ property: {
1436
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
1437
+ lookbehind: !0,
1438
+ greedy: !0
1439
+ },
1440
+ string: {
1441
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
1442
+ lookbehind: !0,
1443
+ greedy: !0
1444
+ },
1445
+ comment: {
1446
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
1447
+ greedy: !0
1448
+ },
1449
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
1450
+ punctuation: /[{}[\],]/,
1451
+ operator: /:/,
1452
+ boolean: /\b(?:false|true)\b/,
1453
+ null: {
1454
+ pattern: /\bnull\b/,
1455
+ alias: "keyword"
1456
+ }
1457
+ }, Prism.languages.webmanifest = Prism.languages.json;
1458
+ //#endregion
1459
+ //#region src/reinspect/syntaxHighlight.ts
1460
+ function Ct(e) {
1461
+ return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
1462
+ }
1463
+ function wt(e) {
1464
+ return St.languages[e] ?? null;
1465
+ }
1466
+ function Tt(e, t) {
1467
+ let n = wt(t);
1468
+ if (!n) return Ct(e);
1469
+ try {
1470
+ return St.highlight(e, n, t);
1471
+ } catch {
1472
+ return Ct(e);
1473
+ }
1474
+ }
1475
+ //#endregion
1476
+ //#region src/reinspect/react/overlay.tsx
1477
+ function Et({ value: e }) {
1478
+ if (e.kind === "function" && e.functionMeta) {
1479
+ let t = e.functionMeta;
1480
+ return /* @__PURE__ */ d("div", {
1481
+ className: "reinspect-prop-function",
1482
+ children: [/* @__PURE__ */ u("code", { children: e.summary }), /* @__PURE__ */ u("pre", { children: /* @__PURE__ */ u("code", {
1483
+ className: "language-javascript reinspect-code-block",
1484
+ dangerouslySetInnerHTML: { __html: Tt(t.preview, "javascript") }
1485
+ }) })]
1486
+ });
1487
+ }
1488
+ return /* @__PURE__ */ u("div", {
1489
+ className: "reinspect-prop-scalar",
1490
+ children: /* @__PURE__ */ u("code", { children: e.summary })
1491
+ });
1492
+ }
1493
+ function Dt({ instanceId: e, counterMode: t }) {
1494
+ return /* @__PURE__ */ u(l, { children: xt(bt(e), t) });
1495
+ }
1496
+ //#endregion
1497
+ //#region src/reinspect/react/wrap.tsx
1498
+ var Ot = {
1499
+ enabled: !1,
1500
+ startActive: !1,
1501
+ showFloatingToggle: !1,
1502
+ inspectMode: "wrapped",
1503
+ inspectWhitelist: {
1504
+ patterns: [],
1505
+ regex: !1,
1506
+ wholeWord: !1,
1507
+ matchCase: !1
1508
+ },
1509
+ inspectBlacklist: {
1510
+ patterns: [],
1511
+ regex: !1,
1512
+ wholeWord: !1,
1513
+ matchCase: !1
1514
+ },
1515
+ editableProps: [],
1516
+ zIndexBase: 0,
1517
+ renderCounters: "off",
1518
+ countRendersForComponents: [],
1519
+ propsSerializationMode: "distilled",
1520
+ menuTheme: "light",
1521
+ menuOpenGesture: {
1522
+ mode: "right-click",
1523
+ modifiers: {
1524
+ ctrl: !1,
1525
+ alt: !1,
1526
+ shift: !0,
1527
+ meta: !1
1528
+ }
1529
+ }
1530
+ }, kt = 0, At = 12, jt = 560, Mt = 620, Nt = "children can only be null, primitive values, or arrays of primitive values.";
1531
+ function Pt(e) {
1532
+ return kt += 1, `${e}-${kt.toString(36)}`;
1533
+ }
1534
+ function Ft(e) {
1535
+ let t = e.replace(/([A-Z])/g, " $1").trim(), n = t.slice(0, 1);
1536
+ return t.length > 0 ? n.toUpperCase() + t.slice(1) : e;
1537
+ }
1538
+ function It(e) {
1539
+ return e.trim().toLowerCase().replace(/[\s_-]+/g, "");
1540
+ }
1541
+ function Lt(e) {
1542
+ return e != null && e !== "";
1543
+ }
1544
+ function Rt(e) {
1545
+ return e.replace(/[^a-zA-Z0-9_-]/g, "-");
1546
+ }
1547
+ function zt(e) {
1548
+ return e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
1549
+ }
1550
+ function Bt(e) {
1551
+ if (!e) return !0;
1552
+ let t = e.trim().toLowerCase();
1553
+ if (t === "transparent") return !0;
1554
+ let n = t.match(/^rgba?\((.+)\)$/i);
1555
+ if (!n) return !1;
1556
+ let [, r = ""] = n, i = r.replace(/\//g, " ").split(/[,\s]+/).filter((e) => e.length > 0);
1557
+ if (i.length < 4) return !1;
1558
+ let a = i[3];
1559
+ if (!a) return !1;
1560
+ let o = a.endsWith("%") ? Number(a.slice(0, -1)) / 100 : Number(a);
1561
+ return Number.isFinite(o) && o <= 0;
1562
+ }
1563
+ function Vt(e, t, n) {
1564
+ if (typeof window > "u") return e;
1565
+ let r = At, i = At, a = Math.max(r, window.innerWidth - t - At), o = Math.max(i, window.innerHeight - n - At);
1566
+ return {
1567
+ x: Math.min(Math.max(e.x, r), a),
1568
+ y: Math.min(Math.max(e.y, i), o)
1569
+ };
1570
+ }
1571
+ function Ht(e, t) {
1572
+ return e.includes(t) ? [...e] : [...e, t];
1573
+ }
1574
+ function Ut(e, t) {
1575
+ return e.includes(t) ? e.filter((e) => e !== t) : Ht(e, t);
1576
+ }
1577
+ function Wt(e, t) {
1578
+ if (t.mode === "right-click") return !0;
1579
+ let n = t.modifiers;
1580
+ return !(n.ctrl && !e.ctrlKey || n.alt && !e.altKey || n.shift && !e.shiftKey || n.meta && !e.metaKey);
1581
+ }
1582
+ function Gt(e) {
1583
+ if (!Object.prototype.hasOwnProperty.call(e, "children") || st(e.children)) return e;
1584
+ let t = { ...e };
1585
+ return delete t.children, t;
1586
+ }
1587
+ function Kt() {
1588
+ return /* @__PURE__ */ u("svg", {
1589
+ viewBox: "0 0 16 16",
1590
+ "aria-hidden": "true",
1591
+ focusable: "false",
1592
+ children: /* @__PURE__ */ u("path", {
1593
+ d: "M5.5 1.75A1.75 1.75 0 0 0 3.75 3.5v7c0 .966.784 1.75 1.75 1.75h7a1.75 1.75 0 0 0 1.75-1.75v-7a1.75 1.75 0 0 0-1.75-1.75h-7Zm-.25 1.75c0-.138.112-.25.25-.25h7c.138 0 .25.112.25.25v7a.25.25 0 0 1-.25.25h-7a.25.25 0 0 1-.25-.25v-7ZM1.75 6.5a.75.75 0 0 1 1.5 0v6c0 .966.784 1.75 1.75 1.75h6a.75.75 0 0 1 0 1.5h-6A3.25 3.25 0 0 1 1.75 12.5v-6Z",
1594
+ fill: "currentColor"
1595
+ })
1596
+ });
1597
+ }
1598
+ function qt() {
1599
+ return /* @__PURE__ */ u("svg", {
1600
+ viewBox: "0 0 16 16",
1601
+ "aria-hidden": "true",
1602
+ focusable: "false",
1603
+ children: /* @__PURE__ */ u("path", {
1604
+ d: "M11.86 1.52a1.8 1.8 0 0 1 2.55 2.55l-7.12 7.12a.75.75 0 0 1-.35.2l-3 0a.75.75 0 0 1-.75-.75l0-3a.75.75 0 0 1 .2-.35l7.12-7.12Zm1.49 1.06a.3.3 0 0 0-.43 0L6.1 9.4l-.16.5.5-.16 6.82-6.82a.3.3 0 0 0 0-.43l.09.09Z",
1605
+ fill: "currentColor"
1606
+ })
1607
+ });
1608
+ }
1609
+ function Jt(e) {
1610
+ return Array.isArray(e) || typeof e == "object" && !!e;
1611
+ }
1612
+ async function Yt(e) {
1613
+ if (typeof navigator > "u" || !navigator.clipboard?.writeText) return !1;
1614
+ try {
1615
+ return await navigator.clipboard.writeText(e), !0;
1616
+ } catch {
1617
+ return !1;
1618
+ }
1619
+ }
1620
+ function Xt(e, t) {
1621
+ return t?.componentName?.trim() || e.displayName?.trim() || e.name?.trim() || t?.fallbackName?.trim() || "Component";
1622
+ }
1623
+ function Zt(e, t, n) {
1624
+ return e === "manual" || n === "all" || n === "first-party" && t === "first-party";
1625
+ }
1626
+ function Qt(t, n) {
1627
+ let c = n?.source ?? "manual", p = n?.scope ?? "first-party", m = dt(t);
1628
+ if (m && c === "auto") return t;
1629
+ let h = m && c === "manual" ? m.original : t, g = Xt(h, n);
1630
+ function _(t) {
1631
+ let n = o(null), m = o(null), _ = o(null), v = o(null), ee = o(null), te = o(!1), [y, x] = s(null), [S, C] = s("css"), [T, E] = s("detected"), [O, k] = s(""), [A, j] = s({}), [M, N] = s("{}"), [ie, P] = s(null), [ae, oe] = s(null), [se, ce] = s({}), [le, ue] = s({}), [de, F] = s({}), [I, L] = s(null), [fe, R] = s(""), [pe, z] = s(null), [B, V] = s(null), [H, me] = s({}), U = r(b), he = !!U, W = U?.config ?? Ot, ge = U?.getColor ?? (() => "var(--reinspect-brand-500)"), _e = U?.menuTheme ?? "light", ve = U?.menuOpenGesture ?? Ot.menuOpenGesture, ye = U?.isActive ?? !1, be = U?.inspectMode ?? "wrapped", xe = U?.renderCounterMode ?? Ot.renderCounters, G = U?.propsSerializationMode ?? Ot.propsSerializationMode, Se = U?.overrides ?? {}, K = U?.updateOverride ?? (() => void 0), Ce = U?.renderCountComponents ?? {}, we = U?.setRenderCountingForComponent ?? (() => void 0), Te = U?.setInspectWhitelist ?? (() => void 0), Ee = U?.inspectWhitelist ?? Ot.inspectWhitelist, De = U?.setInspectBlacklist ?? (() => void 0), Oe = U?.isRenderCountingEnabledFor ?? (() => !1);
1632
+ n.current ||= Pt(g);
1633
+ let q = n.current, ke = ge(g), Ae = Zt(c, p, be), je = U?.isComponentInspectableByFilters(g) ?? !0, J = W.enabled && ye && Ae && je, Y = J && Oe(g), Ne = !!Ce[g], Pe = xe !== "off", Fe = xe === "off" ? "attempts" : xe, Re = Y, ze = Se[q], Be = J ? Me(ze, W.editableProps) : {}, Ve = {
1634
+ ...t,
1635
+ ...A
1636
+ }, He = Ve, X = y !== null, Z = It(O), Ue = Z.length === 0 ? W.editableProps : W.editableProps.filter((e) => It(e).includes(Z)), We = X && S === "props" && T === "detected" ? rt(He) : [], Ge = o(Re);
1637
+ i(() => {
1638
+ Ge.current = Re;
1639
+ }, [Re]);
1640
+ let Ke = a(() => (e, t) => {
1641
+ t === "mount" || !Ge.current || gt(q);
1642
+ }, [q]);
1643
+ i(() => () => {
1644
+ vt(q);
1645
+ }, [q]), i(() => {
1646
+ if (!X) return;
1647
+ let e = (e) => {
1648
+ let t = e.target;
1649
+ _.current?.contains(t) || v.current?.contains(t) || (x(null), L(null), R(""), z(null));
1650
+ }, t = (e) => {
1651
+ if (e.key === "Escape") {
1652
+ if (I) {
1653
+ L(null), R(""), z(null);
1654
+ return;
1655
+ }
1656
+ x(null);
1657
+ }
1658
+ };
1659
+ return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
1660
+ document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
1661
+ };
1662
+ }, [I, X]), i(() => {
1663
+ X && (W.enabled && ye && Ae || (x(null), L(null), R(""), z(null)));
1664
+ }, [
1665
+ W.enabled,
1666
+ Ae,
1667
+ ye,
1668
+ X
1669
+ ]), i(() => {
1670
+ if (!ae) return;
1671
+ let e = globalThis.setTimeout(() => {
1672
+ oe(null);
1673
+ }, 1400);
1674
+ return () => {
1675
+ globalThis.clearTimeout(e);
1676
+ };
1677
+ }, [ae]), i(() => {
1678
+ if (!B) return;
1679
+ let e = globalThis.setTimeout(() => {
1680
+ V(null);
1681
+ }, 5e3);
1682
+ return () => {
1683
+ globalThis.clearTimeout(e);
1684
+ };
1685
+ }, [B]), i(() => {
1686
+ if (!X || !y || !_.current) return;
1687
+ let e = _.current.getBoundingClientRect(), t = Vt(y, e.width, e.height);
1688
+ (t.x !== y.x || t.y !== y.y) && x(t);
1689
+ }, [X, y]), i(() => {
1690
+ if (!X || I || !_.current) return;
1691
+ let e = _.current;
1692
+ w(e);
1693
+ let t = (t) => {
1694
+ ne(t, e);
1695
+ };
1696
+ return document.addEventListener("keydown", t), () => {
1697
+ document.removeEventListener("keydown", t);
1698
+ };
1699
+ }, [X, I]), i(() => {
1700
+ if (!I || !v.current) return;
1701
+ let e = v.current;
1702
+ w(e);
1703
+ let t = (t) => {
1704
+ ne(t, e);
1705
+ };
1706
+ return document.addEventListener("keydown", t), () => {
1707
+ document.removeEventListener("keydown", t), _.current?.focus();
1708
+ };
1709
+ }, [I]), i(() => {
1710
+ te.current && !X && m.current?.focus(), te.current = X;
1711
+ }, [X]);
1712
+ let qe = {
1713
+ "--reinspect-color": ke,
1714
+ "--reinspect-z-base": W.zIndexBase
1715
+ }, Je = (e) => {
1716
+ if (typeof window > "u") return {};
1717
+ let t = e.currentTarget.querySelector("[data-reinspect-content=\"true\"]"), n = e.target, r = null;
1718
+ if (n instanceof HTMLElement && t?.contains(n) && (r = n), !r && t?.firstElementChild instanceof HTMLElement && (r = t.firstElementChild), !r && t instanceof HTMLElement && (r = t), !r) return {};
1719
+ let i = window.getComputedStyle(r), a = {}, o = () => {
1720
+ let e = r;
1721
+ for (; e;) {
1722
+ let t = window.getComputedStyle(e).backgroundColor.trim();
1723
+ if (!Bt(t)) return t;
1724
+ e = e.parentElement;
1725
+ }
1726
+ let t = window.getComputedStyle(document.documentElement).backgroundColor.trim();
1727
+ return Bt(t) ? "rgb(255 255 255)" : t;
1728
+ };
1729
+ for (let e of W.editableProps) {
1730
+ let t = zt(e), n = e === "backgroundColor" ? o() : i.getPropertyValue(t).trim();
1731
+ n.length > 0 && (a[e] = n);
1732
+ }
1733
+ return a;
1734
+ }, Ye = (e) => {
1735
+ if (!e) return;
1736
+ let t = e.trim().match(/-?\d*\.?\d+/);
1737
+ if (t?.[0]) return Le(t[0]);
1738
+ }, Xe = (e) => {
1739
+ J && Wt(e, ve) && (e.preventDefault(), C("general"), E("detected"), k(""), P(null), oe(null), ce({}), ue({}), F({}), L(null), R(""), z(null), N("{}"), me(Je(e)), x(Vt({
1740
+ x: e.clientX,
1741
+ y: e.clientY
1742
+ }, jt, Mt)));
1743
+ }, Ze = () => {
1744
+ let { parsed: e, error: t } = lt(M);
1745
+ if (t || !e) {
1746
+ P(t);
1747
+ return;
1748
+ }
1749
+ let n = { ...e };
1750
+ Object.prototype.hasOwnProperty.call(n, "children") && !st(n.children) && delete n.children, j(n), ce({}), ue({}), F({}), P(null);
1751
+ }, Qe = () => {
1752
+ j({}), T === "raw" && N(it(Gt(t), { mode: G })), P(null);
1753
+ }, $e = (e, t) => {
1754
+ Yt(e).then((e) => {
1755
+ oe(e ? `${t} copied.` : "Clipboard access is unavailable.");
1756
+ });
1757
+ }, et = (e, t) => {
1758
+ let n = se[e], r = n ?? at(t, { mode: G });
1759
+ if (!r) {
1760
+ oe("JSON preview is unavailable for this value.");
1761
+ return;
1762
+ }
1763
+ n || ce((t) => ({
1764
+ ...t,
1765
+ [e]: r
1766
+ })), $e(r, "JSON value");
1767
+ }, tt = (e, t) => {
1768
+ if (de[e]) {
1769
+ F((t) => ({
1770
+ ...t,
1771
+ [e]: !1
1772
+ }));
1773
+ return;
1774
+ }
1775
+ if (!(e in se) && !(e in le)) {
1776
+ let n = at(t, { mode: G });
1777
+ n === null ? ue((t) => ({
1778
+ ...t,
1779
+ [e]: "JSON preview is unavailable for this value."
1780
+ })) : ce((t) => ({
1781
+ ...t,
1782
+ [e]: n
1783
+ }));
1784
+ }
1785
+ F((t) => ({
1786
+ ...t,
1787
+ [e]: !0
1788
+ }));
1789
+ }, nt = (e, t) => {
1790
+ if (!ot(t)) return;
1791
+ let n = at(t, { mode: G });
1792
+ if (n === null) {
1793
+ oe("Unable to open editor for this value.");
1794
+ return;
1795
+ }
1796
+ L(e), R(n), z(null);
1797
+ }, ut = () => {
1798
+ if (!I) return;
1799
+ let e = I, { parsed: t, error: n } = ct(fe);
1800
+ if (n || t === null) {
1801
+ z(n);
1802
+ return;
1803
+ }
1804
+ if (e === "children" && !st(t)) {
1805
+ z(Nt);
1806
+ return;
1807
+ }
1808
+ let r = Jt(t), i = r ? at(t, { mode: G }) : null;
1809
+ j((n) => ({
1810
+ ...n,
1811
+ [e]: t
1812
+ })), ce((t) => {
1813
+ if (i === null) {
1814
+ if (!(e in t)) return t;
1815
+ let n = { ...t };
1816
+ return delete n[e], n;
1817
+ }
1818
+ return t[e] === i ? t : {
1819
+ ...t,
1820
+ [e]: i
1821
+ };
1822
+ }), ue((t) => {
1823
+ let n = "JSON preview is unavailable for this value.";
1824
+ if (r && i === null) return t[e] === n ? t : {
1825
+ ...t,
1826
+ [e]: n
1827
+ };
1828
+ if (!(e in t)) return t;
1829
+ let a = { ...t };
1830
+ return delete a[e], a;
1831
+ }), F((t) => r || !t[e] ? t : {
1832
+ ...t,
1833
+ [e]: !1
1834
+ }), L(null), R(""), z(null);
1835
+ }, dt = () => {
1836
+ Te((e) => ({
1837
+ ...e,
1838
+ patterns: Ut(e.patterns, g)
1839
+ }));
1840
+ }, ft = Ee.patterns.includes(g), pt = () => {
1841
+ De((e) => ({
1842
+ ...e,
1843
+ patterns: Ht(e.patterns, g)
1844
+ })), x(null), V({ componentName: g });
1845
+ }, Q = () => {
1846
+ B && (De((e) => ({
1847
+ ...e,
1848
+ patterns: e.patterns.filter((e) => e !== B.componentName)
1849
+ })), V(null));
1850
+ }, $ = X ? /* @__PURE__ */ d("div", {
1851
+ ref: _,
1852
+ className: "reinspect-menu",
1853
+ "data-reinspect-theme": _e,
1854
+ role: "dialog",
1855
+ "aria-modal": "true",
1856
+ "aria-label": `${g} controls`,
1857
+ tabIndex: -1,
1858
+ onMouseDown: (e) => {
1859
+ e.stopPropagation();
1860
+ },
1861
+ onClick: (e) => {
1862
+ e.stopPropagation();
1863
+ },
1864
+ onContextMenu: (e) => {
1865
+ e.preventDefault(), e.stopPropagation();
1866
+ },
1867
+ style: {
1868
+ top: `${y.y}px`,
1869
+ left: `${y.x}px`,
1870
+ "--reinspect-color": ke
1871
+ },
1872
+ children: [
1873
+ /* @__PURE__ */ d("div", {
1874
+ className: "reinspect-menu-header",
1875
+ children: [/* @__PURE__ */ d("div", {
1876
+ className: "reinspect-menu-title-wrap",
1877
+ children: [/* @__PURE__ */ d("div", {
1878
+ className: "reinspect-menu-title-row",
1879
+ children: [/* @__PURE__ */ u("p", {
1880
+ className: "reinspect-menu-title",
1881
+ children: g
1882
+ }), /* @__PURE__ */ u("span", {
1883
+ className: "reinspect-menu-title-color-chip",
1884
+ "aria-hidden": "true",
1885
+ title: `${g} color`
1886
+ })]
1887
+ }), /* @__PURE__ */ u("p", {
1888
+ className: "reinspect-menu-subtitle",
1889
+ children: "Component controls"
1890
+ })]
1891
+ }), /* @__PURE__ */ u("button", {
1892
+ type: "button",
1893
+ className: "reinspect-menu-close",
1894
+ "aria-label": `Close ${g} controls`,
1895
+ "data-testid": `reinspect-menu-close-${g}`,
1896
+ onClick: () => x(null),
1897
+ children: "×"
1898
+ })]
1899
+ }),
1900
+ /* @__PURE__ */ d("div", {
1901
+ className: "reinspect-submenu",
1902
+ "aria-label": `${g} menu panels`,
1903
+ children: [
1904
+ /* @__PURE__ */ u("button", {
1905
+ type: "button",
1906
+ "data-state": S === "general" ? "active" : "idle",
1907
+ onClick: () => C("general"),
1908
+ children: "General"
1909
+ }),
1910
+ /* @__PURE__ */ u("button", {
1911
+ type: "button",
1912
+ "data-state": S === "css" ? "active" : "idle",
1913
+ onClick: () => C("css"),
1914
+ children: "CSS"
1915
+ }),
1916
+ /* @__PURE__ */ u("button", {
1917
+ type: "button",
1918
+ "data-state": S === "props" ? "active" : "idle",
1919
+ onClick: () => C("props"),
1920
+ children: "Props"
1921
+ })
1922
+ ]
1923
+ }),
1924
+ S === "general" ? /* @__PURE__ */ u("div", {
1925
+ className: "reinspect-general-panel",
1926
+ children: /* @__PURE__ */ d("section", {
1927
+ className: "reinspect-menu-section",
1928
+ children: [
1929
+ /* @__PURE__ */ d("div", {
1930
+ className: "reinspect-menu-section-header",
1931
+ children: [/* @__PURE__ */ u("p", {
1932
+ className: "reinspect-menu-section-title",
1933
+ children: "Quick filters"
1934
+ }), /* @__PURE__ */ u("p", {
1935
+ className: "reinspect-menu-section-caption",
1936
+ children: g
1937
+ })]
1938
+ }),
1939
+ /* @__PURE__ */ u("p", {
1940
+ className: "reinspect-menu-section-description",
1941
+ children: "Focus inspection on this component type, or hide this type from inspection."
1942
+ }),
1943
+ /* @__PURE__ */ d("div", {
1944
+ className: "reinspect-menu-shortcuts",
1945
+ children: [/* @__PURE__ */ d("button", {
1946
+ type: "button",
1947
+ className: "reinspect-menu-action-card",
1948
+ onClick: dt,
1949
+ "data-testid": `reinspect-include-component-${g}`,
1950
+ "data-state": ft ? "active" : "idle",
1951
+ "aria-label": `Only inspect ${g} components`,
1952
+ children: [
1953
+ /* @__PURE__ */ u("span", {
1954
+ className: "reinspect-menu-action-title",
1955
+ children: "Show only this component type"
1956
+ }),
1957
+ /* @__PURE__ */ u("span", {
1958
+ className: "reinspect-menu-action-description",
1959
+ children: "Keeps all matching instances inspectable and hides other types."
1960
+ }),
1961
+ /* @__PURE__ */ u("code", {
1962
+ className: "reinspect-menu-action-target",
1963
+ children: g
1964
+ })
1965
+ ]
1966
+ }), /* @__PURE__ */ d("button", {
1967
+ type: "button",
1968
+ className: "reinspect-menu-action-card",
1969
+ onClick: pt,
1970
+ "data-testid": `reinspect-exclude-component-${g}`,
1971
+ "aria-label": `Hide ${g} components from inspection`,
1972
+ children: [
1973
+ /* @__PURE__ */ u("span", {
1974
+ className: "reinspect-menu-action-title",
1975
+ children: "Hide this component type"
1976
+ }),
1977
+ /* @__PURE__ */ u("span", {
1978
+ className: "reinspect-menu-action-description",
1979
+ children: "Removes matching instances from inspection overlays."
1980
+ }),
1981
+ /* @__PURE__ */ u("code", {
1982
+ className: "reinspect-menu-action-target",
1983
+ children: g
1984
+ })
1985
+ ]
1986
+ })]
1987
+ }),
1988
+ /* @__PURE__ */ u("div", { className: "reinspect-menu-divider" }),
1989
+ /* @__PURE__ */ d("div", {
1990
+ className: "reinspect-menu-inline-setting",
1991
+ children: [/* @__PURE__ */ d("div", {
1992
+ className: "reinspect-menu-inline-copy",
1993
+ children: [/* @__PURE__ */ u("p", {
1994
+ className: "reinspect-menu-inline-title",
1995
+ children: "Capture renders"
1996
+ }), /* @__PURE__ */ u("p", {
1997
+ className: "reinspect-menu-inline-description",
1998
+ children: "Track rerender attempts and commits for this component."
1999
+ })]
2000
+ }), /* @__PURE__ */ u("button", {
2001
+ type: "button",
2002
+ role: "switch",
2003
+ "aria-checked": Pe ? !0 : Ne,
2004
+ onClick: () => we(g, !Ne),
2005
+ disabled: Pe,
2006
+ "aria-label": `Capture renders for ${g}`,
2007
+ "data-testid": `reinspect-component-render-toggle-${g}`,
2008
+ className: "reinspect-switch-button reinspect-menu-switch",
2009
+ "data-state": Pe || Ne ? "on" : "off"
2010
+ })]
2011
+ }),
2012
+ Pe ? /* @__PURE__ */ u("p", {
2013
+ className: "reinspect-setting-note",
2014
+ children: "Global render capture is enabled in settings."
2015
+ }) : null
2016
+ ]
2017
+ })
2018
+ }) : null,
2019
+ S === "css" ? /* @__PURE__ */ d("div", {
2020
+ className: "reinspect-css-panel",
2021
+ children: [
2022
+ /* @__PURE__ */ d("div", {
2023
+ className: "reinspect-menu-panel-header",
2024
+ children: [/* @__PURE__ */ u("p", {
2025
+ className: "reinspect-menu-section-title",
2026
+ children: "Editable styles"
2027
+ }), /* @__PURE__ */ d("p", {
2028
+ className: "reinspect-menu-section-caption",
2029
+ children: [
2030
+ Ue.length,
2031
+ "/",
2032
+ W.editableProps.length
2033
+ ]
2034
+ })]
2035
+ }),
2036
+ /* @__PURE__ */ d("div", {
2037
+ className: "reinspect-menu-filter",
2038
+ children: [
2039
+ /* @__PURE__ */ u("span", {
2040
+ className: "reinspect-menu-filter-icon",
2041
+ "aria-hidden": "true",
2042
+ children: /* @__PURE__ */ u("svg", {
2043
+ viewBox: "0 0 24 24",
2044
+ focusable: "false",
2045
+ children: /* @__PURE__ */ u("path", {
2046
+ d: "M10.5 3a7.5 7.5 0 015.92 12.1l4.24 4.23a1 1 0 01-1.42 1.42l-4.23-4.24A7.5 7.5 0 1110.5 3zm0 2a5.5 5.5 0 100 11 5.5 5.5 0 000-11z",
2047
+ fill: "currentColor"
2048
+ })
2049
+ })
2050
+ }),
2051
+ /* @__PURE__ */ u("input", {
2052
+ id: `${q}-css-filter`,
2053
+ "data-testid": "reinspect-css-filter-input",
2054
+ type: "search",
2055
+ value: O,
2056
+ placeholder: "Filter",
2057
+ "aria-label": "Filter CSS properties",
2058
+ onChange: (e) => k(e.currentTarget.value)
2059
+ }),
2060
+ O.trim().length > 0 ? /* @__PURE__ */ u("button", {
2061
+ type: "button",
2062
+ className: "reinspect-menu-filter-clear",
2063
+ onClick: () => k(""),
2064
+ "aria-label": "Clear CSS filter",
2065
+ children: "Clear"
2066
+ }) : null
2067
+ ]
2068
+ }),
2069
+ /* @__PURE__ */ u("div", {
2070
+ className: "reinspect-menu-grid",
2071
+ children: Ue.map((e) => {
2072
+ let t = ze?.[e], n = `${q}-${e}`;
2073
+ if (D.has(e)) {
2074
+ let r = Ie(typeof t == "string" ? t : H[e]);
2075
+ return /* @__PURE__ */ d("div", {
2076
+ className: "reinspect-field",
2077
+ children: [/* @__PURE__ */ u("label", {
2078
+ htmlFor: n,
2079
+ children: Ft(e)
2080
+ }), /* @__PURE__ */ d("div", {
2081
+ className: "reinspect-inline-controls",
2082
+ children: [/* @__PURE__ */ u("input", {
2083
+ id: n,
2084
+ type: "color",
2085
+ value: r,
2086
+ onChange: (t) => K(q, e, t.currentTarget.value)
2087
+ }), /* @__PURE__ */ u("button", {
2088
+ type: "button",
2089
+ onClick: () => K(q, e, void 0),
2090
+ disabled: !Lt(t),
2091
+ children: "reset"
2092
+ })]
2093
+ })]
2094
+ }, e);
2095
+ }
2096
+ if (e === "opacity") {
2097
+ let r = typeof t == "number" ? t : Ye(H[e]) ?? 1;
2098
+ return /* @__PURE__ */ d("div", {
2099
+ className: "reinspect-field",
2100
+ children: [/* @__PURE__ */ u("label", {
2101
+ htmlFor: n,
2102
+ children: "Opacity"
2103
+ }), /* @__PURE__ */ d("div", {
2104
+ className: "reinspect-inline-controls reinspect-opacity-controls",
2105
+ children: [
2106
+ /* @__PURE__ */ u("input", {
2107
+ id: n,
2108
+ type: "range",
2109
+ min: "0",
2110
+ max: "1",
2111
+ step: "0.05",
2112
+ value: r,
2113
+ onChange: (t) => {
2114
+ let n = Le(t.currentTarget.value);
2115
+ n !== void 0 && K(q, e, n);
2116
+ }
2117
+ }),
2118
+ /* @__PURE__ */ u("output", { children: r.toFixed(2) }),
2119
+ /* @__PURE__ */ u("button", {
2120
+ type: "button",
2121
+ onClick: () => K(q, e, void 0),
2122
+ disabled: !Lt(t),
2123
+ children: "reset"
2124
+ })
2125
+ ]
2126
+ })]
2127
+ }, e);
2128
+ }
2129
+ if (re.has(e)) {
2130
+ let r = typeof t == "number" ? t : Ye(H[e]) ?? "";
2131
+ return /* @__PURE__ */ d("div", {
2132
+ className: "reinspect-field",
2133
+ children: [/* @__PURE__ */ d("label", {
2134
+ htmlFor: n,
2135
+ children: [Ft(e), " (px)"]
2136
+ }), /* @__PURE__ */ d("div", {
2137
+ className: "reinspect-inline-controls",
2138
+ children: [/* @__PURE__ */ u("input", {
2139
+ id: n,
2140
+ type: "number",
2141
+ step: "1",
2142
+ value: r,
2143
+ onChange: (t) => {
2144
+ if (t.currentTarget.value === "") {
2145
+ K(q, e, void 0);
2146
+ return;
2147
+ }
2148
+ let n = Le(t.currentTarget.value);
2149
+ n !== void 0 && K(q, e, n);
2150
+ }
2151
+ }), /* @__PURE__ */ u("button", {
2152
+ type: "button",
2153
+ onClick: () => K(q, e, void 0),
2154
+ disabled: !Lt(t),
2155
+ children: "reset"
2156
+ })]
2157
+ })]
2158
+ }, e);
2159
+ }
2160
+ return /* @__PURE__ */ d("div", {
2161
+ className: "reinspect-field",
2162
+ children: [/* @__PURE__ */ u("label", {
2163
+ htmlFor: n,
2164
+ children: Ft(e)
2165
+ }), /* @__PURE__ */ d("div", {
2166
+ className: "reinspect-inline-controls",
2167
+ children: [/* @__PURE__ */ u("input", {
2168
+ id: n,
2169
+ type: "text",
2170
+ value: typeof t == "string" ? t : H[e] ?? "",
2171
+ onChange: (t) => K(q, e, t.currentTarget.value || void 0)
2172
+ }), /* @__PURE__ */ u("button", {
2173
+ type: "button",
2174
+ onClick: () => K(q, e, void 0),
2175
+ disabled: !Lt(t),
2176
+ children: "reset"
2177
+ })]
2178
+ })]
2179
+ }, e);
2180
+ })
2181
+ }),
2182
+ Ue.length === 0 ? /* @__PURE__ */ d("p", {
2183
+ className: "reinspect-menu-empty-state",
2184
+ children: [
2185
+ "No CSS properties match \"",
2186
+ O.trim(),
2187
+ "\"."
2188
+ ]
2189
+ }) : null
2190
+ ]
2191
+ }) : null,
2192
+ S === "props" ? /* @__PURE__ */ d("div", {
2193
+ className: "reinspect-props-panel",
2194
+ children: [
2195
+ /* @__PURE__ */ d("div", {
2196
+ className: "reinspect-props-submenu",
2197
+ children: [/* @__PURE__ */ u("button", {
2198
+ type: "button",
2199
+ "data-state": T === "detected" ? "active" : "idle",
2200
+ onClick: () => E("detected"),
2201
+ children: "Detected"
2202
+ }), /* @__PURE__ */ u("button", {
2203
+ type: "button",
2204
+ "data-state": T === "raw" ? "active" : "idle",
2205
+ onClick: () => {
2206
+ E("raw"), P(null), N(it(Gt(He), { mode: G }));
2207
+ },
2208
+ children: "Raw"
2209
+ })]
2210
+ }),
2211
+ T === "detected" ? We.length > 0 ? /* @__PURE__ */ u("div", {
2212
+ className: "reinspect-props-table",
2213
+ children: We.map((e) => {
2214
+ let t = Rt(e.key), n = He[e.key], r = e.value.kind === "object" || e.value.kind === "array", i = !!de[e.key], a = se[e.key], o = le[e.key], s = e.key === "children" ? st(n) : ot(n);
2215
+ return /* @__PURE__ */ d("div", {
2216
+ className: "reinspect-props-row",
2217
+ "data-testid": `reinspect-prop-row-${t}`,
2218
+ children: [/* @__PURE__ */ u("code", {
2219
+ className: "reinspect-prop-key",
2220
+ children: e.key
2221
+ }), /* @__PURE__ */ d("div", {
2222
+ className: "reinspect-prop-cell",
2223
+ "data-testid": `reinspect-prop-value-${t}`,
2224
+ children: [/* @__PURE__ */ d("div", {
2225
+ className: "reinspect-prop-main",
2226
+ children: [/* @__PURE__ */ u("div", {
2227
+ className: "reinspect-prop-value-render",
2228
+ children: Et({ value: e.value })
2229
+ }), r || s || e.value.copyText ? /* @__PURE__ */ d("div", {
2230
+ className: "reinspect-prop-actions",
2231
+ children: [
2232
+ r ? /* @__PURE__ */ u("button", {
2233
+ type: "button",
2234
+ "data-testid": `reinspect-prop-show-json-${t}`,
2235
+ onClick: () => tt(e.key, n),
2236
+ className: "reinspect-prop-action-text-button",
2237
+ title: i ? "Collapse JSON preview" : "Expand JSON preview",
2238
+ "aria-label": i ? `Collapse JSON preview for ${e.key}` : `Expand JSON preview for ${e.key}`,
2239
+ children: i ? "Collapse JSON" : "Expand JSON"
2240
+ }) : null,
2241
+ s ? /* @__PURE__ */ u("button", {
2242
+ type: "button",
2243
+ "data-testid": `reinspect-prop-edit-${t}`,
2244
+ onClick: () => nt(e.key, n),
2245
+ className: "reinspect-icon-button",
2246
+ title: "Edit value",
2247
+ "aria-label": `Edit ${e.key}`,
2248
+ children: qt()
2249
+ }) : null,
2250
+ r || e.value.copyText ? /* @__PURE__ */ u("button", {
2251
+ type: "button",
2252
+ className: "reinspect-icon-button",
2253
+ title: e.value.kind === "function" ? "Copy function source" : r ? "Copy JSON" : "Copy value",
2254
+ "aria-label": e.value.kind === "function" ? "Copy function source" : r ? `Copy JSON for ${e.key}` : `Copy value for ${e.key}`,
2255
+ onClick: () => {
2256
+ if (r) {
2257
+ et(e.key, n);
2258
+ return;
2259
+ }
2260
+ e.value.copyText && $e(e.value.copyText, e.value.kind === "function" ? "Function source" : "Value");
2261
+ },
2262
+ children: Kt()
2263
+ }) : null
2264
+ ]
2265
+ }) : null]
2266
+ }), i ? /* @__PURE__ */ u("div", {
2267
+ className: "reinspect-prop-json-preview",
2268
+ "data-testid": `reinspect-prop-json-preview-${t}`,
2269
+ children: o ? /* @__PURE__ */ u("p", {
2270
+ className: "reinspect-error",
2271
+ children: o
2272
+ }) : /* @__PURE__ */ u("pre", { children: /* @__PURE__ */ u("code", {
2273
+ className: "language-json reinspect-code-block",
2274
+ dangerouslySetInnerHTML: { __html: Tt(a ?? "", "json") }
2275
+ }) })
2276
+ }) : null]
2277
+ })]
2278
+ }, e.key);
2279
+ })
2280
+ }) : /* @__PURE__ */ u("p", {
2281
+ className: "reinspect-menu-empty-state",
2282
+ children: "No props detected."
2283
+ }) : /* @__PURE__ */ d(l, { children: [
2284
+ /* @__PURE__ */ u("label", {
2285
+ htmlFor: `${q}-props-json`,
2286
+ children: "Props JSON"
2287
+ }),
2288
+ /* @__PURE__ */ d("div", {
2289
+ className: "reinspect-json-editor",
2290
+ children: [/* @__PURE__ */ u("pre", {
2291
+ "aria-hidden": "true",
2292
+ ref: ee,
2293
+ children: /* @__PURE__ */ u("code", {
2294
+ className: "language-json reinspect-code-block",
2295
+ dangerouslySetInnerHTML: { __html: Tt(M, "json") }
2296
+ })
2297
+ }), /* @__PURE__ */ u("textarea", {
2298
+ id: `${q}-props-json`,
2299
+ value: M,
2300
+ onChange: (e) => {
2301
+ N(e.currentTarget.value), P(null);
2302
+ },
2303
+ onScroll: (e) => {
2304
+ let t = ee.current;
2305
+ t && (t.scrollTop = e.currentTarget.scrollTop, t.scrollLeft = e.currentTarget.scrollLeft);
2306
+ },
2307
+ rows: 9,
2308
+ spellCheck: !1,
2309
+ className: "reinspect-json-editor-textarea",
2310
+ "data-testid": "reinspect-raw-props-textarea"
2311
+ })]
2312
+ }),
2313
+ ie ? /* @__PURE__ */ u("p", {
2314
+ className: "reinspect-error",
2315
+ children: ie
2316
+ }) : null,
2317
+ /* @__PURE__ */ d("div", {
2318
+ className: "reinspect-inline-controls",
2319
+ children: [/* @__PURE__ */ u("button", {
2320
+ type: "button",
2321
+ onClick: Ze,
2322
+ children: "apply"
2323
+ }), /* @__PURE__ */ u("button", {
2324
+ type: "button",
2325
+ onClick: Qe,
2326
+ children: "reset"
2327
+ })]
2328
+ })
2329
+ ] }),
2330
+ ae ? /* @__PURE__ */ u("p", {
2331
+ className: "reinspect-setting-note",
2332
+ "data-testid": "reinspect-props-copy-status",
2333
+ children: ae
2334
+ }) : null
2335
+ ]
2336
+ }) : null
2337
+ ]
2338
+ }) : null, mt = I ? f(/* @__PURE__ */ u("div", {
2339
+ className: "reinspect-modal-backdrop",
2340
+ "data-reinspect-theme": _e,
2341
+ role: "dialog",
2342
+ "aria-modal": "true",
2343
+ "aria-label": `Edit ${I} prop`,
2344
+ "data-testid": "reinspect-prop-edit-modal",
2345
+ children: /* @__PURE__ */ d("div", {
2346
+ className: "reinspect-modal",
2347
+ "data-reinspect-theme": _e,
2348
+ ref: v,
2349
+ tabIndex: -1,
2350
+ children: [
2351
+ /* @__PURE__ */ d("p", {
2352
+ className: "reinspect-menu-title",
2353
+ children: ["Edit prop: ", I]
2354
+ }),
2355
+ /* @__PURE__ */ u("label", {
2356
+ htmlFor: `${q}-prop-edit-json`,
2357
+ children: "JSON value"
2358
+ }),
2359
+ /* @__PURE__ */ u("textarea", {
2360
+ id: `${q}-prop-edit-json`,
2361
+ "data-testid": "reinspect-prop-edit-textarea",
2362
+ value: fe,
2363
+ onChange: (e) => {
2364
+ R(e.currentTarget.value), z(null);
2365
+ },
2366
+ rows: 10
2367
+ }),
2368
+ pe ? /* @__PURE__ */ u("p", {
2369
+ className: "reinspect-error",
2370
+ "data-testid": "reinspect-prop-edit-error",
2371
+ children: pe
2372
+ }) : null,
2373
+ /* @__PURE__ */ d("div", {
2374
+ className: "reinspect-inline-controls",
2375
+ children: [/* @__PURE__ */ u("button", {
2376
+ type: "button",
2377
+ onClick: ut,
2378
+ children: "apply"
2379
+ }), /* @__PURE__ */ u("button", {
2380
+ type: "button",
2381
+ onClick: () => {
2382
+ L(null), R(""), z(null);
2383
+ },
2384
+ children: "cancel"
2385
+ })]
2386
+ })
2387
+ ]
2388
+ })
2389
+ }), document.body) : null, ht = B ? f(/* @__PURE__ */ d("div", {
2390
+ className: "reinspect-toast",
2391
+ "data-reinspect-theme": _e,
2392
+ role: "status",
2393
+ "aria-live": "polite",
2394
+ "data-testid": "reinspect-hide-component-toast",
2395
+ children: [
2396
+ /* @__PURE__ */ d("div", {
2397
+ className: "reinspect-toast-copy",
2398
+ children: [/* @__PURE__ */ d("p", {
2399
+ className: "reinspect-toast-title",
2400
+ children: ["Hidden ", B.componentName]
2401
+ }), /* @__PURE__ */ u("p", {
2402
+ className: "reinspect-toast-description",
2403
+ children: "This component type was excluded from inspection."
2404
+ })]
2405
+ }),
2406
+ /* @__PURE__ */ u("button", {
2407
+ type: "button",
2408
+ className: "reinspect-toast-undo",
2409
+ "data-testid": "reinspect-hide-component-undo",
2410
+ onClick: Q,
2411
+ children: "Undo"
2412
+ }),
2413
+ /* @__PURE__ */ u("button", {
2414
+ type: "button",
2415
+ className: "reinspect-toast-dismiss",
2416
+ "aria-label": "Dismiss notification",
2417
+ onClick: () => V(null),
2418
+ children: "×"
2419
+ })
2420
+ ]
2421
+ }), document.body) : null;
2422
+ if (!he) {
2423
+ if (c === "manual") throw Error("useReinspect must be used within ReinspectProvider");
2424
+ return /* @__PURE__ */ u(h, { ...Ve });
2425
+ }
2426
+ let _t = Re ? /* @__PURE__ */ u(e, {
2427
+ id: q,
2428
+ onRender: Ke,
2429
+ children: /* @__PURE__ */ u(h, { ...Ve })
2430
+ }) : /* @__PURE__ */ u(h, { ...Ve });
2431
+ return !J && !X ? /* @__PURE__ */ d(l, { children: [_t, ht] }) : /* @__PURE__ */ d("div", {
2432
+ ref: m,
2433
+ className: "reinspect-shell",
2434
+ "data-reinspect-component": g,
2435
+ "data-reinspect-active": J,
2436
+ "data-testid": `reinspect-shell-${g}`,
2437
+ style: qe,
2438
+ tabIndex: -1,
2439
+ onContextMenu: Xe,
2440
+ children: [
2441
+ J ? /* @__PURE__ */ d("span", {
2442
+ className: "reinspect-name-badge",
2443
+ children: [
2444
+ g,
2445
+ Y ? " | " : "",
2446
+ Y ? /* @__PURE__ */ u(Dt, {
2447
+ instanceId: q,
2448
+ counterMode: Fe
2449
+ }) : null
2450
+ ]
2451
+ }) : null,
2452
+ $ ? f($, document.body) : null,
2453
+ mt,
2454
+ ht,
2455
+ /* @__PURE__ */ u("div", {
2456
+ className: "reinspect-content",
2457
+ "data-reinspect-content": "true",
2458
+ style: Be,
2459
+ children: _t
2460
+ })
2461
+ ]
2462
+ });
2463
+ }
2464
+ return _.displayName = `withReinspect(${g})`, ft(_, {
2465
+ source: c,
2466
+ scope: p,
2467
+ original: h
2468
+ }), _;
2469
+ }
2470
+ //#endregion
2471
+ export { K as _, je as a, ne as b, pe as c, H as d, xe as f, Te as g, Oe as h, Ae as i, R as l, be as m, dt as n, L as o, he as p, P as r, z as s, Qt as t, fe as u, J as v, b as x, w as y };