react-grab 0.0.45 → 0.0.47

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
@@ -616,11 +616,11 @@ var InputOverlay = (props) => {
616
616
  return fallback;
617
617
  };
618
618
  const handleKeyDown = (event) => {
619
- if (event.key === "Enter" && !event.shiftKey) {
619
+ if (event.code === "Enter" && !event.shiftKey) {
620
620
  event.preventDefault();
621
621
  event.stopPropagation();
622
622
  props.onSubmit();
623
- } else if (event.key === "Escape") {
623
+ } else if (event.code === "Escape") {
624
624
  event.preventDefault();
625
625
  event.stopPropagation();
626
626
  props.onCancel();
@@ -859,50 +859,60 @@ var checkIsSourceComponentName = (name) => {
859
859
  return true;
860
860
  };
861
861
  var getNearestComponentName = (element) => {
862
- const fiber = bippy.getFiberFromHostInstance(element);
863
- if (!fiber) return null;
864
- let foundComponentName = null;
865
- bippy.traverseFiber(
866
- fiber,
867
- (currentFiber) => {
868
- if (bippy.isCompositeFiber(currentFiber)) {
869
- const displayName = bippy.getDisplayName(currentFiber);
870
- if (displayName && checkIsSourceComponentName(displayName)) {
871
- foundComponentName = displayName;
872
- return true;
862
+ if (!bippy.isInstrumentationActive()) return null;
863
+ try {
864
+ const fiber = bippy.getFiberFromHostInstance(element);
865
+ if (!fiber) return null;
866
+ let foundComponentName = null;
867
+ bippy.traverseFiber(
868
+ fiber,
869
+ (currentFiber) => {
870
+ if (bippy.isCompositeFiber(currentFiber)) {
871
+ const displayName = bippy.getDisplayName(currentFiber);
872
+ if (displayName && checkIsSourceComponentName(displayName)) {
873
+ foundComponentName = displayName;
874
+ return true;
875
+ }
873
876
  }
874
- }
875
- return false;
876
- },
877
- true
878
- );
879
- return foundComponentName;
877
+ return false;
878
+ },
879
+ true
880
+ );
881
+ return foundComponentName;
882
+ } catch {
883
+ return null;
884
+ }
880
885
  };
881
886
  var getStack = async (element) => {
882
- const maybeFiber = bippy.getFiberFromHostInstance(element);
883
- if (!maybeFiber || !bippy.isFiber(maybeFiber)) return [];
884
- const fiber = bippy.getLatestFiber(maybeFiber);
885
- const unresolvedStack = [];
886
- bippy.traverseFiber(
887
- fiber,
888
- (currentFiber) => {
889
- const displayName = bippy.isHostFiber(currentFiber) ? typeof currentFiber.type === "string" ? currentFiber.type : null : bippy.getDisplayName(currentFiber);
890
- if (displayName && !checkIsInternalComponentName(displayName)) {
891
- unresolvedStack.push({
892
- name: displayName,
893
- sourcePromise: source.getSource(currentFiber)
894
- });
895
- }
896
- },
897
- true
898
- );
899
- const resolvedStack = await Promise.all(
900
- unresolvedStack.map(async (frame) => ({
901
- name: frame.name,
902
- source: await frame.sourcePromise
903
- }))
904
- );
905
- return resolvedStack.filter((frame) => frame.source !== null);
887
+ if (!bippy.isInstrumentationActive()) return [];
888
+ try {
889
+ const maybeFiber = bippy.getFiberFromHostInstance(element);
890
+ if (!maybeFiber || !bippy.isFiber(maybeFiber)) return [];
891
+ const fiber = bippy.getLatestFiber(maybeFiber);
892
+ const unresolvedStack = [];
893
+ bippy.traverseFiber(
894
+ fiber,
895
+ (currentFiber) => {
896
+ const displayName = bippy.isHostFiber(currentFiber) ? typeof currentFiber.type === "string" ? currentFiber.type : null : bippy.getDisplayName(currentFiber);
897
+ if (displayName && !checkIsInternalComponentName(displayName)) {
898
+ unresolvedStack.push({
899
+ name: displayName,
900
+ sourcePromise: source.getSource(currentFiber)
901
+ });
902
+ }
903
+ },
904
+ true
905
+ );
906
+ const resolvedStack = await Promise.all(
907
+ unresolvedStack.map(async (frame) => ({
908
+ name: frame.name,
909
+ source: await frame.sourcePromise
910
+ }))
911
+ );
912
+ return resolvedStack.filter((frame) => frame.source !== null);
913
+ } catch {
914
+ return [];
915
+ }
906
916
  };
907
917
  var formatStack = (stack) => {
908
918
  const isNextProject = checkIsNextProject();
@@ -945,7 +955,7 @@ var getHTMLPreview = (element) => {
945
955
  if (node.textContent && node.textContent.trim().length > 0) {
946
956
  foundFirstText = true;
947
957
  }
948
- } else if (node.nodeType === Node.ELEMENT_NODE) {
958
+ } else if (node instanceof Element) {
949
959
  if (!foundFirstText) {
950
960
  topElements.push(node);
951
961
  } else {
@@ -1200,12 +1210,12 @@ var init = (rawOptions) => {
1200
1210
  hasInited = true;
1201
1211
  const logIntro = () => {
1202
1212
  try {
1203
- const version = "0.0.45";
1213
+ const version = "0.0.47";
1204
1214
  const logoSvg = `<svg width="294" height="294" viewBox="0 0 294 294" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_0_3)"><mask id="mask0_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="294" height="294"><path d="M294 0H0V294H294V0Z" fill="white"/></mask><g mask="url(#mask0_0_3)"><path d="M144.599 47.4924C169.712 27.3959 194.548 20.0265 212.132 30.1797C227.847 39.2555 234.881 60.3243 231.926 89.516C231.677 92.0069 231.328 94.5423 230.94 97.1058L228.526 110.14C228.517 110.136 228.505 110.132 228.495 110.127C228.486 110.165 228.479 110.203 228.468 110.24L216.255 105.741C216.256 105.736 216.248 105.728 216.248 105.723C207.915 103.125 199.421 101.075 190.82 99.5888L190.696 99.5588L173.526 97.2648L173.511 97.2631C173.492 97.236 173.467 97.2176 173.447 97.1905C163.862 96.2064 154.233 95.7166 144.599 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8624 138.391 86.939 147.193C90.8624 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245C115.749 197.245 115.758 197.246 115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.507 229.974L144.609 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.472 238.38C154.485 238.392 154.499 238.402 154.513 238.412L143.846 247.482L143.827 247.497C126.56 261.128 109.472 268.745 94.8019 268.745C88.5916 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3164 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3363 185.327 9.52301 167.51 9.52301 147.193C9.52301 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3164 60.3243 61.3496 39.2555 77.0657 30.1797C94.6494 20.0265 119.486 27.3959 144.599 47.4924ZM70.6423 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5176 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8516 207.742 83.0977 205.066 70.6423 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1787 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.9311 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.759 110.203C59.234 110.839 57.7378 111.475 56.27 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9104 147.193C67.822 135.23 63.7566 122.855 60.759 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.854 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.6291 47.6015 67.6975 64.5954 70.0424 87.9446L70.0416 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8263 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.773 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.29 38.512C183.321 38.512 169.34 44.4991 154.444 56.0153C163.93 64.9374 172.634 74.6557 180.462 85.064C193.375 86.6345 206.128 89.3102 218.584 93.0624C218.812 91.4325 219.003 89.8118 219.165 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.552 64.3097C138.104 70.2614 132.054 76.6306 126.443 83.3765C132.39 82.995 138.426 82.8046 144.552 82.8046C150.727 82.8046 156.778 83.0143 162.707 83.3765C157.08 76.6293 151.015 70.2596 144.552 64.3097Z" fill="white"/><path d="M144.598 47.4924C169.712 27.3959 194.547 20.0265 212.131 30.1797C227.847 39.2555 234.88 60.3243 231.926 89.516C231.677 92.0069 231.327 94.5423 230.941 97.1058L228.526 110.14L228.496 110.127C228.487 110.165 228.478 110.203 228.469 110.24L216.255 105.741L216.249 105.723C207.916 103.125 199.42 101.075 190.82 99.5888L190.696 99.5588L173.525 97.2648L173.511 97.263C173.492 97.236 173.468 97.2176 173.447 97.1905C163.863 96.2064 154.234 95.7166 144.598 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8622 138.391 86.939 147.193C90.8622 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245L115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.506 229.974L144.61 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.473 238.38L154.512 238.412L143.847 247.482L143.827 247.497C126.56 261.13 109.472 268.745 94.8018 268.745C88.5915 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3162 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3362 185.327 9.52298 167.51 9.52298 147.193C9.52298 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3162 60.3243 61.3496 39.2555 77.0657 30.1797C94.6493 20.0265 119.486 27.3959 144.598 47.4924ZM70.6422 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5175 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8515 207.742 83.0977 205.066 70.6422 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1786 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.931 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.7589 110.203C59.234 110.839 57.7378 111.475 56.2699 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9103 147.193C67.822 135.23 63.7566 122.855 60.7589 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.8539 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.629 47.6015 67.6975 64.5954 70.0424 87.9446L70.0415 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8262 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.772 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.291 38.512C183.321 38.512 169.34 44.4991 154.443 56.0153C163.929 64.9374 172.634 74.6557 180.462 85.064C193.374 86.6345 206.129 89.3102 218.584 93.0624C218.813 91.4325 219.003 89.8118 219.166 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.551 64.3097C138.103 70.2614 132.055 76.6306 126.443 83.3765C132.389 82.995 138.427 82.8046 144.551 82.8046C150.727 82.8046 156.779 83.0143 162.707 83.3765C157.079 76.6293 151.015 70.2596 144.551 64.3097Z" fill="#FF40E0"/></g><mask id="mask1_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="102" y="84" width="161" height="162"><path d="M235.282 84.827L102.261 112.259L129.693 245.28L262.714 217.848L235.282 84.827Z" fill="white"/></mask><g mask="url(#mask1_0_3)"><path d="M136.863 129.916L213.258 141.224C220.669 142.322 222.495 152.179 215.967 155.856L187.592 171.843L184.135 204.227C183.339 211.678 173.564 213.901 169.624 207.526L129.021 141.831C125.503 136.14 130.245 128.936 136.863 129.916Z" fill="#FF40E0" stroke="#FF40E0" stroke-width="0.817337" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_0_3"><rect width="294" height="294" fill="white"/></clipPath></defs></svg>`;
1205
1215
  const logoDataUri = `data:image/svg+xml;base64,${btoa(logoSvg)}`;
1206
1216
  console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
1207
1217
  https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${logoDataUri}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`, "");
1208
- fetch("https://react-grab.com/api/version").then((res) => res.text()).catch(() => null);
1218
+ fetch("https://www.react-grab.com/api/version").then((res) => res.text()).catch(() => null);
1209
1219
  } catch {
1210
1220
  }
1211
1221
  };
@@ -1241,7 +1251,10 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
1241
1251
  let autoScrollAnimationId = null;
1242
1252
  const isRendererActive = solidJs.createMemo(() => isActivated() && !isCopying());
1243
1253
  const hasValidMousePosition = solidJs.createMemo(() => mouseX() > OFFSCREEN_POSITION && mouseY() > OFFSCREEN_POSITION);
1244
- const isTargetKeyCombination = (event) => (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c";
1254
+ const isTargetKeyCombination = (event) => (
1255
+ // NOTE: we use event.code instead of event.key for keyboard layout compatibility (e.g., AZERTY, QWERTZ)
1256
+ (event.metaKey || event.ctrlKey) && event.code === "KeyC"
1257
+ );
1245
1258
  const getAutoScrollDirection = (clientX, clientY) => {
1246
1259
  return {
1247
1260
  top: clientY < AUTO_SCROLL_EDGE_THRESHOLD_PX,
@@ -1326,12 +1339,26 @@ ${context}
1326
1339
  const createCombinedTextContent = (elements) => elements.map((element) => extractElementTextContent(element).trim()).filter((textContent) => textContent.length > 0).join("\n\n");
1327
1340
  const tryCopyWithFallback = async (elements, extraPrompt) => {
1328
1341
  let didCopy = false;
1342
+ const isReactProject = bippy.isInstrumentationActive();
1329
1343
  try {
1330
- const elementSnippetResults = await Promise.allSettled(elements.map(async (element) => `## HTML Frame:
1331
- ${getHTMLPreview(element)}
1344
+ const elementSnippetResults = await Promise.allSettled(elements.map(async (element) => {
1345
+ const htmlPreview = getHTMLPreview(element);
1346
+ if (!isReactProject) {
1347
+ return `## HTML Frame:
1348
+ ${htmlPreview}`;
1349
+ }
1350
+ const stack = await getStack(element);
1351
+ const formattedStack = formatStack(stack);
1352
+ if (formattedStack) {
1353
+ return `## HTML Frame:
1354
+ ${htmlPreview}
1332
1355
 
1333
1356
  ## Code Location:
1334
- ${formatStack(await getStack(element))}`));
1357
+ ${formattedStack}`;
1358
+ }
1359
+ return `## HTML Frame:
1360
+ ${htmlPreview}`;
1361
+ }));
1335
1362
  const elementSnippets = elementSnippetResults.map((result) => result.status === "fulfilled" ? result.value : "").filter((snippet) => snippet.trim());
1336
1363
  if (elementSnippets.length > 0) {
1337
1364
  const wrappedSnippets = elementSnippets.map((snippet) => wrapInSelectedElementTags(snippet)).join("\n\n");
@@ -1586,14 +1613,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
1586
1613
  const abortController = new AbortController();
1587
1614
  const eventListenerSignal = abortController.signal;
1588
1615
  window.addEventListener("keydown", (event) => {
1589
- if (event.key === "Escape" && isHoldingKeys()) {
1616
+ if (event.code === "Escape" && isHoldingKeys()) {
1590
1617
  if (isInputMode()) {
1591
1618
  return;
1592
1619
  }
1593
1620
  deactivateRenderer();
1594
1621
  return;
1595
1622
  }
1596
- if (event.key === "Enter" && isHoldingKeys() && !isInputMode()) {
1623
+ if (event.code === "Enter" && isHoldingKeys() && !isInputMode()) {
1597
1624
  setIsToggleMode(true);
1598
1625
  if (keydownSpamTimerId !== null) {
1599
1626
  window.clearTimeout(keydownSpamTimerId);
@@ -1637,7 +1664,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
1637
1664
  window.addEventListener("keyup", (event) => {
1638
1665
  if (!isHoldingKeys() && !isActivated()) return;
1639
1666
  const isReleasingModifier = !event.metaKey && !event.ctrlKey;
1640
- const isReleasingC = event.key.toLowerCase() === "c";
1667
+ const isReleasingC = event.code === "KeyC";
1641
1668
  if (isReleasingC || isReleasingModifier) {
1642
1669
  if (isToggleMode()) return;
1643
1670
  deactivateRenderer();
@@ -6,43 +6,45 @@ 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 oo=(e,t)=>e===t;var io=Symbol("solid-track"),lt={equals:oo},Nn=$n,fe=1,qe=2,In={owned:null,cleanups:null,context:null,owner:null};var _=null,b=null,je=null,M=null,q=null,ne=null,ut=0;function Me(e,t){let n=M,r=_,o=e.length===0,i=t===void 0?r:t,s=o?In:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=o?e:()=>e(()=>le(()=>_e(s)));_=s,M=null;try{return Ce(l,!0)}finally{M=n,_=r;}}function E(e,t){t=t?Object.assign({},lt,t):lt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Mn(n,o));return [Pn.bind(n),r]}function re(e,t,n){let r=Bt(e,t,false,fe);Ke(r);}function J(e,t,n){Nn=uo;let r=Bt(e,t,false,fe);(r.user=true),ne?ne.push(r):Ke(r);}function B(e,t,n){n=n?Object.assign({},lt,n):lt;let r=Bt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ke(r),Pn.bind(r)}function le(e){if(M===null)return e();let t=M;M=null;try{return je?je.untrack(e):e()}finally{M=t;}}function $e(e,t,n){let r=Array.isArray(e),o;return s=>{let l;if(r){l=Array(e.length);for(let c=0;c<e.length;c++)l[c]=e[c]();}else l=e();let a=le(()=>t(l,o,s));return o=l,a}}function Ln(e){J(()=>le(e));}function ce(e){return _===null||(_.cleanups===null?_.cleanups=[e]:_.cleanups.push(e)),e}E(false);function Pn(){let e=b;if(this.sources&&(this.state))if((this.state)===fe)Ke(this);else {let t=q;q=null,Ce(()=>ct(this),false),q=t;}if(M){let t=this.observers?this.observers.length:0;M.sources?(M.sources.push(this),M.sourceSlots.push(t)):(M.sources=[this],M.sourceSlots=[t]),this.observers?(this.observers.push(M),this.observerSlots.push(M.sources.length-1)):(this.observers=[M],this.observerSlots=[M.sources.length-1]);}return e&&b.sources.has(this)?this.tValue:this.value}function Mn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&Ce(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=b&&b.running;s&&b.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?q.push(i):ne.push(i),i.observers&&Dn(i)),s?i.tState=fe:i.state=fe);}if(q.length>1e6)throw q=[],new Error},false);}return t}function Ke(e){if(!e.fn)return;_e(e);let t=ut;kn(e,e.value,t);}function kn(e,t,n){let r,o=_,i=M;M=_=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=fe,e.owned&&e.owned.forEach(_e),e.owned=null)),e.updatedAt=n+1,jt(s)}finally{M=i,_=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Mn(e,r):e.value=r,e.updatedAt=n);}function Bt(e,t,n,r=fe,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:_,context:_?_.context:null,pure:n};if(_===null||_!==In&&(_.owned?_.owned.push(i):_.owned=[i]),je);return i}function We(e){let t=b;if((e.state)===0)return;if((e.state)===qe)return ct(e);if(e.suspense&&le(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ut);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===fe)Ke(e);else if((e.state)===qe){let o=q;q=null,Ce(()=>ct(e,n[0]),false),q=o;}}}function Ce(e,t){if(q)return e();let n=false;t||(q=[]),ne?n=true:ne=[],ut++;try{let r=e();return lo(n),r}catch(r){n||(ne=null),q=null,jt(r);}}function lo(e){if(q&&($n(q),q=null),e)return;let n=ne;ne=null,n.length&&Ce(()=>Nn(n),false);}function $n(e){for(let t=0;t<e.length;t++)We(e[t]);}function uo(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:We(r);}for(t=0;t<n;t++)We(e[t]);}function ct(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===fe?o!==t&&(!o.updatedAt||o.updatedAt<ut)&&We(o):i===qe&&ct(o,t);}}}function Dn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=qe,r.pure?q.push(r):ne.push(r),r.observers&&Dn(r));}}function _e(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--)_e(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)_e(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 fo(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function jt(e,t=_){let r=fo(e);throw r;}var mo=Symbol("fallback");function Fn(e){for(let t=0;t<e.length;t++)e[t]();}function go(e,t,n={}){let r=[],o=[],i=[],s=0,l=t.length>1?[]:null;return ce(()=>Fn(i)),()=>{let a=e()||[],c=a.length,m,d;return a[io],le(()=>{let g,p,S,A,W,Y,z,U,Z;if(c===0)s!==0&&(Fn(i),i=[],r=[],o=[],s=0,l&&(l=[])),n.fallback&&(r=[mo],o[0]=Me(he=>(i[0]=he,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=a[d],o[d]=Me(x);s=c;}else {for(S=new Array(c),A=new Array(c),l&&(W=new Array(c)),Y=0,z=Math.min(s,c);Y<z&&r[Y]===a[Y];Y++);for(z=s-1,U=c-1;z>=Y&&U>=Y&&r[z]===a[U];z--,U--)S[U]=o[z],A[U]=i[z],l&&(W[U]=l[z]);for(g=new Map,p=new Array(U+1),d=U;d>=Y;d--)Z=a[d],m=g.get(Z),p[d]=m===void 0?-1:m,g.set(Z,d);for(m=Y;m<=z;m++)Z=r[m],d=g.get(Z),d!==void 0&&d!==-1?(S[d]=o[m],A[d]=i[m],l&&(W[d]=l[m]),d=p[d],g.set(Z,d)):i[m]();for(d=Y;d<c;d++)d in S?(o[d]=S[d],i[d]=A[d],l&&(l[d]=W[d],l[d](d))):o[d]=Me(x);o=o.slice(0,s=c),r=a.slice(0);}return o});function x(g){if(i[d]=g,l){let[p,S]=E(d);return l[d]=S,t(a[d],p)}return t(a[d])}}}function R(e,t){return le(()=>e(t||{}))}var ho=e=>`Stale read from <${e}>.`;function ft(e){let t="fallback"in e&&{fallback:()=>e.fallback};return B(go(()=>e.each,e.children,t||void 0))}function V(e){let t=e.keyed,n=B(()=>e.when,void 0,void 0),r=t?n:B(n,void 0,{equals:(o,i)=>!o==!i});return B(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?le(()=>i(t?o:()=>{if(!le(r))throw ho("Show");return n()})):i}return e.fallback},void 0,void 0)}var xe=e=>B(()=>e());function wo(e,t,n){let r=n.length,o=t.length,i=r,s=0,l=0,a=t[o-1].nextSibling,c=null;for(;s<o||l<i;){if(t[s]===n[l]){s++,l++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let m=i<r?l?n[l-1].nextSibling:n[i-l]:a;for(;l<i;)e.insertBefore(n[l++],m);}else if(i===l)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[l]===t[o-1]){let m=t[--o].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--i],m),t[o]=n[i];}else {if(!c){c=new Map;let d=l;for(;d<i;)c.set(n[d],d++);}let m=c.get(t[s]);if(m!=null)if(l<m&&m<i){let d=s,x=1,g;for(;++d<o&&d<i&&!((g=c.get(t[d]))==null||g!==m+x);)x++;if(x>m-l){let p=t[s];for(;l<m;)e.insertBefore(n[l++],p);}else e.replaceChild(n[l++],t[s++]);}else s++;else t[s++].remove();}}}var Bn="_$DX_DELEGATE";function Vn(e,t,n,r={}){let o;return Me(i=>{o=i,t===document?e():me(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function ee(e,t,n,r){let o,i=()=>{let l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function Un(e,t=window.document){let n=t[Bn]||(t[Bn]=new Set);for(let r=0,o=e.length;r<o;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,xo));}}function Co(e,t,n){(e.removeAttribute(t));}function mt(e,t,n){if(!t)return n?Co(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 de(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Se(e,t,n){return le(()=>e(t,n))}function me(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return dt(e,t,r,n);re(o=>dt(e,t(),o,n),r);}function xo(e){let t=e.target,n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=a=>Object.defineProperty(e,"target",{configurable:true,value:a}),s=()=>{let a=t[n];if(a&&!t.disabled){let c=t[`${n}Data`];if(c!==void 0?a.call(t,c,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),true},l=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return t||document}}),e.composedPath){let a=e.composedPath();i(a[0]);for(let c=0;c<a.length-2&&(t=a[c],!!s());c++){if(t._$host){t=t._$host,l();break}if(t.parentNode===o)break}}else l();i(r);}function dt(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,l=r!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(l){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=Ve(e,n,r,a);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=Ve(e,n,r);}else {if(s==="function")return re(()=>{let a=t();for(;typeof a=="function";)a=a();n=dt(e,a,n,r);}),()=>n;if(Array.isArray(t)){let a=[],c=n&&Array.isArray(n);if(Vt(a,t,n,o))return re(()=>n=dt(e,a,n,r,true)),()=>n;if(a.length===0){if(n=Ve(e,n,r),l)return n}else c?n.length===0?jn(e,a,r):wo(e,n,a):(n&&Ve(e),jn(e,a));n=a;}else if(t.nodeType){if(Array.isArray(n)){if(l)return n=Ve(e,n,r,t);Ve(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Vt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let l=t[i],a=n&&n[e.length],c;if(!(l==null||l===true||l===false))if((c=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))o=Vt(e,l,a)||o;else if(c==="function")if(r){for(;typeof l=="function";)l=l();o=Vt(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||o;}else e.push(l),o=true;else {let m=String(l);a&&a.nodeType===3&&a.data===m?e.push(a):e.push(document.createTextNode(m));}}return o}function jn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Ve(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 l=t[s];if(o!==l){let a=l.parentNode===e;!i&&!s?a?e.replaceChild(o,l):e.insertBefore(o,n):a&&l.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var So=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],To=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),vo=e=>Array.isArray(e),Eo=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&To(r)&&n){let l=e.composedPath()[0];l instanceof HTMLElement&&(o=l.tagName,i=l.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return vo(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},Yn=e=>Eo(e,So);var Ue="data-react-grab",zn=()=>{let e=document.querySelector(`[${Ue}]`);if(e){let i=e.shadowRoot?.querySelector(`[${Ue}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(Ue,"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(Ue,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Ae=(e,t,n)=>e+(t-e)*n;var _o=ee("<div>"),gt=e=>{let[t,n]=E(e.bounds.x),[r,o]=E(e.bounds.y),[i,s]=E(e.bounds.width),[l,a]=E(e.bounds.height),[c,m]=E(1),d=false,x=null,g=null,p=e.bounds,S=false,A=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,W=()=>{if(S)return;S=true;let U=()=>{let Z=Ae(t(),p.x,A()),he=Ae(r(),p.y,A()),Fe=Ae(i(),p.width,A()),ve=Ae(l(),p.height,A());n(Z),o(he),s(Fe),a(ve),Math.abs(Z-p.x)<.5&&Math.abs(he-p.y)<.5&&Math.abs(Fe-p.width)<.5&&Math.abs(ve-p.height)<.5?(x=null,S=false):x=requestAnimationFrame(U);};x=requestAnimationFrame(U);};J($e(()=>e.bounds,U=>{if(p=U,!d){n(p.x),o(p.y),s(p.width),a(p.height),d=true;return}W();})),J(()=>{e.variant==="grabbed"&&e.createdAt&&(g=window.setTimeout(()=>{m(0);},1500));}),ce(()=>{x!==null&&(cancelAnimationFrame(x),x=null),g!==null&&(window.clearTimeout(g),g=null),S=false;});let Y={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":e.variant==="grabbed"?"2147483645":"2147483646"},z=()=>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(V,{get when(){return e.visible!==false},get children(){var U=_o();return re(Z=>mt(U,{...Y,...z(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${l()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},Z)),U}})};var Ao=ee('<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">'),Xn=e=>{let t;return Ln(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=Ao(),r=t;return typeof r=="function"?Se(r,n):t=n,re(o=>mt(n,{...e.style},o)),n})()};var pt=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,l=8,a=o-n-8,c=i-r-8,m=Math.max(s,Math.min(e,a)),d=Math.max(l,Math.min(t,c));return {left:m,top:d}};var Ge=e=>{let t=e.lerpFactor??.3,n=e.convergenceThreshold??.5,[r,o]=E(e.x()),[i,s]=E(e.y()),l=e.x(),a=e.y(),c=null,m=false,d=()=>{let g=Ae(r(),l,t),p=Ae(i(),a,t);o(g),s(p),Math.abs(g-l)<n&&Math.abs(p-a)<n?c=null:c=requestAnimationFrame(d);},x=()=>{c===null&&(c=requestAnimationFrame(d));};return J(()=>{if(l=e.x(),a=e.y(),!m){o(l),s(a),m=true;return}x();}),ce(()=>{c!==null&&(cancelAnimationFrame(c),c=null);}),{x:r,y:i}};var qn=e=>{let[t,n]=E(0);return J($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);ce(()=>clearTimeout(o));}})),t};var ht=(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 ko=ee('<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">'),Oo=ee("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),Fo=ee("<div style=margin-right:4px>Copied"),No=ee(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`),Io=ee("<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>"),Lo=ee("<div style=margin-left:4px>to clipboard"),Po=ee("<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select"),Mo=ee(`<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>`),Gt=e=>{let t,n=Ge({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),r=qn({visible:e.visible,autoFadeOutAfter:e.variant==="success"?1700:void 0}),o=()=>t?.getBoundingClientRect(),i=()=>{let l=o();if(!l)return {left:n.x(),top:n.y()};let a=window.innerWidth,c=window.innerHeight,m=ht(n.x(),n.y(),l.width,l.height,14);for(let x of m){let g=x.left>=8&&x.left+l.width<=a-8,p=x.top>=8&&x.top+l.height<=c-8;if(g&&p)return x}let d=pt(m[0].left,m[0].top,l.width,l.height);return d.left+=4,d.top+=4,d},s=()=>{let a=e.text.indexOf(" in ");return a===-1?{primary:e.text,secondary:""}:{primary:e.text.slice(0,a),secondary:e.text.slice(a)}};return R(V,{get when(){return e.visible!==false},get children(){var l=Mo(),a=l.firstChild,c=a.firstChild,m=t;return typeof m=="function"?Se(m,l):t=l,me(l,R(V,{get when(){return xe(()=>e.variant==="processing")()&&e.progress!==void 0},get children(){var d=ko();return re(x=>de(d,"width",`${Math.min(100,Math.max(0,(e.progress??0)*100))}%`)),d}}),a),me(c,R(V,{get when(){return e.variant==="processing"},get children(){return R(Xn,{})}}),null),me(c,R(V,{get when(){return e.variant==="success"},get children(){return Oo()}}),null),me(c,R(V,{get when(){return e.variant==="success"},get children(){return Fo()}}),null),me(c,R(V,{get when(){return e.variant==="processing"},children:"Please wait\u2026"}),null),me(c,R(V,{get when(){return e.variant!=="processing"},get children(){return [(()=>{var d=No();return me(d,()=>s().primary),d})(),R(V,{get when(){return xe(()=>e.variant==="hover")()&&s().secondary!==""},get children(){var d=Io();return me(d,()=>s().secondary),d}})]}}),null),me(c,R(V,{get when(){return e.variant==="success"},get children(){return Lo()}}),null),me(a,R(V,{get when(){return xe(()=>e.variant==="hover")()&&e.showHint},get children(){return Po()}}),null),re(d=>{var x=`${i().top}px`,g=`${i().left}px`,p=e.zIndex?.toString()??"2147483647",S=r();return x!==d.e&&de(l,"top",d.e=x),g!==d.t&&de(l,"left",d.t=g),p!==d.a&&de(l,"z-index",d.a=p),S!==d.o&&de(l,"opacity",d.o=S),d},{e:void 0,t:void 0,a:void 0,o:void 0}),l}})};var $o=ee("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),Wn=e=>{let t,n=null,r=0,o=0,i=1,s=Ge({x:()=>e.mouseX,y:()=>e.mouseY,lerpFactor:.3}),l=()=>{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));},a=()=>{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 J(()=>{l(),a();let c=()=>{l(),a();};window.addEventListener("resize",c),ce(()=>{window.removeEventListener("resize",c);});}),J(()=>{s.x(),s.y(),a();}),R(V,{get when(){return e.visible!==false},get children(){var c=$o(),m=t;return typeof m=="function"?Se(m,c):t=c,c}})};var Do=ee(`<div data-react-grab-input 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;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 3px;display:flex;flex-direction:column;gap:2px"><textarea placeholder="e.g., Make this button larger"rows=1 style="width:240px;padding:2px 4px;background-color:#ffffff;color:#b21c8e;border:1px solid #f7c5ec;border-radius:3px;font-size:11px;line-height:1.2;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;outline:none;resize:vertical;min-height:18px"></textarea><div style=font-size:9px;opacity:0.6;text-align:center>Enter \u23CE to submit, Escape to cancel`),Zn=e=>{let t,n,r=Ge({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),o=()=>t?.getBoundingClientRect(),i=()=>{let a=o();if(!a)return {left:r.x(),top:r.y()};let c=window.innerWidth,m=window.innerHeight,d=ht(r.x(),r.y(),a.width,a.height,14);for(let g of d){let p=g.left>=8&&g.left+a.width<=c-8,S=g.top>=8&&g.top+a.height<=m-8;if(p&&S)return g}let x=pt(d[0].left,d[0].top,a.width,a.height);return x.left+=4,x.top+=4,x},s=a=>{a.key==="Enter"&&!a.shiftKey?(a.preventDefault(),a.stopPropagation(),e.onSubmit()):a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),e.onCancel());},l=a=>{let c=a.target;e.onInput(c.value);};return J(()=>{e.visible&&n?n.focus():!e.visible&&n&&n.blur();}),(()=>{var a=Do(),c=a.firstChild,m=c.firstChild;m.nextSibling;var x=t;typeof x=="function"?Se(x,a):t=a,m.$$keydown=s,m.$$input=l;var g=n;return typeof g=="function"?Se(g,m):n=m,re(p=>{var S=e.visible?"block":"none",A=`${i().top}px`,W=`${i().left}px`,Y=e.zIndex?.toString()??"2147483647",z=e.visible?"auto":"none";return S!==p.e&&de(a,"display",p.e=S),A!==p.t&&de(a,"top",p.t=A),W!==p.a&&de(a,"left",p.a=W),Y!==p.o&&de(a,"z-index",p.o=Y),z!==p.i&&de(a,"pointer-events",p.i=z),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),re(()=>m.value=e.value),a})()};Un(["input","keydown"]);var Kn=e=>[R(V,{get when(){return xe(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return R(gt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),R(V,{get when(){return xe(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return R(Wn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),R(V,{get when(){return xe(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return R(gt,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),R(ft,{get each(){return e.grabbedBoxes??[]},children:t=>R(gt,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),R(V,{get when(){return e.labelVariant!=="processing"},get children(){return R(ft,{get each(){return e.successLabels??[]},children:t=>R(Gt,{variant:"success",get text(){return t.text},get x(){return e.mouseX??0},get y(){return e.mouseY??0}})})}}),R(V,{get when(){return xe(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return R(Gt,{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}})}}),R(Zn,{get x(){return e.inputX??0},get y(){return e.inputY??0},get zIndex(){return e.labelZIndex},get value(){return e.inputValue??""},get visible(){return e.inputVisible??false},get onInput(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get onCancel(){return e.onInputCancel}})];var er="0.5.16",xt=`bippy-${er}`,Qn=Object.defineProperty,Ho=Object.prototype.hasOwnProperty,Je=()=>{},tr=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{}},Yt=(e=ke())=>"getFiberRoots"in e,nr=false,Jn,wt=(e=ke())=>nr?true:(typeof e.inject=="function"&&(Jn=e.inject.toString()),!!Jn?.includes("(injected)")),yt=new Set,De=new Set,rr=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:xt,checkDCE:tr,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),De.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,yt.forEach(s=>s())),i},on:Je,onCommitFiberRoot:Je,onCommitFiberUnmount:Je,onPostCommitFiberRoot:Je,renderers:t,supportsFiber:true,supportsFlight:true};try{Qn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let l=r.renderers;r=s,l.size>0&&(l.forEach((a,c)=>{De.add(a),s.renderers.set(c,a);}),Ct(e));}}});let o=window.hasOwnProperty,i=!1;Qn(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{Ct(e);}return r},Ct=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=tr,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=xt,t._instrumentationIsActive=!1;let n=Yt(t);if(n||(t.on=Je),t.renderers.size){t._instrumentationIsActive=!0,yt.forEach(i=>i());return}let r=t.inject,o=wt(t);o&&!n&&(nr=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return De.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,yt.forEach(l=>l()),s};}(t.renderers.size||t._instrumentationIsActive||wt())&&e?.();}catch{}},zt=()=>Ho.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),ke=e=>zt()?(Ct(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):rr(e),or=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Xt=()=>{try{or()&&ke();}catch{}};Xt();var St=0,Tt=1;var vt=5;var Et=11,qt=13,ir=14,Rt=15,Wt=16;var Zt=19;var _t=26,At=27,Kt=28,Qt=30;var kt=e=>{switch(e.tag){case vt:case _t:case At:return true;default:return typeof e.type=="string"}},Ot=e=>{switch(e.tag){case Tt:case Et:case St:case ir:case Rt:return true;default:return false}},Jt=e=>!e||typeof e!="object"?true:"pendingProps"in e&&!("containerInfo"in e);function Ye(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 tn(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=en(o,t,n);if(i)return i;o=n?null:o.sibling;}return null}var en=(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=en(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},tn=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 tn(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var nn=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?nn(t.type||t.render):null},He=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=nn(t);return r&&(r.displayName||r.name)||null};var Ft=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 sr){let r=Ye(n.current,o=>{if(o===e)return true});if(r)return r}return e};var et=e=>{let t=ke();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},sr=new Set;var qo=Object.create,gr=Object.defineProperty,Wo=Object.getOwnPropertyDescriptor,Zo=Object.getOwnPropertyNames,Ko=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty,Jo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ei=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Zo(t),i=0,s=o.length,l;i<s;i++)l=o[i],!Qo.call(e,l)&&l!==n&&gr(e,l,{get:(a=>t[a]).bind(null,l),enumerable:!(r=Wo(t,l))||r.enumerable});return e},ti=(e,t,n)=>(n=e==null?{}:qo(Ko(e)),ei(gr(n,"default",{value:e,enumerable:true}),e)),ni=()=>{let e=ke();for(let t of [...Array.from(De),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},ar=e=>{for(let t of De){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Te=e=>`
10
- in ${e}`,ri=(e,t)=>{let n=Te(e);return t&&(n+=` (at ${t})`),n},rn=false,on=(e,t)=>{if(!e||rn)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,rn=true;let r=ni();ar(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let a={DetermineComponentFrameRoot(){let x;try{if(t){let g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[]);}catch(p){x=p;}Reflect.construct(e,[],g);}else {try{g.call();}catch(p){x=p;}e.call(g.prototype);}}else {try{throw Error()}catch(p){x=p;}let g=e();g&&typeof g.catch=="function"&&g.catch(()=>{});}}catch(g){if(g instanceof Error&&x instanceof Error&&typeof g.stack=="string")return [g.stack,x.stack]}return [null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[m,d]=a.DetermineComponentFrameRoot();if(m&&d){let x=m.split(`
9
+ var ao=(e,t)=>e===t;var lo=Symbol("solid-track"),ut={equals:ao},Ln=Bn,me=1,We=2,Mn={owned:null,cleanups:null,context:null,owner:null};var _=null,b=null,je=null,L=null,q=null,ne=null,dt=0;function Me(e,t){let n=L,r=_,o=e.length===0,i=t===void 0?r:t,s=o?Mn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=o?e:()=>e(()=>ue(()=>Ae(s)));_=s,L=null;try{return Se(l,!0)}finally{L=n,_=r;}}function E(e,t){t=t?Object.assign({},ut,t):ut;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Hn(n,o));return [Dn.bind(n),r]}function re(e,t,n){let r=Ut(e,t,false,me);Qe(r);}function J(e,t,n){Ln=go;let r=Ut(e,t,false,me);(r.user=true),ne?ne.push(r):Qe(r);}function D(e,t,n){n=n?Object.assign({},ut,n):ut;let r=Ut(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Qe(r),Dn.bind(r)}function ue(e){if(L===null)return e();let t=L;L=null;try{return je?je.untrack(e):e()}finally{L=t;}}function $e(e,t,n){let r=Array.isArray(e),o;return s=>{let l;if(r){l=Array(e.length);for(let c=0;c<e.length;c++)l[c]=e[c]();}else l=e();let a=ue(()=>t(l,o,s));return o=l,a}}function $n(e){J(()=>ue(e));}function fe(e){return _===null||(_.cleanups===null?_.cleanups=[e]:_.cleanups.push(e)),e}E(false);function Dn(){let e=b;if(this.sources&&(this.state))if((this.state)===me)Qe(this);else {let t=q;q=null,Se(()=>ft(this),false),q=t;}if(L){let t=this.observers?this.observers.length:0;L.sources?(L.sources.push(this),L.sourceSlots.push(t)):(L.sources=[this],L.sourceSlots=[t]),this.observers?(this.observers.push(L),this.observerSlots.push(L.sources.length-1)):(this.observers=[L],this.observerSlots=[L.sources.length-1]);}return e&&b.sources.has(this)?this.tValue:this.value}function Hn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&Se(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=b&&b.running;s&&b.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?q.push(i):ne.push(i),i.observers&&jn(i)),s?i.tState=me:i.state=me);}if(q.length>1e6)throw q=[],new Error},false);}return t}function Qe(e){if(!e.fn)return;Ae(e);let t=dt;In(e,e.value,t);}function In(e,t,n){let r,o=_,i=L;L=_=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=me,e.owned&&e.owned.forEach(Ae),e.owned=null)),e.updatedAt=n+1,Gt(s)}finally{L=i,_=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Hn(e,r):e.value=r,e.updatedAt=n);}function Ut(e,t,n,r=me,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:_,context:_?_.context:null,pure:n};if(_===null||_!==Mn&&(_.owned?_.owned.push(i):_.owned=[i]),je);return i}function Ze(e){let t=b;if((e.state)===0)return;if((e.state)===We)return ft(e);if(e.suspense&&ue(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<dt);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===me)Qe(e);else if((e.state)===We){let o=q;q=null,Se(()=>ft(e,n[0]),false),q=o;}}}function Se(e,t){if(q)return e();let n=false;t||(q=[]),ne?n=true:ne=[],dt++;try{let r=e();return fo(n),r}catch(r){n||(ne=null),q=null,Gt(r);}}function fo(e){if(q&&(Bn(q),q=null),e)return;let n=ne;ne=null,n.length&&Se(()=>Ln(n),false);}function Bn(e){for(let t=0;t<e.length;t++)Ze(e[t]);}function go(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Ze(r);}for(t=0;t<n;t++)Ze(e[t]);}function ft(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===me?o!==t&&(!o.updatedAt||o.updatedAt<dt)&&Ze(o):i===We&&ft(o,t);}}}function jn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=We,r.pure?q.push(r):ne.push(r),r.observers&&jn(r));}}function Ae(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--)Ae(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ae(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 po(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Gt(e,t=_){let r=po(e);throw r;}var ho=Symbol("fallback");function Pn(e){for(let t=0;t<e.length;t++)e[t]();}function bo(e,t,n={}){let r=[],o=[],i=[],s=0,l=t.length>1?[]:null;return fe(()=>Pn(i)),()=>{let a=e()||[],c=a.length,m,d;return a[lo],ue(()=>{let g,p,S,A,W,G,Y,V,Z;if(c===0)s!==0&&(Pn(i),i=[],r=[],o=[],s=0,l&&(l=[])),n.fallback&&(r=[ho],o[0]=Me(ye=>(i[0]=ye,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=a[d],o[d]=Me(x);s=c;}else {for(S=new Array(c),A=new Array(c),l&&(W=new Array(c)),G=0,Y=Math.min(s,c);G<Y&&r[G]===a[G];G++);for(Y=s-1,V=c-1;Y>=G&&V>=G&&r[Y]===a[V];Y--,V--)S[V]=o[Y],A[V]=i[Y],l&&(W[V]=l[Y]);for(g=new Map,p=new Array(V+1),d=V;d>=G;d--)Z=a[d],m=g.get(Z),p[d]=m===void 0?-1:m,g.set(Z,d);for(m=G;m<=Y;m++)Z=r[m],d=g.get(Z),d!==void 0&&d!==-1?(S[d]=o[m],A[d]=i[m],l&&(W[d]=l[m]),d=p[d],g.set(Z,d)):i[m]();for(d=G;d<c;d++)d in S?(o[d]=S[d],i[d]=A[d],l&&(l[d]=W[d],l[d](d))):o[d]=Me(x);o=o.slice(0,s=c),r=a.slice(0);}return o});function x(g){if(i[d]=g,l){let[p,S]=E(d);return l[d]=S,t(a[d],p)}return t(a[d])}}}function R(e,t){return ue(()=>e(t||{}))}var wo=e=>`Stale read from <${e}>.`;function mt(e){let t="fallback"in e&&{fallback:()=>e.fallback};return D(bo(()=>e.each,e.children,t||void 0))}function j(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?ue(()=>i(t?o:()=>{if(!ue(r))throw wo("Show");return n()})):i}return e.fallback},void 0,void 0)}var Te=e=>D(()=>e());function So(e,t,n){let r=n.length,o=t.length,i=r,s=0,l=0,a=t[o-1].nextSibling,c=null;for(;s<o||l<i;){if(t[s]===n[l]){s++,l++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let m=i<r?l?n[l-1].nextSibling:n[i-l]:a;for(;l<i;)e.insertBefore(n[l++],m);}else if(i===l)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[l]===t[o-1]){let m=t[--o].nextSibling;e.insertBefore(n[l++],t[s++].nextSibling),e.insertBefore(n[--i],m),t[o]=n[i];}else {if(!c){c=new Map;let d=l;for(;d<i;)c.set(n[d],d++);}let m=c.get(t[s]);if(m!=null)if(l<m&&m<i){let d=s,x=1,g;for(;++d<o&&d<i&&!((g=c.get(t[d]))==null||g!==m+x);)x++;if(x>m-l){let p=t[s];for(;l<m;)e.insertBefore(n[l++],p);}else e.replaceChild(n[l++],t[s++]);}else s++;else t[s++].remove();}}}var Un="_$DX_DELEGATE";function Yn(e,t,n,r={}){let o;return Me(i=>{o=i,t===document?e():pe(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function ee(e,t,n,r){let o,i=()=>{let l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function zn(e,t=window.document){let n=t[Un]||(t[Un]=new Set);for(let r=0,o=e.length;r<o;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,vo));}}function To(e,t,n){(e.removeAttribute(t));}function pt(e,t,n){if(!t)return n?To(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 ge(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function ve(e,t,n){return ue(()=>e(t,n))}function pe(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return gt(e,t,r,n);re(o=>gt(e,t(),o,n),r);}function vo(e){let t=e.target,n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=a=>Object.defineProperty(e,"target",{configurable:true,value:a}),s=()=>{let a=t[n];if(a&&!t.disabled){let c=t[`${n}Data`];if(c!==void 0?a.call(t,c,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),true},l=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return t||document}}),e.composedPath){let a=e.composedPath();i(a[0]);for(let c=0;c<a.length-2&&(t=a[c],!!s());c++){if(t._$host){t=t._$host,l();break}if(t.parentNode===o)break}}else l();i(r);}function gt(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,l=r!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(l){let a=n[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),n=Ve(e,n,r,a);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=Ve(e,n,r);}else {if(s==="function")return re(()=>{let a=t();for(;typeof a=="function";)a=a();n=gt(e,a,n,r);}),()=>n;if(Array.isArray(t)){let a=[],c=n&&Array.isArray(n);if(Yt(a,t,n,o))return re(()=>n=gt(e,a,n,r,true)),()=>n;if(a.length===0){if(n=Ve(e,n,r),l)return n}else c?n.length===0?Gn(e,a,r):So(e,n,a):(n&&Ve(e),Gn(e,a));n=a;}else if(t.nodeType){if(Array.isArray(n)){if(l)return n=Ve(e,n,r,t);Ve(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Yt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let l=t[i],a=n&&n[e.length],c;if(!(l==null||l===true||l===false))if((c=typeof l)=="object"&&l.nodeType)e.push(l);else if(Array.isArray(l))o=Yt(e,l,a)||o;else if(c==="function")if(r){for(;typeof l=="function";)l=l();o=Yt(e,Array.isArray(l)?l:[l],Array.isArray(a)?a:[a])||o;}else e.push(l),o=true;else {let m=String(l);a&&a.nodeType===3&&a.data===m?e.push(a):e.push(document.createTextNode(m));}}return o}function Gn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Ve(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 l=t[s];if(o!==l){let a=l.parentNode===e;!i&&!s?a?e.replaceChild(o,l):e.insertBefore(o,n):a&&l.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var Eo=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],Ro=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),_o=e=>Array.isArray(e),Ao=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&Ro(r)&&n){let l=e.composedPath()[0];l instanceof HTMLElement&&(o=l.tagName,i=l.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return _o(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},qn=e=>Ao(e,Eo);var Ue="data-react-grab",Wn=()=>{let e=document.querySelector(`[${Ue}]`);if(e){let i=e.shadowRoot?.querySelector(`[${Ue}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(Ue,"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(Ue,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var ke=(e,t,n)=>e+(t-e)*n;var Oo=ee("<div>"),ht=e=>{let[t,n]=E(e.bounds.x),[r,o]=E(e.bounds.y),[i,s]=E(e.bounds.width),[l,a]=E(e.bounds.height),[c,m]=E(1),d=false,x=null,g=null,p=e.bounds,S=false,A=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,W=()=>{if(S)return;S=true;let V=()=>{let Z=ke(t(),p.x,A()),ye=ke(r(),p.y,A()),Fe=ke(i(),p.width,A()),_e=ke(l(),p.height,A());n(Z),o(ye),s(Fe),a(_e),Math.abs(Z-p.x)<.5&&Math.abs(ye-p.y)<.5&&Math.abs(Fe-p.width)<.5&&Math.abs(_e-p.height)<.5?(x=null,S=false):x=requestAnimationFrame(V);};x=requestAnimationFrame(V);};J($e(()=>e.bounds,V=>{if(p=V,!d){n(p.x),o(p.y),s(p.width),a(p.height),d=true;return}W();})),J(()=>{e.variant==="grabbed"&&e.createdAt&&(g=window.setTimeout(()=>{m(0);},1500));}),fe(()=>{x!==null&&(cancelAnimationFrame(x),x=null),g!==null&&(window.clearTimeout(g),g=null),S=false;});let G={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":e.variant==="grabbed"?"2147483645":"2147483646"},Y=()=>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(j,{get when(){return e.visible!==false},get children(){var V=Oo();return re(Z=>pt(V,{...G,...Y(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${l()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},Z)),V}})};var Fo=ee('<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">'),Zn=e=>{let t;return $n(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=Fo(),r=t;return typeof r=="function"?ve(r,n):t=n,re(o=>pt(n,{...e.style},o)),n})()};var bt=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,l=8,a=o-n-8,c=i-r-8,m=Math.max(s,Math.min(e,a)),d=Math.max(l,Math.min(t,c));return {left:m,top:d}};var Ge=e=>{let t=e.lerpFactor??.3,n=e.convergenceThreshold??.5,[r,o]=E(e.x()),[i,s]=E(e.y()),l=e.x(),a=e.y(),c=null,m=false,d=()=>{let g=ke(r(),l,t),p=ke(i(),a,t);o(g),s(p),Math.abs(g-l)<n&&Math.abs(p-a)<n?c=null:c=requestAnimationFrame(d);},x=()=>{c===null&&(c=requestAnimationFrame(d));};return J(()=>{if(l=e.x(),a=e.y(),!m){o(l),s(a),m=true;return}x();}),fe(()=>{c!==null&&(cancelAnimationFrame(c),c=null);}),{x:r,y:i}};var Kn=e=>{let[t,n]=E(0);return J($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);fe(()=>clearTimeout(o));}})),t};var yt=(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 Io=ee('<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">'),No=ee("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),Po=ee("<div style=margin-right:4px>Copied"),Lo=ee(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`),Mo=ee("<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>"),$o=ee("<div style=margin-left:4px>to clipboard"),Do=ee("<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select"),Ho=ee(`<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>`),Xt=e=>{let t,n=Ge({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),r=Kn({visible:e.visible,autoFadeOutAfter:e.variant==="success"?1700:void 0}),o=()=>t?.getBoundingClientRect(),i=()=>{let l=o();if(!l)return {left:n.x(),top:n.y()};let a=window.innerWidth,c=window.innerHeight,m=yt(n.x(),n.y(),l.width,l.height,14);for(let x of m){let g=x.left>=8&&x.left+l.width<=a-8,p=x.top>=8&&x.top+l.height<=c-8;if(g&&p)return x}let d=bt(m[0].left,m[0].top,l.width,l.height);return d.left+=4,d.top+=4,d},s=()=>{let a=e.text.indexOf(" in ");return a===-1?{primary:e.text,secondary:""}:{primary:e.text.slice(0,a),secondary:e.text.slice(a)}};return R(j,{get when(){return e.visible!==false},get children(){var l=Ho(),a=l.firstChild,c=a.firstChild,m=t;return typeof m=="function"?ve(m,l):t=l,pe(l,R(j,{get when(){return Te(()=>e.variant==="processing")()&&e.progress!==void 0},get children(){var d=Io();return re(x=>ge(d,"width",`${Math.min(100,Math.max(0,(e.progress??0)*100))}%`)),d}}),a),pe(c,R(j,{get when(){return e.variant==="processing"},get children(){return R(Zn,{})}}),null),pe(c,R(j,{get when(){return e.variant==="success"},get children(){return No()}}),null),pe(c,R(j,{get when(){return e.variant==="success"},get children(){return Po()}}),null),pe(c,R(j,{get when(){return e.variant==="processing"},children:"Please wait\u2026"}),null),pe(c,R(j,{get when(){return e.variant!=="processing"},get children(){return [(()=>{var d=Lo();return pe(d,()=>s().primary),d})(),R(j,{get when(){return Te(()=>e.variant==="hover")()&&s().secondary!==""},get children(){var d=Mo();return pe(d,()=>s().secondary),d}})]}}),null),pe(c,R(j,{get when(){return e.variant==="success"},get children(){return $o()}}),null),pe(a,R(j,{get when(){return Te(()=>e.variant==="hover")()&&e.showHint},get children(){return Do()}}),null),re(d=>{var x=`${i().top}px`,g=`${i().left}px`,p=e.zIndex?.toString()??"2147483647",S=r();return x!==d.e&&ge(l,"top",d.e=x),g!==d.t&&ge(l,"left",d.t=g),p!==d.a&&ge(l,"z-index",d.a=p),S!==d.o&&ge(l,"opacity",d.o=S),d},{e:void 0,t:void 0,a:void 0,o:void 0}),l}})};var Bo=ee("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),Qn=e=>{let t,n=null,r=0,o=0,i=1,s=Ge({x:()=>e.mouseX,y:()=>e.mouseY,lerpFactor:.3}),l=()=>{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));},a=()=>{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 J(()=>{l(),a();let c=()=>{l(),a();};window.addEventListener("resize",c),fe(()=>{window.removeEventListener("resize",c);});}),J(()=>{s.x(),s.y(),a();}),R(j,{get when(){return e.visible!==false},get children(){var c=Bo(),m=t;return typeof m=="function"?ve(m,c):t=c,c}})};var jo=ee(`<div data-react-grab-input 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;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 3px;display:flex;flex-direction:column;gap:2px"><textarea placeholder="e.g., Make this button larger"rows=1 style="width:240px;padding:2px 4px;background-color:#ffffff;color:#b21c8e;border:1px solid #f7c5ec;border-radius:3px;font-size:11px;line-height:1.2;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;outline:none;resize:vertical;min-height:18px"></textarea><div style=font-size:9px;opacity:0.6;text-align:center>Enter \u23CE to submit, Escape to cancel`),Jn=e=>{let t,n,r=Ge({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),o=()=>t?.getBoundingClientRect(),i=()=>{let a=o();if(!a)return {left:r.x(),top:r.y()};let c=window.innerWidth,m=window.innerHeight,d=yt(r.x(),r.y(),a.width,a.height,14);for(let g of d){let p=g.left>=8&&g.left+a.width<=c-8,S=g.top>=8&&g.top+a.height<=m-8;if(p&&S)return g}let x=bt(d[0].left,d[0].top,a.width,a.height);return x.left+=4,x.top+=4,x},s=a=>{a.code==="Enter"&&!a.shiftKey?(a.preventDefault(),a.stopPropagation(),e.onSubmit()):a.code==="Escape"&&(a.preventDefault(),a.stopPropagation(),e.onCancel());},l=a=>{let c=a.target;e.onInput(c.value);};return J(()=>{e.visible&&n?n.focus():!e.visible&&n&&n.blur();}),(()=>{var a=jo(),c=a.firstChild,m=c.firstChild;m.nextSibling;var x=t;typeof x=="function"?ve(x,a):t=a,m.$$keydown=s,m.$$input=l;var g=n;return typeof g=="function"?ve(g,m):n=m,re(p=>{var S=e.visible?"block":"none",A=`${i().top}px`,W=`${i().left}px`,G=e.zIndex?.toString()??"2147483647",Y=e.visible?"auto":"none";return S!==p.e&&ge(a,"display",p.e=S),A!==p.t&&ge(a,"top",p.t=A),W!==p.a&&ge(a,"left",p.a=W),G!==p.o&&ge(a,"z-index",p.o=G),Y!==p.i&&ge(a,"pointer-events",p.i=Y),p},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),re(()=>m.value=e.value),a})()};zn(["input","keydown"]);var er=e=>[R(j,{get when(){return Te(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return R(ht,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),R(j,{get when(){return Te(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return R(Qn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),R(j,{get when(){return Te(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return R(ht,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),R(mt,{get each(){return e.grabbedBoxes??[]},children:t=>R(ht,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),R(j,{get when(){return e.labelVariant!=="processing"},get children(){return R(mt,{get each(){return e.successLabels??[]},children:t=>R(Xt,{variant:"success",get text(){return t.text},get x(){return e.mouseX??0},get y(){return e.mouseY??0}})})}}),R(j,{get when(){return Te(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return R(Xt,{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}})}}),R(Jn,{get x(){return e.inputX??0},get y(){return e.inputY??0},get zIndex(){return e.labelZIndex},get value(){return e.inputValue??""},get visible(){return e.inputVisible??false},get onInput(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get onCancel(){return e.onInputCancel}})];var rr="0.5.16",St=`bippy-${rr}`,tr=Object.defineProperty,Vo=Object.prototype.hasOwnProperty,et=()=>{},or=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{}},Tt=(e=Ee())=>"getFiberRoots"in e,ir=false,nr,tt=(e=Ee())=>ir?true:(typeof e.inject=="function"&&(nr=e.inject.toString()),!!nr?.includes("(injected)")),Ct=new Set,De=new Set,sr=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:St,checkDCE:or,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),De.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,Ct.forEach(s=>s())),i},on:et,onCommitFiberRoot:et,onCommitFiberUnmount:et,onPostCommitFiberRoot:et,renderers:t,supportsFiber:true,supportsFlight:true};try{tr(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let l=r.renderers;r=s,l.size>0&&(l.forEach((a,c)=>{De.add(a),s.renderers.set(c,a);}),xt(e));}}});let o=window.hasOwnProperty,i=!1;tr(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{xt(e);}return r},xt=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=or,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=St,t._instrumentationIsActive=!1;let n=Tt(t);if(n||(t.on=et),t.renderers.size){t._instrumentationIsActive=!0,Ct.forEach(i=>i());return}let r=t.inject,o=tt(t);o&&!n&&(ir=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return De.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,Ct.forEach(l=>l()),s};}(t.renderers.size||t._instrumentationIsActive||tt())&&e?.();}catch{}},qt=()=>Vo.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Ee=e=>qt()?(xt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):sr(e),ar=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Wt=()=>{try{ar()&&Ee();}catch{}};Wt();var vt=0,Et=1;var Rt=5;var _t=11,Zt=13,lr=14,At=15,Kt=16;var Qt=19;var kt=26,Ot=27,Jt=28,en=30;var Ft=e=>{switch(e.tag){case Rt:case kt:case Ot:return true;default:return typeof e.type=="string"}},It=e=>{switch(e.tag){case Et:case _t:case vt:case lr:case At:return true;default:return false}},tn=e=>!e||typeof e!="object"?true:"pendingProps"in e&&!("containerInfo"in e);function Ye(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 rn(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=nn(o,t,n);if(i)return i;o=n?null:o.sibling;}return null}var nn=(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=nn(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},rn=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 rn(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var on=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?on(t.type||t.render):null},He=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=on(t);return r&&(r.displayName||r.name)||null};var ze=()=>!!Ee()._instrumentationIsActive||Tt()||tt(),Nt=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 cr){let r=Ye(n.current,o=>{if(o===e)return true});if(r)return r}return e};var nt=e=>{let t=Ee();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},cr=new Set;var Ko=Object.create,br=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,Jo=Object.getOwnPropertyNames,ei=Object.getPrototypeOf,ti=Object.prototype.hasOwnProperty,ni=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ri=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Jo(t),i=0,s=o.length,l;i<s;i++)l=o[i],!ti.call(e,l)&&l!==n&&br(e,l,{get:(a=>t[a]).bind(null,l),enumerable:!(r=Qo(t,l))||r.enumerable});return e},oi=(e,t,n)=>(n=e==null?{}:Ko(ei(e)),ri(br(n,"default",{value:e,enumerable:true}),e)),ii=()=>{let e=Ee();for(let t of [...Array.from(De),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},ur=e=>{for(let t of De){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Re=e=>`
10
+ in ${e}`,si=(e,t)=>{let n=Re(e);return t&&(n+=` (at ${t})`),n},sn=false,an=(e,t)=>{if(!e||sn)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,sn=true;let r=ii();ur(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let a={DetermineComponentFrameRoot(){let x;try{if(t){let g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[]);}catch(p){x=p;}Reflect.construct(e,[],g);}else {try{g.call();}catch(p){x=p;}e.call(g.prototype);}}else {try{throw Error()}catch(p){x=p;}let g=e();g&&typeof g.catch=="function"&&g.catch(()=>{});}}catch(g){if(g instanceof Error&&x instanceof Error&&typeof g.stack=="string")return [g.stack,x.stack]}return [null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[m,d]=a.DetermineComponentFrameRoot();if(m&&d){let x=m.split(`
11
11
  `),g=d.split(`
12
12
  `),p=0,S=0;for(;p<x.length&&!x[p].includes("DetermineComponentFrameRoot");)p++;for(;S<g.length&&!g[S].includes("DetermineComponentFrameRoot");)S++;if(p===x.length||S===g.length)for(p=x.length-1,S=g.length-1;p>=1&&S>=0&&x[p]!==g[S];)S--;for(;p>=1&&S>=0;p--,S--)if(x[p]!==g[S]){if(p!==1||S!==1)do if(p--,S--,S<0||x[p]!==g[S]){let A=`
13
- ${x[p].replace(" at new "," at ")}`,W=He(e);return W&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",W)),A}while(p>=1&&S>=0);break}}}finally{rn=false,Error.prepareStackTrace=n,ar(r),console.error=o,console.warn=i;}let s=e?He(e):"";return s?Te(s):""},oi=(e,t)=>{let n=e.tag,r="";switch(n){case Kt:r=Te("Activity");break;case Tt:r=on(e.type,true);break;case Et:r=on(e.type.render,false);break;case St:case Rt:r=on(e.type,false);break;case vt:case _t:case At:r=Te(e.type);break;case Wt:r=Te("Lazy");break;case qt:r=e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");break;case Zt:r=Te("SuspenseList");break;case Qt:r=Te("ViewTransition");break;default:return ""}return r},ii=e=>{try{let t="",n=e,r=null;do{t+=oi(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+=ri(s.name,s.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
13
+ ${x[p].replace(" at new "," at ")}`,W=He(e);return W&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",W)),A}while(p>=1&&S>=0);break}}}finally{sn=false,Error.prepareStackTrace=n,ur(r),console.error=o,console.warn=i;}let s=e?He(e):"";return s?Re(s):""},ai=(e,t)=>{let n=e.tag,r="";switch(n){case Jt:r=Re("Activity");break;case Et:r=an(e.type,true);break;case _t:r=an(e.type.render,false);break;case vt:case At:r=an(e.type,false);break;case Rt:case kt:case Ot:r=Re(e.type);break;case Kt:r=Re("Lazy");break;case Zt:r=e.child!==t&&t!==null?Re("Suspense Fallback"):Re("Suspense");break;case Qt:r=Re("SuspenseList");break;case en:r=Re("ViewTransition");break;default:return ""}return r},li=e=>{try{let t="",n=e,r=null;do{t+=ai(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+=si(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}`:""}},si=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}`:""}},ci=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},ai=/(^|@)\S+:\d+/,pr=/^\s*at .*(\S+:\d+|\(native\))/m,li=/^(eval@)?(\[native code\])?$/;var ci=(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=lr(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(ai)){let i=cr(o,void 0)[0];i&&r.push(i);}return sn(r,t)}return e.match(pr)?lr(e,t):cr(e,t)},hr=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]},sn=(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 lr=(e,t)=>sn(e.split(`
20
- `).filter(r=>!!r.match(pr)),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 l=hr(s?s[1]:i),a=s&&i||void 0,c=["eval","<anonymous>"].includes(l[0])?void 0:l[0];return {function:a,file:c,line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}});var cr=(e,t)=>sn(e.split(`
21
- `).filter(r=>!r.match(li)),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),l=s&&s[1]?s[1]:void 0,a=hr(o.replace(i,""));return {function:l,file:a[0],line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}}});var ui=Jo((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),l=new Uint8Array(128);for(let C=0;C<i.length;C++){let h=i.charCodeAt(C);s[C]=h,l[h]=C;}function a(C,h){let f=0,y=0,v=0;do{let N=C.next();v=l[N],f|=(v&31)<<y,y+=5;}while(v&32);let k=f&1;return f>>>=1,k&&(f=-2147483648|-f),h+f}function c(C,h,f){let y=h-f;y=y<0?-y<<1|1:y<<1;do{let v=y&31;y>>>=5,y>0&&(v|=32),C.write(s[v]);}while(y>0);return h}function m(C,h){return C.pos>=h?false:C.peek()!==r}let d=1024*16,x=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(C){return Buffer.from(C.buffer,C.byteOffset,C.byteLength).toString()}}:{decode(C){let h="";for(let f=0;f<C.length;f++)h+=String.fromCharCode(C[f]);return h}};class g{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(d);}write(h){let{buffer:f}=this;f[this.pos++]=h,this.pos===d&&(this.out+=x.decode(f),this.pos=0);}flush(){let{buffer:h,out:f,pos:y}=this;return y>0?f+x.decode(h.subarray(0,y)):f}}class p{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:f,pos:y}=this,v=f.indexOf(h,y);return v===-1?f.length:v}}let S=[];function A(C){let{length:h}=C,f=new p(C),y=[],v=[],k=0;for(;f.pos<h;f.pos++){k=a(f,k);let N=a(f,0);if(!m(f,h)){let X=v.pop();X[2]=k,X[3]=N;continue}let F=a(f,0),D=a(f,0),$=D&1,I=$?[k,N,0,0,F,a(f,0)]:[k,N,0,0,F],G=S;if(m(f,h)){G=[];do{let X=a(f,0);G.push(X);}while(m(f,h))}I.vars=G,y.push(I),v.push(I);}return y}function W(C){let h=new g;for(let f=0;f<C.length;)f=Y(C,f,h,[0]);return h.flush()}function Y(C,h,f,y){let v=C[h],{0:k,1:N,2:F,3:D,4:$,vars:I}=v;h>0&&f.write(r),y[0]=c(f,k,y[0]),c(f,N,0),c(f,$,0);let G=v.length===6?1:0;c(f,G,0),v.length===6&&c(f,v[5],0);for(let X of I)c(f,X,0);for(h++;h<C.length;){let X=C[h],{0:O,1:j}=X;if(O>F||O===F&&j>=D)break;h=Y(C,h,f,y);}return f.write(r),y[0]=c(f,F,y[0]),c(f,D,0),h}function z(C){let{length:h}=C,f=new p(C),y=[],v=[],k=0,N=0,F=0,D=0,$=0,I=0,G=0,X=0;do{let O=f.indexOf(";"),j=0;for(;f.pos<O;f.pos++){if(j=a(f,j),!m(f,O)){let Q=v.pop();Q[2]=k,Q[3]=j;continue}let ie=a(f,0),Ie=ie&1,se=ie&2,be=ie&4,ze=null,Le=S,K;if(Ie){let Q=a(f,N);F=a(f,N===Q?F:0),N=Q,K=[k,j,0,0,Q,F];}else K=[k,j,0,0];if(K.isScope=!!be,se){let Q=D,ue=$;D=a(f,D);let te=Q===D;$=a(f,te?$:0),I=a(f,te&&ue===$?I:0),ze=[D,$,I];}if(K.callsite=ze,m(f,O)){Le=[];do{G=k,X=j;let Q=a(f,0),ue;if(Q<-1){ue=[[a(f,0)]];for(let te=-1;te>Q;te--){let ge=G;G=a(f,G),X=a(f,G===ge?X:0);let ye=a(f,0);ue.push([ye,G,X]);}}else ue=[[Q]];Le.push(ue);}while(m(f,O))}K.bindings=Le,y.push(K),v.push(K);}k++,f.pos=O+1;}while(f.pos<h);return y}function U(C){if(C.length===0)return "";let h=new g;for(let f=0;f<C.length;)f=Z(C,f,h,[0,0,0,0,0,0,0]);return h.flush()}function Z(C,h,f,y){let v=C[h],{0:k,1:N,2:F,3:D,isScope:$,callsite:I,bindings:G}=v;y[0]<k?(he(f,y[0],k),y[0]=k,y[1]=0):h>0&&f.write(r),y[1]=c(f,v[1],y[1]);let X=(v.length===6?1:0)|(I?2:0)|($?4:0);if(c(f,X,0),v.length===6){let{4:O,5:j}=v;O!==y[2]&&(y[3]=0),y[2]=c(f,O,y[2]),y[3]=c(f,j,y[3]);}if(I){let{0:O,1:j,2:ie}=v.callsite;O===y[4]?j!==y[5]&&(y[6]=0):(y[5]=0,y[6]=0),y[4]=c(f,O,y[4]),y[5]=c(f,j,y[5]),y[6]=c(f,ie,y[6]);}if(G)for(let O of G){O.length>1&&c(f,-O.length,0);let j=O[0][0];c(f,j,0);let ie=k,Ie=N;for(let se=1;se<O.length;se++){let be=O[se];ie=c(f,be[1],ie),Ie=c(f,be[2],Ie),c(f,be[0],0);}}for(h++;h<C.length;){let O=C[h],{0:j,1:ie}=O;if(j>F||j===F&&ie>=D)break;h=Z(C,h,f,y);}return y[0]<F?(he(f,y[0],F),y[0]=F,y[1]=0):f.write(r),y[1]=c(f,D,y[1]),h}function he(C,h,f){do C.write(o);while(++h<f)}function Fe(C){let{length:h}=C,f=new p(C),y=[],v=0,k=0,N=0,F=0,D=0;do{let $=f.indexOf(";"),I=[],G=true,X=0;for(v=0;f.pos<$;){let O;v=a(f,v),v<X&&(G=false),X=v,m(f,$)?(k=a(f,k),N=a(f,N),F=a(f,F),m(f,$)?(D=a(f,D),O=[v,k,N,F,D]):O=[v,k,N,F]):O=[v],I.push(O),f.pos++;}G||ve(I),y.push(I),f.pos=$+1;}while(f.pos<=h);return y}function ve(C){C.sort(Ne);}function Ne(C,h){return C[0]-h[0]}function ot(C){let h=new g,f=0,y=0,v=0,k=0;for(let N=0;N<C.length;N++){let F=C[N];if(N>0&&h.write(o),F.length===0)continue;let D=0;for(let $=0;$<F.length;$++){let I=F[$];$>0&&h.write(r),D=c(h,I[0],D),I.length!==1&&(f=c(h,I[1],f),y=c(h,I[2],y),v=c(h,I[3],v),I.length!==4&&(k=c(h,I[4],k)));}}return h.flush()}n.decode=Fe,n.decodeGeneratedRanges=z,n.decodeOriginalScopes=A,n.encode=ot,n.encodeGeneratedRanges=U,n.encodeOriginalScopes=W,Object.defineProperty(n,"__esModule",{value:true});});}),br=ti(ui()),yr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,fi=/^data:application\/json[^,]+base64,/,di=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,wr=typeof WeakRef<"u",tt=new Map,Nt=new Map,mi=e=>wr&&e instanceof WeakRef,ur=(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,l,a]=i;if(s===void 0||l===void 0||a===void 0)return null;let c=t[s];return c?{columnNumber:a,fileName:c,lineNumber:l+1}:null},gi=(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 ur(r.map.mappings,r.map.sources,o,i)}return ur(e.mappings,e.sources,t-1,n)},pi=(e,t)=>{let n=t.split(`
22
- `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(di);s&&(r=s[1]||s[2]);}if(!r)return null;let o=yr.test(r);if(!(fi.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},hi=e=>({file:e.file,mappings:(0, br.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),bi=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, br.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}},fr=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(yr);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},yi=async(e,t=fetch)=>{if(!fr(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=pi(e,n);if(!r||!fr(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?bi(i):hi(i)}catch{return null}},wi=async(e,t=true,n)=>{if(t&&tt.has(e)){let i=tt.get(e);if(i==null)return null;if(mi(i)){let s=i.deref();if(s)return s;tt.delete(e);}else return i}if(t&&Nt.has(e))return Nt.get(e);let r=yi(e,n);t&&Nt.set(e,r);let o=await r;return t&&Nt.delete(e),t&&(o===null?tt.set(e,null):tt.set(e,wr?new WeakRef(o):o)),o},dr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Ci=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],mr="about://React/",xi=["<anonymous>","eval",""],Si=/\.(jsx|tsx|ts|js)$/,Ti=/(\.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,vi=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Ei=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},Cr=async(e,t=true,n)=>{if(Ri(e))return e._debugSource||null;let r=_i(e),o=await Ai(r,1,t,n);return !o||o.length===0?null:o[0]},_i=e=>Ei(e)?si(e._debugStack.stack):ii(e);var Ai=async(e,t=1,n=true,r)=>{let o=ci(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let l=await wi(s.file,n,r);if(l&&typeof s.line=="number"&&typeof s.col=="number"){let a=gi(l,s.line,s.col);if(a){i.push(a);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},an=e=>{if(!e||xi.includes(e))return "";let t=e;if(t.startsWith(mr)){let r=t.slice(mr.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of Ci)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(dr.test(t)){let r=t.match(dr);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);vi.test(r)&&(t=t.slice(0,n));}return t},xr=e=>{let t=an(e);return !(!t||!Si.test(t)||Ti.test(t))};var Sr=e=>e.length>0&&/^[A-Z]/.test(e);var ki=["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"],Oi=()=>!!document.getElementById("__NEXT_DATA__"),Tr=e=>!!(e.startsWith("_")||ki.includes(e)),Fi=e=>!(Tr(e)||!Sr(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),vr=e=>{let t=et(e);if(!t)return null;let n=null;return Ye(t,r=>{if(Ot(r)){let o=He(r);if(o&&Fi(o))return n=o,true}return false},true),n},Er=async e=>{let t=et(e);if(!t||!Jt(t))return [];let n=Ft(t),r=[];return Ye(n,i=>{let s=kt(i)?typeof i.type=="string"?i.type:null:He(i);s&&!Tr(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)},Rr=e=>{let t=Oi();return e.map(({name:n,source:r})=>{if(!r)return ` at ${n}`;if(r.fileName.startsWith("about://React/Server"))return ` at ${n} (Server)`;if(!xr(r.fileName))return ` at ${n}`;let o=` at ${n} in ${an(r.fileName)}`;return t?`${o}:${r.lineNumber}:${r.columnNumber}`:o}).join(`
23
- `)},_r=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 g of o){let p=g.name,S=g.value;S.length>20&&(S=`${S.slice(0,20)}...`),r+=` ${p}="${S}"`;}let i=[],s=[],l=false,a=Array.from(e.childNodes);for(let g of a)g.nodeType!==Node.COMMENT_NODE&&(g.nodeType===Node.TEXT_NODE?g.textContent&&g.textContent.trim().length>0&&(l=true):g.nodeType===Node.ELEMENT_NODE&&(l?s.push(g):i.push(g)));let c=g=>g.length===0?"":g.length<=2?g.map(p=>`<${p.tagName.toLowerCase()} ...>`).join(`
18
+ `,r)),r!==-1)n=n.slice(0,r);else return "";return n},ui=/(^|@)\S+:\d+/,yr=/^\s*at .*(\S+:\d+|\(native\))/m,fi=/^(eval@)?(\[native code\])?$/;var di=(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=fr(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(ui)){let i=dr(o,void 0)[0];i&&r.push(i);}return ln(r,t)}return e.match(yr)?fr(e,t):dr(e,t)},wr=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]},ln=(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 fr=(e,t)=>ln(e.split(`
20
+ `).filter(r=>!!r.match(yr)),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 l=wr(s?s[1]:i),a=s&&i||void 0,c=["eval","<anonymous>"].includes(l[0])?void 0:l[0];return {function:a,file:c,line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}});var dr=(e,t)=>ln(e.split(`
21
+ `).filter(r=>!r.match(fi)),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),l=s&&s[1]?s[1]:void 0,a=wr(o.replace(i,""));return {function:l,file:a[0],line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}}});var mi=ni((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),l=new Uint8Array(128);for(let C=0;C<i.length;C++){let h=i.charCodeAt(C);s[C]=h,l[h]=C;}function a(C,h){let f=0,y=0,v=0;do{let I=C.next();v=l[I],f|=(v&31)<<y,y+=5;}while(v&32);let k=f&1;return f>>>=1,k&&(f=-2147483648|-f),h+f}function c(C,h,f){let y=h-f;y=y<0?-y<<1|1:y<<1;do{let v=y&31;y>>>=5,y>0&&(v|=32),C.write(s[v]);}while(y>0);return h}function m(C,h){return C.pos>=h?false:C.peek()!==r}let d=1024*16,x=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(C){return Buffer.from(C.buffer,C.byteOffset,C.byteLength).toString()}}:{decode(C){let h="";for(let f=0;f<C.length;f++)h+=String.fromCharCode(C[f]);return h}};class g{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(d);}write(h){let{buffer:f}=this;f[this.pos++]=h,this.pos===d&&(this.out+=x.decode(f),this.pos=0);}flush(){let{buffer:h,out:f,pos:y}=this;return y>0?f+x.decode(h.subarray(0,y)):f}}class p{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:f,pos:y}=this,v=f.indexOf(h,y);return v===-1?f.length:v}}let S=[];function A(C){let{length:h}=C,f=new p(C),y=[],v=[],k=0;for(;f.pos<h;f.pos++){k=a(f,k);let I=a(f,0);if(!m(f,h)){let z=v.pop();z[2]=k,z[3]=I;continue}let F=a(f,0),$=a(f,0),M=$&1,N=M?[k,I,0,0,F,a(f,0)]:[k,I,0,0,F],U=S;if(m(f,h)){U=[];do{let z=a(f,0);U.push(z);}while(m(f,h))}N.vars=U,y.push(N),v.push(N);}return y}function W(C){let h=new g;for(let f=0;f<C.length;)f=G(C,f,h,[0]);return h.flush()}function G(C,h,f,y){let v=C[h],{0:k,1:I,2:F,3:$,4:M,vars:N}=v;h>0&&f.write(r),y[0]=c(f,k,y[0]),c(f,I,0),c(f,M,0);let U=v.length===6?1:0;c(f,U,0),v.length===6&&c(f,v[5],0);for(let z of N)c(f,z,0);for(h++;h<C.length;){let z=C[h],{0:O,1:H}=z;if(O>F||O===F&&H>=$)break;h=G(C,h,f,y);}return f.write(r),y[0]=c(f,F,y[0]),c(f,$,0),h}function Y(C){let{length:h}=C,f=new p(C),y=[],v=[],k=0,I=0,F=0,$=0,M=0,N=0,U=0,z=0;do{let O=f.indexOf(";"),H=0;for(;f.pos<O;f.pos++){if(H=a(f,H),!m(f,O)){let Q=v.pop();Q[2]=k,Q[3]=H;continue}let se=a(f,0),Ne=se&1,ae=se&2,we=se&4,Xe=null,Pe=S,K;if(Ne){let Q=a(f,I);F=a(f,I===Q?F:0),I=Q,K=[k,H,0,0,Q,F];}else K=[k,H,0,0];if(K.isScope=!!we,ae){let Q=$,de=M;$=a(f,$);let te=Q===$;M=a(f,te?M:0),N=a(f,te&&de===M?N:0),Xe=[$,M,N];}if(K.callsite=Xe,m(f,O)){Pe=[];do{U=k,z=H;let Q=a(f,0),de;if(Q<-1){de=[[a(f,0)]];for(let te=-1;te>Q;te--){let he=U;U=a(f,U),z=a(f,U===he?z:0);let Ce=a(f,0);de.push([Ce,U,z]);}}else de=[[Q]];Pe.push(de);}while(m(f,O))}K.bindings=Pe,y.push(K),v.push(K);}k++,f.pos=O+1;}while(f.pos<h);return y}function V(C){if(C.length===0)return "";let h=new g;for(let f=0;f<C.length;)f=Z(C,f,h,[0,0,0,0,0,0,0]);return h.flush()}function Z(C,h,f,y){let v=C[h],{0:k,1:I,2:F,3:$,isScope:M,callsite:N,bindings:U}=v;y[0]<k?(ye(f,y[0],k),y[0]=k,y[1]=0):h>0&&f.write(r),y[1]=c(f,v[1],y[1]);let z=(v.length===6?1:0)|(N?2:0)|(M?4:0);if(c(f,z,0),v.length===6){let{4:O,5:H}=v;O!==y[2]&&(y[3]=0),y[2]=c(f,O,y[2]),y[3]=c(f,H,y[3]);}if(N){let{0:O,1:H,2:se}=v.callsite;O===y[4]?H!==y[5]&&(y[6]=0):(y[5]=0,y[6]=0),y[4]=c(f,O,y[4]),y[5]=c(f,H,y[5]),y[6]=c(f,se,y[6]);}if(U)for(let O of U){O.length>1&&c(f,-O.length,0);let H=O[0][0];c(f,H,0);let se=k,Ne=I;for(let ae=1;ae<O.length;ae++){let we=O[ae];se=c(f,we[1],se),Ne=c(f,we[2],Ne),c(f,we[0],0);}}for(h++;h<C.length;){let O=C[h],{0:H,1:se}=O;if(H>F||H===F&&se>=$)break;h=Z(C,h,f,y);}return y[0]<F?(ye(f,y[0],F),y[0]=F,y[1]=0):f.write(r),y[1]=c(f,$,y[1]),h}function ye(C,h,f){do C.write(o);while(++h<f)}function Fe(C){let{length:h}=C,f=new p(C),y=[],v=0,k=0,I=0,F=0,$=0;do{let M=f.indexOf(";"),N=[],U=true,z=0;for(v=0;f.pos<M;){let O;v=a(f,v),v<z&&(U=false),z=v,m(f,M)?(k=a(f,k),I=a(f,I),F=a(f,F),m(f,M)?($=a(f,$),O=[v,k,I,F,$]):O=[v,k,I,F]):O=[v],N.push(O),f.pos++;}U||_e(N),y.push(N),f.pos=M+1;}while(f.pos<=h);return y}function _e(C){C.sort(Ie);}function Ie(C,h){return C[0]-h[0]}function st(C){let h=new g,f=0,y=0,v=0,k=0;for(let I=0;I<C.length;I++){let F=C[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),$=c(h,N[0],$),N.length!==1&&(f=c(h,N[1],f),y=c(h,N[2],y),v=c(h,N[3],v),N.length!==4&&(k=c(h,N[4],k)));}}return h.flush()}n.decode=Fe,n.decodeGeneratedRanges=Y,n.decodeOriginalScopes=A,n.encode=st,n.encodeGeneratedRanges=V,n.encodeOriginalScopes=W,Object.defineProperty(n,"__esModule",{value:true});});}),Cr=oi(mi()),xr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,gi=/^data:application\/json[^,]+base64,/,pi=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Sr=typeof WeakRef<"u",rt=new Map,Pt=new Map,hi=e=>Sr&&e instanceof WeakRef,mr=(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,l,a]=i;if(s===void 0||l===void 0||a===void 0)return null;let c=t[s];return c?{columnNumber:a,fileName:c,lineNumber:l+1}:null},bi=(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 mr(r.map.mappings,r.map.sources,o,i)}return mr(e.mappings,e.sources,t-1,n)},yi=(e,t)=>{let n=t.split(`
22
+ `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(pi);s&&(r=s[1]||s[2]);}if(!r)return null;let o=xr.test(r);if(!(gi.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},wi=e=>({file:e.file,mappings:(0, Cr.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),Ci=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, Cr.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}},gr=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(xr);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},xi=async(e,t=fetch)=>{if(!gr(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=yi(e,n);if(!r||!gr(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?Ci(i):wi(i)}catch{return null}},Si=async(e,t=true,n)=>{if(t&&rt.has(e)){let i=rt.get(e);if(i==null)return null;if(hi(i)){let s=i.deref();if(s)return s;rt.delete(e);}else return i}if(t&&Pt.has(e))return Pt.get(e);let r=xi(e,n);t&&Pt.set(e,r);let o=await r;return t&&Pt.delete(e),t&&(o===null?rt.set(e,null):rt.set(e,Sr?new WeakRef(o):o)),o},pr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Ti=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],hr="about://React/",vi=["<anonymous>","eval",""],Ei=/\.(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,_i=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Ai=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",ki=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},Tr=async(e,t=true,n)=>{if(ki(e))return e._debugSource||null;let r=Oi(e),o=await Fi(r,1,t,n);return !o||o.length===0?null:o[0]},Oi=e=>Ai(e)?ci(e._debugStack.stack):li(e);var Fi=async(e,t=1,n=true,r)=>{let o=di(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let l=await Si(s.file,n,r);if(l&&typeof s.line=="number"&&typeof s.col=="number"){let a=bi(l,s.line,s.col);if(a){i.push(a);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},cn=e=>{if(!e||vi.includes(e))return "";let t=e;if(t.startsWith(hr)){let r=t.slice(hr.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of Ti)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(pr.test(t)){let r=t.match(pr);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);_i.test(r)&&(t=t.slice(0,n));}return t},vr=e=>{let t=cn(e);return !(!t||!Ei.test(t)||Ri.test(t))};var Er=e=>e.length>0&&/^[A-Z]/.test(e);var Ii=["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"],Ni=()=>!!document.getElementById("__NEXT_DATA__"),Rr=e=>!!(e.startsWith("_")||Ii.includes(e)),Pi=e=>!(Rr(e)||!Er(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),_r=e=>{if(!ze())return null;try{let t=nt(e);if(!t)return null;let n=null;return Ye(t,r=>{if(It(r)){let o=He(r);if(o&&Pi(o))return n=o,!0}return !1},!0),n}catch{return null}},Ar=async e=>{if(!ze())return [];try{let t=nt(e);if(!t||!tn(t))return [];let n=Nt(t),r=[];return Ye(n,i=>{let s=Ft(i)?typeof i.type=="string"?i.type:null:He(i);s&&!Rr(s)&&r.push({name:s,sourcePromise:Tr(i)});},!0),(await Promise.all(r.map(async i=>({name:i.name,source:await i.sourcePromise})))).filter(i=>i.source!==null)}catch{return []}},kr=e=>{let t=Ni();return e.map(({name:n,source:r})=>{if(!r)return ` at ${n}`;if(r.fileName.startsWith("about://React/Server"))return ` at ${n} (Server)`;if(!vr(r.fileName))return ` at ${n}`;let o=` at ${n} in ${cn(r.fileName)}`;return t?`${o}:${r.lineNumber}:${r.columnNumber}`:o}).join(`
23
+ `)},Or=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 g of o){let p=g.name,S=g.value;S.length>20&&(S=`${S.slice(0,20)}...`),r+=` ${p}="${S}"`;}let i=[],s=[],l=false,a=Array.from(e.childNodes);for(let g of a)g.nodeType!==Node.COMMENT_NODE&&(g.nodeType===Node.TEXT_NODE?g.textContent&&g.textContent.trim().length>0&&(l=true):g instanceof Element&&(l?s.push(g):i.push(g)));let c=g=>g.length===0?"":g.length<=2?g.map(p=>`<${p.tagName.toLowerCase()} ...>`).join(`
24
24
  `):`(${g.length} elements)`,m="",d=c(i);if(d&&(m+=`
25
25
  ${d}`),n.length>0){let g=n.length>100?`${n.slice(0,100)}...`:n;m+=`
26
26
  ${g}`;}let x=c(s);return x&&(m+=`
27
27
  ${x}`),m.length>0?`<${t}${r}>${m}
28
- </${t}>`:`<${t}${r} />`};var Ni=()=>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();}),It=async(e,t)=>{await Ni();try{try{return await navigator.clipboard.writeText(e),t?.(),!0}catch{return Ii(e,t)}}catch{return false}},Ii=(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 nt=()=>{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,l=s+.01,a=s+r.duration;i.gain.setValueAtTime(0,s),i.gain.linearRampToValueAtTime(.15,l),i.gain.exponentialRampToValueAtTime(.01,a),o.start(s),o.stop(a);});}catch{}};var Ar=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var rt=e=>{if(e.closest(`[${Ue}]`))return false;let t=window.getComputedStyle(e);return !(!Ar(e,t)||t.pointerEvents==="none")};var ln=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(rt(r))return r;return null};var Li=(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),l=Math.max(0,i-r);return s*l},Pi=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,kr=(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 l=s.getBoundingClientRect(),a={left:l.left,top:l.top,right:l.left+l.width,bottom:l.top+l.height};if(n){let c=Li(i,a),m=Math.max(0,l.width*l.height);m>0&&c/m>=.75&&r.push(s);}else Pi(a,i)&&r.push(s);}return r},Or=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Fr=(e,t)=>{let n=kr(e,t,true);return Or(n)},Nr=(e,t)=>{let n=kr(e,t,false);return Or(n)};var Lt=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 Ir=false,Lr=e=>{let t={enabled:true,keyHoldDuration:300,allowActivationInsideInput:true,playCopySound:false,...e};return t.enabled===false||Ir?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{}}:(Ir=true,(()=>{try{let r="0.0.45",i=`data:image/svg+xml;base64,${btoa('<svg width="294" height="294" viewBox="0 0 294 294" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_0_3)"><mask id="mask0_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="294" height="294"><path d="M294 0H0V294H294V0Z" fill="white"/></mask><g mask="url(#mask0_0_3)"><path d="M144.599 47.4924C169.712 27.3959 194.548 20.0265 212.132 30.1797C227.847 39.2555 234.881 60.3243 231.926 89.516C231.677 92.0069 231.328 94.5423 230.94 97.1058L228.526 110.14C228.517 110.136 228.505 110.132 228.495 110.127C228.486 110.165 228.479 110.203 228.468 110.24L216.255 105.741C216.256 105.736 216.248 105.728 216.248 105.723C207.915 103.125 199.421 101.075 190.82 99.5888L190.696 99.5588L173.526 97.2648L173.511 97.2631C173.492 97.236 173.467 97.2176 173.447 97.1905C163.862 96.2064 154.233 95.7166 144.599 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8624 138.391 86.939 147.193C90.8624 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245C115.749 197.245 115.758 197.246 115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.507 229.974L144.609 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.472 238.38C154.485 238.392 154.499 238.402 154.513 238.412L143.846 247.482L143.827 247.497C126.56 261.128 109.472 268.745 94.8019 268.745C88.5916 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3164 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3363 185.327 9.52301 167.51 9.52301 147.193C9.52301 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3164 60.3243 61.3496 39.2555 77.0657 30.1797C94.6494 20.0265 119.486 27.3959 144.599 47.4924ZM70.6423 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5176 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8516 207.742 83.0977 205.066 70.6423 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1787 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.9311 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.759 110.203C59.234 110.839 57.7378 111.475 56.27 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9104 147.193C67.822 135.23 63.7566 122.855 60.759 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.854 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.6291 47.6015 67.6975 64.5954 70.0424 87.9446L70.0416 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8263 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.773 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.29 38.512C183.321 38.512 169.34 44.4991 154.444 56.0153C163.93 64.9374 172.634 74.6557 180.462 85.064C193.375 86.6345 206.128 89.3102 218.584 93.0624C218.812 91.4325 219.003 89.8118 219.165 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.552 64.3097C138.104 70.2614 132.054 76.6306 126.443 83.3765C132.39 82.995 138.426 82.8046 144.552 82.8046C150.727 82.8046 156.778 83.0143 162.707 83.3765C157.08 76.6293 151.015 70.2596 144.552 64.3097Z" fill="white"/><path d="M144.598 47.4924C169.712 27.3959 194.547 20.0265 212.131 30.1797C227.847 39.2555 234.88 60.3243 231.926 89.516C231.677 92.0069 231.327 94.5423 230.941 97.1058L228.526 110.14L228.496 110.127C228.487 110.165 228.478 110.203 228.469 110.24L216.255 105.741L216.249 105.723C207.916 103.125 199.42 101.075 190.82 99.5888L190.696 99.5588L173.525 97.2648L173.511 97.263C173.492 97.236 173.468 97.2176 173.447 97.1905C163.863 96.2064 154.234 95.7166 144.598 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8622 138.391 86.939 147.193C90.8622 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245L115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.506 229.974L144.61 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.473 238.38L154.512 238.412L143.847 247.482L143.827 247.497C126.56 261.13 109.472 268.745 94.8018 268.745C88.5915 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3162 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3362 185.327 9.52298 167.51 9.52298 147.193C9.52298 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3162 60.3243 61.3496 39.2555 77.0657 30.1797C94.6493 20.0265 119.486 27.3959 144.598 47.4924ZM70.6422 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5175 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8515 207.742 83.0977 205.066 70.6422 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1786 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.931 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.7589 110.203C59.234 110.839 57.7378 111.475 56.2699 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9103 147.193C67.822 135.23 63.7566 122.855 60.7589 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.8539 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.629 47.6015 67.6975 64.5954 70.0424 87.9446L70.0415 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8262 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.772 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.291 38.512C183.321 38.512 169.34 44.4991 154.443 56.0153C163.929 64.9374 172.634 74.6557 180.462 85.064C193.374 86.6345 206.129 89.3102 218.584 93.0624C218.813 91.4325 219.003 89.8118 219.166 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.551 64.3097C138.103 70.2614 132.055 76.6306 126.443 83.3765C132.389 82.995 138.427 82.8046 144.551 82.8046C150.727 82.8046 156.779 83.0143 162.707 83.3765C157.079 76.6293 151.015 70.2596 144.551 64.3097Z" fill="#FF40E0"/></g><mask id="mask1_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="102" y="84" width="161" height="162"><path d="M235.282 84.827L102.261 112.259L129.693 245.28L262.714 217.848L235.282 84.827Z" fill="white"/></mask><g mask="url(#mask1_0_3)"><path d="M136.863 129.916L213.258 141.224C220.669 142.322 222.495 152.179 215.967 155.856L187.592 171.843L184.135 204.227C183.339 211.678 173.564 213.901 169.624 207.526L129.021 141.831C125.503 136.14 130.245 128.936 136.863 129.916Z" fill="#FF40E0" stroke="#FF40E0" stroke-width="0.817337" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_0_3"><rect width="294" height="294" fill="white"/></clipPath></defs></svg>')}`;console.log(`%cReact Grab${r?` v${r}`:""}%c
29
- https://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${i}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,""),fetch("https://react-grab.com/api/version").then(s=>s.text()).catch(()=>null);}catch{}})(),Me(r=>{let[o,i]=E(false),[s,l]=E(-1e3),[a,c]=E(-1e3),[m,d]=E(false),[x,g]=E(-1e3),[p,S]=E(-1e3),[A,W]=E(false),[Y,z]=E(null),[U,Z]=E(null),[he,Fe]=E(0),[ve,Ne]=E([]),[ot,C]=E([]),[h,f]=E(false),[y,v]=E(false),[k,N]=E(false),[F,D]=E(false),[$,I]=E(-1e3),[G,X]=E(-1e3),[O,j]=E(false),[ie,Ie]=E(0),[se,be]=E(false),[ze,Le]=E(""),K=null,Q=null,ue=null,te=null,ge=null,ye=null,Pe=B(()=>h()&&!A()),Mr=B(()=>s()>-1e3&&a()>-1e3),$r=u=>(u.metaKey||u.ctrlKey)&&u.key.toLowerCase()==="c",cn=(u,w)=>({top:w<25,bottom:w>window.innerHeight-25,left:u<25,right:u>window.innerWidth-25}),un=(u,w)=>{let T=`grabbed-${Date.now()}-${Math.random()}`,P=Date.now(),ae={id:T,bounds:u,createdAt:P,element:w},H=ve();Ne([...H,ae]),setTimeout(()=>{Ne(Ee=>Ee.filter(Re=>Re.id!==T));},1700);},fn=u=>{let w=`success-${Date.now()}-${Math.random()}`;C(T=>[...T,{id:w,text:u}]),setTimeout(()=>{C(T=>T.filter(P=>P.id!==w));},1700);},Dr=u=>`<selected_element>
28
+ </${t}>`:`<${t}${r} />`};var Li=()=>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();}),Lt=async(e,t)=>{await Li();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 ot=()=>{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,l=s+.01,a=s+r.duration;i.gain.setValueAtTime(0,s),i.gain.linearRampToValueAtTime(.15,l),i.gain.exponentialRampToValueAtTime(.01,a),o.start(s),o.stop(a);});}catch{}};var Fr=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var it=e=>{if(e.closest(`[${Ue}]`))return false;let t=window.getComputedStyle(e);return !(!Fr(e,t)||t.pointerEvents==="none")};var un=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(it(r))return r;return null};var $i=(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),l=Math.max(0,i-r);return s*l},Di=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,Ir=(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 l=s.getBoundingClientRect(),a={left:l.left,top:l.top,right:l.left+l.width,bottom:l.top+l.height};if(n){let c=$i(i,a),m=Math.max(0,l.width*l.height);m>0&&c/m>=.75&&r.push(s);}else Di(a,i)&&r.push(s);}return r},Nr=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Pr=(e,t)=>{let n=Ir(e,t,true);return Nr(n)},Lr=(e,t)=>{let n=Ir(e,t,false);return Nr(n)};var Mt=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 Mr=false,$r=e=>{let t={enabled:true,keyHoldDuration:300,allowActivationInsideInput:true,playCopySound:false,...e};return t.enabled===false||Mr?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{}}:(Mr=true,(()=>{try{let r="0.0.47",i=`data:image/svg+xml;base64,${btoa('<svg width="294" height="294" viewBox="0 0 294 294" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_0_3)"><mask id="mask0_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="294" height="294"><path d="M294 0H0V294H294V0Z" fill="white"/></mask><g mask="url(#mask0_0_3)"><path d="M144.599 47.4924C169.712 27.3959 194.548 20.0265 212.132 30.1797C227.847 39.2555 234.881 60.3243 231.926 89.516C231.677 92.0069 231.328 94.5423 230.94 97.1058L228.526 110.14C228.517 110.136 228.505 110.132 228.495 110.127C228.486 110.165 228.479 110.203 228.468 110.24L216.255 105.741C216.256 105.736 216.248 105.728 216.248 105.723C207.915 103.125 199.421 101.075 190.82 99.5888L190.696 99.5588L173.526 97.2648L173.511 97.2631C173.492 97.236 173.467 97.2176 173.447 97.1905C163.862 96.2064 154.233 95.7166 144.599 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8624 138.391 86.939 147.193C90.8624 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245C115.749 197.245 115.758 197.246 115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.507 229.974L144.609 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.472 238.38C154.485 238.392 154.499 238.402 154.513 238.412L143.846 247.482L143.827 247.497C126.56 261.128 109.472 268.745 94.8019 268.745C88.5916 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3164 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3363 185.327 9.52301 167.51 9.52301 147.193C9.52301 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3164 60.3243 61.3496 39.2555 77.0657 30.1797C94.6494 20.0265 119.486 27.3959 144.599 47.4924ZM70.6423 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5176 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8516 207.742 83.0977 205.066 70.6423 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1787 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.9311 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.759 110.203C59.234 110.839 57.7378 111.475 56.27 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9104 147.193C67.822 135.23 63.7566 122.855 60.759 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.854 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.6291 47.6015 67.6975 64.5954 70.0424 87.9446L70.0416 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8263 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.773 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.29 38.512C183.321 38.512 169.34 44.4991 154.444 56.0153C163.93 64.9374 172.634 74.6557 180.462 85.064C193.375 86.6345 206.128 89.3102 218.584 93.0624C218.812 91.4325 219.003 89.8118 219.165 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.552 64.3097C138.104 70.2614 132.054 76.6306 126.443 83.3765C132.39 82.995 138.426 82.8046 144.552 82.8046C150.727 82.8046 156.778 83.0143 162.707 83.3765C157.08 76.6293 151.015 70.2596 144.552 64.3097Z" fill="white"/><path d="M144.598 47.4924C169.712 27.3959 194.547 20.0265 212.131 30.1797C227.847 39.2555 234.88 60.3243 231.926 89.516C231.677 92.0069 231.327 94.5423 230.941 97.1058L228.526 110.14L228.496 110.127C228.487 110.165 228.478 110.203 228.469 110.24L216.255 105.741L216.249 105.723C207.916 103.125 199.42 101.075 190.82 99.5888L190.696 99.5588L173.525 97.2648L173.511 97.263C173.492 97.236 173.468 97.2176 173.447 97.1905C163.863 96.2064 154.234 95.7166 144.598 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8622 138.391 86.939 147.193C90.8622 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245L115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.506 229.974L144.61 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.473 238.38L154.512 238.412L143.847 247.482L143.827 247.497C126.56 261.13 109.472 268.745 94.8018 268.745C88.5915 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3162 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3362 185.327 9.52298 167.51 9.52298 147.193C9.52298 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3162 60.3243 61.3496 39.2555 77.0657 30.1797C94.6493 20.0265 119.486 27.3959 144.598 47.4924ZM70.6422 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5175 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8515 207.742 83.0977 205.066 70.6422 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1786 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.931 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.7589 110.203C59.234 110.839 57.7378 111.475 56.2699 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9103 147.193C67.822 135.23 63.7566 122.855 60.7589 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.8539 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.629 47.6015 67.6975 64.5954 70.0424 87.9446L70.0415 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8262 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.772 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.291 38.512C183.321 38.512 169.34 44.4991 154.443 56.0153C163.929 64.9374 172.634 74.6557 180.462 85.064C193.374 86.6345 206.129 89.3102 218.584 93.0624C218.813 91.4325 219.003 89.8118 219.166 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.551 64.3097C138.103 70.2614 132.055 76.6306 126.443 83.3765C132.389 82.995 138.427 82.8046 144.551 82.8046C150.727 82.8046 156.779 83.0143 162.707 83.3765C157.079 76.6293 151.015 70.2596 144.551 64.3097Z" fill="#FF40E0"/></g><mask id="mask1_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="102" y="84" width="161" height="162"><path d="M235.282 84.827L102.261 112.259L129.693 245.28L262.714 217.848L235.282 84.827Z" fill="white"/></mask><g mask="url(#mask1_0_3)"><path d="M136.863 129.916L213.258 141.224C220.669 142.322 222.495 152.179 215.967 155.856L187.592 171.843L184.135 204.227C183.339 211.678 173.564 213.901 169.624 207.526L129.021 141.831C125.503 136.14 130.245 128.936 136.863 129.916Z" fill="#FF40E0" stroke="#FF40E0" stroke-width="0.817337" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_0_3"><rect width="294" height="294" fill="white"/></clipPath></defs></svg>')}`;console.log(`%cReact Grab${r?` v${r}`:""}%c
29
+ https://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${i}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,""),fetch("https://www.react-grab.com/api/version").then(s=>s.text()).catch(()=>null);}catch{}})(),Me(r=>{let[o,i]=E(false),[s,l]=E(-1e3),[a,c]=E(-1e3),[m,d]=E(false),[x,g]=E(-1e3),[p,S]=E(-1e3),[A,W]=E(false),[G,Y]=E(null),[V,Z]=E(null),[ye,Fe]=E(0),[_e,Ie]=E([]),[st,C]=E([]),[h,f]=E(false),[y,v]=E(false),[k,I]=E(false),[F,$]=E(false),[M,N]=E(-1e3),[U,z]=E(-1e3),[O,H]=E(false),[se,Ne]=E(0),[ae,we]=E(false),[Xe,Pe]=E(""),K=null,Q=null,de=null,te=null,he=null,Ce=null,Le=D(()=>h()&&!A()),Hr=D(()=>s()>-1e3&&a()>-1e3),Br=u=>(u.metaKey||u.ctrlKey)&&u.code==="KeyC",fn=(u,w)=>({top:w<25,bottom:w>window.innerHeight-25,left:u<25,right:u>window.innerWidth-25}),dn=(u,w)=>{let T=`grabbed-${Date.now()}-${Math.random()}`,B=Date.now(),le={id:T,bounds:u,createdAt:B,element:w},ce=_e();Ie([...ce,le]),setTimeout(()=>{Ie(X=>X.filter(oe=>oe.id!==T));},1700);},mn=u=>{let w=`success-${Date.now()}-${Math.random()}`;C(T=>[...T,{id:w,text:u}]),setTimeout(()=>{C(T=>T.filter(B=>B.id!==w));},1700);},jr=u=>`<selected_element>
30
30
  ${u}
31
- </selected_element>`,dn=u=>(u.tagName||"").toLowerCase(),mn=u=>{let w=dn(u),T=vr(u);return w&&T?`<${w}> in ${T}`:w?`<${w}>`:"<element>"},gn=u=>{try{let w=u.map(T=>({tagName:dn(T)}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:w}}));}catch{}},it=async(u,w,T)=>{I(u),X(w),W(true),Gr(),await T().finally(()=>{W(false),st(),y()&&pe();});},Hr=u=>"innerText"in u,Br=u=>Hr(u)?u.innerText:u.textContent??"",pn=u=>u.map(w=>Br(w).trim()).filter(w=>w.length>0).join(`
31
+ </selected_element>`,gn=u=>(u.tagName||"").toLowerCase(),pn=u=>{let w=gn(u),T=_r(u);return w&&T?`<${w}> in ${T}`:w?`<${w}>`:"<element>"},hn=u=>{try{let w=u.map(T=>({tagName:gn(T)}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:w}}));}catch{}},at=async(u,w,T)=>{N(u),z(w),W(true),Xr(),await T().finally(()=>{W(false),lt(),y()&&be();});},Vr=u=>"innerText"in u,Ur=u=>Vr(u)?u.innerText:u.textContent??"",bn=u=>u.map(w=>Ur(w).trim()).filter(w=>w.length>0).join(`
32
32
 
33
- `),hn=async(u,w)=>{let T=false;try{let ae=(await Promise.allSettled(u.map(async H=>`## HTML Frame:
34
- ${_r(H)}
33
+ `),yn=async(u,w)=>{let T=false,B=ze();try{let ce=(await Promise.allSettled(u.map(async X=>{let oe=Or(X);if(!B)return `## HTML Frame:
34
+ ${oe}`;let Bt=await Ar(X),An=kr(Bt);return An?`## HTML Frame:
35
+ ${oe}
35
36
 
36
37
  ## Code Location:
37
- ${Rr(await Er(H))}`))).map(H=>H.status==="fulfilled"?H.value:"").filter(H=>H.trim());if(ae.length>0){let H=ae.map(Re=>Dr(Re)).join(`
38
+ ${An}`:`## HTML Frame:
39
+ ${oe}`}))).map(X=>X.status==="fulfilled"?X.value:"").filter(X=>X.trim());if(ce.length>0){let X=ce.map(Bt=>jr(Bt)).join(`
38
40
 
39
- `),Ee=w?`${w}
41
+ `),oe=w?`${w}
40
42
 
41
- ${H}`:H;T=await It(Ee,t.playCopySound?nt:void 0);}if(!T){let H=pn(u);if(H.length>0){let Ee=w?`${w}
43
+ ${X}`:X;T=await Lt(oe,t.playCopySound?ot:void 0);}if(!T){let X=bn(u);if(X.length>0){let oe=w?`${w}
42
44
 
43
- ${H}`:H;T=await It(Ee,t.playCopySound?nt:void 0);}}}catch{let P=pn(u);if(P.length>0){let ae=w?`${w}
45
+ ${X}`:X;T=await Lt(oe,t.playCopySound?ot:void 0);}}}catch{let le=bn(u);if(le.length>0){let ce=w?`${w}
44
46
 
45
- ${P}`:P;T=await It(ae,t.playCopySound?nt:void 0);}}return T},bn=async(u,w)=>{un(Lt(u),u),await new Promise(P=>requestAnimationFrame(P)),await hn([u],w)&&fn(mn(u)),gn([u]);},yn=async u=>{if(u.length===0)return;for(let T of u)un(Lt(T),T);await new Promise(T=>requestAnimationFrame(T)),await hn(u)&&fn(`${u.length} elements`),gn(u);},Be=B(()=>!Pe()||m()?null:ln(s(),a())),jr=B(()=>{ie();let u=Be();if(!u)return;let w=u.getBoundingClientRect(),T=window.getComputedStyle(u);return {borderRadius:T.borderRadius||"0px",height:w.height,transform:T.transform||"none",width:w.width,x:w.left,y:w.top}}),wn=(u,w)=>{let T=u+window.scrollX,P=w+window.scrollY;return {x:Math.abs(T-x()),y:Math.abs(P-p())}},Cn=B(()=>{if(!m())return false;let u=wn(s(),a());return u.x>2||u.y>2}),xn=(u,w)=>{let T=u+window.scrollX,P=w+window.scrollY,ae=Math.min(x(),T),H=Math.min(p(),P),Ee=Math.abs(T-x()),Re=Math.abs(P-p());return {x:ae-window.scrollX,y:H-window.scrollY,width:Ee,height:Re}},Vr=B(()=>{if(!Cn())return;let u=xn(s(),a());return {borderRadius:"0px",height:u.height,transform:"none",width:u.width,x:u.x,y:u.y}}),Ur=B(()=>{let u=Be();return u?mn(u):"<element>"}),Sn=B(()=>A()?{x:$(),y:G()}:{x:s(),y:a()}),Tn=B(()=>A()?{x:$(),y:G()}:{x:s(),y:a()});J($e(()=>[Be(),Y()],([u,w])=>{w&&u&&w!==u&&z(null);})),J($e(()=>ie(),()=>{let u=ve();if(u.length===0)return;let w=u.map(T=>({...T,bounds:Lt(T.element)}));Ne(w);}));let Gr=()=>{let u=Date.now();Z(u),N(false),ue=window.setTimeout(()=>{N(true),ue=null;},150);let w=()=>{let T=U();if(T===null)return;let ae=(Date.now()-T)/t.keyHoldDuration,H=1-Math.exp(-ae),Re=A()?Math.min(H,.95):1;Fe(Re),Re<1&&(Q=requestAnimationFrame(w));};w();},st=()=>{Q!==null&&(cancelAnimationFrame(Q),Q=null),ue!==null&&(window.clearTimeout(ue),ue=null),Z(null),Fe(1),N(false);},Yr=()=>{let u=()=>{if(!m()){Xe();return}let w=cn(s(),a());w.top&&window.scrollBy(0,-10),w.bottom&&window.scrollBy(0,10),w.left&&window.scrollBy(-10,0),w.right&&window.scrollBy(10,0),w.top||w.bottom||w.left||w.right?ye=requestAnimationFrame(u):ye=null;};u();},Xe=()=>{ye!==null&&(cancelAnimationFrame(ye),ye=null);},at=()=>{st(),f(true),document.body.style.cursor="crosshair",t.onActivate?.();},pe=()=>{v(false),i(false),f(false),be(false),Le(""),document.body.style.cursor="",m()&&(d(false),document.body.style.userSelect=""),K&&window.clearTimeout(K),te&&window.clearTimeout(te),ge&&(window.clearTimeout(ge),ge=null),j(false),Xe(),st(),t.onDeactivate?.();},zr=u=>{Le(u);},Xr=()=>{if(!se())return;let u=Be(),w=ze().trim(),T=s(),P=a();be(false),Le(""),u?it(T,P,()=>bn(u,w||void 0)).then(()=>{pe();}):pe();},vn=()=>{se()&&pe();},En=new AbortController,we=En.signal;window.addEventListener("keydown",u=>{if(u.key==="Escape"&&o()){if(se())return;pe();return}if(u.key==="Enter"&&o()&&!se()){v(true),te!==null&&(window.clearTimeout(te),te=null),h()||(K&&window.clearTimeout(K),at()),be(true);return}if(!(!t.allowActivationInsideInput&&Yn(u))&&$r(u)){if(h()){if(y())return;te!==null&&window.clearTimeout(te),te=window.setTimeout(()=>{pe();},200);return}u.repeat||(K!==null&&window.clearTimeout(K),o()||i(true),K=window.setTimeout(()=>{at();},t.keyHoldDuration));}},{signal:we,capture:true}),window.addEventListener("keyup",u=>{if(!o()&&!h())return;let w=!u.metaKey&&!u.ctrlKey;if(u.key.toLowerCase()==="c"||w){if(y())return;pe();}},{signal:we,capture:true}),window.addEventListener("mousemove",u=>{if(l(u.clientX),c(u.clientY),ge!==null&&window.clearTimeout(ge),j(false),ge=window.setTimeout(()=>{j(true),ge=null;},300),m()){let w=cn(u.clientX,u.clientY),T=w.top||w.bottom||w.left||w.right;T&&ye===null?Yr():!T&&ye!==null&&Xe();}},{signal:we}),window.addEventListener("mousedown",u=>{if(se()){u.target.closest("[data-react-grab-input]")||vn();return}!Pe()||A()||(u.preventDefault(),d(true),g(u.clientX+window.scrollX),S(u.clientY+window.scrollY),document.body.style.userSelect="none");},{signal:we}),window.addEventListener("mouseup",u=>{if(!m())return;let w=wn(u.clientX,u.clientY),T=w.x>2||w.y>2;if(d(false),Xe(),document.body.style.userSelect="",T){D(true);let P=xn(u.clientX,u.clientY),ae=Fr(P,rt);if(ae.length>0)it(u.clientX,u.clientY,()=>yn(ae));else {let H=Nr(P,rt);H.length>0&&it(u.clientX,u.clientY,()=>yn(H));}}else {let P=ln(u.clientX,u.clientY);if(!P)return;z(P),it(u.clientX,u.clientY,()=>bn(P));}},{signal:we}),window.addEventListener("click",u=>{(Pe()||A()||F())&&(u.preventDefault(),u.stopPropagation(),F()&&D(false),y()&&!A()&&(o()?v(false):pe()));},{signal:we,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&Ne([]);},{signal:we}),window.addEventListener("scroll",()=>{Ie(u=>u+1);},{signal:we,capture:true}),window.addEventListener("resize",()=>{Ie(u=>u+1);},{signal:we}),ce(()=>{En.abort(),K&&window.clearTimeout(K),te&&window.clearTimeout(te),ge&&window.clearTimeout(ge),Xe(),st(),document.body.style.userSelect="",document.body.style.cursor="";});let qr=zn(),Wr=B(()=>Pe()&&!m()&&!!Be()),Zr=B(()=>Pe()&&Cn()),Kr=B(()=>A()?"processing":"hover"),Qr=B(()=>se()?false:A()?true:ot().length>0?false:Pe()&&!m()&&!!Be()),Jr=B(()=>A()&&k()&&Mr()),eo=B(()=>Pe()&&!m()),to=B(()=>se());return Vn(()=>R(Kn,{get selectionVisible(){return Wr()},get selectionBounds(){return jr()},get dragVisible(){return Zr()},get dragBounds(){return Vr()},get grabbedBoxes(){return ve()},get successLabels(){return ot()},get labelVariant(){return Kr()},get labelText(){return Ur()},get labelX(){return Sn().x},get labelY(){return Sn().y},get labelVisible(){return Qr()},labelZIndex:2147483647,get labelShowHint(){return O()},get progressVisible(){return Jr()},get progress(){return he()},get mouseX(){return Tn().x},get mouseY(){return Tn().y},get crosshairVisible(){return eo()},get inputVisible(){return to()},get inputX(){return s()},get inputY(){return a()},get inputValue(){return ze()},onInputChange:zr,onInputSubmit:Xr,onInputCancel:vn}),qr),{activate:()=>{h()||at();},deactivate:()=>{h()&&pe();},toggle:()=>{h()?pe():at();},isActive:()=>h(),dispose:r}}))};var Pr=null,Jl=()=>Pr;Pr=Lr();/*! Bundled license information:
47
+ ${le}`:le;T=await Lt(ce,t.playCopySound?ot:void 0);}}return T},wn=async(u,w)=>{dn(Mt(u),u),await new Promise(B=>requestAnimationFrame(B)),await yn([u],w)&&mn(pn(u)),hn([u]);},Cn=async u=>{if(u.length===0)return;for(let T of u)dn(Mt(T),T);await new Promise(T=>requestAnimationFrame(T)),await yn(u)&&mn(`${u.length} elements`),hn(u);},Be=D(()=>!Le()||m()?null:un(s(),a())),Gr=D(()=>{se();let u=Be();if(!u)return;let w=u.getBoundingClientRect(),T=window.getComputedStyle(u);return {borderRadius:T.borderRadius||"0px",height:w.height,transform:T.transform||"none",width:w.width,x:w.left,y:w.top}}),xn=(u,w)=>{let T=u+window.scrollX,B=w+window.scrollY;return {x:Math.abs(T-x()),y:Math.abs(B-p())}},Sn=D(()=>{if(!m())return false;let u=xn(s(),a());return u.x>2||u.y>2}),Tn=(u,w)=>{let T=u+window.scrollX,B=w+window.scrollY,le=Math.min(x(),T),ce=Math.min(p(),B),X=Math.abs(T-x()),oe=Math.abs(B-p());return {x:le-window.scrollX,y:ce-window.scrollY,width:X,height:oe}},Yr=D(()=>{if(!Sn())return;let u=Tn(s(),a());return {borderRadius:"0px",height:u.height,transform:"none",width:u.width,x:u.x,y:u.y}}),zr=D(()=>{let u=Be();return u?pn(u):"<element>"}),vn=D(()=>A()?{x:M(),y:U()}:{x:s(),y:a()}),En=D(()=>A()?{x:M(),y:U()}:{x:s(),y:a()});J($e(()=>[Be(),G()],([u,w])=>{w&&u&&w!==u&&Y(null);})),J($e(()=>se(),()=>{let u=_e();if(u.length===0)return;let w=u.map(T=>({...T,bounds:Mt(T.element)}));Ie(w);}));let Xr=()=>{let u=Date.now();Z(u),I(false),de=window.setTimeout(()=>{I(true),de=null;},150);let w=()=>{let T=V();if(T===null)return;let le=(Date.now()-T)/t.keyHoldDuration,ce=1-Math.exp(-le),oe=A()?Math.min(ce,.95):1;Fe(oe),oe<1&&(Q=requestAnimationFrame(w));};w();},lt=()=>{Q!==null&&(cancelAnimationFrame(Q),Q=null),de!==null&&(window.clearTimeout(de),de=null),Z(null),Fe(1),I(false);},qr=()=>{let u=()=>{if(!m()){qe();return}let w=fn(s(),a());w.top&&window.scrollBy(0,-10),w.bottom&&window.scrollBy(0,10),w.left&&window.scrollBy(-10,0),w.right&&window.scrollBy(10,0),w.top||w.bottom||w.left||w.right?Ce=requestAnimationFrame(u):Ce=null;};u();},qe=()=>{Ce!==null&&(cancelAnimationFrame(Ce),Ce=null);},ct=()=>{lt(),f(true),document.body.style.cursor="crosshair",t.onActivate?.();},be=()=>{v(false),i(false),f(false),we(false),Pe(""),document.body.style.cursor="",m()&&(d(false),document.body.style.userSelect=""),K&&window.clearTimeout(K),te&&window.clearTimeout(te),he&&(window.clearTimeout(he),he=null),H(false),qe(),lt(),t.onDeactivate?.();},Wr=u=>{Pe(u);},Zr=()=>{if(!ae())return;let u=Be(),w=Xe().trim(),T=s(),B=a();we(false),Pe(""),u?at(T,B,()=>wn(u,w||void 0)).then(()=>{be();}):be();},Rn=()=>{ae()&&be();},_n=new AbortController,xe=_n.signal;window.addEventListener("keydown",u=>{if(u.code==="Escape"&&o()){if(ae())return;be();return}if(u.code==="Enter"&&o()&&!ae()){v(true),te!==null&&(window.clearTimeout(te),te=null),h()||(K&&window.clearTimeout(K),ct()),we(true);return}if(!(!t.allowActivationInsideInput&&qn(u))&&Br(u)){if(h()){if(y())return;te!==null&&window.clearTimeout(te),te=window.setTimeout(()=>{be();},200);return}u.repeat||(K!==null&&window.clearTimeout(K),o()||i(true),K=window.setTimeout(()=>{ct();},t.keyHoldDuration));}},{signal:xe,capture:true}),window.addEventListener("keyup",u=>{if(!o()&&!h())return;let w=!u.metaKey&&!u.ctrlKey;if(u.code==="KeyC"||w){if(y())return;be();}},{signal:xe,capture:true}),window.addEventListener("mousemove",u=>{if(l(u.clientX),c(u.clientY),he!==null&&window.clearTimeout(he),H(false),he=window.setTimeout(()=>{H(true),he=null;},300),m()){let w=fn(u.clientX,u.clientY),T=w.top||w.bottom||w.left||w.right;T&&Ce===null?qr():!T&&Ce!==null&&qe();}},{signal:xe}),window.addEventListener("mousedown",u=>{if(ae()){u.target.closest("[data-react-grab-input]")||Rn();return}!Le()||A()||(u.preventDefault(),d(true),g(u.clientX+window.scrollX),S(u.clientY+window.scrollY),document.body.style.userSelect="none");},{signal:xe}),window.addEventListener("mouseup",u=>{if(!m())return;let w=xn(u.clientX,u.clientY),T=w.x>2||w.y>2;if(d(false),qe(),document.body.style.userSelect="",T){$(true);let B=Tn(u.clientX,u.clientY),le=Pr(B,it);if(le.length>0)at(u.clientX,u.clientY,()=>Cn(le));else {let ce=Lr(B,it);ce.length>0&&at(u.clientX,u.clientY,()=>Cn(ce));}}else {let B=un(u.clientX,u.clientY);if(!B)return;Y(B),at(u.clientX,u.clientY,()=>wn(B));}},{signal:xe}),window.addEventListener("click",u=>{(Le()||A()||F())&&(u.preventDefault(),u.stopPropagation(),F()&&$(false),y()&&!A()&&(o()?v(false):be()));},{signal:xe,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&Ie([]);},{signal:xe}),window.addEventListener("scroll",()=>{Ne(u=>u+1);},{signal:xe,capture:true}),window.addEventListener("resize",()=>{Ne(u=>u+1);},{signal:xe}),fe(()=>{_n.abort(),K&&window.clearTimeout(K),te&&window.clearTimeout(te),he&&window.clearTimeout(he),qe(),lt(),document.body.style.userSelect="",document.body.style.cursor="";});let Kr=Wn(),Qr=D(()=>Le()&&!m()&&!!Be()),Jr=D(()=>Le()&&Sn()),eo=D(()=>A()?"processing":"hover"),to=D(()=>ae()?false:A()?true:st().length>0?false:Le()&&!m()&&!!Be()),no=D(()=>A()&&k()&&Hr()),ro=D(()=>Le()&&!m()),oo=D(()=>ae());return Yn(()=>R(er,{get selectionVisible(){return Qr()},get selectionBounds(){return Gr()},get dragVisible(){return Jr()},get dragBounds(){return Yr()},get grabbedBoxes(){return _e()},get successLabels(){return st()},get labelVariant(){return eo()},get labelText(){return zr()},get labelX(){return vn().x},get labelY(){return vn().y},get labelVisible(){return to()},labelZIndex:2147483647,get labelShowHint(){return O()},get progressVisible(){return no()},get progress(){return ye()},get mouseX(){return En().x},get mouseY(){return En().y},get crosshairVisible(){return ro()},get inputVisible(){return oo()},get inputX(){return s()},get inputY(){return a()},get inputValue(){return Xe()},onInputChange:Wr,onInputSubmit:Zr,onInputCancel:Rn}),Kr),{activate:()=>{h()||ct();},deactivate:()=>{h()&&be();},toggle:()=>{h()?be():ct();},isActive:()=>h(),dispose:r}}))};var Dr=null,nc=()=>Dr;Dr=$r();/*! Bundled license information:
46
48
 
47
49
  bippy/dist/rdt-hook-CrcWl4lP.js:
48
50
  (**
@@ -103,4 +105,4 @@ bippy/dist/source.js:
103
105
  * This source code is licensed under the MIT license found in the
104
106
  * LICENSE file in the root directory of this source tree.
105
107
  *)
106
- */exports.getGlobalApi=Jl;exports.init=Lr;exports.playCopySound=nt;return exports;})({});
108
+ */exports.getGlobalApi=nc;exports.init=$r;exports.playCopySound=ot;return exports;})({});
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { delegateEvents, render, createComponent, memo, template, effect, style, insert, setStyleProperty, use } from 'solid-js/web';
2
2
  import { createRoot, createSignal, createMemo, createEffect, on, onCleanup, Show, For, onMount } from 'solid-js';
3
- import { getFiberFromHostInstance, traverseFiber, isCompositeFiber, getDisplayName, isFiber, getLatestFiber, isHostFiber } from 'bippy';
4
- import { isSourceFile, normalizeFileName, getSource } from 'bippy/source';
3
+ import { isInstrumentationActive, getFiberFromHostInstance, traverseFiber, isCompositeFiber, getDisplayName, isFiber, getLatestFiber, isHostFiber } from 'bippy';
4
+ import { getSource, isSourceFile, normalizeFileName } from 'bippy/source';
5
5
 
6
6
  /**
7
7
  * @license MIT
@@ -614,11 +614,11 @@ var InputOverlay = (props) => {
614
614
  return fallback;
615
615
  };
616
616
  const handleKeyDown = (event) => {
617
- if (event.key === "Enter" && !event.shiftKey) {
617
+ if (event.code === "Enter" && !event.shiftKey) {
618
618
  event.preventDefault();
619
619
  event.stopPropagation();
620
620
  props.onSubmit();
621
- } else if (event.key === "Escape") {
621
+ } else if (event.code === "Escape") {
622
622
  event.preventDefault();
623
623
  event.stopPropagation();
624
624
  props.onCancel();
@@ -857,50 +857,60 @@ var checkIsSourceComponentName = (name) => {
857
857
  return true;
858
858
  };
859
859
  var getNearestComponentName = (element) => {
860
- const fiber = getFiberFromHostInstance(element);
861
- if (!fiber) return null;
862
- let foundComponentName = null;
863
- traverseFiber(
864
- fiber,
865
- (currentFiber) => {
866
- if (isCompositeFiber(currentFiber)) {
867
- const displayName = getDisplayName(currentFiber);
868
- if (displayName && checkIsSourceComponentName(displayName)) {
869
- foundComponentName = displayName;
870
- return true;
860
+ if (!isInstrumentationActive()) return null;
861
+ try {
862
+ const fiber = getFiberFromHostInstance(element);
863
+ if (!fiber) return null;
864
+ let foundComponentName = null;
865
+ traverseFiber(
866
+ fiber,
867
+ (currentFiber) => {
868
+ if (isCompositeFiber(currentFiber)) {
869
+ const displayName = getDisplayName(currentFiber);
870
+ if (displayName && checkIsSourceComponentName(displayName)) {
871
+ foundComponentName = displayName;
872
+ return true;
873
+ }
871
874
  }
872
- }
873
- return false;
874
- },
875
- true
876
- );
877
- return foundComponentName;
875
+ return false;
876
+ },
877
+ true
878
+ );
879
+ return foundComponentName;
880
+ } catch {
881
+ return null;
882
+ }
878
883
  };
879
884
  var getStack = async (element) => {
880
- const maybeFiber = getFiberFromHostInstance(element);
881
- if (!maybeFiber || !isFiber(maybeFiber)) return [];
882
- const fiber = getLatestFiber(maybeFiber);
883
- const unresolvedStack = [];
884
- traverseFiber(
885
- fiber,
886
- (currentFiber) => {
887
- const displayName = isHostFiber(currentFiber) ? typeof currentFiber.type === "string" ? currentFiber.type : null : getDisplayName(currentFiber);
888
- if (displayName && !checkIsInternalComponentName(displayName)) {
889
- unresolvedStack.push({
890
- name: displayName,
891
- sourcePromise: getSource(currentFiber)
892
- });
893
- }
894
- },
895
- true
896
- );
897
- const resolvedStack = await Promise.all(
898
- unresolvedStack.map(async (frame) => ({
899
- name: frame.name,
900
- source: await frame.sourcePromise
901
- }))
902
- );
903
- return resolvedStack.filter((frame) => frame.source !== null);
885
+ if (!isInstrumentationActive()) return [];
886
+ try {
887
+ const maybeFiber = getFiberFromHostInstance(element);
888
+ if (!maybeFiber || !isFiber(maybeFiber)) return [];
889
+ const fiber = getLatestFiber(maybeFiber);
890
+ const unresolvedStack = [];
891
+ traverseFiber(
892
+ fiber,
893
+ (currentFiber) => {
894
+ const displayName = isHostFiber(currentFiber) ? typeof currentFiber.type === "string" ? currentFiber.type : null : getDisplayName(currentFiber);
895
+ if (displayName && !checkIsInternalComponentName(displayName)) {
896
+ unresolvedStack.push({
897
+ name: displayName,
898
+ sourcePromise: getSource(currentFiber)
899
+ });
900
+ }
901
+ },
902
+ true
903
+ );
904
+ const resolvedStack = await Promise.all(
905
+ unresolvedStack.map(async (frame) => ({
906
+ name: frame.name,
907
+ source: await frame.sourcePromise
908
+ }))
909
+ );
910
+ return resolvedStack.filter((frame) => frame.source !== null);
911
+ } catch {
912
+ return [];
913
+ }
904
914
  };
905
915
  var formatStack = (stack) => {
906
916
  const isNextProject = checkIsNextProject();
@@ -943,7 +953,7 @@ var getHTMLPreview = (element) => {
943
953
  if (node.textContent && node.textContent.trim().length > 0) {
944
954
  foundFirstText = true;
945
955
  }
946
- } else if (node.nodeType === Node.ELEMENT_NODE) {
956
+ } else if (node instanceof Element) {
947
957
  if (!foundFirstText) {
948
958
  topElements.push(node);
949
959
  } else {
@@ -1198,12 +1208,12 @@ var init = (rawOptions) => {
1198
1208
  hasInited = true;
1199
1209
  const logIntro = () => {
1200
1210
  try {
1201
- const version = "0.0.45";
1211
+ const version = "0.0.47";
1202
1212
  const logoSvg = `<svg width="294" height="294" viewBox="0 0 294 294" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_0_3)"><mask id="mask0_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="294" height="294"><path d="M294 0H0V294H294V0Z" fill="white"/></mask><g mask="url(#mask0_0_3)"><path d="M144.599 47.4924C169.712 27.3959 194.548 20.0265 212.132 30.1797C227.847 39.2555 234.881 60.3243 231.926 89.516C231.677 92.0069 231.328 94.5423 230.94 97.1058L228.526 110.14C228.517 110.136 228.505 110.132 228.495 110.127C228.486 110.165 228.479 110.203 228.468 110.24L216.255 105.741C216.256 105.736 216.248 105.728 216.248 105.723C207.915 103.125 199.421 101.075 190.82 99.5888L190.696 99.5588L173.526 97.2648L173.511 97.2631C173.492 97.236 173.467 97.2176 173.447 97.1905C163.862 96.2064 154.233 95.7166 144.599 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8624 138.391 86.939 147.193C90.8624 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245C115.749 197.245 115.758 197.246 115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.507 229.974L144.609 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.472 238.38C154.485 238.392 154.499 238.402 154.513 238.412L143.846 247.482L143.827 247.497C126.56 261.128 109.472 268.745 94.8019 268.745C88.5916 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3164 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3363 185.327 9.52301 167.51 9.52301 147.193C9.52301 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3164 60.3243 61.3496 39.2555 77.0657 30.1797C94.6494 20.0265 119.486 27.3959 144.599 47.4924ZM70.6423 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5176 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8516 207.742 83.0977 205.066 70.6423 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1787 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.9311 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.759 110.203C59.234 110.839 57.7378 111.475 56.27 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9104 147.193C67.822 135.23 63.7566 122.855 60.759 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.854 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.6291 47.6015 67.6975 64.5954 70.0424 87.9446L70.0416 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8263 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.773 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.29 38.512C183.321 38.512 169.34 44.4991 154.444 56.0153C163.93 64.9374 172.634 74.6557 180.462 85.064C193.375 86.6345 206.128 89.3102 218.584 93.0624C218.812 91.4325 219.003 89.8118 219.165 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.552 64.3097C138.104 70.2614 132.054 76.6306 126.443 83.3765C132.39 82.995 138.426 82.8046 144.552 82.8046C150.727 82.8046 156.778 83.0143 162.707 83.3765C157.08 76.6293 151.015 70.2596 144.552 64.3097Z" fill="white"/><path d="M144.598 47.4924C169.712 27.3959 194.547 20.0265 212.131 30.1797C227.847 39.2555 234.88 60.3243 231.926 89.516C231.677 92.0069 231.327 94.5423 230.941 97.1058L228.526 110.14L228.496 110.127C228.487 110.165 228.478 110.203 228.469 110.24L216.255 105.741L216.249 105.723C207.916 103.125 199.42 101.075 190.82 99.5888L190.696 99.5588L173.525 97.2648L173.511 97.263C173.492 97.236 173.468 97.2176 173.447 97.1905C163.863 96.2064 154.234 95.7166 144.598 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8622 138.391 86.939 147.193C90.8622 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245L115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.506 229.974L144.61 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.473 238.38L154.512 238.412L143.847 247.482L143.827 247.497C126.56 261.13 109.472 268.745 94.8018 268.745C88.5915 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3162 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3362 185.327 9.52298 167.51 9.52298 147.193C9.52298 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3162 60.3243 61.3496 39.2555 77.0657 30.1797C94.6493 20.0265 119.486 27.3959 144.598 47.4924ZM70.6422 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5175 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8515 207.742 83.0977 205.066 70.6422 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1786 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.931 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.7589 110.203C59.234 110.839 57.7378 111.475 56.2699 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9103 147.193C67.822 135.23 63.7566 122.855 60.7589 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.8539 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.629 47.6015 67.6975 64.5954 70.0424 87.9446L70.0415 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8262 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.772 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.291 38.512C183.321 38.512 169.34 44.4991 154.443 56.0153C163.929 64.9374 172.634 74.6557 180.462 85.064C193.374 86.6345 206.129 89.3102 218.584 93.0624C218.813 91.4325 219.003 89.8118 219.166 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.551 64.3097C138.103 70.2614 132.055 76.6306 126.443 83.3765C132.389 82.995 138.427 82.8046 144.551 82.8046C150.727 82.8046 156.779 83.0143 162.707 83.3765C157.079 76.6293 151.015 70.2596 144.551 64.3097Z" fill="#FF40E0"/></g><mask id="mask1_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="102" y="84" width="161" height="162"><path d="M235.282 84.827L102.261 112.259L129.693 245.28L262.714 217.848L235.282 84.827Z" fill="white"/></mask><g mask="url(#mask1_0_3)"><path d="M136.863 129.916L213.258 141.224C220.669 142.322 222.495 152.179 215.967 155.856L187.592 171.843L184.135 204.227C183.339 211.678 173.564 213.901 169.624 207.526L129.021 141.831C125.503 136.14 130.245 128.936 136.863 129.916Z" fill="#FF40E0" stroke="#FF40E0" stroke-width="0.817337" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_0_3"><rect width="294" height="294" fill="white"/></clipPath></defs></svg>`;
1203
1213
  const logoDataUri = `data:image/svg+xml;base64,${btoa(logoSvg)}`;
1204
1214
  console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
1205
1215
  https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${logoDataUri}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`, "");
1206
- fetch("https://react-grab.com/api/version").then((res) => res.text()).catch(() => null);
1216
+ fetch("https://www.react-grab.com/api/version").then((res) => res.text()).catch(() => null);
1207
1217
  } catch {
1208
1218
  }
1209
1219
  };
@@ -1239,7 +1249,10 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
1239
1249
  let autoScrollAnimationId = null;
1240
1250
  const isRendererActive = createMemo(() => isActivated() && !isCopying());
1241
1251
  const hasValidMousePosition = createMemo(() => mouseX() > OFFSCREEN_POSITION && mouseY() > OFFSCREEN_POSITION);
1242
- const isTargetKeyCombination = (event) => (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c";
1252
+ const isTargetKeyCombination = (event) => (
1253
+ // NOTE: we use event.code instead of event.key for keyboard layout compatibility (e.g., AZERTY, QWERTZ)
1254
+ (event.metaKey || event.ctrlKey) && event.code === "KeyC"
1255
+ );
1243
1256
  const getAutoScrollDirection = (clientX, clientY) => {
1244
1257
  return {
1245
1258
  top: clientY < AUTO_SCROLL_EDGE_THRESHOLD_PX,
@@ -1324,12 +1337,26 @@ ${context}
1324
1337
  const createCombinedTextContent = (elements) => elements.map((element) => extractElementTextContent(element).trim()).filter((textContent) => textContent.length > 0).join("\n\n");
1325
1338
  const tryCopyWithFallback = async (elements, extraPrompt) => {
1326
1339
  let didCopy = false;
1340
+ const isReactProject = isInstrumentationActive();
1327
1341
  try {
1328
- const elementSnippetResults = await Promise.allSettled(elements.map(async (element) => `## HTML Frame:
1329
- ${getHTMLPreview(element)}
1342
+ const elementSnippetResults = await Promise.allSettled(elements.map(async (element) => {
1343
+ const htmlPreview = getHTMLPreview(element);
1344
+ if (!isReactProject) {
1345
+ return `## HTML Frame:
1346
+ ${htmlPreview}`;
1347
+ }
1348
+ const stack = await getStack(element);
1349
+ const formattedStack = formatStack(stack);
1350
+ if (formattedStack) {
1351
+ return `## HTML Frame:
1352
+ ${htmlPreview}
1330
1353
 
1331
1354
  ## Code Location:
1332
- ${formatStack(await getStack(element))}`));
1355
+ ${formattedStack}`;
1356
+ }
1357
+ return `## HTML Frame:
1358
+ ${htmlPreview}`;
1359
+ }));
1333
1360
  const elementSnippets = elementSnippetResults.map((result) => result.status === "fulfilled" ? result.value : "").filter((snippet) => snippet.trim());
1334
1361
  if (elementSnippets.length > 0) {
1335
1362
  const wrappedSnippets = elementSnippets.map((snippet) => wrapInSelectedElementTags(snippet)).join("\n\n");
@@ -1584,14 +1611,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
1584
1611
  const abortController = new AbortController();
1585
1612
  const eventListenerSignal = abortController.signal;
1586
1613
  window.addEventListener("keydown", (event) => {
1587
- if (event.key === "Escape" && isHoldingKeys()) {
1614
+ if (event.code === "Escape" && isHoldingKeys()) {
1588
1615
  if (isInputMode()) {
1589
1616
  return;
1590
1617
  }
1591
1618
  deactivateRenderer();
1592
1619
  return;
1593
1620
  }
1594
- if (event.key === "Enter" && isHoldingKeys() && !isInputMode()) {
1621
+ if (event.code === "Enter" && isHoldingKeys() && !isInputMode()) {
1595
1622
  setIsToggleMode(true);
1596
1623
  if (keydownSpamTimerId !== null) {
1597
1624
  window.clearTimeout(keydownSpamTimerId);
@@ -1635,7 +1662,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
1635
1662
  window.addEventListener("keyup", (event) => {
1636
1663
  if (!isHoldingKeys() && !isActivated()) return;
1637
1664
  const isReleasingModifier = !event.metaKey && !event.ctrlKey;
1638
- const isReleasingC = event.key.toLowerCase() === "c";
1665
+ const isReleasingC = event.code === "KeyC";
1639
1666
  if (isReleasingC || isReleasingModifier) {
1640
1667
  if (isToggleMode()) return;
1641
1668
  deactivateRenderer();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-grab",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
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",