react-grab 0.0.41 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -358,12 +358,14 @@ var getCursorQuadrants = (cursorX, cursorY, elementWidth, elementHeight, offset)
358
358
  };
359
359
 
360
360
  // src/components/label.tsx
361
- var _tmpl$3 = /* @__PURE__ */ web.template(`<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713`);
362
- var _tmpl$22 = /* @__PURE__ */ web.template(`<div style=margin-right:4px>Copied`);
363
- var _tmpl$32 = /* @__PURE__ */ web.template(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`);
364
- var _tmpl$4 = /* @__PURE__ */ web.template(`<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>`);
365
- var _tmpl$5 = /* @__PURE__ */ web.template(`<div style=margin-left:4px>to clipboard`);
366
- var _tmpl$6 = /* @__PURE__ */ web.template(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`);
361
+ var _tmpl$3 = /* @__PURE__ */ web.template(`<div style="position:absolute;top:0;left:0;bottom:0;background-color:rgba(178, 28, 142, 0.2);border-radius:3px;transition:width 0.1s ease-out;pointer-events:none">`);
362
+ var _tmpl$22 = /* @__PURE__ */ web.template(`<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713`);
363
+ var _tmpl$32 = /* @__PURE__ */ web.template(`<div style=margin-right:4px>Copied`);
364
+ var _tmpl$4 = /* @__PURE__ */ web.template(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`);
365
+ var _tmpl$5 = /* @__PURE__ */ web.template(`<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>`);
366
+ var _tmpl$6 = /* @__PURE__ */ web.template(`<div style=margin-left:4px>to clipboard`);
367
+ var _tmpl$7 = /* @__PURE__ */ web.template(`<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select`);
368
+ var _tmpl$8 = /* @__PURE__ */ web.template(`<div style="position:fixed;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 6px;display:flex;flex-direction:column"><div style=display:flex;align-items:center;text-overflow:ellipsis;white-space:nowrap>`);
367
369
  var Label = (props) => {
368
370
  let labelRef;
369
371
  const position = useAnimatedPosition({
@@ -416,10 +418,20 @@ var Label = (props) => {
416
418
  return props.visible !== false;
417
419
  },
418
420
  get children() {
419
- var _el$ = _tmpl$6();
421
+ var _el$ = _tmpl$8(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild;
420
422
  var _ref$ = labelRef;
421
423
  typeof _ref$ === "function" ? web.use(_ref$, _el$) : labelRef = _el$;
422
424
  web.insert(_el$, web.createComponent(solidJs.Show, {
425
+ get when() {
426
+ return web.memo(() => props.variant === "processing")() && props.progress !== void 0;
427
+ },
428
+ get children() {
429
+ var _el$2 = _tmpl$3();
430
+ web.effect((_$p) => web.setStyleProperty(_el$2, "width", `${Math.min(100, Math.max(0, (props.progress ?? 0) * 100))}%`));
431
+ return _el$2;
432
+ }
433
+ }), _el$3);
434
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
423
435
  get when() {
424
436
  return props.variant === "processing";
425
437
  },
@@ -427,55 +439,63 @@ var Label = (props) => {
427
439
  return web.createComponent(Spinner, {});
428
440
  }
429
441
  }), null);
430
- web.insert(_el$, web.createComponent(solidJs.Show, {
442
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
431
443
  get when() {
432
444
  return props.variant === "success";
433
445
  },
434
446
  get children() {
435
- return _tmpl$3();
447
+ return _tmpl$22();
436
448
  }
437
449
  }), null);
438
- web.insert(_el$, web.createComponent(solidJs.Show, {
450
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
439
451
  get when() {
440
452
  return props.variant === "success";
441
453
  },
442
454
  get children() {
443
- return _tmpl$22();
455
+ return _tmpl$32();
444
456
  }
445
457
  }), null);
446
- web.insert(_el$, web.createComponent(solidJs.Show, {
458
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
447
459
  get when() {
448
460
  return props.variant === "processing";
449
461
  },
450
- children: "Grabbing\u2026"
462
+ children: "Please wait\u2026"
451
463
  }), null);
452
- web.insert(_el$, web.createComponent(solidJs.Show, {
464
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
453
465
  get when() {
454
466
  return props.variant !== "processing";
455
467
  },
456
468
  get children() {
457
469
  return [(() => {
458
- var _el$4 = _tmpl$32();
459
- web.insert(_el$4, () => labelSegments().primary);
460
- return _el$4;
470
+ var _el$7 = _tmpl$4();
471
+ web.insert(_el$7, () => labelSegments().primary);
472
+ return _el$7;
461
473
  })(), web.createComponent(solidJs.Show, {
462
474
  get when() {
463
475
  return web.memo(() => props.variant === "hover")() && labelSegments().secondary !== "";
464
476
  },
465
477
  get children() {
466
- var _el$5 = _tmpl$4();
467
- web.insert(_el$5, () => labelSegments().secondary);
468
- return _el$5;
478
+ var _el$8 = _tmpl$5();
479
+ web.insert(_el$8, () => labelSegments().secondary);
480
+ return _el$8;
469
481
  }
470
482
  })];
471
483
  }
472
484
  }), null);
473
- web.insert(_el$, web.createComponent(solidJs.Show, {
485
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
474
486
  get when() {
475
487
  return props.variant === "success";
476
488
  },
477
489
  get children() {
478
- return _tmpl$5();
490
+ return _tmpl$6();
491
+ }
492
+ }), null);
493
+ web.insert(_el$3, web.createComponent(solidJs.Show, {
494
+ get when() {
495
+ return web.memo(() => props.variant === "hover")() && props.showHint;
496
+ },
497
+ get children() {
498
+ return _tmpl$7();
479
499
  }
480
500
  }), null);
481
501
  web.effect((_p$) => {
@@ -495,49 +515,7 @@ var Label = (props) => {
495
515
  }
496
516
  });
497
517
  };
498
- var _tmpl$7 = /* @__PURE__ */ web.template(`<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">`);
499
- var ProgressIndicator = (props) => {
500
- const opacity = useFadeInOut({
501
- visible: props.visible
502
- });
503
- let progressIndicatorRef;
504
- const computedPosition = () => {
505
- const boundingRect = progressIndicatorRef?.getBoundingClientRect();
506
- if (!boundingRect) return {
507
- left: props.mouseX,
508
- top: props.mouseY
509
- };
510
- const viewportHeight = window.innerHeight;
511
- const indicatorLeft = props.mouseX - boundingRect.width / 2;
512
- const indicatorTop = props.mouseY + CURSOR_OFFSET_PX + boundingRect.height + VIEWPORT_MARGIN_PX > viewportHeight ? props.mouseY - boundingRect.height - CURSOR_OFFSET_PX : props.mouseY + CURSOR_OFFSET_PX;
513
- return getClampedElementPosition(indicatorLeft, indicatorTop, boundingRect.width, boundingRect.height);
514
- };
515
- return web.createComponent(solidJs.Show, {
516
- get when() {
517
- return props.visible !== false;
518
- },
519
- get children() {
520
- var _el$ = _tmpl$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
521
- var _ref$ = progressIndicatorRef;
522
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : progressIndicatorRef = _el$;
523
- web.effect((_p$) => {
524
- var _v$ = `${computedPosition().top}px`, _v$2 = `${computedPosition().left}px`, _v$3 = opacity(), _v$4 = `${Math.min(100, Math.max(0, props.progress * 100))}%`;
525
- _v$ !== _p$.e && web.setStyleProperty(_el$, "top", _p$.e = _v$);
526
- _v$2 !== _p$.t && web.setStyleProperty(_el$, "left", _p$.t = _v$2);
527
- _v$3 !== _p$.a && web.setStyleProperty(_el$, "opacity", _p$.a = _v$3);
528
- _v$4 !== _p$.o && web.setStyleProperty(_el$3, "width", _p$.o = _v$4);
529
- return _p$;
530
- }, {
531
- e: void 0,
532
- t: void 0,
533
- a: void 0,
534
- o: void 0
535
- });
536
- return _el$;
537
- }
538
- });
539
- };
540
- var _tmpl$8 = /* @__PURE__ */ web.template(`<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>`);
518
+ var _tmpl$9 = /* @__PURE__ */ web.template(`<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>`);
541
519
  var Crosshair = (props) => {
542
520
  let canvasRef;
543
521
  let context = null;
@@ -597,7 +575,7 @@ var Crosshair = (props) => {
597
575
  return props.visible !== false;
598
576
  },
599
577
  get children() {
600
- var _el$ = _tmpl$8();
578
+ var _el$ = _tmpl$9();
601
579
  var _ref$ = canvasRef;
602
580
  typeof _ref$ === "function" ? web.use(_ref$, _el$) : canvasRef = _el$;
603
581
  return _el$;
@@ -665,22 +643,29 @@ var ReactGrabRenderer = (props) => {
665
643
  return box.createdAt;
666
644
  }
667
645
  })
668
- }), web.createComponent(solidJs.For, {
669
- get each() {
670
- return props.successLabels ?? [];
646
+ }), web.createComponent(solidJs.Show, {
647
+ get when() {
648
+ return props.labelVariant !== "processing";
671
649
  },
672
- children: (label) => web.createComponent(Label, {
673
- variant: "success",
674
- get text() {
675
- return label.text;
676
- },
677
- get x() {
678
- return props.mouseX ?? 0;
679
- },
680
- get y() {
681
- return props.mouseY ?? 0;
682
- }
683
- })
650
+ get children() {
651
+ return web.createComponent(solidJs.For, {
652
+ get each() {
653
+ return props.successLabels ?? [];
654
+ },
655
+ children: (label) => web.createComponent(Label, {
656
+ variant: "success",
657
+ get text() {
658
+ return label.text;
659
+ },
660
+ get x() {
661
+ return props.mouseX ?? 0;
662
+ },
663
+ get y() {
664
+ return props.mouseY ?? 0;
665
+ }
666
+ })
667
+ });
668
+ }
684
669
  }), web.createComponent(solidJs.Show, {
685
670
  get when() {
686
671
  return web.memo(() => !!(props.labelVisible && props.labelVariant && props.labelText && props.labelX !== void 0))() && props.labelY !== void 0;
@@ -704,26 +689,12 @@ var ReactGrabRenderer = (props) => {
704
689
  },
705
690
  get zIndex() {
706
691
  return props.labelZIndex;
707
- }
708
- });
709
- }
710
- }), web.createComponent(solidJs.Show, {
711
- get when() {
712
- return web.memo(() => !!(props.progressVisible && props.progress !== void 0 && props.mouseX !== void 0))() && props.mouseY !== void 0;
713
- },
714
- get children() {
715
- return web.createComponent(ProgressIndicator, {
692
+ },
716
693
  get progress() {
717
694
  return props.progress;
718
695
  },
719
- get mouseX() {
720
- return props.mouseX;
721
- },
722
- get mouseY() {
723
- return props.mouseY;
724
- },
725
- get visible() {
726
- return props.progressVisible;
696
+ get showHint() {
697
+ return props.labelShowHint;
727
698
  }
728
699
  });
729
700
  }
@@ -856,8 +827,8 @@ var getHTMLPreview = (element) => {
856
827
  }
857
828
  attrsText += ` ${name}="${value}"`;
858
829
  }
859
- let topElements = 0;
860
- let bottomElements = 0;
830
+ const topElements = [];
831
+ const bottomElements = [];
861
832
  let foundFirstText = false;
862
833
  const childNodes = Array.from(element.childNodes);
863
834
  for (const node of childNodes) {
@@ -868,19 +839,31 @@ var getHTMLPreview = (element) => {
868
839
  }
869
840
  } else if (node.nodeType === Node.ELEMENT_NODE) {
870
841
  if (!foundFirstText) {
871
- topElements++;
842
+ topElements.push(node);
872
843
  } else {
873
- bottomElements++;
844
+ bottomElements.push(node);
874
845
  }
875
846
  }
876
847
  }
848
+ const formatElements = (elements) => {
849
+ if (elements.length === 0) return "";
850
+ if (elements.length <= 2) {
851
+ return elements.map((el) => `<${el.tagName.toLowerCase()} ...>`).join("\n ");
852
+ }
853
+ return `(${elements.length} elements)`;
854
+ };
877
855
  let content = "";
878
- if (topElements > 0) content += `
879
- (${topElements} elements)`;
880
- if (text.length > 0) content += `
881
- ${text}`;
882
- if (bottomElements > 0) content += `
883
- (${bottomElements} elements)`;
856
+ const topElementsStr = formatElements(topElements);
857
+ if (topElementsStr) content += `
858
+ ${topElementsStr}`;
859
+ if (text.length > 0) {
860
+ const truncatedText = text.length > 100 ? `${text.slice(0, 100)}...` : text;
861
+ content += `
862
+ ${truncatedText}`;
863
+ }
864
+ const bottomElementsStr = formatElements(bottomElements);
865
+ if (bottomElementsStr) content += `
866
+ ${bottomElementsStr}`;
884
867
  if (content.length > 0) {
885
868
  return `<${tagName}${attrsText}>${content}
886
869
  </${tagName}>`;
@@ -1130,8 +1113,6 @@ var init = (rawOptions) => {
1130
1113
  let progressDelayTimerId = null;
1131
1114
  let keydownSpamTimerId = null;
1132
1115
  let mouseSettleTimerId = null;
1133
- let referenceMouseX = OFFSCREEN_POSITION;
1134
- let referenceMouseY = OFFSCREEN_POSITION;
1135
1116
  const isRendererActive = solidJs.createMemo(() => isActivated() && !isCopying());
1136
1117
  const hasValidMousePosition = solidJs.createMemo(() => mouseX() > OFFSCREEN_POSITION && mouseY() > OFFSCREEN_POSITION);
1137
1118
  const isTargetKeyCombination = (event) => (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c";
@@ -1329,7 +1310,6 @@ ${formatStack(await getStack(element))}`));
1329
1310
  x: mouseX(),
1330
1311
  y: mouseY()
1331
1312
  });
1332
- const isSameAsLast = solidJs.createMemo(() => Boolean(targetElement() && targetElement() === lastGrabbedElement()));
1333
1313
  solidJs.createEffect(solidJs.on(() => [targetElement(), lastGrabbedElement()], ([currentElement, lastElement]) => {
1334
1314
  if (lastElement && currentElement && lastElement !== currentElement) {
1335
1315
  setLastGrabbedElement(null);
@@ -1375,6 +1355,7 @@ ${formatStack(await getStack(element))}`));
1375
1355
  stopProgressAnimation();
1376
1356
  setIsActivated(true);
1377
1357
  document.body.style.cursor = "crosshair";
1358
+ options.onActivate?.();
1378
1359
  };
1379
1360
  const deactivateRenderer = () => {
1380
1361
  setIsToggleMode(false);
@@ -1392,9 +1373,8 @@ ${formatStack(await getStack(element))}`));
1392
1373
  mouseSettleTimerId = null;
1393
1374
  }
1394
1375
  setMouseHasSettled(false);
1395
- referenceMouseX = OFFSCREEN_POSITION;
1396
- referenceMouseY = OFFSCREEN_POSITION;
1397
1376
  stopProgressAnimation();
1377
+ options.onDeactivate?.();
1398
1378
  };
1399
1379
  const abortController = new AbortController();
1400
1380
  const eventListenerSignal = abortController.signal;
@@ -1412,7 +1392,6 @@ ${formatStack(await getStack(element))}`));
1412
1392
  if (!isActivated()) {
1413
1393
  if (holdTimerId) window.clearTimeout(holdTimerId);
1414
1394
  activateRenderer();
1415
- options.onActivate?.();
1416
1395
  }
1417
1396
  return;
1418
1397
  }
@@ -1439,7 +1418,6 @@ ${formatStack(await getStack(element))}`));
1439
1418
  }
1440
1419
  holdTimerId = window.setTimeout(() => {
1441
1420
  activateRenderer();
1442
- options.onActivate?.();
1443
1421
  }, options.keyHoldDuration);
1444
1422
  }, {
1445
1423
  signal: eventListenerSignal,
@@ -1460,34 +1438,14 @@ ${formatStack(await getStack(element))}`));
1460
1438
  window.addEventListener("mousemove", (event) => {
1461
1439
  setMouseX(event.clientX);
1462
1440
  setMouseY(event.clientY);
1463
- if (referenceMouseX === OFFSCREEN_POSITION) {
1464
- referenceMouseX = event.clientX;
1465
- referenceMouseY = event.clientY;
1466
- }
1467
- const deltaX = event.clientX - referenceMouseX;
1468
- const deltaY = event.clientY - referenceMouseY;
1469
- const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
1470
- if (distance >= 200) {
1471
- if (mouseSettleTimerId !== null) {
1472
- window.clearTimeout(mouseSettleTimerId);
1473
- }
1474
- setMouseHasSettled(false);
1475
- referenceMouseX = event.clientX;
1476
- referenceMouseY = event.clientY;
1477
- mouseSettleTimerId = window.setTimeout(() => {
1478
- setMouseHasSettled(true);
1479
- referenceMouseX = mouseX();
1480
- referenceMouseY = mouseY();
1481
- mouseSettleTimerId = null;
1482
- }, 100);
1483
- } else if (mouseSettleTimerId === null && !mouseHasSettled()) {
1484
- mouseSettleTimerId = window.setTimeout(() => {
1485
- setMouseHasSettled(true);
1486
- referenceMouseX = mouseX();
1487
- referenceMouseY = mouseY();
1488
- mouseSettleTimerId = null;
1489
- }, 100);
1441
+ if (mouseSettleTimerId !== null) {
1442
+ window.clearTimeout(mouseSettleTimerId);
1490
1443
  }
1444
+ setMouseHasSettled(false);
1445
+ mouseSettleTimerId = window.setTimeout(() => {
1446
+ setMouseHasSettled(true);
1447
+ mouseSettleTimerId = null;
1448
+ }, 300);
1491
1449
  }, {
1492
1450
  signal: eventListenerSignal
1493
1451
  });
@@ -1571,7 +1529,7 @@ ${formatStack(await getStack(element))}`));
1571
1529
  const labelVisible = solidJs.createMemo(() => {
1572
1530
  if (isCopying()) return true;
1573
1531
  if (successLabels().length > 0) return false;
1574
- return isRendererActive() && !isDragging() && mouseHasSettled() && (Boolean(targetElement()) && !isSameAsLast() || !targetElement());
1532
+ return isRendererActive() && !isDragging() && Boolean(targetElement());
1575
1533
  });
1576
1534
  const progressVisible = solidJs.createMemo(() => isCopying() && showProgressIndicator() && hasValidMousePosition());
1577
1535
  const crosshairVisible = solidJs.createMemo(() => isRendererActive() && !isDragging());
@@ -1610,6 +1568,9 @@ ${formatStack(await getStack(element))}`));
1610
1568
  return labelVisible();
1611
1569
  },
1612
1570
  labelZIndex: Z_INDEX_LABEL,
1571
+ get labelShowHint() {
1572
+ return mouseHasSettled();
1573
+ },
1613
1574
  get progressVisible() {
1614
1575
  return progressVisible();
1615
1576
  },
@@ -1630,7 +1591,6 @@ ${formatStack(await getStack(element))}`));
1630
1591
  activate: () => {
1631
1592
  if (!isActivated()) {
1632
1593
  activateRenderer();
1633
- options.onActivate?.();
1634
1594
  }
1635
1595
  },
1636
1596
  deactivate: () => {
@@ -1643,7 +1603,6 @@ ${formatStack(await getStack(element))}`));
1643
1603
  deactivateRenderer();
1644
1604
  } else {
1645
1605
  activateRenderer();
1646
- options.onActivate?.();
1647
1606
  }
1648
1607
  },
1649
1608
  isActive: () => isActivated(),
package/dist/index.d.cts CHANGED
@@ -3,6 +3,7 @@ interface Options {
3
3
  keyHoldDuration?: number;
4
4
  allowActivationInsideInput?: boolean;
5
5
  onActivate?: () => void;
6
+ onDeactivate?: () => void;
6
7
  playCopySound?: boolean;
7
8
  }
8
9
  interface ReactGrabAPI {
@@ -40,6 +41,7 @@ interface ReactGrabRendererProps {
40
41
  labelY?: number;
41
42
  labelVisible?: boolean;
42
43
  labelZIndex?: number;
44
+ labelShowHint?: boolean;
43
45
  progressVisible?: boolean;
44
46
  progress?: number;
45
47
  mouseX?: number;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ interface Options {
3
3
  keyHoldDuration?: number;
4
4
  allowActivationInsideInput?: boolean;
5
5
  onActivate?: () => void;
6
+ onDeactivate?: () => void;
6
7
  playCopySound?: boolean;
7
8
  }
8
9
  interface ReactGrabAPI {
@@ -40,6 +41,7 @@ interface ReactGrabRendererProps {
40
41
  labelY?: number;
41
42
  labelVisible?: boolean;
42
43
  labelZIndex?: number;
44
+ labelShowHint?: boolean;
43
45
  progressVisible?: boolean;
44
46
  progress?: number;
45
47
  mouseX?: number;
@@ -6,35 +6,36 @@ var ReactGrab=(function(exports){'use strict';/**
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- var jr=(e,t)=>e===t;var Vr=Symbol("solid-track"),tt={equals:jr},xn=An,ce=1,je=2,Cn={owned:null,cleanups:null,context:null,owner:null};var O=null,g=null,Me=null,I=null,U=null,Q=null,rt=0;function Ne(e,t){let n=I,r=O,o=e.length===0,i=t===void 0?r:t,s=o?Cn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ie(()=>ve(s)));O=s,I=null;try{return ye(a,!0)}finally{I=n,O=r;}}function E(e,t){t=t?Object.assign({},tt,t):tt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Rn(n,o));return [En.bind(n),r]}function se(e,t,n){let r=Pt(e,t,false,ce);Ge(r);}function oe(e,t,n){xn=zr;let r=Pt(e,t,false,ce);(r.user=true),Q?Q.push(r):Ge(r);}function L(e,t,n){n=n?Object.assign({},tt,n):tt;let r=Pt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ge(r),En.bind(r)}function ie(e){if(I===null)return e();let t=I;I=null;try{return Me?Me.untrack(e):e()}finally{I=t;}}function $e(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=ie(()=>t(a,o,s));return o=a,l}}function vn(e){oe(()=>ie(e));}function ae(e){return O===null||(O.cleanups===null?O.cleanups=[e]:O.cleanups.push(e)),e}E(false);function En(){let e=g;if(this.sources&&(this.state))if((this.state)===ce)Ge(this);else {let t=U;U=null,ye(()=>nt(this),false),U=t;}if(I){let t=this.observers?this.observers.length:0;I.sources?(I.sources.push(this),I.sourceSlots.push(t)):(I.sources=[this],I.sourceSlots=[t]),this.observers?(this.observers.push(I),this.observerSlots.push(I.sources.length-1)):(this.observers=[I],this.observerSlots=[I.sources.length-1]);}return e&&g.sources.has(this)?this.tValue:this.value}function Rn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&ye(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=g&&g.running;s&&g.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?U.push(i):Q.push(i),i.observers&&_n(i)),s?i.tState=ce:i.state=ce);}if(U.length>1e6)throw U=[],new Error},false);}return t}function Ge(e){if(!e.fn)return;ve(e);let t=rt;wn(e,e.value,t);}function wn(e,t,n){let r,o=O,i=I;I=O=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=ce,e.owned&&e.owned.forEach(ve),e.owned=null)),e.updatedAt=n+1,It(s)}finally{I=i,O=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Rn(e,r):e.value=r,e.updatedAt=n);}function Pt(e,t,n,r=ce,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:O,context:O?O.context:null,pure:n};if(O===null||O!==Cn&&(O.owned?O.owned.push(i):O.owned=[i]),Me);return i}function Ve(e){let t=g;if((e.state)===0)return;if((e.state)===je)return nt(e);if(e.suspense&&ie(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<rt);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ce)Ge(e);else if((e.state)===je){let o=U;U=null,ye(()=>nt(e,n[0]),false),U=o;}}}function ye(e,t){if(U)return e();let n=false;t||(U=[]),Q?n=true:Q=[],rt++;try{let r=e();return Ur(n),r}catch(r){n||(Q=null),U=null,It(r);}}function Ur(e){if(U&&(An(U),U=null),e)return;let n=Q;Q=null,n.length&&ye(()=>xn(n),false);}function An(e){for(let t=0;t<e.length;t++)Ve(e[t]);}function zr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Ve(r);}for(t=0;t<n;t++)Ve(e[t]);}function nt(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let i=o.state;i===ce?o!==t&&(!o.updatedAt||o.updatedAt<rt)&&Ve(o):i===je&&nt(o,t);}}}function _n(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=je,r.pure?U.push(r):Q.push(r),r.observers&&_n(r));}}function ve(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ve(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ve(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function qr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function It(e,t=O){let r=qr(e);throw r;}var Wr=Symbol("fallback");function Sn(e){for(let t=0;t<e.length;t++)e[t]();}function Kr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>Sn(i)),()=>{let l=e()||[],c=l.length,d,m;return l[Vr],ie(()=>{let w,y,x,G,ne,X,W,D,K;if(c===0)s!==0&&(Sn(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Wr],o[0]=Ne(fe=>(i[0]=fe,n.fallback())),s=1);else if(s===0){for(o=new Array(c),m=0;m<c;m++)r[m]=l[m],o[m]=Ne(T);s=c;}else {for(x=new Array(c),G=new Array(c),a&&(ne=new Array(c)),X=0,W=Math.min(s,c);X<W&&r[X]===l[X];X++);for(W=s-1,D=c-1;W>=X&&D>=X&&r[W]===l[D];W--,D--)x[D]=o[W],G[D]=i[W],a&&(ne[D]=a[W]);for(w=new Map,y=new Array(D+1),m=D;m>=X;m--)K=l[m],d=w.get(K),y[m]=d===void 0?-1:d,w.set(K,m);for(d=X;d<=W;d++)K=r[d],m=w.get(K),m!==void 0&&m!==-1?(x[m]=o[d],G[m]=i[d],a&&(ne[m]=a[d]),m=y[m],w.set(K,m)):i[d]();for(m=X;m<c;m++)m in x?(o[m]=x[m],i[m]=G[m],a&&(a[m]=ne[m],a[m](m))):o[m]=Ne(T);o=o.slice(0,s=c),r=l.slice(0);}return o});function T(w){if(i[m]=w,a){let[y,x]=E(m);return a[m]=x,t(l[m],y)}return t(l[m])}}}function R(e,t){return ie(()=>e(t||{}))}var Qr=e=>`Stale read from <${e}>.`;function ot(e){let t="fallback"in e&&{fallback:()=>e.fallback};return L(Kr(()=>e.each,e.children,t||void 0))}function H(e){let t=e.keyed,n=L(()=>e.when,void 0,void 0),r=t?n:L(n,void 0,{equals:(o,i)=>!o==!i});return L(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?ie(()=>i(t?o:()=>{if(!ie(r))throw Qr("Show");return n()})):i}return e.fallback},void 0,void 0)}var Ee=e=>L(()=>e());function to(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let d=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],d);}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let d=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],d),t[o]=n[i];}else {if(!c){c=new Map;let m=a;for(;m<i;)c.set(n[m],m++);}let d=c.get(t[s]);if(d!=null)if(a<d&&d<i){let m=s,T=1,w;for(;++m<o&&m<i&&!((w=c.get(t[m]))==null||w!==d+T);)T++;if(T>d-a){let y=t[s];for(;a<d;)e.insertBefore(n[a++],y);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function kn(e,t,n,r={}){let o;return Ne(i=>{o=i,t===document?e():be(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function te(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function no(e,t,n){(e.removeAttribute(t));}function st(e,t,n){if(!t)return n?no(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function he(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Re(e,t,n){return ie(()=>e(t,n))}function be(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return it(e,t,r,n);se(o=>it(e,t(),o,n),r);}function it(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Le(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=Le(e,n,r);}else {if(s==="function")return se(()=>{let l=t();for(;typeof l=="function";)l=l();n=it(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(Mt(l,t,n,o))return se(()=>n=it(e,l,n,r,true)),()=>n;if(l.length===0){if(n=Le(e,n,r),a)return n}else c?n.length===0?Fn(e,l,r):to(e,n,l):(n&&Le(e),Fn(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Le(e,n,r,t);Le(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Mt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Mt(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Mt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let d=String(a);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d));}}return o}function Fn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Le(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var ro=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],oo=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),io=e=>Array.isArray(e),so=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&oo(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return io(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},Pn=e=>so(e,ro);var De="data-react-grab",In=()=>{let e=document.querySelector(`[${De}]`);if(e){let i=e.shadowRoot?.querySelector(`[${De}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(De,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute(De,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Ae=(e,t,n)=>e+(t-e)*n;var lo=te("<div>"),at=e=>{let[t,n]=E(e.bounds.x),[r,o]=E(e.bounds.y),[i,s]=E(e.bounds.width),[a,l]=E(e.bounds.height),[c,d]=E(1),m=false,T=null,w=null,y=e.bounds,x=false,G=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,ne=()=>{if(x)return;x=true;let D=()=>{let K=Ae(t(),y.x,G()),fe=Ae(r(),y.y,G()),Oe=Ae(i(),y.width,G()),Te=Ae(a(),y.height,G());n(K),o(fe),s(Oe),l(Te),Math.abs(K-y.x)<.5&&Math.abs(fe-y.y)<.5&&Math.abs(Oe-y.width)<.5&&Math.abs(Te-y.height)<.5?(T=null,x=false):T=requestAnimationFrame(D);};T=requestAnimationFrame(D);};oe($e(()=>e.bounds,D=>{if(y=D,!m){n(y.x),o(y.y),s(y.width),l(y.height),m=true;return}ne();})),oe(()=>{e.variant==="grabbed"&&e.createdAt&&(w=window.setTimeout(()=>{d(0);},1500));}),ae(()=>{T!==null&&(cancelAnimationFrame(T),T=null),w!==null&&(window.clearTimeout(w),w=null),x=false;});let X={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":e.variant==="grabbed"?"2147483645":"2147483646"},W=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:e.variant==="selection"?{border:"1px dashed rgba(210, 57, 192, 0.5)","background-color":"rgba(210, 57, 192, 0.08)"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.08)",transition:"opacity 0.3s ease-out"};return R(H,{get when(){return e.visible!==false},get children(){var D=lo();return se(K=>st(D,{...X,...W(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},K)),D}})};var co=te('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),Mn=e=>{let t;return vn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=co(),r=t;return typeof r=="function"?Re(r,n):t=n,se(o=>st(n,{...e.style},o)),n})()};var lt=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,c=i-r-8,d=Math.max(s,Math.min(e,l)),m=Math.max(a,Math.min(t,c));return {left:d,top:m}};var ct=e=>{let t=e.lerpFactor??.3,n=e.convergenceThreshold??.5,[r,o]=E(e.x()),[i,s]=E(e.y()),a=e.x(),l=e.y(),c=null,d=false,m=()=>{let w=Ae(r(),a,t),y=Ae(i(),l,t);o(w),s(y),Math.abs(w-a)<n&&Math.abs(y-l)<n?c=null:c=requestAnimationFrame(m);},T=()=>{c===null&&(c=requestAnimationFrame(m));};return oe(()=>{if(a=e.x(),l=e.y(),!d){o(a),s(l),d=true;return}T();}),ae(()=>{c!==null&&(cancelAnimationFrame(c),c=null);}),{x:r,y:i}};var ut=e=>{let[t,n]=E(0);return oe($e(()=>e.visible,r=>{if(r!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.autoFadeOutAfter!==void 0){let o=setTimeout(()=>{n(0);},e.autoFadeOutAfter);ae(()=>clearTimeout(o));}})),t};var $n=(e,t,n,r,o)=>[{left:Math.round(e)+o,top:Math.round(t)+o},{left:Math.round(e)-n-o,top:Math.round(t)+o},{left:Math.round(e)+o,top:Math.round(t)-r-o},{left:Math.round(e)-n-o,top:Math.round(t)-r-o}];var uo=te("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),fo=te("<div style=margin-right:4px>Copied"),mo=te(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`),go=te("<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>"),po=te("<div style=margin-left:4px>to clipboard"),ho=te(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),$t=e=>{let t,n=ct({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),r=ut({visible:e.visible,autoFadeOutAfter:e.variant==="success"?1700:void 0}),o=()=>t?.getBoundingClientRect(),i=()=>{let a=o();if(!a)return {left:n.x(),top:n.y()};let l=window.innerWidth,c=window.innerHeight,d=$n(n.x(),n.y(),a.width,a.height,14);for(let T of d){let w=T.left>=8&&T.left+a.width<=l-8,y=T.top>=8&&T.top+a.height<=c-8;if(w&&y)return T}let m=lt(d[0].left,d[0].top,a.width,a.height);return m.left+=4,m.top+=4,m},s=()=>{let l=e.text.indexOf(" in ");return l===-1?{primary:e.text,secondary:""}:{primary:e.text.slice(0,l),secondary:e.text.slice(l)}};return R(H,{get when(){return e.visible!==false},get children(){var a=ho(),l=t;return typeof l=="function"?Re(l,a):t=a,be(a,R(H,{get when(){return e.variant==="processing"},get children(){return R(Mn,{})}}),null),be(a,R(H,{get when(){return e.variant==="success"},get children(){return uo()}}),null),be(a,R(H,{get when(){return e.variant==="success"},get children(){return fo()}}),null),be(a,R(H,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),be(a,R(H,{get when(){return e.variant!=="processing"},get children(){return [(()=>{var c=mo();return be(c,()=>s().primary),c})(),R(H,{get when(){return Ee(()=>e.variant==="hover")()&&s().secondary!==""},get children(){var c=go();return be(c,()=>s().secondary),c}})]}}),null),be(a,R(H,{get when(){return e.variant==="success"},get children(){return po()}}),null),se(c=>{var d=`${i().top}px`,m=`${i().left}px`,T=e.zIndex?.toString()??"2147483647",w=r();return d!==c.e&&he(a,"top",c.e=d),m!==c.t&&he(a,"left",c.t=m),T!==c.a&&he(a,"z-index",c.a=T),w!==c.o&&he(a,"opacity",c.o=w),c},{e:void 0,t:void 0,a:void 0,o:void 0}),a}})};var bo=te('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Dn=e=>{let t=ut({visible:e.visible}),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerHeight,s=e.mouseX-o.width/2,a=e.mouseY+14+o.height+8>i?e.mouseY-o.height-14:e.mouseY+14;return lt(s,a,o.width,o.height)};return R(H,{get when(){return e.visible!==false},get children(){var o=bo(),i=o.firstChild,s=i.firstChild,a=n;return typeof a=="function"?Re(a,o):n=o,se(l=>{var c=`${r().top}px`,d=`${r().left}px`,m=t(),T=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&he(o,"top",l.e=c),d!==l.t&&he(o,"left",l.t=d),m!==l.a&&he(o,"opacity",l.a=m),T!==l.o&&he(s,"width",l.o=T),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var yo=te("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),Hn=e=>{let t,n=null,r=0,o=0,i=1,s=ct({x:()=>e.mouseX,y:()=>e.mouseY,lerpFactor:.3}),a=()=>{t&&(i=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,o=window.innerHeight,t.width=r*i,t.height=o*i,t.style.width=`${r}px`,t.style.height=`${o}px`,n=t.getContext("2d"),n&&n.scale(i,i));},l=()=>{n&&(n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(s.x(),0),n.lineTo(s.x(),o),n.moveTo(0,s.y()),n.lineTo(r,s.y()),n.stroke());};return oe(()=>{a(),l();let c=()=>{a(),l();};window.addEventListener("resize",c),ae(()=>{window.removeEventListener("resize",c);});}),oe(()=>{s.x(),s.y(),l();}),R(H,{get when(){return e.visible!==false},get children(){var c=yo(),d=t;return typeof d=="function"?Re(d,c):t=c,c}})};var Bn=e=>[R(H,{get when(){return Ee(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return R(at,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),R(H,{get when(){return Ee(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return R(Hn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),R(H,{get when(){return Ee(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return R(at,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),R(ot,{get each(){return e.grabbedBoxes??[]},children:t=>R(at,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),R(ot,{get each(){return e.successLabels??[]},children:t=>R($t,{variant:"success",get text(){return t.text},get x(){return e.mouseX??0},get y(){return e.mouseY??0}})}),R(H,{get when(){return Ee(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return R($t,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex}})}}),R(H,{get when(){return Ee(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return R(Dn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var Yn="0.5.16",pt=`bippy-${Yn}`,jn=Object.defineProperty,wo=Object.prototype.hasOwnProperty,Xe=()=>{},Gn=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw 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{}},Lt=(e=_e())=>"getFiberRoots"in e,Un=false,Vn,mt=(e=_e())=>Un?true:(typeof e.inject=="function"&&(Vn=e.inject.toString()),!!Vn?.includes("(injected)")),dt=new Set,Pe=new Set,Xn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:pt,checkDCE:Gn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),Pe.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,dt.forEach(s=>s())),i},on:Xe,onCommitFiberRoot:Xe,onCommitFiberUnmount:Xe,onPostCommitFiberRoot:Xe,renderers:t,supportsFiber:true,supportsFlight:true};try{jn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,c)=>{Pe.add(l),s.renderers.set(c,l);}),gt(e));}}});let o=window.hasOwnProperty,i=!1;jn(window,"hasOwnProperty",{configurable:!0,value:function(...s){try{if(!i&&s[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,i=!0,-0}catch{}return o.apply(this,s)},writable:!0});}catch{gt(e);}return r},gt=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Gn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=pt,t._instrumentationIsActive=!1;let n=Lt(t);if(n||(t.on=Xe),t.renderers.size){t._instrumentationIsActive=!0,dt.forEach(i=>i());return}let r=t.inject,o=mt(t);o&&!n&&(Un=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return Pe.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,dt.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||mt())&&e?.();}catch{}},Dt=()=>wo.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),_e=e=>Dt()?(gt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Xn(e),zn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Ht=()=>{try{zn()&&_e();}catch{}};Ht();var ht=0,bt=1;var yt=5;var wt=11,Bt=13,qn=14,Tt=15,jt=16;var Vt=19;var St=26,xt=27,Yt=28,Gt=30;var Ct=e=>{switch(e.tag){case yt:case St:case xt:return true;default:return typeof e.type=="string"}},vt=e=>{switch(e.tag){case bt:case wt:case ht:case qn:case Tt:return true;default:return false}},Ut=e=>!e||typeof e!="object"?true:"pendingProps"in e&&!("containerInfo"in e);function He(e,t,n=false){if(!e)return null;let r=t(e);if(r instanceof Promise)return (async()=>{if(await r===true)return e;let i=n?e.return:e.child;for(;i;){let s=await zt(i,t,n);if(s)return s;i=n?null:i.sibling;}return null})();if(r===true)return e;let o=n?e.return:e.child;for(;o;){let i=Xt(o,t,n);if(i)return i;o=n?null:o.sibling;}return null}var Xt=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=Xt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},zt=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=await zt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var qt=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?qt(t.type||t.render):null},Ie=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=qt(t);return r&&(r.displayName||r.name)||null};var Et=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of Wn){let r=He(n.current,o=>{if(o===e)return true});if(r)return r}return e};var ze=e=>{let t=_e();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Wn=new Set;var _o=Object.create,rr=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyNames,ko=Object.getPrototypeOf,No=Object.prototype.hasOwnProperty,Po=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Io=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Fo(t),i=0,s=o.length,a;i<s;i++)a=o[i],!No.call(e,a)&&a!==n&&rr(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Oo(t,a))||r.enumerable});return e},Mo=(e,t,n)=>(n=e==null?{}:_o(ko(e)),Io(rr(n,"default",{value:e,enumerable:true}),e)),$o=()=>{let e=_e();for(let t of [...Array.from(Pe),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Kn=e=>{for(let t of Pe){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},we=e=>`
10
- in ${e}`,Lo=(e,t)=>{let n=we(e);return t&&(n+=` (at ${t})`),n},Wt=false,Kt=(e,t)=>{if(!e||Wt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Wt=true;let r=$o();Kn(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let T;try{if(t){let w=function(){throw Error()};if(Object.defineProperty(w.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(w,[]);}catch(y){T=y;}Reflect.construct(e,[],w);}else {try{w.call();}catch(y){T=y;}e.call(w.prototype);}}else {try{throw Error()}catch(y){T=y;}let w=e();w&&typeof w.catch=="function"&&w.catch(()=>{});}}catch(w){if(w instanceof Error&&T instanceof Error&&typeof w.stack=="string")return [w.stack,T.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[d,m]=l.DetermineComponentFrameRoot();if(d&&m){let T=d.split(`
11
- `),w=m.split(`
12
- `),y=0,x=0;for(;y<T.length&&!T[y].includes("DetermineComponentFrameRoot");)y++;for(;x<w.length&&!w[x].includes("DetermineComponentFrameRoot");)x++;if(y===T.length||x===w.length)for(y=T.length-1,x=w.length-1;y>=1&&x>=0&&T[y]!==w[x];)x--;for(;y>=1&&x>=0;y--,x--)if(T[y]!==w[x]){if(y!==1||x!==1)do if(y--,x--,x<0||T[y]!==w[x]){let G=`
13
- ${T[y].replace(" at new "," at ")}`,ne=Ie(e);return ne&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",ne)),G}while(y>=1&&x>=0);break}}}finally{Wt=false,Error.prepareStackTrace=n,Kn(r),console.error=o,console.warn=i;}let s=e?Ie(e):"";return s?we(s):""},Do=(e,t)=>{let n=e.tag,r="";switch(n){case Yt:r=we("Activity");break;case bt:r=Kt(e.type,true);break;case wt:r=Kt(e.type.render,false);break;case ht:case Tt:r=Kt(e.type,false);break;case yt:case St:case xt:r=we(e.type);break;case jt:r=we("Lazy");break;case Bt:r=e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");break;case Vt:r=we("SuspenseList");break;case Gt:r=we("ViewTransition");break;default:return ""}return r},Ho=e=>{try{let t="",n=e,r=null;do{t+=Do(n,r);let o=n._debugInfo;if(o&&Array.isArray(o))for(let i=o.length-1;i>=0;i--){let s=o[i];typeof s.name=="string"&&(t+=Lo(s.name,s.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
9
+ var Mr=(e,t)=>e===t;var Lr=Symbol("solid-track"),tt={equals:Mr},bn=xn,se=1,je=2,yn={owned:null,cleanups:null,context:null,owner:null};var O=null,g=null,ke=null,P=null,Y=null,Z=null,rt=0;function _e(e,t){let n=P,r=O,o=e.length===0,i=t===void 0?r:t,s=o?yn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>oe(()=>Te(s)));O=s,P=null;try{return pe(a,!0)}finally{P=n,O=r;}}function v(e,t){t=t?Object.assign({},tt,t):tt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Sn(n,o));return [Tn.bind(n),r]}function ae(e,t,n){let r=Ft(e,t,false,se);Ue(r);}function ne(e,t,n){bn=Vr;let r=Ft(e,t,false,se);(r.user=true),Z?Z.push(r):Ue(r);}function D(e,t,n){n=n?Object.assign({},tt,n):tt;let r=Ft(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ue(r),Tn.bind(r)}function oe(e){if(P===null)return e();let t=P;P=null;try{return ke?ke.untrack(e):e()}finally{P=t;}}function Ne(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let u=0;u<e.length;u++)a[u]=e[u]();}else a=e();let l=oe(()=>t(a,o,s));return o=a,l}}function wn(e){ne(()=>oe(e));}function ie(e){return O===null||(O.cleanups===null?O.cleanups=[e]:O.cleanups.push(e)),e}v(false);function Tn(){let e=g;if(this.sources&&(this.state))if((this.state)===se)Ue(this);else {let t=Y;Y=null,pe(()=>nt(this),false),Y=t;}if(P){let t=this.observers?this.observers.length:0;P.sources?(P.sources.push(this),P.sourceSlots.push(t)):(P.sources=[this],P.sourceSlots=[t]),this.observers?(this.observers.push(P),this.observerSlots.push(P.sources.length-1)):(this.observers=[P],this.observerSlots=[P.sources.length-1]);}return e&&g.sources.has(this)?this.tValue:this.value}function Sn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&pe(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=g&&g.running;s&&g.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Y.push(i):Z.push(i),i.observers&&Cn(i)),s?i.tState=se:i.state=se);}if(Y.length>1e6)throw Y=[],new Error},false);}return t}function Ue(e){if(!e.fn)return;Te(e);let t=rt;gn(e,e.value,t);}function gn(e,t,n){let r,o=O,i=P;P=O=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=se,e.owned&&e.owned.forEach(Te),e.owned=null)),e.updatedAt=n+1,kt(s)}finally{P=i,O=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Sn(e,r):e.value=r,e.updatedAt=n);}function Ft(e,t,n,r=se,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:O,context:O?O.context:null,pure:n};if(O===null||O!==yn&&(O.owned?O.owned.push(i):O.owned=[i]),ke);return i}function Ve(e){let t=g;if((e.state)===0)return;if((e.state)===je)return nt(e);if(e.suspense&&oe(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<rt);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===se)Ue(e);else if((e.state)===je){let o=Y;Y=null,pe(()=>nt(e,n[0]),false),Y=o;}}}function pe(e,t){if(Y)return e();let n=false;t||(Y=[]),Z?n=true:Z=[],rt++;try{let r=e();return Br(n),r}catch(r){n||(Z=null),Y=null,kt(r);}}function Br(e){if(Y&&(xn(Y),Y=null),e)return;let n=Z;Z=null,n.length&&pe(()=>bn(n),false);}function xn(e){for(let t=0;t<e.length;t++)Ve(e[t]);}function Vr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Ve(r);}for(t=0;t<n;t++)Ve(e[t]);}function nt(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let i=o.state;i===se?o!==t&&(!o.updatedAt||o.updatedAt<rt)&&Ve(o):i===je&&nt(o,t);}}}function Cn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=je,r.pure?Y.push(r):Z.push(r),r.observers&&Cn(r));}}function Te(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Te(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Te(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Gr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function kt(e,t=O){let r=Gr(e);throw r;}var Ur=Symbol("fallback");function hn(e){for(let t=0;t<e.length;t++)e[t]();}function Yr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ie(()=>hn(i)),()=>{let l=e()||[],u=l.length,m,d;return l[Lr],oe(()=>{let p,w,T,U,re,z,q,L,X;if(u===0)s!==0&&(hn(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Ur],o[0]=_e(ce=>(i[0]=ce,n.fallback())),s=1);else if(s===0){for(o=new Array(u),d=0;d<u;d++)r[d]=l[d],o[d]=_e(S);s=u;}else {for(T=new Array(u),U=new Array(u),a&&(re=new Array(u)),z=0,q=Math.min(s,u);z<q&&r[z]===l[z];z++);for(q=s-1,L=u-1;q>=z&&L>=z&&r[q]===l[L];q--,L--)T[L]=o[q],U[L]=i[q],a&&(re[L]=a[q]);for(p=new Map,w=new Array(L+1),d=L;d>=z;d--)X=l[d],m=p.get(X),w[d]=m===void 0?-1:m,p.set(X,d);for(m=z;m<=q;m++)X=r[m],d=p.get(X),d!==void 0&&d!==-1?(T[d]=o[m],U[d]=i[m],a&&(re[d]=a[m]),d=w[d],p.set(X,d)):i[m]();for(d=z;d<u;d++)d in T?(o[d]=T[d],i[d]=U[d],a&&(a[d]=re[d],a[d](d))):o[d]=_e(S);o=o.slice(0,s=u),r=l.slice(0);}return o});function S(p){if(i[d]=p,a){let[w,T]=v(d);return a[d]=T,t(l[d],w)}return t(l[d])}}}function R(e,t){return oe(()=>e(t||{}))}var qr=e=>`Stale read from <${e}>.`;function ot(e){let t="fallback"in e&&{fallback:()=>e.fallback};return D(Yr(()=>e.each,e.children,t||void 0))}function H(e){let t=e.keyed,n=D(()=>e.when,void 0,void 0),r=t?n:D(n,void 0,{equals:(o,i)=>!o==!i});return D(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?oe(()=>i(t?o:()=>{if(!oe(r))throw qr("Show");return n()})):i}return e.fallback},void 0,void 0)}var he=e=>D(()=>e());function Kr(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,u=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let m=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],m);}else if(i===a)for(;s<o;)(!u||!u.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let m=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],m),t[o]=n[i];}else {if(!u){u=new Map;let d=a;for(;d<i;)u.set(n[d],d++);}let m=u.get(t[s]);if(m!=null)if(a<m&&m<i){let d=s,S=1,p;for(;++d<o&&d<i&&!((p=u.get(t[d]))==null||p!==m+S);)S++;if(S>m-a){let w=t[s];for(;a<m;)e.insertBefore(n[a++],w);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function Rn(e,t,n,r={}){let o;return _e(i=>{o=i,t===document?e():le(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function te(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function Zr(e,t,n){(e.removeAttribute(t));}function st(e,t,n){if(!t)return n?Zr(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Pe(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function $e(e,t,n){return oe(()=>e(t,n))}function le(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return it(e,t,r,n);ae(o=>it(e,t(),o,n),r);}function it(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Ie(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=Ie(e,n,r);}else {if(s==="function")return ae(()=>{let l=t();for(;typeof l=="function";)l=l();n=it(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],u=n&&Array.isArray(n);if(Nt(l,t,n,o))return ae(()=>n=it(e,l,n,r,true)),()=>n;if(l.length===0){if(n=Ie(e,n,r),a)return n}else u?n.length===0?En(e,l,r):Kr(e,n,l):(n&&Ie(e),En(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Ie(e,n,r,t);Ie(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Nt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],u;if(!(a==null||a===true||a===false))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Nt(e,a,l)||o;else if(u==="function")if(r){for(;typeof a=="function";)a=a();o=Nt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let m=String(a);l&&l.nodeType===3&&l.data===m?e.push(l):e.push(document.createTextNode(m));}}return o}function En(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Ie(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var Qr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],Jr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),eo=e=>Array.isArray(e),to=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&Jr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return eo(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},_n=e=>to(e,Qr);var Me="data-react-grab",On=()=>{let e=document.querySelector(`[${Me}]`);if(e){let i=e.shadowRoot?.querySelector(`[${Me}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(Me,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute(Me,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Se=(e,t,n)=>e+(t-e)*n;var ro=te("<div>"),at=e=>{let[t,n]=v(e.bounds.x),[r,o]=v(e.bounds.y),[i,s]=v(e.bounds.width),[a,l]=v(e.bounds.height),[u,m]=v(1),d=false,S=null,p=null,w=e.bounds,T=false,U=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,re=()=>{if(T)return;T=true;let L=()=>{let X=Se(t(),w.x,U()),ce=Se(r(),w.y,U()),ve=Se(i(),w.width,U()),we=Se(a(),w.height,U());n(X),o(ce),s(ve),l(we),Math.abs(X-w.x)<.5&&Math.abs(ce-w.y)<.5&&Math.abs(ve-w.width)<.5&&Math.abs(we-w.height)<.5?(S=null,T=false):S=requestAnimationFrame(L);};S=requestAnimationFrame(L);};ne(Ne(()=>e.bounds,L=>{if(w=L,!d){n(w.x),o(w.y),s(w.width),l(w.height),d=true;return}re();})),ne(()=>{e.variant==="grabbed"&&e.createdAt&&(p=window.setTimeout(()=>{m(0);},1500));}),ie(()=>{S!==null&&(cancelAnimationFrame(S),S=null),p!==null&&(window.clearTimeout(p),p=null),T=false;});let z={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":e.variant==="grabbed"?"2147483645":"2147483646"},q=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:e.variant==="selection"?{border:"1px dashed rgba(210, 57, 192, 0.5)","background-color":"rgba(210, 57, 192, 0.08)"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.08)",transition:"opacity 0.3s ease-out"};return R(H,{get when(){return e.visible!==false},get children(){var L=ro();return ae(X=>st(L,{...z,...q(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:u()},X)),L}})};var oo=te('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),Fn=e=>{let t;return wn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=oo(),r=t;return typeof r=="function"?$e(r,n):t=n,ae(o=>st(n,{...e.style},o)),n})()};var kn=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,u=i-r-8,m=Math.max(s,Math.min(e,l)),d=Math.max(a,Math.min(t,u));return {left:m,top:d}};var lt=e=>{let t=e.lerpFactor??.3,n=e.convergenceThreshold??.5,[r,o]=v(e.x()),[i,s]=v(e.y()),a=e.x(),l=e.y(),u=null,m=false,d=()=>{let p=Se(r(),a,t),w=Se(i(),l,t);o(p),s(w),Math.abs(p-a)<n&&Math.abs(w-l)<n?u=null:u=requestAnimationFrame(d);},S=()=>{u===null&&(u=requestAnimationFrame(d));};return ne(()=>{if(a=e.x(),l=e.y(),!m){o(a),s(l),m=true;return}S();}),ie(()=>{u!==null&&(cancelAnimationFrame(u),u=null);}),{x:r,y:i}};var Nn=e=>{let[t,n]=v(0);return ne(Ne(()=>e.visible,r=>{if(r!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.autoFadeOutAfter!==void 0){let o=setTimeout(()=>{n(0);},e.autoFadeOutAfter);ie(()=>clearTimeout(o));}})),t};var In=(e,t,n,r,o)=>[{left:Math.round(e)+o,top:Math.round(t)+o},{left:Math.round(e)-n-o,top:Math.round(t)+o},{left:Math.round(e)+o,top:Math.round(t)-r-o},{left:Math.round(e)-n-o,top:Math.round(t)-r-o}];var so=te('<div style="position:absolute;top:0;left:0;bottom:0;background-color:rgba(178, 28, 142, 0.2);border-radius:3px;transition:width 0.1s ease-out;pointer-events:none">'),ao=te("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),lo=te("<div style=margin-right:4px>Copied"),co=te(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`),uo=te("<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>"),fo=te("<div style=margin-left:4px>to clipboard"),mo=te("<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select"),go=te(`<div style="position:fixed;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 6px;display:flex;flex-direction:column"><div style=display:flex;align-items:center;text-overflow:ellipsis;white-space:nowrap>`),It=e=>{let t,n=lt({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),r=Nn({visible:e.visible,autoFadeOutAfter:e.variant==="success"?1700:void 0}),o=()=>t?.getBoundingClientRect(),i=()=>{let a=o();if(!a)return {left:n.x(),top:n.y()};let l=window.innerWidth,u=window.innerHeight,m=In(n.x(),n.y(),a.width,a.height,14);for(let S of m){let p=S.left>=8&&S.left+a.width<=l-8,w=S.top>=8&&S.top+a.height<=u-8;if(p&&w)return S}let d=kn(m[0].left,m[0].top,a.width,a.height);return d.left+=4,d.top+=4,d},s=()=>{let l=e.text.indexOf(" in ");return l===-1?{primary:e.text,secondary:""}:{primary:e.text.slice(0,l),secondary:e.text.slice(l)}};return R(H,{get when(){return e.visible!==false},get children(){var a=go(),l=a.firstChild,u=l.firstChild,m=t;return typeof m=="function"?$e(m,a):t=a,le(a,R(H,{get when(){return he(()=>e.variant==="processing")()&&e.progress!==void 0},get children(){var d=so();return ae(S=>Pe(d,"width",`${Math.min(100,Math.max(0,(e.progress??0)*100))}%`)),d}}),l),le(u,R(H,{get when(){return e.variant==="processing"},get children(){return R(Fn,{})}}),null),le(u,R(H,{get when(){return e.variant==="success"},get children(){return ao()}}),null),le(u,R(H,{get when(){return e.variant==="success"},get children(){return lo()}}),null),le(u,R(H,{get when(){return e.variant==="processing"},children:"Please wait\u2026"}),null),le(u,R(H,{get when(){return e.variant!=="processing"},get children(){return [(()=>{var d=co();return le(d,()=>s().primary),d})(),R(H,{get when(){return he(()=>e.variant==="hover")()&&s().secondary!==""},get children(){var d=uo();return le(d,()=>s().secondary),d}})]}}),null),le(u,R(H,{get when(){return e.variant==="success"},get children(){return fo()}}),null),le(l,R(H,{get when(){return he(()=>e.variant==="hover")()&&e.showHint},get children(){return mo()}}),null),ae(d=>{var S=`${i().top}px`,p=`${i().left}px`,w=e.zIndex?.toString()??"2147483647",T=r();return S!==d.e&&Pe(a,"top",d.e=S),p!==d.t&&Pe(a,"left",d.t=p),w!==d.a&&Pe(a,"z-index",d.a=w),T!==d.o&&Pe(a,"opacity",d.o=T),d},{e:void 0,t:void 0,a:void 0,o:void 0}),a}})};var po=te("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),$n=e=>{let t,n=null,r=0,o=0,i=1,s=lt({x:()=>e.mouseX,y:()=>e.mouseY,lerpFactor:.3}),a=()=>{t&&(i=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,o=window.innerHeight,t.width=r*i,t.height=o*i,t.style.width=`${r}px`,t.style.height=`${o}px`,n=t.getContext("2d"),n&&n.scale(i,i));},l=()=>{n&&(n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(s.x(),0),n.lineTo(s.x(),o),n.moveTo(0,s.y()),n.lineTo(r,s.y()),n.stroke());};return ne(()=>{a(),l();let u=()=>{a(),l();};window.addEventListener("resize",u),ie(()=>{window.removeEventListener("resize",u);});}),ne(()=>{s.x(),s.y(),l();}),R(H,{get when(){return e.visible!==false},get children(){var u=po(),m=t;return typeof m=="function"?$e(m,u):t=u,u}})};var Mn=e=>[R(H,{get when(){return he(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return R(at,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),R(H,{get when(){return he(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return R($n,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),R(H,{get when(){return he(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return R(at,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),R(ot,{get each(){return e.grabbedBoxes??[]},children:t=>R(at,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),R(H,{get when(){return e.labelVariant!=="processing"},get children(){return R(ot,{get each(){return e.successLabels??[]},children:t=>R(It,{variant:"success",get text(){return t.text},get x(){return e.mouseX??0},get y(){return e.mouseY??0}})})}}),R(H,{get when(){return he(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return R(It,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex},get progress(){return e.progress},get showHint(){return e.labelShowHint}})}})];var Hn="0.5.16",mt=`bippy-${Hn}`,Ln=Object.defineProperty,ho=Object.prototype.hasOwnProperty,Ye=()=>{},Bn=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw 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{}},Pt=(e=xe())=>"getFiberRoots"in e,jn=false,Dn,ft=(e=xe())=>jn?true:(typeof e.inject=="function"&&(Dn=e.inject.toString()),!!Dn?.includes("(injected)")),ut=new Set,Oe=new Set,Vn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:mt,checkDCE:Bn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),Oe.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,ut.forEach(s=>s())),i},on:Ye,onCommitFiberRoot:Ye,onCommitFiberUnmount:Ye,onPostCommitFiberRoot:Ye,renderers:t,supportsFiber:true,supportsFlight:true};try{Ln(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,u)=>{Oe.add(l),s.renderers.set(u,l);}),dt(e));}}});let o=window.hasOwnProperty,i=!1;Ln(window,"hasOwnProperty",{configurable:!0,value:function(...s){try{if(!i&&s[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,i=!0,-0}catch{}return o.apply(this,s)},writable:!0});}catch{dt(e);}return r},dt=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Bn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=mt,t._instrumentationIsActive=!1;let n=Pt(t);if(n||(t.on=Ye),t.renderers.size){t._instrumentationIsActive=!0,ut.forEach(i=>i());return}let r=t.inject,o=ft(t);o&&!n&&(jn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return Oe.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,ut.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||ft())&&e?.();}catch{}},$t=()=>ho.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),xe=e=>$t()?(dt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Vn(e),Gn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Mt=()=>{try{Gn()&&xe();}catch{}};Mt();var gt=0,pt=1;var ht=5;var bt=11,Lt=13,Un=14,yt=15,Dt=16;var Ht=19;var wt=26,Tt=27,Bt=28,jt=30;var St=e=>{switch(e.tag){case ht:case wt:case Tt:return true;default:return typeof e.type=="string"}},xt=e=>{switch(e.tag){case pt:case bt:case gt:case Un:case yt:return true;default:return false}},Vt=e=>!e||typeof e!="object"?true:"pendingProps"in e&&!("containerInfo"in e);function Le(e,t,n=false){if(!e)return null;let r=t(e);if(r instanceof Promise)return (async()=>{if(await r===true)return e;let i=n?e.return:e.child;for(;i;){let s=await Ut(i,t,n);if(s)return s;i=n?null:i.sibling;}return null})();if(r===true)return e;let o=n?e.return:e.child;for(;o;){let i=Gt(o,t,n);if(i)return i;o=n?null:o.sibling;}return null}var Gt=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=Gt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},Ut=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=await Ut(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var Yt=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Yt(t.type||t.render):null},Fe=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=Yt(t);return r&&(r.displayName||r.name)||null};var Ct=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of Yn){let r=Le(n.current,o=>{if(o===e)return true});if(r)return r}return e};var ze=e=>{let t=xe();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Yn=new Set;var Eo=Object.create,Jn=Object.defineProperty,Ro=Object.getOwnPropertyDescriptor,Ao=Object.getOwnPropertyNames,_o=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty,Fo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ko=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Ao(t),i=0,s=o.length,a;i<s;i++)a=o[i],!Oo.call(e,a)&&a!==n&&Jn(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Ro(t,a))||r.enumerable});return e},No=(e,t,n)=>(n=e==null?{}:Eo(_o(e)),ko(Jn(n,"default",{value:e,enumerable:true}),e)),Io=()=>{let e=xe();for(let t of [...Array.from(Oe),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},zn=e=>{for(let t of Oe){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},ye=e=>`
10
+ in ${e}`,Po=(e,t)=>{let n=ye(e);return t&&(n+=` (at ${t})`),n},zt=false,qt=(e,t)=>{if(!e||zt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,zt=true;let r=Io();zn(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let S;try{if(t){let p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[]);}catch(w){S=w;}Reflect.construct(e,[],p);}else {try{p.call();}catch(w){S=w;}e.call(p.prototype);}}else {try{throw Error()}catch(w){S=w;}let p=e();p&&typeof p.catch=="function"&&p.catch(()=>{});}}catch(p){if(p instanceof Error&&S instanceof Error&&typeof p.stack=="string")return [p.stack,S.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[m,d]=l.DetermineComponentFrameRoot();if(m&&d){let S=m.split(`
11
+ `),p=d.split(`
12
+ `),w=0,T=0;for(;w<S.length&&!S[w].includes("DetermineComponentFrameRoot");)w++;for(;T<p.length&&!p[T].includes("DetermineComponentFrameRoot");)T++;if(w===S.length||T===p.length)for(w=S.length-1,T=p.length-1;w>=1&&T>=0&&S[w]!==p[T];)T--;for(;w>=1&&T>=0;w--,T--)if(S[w]!==p[T]){if(w!==1||T!==1)do if(w--,T--,T<0||S[w]!==p[T]){let U=`
13
+ ${S[w].replace(" at new "," at ")}`,re=Fe(e);return re&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",re)),U}while(w>=1&&T>=0);break}}}finally{zt=false,Error.prepareStackTrace=n,zn(r),console.error=o,console.warn=i;}let s=e?Fe(e):"";return s?ye(s):""},$o=(e,t)=>{let n=e.tag,r="";switch(n){case Bt:r=ye("Activity");break;case pt:r=qt(e.type,true);break;case bt:r=qt(e.type.render,false);break;case gt:case yt:r=qt(e.type,false);break;case ht:case wt:case Tt:r=ye(e.type);break;case Dt:r=ye("Lazy");break;case Lt:r=e.child!==t&&t!==null?ye("Suspense Fallback"):ye("Suspense");break;case Ht:r=ye("SuspenseList");break;case jt:r=ye("ViewTransition");break;default:return ""}return r},Mo=e=>{try{let t="",n=e,r=null;do{t+=$o(n,r);let o=n._debugInfo;if(o&&Array.isArray(o))for(let i=o.length-1;i>=0;i--){let s=o[i];typeof s.name=="string"&&(t+=Po(s.name,s.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
14
14
  Error generating stack: ${t.message}
15
- ${t.stack}`:""}},Bo=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
15
+ ${t.stack}`:""}},Lo=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
16
16
  `)&&(n=n.slice(29));let r=n.indexOf(`
17
17
  `);if(r!==-1&&(n=n.slice(r+1)),r=Math.max(n.indexOf("react_stack_bottom_frame"),n.indexOf("react-stack-bottom-frame")),r!==-1&&(r=n.lastIndexOf(`
18
- `,r)),r!==-1)n=n.slice(0,r);else return "";return n},jo=/(^|@)\S+:\d+/,or=/^\s*at .*(\S+:\d+|\(native\))/m,Vo=/^(eval@)?(\[native code\])?$/;var Yo=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
19
- `),r=[];for(let o of n)if(/^\s*at\s+/.test(o)){let i=Zn(o,void 0)[0];i&&r.push(i);}else if(/^\s*in\s+/.test(o)){let i=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:i,raw:o});}else if(o.match(jo)){let i=Qn(o,void 0)[0];i&&r.push(i);}return Zt(r,t)}return e.match(or)?Zn(e,t):Qn(e,t)},ir=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=t.exec(e.replace(/[()]/g,""));return [n[1],n[2]||void 0,n[3]||void 0]},Zt=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var Zn=(e,t)=>Zt(e.split(`
20
- `).filter(r=>!!r.match(or)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let i=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=i.match(/ (\(.+\)$)/);i=s?i.replace(s[0],""):i;let a=ir(s?s[1]:i),l=s&&i||void 0,c=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:c,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}});var Qn=(e,t)=>Zt(e.split(`
21
- `).filter(r=>!r.match(Vo)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let i=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=o.match(i),a=s&&s[1]?s[1]:void 0,l=ir(o.replace(i,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var Go=Po((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let b=0;b<i.length;b++){let p=i.charCodeAt(b);s[b]=p,a[p]=b;}function l(b,p){let u=0,h=0,C=0;do{let P=b.next();C=a[P],u|=(C&31)<<h,h+=5;}while(C&32);let A=u&1;return u>>>=1,A&&(u=-2147483648|-u),p+u}function c(b,p,u){let h=p-u;h=h<0?-h<<1|1:h<<1;do{let C=h&31;h>>>=5,h>0&&(C|=32),b.write(s[C]);}while(h>0);return p}function d(b,p){return b.pos>=p?false:b.peek()!==r}let m=1024*16,T=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(b){return Buffer.from(b.buffer,b.byteOffset,b.byteLength).toString()}}:{decode(b){let p="";for(let u=0;u<b.length;u++)p+=String.fromCharCode(b[u]);return p}};class w{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(m);}write(p){let{buffer:u}=this;u[this.pos++]=p,this.pos===m&&(this.out+=T.decode(u),this.pos=0);}flush(){let{buffer:p,out:u,pos:h}=this;return h>0?u+T.decode(p.subarray(0,h)):u}}class y{constructor(p){this.pos=0,this.buffer=p;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(p){let{buffer:u,pos:h}=this,C=u.indexOf(p,h);return C===-1?u.length:C}}let x=[];function G(b){let{length:p}=b,u=new y(b),h=[],C=[],A=0;for(;u.pos<p;u.pos++){A=l(u,A);let P=l(u,0);if(!d(u,p)){let B=C.pop();B[2]=A,B[3]=P;continue}let F=l(u,0),M=l(u,0),$=M&1,N=$?[A,P,0,0,F,l(u,0)]:[A,P,0,0,F],V=x;if(d(u,p)){V=[];do{let B=l(u,0);V.push(B);}while(d(u,p))}N.vars=V,h.push(N),C.push(N);}return h}function ne(b){let p=new w;for(let u=0;u<b.length;)u=X(b,u,p,[0]);return p.flush()}function X(b,p,u,h){let C=b[p],{0:A,1:P,2:F,3:M,4:$,vars:N}=C;p>0&&u.write(r),h[0]=c(u,A,h[0]),c(u,P,0),c(u,$,0);let V=C.length===6?1:0;c(u,V,0),C.length===6&&c(u,C[5],0);for(let B of N)c(u,B,0);for(p++;p<b.length;){let B=b[p],{0:_,1:k}=B;if(_>F||_===F&&k>=M)break;p=X(b,p,u,h);}return u.write(r),h[0]=c(u,F,h[0]),c(u,M,0),p}function W(b){let{length:p}=b,u=new y(b),h=[],C=[],A=0,P=0,F=0,M=0,$=0,N=0,V=0,B=0;do{let _=u.indexOf(";"),k=0;for(;u.pos<_;u.pos++){if(k=l(u,k),!d(u,_)){let re=C.pop();re[2]=A,re[3]=k;continue}let J=l(u,0),de=J&1,Z=J&2,z=J&4,me=null,ge=x,ee;if(de){let re=l(u,P);F=l(u,P===re?F:0),P=re,ee=[A,k,0,0,re,F];}else ee=[A,k,0,0];if(ee.isScope=!!z,Z){let re=M,Se=$;M=l(u,M);let xe=re===M;$=l(u,xe?$:0),N=l(u,xe&&Se===$?N:0),me=[M,$,N];}if(ee.callsite=me,d(u,_)){ge=[];do{V=A,B=k;let re=l(u,0),Se;if(re<-1){Se=[[l(u,0)]];for(let xe=-1;xe>re;xe--){let Qe=V;V=l(u,V),B=l(u,V===Qe?B:0);let Ot=l(u,0);Se.push([Ot,V,B]);}}else Se=[[re]];ge.push(Se);}while(d(u,_))}ee.bindings=ge,h.push(ee),C.push(ee);}A++,u.pos=_+1;}while(u.pos<p);return h}function D(b){if(b.length===0)return "";let p=new w;for(let u=0;u<b.length;)u=K(b,u,p,[0,0,0,0,0,0,0]);return p.flush()}function K(b,p,u,h){let C=b[p],{0:A,1:P,2:F,3:M,isScope:$,callsite:N,bindings:V}=C;h[0]<A?(fe(u,h[0],A),h[0]=A,h[1]=0):p>0&&u.write(r),h[1]=c(u,C[1],h[1]);let B=(C.length===6?1:0)|(N?2:0)|($?4:0);if(c(u,B,0),C.length===6){let{4:_,5:k}=C;_!==h[2]&&(h[3]=0),h[2]=c(u,_,h[2]),h[3]=c(u,k,h[3]);}if(N){let{0:_,1:k,2:J}=C.callsite;_===h[4]?k!==h[5]&&(h[6]=0):(h[5]=0,h[6]=0),h[4]=c(u,_,h[4]),h[5]=c(u,k,h[5]),h[6]=c(u,J,h[6]);}if(V)for(let _ of V){_.length>1&&c(u,-_.length,0);let k=_[0][0];c(u,k,0);let J=A,de=P;for(let Z=1;Z<_.length;Z++){let z=_[Z];J=c(u,z[1],J),de=c(u,z[2],de),c(u,z[0],0);}}for(p++;p<b.length;){let _=b[p],{0:k,1:J}=_;if(k>F||k===F&&J>=M)break;p=K(b,p,u,h);}return h[0]<F?(fe(u,h[0],F),h[0]=F,h[1]=0):u.write(r),h[1]=c(u,M,h[1]),p}function fe(b,p,u){do b.write(o);while(++p<u)}function Oe(b){let{length:p}=b,u=new y(b),h=[],C=0,A=0,P=0,F=0,M=0;do{let $=u.indexOf(";"),N=[],V=true,B=0;for(C=0;u.pos<$;){let _;C=l(u,C),C<B&&(V=false),B=C,d(u,$)?(A=l(u,A),P=l(u,P),F=l(u,F),d(u,$)?(M=l(u,M),_=[C,A,P,F,M]):_=[C,A,P,F]):_=[C],N.push(_),u.pos++;}V||Te(N),h.push(N),u.pos=$+1;}while(u.pos<=p);return h}function Te(b){b.sort(Be);}function Be(b,p){return b[0]-p[0]}function Ze(b){let p=new w,u=0,h=0,C=0,A=0;for(let P=0;P<b.length;P++){let F=b[P];if(P>0&&p.write(o),F.length===0)continue;let M=0;for(let $=0;$<F.length;$++){let N=F[$];$>0&&p.write(r),M=c(p,N[0],M),N.length!==1&&(u=c(p,N[1],u),h=c(p,N[2],h),C=c(p,N[3],C),N.length!==4&&(A=c(p,N[4],A)));}}return p.flush()}n.decode=Oe,n.decodeGeneratedRanges=W,n.decodeOriginalScopes=G,n.encode=Ze,n.encodeGeneratedRanges=D,n.encodeOriginalScopes=ne,Object.defineProperty(n,"__esModule",{value:true});});}),sr=Mo(Go()),ar=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Uo=/^data:application\/json[^,]+base64,/,Xo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,lr=typeof WeakRef<"u",qe=new Map,Rt=new Map,zo=e=>lr&&e instanceof WeakRef,Jn=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let i=null;for(let d of o)if(d[0]<=r)i=d;else break;if(!i||i.length<4)return null;let[,s,a,l]=i;if(s===void 0||a===void 0||l===void 0)return null;let c=t[s];return c?{columnNumber:l,fileName:c,lineNumber:a+1}:null},qo=(e,t,n)=>{if(e.sections){let r=null;for(let s of e.sections)if(t>s.offset.line||t===s.offset.line&&n>=s.offset.column)r=s;else break;if(!r)return null;let o=t-r.offset.line,i=t===r.offset.line?n-r.offset.column:n;return Jn(r.map.mappings,r.map.sources,o,i)}return Jn(e.mappings,e.sources,t-1,n)},Wo=(e,t)=>{let n=t.split(`
22
- `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(Xo);s&&(r=s[1]||s[2]);}if(!r)return null;let o=ar.test(r);if(!(Uo.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},Ko=e=>({file:e.file,mappings:(0, sr.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),Zo=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, sr.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},er=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(ar);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},Qo=async(e,t=fetch)=>{if(!er(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=Wo(e,n);if(!r||!er(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?Zo(i):Ko(i)}catch{return null}},Jo=async(e,t=true,n)=>{if(t&&qe.has(e)){let i=qe.get(e);if(i==null)return null;if(zo(i)){let s=i.deref();if(s)return s;qe.delete(e);}else return i}if(t&&Rt.has(e))return Rt.get(e);let r=Qo(e,n);t&&Rt.set(e,r);let o=await r;return t&&Rt.delete(e),t&&(o===null?qe.set(e,null):qe.set(e,lr?new WeakRef(o):o)),o},tr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,ei=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],nr="about://React/",ti=["<anonymous>","eval",""],ni=/\.(jsx|tsx|ts|js)$/,ri=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,oi=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,ii=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",si=e=>{let t=e._debugSource;return t?typeof t=="object"&&!!t&&"fileName"in t&&typeof t.fileName=="string"&&"lineNumber"in t&&typeof t.lineNumber=="number":false},cr=async(e,t=true,n)=>{if(si(e))return e._debugSource||null;let r=ai(e),o=await li(r,1,t,n);return !o||o.length===0?null:o[0]},ai=e=>ii(e)?Bo(e._debugStack.stack):Ho(e);var li=async(e,t=1,n=true,r)=>{let o=Yo(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let a=await Jo(s.file,n,r);if(a&&typeof s.line=="number"&&typeof s.col=="number"){let l=qo(a,s.line,s.col);if(l){i.push(l);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},Qt=e=>{if(!e||ti.includes(e))return "";let t=e;if(t.startsWith(nr)){let r=t.slice(nr.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of ei)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(tr.test(t)){let r=t.match(tr);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);oi.test(r)&&(t=t.slice(0,n));}return t},ur=e=>{let t=Qt(e);return !(!t||!ni.test(t)||ri.test(t))};var fr=e=>e.length>0&&/^[A-Z]/.test(e);var ci=["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","ErrorBoundary","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary"],ui=()=>!!document.getElementById("__NEXT_DATA__"),dr=e=>!!(e.startsWith("_")||ci.includes(e)),fi=e=>!(dr(e)||!fr(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),mr=e=>{let t=ze(e);if(!t)return null;let n=null;return He(t,r=>{if(vt(r)){let o=Ie(r);if(o&&fi(o))return n=o,true}return false},true),n},gr=async e=>{let t=ze(e);if(!t||!Ut(t))return [];let n=Et(t),r=[];return He(n,i=>{let s=Ct(i)?typeof i.type=="string"?i.type:null:Ie(i);s&&!dr(s)&&r.push({name:s,sourcePromise:cr(i)});},true),(await Promise.all(r.map(async i=>({name:i.name,source:await i.sourcePromise})))).filter(i=>i.source!==null)},pr=e=>{let t=ui();return e.map(({name:n,source:r})=>{if(!r)return ` at ${n}`;if(r.fileName.startsWith("about://React/Server"))return ` at ${n} (Server)`;if(!ur(r.fileName))return ` at ${n}`;let o=` at ${n} in ${Qt(r.fileName)}`;return t?`${o}:${r.lineNumber}:${r.columnNumber}`:o}).join(`
23
- `)},hr=e=>{let t=e.tagName.toLowerCase();if(!(e instanceof HTMLElement))return `<${t} />`;let n=e.innerText?.trim()??e.textContent?.trim()??"",r="",o=Array.from(e.attributes);for(let d of o){let m=d.name,T=d.value;T.length>20&&(T=`${T.slice(0,20)}...`),r+=` ${m}="${T}"`;}let i=0,s=0,a=false,l=Array.from(e.childNodes);for(let d of l)d.nodeType!==Node.COMMENT_NODE&&(d.nodeType===Node.TEXT_NODE?d.textContent&&d.textContent.trim().length>0&&(a=true):d.nodeType===Node.ELEMENT_NODE&&(a?s++:i++));let c="";return i>0&&(c+=`
24
- (${i} elements)`),n.length>0&&(c+=`
25
- ${n}`),s>0&&(c+=`
26
- (${s} elements)`),c.length>0?`<${t}${r}>${c}
27
- </${t}>`:`<${t}${r} />`};var di=()=>document.hasFocus()?new Promise(e=>setTimeout(e,50)):new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),setTimeout(e,50);};window.addEventListener("focus",t),window.focus();}),At=async(e,t)=>{await di();try{try{return await navigator.clipboard.writeText(e),t?.(),!0}catch{return mi(e,t)}}catch{return false}},mi=(e,t)=>{if(!document.execCommand)return false;let n=document.createElement("textarea");n.value=String(e),n.style.clipPath="inset(50%)",n.ariaHidden="true",(document.body||document.documentElement).append(n);try{n.select();let o=document.execCommand("copy");return o&&t?.(),o}finally{n.remove();}};var We=()=>{try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createGain();t.connect(e.destination),[{freq:523.25,start:0,duration:.1},{freq:659.25,start:.05,duration:.1},{freq:783.99,start:.1,duration:.15}].forEach(r=>{let o=e.createOscillator(),i=e.createGain();o.connect(i),i.connect(t),o.frequency.value=r.freq,o.type="triangle";let s=e.currentTime+r.start,a=s+.01,l=s+r.duration;i.gain.setValueAtTime(0,s),i.gain.linearRampToValueAtTime(.15,a),i.gain.exponentialRampToValueAtTime(.01,l),o.start(s),o.stop(l);});}catch{}};var br=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var Ke=e=>{if(e.closest(`[${De}]`))return false;let t=window.getComputedStyle(e);return !(!br(e,t)||t.pointerEvents==="none")};var Jt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(Ke(r))return r;return null};var gi=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom),s=Math.max(0,o-n),a=Math.max(0,i-r);return s*a},pi=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,yr=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),i={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};for(let s of o){if(!n){let c=(s.tagName||"").toUpperCase();if(c==="HTML"||c==="BODY")continue}if(!t(s))continue;let a=s.getBoundingClientRect(),l={left:a.left,top:a.top,right:a.left+a.width,bottom:a.top+a.height};if(n){let c=gi(i,l),d=Math.max(0,a.width*a.height);d>0&&c/d>=.75&&r.push(s);}else pi(l,i)&&r.push(s);}return r},wr=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Tr=(e,t)=>{let n=yr(e,t,true);return wr(n)},Sr=(e,t)=>{let n=yr(e,t,false);return wr(n)};var en=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return {borderRadius:n.borderRadius||"0px",height:t.height,transform:n.transform||"none",width:t.width,x:t.left,y:t.top}};var xr=e=>{let t={enabled:true,keyHoldDuration:300,allowActivationInsideInput:true,playCopySound:false,...e};return t.enabled===false?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{}}:Ne(n=>{let[r,o]=E(false),[i,s]=E(-1e3),[a,l]=E(-1e3),[c,d]=E(false),[m,T]=E(-1e3),[w,y]=E(-1e3),[x,G]=E(false),[ne,X]=E(null),[W,D]=E(null),[K,fe]=E(0),[Oe,Te]=E([]),[Be,Ze]=E([]),[b,p]=E(false),[u,h]=E(false),[C,A]=E(false),[P,F]=E(false),[M,$]=E(-1e3),[N,V]=E(-1e3),[B,_]=E(false),k=null,J=null,de=null,Z=null,z=null,me=-1e3,ge=-1e3,ee=L(()=>b()&&!x()),re=L(()=>i()>-1e3&&a()>-1e3),Se=f=>(f.metaKey||f.ctrlKey)&&f.key.toLowerCase()==="c",xe=f=>{let S=`grabbed-${Date.now()}-${Math.random()}`,v=Date.now(),q={id:S,bounds:f,createdAt:v},j=Oe();Te([...j,q]),setTimeout(()=>{Te(pe=>pe.filter(gn=>gn.id!==S));},1700);},Qe=f=>{let S=`success-${Date.now()}-${Math.random()}`;Ze(v=>[...v,{id:S,text:f}]),setTimeout(()=>{Ze(v=>v.filter(q=>q.id!==S));},1700);},Ot=f=>`<selected_element>
18
+ `,r)),r!==-1)n=n.slice(0,r);else return "";return n},Do=/(^|@)\S+:\d+/,er=/^\s*at .*(\S+:\d+|\(native\))/m,Ho=/^(eval@)?(\[native code\])?$/;var Bo=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
19
+ `),r=[];for(let o of n)if(/^\s*at\s+/.test(o)){let i=qn(o,void 0)[0];i&&r.push(i);}else if(/^\s*in\s+/.test(o)){let i=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:i,raw:o});}else if(o.match(Do)){let i=Xn(o,void 0)[0];i&&r.push(i);}return Xt(r,t)}return e.match(er)?qn(e,t):Xn(e,t)},tr=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=t.exec(e.replace(/[()]/g,""));return [n[1],n[2]||void 0,n[3]||void 0]},Xt=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var qn=(e,t)=>Xt(e.split(`
20
+ `).filter(r=>!!r.match(er)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let i=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=i.match(/ (\(.+\)$)/);i=s?i.replace(s[0],""):i;let a=tr(s?s[1]:i),l=s&&i||void 0,u=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:u,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}});var Xn=(e,t)=>Xt(e.split(`
21
+ `).filter(r=>!r.match(Ho)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let i=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=o.match(i),a=s&&s[1]?s[1]:void 0,l=tr(o.replace(i,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var jo=Fo((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let y=0;y<i.length;y++){let h=i.charCodeAt(y);s[y]=h,a[h]=y;}function l(y,h){let c=0,b=0,C=0;do{let I=y.next();C=a[I],c|=(C&31)<<b,b+=5;}while(C&32);let A=c&1;return c>>>=1,A&&(c=-2147483648|-c),h+c}function u(y,h,c){let b=h-c;b=b<0?-b<<1|1:b<<1;do{let C=b&31;b>>>=5,b>0&&(C|=32),y.write(s[C]);}while(b>0);return h}function m(y,h){return y.pos>=h?false:y.peek()!==r}let d=1024*16,S=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(y){return Buffer.from(y.buffer,y.byteOffset,y.byteLength).toString()}}:{decode(y){let h="";for(let c=0;c<y.length;c++)h+=String.fromCharCode(y[c]);return h}};class p{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(d);}write(h){let{buffer:c}=this;c[this.pos++]=h,this.pos===d&&(this.out+=S.decode(c),this.pos=0);}flush(){let{buffer:h,out:c,pos:b}=this;return b>0?c+S.decode(h.subarray(0,b)):c}}class w{constructor(h){this.pos=0,this.buffer=h;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(h){let{buffer:c,pos:b}=this,C=c.indexOf(h,b);return C===-1?c.length:C}}let T=[];function U(y){let{length:h}=y,c=new w(y),b=[],C=[],A=0;for(;c.pos<h;c.pos++){A=l(c,A);let I=l(c,0);if(!m(c,h)){let V=C.pop();V[2]=A,V[3]=I;continue}let F=l(c,0),$=l(c,0),M=$&1,N=M?[A,I,0,0,F,l(c,0)]:[A,I,0,0,F],j=T;if(m(c,h)){j=[];do{let V=l(c,0);j.push(V);}while(m(c,h))}N.vars=j,b.push(N),C.push(N);}return b}function re(y){let h=new p;for(let c=0;c<y.length;)c=z(y,c,h,[0]);return h.flush()}function z(y,h,c,b){let C=y[h],{0:A,1:I,2:F,3:$,4:M,vars:N}=C;h>0&&c.write(r),b[0]=u(c,A,b[0]),u(c,I,0),u(c,M,0);let j=C.length===6?1:0;u(c,j,0),C.length===6&&u(c,C[5],0);for(let V of N)u(c,V,0);for(h++;h<y.length;){let V=y[h],{0:_,1:k}=V;if(_>F||_===F&&k>=$)break;h=z(y,h,c,b);}return c.write(r),b[0]=u(c,F,b[0]),u(c,$,0),h}function q(y){let{length:h}=y,c=new w(y),b=[],C=[],A=0,I=0,F=0,$=0,M=0,N=0,j=0,V=0;do{let _=c.indexOf(";"),k=0;for(;c.pos<_;c.pos++){if(k=l(c,k),!m(c,_)){let ee=C.pop();ee[2]=A,ee[3]=k;continue}let Q=l(c,0),ue=Q&1,W=Q&2,J=Q&4,fe=null,He=T,me;if(ue){let ee=l(c,I);F=l(c,I===ee?F:0),I=ee,me=[A,k,0,0,ee,F];}else me=[A,k,0,0];if(me.isScope=!!J,W){let ee=$,ge=M;$=l(c,$);let Ee=ee===$;M=l(c,Ee?M:0),N=l(c,Ee&&ge===M?N:0),fe=[$,M,N];}if(me.callsite=fe,m(c,_)){He=[];do{j=A,V=k;let ee=l(c,0),ge;if(ee<-1){ge=[[l(c,0)]];for(let Ee=-1;Ee>ee;Ee--){let Ze=j;j=l(c,j),V=l(c,j===Ze?V:0);let Qe=l(c,0);ge.push([Qe,j,V]);}}else ge=[[ee]];He.push(ge);}while(m(c,_))}me.bindings=He,b.push(me),C.push(me);}A++,c.pos=_+1;}while(c.pos<h);return b}function L(y){if(y.length===0)return "";let h=new p;for(let c=0;c<y.length;)c=X(y,c,h,[0,0,0,0,0,0,0]);return h.flush()}function X(y,h,c,b){let C=y[h],{0:A,1:I,2:F,3:$,isScope:M,callsite:N,bindings:j}=C;b[0]<A?(ce(c,b[0],A),b[0]=A,b[1]=0):h>0&&c.write(r),b[1]=u(c,C[1],b[1]);let V=(C.length===6?1:0)|(N?2:0)|(M?4:0);if(u(c,V,0),C.length===6){let{4:_,5:k}=C;_!==b[2]&&(b[3]=0),b[2]=u(c,_,b[2]),b[3]=u(c,k,b[3]);}if(N){let{0:_,1:k,2:Q}=C.callsite;_===b[4]?k!==b[5]&&(b[6]=0):(b[5]=0,b[6]=0),b[4]=u(c,_,b[4]),b[5]=u(c,k,b[5]),b[6]=u(c,Q,b[6]);}if(j)for(let _ of j){_.length>1&&u(c,-_.length,0);let k=_[0][0];u(c,k,0);let Q=A,ue=I;for(let W=1;W<_.length;W++){let J=_[W];Q=u(c,J[1],Q),ue=u(c,J[2],ue),u(c,J[0],0);}}for(h++;h<y.length;){let _=y[h],{0:k,1:Q}=_;if(k>F||k===F&&Q>=$)break;h=X(y,h,c,b);}return b[0]<F?(ce(c,b[0],F),b[0]=F,b[1]=0):c.write(r),b[1]=u(c,$,b[1]),h}function ce(y,h,c){do y.write(o);while(++h<c)}function ve(y){let{length:h}=y,c=new w(y),b=[],C=0,A=0,I=0,F=0,$=0;do{let M=c.indexOf(";"),N=[],j=true,V=0;for(C=0;c.pos<M;){let _;C=l(c,C),C<V&&(j=false),V=C,m(c,M)?(A=l(c,A),I=l(c,I),F=l(c,F),m(c,M)?($=l(c,$),_=[C,A,I,F,$]):_=[C,A,I,F]):_=[C],N.push(_),c.pos++;}j||we(N),b.push(N),c.pos=M+1;}while(c.pos<=h);return b}function we(y){y.sort(De);}function De(y,h){return y[0]-h[0]}function Ke(y){let h=new p,c=0,b=0,C=0,A=0;for(let I=0;I<y.length;I++){let F=y[I];if(I>0&&h.write(o),F.length===0)continue;let $=0;for(let M=0;M<F.length;M++){let N=F[M];M>0&&h.write(r),$=u(h,N[0],$),N.length!==1&&(c=u(h,N[1],c),b=u(h,N[2],b),C=u(h,N[3],C),N.length!==4&&(A=u(h,N[4],A)));}}return h.flush()}n.decode=ve,n.decodeGeneratedRanges=q,n.decodeOriginalScopes=U,n.encode=Ke,n.encodeGeneratedRanges=L,n.encodeOriginalScopes=re,Object.defineProperty(n,"__esModule",{value:true});});}),nr=No(jo()),rr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Vo=/^data:application\/json[^,]+base64,/,Go=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,or=typeof WeakRef<"u",qe=new Map,vt=new Map,Uo=e=>or&&e instanceof WeakRef,Wn=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let i=null;for(let m of o)if(m[0]<=r)i=m;else break;if(!i||i.length<4)return null;let[,s,a,l]=i;if(s===void 0||a===void 0||l===void 0)return null;let u=t[s];return u?{columnNumber:l,fileName:u,lineNumber:a+1}:null},Yo=(e,t,n)=>{if(e.sections){let r=null;for(let s of e.sections)if(t>s.offset.line||t===s.offset.line&&n>=s.offset.column)r=s;else break;if(!r)return null;let o=t-r.offset.line,i=t===r.offset.line?n-r.offset.column:n;return Wn(r.map.mappings,r.map.sources,o,i)}return Wn(e.mappings,e.sources,t-1,n)},zo=(e,t)=>{let n=t.split(`
22
+ `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(Go);s&&(r=s[1]||s[2]);}if(!r)return null;let o=rr.test(r);if(!(Vo.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},qo=e=>({file:e.file,mappings:(0, nr.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),Xo=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, nr.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},Kn=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(rr);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},Wo=async(e,t=fetch)=>{if(!Kn(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=zo(e,n);if(!r||!Kn(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?Xo(i):qo(i)}catch{return null}},Ko=async(e,t=true,n)=>{if(t&&qe.has(e)){let i=qe.get(e);if(i==null)return null;if(Uo(i)){let s=i.deref();if(s)return s;qe.delete(e);}else return i}if(t&&vt.has(e))return vt.get(e);let r=Wo(e,n);t&&vt.set(e,r);let o=await r;return t&&vt.delete(e),t&&(o===null?qe.set(e,null):qe.set(e,or?new WeakRef(o):o)),o},Zn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Zo=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],Qn="about://React/",Qo=["<anonymous>","eval",""],Jo=/\.(jsx|tsx|ts|js)$/,ei=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,ti=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,ni=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",ri=e=>{let t=e._debugSource;return t?typeof t=="object"&&!!t&&"fileName"in t&&typeof t.fileName=="string"&&"lineNumber"in t&&typeof t.lineNumber=="number":false},ir=async(e,t=true,n)=>{if(ri(e))return e._debugSource||null;let r=oi(e),o=await ii(r,1,t,n);return !o||o.length===0?null:o[0]},oi=e=>ni(e)?Lo(e._debugStack.stack):Mo(e);var ii=async(e,t=1,n=true,r)=>{let o=Bo(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let a=await Ko(s.file,n,r);if(a&&typeof s.line=="number"&&typeof s.col=="number"){let l=Yo(a,s.line,s.col);if(l){i.push(l);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},Wt=e=>{if(!e||Qo.includes(e))return "";let t=e;if(t.startsWith(Qn)){let r=t.slice(Qn.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of Zo)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(Zn.test(t)){let r=t.match(Zn);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);ti.test(r)&&(t=t.slice(0,n));}return t},sr=e=>{let t=Wt(e);return !(!t||!Jo.test(t)||ei.test(t))};var ar=e=>e.length>0&&/^[A-Z]/.test(e);var si=["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","ErrorBoundary","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary"],ai=()=>!!document.getElementById("__NEXT_DATA__"),lr=e=>!!(e.startsWith("_")||si.includes(e)),li=e=>!(lr(e)||!ar(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),cr=e=>{let t=ze(e);if(!t)return null;let n=null;return Le(t,r=>{if(xt(r)){let o=Fe(r);if(o&&li(o))return n=o,true}return false},true),n},ur=async e=>{let t=ze(e);if(!t||!Vt(t))return [];let n=Ct(t),r=[];return Le(n,i=>{let s=St(i)?typeof i.type=="string"?i.type:null:Fe(i);s&&!lr(s)&&r.push({name:s,sourcePromise:ir(i)});},true),(await Promise.all(r.map(async i=>({name:i.name,source:await i.sourcePromise})))).filter(i=>i.source!==null)},fr=e=>{let t=ai();return e.map(({name:n,source:r})=>{if(!r)return ` at ${n}`;if(r.fileName.startsWith("about://React/Server"))return ` at ${n} (Server)`;if(!sr(r.fileName))return ` at ${n}`;let o=` at ${n} in ${Wt(r.fileName)}`;return t?`${o}:${r.lineNumber}:${r.columnNumber}`:o}).join(`
23
+ `)},dr=e=>{let t=e.tagName.toLowerCase();if(!(e instanceof HTMLElement))return `<${t} />`;let n=e.innerText?.trim()??e.textContent?.trim()??"",r="",o=Array.from(e.attributes);for(let p of o){let w=p.name,T=p.value;T.length>20&&(T=`${T.slice(0,20)}...`),r+=` ${w}="${T}"`;}let i=[],s=[],a=false,l=Array.from(e.childNodes);for(let p of l)p.nodeType!==Node.COMMENT_NODE&&(p.nodeType===Node.TEXT_NODE?p.textContent&&p.textContent.trim().length>0&&(a=true):p.nodeType===Node.ELEMENT_NODE&&(a?s.push(p):i.push(p)));let u=p=>p.length===0?"":p.length<=2?p.map(w=>`<${w.tagName.toLowerCase()} ...>`).join(`
24
+ `):`(${p.length} elements)`,m="",d=u(i);if(d&&(m+=`
25
+ ${d}`),n.length>0){let p=n.length>100?`${n.slice(0,100)}...`:n;m+=`
26
+ ${p}`;}let S=u(s);return S&&(m+=`
27
+ ${S}`),m.length>0?`<${t}${r}>${m}
28
+ </${t}>`:`<${t}${r} />`};var ci=()=>document.hasFocus()?new Promise(e=>setTimeout(e,50)):new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),setTimeout(e,50);};window.addEventListener("focus",t),window.focus();}),Et=async(e,t)=>{await ci();try{try{return await navigator.clipboard.writeText(e),t?.(),!0}catch{return ui(e,t)}}catch{return false}},ui=(e,t)=>{if(!document.execCommand)return false;let n=document.createElement("textarea");n.value=String(e),n.style.clipPath="inset(50%)",n.ariaHidden="true",(document.body||document.documentElement).append(n);try{n.select();let o=document.execCommand("copy");return o&&t?.(),o}finally{n.remove();}};var Xe=()=>{try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createGain();t.connect(e.destination),[{freq:523.25,start:0,duration:.1},{freq:659.25,start:.05,duration:.1},{freq:783.99,start:.1,duration:.15}].forEach(r=>{let o=e.createOscillator(),i=e.createGain();o.connect(i),i.connect(t),o.frequency.value=r.freq,o.type="triangle";let s=e.currentTime+r.start,a=s+.01,l=s+r.duration;i.gain.setValueAtTime(0,s),i.gain.linearRampToValueAtTime(.15,a),i.gain.exponentialRampToValueAtTime(.01,l),o.start(s),o.stop(l);});}catch{}};var mr=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var We=e=>{if(e.closest(`[${Me}]`))return false;let t=window.getComputedStyle(e);return !(!mr(e,t)||t.pointerEvents==="none")};var Kt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(We(r))return r;return null};var fi=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom),s=Math.max(0,o-n),a=Math.max(0,i-r);return s*a},di=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,gr=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),i={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};for(let s of o){if(!n){let u=(s.tagName||"").toUpperCase();if(u==="HTML"||u==="BODY")continue}if(!t(s))continue;let a=s.getBoundingClientRect(),l={left:a.left,top:a.top,right:a.left+a.width,bottom:a.top+a.height};if(n){let u=fi(i,l),m=Math.max(0,a.width*a.height);m>0&&u/m>=.75&&r.push(s);}else di(l,i)&&r.push(s);}return r},pr=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),hr=(e,t)=>{let n=gr(e,t,true);return pr(n)},br=(e,t)=>{let n=gr(e,t,false);return pr(n)};var Zt=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return {borderRadius:n.borderRadius||"0px",height:t.height,transform:n.transform||"none",width:t.width,x:t.left,y:t.top}};var yr=e=>{let t={enabled:true,keyHoldDuration:300,allowActivationInsideInput:true,playCopySound:false,...e};return t.enabled===false?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{}}:_e(n=>{let[r,o]=v(false),[i,s]=v(-1e3),[a,l]=v(-1e3),[u,m]=v(false),[d,S]=v(-1e3),[p,w]=v(-1e3),[T,U]=v(false),[re,z]=v(null),[q,L]=v(null),[X,ce]=v(0),[ve,we]=v([]),[De,Ke]=v([]),[y,h]=v(false),[c,b]=v(false),[C,A]=v(false),[I,F]=v(false),[$,M]=v(-1e3),[N,j]=v(-1e3),[V,_]=v(false),k=null,Q=null,ue=null,W=null,J=null,fe=D(()=>y()&&!T()),He=D(()=>i()>-1e3&&a()>-1e3),me=f=>(f.metaKey||f.ctrlKey)&&f.key.toLowerCase()==="c",ee=f=>{let x=`grabbed-${Date.now()}-${Math.random()}`,E=Date.now(),K={id:x,bounds:f,createdAt:E},B=ve();we([...B,K]),setTimeout(()=>{we(de=>de.filter(cn=>cn.id!==x));},1700);},ge=f=>{let x=`success-${Date.now()}-${Math.random()}`;Ke(E=>[...E,{id:x,text:f}]),setTimeout(()=>{Ke(E=>E.filter(K=>K.id!==x));},1700);},Ee=f=>`<selected_element>
28
29
  ${f}
29
- </selected_element>`,tn=f=>(f.tagName||"").toLowerCase(),nn=f=>{let S=tn(f),v=mr(f);return S&&v?`<${S}> in ${v}`:S?`<${S}>`:"<element>"},rn=f=>{try{let S=f.map(v=>({tagName:tn(v)}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:S}}));}catch{}},Ft=async(f,S,v)=>{$(f),V(S),G(true),kr(),await v().finally(()=>{G(false),Je(),u()&&(r()?h(false):Fe());});},vr=f=>"innerText"in f,Er=f=>vr(f)?f.innerText:f.textContent??"",on=f=>f.map(S=>Er(S).trim()).filter(S=>S.length>0).join(`
30
+ </selected_element>`,Ze=f=>(f.tagName||"").toLowerCase(),Qe=f=>{let x=Ze(f),E=cr(f);return x&&E?`<${x}> in ${E}`:x?`<${x}>`:"<element>"},Qt=f=>{try{let x=f.map(E=>({tagName:Ze(E)}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:x}}));}catch{}},At=async(f,x,E)=>{M(f),j(x),U(true),Rr(),await E().finally(()=>{U(false),Je(),c()&&(r()?b(false):Re());});},Tr=f=>"innerText"in f,Sr=f=>Tr(f)?f.innerText:f.textContent??"",Jt=f=>f.map(x=>Sr(x).trim()).filter(x=>x.length>0).join(`
30
31
 
31
- `),sn=async f=>{let S=false;try{let q=(await Promise.allSettled(f.map(async j=>`## HTML Frame:
32
- ${hr(j)}
32
+ `),en=async f=>{let x=false;try{let K=(await Promise.allSettled(f.map(async B=>`## HTML Frame:
33
+ ${dr(B)}
33
34
 
34
35
  ## Code Location:
35
- ${pr(await gr(j))}`))).map(j=>j.status==="fulfilled"?j.value:"").filter(j=>j.trim());if(q.length>0){let j=q.map(pe=>Ot(pe)).join(`
36
+ ${fr(await ur(B))}`))).map(B=>B.status==="fulfilled"?B.value:"").filter(B=>B.trim());if(K.length>0){let B=K.map(de=>Ee(de)).join(`
36
37
 
37
- `);S=await At(j,t.playCopySound?We:void 0);}if(!S){let j=on(f);j.length>0&&(S=await At(j,t.playCopySound?We:void 0));}}catch{let v=on(f);v.length>0&&(S=await At(v,t.playCopySound?We:void 0));}return S},Rr=async f=>{xe(en(f)),await new Promise(v=>requestAnimationFrame(v)),await sn([f])&&Qe(nn(f)),rn([f]);},an=async f=>{if(f.length===0)return;for(let v of f)xe(en(v));await new Promise(v=>requestAnimationFrame(v)),await sn(f)&&Qe(`${f.length} elements`),rn(f);},Ce=L(()=>!ee()||c()?null:Jt(i(),a())),Ar=L(()=>{let f=Ce();if(!f)return;let S=f.getBoundingClientRect(),v=window.getComputedStyle(f);return {borderRadius:v.borderRadius||"0px",height:S.height,transform:v.transform||"none",width:S.width,x:S.left,y:S.top}}),ln=(f,S)=>({x:Math.abs(f-m()),y:Math.abs(S-w())}),cn=L(()=>{if(!c())return false;let f=ln(i(),a());return f.x>2||f.y>2}),un=(f,S)=>{let v=Math.min(m(),f),q=Math.min(w(),S),j=Math.abs(f-m()),pe=Math.abs(S-w());return {x:v,y:q,width:j,height:pe}},_r=L(()=>{if(!cn())return;let f=un(i(),a());return {borderRadius:"0px",height:f.height,transform:"none",width:f.width,x:f.x,y:f.y}}),Or=L(()=>{let f=Ce();return f?nn(f):"<element>"}),fn=L(()=>x()?{x:M(),y:N()}:{x:i(),y:a()}),dn=L(()=>x()?{x:M(),y:N()}:{x:i(),y:a()}),Fr=L(()=>!!(Ce()&&Ce()===ne()));oe($e(()=>[Ce(),ne()],([f,S])=>{S&&f&&S!==f&&X(null);}));let kr=()=>{let f=Date.now();D(f),A(false),de=window.setTimeout(()=>{A(true),de=null;},150);let S=()=>{let v=W();if(v===null)return;let j=(Date.now()-v)/t.keyHoldDuration,pe=1-Math.exp(-j),pn=x()?Math.min(pe,.95):1;fe(pn),pn<1&&(J=requestAnimationFrame(S));};S();},Je=()=>{J!==null&&(cancelAnimationFrame(J),J=null),de!==null&&(window.clearTimeout(de),de=null),D(null),fe(1),A(false);},et=()=>{Je(),p(true),document.body.style.cursor="crosshair";},Fe=()=>{h(false),o(false),p(false),document.body.style.cursor="",c()&&(d(false),document.body.style.userSelect=""),k&&window.clearTimeout(k),Z&&window.clearTimeout(Z),z&&(window.clearTimeout(z),z=null),_(false),me=-1e3,ge=-1e3,Je();},mn=new AbortController,ke=mn.signal;window.addEventListener("keydown",f=>{if(f.key==="Escape"&&r()){Fe();return}if(f.key==="Enter"&&r()){h(true),Z!==null&&(window.clearTimeout(Z),Z=null),b()||(k&&window.clearTimeout(k),et(),t.onActivate?.());return}if(!(!t.allowActivationInsideInput&&Pn(f))&&Se(f)){if(b()){if(u())return;Z!==null&&window.clearTimeout(Z),Z=window.setTimeout(()=>{Fe();},200);return}f.repeat||(k!==null&&window.clearTimeout(k),r()||o(true),k=window.setTimeout(()=>{et(),t.onActivate?.();},t.keyHoldDuration));}},{signal:ke,capture:true}),window.addEventListener("keyup",f=>{if(!r()&&!b())return;let S=!f.metaKey&&!f.ctrlKey;if(f.key.toLowerCase()==="c"||S){if(u())return;Fe();}},{signal:ke,capture:true}),window.addEventListener("mousemove",f=>{s(f.clientX),l(f.clientY),me===-1e3&&(me=f.clientX,ge=f.clientY);let S=f.clientX-me,v=f.clientY-ge;Math.sqrt(S*S+v*v)>=200?(z!==null&&window.clearTimeout(z),_(false),me=f.clientX,ge=f.clientY,z=window.setTimeout(()=>{_(true),me=i(),ge=a(),z=null;},100)):z===null&&!B()&&(z=window.setTimeout(()=>{_(true),me=i(),ge=a(),z=null;},100));},{signal:ke}),window.addEventListener("mousedown",f=>{!ee()||x()||(f.preventDefault(),d(true),T(f.clientX),y(f.clientY),document.body.style.userSelect="none");},{signal:ke}),window.addEventListener("mouseup",f=>{if(!c())return;let S=ln(f.clientX,f.clientY),v=S.x>2||S.y>2;if(d(false),document.body.style.userSelect="",v){F(true);let q=un(f.clientX,f.clientY),j=Tr(q,Ke);if(j.length>0)Ft(f.clientX,f.clientY,()=>an(j));else {let pe=Sr(q,Ke);pe.length>0&&Ft(f.clientX,f.clientY,()=>an(pe));}}else {let q=Jt(f.clientX,f.clientY);if(!q)return;X(q),Ft(f.clientX,f.clientY,()=>Rr(q));}},{signal:ke}),window.addEventListener("click",f=>{(ee()||x()||P())&&(f.preventDefault(),f.stopPropagation(),P()&&F(false),u()&&!x()&&(r()?h(false):Fe()));},{signal:ke,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&Te([]);},{signal:ke}),ae(()=>{mn.abort(),k&&window.clearTimeout(k),Z&&window.clearTimeout(Z),z&&window.clearTimeout(z),Je(),document.body.style.userSelect="",document.body.style.cursor="";});let Nr=In(),Pr=L(()=>ee()&&!c()&&!!Ce()),Ir=L(()=>ee()&&cn()),Mr=L(()=>x()?"processing":"hover"),$r=L(()=>x()?true:Be().length>0?false:ee()&&!c()&&B()&&(!!Ce()&&!Fr()||!Ce())),Lr=L(()=>x()&&C()&&re()),Dr=L(()=>ee()&&!c());return kn(()=>R(Bn,{get selectionVisible(){return Pr()},get selectionBounds(){return Ar()},get dragVisible(){return Ir()},get dragBounds(){return _r()},get grabbedBoxes(){return Oe()},get successLabels(){return Be()},get labelVariant(){return Mr()},get labelText(){return Or()},get labelX(){return fn().x},get labelY(){return fn().y},get labelVisible(){return $r()},labelZIndex:2147483647,get progressVisible(){return Lr()},get progress(){return K()},get mouseX(){return dn().x},get mouseY(){return dn().y},get crosshairVisible(){return Dr()}}),Nr),{activate:()=>{b()||(et(),t.onActivate?.());},deactivate:()=>{b()&&Fe();},toggle:()=>{b()?Fe():(et(),t.onActivate?.());},isActive:()=>b(),dispose:n}})};var Cr=null,Nl=()=>Cr;Cr=xr();/*! Bundled license information:
38
+ `);x=await Et(B,t.playCopySound?Xe:void 0);}if(!x){let B=Jt(f);B.length>0&&(x=await Et(B,t.playCopySound?Xe:void 0));}}catch{let E=Jt(f);E.length>0&&(x=await Et(E,t.playCopySound?Xe:void 0));}return x},xr=async f=>{ee(Zt(f)),await new Promise(E=>requestAnimationFrame(E)),await en([f])&&ge(Qe(f)),Qt([f]);},tn=async f=>{if(f.length===0)return;for(let E of f)ee(Zt(E));await new Promise(E=>requestAnimationFrame(E)),await en(f)&&ge(`${f.length} elements`),Qt(f);},Be=D(()=>!fe()||u()?null:Kt(i(),a())),Cr=D(()=>{let f=Be();if(!f)return;let x=f.getBoundingClientRect(),E=window.getComputedStyle(f);return {borderRadius:E.borderRadius||"0px",height:x.height,transform:E.transform||"none",width:x.width,x:x.left,y:x.top}}),nn=(f,x)=>({x:Math.abs(f-d()),y:Math.abs(x-p())}),rn=D(()=>{if(!u())return false;let f=nn(i(),a());return f.x>2||f.y>2}),on=(f,x)=>{let E=Math.min(d(),f),K=Math.min(p(),x),B=Math.abs(f-d()),de=Math.abs(x-p());return {x:E,y:K,width:B,height:de}},vr=D(()=>{if(!rn())return;let f=on(i(),a());return {borderRadius:"0px",height:f.height,transform:"none",width:f.width,x:f.x,y:f.y}}),Er=D(()=>{let f=Be();return f?Qe(f):"<element>"}),sn=D(()=>T()?{x:$(),y:N()}:{x:i(),y:a()}),an=D(()=>T()?{x:$(),y:N()}:{x:i(),y:a()});ne(Ne(()=>[Be(),re()],([f,x])=>{x&&f&&x!==f&&z(null);}));let Rr=()=>{let f=Date.now();L(f),A(false),ue=window.setTimeout(()=>{A(true),ue=null;},150);let x=()=>{let E=q();if(E===null)return;let B=(Date.now()-E)/t.keyHoldDuration,de=1-Math.exp(-B),un=T()?Math.min(de,.95):1;ce(un),un<1&&(Q=requestAnimationFrame(x));};x();},Je=()=>{Q!==null&&(cancelAnimationFrame(Q),Q=null),ue!==null&&(window.clearTimeout(ue),ue=null),L(null),ce(1),A(false);},et=()=>{Je(),h(true),document.body.style.cursor="crosshair",t.onActivate?.();},Re=()=>{b(false),o(false),h(false),document.body.style.cursor="",u()&&(m(false),document.body.style.userSelect=""),k&&window.clearTimeout(k),W&&window.clearTimeout(W),J&&(window.clearTimeout(J),J=null),_(false),Je(),t.onDeactivate?.();},ln=new AbortController,Ae=ln.signal;window.addEventListener("keydown",f=>{if(f.key==="Escape"&&r()){Re();return}if(f.key==="Enter"&&r()){b(true),W!==null&&(window.clearTimeout(W),W=null),y()||(k&&window.clearTimeout(k),et());return}if(!(!t.allowActivationInsideInput&&_n(f))&&me(f)){if(y()){if(c())return;W!==null&&window.clearTimeout(W),W=window.setTimeout(()=>{Re();},200);return}f.repeat||(k!==null&&window.clearTimeout(k),r()||o(true),k=window.setTimeout(()=>{et();},t.keyHoldDuration));}},{signal:Ae,capture:true}),window.addEventListener("keyup",f=>{if(!r()&&!y())return;let x=!f.metaKey&&!f.ctrlKey;if(f.key.toLowerCase()==="c"||x){if(c())return;Re();}},{signal:Ae,capture:true}),window.addEventListener("mousemove",f=>{s(f.clientX),l(f.clientY),J!==null&&window.clearTimeout(J),_(false),J=window.setTimeout(()=>{_(true),J=null;},300);},{signal:Ae}),window.addEventListener("mousedown",f=>{!fe()||T()||(f.preventDefault(),m(true),S(f.clientX),w(f.clientY),document.body.style.userSelect="none");},{signal:Ae}),window.addEventListener("mouseup",f=>{if(!u())return;let x=nn(f.clientX,f.clientY),E=x.x>2||x.y>2;if(m(false),document.body.style.userSelect="",E){F(true);let K=on(f.clientX,f.clientY),B=hr(K,We);if(B.length>0)At(f.clientX,f.clientY,()=>tn(B));else {let de=br(K,We);de.length>0&&At(f.clientX,f.clientY,()=>tn(de));}}else {let K=Kt(f.clientX,f.clientY);if(!K)return;z(K),At(f.clientX,f.clientY,()=>xr(K));}},{signal:Ae}),window.addEventListener("click",f=>{(fe()||T()||I())&&(f.preventDefault(),f.stopPropagation(),I()&&F(false),c()&&!T()&&(r()?b(false):Re()));},{signal:Ae,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&we([]);},{signal:Ae}),ie(()=>{ln.abort(),k&&window.clearTimeout(k),W&&window.clearTimeout(W),J&&window.clearTimeout(J),Je(),document.body.style.userSelect="",document.body.style.cursor="";});let Ar=On(),_r=D(()=>fe()&&!u()&&!!Be()),Or=D(()=>fe()&&rn()),Fr=D(()=>T()?"processing":"hover"),kr=D(()=>T()?true:De().length>0?false:fe()&&!u()&&!!Be()),Nr=D(()=>T()&&C()&&He()),Ir=D(()=>fe()&&!u());return Rn(()=>R(Mn,{get selectionVisible(){return _r()},get selectionBounds(){return Cr()},get dragVisible(){return Or()},get dragBounds(){return vr()},get grabbedBoxes(){return ve()},get successLabels(){return De()},get labelVariant(){return Fr()},get labelText(){return Er()},get labelX(){return sn().x},get labelY(){return sn().y},get labelVisible(){return kr()},labelZIndex:2147483647,get labelShowHint(){return V()},get progressVisible(){return Nr()},get progress(){return X()},get mouseX(){return an().x},get mouseY(){return an().y},get crosshairVisible(){return Ir()}}),Ar),{activate:()=>{y()||et();},deactivate:()=>{y()&&Re();},toggle:()=>{y()?Re():et();},isActive:()=>y(),dispose:n}})};var wr=null,yl=()=>wr;wr=yr();/*! Bundled license information:
38
39
 
39
40
  bippy/dist/rdt-hook-CrcWl4lP.js:
40
41
  (**
@@ -95,4 +96,4 @@ bippy/dist/source.js:
95
96
  * This source code is licensed under the MIT license found in the
96
97
  * LICENSE file in the root directory of this source tree.
97
98
  *)
98
- */exports.getGlobalApi=Nl;exports.init=xr;exports.playCopySound=We;return exports;})({});
99
+ */exports.getGlobalApi=yl;exports.init=yr;exports.playCopySound=Xe;return exports;})({});
package/dist/index.js CHANGED
@@ -356,12 +356,14 @@ var getCursorQuadrants = (cursorX, cursorY, elementWidth, elementHeight, offset)
356
356
  };
357
357
 
358
358
  // src/components/label.tsx
359
- var _tmpl$3 = /* @__PURE__ */ template(`<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713`);
360
- var _tmpl$22 = /* @__PURE__ */ template(`<div style=margin-right:4px>Copied`);
361
- var _tmpl$32 = /* @__PURE__ */ template(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`);
362
- var _tmpl$4 = /* @__PURE__ */ template(`<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>`);
363
- var _tmpl$5 = /* @__PURE__ */ template(`<div style=margin-left:4px>to clipboard`);
364
- var _tmpl$6 = /* @__PURE__ */ template(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`);
359
+ var _tmpl$3 = /* @__PURE__ */ template(`<div style="position:absolute;top:0;left:0;bottom:0;background-color:rgba(178, 28, 142, 0.2);border-radius:3px;transition:width 0.1s ease-out;pointer-events:none">`);
360
+ var _tmpl$22 = /* @__PURE__ */ template(`<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713`);
361
+ var _tmpl$32 = /* @__PURE__ */ template(`<div style=margin-right:4px>Copied`);
362
+ var _tmpl$4 = /* @__PURE__ */ template(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`);
363
+ var _tmpl$5 = /* @__PURE__ */ template(`<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>`);
364
+ var _tmpl$6 = /* @__PURE__ */ template(`<div style=margin-left:4px>to clipboard`);
365
+ var _tmpl$7 = /* @__PURE__ */ template(`<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select`);
366
+ var _tmpl$8 = /* @__PURE__ */ template(`<div style="position:fixed;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 6px;display:flex;flex-direction:column"><div style=display:flex;align-items:center;text-overflow:ellipsis;white-space:nowrap>`);
365
367
  var Label = (props) => {
366
368
  let labelRef;
367
369
  const position = useAnimatedPosition({
@@ -414,10 +416,20 @@ var Label = (props) => {
414
416
  return props.visible !== false;
415
417
  },
416
418
  get children() {
417
- var _el$ = _tmpl$6();
419
+ var _el$ = _tmpl$8(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild;
418
420
  var _ref$ = labelRef;
419
421
  typeof _ref$ === "function" ? use(_ref$, _el$) : labelRef = _el$;
420
422
  insert(_el$, createComponent(Show, {
423
+ get when() {
424
+ return memo(() => props.variant === "processing")() && props.progress !== void 0;
425
+ },
426
+ get children() {
427
+ var _el$2 = _tmpl$3();
428
+ effect((_$p) => setStyleProperty(_el$2, "width", `${Math.min(100, Math.max(0, (props.progress ?? 0) * 100))}%`));
429
+ return _el$2;
430
+ }
431
+ }), _el$3);
432
+ insert(_el$4, createComponent(Show, {
421
433
  get when() {
422
434
  return props.variant === "processing";
423
435
  },
@@ -425,55 +437,63 @@ var Label = (props) => {
425
437
  return createComponent(Spinner, {});
426
438
  }
427
439
  }), null);
428
- insert(_el$, createComponent(Show, {
440
+ insert(_el$4, createComponent(Show, {
429
441
  get when() {
430
442
  return props.variant === "success";
431
443
  },
432
444
  get children() {
433
- return _tmpl$3();
445
+ return _tmpl$22();
434
446
  }
435
447
  }), null);
436
- insert(_el$, createComponent(Show, {
448
+ insert(_el$4, createComponent(Show, {
437
449
  get when() {
438
450
  return props.variant === "success";
439
451
  },
440
452
  get children() {
441
- return _tmpl$22();
453
+ return _tmpl$32();
442
454
  }
443
455
  }), null);
444
- insert(_el$, createComponent(Show, {
456
+ insert(_el$4, createComponent(Show, {
445
457
  get when() {
446
458
  return props.variant === "processing";
447
459
  },
448
- children: "Grabbing\u2026"
460
+ children: "Please wait\u2026"
449
461
  }), null);
450
- insert(_el$, createComponent(Show, {
462
+ insert(_el$4, createComponent(Show, {
451
463
  get when() {
452
464
  return props.variant !== "processing";
453
465
  },
454
466
  get children() {
455
467
  return [(() => {
456
- var _el$4 = _tmpl$32();
457
- insert(_el$4, () => labelSegments().primary);
458
- return _el$4;
468
+ var _el$7 = _tmpl$4();
469
+ insert(_el$7, () => labelSegments().primary);
470
+ return _el$7;
459
471
  })(), createComponent(Show, {
460
472
  get when() {
461
473
  return memo(() => props.variant === "hover")() && labelSegments().secondary !== "";
462
474
  },
463
475
  get children() {
464
- var _el$5 = _tmpl$4();
465
- insert(_el$5, () => labelSegments().secondary);
466
- return _el$5;
476
+ var _el$8 = _tmpl$5();
477
+ insert(_el$8, () => labelSegments().secondary);
478
+ return _el$8;
467
479
  }
468
480
  })];
469
481
  }
470
482
  }), null);
471
- insert(_el$, createComponent(Show, {
483
+ insert(_el$4, createComponent(Show, {
472
484
  get when() {
473
485
  return props.variant === "success";
474
486
  },
475
487
  get children() {
476
- return _tmpl$5();
488
+ return _tmpl$6();
489
+ }
490
+ }), null);
491
+ insert(_el$3, createComponent(Show, {
492
+ get when() {
493
+ return memo(() => props.variant === "hover")() && props.showHint;
494
+ },
495
+ get children() {
496
+ return _tmpl$7();
477
497
  }
478
498
  }), null);
479
499
  effect((_p$) => {
@@ -493,49 +513,7 @@ var Label = (props) => {
493
513
  }
494
514
  });
495
515
  };
496
- var _tmpl$7 = /* @__PURE__ */ template(`<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">`);
497
- var ProgressIndicator = (props) => {
498
- const opacity = useFadeInOut({
499
- visible: props.visible
500
- });
501
- let progressIndicatorRef;
502
- const computedPosition = () => {
503
- const boundingRect = progressIndicatorRef?.getBoundingClientRect();
504
- if (!boundingRect) return {
505
- left: props.mouseX,
506
- top: props.mouseY
507
- };
508
- const viewportHeight = window.innerHeight;
509
- const indicatorLeft = props.mouseX - boundingRect.width / 2;
510
- const indicatorTop = props.mouseY + CURSOR_OFFSET_PX + boundingRect.height + VIEWPORT_MARGIN_PX > viewportHeight ? props.mouseY - boundingRect.height - CURSOR_OFFSET_PX : props.mouseY + CURSOR_OFFSET_PX;
511
- return getClampedElementPosition(indicatorLeft, indicatorTop, boundingRect.width, boundingRect.height);
512
- };
513
- return createComponent(Show, {
514
- get when() {
515
- return props.visible !== false;
516
- },
517
- get children() {
518
- var _el$ = _tmpl$7(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
519
- var _ref$ = progressIndicatorRef;
520
- typeof _ref$ === "function" ? use(_ref$, _el$) : progressIndicatorRef = _el$;
521
- effect((_p$) => {
522
- var _v$ = `${computedPosition().top}px`, _v$2 = `${computedPosition().left}px`, _v$3 = opacity(), _v$4 = `${Math.min(100, Math.max(0, props.progress * 100))}%`;
523
- _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
524
- _v$2 !== _p$.t && setStyleProperty(_el$, "left", _p$.t = _v$2);
525
- _v$3 !== _p$.a && setStyleProperty(_el$, "opacity", _p$.a = _v$3);
526
- _v$4 !== _p$.o && setStyleProperty(_el$3, "width", _p$.o = _v$4);
527
- return _p$;
528
- }, {
529
- e: void 0,
530
- t: void 0,
531
- a: void 0,
532
- o: void 0
533
- });
534
- return _el$;
535
- }
536
- });
537
- };
538
- var _tmpl$8 = /* @__PURE__ */ template(`<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>`);
516
+ var _tmpl$9 = /* @__PURE__ */ template(`<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>`);
539
517
  var Crosshair = (props) => {
540
518
  let canvasRef;
541
519
  let context = null;
@@ -595,7 +573,7 @@ var Crosshair = (props) => {
595
573
  return props.visible !== false;
596
574
  },
597
575
  get children() {
598
- var _el$ = _tmpl$8();
576
+ var _el$ = _tmpl$9();
599
577
  var _ref$ = canvasRef;
600
578
  typeof _ref$ === "function" ? use(_ref$, _el$) : canvasRef = _el$;
601
579
  return _el$;
@@ -663,22 +641,29 @@ var ReactGrabRenderer = (props) => {
663
641
  return box.createdAt;
664
642
  }
665
643
  })
666
- }), createComponent(For, {
667
- get each() {
668
- return props.successLabels ?? [];
644
+ }), createComponent(Show, {
645
+ get when() {
646
+ return props.labelVariant !== "processing";
669
647
  },
670
- children: (label) => createComponent(Label, {
671
- variant: "success",
672
- get text() {
673
- return label.text;
674
- },
675
- get x() {
676
- return props.mouseX ?? 0;
677
- },
678
- get y() {
679
- return props.mouseY ?? 0;
680
- }
681
- })
648
+ get children() {
649
+ return createComponent(For, {
650
+ get each() {
651
+ return props.successLabels ?? [];
652
+ },
653
+ children: (label) => createComponent(Label, {
654
+ variant: "success",
655
+ get text() {
656
+ return label.text;
657
+ },
658
+ get x() {
659
+ return props.mouseX ?? 0;
660
+ },
661
+ get y() {
662
+ return props.mouseY ?? 0;
663
+ }
664
+ })
665
+ });
666
+ }
682
667
  }), createComponent(Show, {
683
668
  get when() {
684
669
  return memo(() => !!(props.labelVisible && props.labelVariant && props.labelText && props.labelX !== void 0))() && props.labelY !== void 0;
@@ -702,26 +687,12 @@ var ReactGrabRenderer = (props) => {
702
687
  },
703
688
  get zIndex() {
704
689
  return props.labelZIndex;
705
- }
706
- });
707
- }
708
- }), createComponent(Show, {
709
- get when() {
710
- return memo(() => !!(props.progressVisible && props.progress !== void 0 && props.mouseX !== void 0))() && props.mouseY !== void 0;
711
- },
712
- get children() {
713
- return createComponent(ProgressIndicator, {
690
+ },
714
691
  get progress() {
715
692
  return props.progress;
716
693
  },
717
- get mouseX() {
718
- return props.mouseX;
719
- },
720
- get mouseY() {
721
- return props.mouseY;
722
- },
723
- get visible() {
724
- return props.progressVisible;
694
+ get showHint() {
695
+ return props.labelShowHint;
725
696
  }
726
697
  });
727
698
  }
@@ -854,8 +825,8 @@ var getHTMLPreview = (element) => {
854
825
  }
855
826
  attrsText += ` ${name}="${value}"`;
856
827
  }
857
- let topElements = 0;
858
- let bottomElements = 0;
828
+ const topElements = [];
829
+ const bottomElements = [];
859
830
  let foundFirstText = false;
860
831
  const childNodes = Array.from(element.childNodes);
861
832
  for (const node of childNodes) {
@@ -866,19 +837,31 @@ var getHTMLPreview = (element) => {
866
837
  }
867
838
  } else if (node.nodeType === Node.ELEMENT_NODE) {
868
839
  if (!foundFirstText) {
869
- topElements++;
840
+ topElements.push(node);
870
841
  } else {
871
- bottomElements++;
842
+ bottomElements.push(node);
872
843
  }
873
844
  }
874
845
  }
846
+ const formatElements = (elements) => {
847
+ if (elements.length === 0) return "";
848
+ if (elements.length <= 2) {
849
+ return elements.map((el) => `<${el.tagName.toLowerCase()} ...>`).join("\n ");
850
+ }
851
+ return `(${elements.length} elements)`;
852
+ };
875
853
  let content = "";
876
- if (topElements > 0) content += `
877
- (${topElements} elements)`;
878
- if (text.length > 0) content += `
879
- ${text}`;
880
- if (bottomElements > 0) content += `
881
- (${bottomElements} elements)`;
854
+ const topElementsStr = formatElements(topElements);
855
+ if (topElementsStr) content += `
856
+ ${topElementsStr}`;
857
+ if (text.length > 0) {
858
+ const truncatedText = text.length > 100 ? `${text.slice(0, 100)}...` : text;
859
+ content += `
860
+ ${truncatedText}`;
861
+ }
862
+ const bottomElementsStr = formatElements(bottomElements);
863
+ if (bottomElementsStr) content += `
864
+ ${bottomElementsStr}`;
882
865
  if (content.length > 0) {
883
866
  return `<${tagName}${attrsText}>${content}
884
867
  </${tagName}>`;
@@ -1128,8 +1111,6 @@ var init = (rawOptions) => {
1128
1111
  let progressDelayTimerId = null;
1129
1112
  let keydownSpamTimerId = null;
1130
1113
  let mouseSettleTimerId = null;
1131
- let referenceMouseX = OFFSCREEN_POSITION;
1132
- let referenceMouseY = OFFSCREEN_POSITION;
1133
1114
  const isRendererActive = createMemo(() => isActivated() && !isCopying());
1134
1115
  const hasValidMousePosition = createMemo(() => mouseX() > OFFSCREEN_POSITION && mouseY() > OFFSCREEN_POSITION);
1135
1116
  const isTargetKeyCombination = (event) => (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c";
@@ -1327,7 +1308,6 @@ ${formatStack(await getStack(element))}`));
1327
1308
  x: mouseX(),
1328
1309
  y: mouseY()
1329
1310
  });
1330
- const isSameAsLast = createMemo(() => Boolean(targetElement() && targetElement() === lastGrabbedElement()));
1331
1311
  createEffect(on(() => [targetElement(), lastGrabbedElement()], ([currentElement, lastElement]) => {
1332
1312
  if (lastElement && currentElement && lastElement !== currentElement) {
1333
1313
  setLastGrabbedElement(null);
@@ -1373,6 +1353,7 @@ ${formatStack(await getStack(element))}`));
1373
1353
  stopProgressAnimation();
1374
1354
  setIsActivated(true);
1375
1355
  document.body.style.cursor = "crosshair";
1356
+ options.onActivate?.();
1376
1357
  };
1377
1358
  const deactivateRenderer = () => {
1378
1359
  setIsToggleMode(false);
@@ -1390,9 +1371,8 @@ ${formatStack(await getStack(element))}`));
1390
1371
  mouseSettleTimerId = null;
1391
1372
  }
1392
1373
  setMouseHasSettled(false);
1393
- referenceMouseX = OFFSCREEN_POSITION;
1394
- referenceMouseY = OFFSCREEN_POSITION;
1395
1374
  stopProgressAnimation();
1375
+ options.onDeactivate?.();
1396
1376
  };
1397
1377
  const abortController = new AbortController();
1398
1378
  const eventListenerSignal = abortController.signal;
@@ -1410,7 +1390,6 @@ ${formatStack(await getStack(element))}`));
1410
1390
  if (!isActivated()) {
1411
1391
  if (holdTimerId) window.clearTimeout(holdTimerId);
1412
1392
  activateRenderer();
1413
- options.onActivate?.();
1414
1393
  }
1415
1394
  return;
1416
1395
  }
@@ -1437,7 +1416,6 @@ ${formatStack(await getStack(element))}`));
1437
1416
  }
1438
1417
  holdTimerId = window.setTimeout(() => {
1439
1418
  activateRenderer();
1440
- options.onActivate?.();
1441
1419
  }, options.keyHoldDuration);
1442
1420
  }, {
1443
1421
  signal: eventListenerSignal,
@@ -1458,34 +1436,14 @@ ${formatStack(await getStack(element))}`));
1458
1436
  window.addEventListener("mousemove", (event) => {
1459
1437
  setMouseX(event.clientX);
1460
1438
  setMouseY(event.clientY);
1461
- if (referenceMouseX === OFFSCREEN_POSITION) {
1462
- referenceMouseX = event.clientX;
1463
- referenceMouseY = event.clientY;
1464
- }
1465
- const deltaX = event.clientX - referenceMouseX;
1466
- const deltaY = event.clientY - referenceMouseY;
1467
- const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
1468
- if (distance >= 200) {
1469
- if (mouseSettleTimerId !== null) {
1470
- window.clearTimeout(mouseSettleTimerId);
1471
- }
1472
- setMouseHasSettled(false);
1473
- referenceMouseX = event.clientX;
1474
- referenceMouseY = event.clientY;
1475
- mouseSettleTimerId = window.setTimeout(() => {
1476
- setMouseHasSettled(true);
1477
- referenceMouseX = mouseX();
1478
- referenceMouseY = mouseY();
1479
- mouseSettleTimerId = null;
1480
- }, 100);
1481
- } else if (mouseSettleTimerId === null && !mouseHasSettled()) {
1482
- mouseSettleTimerId = window.setTimeout(() => {
1483
- setMouseHasSettled(true);
1484
- referenceMouseX = mouseX();
1485
- referenceMouseY = mouseY();
1486
- mouseSettleTimerId = null;
1487
- }, 100);
1439
+ if (mouseSettleTimerId !== null) {
1440
+ window.clearTimeout(mouseSettleTimerId);
1488
1441
  }
1442
+ setMouseHasSettled(false);
1443
+ mouseSettleTimerId = window.setTimeout(() => {
1444
+ setMouseHasSettled(true);
1445
+ mouseSettleTimerId = null;
1446
+ }, 300);
1489
1447
  }, {
1490
1448
  signal: eventListenerSignal
1491
1449
  });
@@ -1569,7 +1527,7 @@ ${formatStack(await getStack(element))}`));
1569
1527
  const labelVisible = createMemo(() => {
1570
1528
  if (isCopying()) return true;
1571
1529
  if (successLabels().length > 0) return false;
1572
- return isRendererActive() && !isDragging() && mouseHasSettled() && (Boolean(targetElement()) && !isSameAsLast() || !targetElement());
1530
+ return isRendererActive() && !isDragging() && Boolean(targetElement());
1573
1531
  });
1574
1532
  const progressVisible = createMemo(() => isCopying() && showProgressIndicator() && hasValidMousePosition());
1575
1533
  const crosshairVisible = createMemo(() => isRendererActive() && !isDragging());
@@ -1608,6 +1566,9 @@ ${formatStack(await getStack(element))}`));
1608
1566
  return labelVisible();
1609
1567
  },
1610
1568
  labelZIndex: Z_INDEX_LABEL,
1569
+ get labelShowHint() {
1570
+ return mouseHasSettled();
1571
+ },
1611
1572
  get progressVisible() {
1612
1573
  return progressVisible();
1613
1574
  },
@@ -1628,7 +1589,6 @@ ${formatStack(await getStack(element))}`));
1628
1589
  activate: () => {
1629
1590
  if (!isActivated()) {
1630
1591
  activateRenderer();
1631
- options.onActivate?.();
1632
1592
  }
1633
1593
  },
1634
1594
  deactivate: () => {
@@ -1641,7 +1601,6 @@ ${formatStack(await getStack(element))}`));
1641
1601
  deactivateRenderer();
1642
1602
  } else {
1643
1603
  activateRenderer();
1644
- options.onActivate?.();
1645
1604
  }
1646
1605
  },
1647
1606
  isActive: () => isActivated(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-grab",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "description": "Grab any element in your app and give it to Cursor, Claude Code, or other AI coding agents.",
5
5
  "keywords": [
6
6
  "react",