sidakram-bippy 0.2.24

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,369 @@
1
+ import '../chunk-XX7FLNAQ.js';
2
+ import { getFiberFromHostInstance, instrument, traverseFiber, isHostFiber, __async } from '../chunk-7ROEST76.js';
3
+
4
+ /**
5
+ * @license bippy
6
+ *
7
+ * Copyright (c) Aiden Bai, Million Software, Inc.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ // src/experiments/shrinkwrap.ts
14
+ var getDpr = () => {
15
+ return Math.min(window.devicePixelRatio || 1, 2);
16
+ };
17
+ var CANVAS_HTML_STR = `<canvas style="position:fixed;top:0;left:0;pointer-events:none;z-index:2147483646" aria-hidden="true"></canvas>`;
18
+ var COLORS = [
19
+ [255, 0, 0],
20
+ [0, 255, 0],
21
+ [0, 0, 255],
22
+ [255, 165, 0],
23
+ [128, 0, 128],
24
+ [0, 128, 128],
25
+ [255, 105, 180],
26
+ [75, 0, 130],
27
+ [255, 69, 0],
28
+ [46, 139, 87],
29
+ [220, 20, 60],
30
+ [70, 130, 180]
31
+ ];
32
+ var interactiveElements = [
33
+ "a",
34
+ "button",
35
+ "details",
36
+ "embed",
37
+ "input",
38
+ "label",
39
+ "menu",
40
+ "menuitem",
41
+ "object",
42
+ "select",
43
+ "textarea",
44
+ "summary"
45
+ ];
46
+ var interactiveRoles = [
47
+ "button",
48
+ "menu",
49
+ "menuitem",
50
+ "link",
51
+ "checkbox",
52
+ "radio",
53
+ "slider",
54
+ "tab",
55
+ "tabpanel",
56
+ "textbox",
57
+ "combobox",
58
+ "grid",
59
+ "listbox",
60
+ "option",
61
+ "progressbar",
62
+ "scrollbar",
63
+ "searchbox",
64
+ "switch",
65
+ "tree",
66
+ "treeitem",
67
+ "spinbutton",
68
+ "tooltip",
69
+ "a-button-inner",
70
+ "a-dropdown-button",
71
+ "click",
72
+ "menuitemcheckbox",
73
+ "menuitemradio",
74
+ "a-button-text",
75
+ "button-text",
76
+ "button-icon",
77
+ "button-icon-only",
78
+ "button-text-icon-only",
79
+ "dropdown",
80
+ "combobox"
81
+ ];
82
+ var interactiveEvents = [
83
+ "click",
84
+ "mousedown",
85
+ "mouseup",
86
+ "touchstart",
87
+ "touchend",
88
+ "keydown",
89
+ "keyup",
90
+ "focus",
91
+ "blur"
92
+ ];
93
+ var isScrollable = (element) => {
94
+ const isScrollable2 = element.hasAttribute("aria-scrollable") || element.hasAttribute("scrollable") || "style" in element && (element.style.overflow === "auto" || element.style.overflow === "scroll" || element.style.overflowY === "auto" || element.style.overflowY === "scroll" || element.style.overflowX === "auto" || element.style.overflowX === "scroll");
95
+ return isScrollable2;
96
+ };
97
+ var isInteractive = (element) => {
98
+ const fiber = getFiberFromHostInstance(element);
99
+ if ((fiber == null ? void 0 : fiber.stateNode) instanceof Element) {
100
+ for (const propName of Object.keys(fiber.memoizedProps || {})) {
101
+ if (!propName.startsWith("on")) continue;
102
+ const event = propName.slice(2).toLowerCase().replace(/capture$/, "");
103
+ if (!interactiveEvents.includes(event)) continue;
104
+ if (fiber.memoizedProps[propName]) {
105
+ return true;
106
+ }
107
+ }
108
+ }
109
+ for (const event of interactiveEvents) {
110
+ const dotOnHandler = element[`on${event}`];
111
+ const explicitOnHandler = element.hasAttribute(`on${event}`);
112
+ const ngClick = element.hasAttribute(`ng-${event}`);
113
+ const atClick = element.hasAttribute(`@${event}`);
114
+ const vOnClick = element.hasAttribute(`v-on:${event}`);
115
+ if (dotOnHandler || explicitOnHandler || ngClick || atClick || vOnClick) {
116
+ return true;
117
+ }
118
+ }
119
+ const tagName = element.tagName.toLowerCase();
120
+ const role = element.getAttribute("role");
121
+ const ariaRole = element.getAttribute("aria-role");
122
+ const tabIndex = element.getAttribute("tabindex");
123
+ const hasInteractiveRole = interactiveElements.includes(tagName) || role && interactiveRoles.includes(role) || ariaRole && interactiveRoles.includes(ariaRole) || tabIndex !== null && tabIndex !== "-1";
124
+ const hasAriaProps = element.hasAttribute("aria-expanded") || element.hasAttribute("aria-pressed") || element.hasAttribute("aria-selected") || element.hasAttribute("aria-checked");
125
+ const isFormRelated = "form" in element && element.form !== void 0 || element.hasAttribute("contenteditable");
126
+ const isDraggable = "draggable" in element && element.draggable || element.getAttribute("draggable") === "true";
127
+ return hasInteractiveRole || isFormRelated || isDraggable || hasAriaProps;
128
+ };
129
+ var isElementVisible = (element) => {
130
+ const style = window.getComputedStyle(element);
131
+ return element.offsetWidth > 0 && element.offsetHeight > 0 && style.visibility !== "hidden" && style.display !== "none";
132
+ };
133
+ var isTopElement = (element) => {
134
+ const doc = element.ownerDocument;
135
+ if (doc !== window.document) {
136
+ return true;
137
+ }
138
+ const shadowRoot = element.getRootNode();
139
+ if (shadowRoot instanceof ShadowRoot) {
140
+ const rect2 = element.getBoundingClientRect();
141
+ const point = {
142
+ x: rect2.left + rect2.width / 2,
143
+ y: rect2.top + rect2.height / 2
144
+ };
145
+ try {
146
+ const topEl = shadowRoot.elementFromPoint(point.x, point.y);
147
+ if (!topEl) return false;
148
+ let current = topEl;
149
+ while (current && current !== shadowRoot) {
150
+ if (current === element) return true;
151
+ current = current.parentElement;
152
+ }
153
+ return false;
154
+ } catch (e) {
155
+ return true;
156
+ }
157
+ }
158
+ const rect = element.getBoundingClientRect();
159
+ const scrollX = window.scrollX;
160
+ const scrollY = window.scrollY;
161
+ const viewportTop = scrollY;
162
+ const viewportLeft = scrollX;
163
+ const viewportBottom = window.innerHeight + scrollY;
164
+ const viewportRight = window.innerWidth + scrollX;
165
+ const absTop = rect.top + scrollY;
166
+ const absLeft = rect.left + scrollX;
167
+ const absBottom = rect.bottom + scrollY;
168
+ const absRight = rect.right + scrollX;
169
+ if (absBottom < viewportTop || absTop > viewportBottom || absRight < viewportLeft || absLeft > viewportRight) {
170
+ return false;
171
+ }
172
+ try {
173
+ const centerX = rect.left + rect.width / 2;
174
+ const centerY = rect.top + rect.height / 2;
175
+ const point = {
176
+ x: centerX,
177
+ y: centerY
178
+ };
179
+ if (point.x < 0 || point.x >= window.innerWidth || point.y < 0 || point.y >= window.innerHeight) {
180
+ return true;
181
+ }
182
+ const topEl = document.elementFromPoint(point.x, point.y);
183
+ if (!topEl) return false;
184
+ let current = topEl;
185
+ while (current && current !== document.documentElement) {
186
+ if (current === element) return true;
187
+ current = current.parentElement;
188
+ }
189
+ return false;
190
+ } catch (e) {
191
+ return true;
192
+ }
193
+ };
194
+ var createShrinkwrap = () => {
195
+ const draw = (elements) => __async(void 0, null, function* () {
196
+ if (!ctx) return;
197
+ const rectMap = yield getRectMap(elements);
198
+ clear();
199
+ const drawnLabelBounds = [];
200
+ let visibleCount = 0;
201
+ const visibleIndices = /* @__PURE__ */ new Map();
202
+ const viewportWidth = window.innerWidth;
203
+ const viewportHeight = window.innerHeight;
204
+ const COVERAGE_THRESHOLD = 0.97;
205
+ for (let i = 0, len = elements.length; i < len; i++) {
206
+ const element = elements[i];
207
+ const rect = rectMap.get(element);
208
+ if (!rect) continue;
209
+ const { width: width2, height: height2 } = rect;
210
+ const x = rect.x;
211
+ const y = rect.y;
212
+ if (width2 / viewportWidth > COVERAGE_THRESHOLD && height2 / viewportHeight > COVERAGE_THRESHOLD)
213
+ continue;
214
+ const text = `${visibleCount + 1}`;
215
+ const textSize = 16;
216
+ ctx.textRendering = "optimizeSpeed";
217
+ ctx.font = `${textSize}px monospace`;
218
+ const { width: textWidth } = ctx.measureText(text);
219
+ let labelY = y - textSize - 4;
220
+ if (labelY < 0) {
221
+ labelY = 0;
222
+ }
223
+ const labelBounds = {
224
+ x,
225
+ y: labelY,
226
+ width: textWidth + 4,
227
+ height: textSize + 4
228
+ };
229
+ const hasCollision = drawnLabelBounds.some(
230
+ (bound) => labelBounds.x < bound.x + bound.width && labelBounds.x + labelBounds.width > bound.x && labelBounds.y < bound.y + bound.height && labelBounds.y + labelBounds.height > bound.y
231
+ );
232
+ if (!hasCollision) {
233
+ drawnLabelBounds.push(labelBounds);
234
+ visibleCount++;
235
+ visibleIndices.set(element, visibleCount);
236
+ ctx.beginPath();
237
+ ctx.rect(x, y, width2, height2);
238
+ const color = COLORS[i % COLORS.length].join(",");
239
+ ctx.fillStyle = `rgba(${color},0.1)`;
240
+ ctx.strokeStyle = `rgba(${color})`;
241
+ ctx.fill();
242
+ ctx.stroke();
243
+ ctx.fillStyle = `rgba(${color})`;
244
+ ctx.fillRect(x, labelY, textWidth + 4, textSize + 4);
245
+ ctx.fillStyle = "rgba(255,255,255)";
246
+ ctx.fillText(text, x + 2, labelY + textSize);
247
+ }
248
+ }
249
+ return visibleIndices;
250
+ });
251
+ const clear = () => {
252
+ if (!ctx) return;
253
+ ctx.clearRect(0, 0, canvas.width / dpr, canvas.height / dpr);
254
+ };
255
+ const host = document.createElement("div");
256
+ host.setAttribute("data-react-scan", "true");
257
+ const root = host.attachShadow({ mode: "open" });
258
+ root.innerHTML = CANVAS_HTML_STR;
259
+ const canvas = root.firstChild;
260
+ let dpr = Math.min(window.devicePixelRatio || 1, 2);
261
+ const { innerWidth, innerHeight } = window;
262
+ canvas.style.width = `${innerWidth}px`;
263
+ canvas.style.height = `${innerHeight}px`;
264
+ const width = innerWidth * dpr;
265
+ const height = innerHeight * dpr;
266
+ canvas.width = width;
267
+ canvas.height = height;
268
+ const ctx = canvas.getContext("2d", { alpha: true });
269
+ if (ctx) {
270
+ ctx.scale(dpr, dpr);
271
+ }
272
+ root.appendChild(canvas);
273
+ document.documentElement.appendChild(host);
274
+ let isResizeScheduled = false;
275
+ const resizeHandler = () => {
276
+ if (!isResizeScheduled) {
277
+ isResizeScheduled = true;
278
+ setTimeout(() => {
279
+ const width2 = window.innerWidth;
280
+ const height2 = window.innerHeight;
281
+ dpr = getDpr();
282
+ canvas.style.width = `${width2}px`;
283
+ canvas.style.height = `${height2}px`;
284
+ canvas.width = width2 * dpr;
285
+ canvas.height = height2 * dpr;
286
+ if (ctx) {
287
+ ctx.resetTransform();
288
+ ctx.scale(dpr, dpr);
289
+ }
290
+ shrinkwrap.trackInteractive();
291
+ isResizeScheduled = false;
292
+ });
293
+ }
294
+ };
295
+ let isScrollScheduled = false;
296
+ const scrollHandler = () => {
297
+ if (isScrollScheduled) return;
298
+ isScrollScheduled = true;
299
+ setTimeout(() => {
300
+ requestAnimationFrame(() => {
301
+ shrinkwrap.trackInteractive();
302
+ });
303
+ isScrollScheduled = false;
304
+ }, 8);
305
+ };
306
+ const fiberRoots = /* @__PURE__ */ new Set();
307
+ const shrinkwrap = {
308
+ draw(elements) {
309
+ draw(elements).then((visibleIndices) => {
310
+ if (!visibleIndices) return;
311
+ const elementMap = {};
312
+ visibleIndices.forEach((index, element) => {
313
+ elementMap[index] = element;
314
+ });
315
+ window.shrinkwrap = {
316
+ elementMap
317
+ };
318
+ });
319
+ },
320
+ trackInteractive() {
321
+ instrument({
322
+ onCommitFiberRoot(_, root2) {
323
+ fiberRoots.add(root2);
324
+ const elements = [];
325
+ for (const fiberRoot of fiberRoots) {
326
+ traverseFiber(fiberRoot.current, (fiber) => {
327
+ if (isHostFiber(fiber) && isInteractive(fiber.stateNode) && isElementVisible(fiber.stateNode) && isTopElement(fiber.stateNode)) {
328
+ elements.push(fiber.stateNode);
329
+ }
330
+ });
331
+ }
332
+ shrinkwrap.draw(elements);
333
+ }
334
+ });
335
+ },
336
+ cleanup() {
337
+ fiberRoots.clear();
338
+ window.removeEventListener("scroll", scrollHandler);
339
+ window.removeEventListener("resize", resizeHandler);
340
+ document.documentElement.removeChild(host);
341
+ }
342
+ };
343
+ window.addEventListener("scroll", scrollHandler);
344
+ window.addEventListener("resize", resizeHandler);
345
+ return shrinkwrap;
346
+ };
347
+ var getRectMap = (elements) => {
348
+ return new Promise((resolve) => {
349
+ const rects = /* @__PURE__ */ new Map();
350
+ const observer = new IntersectionObserver((entries) => {
351
+ for (let i = 0, len = entries.length; i < len; i++) {
352
+ const entry = entries[i];
353
+ const element = entry.target;
354
+ const rect = entry.boundingClientRect;
355
+ if (entry.isIntersecting && rect.width && rect.height) {
356
+ rects.set(element, rect);
357
+ }
358
+ }
359
+ observer.disconnect();
360
+ resolve(rects);
361
+ });
362
+ for (let i = 0, len = elements.length; i < len; i++) {
363
+ const element = elements[i];
364
+ observer.observe(element);
365
+ }
366
+ });
367
+ };
368
+
369
+ export { createShrinkwrap, getRectMap, isInteractive, isScrollable };
package/dist/index.cjs ADDED
@@ -0,0 +1,271 @@
1
+ 'use strict';
2
+
3
+ require('./chunk-JOS5RHYU.cjs');
4
+ var chunk475IQUDX_cjs = require('./chunk-475IQUDX.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "BIPPY_INSTRUMENTATION_STRING", {
9
+ enumerable: true,
10
+ get: function () { return chunk475IQUDX_cjs.BIPPY_INSTRUMENTATION_STRING; }
11
+ });
12
+ Object.defineProperty(exports, "CONCURRENT_MODE_NUMBER", {
13
+ enumerable: true,
14
+ get: function () { return chunk475IQUDX_cjs.CONCURRENT_MODE_NUMBER; }
15
+ });
16
+ Object.defineProperty(exports, "CONCURRENT_MODE_SYMBOL_STRING", {
17
+ enumerable: true,
18
+ get: function () { return chunk475IQUDX_cjs.CONCURRENT_MODE_SYMBOL_STRING; }
19
+ });
20
+ Object.defineProperty(exports, "ClassComponentTag", {
21
+ enumerable: true,
22
+ get: function () { return chunk475IQUDX_cjs.ClassComponentTag; }
23
+ });
24
+ Object.defineProperty(exports, "ContextConsumerTag", {
25
+ enumerable: true,
26
+ get: function () { return chunk475IQUDX_cjs.ContextConsumerTag; }
27
+ });
28
+ Object.defineProperty(exports, "DEPRECATED_ASYNC_MODE_SYMBOL_STRING", {
29
+ enumerable: true,
30
+ get: function () { return chunk475IQUDX_cjs.DEPRECATED_ASYNC_MODE_SYMBOL_STRING; }
31
+ });
32
+ Object.defineProperty(exports, "DehydratedSuspenseComponentTag", {
33
+ enumerable: true,
34
+ get: function () { return chunk475IQUDX_cjs.DehydratedSuspenseComponentTag; }
35
+ });
36
+ Object.defineProperty(exports, "ELEMENT_TYPE_SYMBOL_STRING", {
37
+ enumerable: true,
38
+ get: function () { return chunk475IQUDX_cjs.ELEMENT_TYPE_SYMBOL_STRING; }
39
+ });
40
+ Object.defineProperty(exports, "ForwardRefTag", {
41
+ enumerable: true,
42
+ get: function () { return chunk475IQUDX_cjs.ForwardRefTag; }
43
+ });
44
+ Object.defineProperty(exports, "FragmentTag", {
45
+ enumerable: true,
46
+ get: function () { return chunk475IQUDX_cjs.FragmentTag; }
47
+ });
48
+ Object.defineProperty(exports, "FunctionComponentTag", {
49
+ enumerable: true,
50
+ get: function () { return chunk475IQUDX_cjs.FunctionComponentTag; }
51
+ });
52
+ Object.defineProperty(exports, "HostComponentTag", {
53
+ enumerable: true,
54
+ get: function () { return chunk475IQUDX_cjs.HostComponentTag; }
55
+ });
56
+ Object.defineProperty(exports, "HostHoistableTag", {
57
+ enumerable: true,
58
+ get: function () { return chunk475IQUDX_cjs.HostHoistableTag; }
59
+ });
60
+ Object.defineProperty(exports, "HostRootTag", {
61
+ enumerable: true,
62
+ get: function () { return chunk475IQUDX_cjs.HostRootTag; }
63
+ });
64
+ Object.defineProperty(exports, "HostSingletonTag", {
65
+ enumerable: true,
66
+ get: function () { return chunk475IQUDX_cjs.HostSingletonTag; }
67
+ });
68
+ Object.defineProperty(exports, "HostTextTag", {
69
+ enumerable: true,
70
+ get: function () { return chunk475IQUDX_cjs.HostTextTag; }
71
+ });
72
+ Object.defineProperty(exports, "INSTALL_ERROR", {
73
+ enumerable: true,
74
+ get: function () { return chunk475IQUDX_cjs.INSTALL_ERROR; }
75
+ });
76
+ Object.defineProperty(exports, "INSTALL_HOOK_SCRIPT_STRING", {
77
+ enumerable: true,
78
+ get: function () { return chunk475IQUDX_cjs.INSTALL_HOOK_SCRIPT_STRING; }
79
+ });
80
+ Object.defineProperty(exports, "LegacyHiddenComponentTag", {
81
+ enumerable: true,
82
+ get: function () { return chunk475IQUDX_cjs.LegacyHiddenComponentTag; }
83
+ });
84
+ Object.defineProperty(exports, "MemoComponentTag", {
85
+ enumerable: true,
86
+ get: function () { return chunk475IQUDX_cjs.MemoComponentTag; }
87
+ });
88
+ Object.defineProperty(exports, "OffscreenComponentTag", {
89
+ enumerable: true,
90
+ get: function () { return chunk475IQUDX_cjs.OffscreenComponentTag; }
91
+ });
92
+ Object.defineProperty(exports, "SimpleMemoComponentTag", {
93
+ enumerable: true,
94
+ get: function () { return chunk475IQUDX_cjs.SimpleMemoComponentTag; }
95
+ });
96
+ Object.defineProperty(exports, "SuspenseComponentTag", {
97
+ enumerable: true,
98
+ get: function () { return chunk475IQUDX_cjs.SuspenseComponentTag; }
99
+ });
100
+ Object.defineProperty(exports, "TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING", {
101
+ enumerable: true,
102
+ get: function () { return chunk475IQUDX_cjs.TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING; }
103
+ });
104
+ Object.defineProperty(exports, "createFiberVisitor", {
105
+ enumerable: true,
106
+ get: function () { return chunk475IQUDX_cjs.createFiberVisitor; }
107
+ });
108
+ Object.defineProperty(exports, "detectReactBuildType", {
109
+ enumerable: true,
110
+ get: function () { return chunk475IQUDX_cjs.detectReactBuildType; }
111
+ });
112
+ Object.defineProperty(exports, "didFiberCommit", {
113
+ enumerable: true,
114
+ get: function () { return chunk475IQUDX_cjs.didFiberCommit; }
115
+ });
116
+ Object.defineProperty(exports, "didFiberRender", {
117
+ enumerable: true,
118
+ get: function () { return chunk475IQUDX_cjs.didFiberRender; }
119
+ });
120
+ Object.defineProperty(exports, "fiberIdMap", {
121
+ enumerable: true,
122
+ get: function () { return chunk475IQUDX_cjs.fiberIdMap; }
123
+ });
124
+ Object.defineProperty(exports, "getDisplayName", {
125
+ enumerable: true,
126
+ get: function () { return chunk475IQUDX_cjs.getDisplayName; }
127
+ });
128
+ Object.defineProperty(exports, "getFiberFromHostInstance", {
129
+ enumerable: true,
130
+ get: function () { return chunk475IQUDX_cjs.getFiberFromHostInstance; }
131
+ });
132
+ Object.defineProperty(exports, "getFiberId", {
133
+ enumerable: true,
134
+ get: function () { return chunk475IQUDX_cjs.getFiberId; }
135
+ });
136
+ Object.defineProperty(exports, "getFiberStack", {
137
+ enumerable: true,
138
+ get: function () { return chunk475IQUDX_cjs.getFiberStack; }
139
+ });
140
+ Object.defineProperty(exports, "getMutatedHostFibers", {
141
+ enumerable: true,
142
+ get: function () { return chunk475IQUDX_cjs.getMutatedHostFibers; }
143
+ });
144
+ Object.defineProperty(exports, "getNearestHostFiber", {
145
+ enumerable: true,
146
+ get: function () { return chunk475IQUDX_cjs.getNearestHostFiber; }
147
+ });
148
+ Object.defineProperty(exports, "getNearestHostFibers", {
149
+ enumerable: true,
150
+ get: function () { return chunk475IQUDX_cjs.getNearestHostFibers; }
151
+ });
152
+ Object.defineProperty(exports, "getRDTHook", {
153
+ enumerable: true,
154
+ get: function () { return chunk475IQUDX_cjs.getRDTHook; }
155
+ });
156
+ Object.defineProperty(exports, "getTimings", {
157
+ enumerable: true,
158
+ get: function () { return chunk475IQUDX_cjs.getTimings; }
159
+ });
160
+ Object.defineProperty(exports, "getType", {
161
+ enumerable: true,
162
+ get: function () { return chunk475IQUDX_cjs.getType; }
163
+ });
164
+ Object.defineProperty(exports, "hasMemoCache", {
165
+ enumerable: true,
166
+ get: function () { return chunk475IQUDX_cjs.hasMemoCache; }
167
+ });
168
+ Object.defineProperty(exports, "hasRDTHook", {
169
+ enumerable: true,
170
+ get: function () { return chunk475IQUDX_cjs.hasRDTHook; }
171
+ });
172
+ Object.defineProperty(exports, "installRDTHook", {
173
+ enumerable: true,
174
+ get: function () { return chunk475IQUDX_cjs.installRDTHook; }
175
+ });
176
+ Object.defineProperty(exports, "instrument", {
177
+ enumerable: true,
178
+ get: function () { return chunk475IQUDX_cjs.instrument; }
179
+ });
180
+ Object.defineProperty(exports, "isClientEnvironment", {
181
+ enumerable: true,
182
+ get: function () { return chunk475IQUDX_cjs.isClientEnvironment; }
183
+ });
184
+ Object.defineProperty(exports, "isCompositeFiber", {
185
+ enumerable: true,
186
+ get: function () { return chunk475IQUDX_cjs.isCompositeFiber; }
187
+ });
188
+ Object.defineProperty(exports, "isHostFiber", {
189
+ enumerable: true,
190
+ get: function () { return chunk475IQUDX_cjs.isHostFiber; }
191
+ });
192
+ Object.defineProperty(exports, "isInstrumentationActive", {
193
+ enumerable: true,
194
+ get: function () { return chunk475IQUDX_cjs.isInstrumentationActive; }
195
+ });
196
+ Object.defineProperty(exports, "isReactRefresh", {
197
+ enumerable: true,
198
+ get: function () { return chunk475IQUDX_cjs.isReactRefresh; }
199
+ });
200
+ Object.defineProperty(exports, "isRealReactDevtools", {
201
+ enumerable: true,
202
+ get: function () { return chunk475IQUDX_cjs.isRealReactDevtools; }
203
+ });
204
+ Object.defineProperty(exports, "isValidElement", {
205
+ enumerable: true,
206
+ get: function () { return chunk475IQUDX_cjs.isValidElement; }
207
+ });
208
+ Object.defineProperty(exports, "isValidFiber", {
209
+ enumerable: true,
210
+ get: function () { return chunk475IQUDX_cjs.isValidFiber; }
211
+ });
212
+ Object.defineProperty(exports, "mountFiberRecursively", {
213
+ enumerable: true,
214
+ get: function () { return chunk475IQUDX_cjs.mountFiberRecursively; }
215
+ });
216
+ Object.defineProperty(exports, "onCommitFiberRoot", {
217
+ enumerable: true,
218
+ get: function () { return chunk475IQUDX_cjs.onCommitFiberRoot; }
219
+ });
220
+ Object.defineProperty(exports, "patchRDTHook", {
221
+ enumerable: true,
222
+ get: function () { return chunk475IQUDX_cjs.patchRDTHook; }
223
+ });
224
+ Object.defineProperty(exports, "secure", {
225
+ enumerable: true,
226
+ get: function () { return chunk475IQUDX_cjs.secure; }
227
+ });
228
+ Object.defineProperty(exports, "setFiberId", {
229
+ enumerable: true,
230
+ get: function () { return chunk475IQUDX_cjs.setFiberId; }
231
+ });
232
+ Object.defineProperty(exports, "shouldFilterFiber", {
233
+ enumerable: true,
234
+ get: function () { return chunk475IQUDX_cjs.shouldFilterFiber; }
235
+ });
236
+ Object.defineProperty(exports, "traverseContexts", {
237
+ enumerable: true,
238
+ get: function () { return chunk475IQUDX_cjs.traverseContexts; }
239
+ });
240
+ Object.defineProperty(exports, "traverseFiber", {
241
+ enumerable: true,
242
+ get: function () { return chunk475IQUDX_cjs.traverseFiber; }
243
+ });
244
+ Object.defineProperty(exports, "traverseProps", {
245
+ enumerable: true,
246
+ get: function () { return chunk475IQUDX_cjs.traverseProps; }
247
+ });
248
+ Object.defineProperty(exports, "traverseRenderedFibers", {
249
+ enumerable: true,
250
+ get: function () { return chunk475IQUDX_cjs.traverseRenderedFibers; }
251
+ });
252
+ Object.defineProperty(exports, "traverseState", {
253
+ enumerable: true,
254
+ get: function () { return chunk475IQUDX_cjs.traverseState; }
255
+ });
256
+ Object.defineProperty(exports, "unmountFiber", {
257
+ enumerable: true,
258
+ get: function () { return chunk475IQUDX_cjs.unmountFiber; }
259
+ });
260
+ Object.defineProperty(exports, "unmountFiberChildrenRecursively", {
261
+ enumerable: true,
262
+ get: function () { return chunk475IQUDX_cjs.unmountFiberChildrenRecursively; }
263
+ });
264
+ Object.defineProperty(exports, "updateFiberRecursively", {
265
+ enumerable: true,
266
+ get: function () { return chunk475IQUDX_cjs.updateFiberRecursively; }
267
+ });
268
+ Object.defineProperty(exports, "version", {
269
+ enumerable: true,
270
+ get: function () { return chunk475IQUDX_cjs.version; }
271
+ });
@@ -0,0 +1,3 @@
1
+ export { BIPPY_INSTRUMENTATION_STRING, CONCURRENT_MODE_NUMBER, CONCURRENT_MODE_SYMBOL_STRING, ClassComponentTag, ContextConsumerTag, ContextDependency, DEPRECATED_ASYNC_MODE_SYMBOL_STRING, DehydratedSuspenseComponentTag, Dependencies, ELEMENT_TYPE_SYMBOL_STRING, Effect, Fiber, ForwardRefTag, FragmentTag, FunctionComponentTag, HostComponentTag, HostHoistableTag, HostRootTag, HostSingletonTag, HostTextTag, INSTALL_ERROR, INSTALL_HOOK_SCRIPT_STRING, InstrumentationOptions, LegacyHiddenComponentTag, MemoComponentTag, MemoizedState, OffscreenComponentTag, Props, ReactDevToolsGlobalHook, ReactRenderer, RenderHandler, RenderPhase, SimpleMemoComponentTag, SuspenseComponentTag, TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING, createFiberVisitor, detectReactBuildType, didFiberCommit, didFiberRender, fiberIdMap, getDisplayName, getFiberFromHostInstance, getFiberId, getFiberStack, getMutatedHostFibers, getNearestHostFiber, getNearestHostFibers, getRDTHook, getTimings, getType, hasMemoCache, hasRDTHook, installRDTHook, instrument, isClientEnvironment, isCompositeFiber, isHostFiber, isInstrumentationActive, isReactRefresh, isRealReactDevtools, isValidElement, isValidFiber, mountFiberRecursively, onCommitFiberRoot, patchRDTHook, secure, setFiberId, shouldFilterFiber, traverseContexts, traverseFiber, traverseProps, traverseRenderedFibers, traverseState, unmountFiber, unmountFiberChildrenRecursively, updateFiberRecursively, version } from './core.cjs';
2
+ export { BundleType, ComponentSelector, DevToolsConfig, FiberRoot, Flags, HasPseudoClassSelector, HookType, HostConfig, LanePriority, Lanes, MutableSource, OpaqueHandle, OpaqueRoot, React$AbstractComponent, ReactConsumer, ReactContext, ReactPortal, ReactProvider, ReactProviderType, RefObject, RoleSelector, RootTag, Selector, Source, SuspenseHydrationCallbacks, TestNameSelector, TextSelector, Thenable, TransitionTracingCallbacks, TypeOfMode, WorkTag } from 'react-reconciler';
3
+ import 'react';
@@ -0,0 +1,3 @@
1
+ export { BIPPY_INSTRUMENTATION_STRING, CONCURRENT_MODE_NUMBER, CONCURRENT_MODE_SYMBOL_STRING, ClassComponentTag, ContextConsumerTag, ContextDependency, DEPRECATED_ASYNC_MODE_SYMBOL_STRING, DehydratedSuspenseComponentTag, Dependencies, ELEMENT_TYPE_SYMBOL_STRING, Effect, Fiber, ForwardRefTag, FragmentTag, FunctionComponentTag, HostComponentTag, HostHoistableTag, HostRootTag, HostSingletonTag, HostTextTag, INSTALL_ERROR, INSTALL_HOOK_SCRIPT_STRING, InstrumentationOptions, LegacyHiddenComponentTag, MemoComponentTag, MemoizedState, OffscreenComponentTag, Props, ReactDevToolsGlobalHook, ReactRenderer, RenderHandler, RenderPhase, SimpleMemoComponentTag, SuspenseComponentTag, TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING, createFiberVisitor, detectReactBuildType, didFiberCommit, didFiberRender, fiberIdMap, getDisplayName, getFiberFromHostInstance, getFiberId, getFiberStack, getMutatedHostFibers, getNearestHostFiber, getNearestHostFibers, getRDTHook, getTimings, getType, hasMemoCache, hasRDTHook, installRDTHook, instrument, isClientEnvironment, isCompositeFiber, isHostFiber, isInstrumentationActive, isReactRefresh, isRealReactDevtools, isValidElement, isValidFiber, mountFiberRecursively, onCommitFiberRoot, patchRDTHook, secure, setFiberId, shouldFilterFiber, traverseContexts, traverseFiber, traverseProps, traverseRenderedFibers, traverseState, unmountFiber, unmountFiberChildrenRecursively, updateFiberRecursively, version } from './core.js';
2
+ export { BundleType, ComponentSelector, DevToolsConfig, FiberRoot, Flags, HasPseudoClassSelector, HookType, HostConfig, LanePriority, Lanes, MutableSource, OpaqueHandle, OpaqueRoot, React$AbstractComponent, ReactConsumer, ReactContext, ReactPortal, ReactProvider, ReactProviderType, RefObject, RoleSelector, RootTag, Selector, Source, SuspenseHydrationCallbacks, TestNameSelector, TextSelector, Thenable, TransitionTracingCallbacks, TypeOfMode, WorkTag } from 'react-reconciler';
3
+ import 'react';
@@ -0,0 +1,9 @@
1
+ var Bippy=function(e){"use strict";
2
+ /**
3
+ * @license bippy
4
+ *
5
+ * Copyright (c) Aiden Bai, Million Software, Inc.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var t="0.2.24",n=`bippy-${t}`,o=Object.defineProperty,r=Object.prototype.hasOwnProperty,i=()=>{},s=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout((()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch{}},l=(e=f())=>"getFiberRoots"in e,a=!1,c=void 0,u=(e=f())=>!!a||("function"==typeof e.inject&&(c=e.inject.toString()),Boolean(c?.includes("(injected)"))),m=new Set,d=e=>{const t=new Map;let r=0;const l={checkDCE:s,supportsFiber:!0,supportsFlight:!0,hasUnsupportedRendererAttached:!1,renderers:t,onCommitFiberRoot:i,onCommitFiberUnmount:i,onPostCommitFiberRoot:i,inject(e){const n=++r;return t.set(n,e),l._instrumentationIsActive||(l._instrumentationIsActive=!0,m.forEach((e=>e()))),n},_instrumentationSource:n,_instrumentationIsActive:!1};try{o(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{value:l,configurable:!0,writable:!0});const e=window.hasOwnProperty;let t=!1;o(window,"hasOwnProperty",{value:function(){return t||"__REACT_DEVTOOLS_GLOBAL_HOOK__"!==arguments[0]?e.apply(this,arguments):(globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,t=!0,-0)},configurable:!0,writable:!0})}catch{p(e)}return l},p=e=>{e&&m.add(e);try{const t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){if(a=u(t),t.checkDCE=s,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=n,t._instrumentationIsActive=!1,t.renderers.size)return t._instrumentationIsActive=!0,void m.forEach((e=>e()));const e=t.inject;if(u(t)&&!l()){a=!0;let e=t.inject(null);e&&(t._instrumentationIsActive=!0),t.inject=()=>e++}else t.inject=n=>{const o=e(n);return t._instrumentationIsActive=!0,m.forEach((e=>e())),o}}(t.renderers.size||t._instrumentationIsActive||u())&&e?.()}catch{}},b=()=>r.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),f=e=>b()?(p(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):d(e),h=()=>Boolean("undefined"!=typeof window&&(window.document?.createElement||"ReactNative"===window.navigator?.product)),_="Symbol(react.element)",g="Symbol(react.transitional.element)",R="Symbol(react.concurrent_mode)",T="Symbol(react.async_mode)",y=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return"string"==typeof e.type}},C=e=>{const t=e.memoizedProps,n=e.alternate?.memoizedProps||{},o=e.flags??e.effectTag??0;switch(e.tag){case 1:case 0:case 9:case 11:case 14:case 15:return!(1&~o);default:return!e.alternate||(n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref)}},F=e=>Boolean(!!(13374&e.flags)||!!(13374&e.subtreeFlags)),O=e=>{switch(e.tag){case 18:case 6:case 7:case 23:case 22:return!0;case 3:return!1;default:{const t="object"==typeof e.type&&null!==e.type?e.type.$$typeof:e.type;switch("symbol"==typeof t?t.toString():t){case 60111:case R:case T:return!0;default:return!1}}}},S=(e,t,n=!1)=>{if(!e)return null;if(!0===t(e))return e;let o=n?e.return:e.child;for(;o;){const e=S(o,t,n);if(e)return e;o=n?null:o.sibling}return null},v=e=>{const t=e;return"function"==typeof t?t:"object"==typeof t&&t?v(t.type||t.render):null},E=e=>{try{if("string"==typeof e.version&&e.bundleType>0)return"development"}catch{}return"production"},A=0,L=new WeakMap,I=(e,t=A++)=>{L.set(e,t)},w=e=>{let t=L.get(e);return!t&&e.alternate&&(t=L.get(e.alternate)),t||(t=A++,I(e,t)),t},N=(e,t,n)=>{let o=t;for(;null!=o;){L.has(o)||w(o);if(!O(o)&&C(o)&&e(o,"mount"),13===o.tag){if(null!==o.memoizedState){const t=o.child,n=t?t.sibling:null;if(n){const t=n.child;null!==t&&N(e,t,!1)}}else{let t=null;null!==o.child&&(t=o.child.child),null!==t&&N(e,t,!1)}}else null!=o.child&&N(e,o.child,!0);o=n?o.sibling:null}},D=(e,t,n,o)=>{if(L.has(t)||w(t),!n)return;L.has(n)||w(n);const r=13===t.tag;!O(t)&&C(t)&&e(t,"update");const i=r&&null!==n.memoizedState,s=r&&null!==t.memoizedState;if(i&&s){const o=t.child?.sibling??null,r=n.child?.sibling??null;null!==o&&null!==r&&D(e,o,r)}else if(i&&!s){const n=t.child;null!==n&&N(e,n,!0)}else if(!i&&s){P(e,n);const o=t.child?.sibling??null;null!==o&&N(e,o,!0)}else if(t.child!==n.child){let n=t.child;for(;n;){if(n.alternate){const t=n.alternate;D(e,n,t)}else N(e,n,!1);n=n.sibling}}},H=(e,t)=>{!(3===t.tag)&&O(t)||e(t,"unmount")},P=(e,t)=>{const n=13===t.tag&&null!==t.memoizedState;let o=t.child;if(n){const e=t.child,n=e?.sibling??null;o=n?.child??null}for(;null!==o;)null!==o.return&&(H(e,o),P(e,o)),o=o.sibling},j=0,z=new WeakMap,B=(e,t)=>{const n="current"in e?e.current:e;let o=z.get(e);o||(o={prevFiber:null,id:j++},z.set(e,o));const{prevFiber:r}=o;if(n)if(null!==r){const e=r&&null!=r.memoizedState&&null!=r.memoizedState.element&&!0!==r.memoizedState.isDehydrated,o=null!=n.memoizedState&&null!=n.memoizedState.element&&!0!==n.memoizedState.isDehydrated;!e&&o?N(t,n,!1):e&&o?D(t,n,n.alternate):e&&!o&&H(t,n)}else N(t,n,!0);else H(t,n);o.prevFiber=n},M=e=>f((()=>{const t=f();e.onActive?.(),t._instrumentationSource=e.name??n;const o=t.onCommitFiberRoot;e.onCommitFiberRoot&&(t.onCommitFiberRoot=(t,n,r)=>{o&&o(t,n,r),e.onCommitFiberRoot?.(t,n,r)});const r=t.onCommitFiberUnmount;e.onCommitFiberUnmount&&(t.onCommitFiberUnmount=(t,n)=>{r&&r(t,n),e.onCommitFiberUnmount?.(t,n)});const i=t.onPostCommitFiberRoot;e.onPostCommitFiberRoot&&(t.onPostCommitFiberRoot=(t,n)=>{i&&i(t,n),e.onPostCommitFiberRoot?.(t,n)})})),U=new Error,k=(e,t={})=>{const n=e.onActive,o=b(),r=l(),i=u();let s,a=t.isProduction??!1;return e.onActive=()=>{clearTimeout(s);let o=!0;try{const e=f();for(const n of e.renderers.values()){const[e]=n.version.split(".");Number(e)<(t.minReactMajorVersion??17)&&(o=!1);"development"!==E(n)&&(a=!0,t.dangerouslyRunInProduction||(o=!1))}}catch(e){t.onError?.(e)}if(!o)return e.onCommitFiberRoot=void 0,e.onCommitFiberUnmount=void 0,e.onPostCommitFiberRoot=void 0,void(e.onActive=void 0);n?.();try{const n=e.onCommitFiberRoot;n&&(e.onCommitFiberRoot=(e,o,r)=>{try{n(e,o,r)}catch(e){t.onError?.(e)}});const o=e.onCommitFiberUnmount;o&&(e.onCommitFiberUnmount=(e,n)=>{try{o(e,n)}catch(e){t.onError?.(e)}});const r=e.onPostCommitFiberRoot;r&&(e.onPostCommitFiberRoot=(e,n)=>{try{r(e,n)}catch(e){t.onError?.(e)}})}catch(e){t.onError?.(e)}},o||r||i||(s=setTimeout((()=>{a||t.onError?.(U),stop()}),t.installCheckTimeout??100)),e};try{h()&&f()}catch{}return e.BIPPY_INSTRUMENTATION_STRING=n,e.CONCURRENT_MODE_NUMBER=60111,e.CONCURRENT_MODE_SYMBOL_STRING=R,e.ClassComponentTag=1,e.ContextConsumerTag=9,e.DEPRECATED_ASYNC_MODE_SYMBOL_STRING=T,e.DehydratedSuspenseComponentTag=18,e.ELEMENT_TYPE_SYMBOL_STRING=_,e.ForwardRefTag=11,e.FragmentTag=7,e.FunctionComponentTag=0,e.HostComponentTag=5,e.HostHoistableTag=26,e.HostRootTag=3,e.HostSingletonTag=27,e.HostTextTag=6,e.INSTALL_ERROR=U,e.INSTALL_HOOK_SCRIPT_STRING="(()=>{try{var t=()=>{};const n=new Map;let o=0;globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__={checkDCE:t,supportsFiber:!0,supportsFlight:!0,hasUnsupportedRendererAttached:!1,renderers:n,onCommitFiberRoot:t,onCommitFiberUnmount:t,onPostCommitFiberRoot:t,inject(t){var e=++o;return n.set(e,t),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__._instrumentationIsActive=!0,e},_instrumentationIsActive:!1,_script:!0}}catch{}})()",e.LegacyHiddenComponentTag=23,e.MemoComponentTag=14,e.OffscreenComponentTag=22,e.SimpleMemoComponentTag=15,e.SuspenseComponentTag=13,e.TRANSITIONAL_ELEMENT_TYPE_SYMBOL_STRING=g,e.createFiberVisitor=({onRender:e})=>(t,n,o)=>{B(n,e)},e.detectReactBuildType=E,e.didFiberCommit=F,e.didFiberRender=C,e.fiberIdMap=L,e.getDisplayName=e=>{const t=e;if("function"!=typeof t&&("object"!=typeof t||!t))return null;const n=t.displayName||t.name||null;if(n)return n;const o=v(t);return o&&(o.displayName||o.name)||null},e.getFiberFromHostInstance=e=>{const t=f();for(const n of t.renderers.values())try{const t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if("object"==typeof e&&null!=e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(const t in e)if(t.startsWith("__reactInternalInstance$")||t.startsWith("__reactFiber"))return e[t]||null}return null},e.getFiberId=w,e.getFiberStack=e=>{const t=[];let n=e;for(;n.return;)t.push(n),n=n.return;return t},e.getMutatedHostFibers=e=>{const t=[],n=[e];for(;n.length;){const e=n.pop();e&&(y(e)&&F(e)&&C(e)&&t.push(e),e.child&&n.push(e.child),e.sibling&&n.push(e.sibling))}return t},e.getNearestHostFiber=(e,t=!1)=>{let n=S(e,y,t);return n||(n=S(e,y,!t)),n},e.getNearestHostFibers=e=>{const t=[],n=[];for(y(e)?t.push(e):e.child&&n.push(e.child);n.length;){const e=n.pop();if(!e)break;y(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t},e.getRDTHook=f,e.getTimings=e=>{const t=e?.actualDuration??0;let n=t,o=e?.child??null;for(;t>0&&null!=o;)n-=o.actualDuration??0,o=o.sibling;return{selfTime:n,totalTime:t}},e.getType=v,e.hasMemoCache=e=>Boolean(e.updateQueue?.memoCache),e.hasRDTHook=b,e.installRDTHook=d,e.instrument=M,e.isClientEnvironment=h,e.isCompositeFiber=e=>{switch(e.tag){case 0:case 1:case 15:case 14:case 11:return!0;default:return!1}},e.isHostFiber=y,e.isInstrumentationActive=()=>{const e=f();return Boolean(e._instrumentationIsActive)||l()||u()},e.isReactRefresh=u,e.isRealReactDevtools=l,e.isValidElement=e=>"object"==typeof e&&null!=e&&"$$typeof"in e&&[_,g].includes(String(e.$$typeof)),e.isValidFiber=e=>"object"==typeof e&&null!=e&&"tag"in e&&"stateNode"in e&&"return"in e&&"child"in e&&"sibling"in e&&"flags"in e,e.mountFiberRecursively=N,e.onCommitFiberRoot=e=>M(k({onCommitFiberRoot:(t,n)=>{e(n)}})),e.patchRDTHook=p,e.secure=k,e.setFiberId=I,e.shouldFilterFiber=O,e.traverseContexts=(e,t)=>{try{const n=e.dependencies,o=e.alternate?.dependencies;if(!n||!o)return!1;if("object"!=typeof n||!("firstContext"in n)||"object"!=typeof o||!("firstContext"in o))return!1;let r=n.firstContext,i=o.firstContext;for(;r&&"object"==typeof r&&"memoizedValue"in r||i&&"object"==typeof i&&"memoizedValue"in i;){if(!0===t(r,i))return!0;r=r?.next,i=i?.next}}catch{}return!1},e.traverseFiber=S,e.traverseProps=(e,t)=>{try{const n=e.memoizedProps,o=e.alternate?.memoizedProps||{},r=new Set([...Object.keys(o),...Object.keys(n)]);for(const e of r){const r=o?.[e],i=n?.[e];if(!0===t(e,i,r))return!0}}catch{}return!1},e.traverseRenderedFibers=B,e.traverseState=(e,t)=>{try{let n=e.memoizedState,o=e.alternate?.memoizedState;for(;n||o;){if(!0===t(n,o))return!0;n=n?.next,o=o?.next}}catch{}return!1},e.unmountFiber=H,e.unmountFiberChildrenRecursively=P,e.updateFiberRecursively=D,e.version=t,e}({});