react-grab 0.0.52 → 0.0.53

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.
@@ -5392,7 +5392,7 @@ var init = (rawOptions) => {
5392
5392
  hasInited = true;
5393
5393
  const logIntro = () => {
5394
5394
  try {
5395
- const version = "0.0.52";
5395
+ const version = "0.0.53";
5396
5396
  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>`;
5397
5397
  const logoDataUri = `data:image/svg+xml;base64,${btoa(logoSvg)}`;
5398
5398
  console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
@@ -5991,7 +5991,8 @@ ${plainTextContentOnly}` : plainTextContentOnly;
5991
5991
  } catch {
5992
5992
  }
5993
5993
  }, {
5994
- signal: eventListenerSignal
5994
+ signal: eventListenerSignal,
5995
+ capture: true
5995
5996
  });
5996
5997
  window.addEventListener("mouseup", (event) => {
5997
5998
  if (!isDragging()) return;
@@ -5390,7 +5390,7 @@ var init = (rawOptions) => {
5390
5390
  hasInited = true;
5391
5391
  const logIntro = () => {
5392
5392
  try {
5393
- const version = "0.0.52";
5393
+ const version = "0.0.53";
5394
5394
  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>`;
5395
5395
  const logoDataUri = `data:image/svg+xml;base64,${btoa(logoSvg)}`;
5396
5396
  console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
@@ -5989,7 +5989,8 @@ ${plainTextContentOnly}` : plainTextContentOnly;
5989
5989
  } catch {
5990
5990
  }
5991
5991
  }, {
5992
- signal: eventListenerSignal
5992
+ signal: eventListenerSignal,
5993
+ capture: true
5993
5994
  });
5994
5995
  window.addEventListener("mouseup", (event) => {
5995
5996
  if (!isDragging()) return;
package/dist/core.cjs CHANGED
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkZCGA27A6_cjs = require('./chunk-ZCGA27A6.cjs');
3
+ var chunk3OMOSCKI_cjs = require('./chunk-3OMOSCKI.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "DEFAULT_THEME", {
8
8
  enumerable: true,
9
- get: function () { return chunkZCGA27A6_cjs.DEFAULT_THEME; }
9
+ get: function () { return chunk3OMOSCKI_cjs.DEFAULT_THEME; }
10
10
  });
11
11
  Object.defineProperty(exports, "formatStack", {
12
12
  enumerable: true,
13
- get: function () { return chunkZCGA27A6_cjs.formatStack; }
13
+ get: function () { return chunk3OMOSCKI_cjs.formatStack; }
14
14
  });
15
15
  Object.defineProperty(exports, "getHTMLPreview", {
16
16
  enumerable: true,
17
- get: function () { return chunkZCGA27A6_cjs.getHTMLPreview; }
17
+ get: function () { return chunk3OMOSCKI_cjs.getHTMLPreview; }
18
18
  });
19
19
  Object.defineProperty(exports, "getNearestComponentName", {
20
20
  enumerable: true,
21
- get: function () { return chunkZCGA27A6_cjs.getNearestComponentName; }
21
+ get: function () { return chunk3OMOSCKI_cjs.getNearestComponentName; }
22
22
  });
23
23
  Object.defineProperty(exports, "getStack", {
24
24
  enumerable: true,
25
- get: function () { return chunkZCGA27A6_cjs.getStack; }
25
+ get: function () { return chunk3OMOSCKI_cjs.getStack; }
26
26
  });
27
27
  Object.defineProperty(exports, "init", {
28
28
  enumerable: true,
29
- get: function () { return chunkZCGA27A6_cjs.init; }
29
+ get: function () { return chunk3OMOSCKI_cjs.init; }
30
30
  });
31
31
  Object.defineProperty(exports, "isInstrumentationActive", {
32
32
  enumerable: true,
33
- get: function () { return chunkZCGA27A6_cjs.Ee; }
33
+ get: function () { return chunk3OMOSCKI_cjs.Ee; }
34
34
  });
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- export { DEFAULT_THEME, formatStack, getHTMLPreview, getNearestComponentName, getStack, init, Ee as isInstrumentationActive } from './chunk-CBPK6MDL.js';
1
+ export { DEFAULT_THEME, formatStack, getHTMLPreview, getNearestComponentName, getStack, init, Ee as isInstrumentationActive } from './chunk-XLGRJBAL.js';
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkZCGA27A6_cjs = require('./chunk-ZCGA27A6.cjs');
3
+ var chunk3OMOSCKI_cjs = require('./chunk-3OMOSCKI.cjs');
4
4
 
5
5
  /**
6
6
  * @license MIT
@@ -17,35 +17,35 @@ var getGlobalApi = () => {
17
17
  return globalApi;
18
18
  };
19
19
  if (typeof window !== "undefined") {
20
- globalApi = chunkZCGA27A6_cjs.init();
20
+ globalApi = chunk3OMOSCKI_cjs.init();
21
21
  }
22
22
 
23
23
  Object.defineProperty(exports, "DEFAULT_THEME", {
24
24
  enumerable: true,
25
- get: function () { return chunkZCGA27A6_cjs.DEFAULT_THEME; }
25
+ get: function () { return chunk3OMOSCKI_cjs.DEFAULT_THEME; }
26
26
  });
27
27
  Object.defineProperty(exports, "formatStack", {
28
28
  enumerable: true,
29
- get: function () { return chunkZCGA27A6_cjs.formatStack; }
29
+ get: function () { return chunk3OMOSCKI_cjs.formatStack; }
30
30
  });
31
31
  Object.defineProperty(exports, "getHTMLPreview", {
32
32
  enumerable: true,
33
- get: function () { return chunkZCGA27A6_cjs.getHTMLPreview; }
33
+ get: function () { return chunk3OMOSCKI_cjs.getHTMLPreview; }
34
34
  });
35
35
  Object.defineProperty(exports, "getNearestComponentName", {
36
36
  enumerable: true,
37
- get: function () { return chunkZCGA27A6_cjs.getNearestComponentName; }
37
+ get: function () { return chunk3OMOSCKI_cjs.getNearestComponentName; }
38
38
  });
39
39
  Object.defineProperty(exports, "getStack", {
40
40
  enumerable: true,
41
- get: function () { return chunkZCGA27A6_cjs.getStack; }
41
+ get: function () { return chunk3OMOSCKI_cjs.getStack; }
42
42
  });
43
43
  Object.defineProperty(exports, "init", {
44
44
  enumerable: true,
45
- get: function () { return chunkZCGA27A6_cjs.init; }
45
+ get: function () { return chunk3OMOSCKI_cjs.init; }
46
46
  });
47
47
  Object.defineProperty(exports, "isInstrumentationActive", {
48
48
  enumerable: true,
49
- get: function () { return chunkZCGA27A6_cjs.Ee; }
49
+ get: function () { return chunk3OMOSCKI_cjs.Ee; }
50
50
  });
51
51
  exports.getGlobalApi = getGlobalApi;
@@ -26,7 +26,7 @@ ${t.stack}`:""}},Cs=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=vo
26
26
  ${m}`),n.length>0){let g=n.length>100?`${n.slice(0,100)}...`:n;f+=`
27
27
  ${g}`;}let C=l(s);return C&&(f+=`
28
28
  ${C}`),f.length>0?`<${t}${r}>${f}
29
- </${t}>`:`<${t}${r} />`};var qs=()=>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();}),Qt=async(e,t)=>{await qs();try{try{return await navigator.clipboard.writeText(e),t?.(),!0}catch{return Ws(e,t)}}catch{return false}},Ws=(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 i=document.execCommand("copy");return i&&t?.(),i}finally{n.remove();}};var co=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var xt=e=>{if(e.closest(`[${nt}]`))return false;let t=window.getComputedStyle(e);return !(!co(e,t)||t.pointerEvents==="none")};var Nn=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(xt(r))return r;return null};var Zs=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom),s=Math.max(0,i-n),a=Math.max(0,o-r);return s*a},Ks=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,uo=(e,t,n)=>{let r=[],i=Array.from(document.querySelectorAll("*")),o={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};for(let s of i){if(!n){let l=(s.tagName||"").toUpperCase();if(l==="HTML"||l==="BODY")continue}if(!t(s))continue;let a=s.getBoundingClientRect(),c={left:a.left,top:a.top,right:a.left+a.width,bottom:a.top+a.height};if(n){let l=Zs(o,c),f=Math.max(0,a.width*a.height);f>0&&l/f>=.75&&r.push(s);}else Ks(c,o)&&r.push(s);}return r},fo=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),mo=(e,t)=>{let n=uo(e,t,true);return fo(n)},po=(e,t)=>{let n=uo(e,t,false);return fo(n)};var Qs=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),Js=e=>{let t=e.trim();if(!t)return null;let n=parseFloat(t);return Qs(n)?n:null},go=(e,t)=>{let n=e.split(",");if(n.length!==t)return null;let r=[];for(let i of n){let o=Js(i);if(o===null)return null;r.push(o);}return r},ea=(e,t,n,r)=>e===1&&t===0&&n===0&&r===1,ta=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[15]===1,Jt=e=>{try{if(!(e instanceof Element))return "none";let t=window.getComputedStyle(e);if(!t)return "none";let n=t.transform;if(!n||n==="none")return "none";let r=n.match(/^matrix3d\(([^)]+)\)$/);if(r){let o=go(r[1],16);if(o&&o.length===16){let s=[...o];return s[12]=0,s[13]=0,s[14]=0,ta(s)?"none":`matrix3d(${s.join(", ")})`}}let i=n.match(/^matrix\(([^)]+)\)$/);if(i){let o=go(i[1],6);if(o&&o.length===6){let[s,a,c,l]=o;return ea(s,a,c,l)?"none":`matrix(${s}, ${a}, ${c}, ${l}, 0, 0)`}}return "none"}catch{return "none"}};var en=e=>{let t=e.getBoundingClientRect();return {borderRadius:window.getComputedStyle(e).borderRadius||"0px",height:t.height,transform:Jt(e),width:t.width,x:t.left,y:t.top}};var W={enabled:true,hue:0,selectionBox:{enabled:true,color:void 0,borderRadius:void 0},dragBox:{enabled:true,color:void 0},grabbedBoxes:{enabled:true,color:void 0},elementLabel:{enabled:true,backgroundColor:void 0,textColor:void 0,borderColor:void 0,padding:void 0,cursorOffset:void 0},successLabels:{enabled:true},crosshair:{enabled:true,color:void 0},inputOverlay:{enabled:true}},bo=e=>e?{enabled:e.enabled??W.enabled,hue:e.hue??W.hue,selectionBox:{enabled:e.selectionBox?.enabled??W.selectionBox.enabled,color:e.selectionBox?.color??W.selectionBox.color,borderRadius:e.selectionBox?.borderRadius??W.selectionBox.borderRadius},dragBox:{enabled:e.dragBox?.enabled??W.dragBox.enabled,color:e.dragBox?.color??W.dragBox.color},grabbedBoxes:{enabled:e.grabbedBoxes?.enabled??W.grabbedBoxes.enabled,color:e.grabbedBoxes?.color??W.grabbedBoxes.color},elementLabel:{enabled:e.elementLabel?.enabled??W.elementLabel.enabled,backgroundColor:e.elementLabel?.backgroundColor??W.elementLabel.backgroundColor,textColor:e.elementLabel?.textColor??W.elementLabel.textColor,borderColor:e.elementLabel?.borderColor??W.elementLabel.borderColor,padding:e.elementLabel?.padding??W.elementLabel.padding,cursorOffset:e.elementLabel?.cursorOffset??W.elementLabel.cursorOffset},successLabels:{enabled:e.successLabels?.enabled??W.successLabels.enabled},crosshair:{enabled:e.crosshair?.enabled??W.crosshair.enabled,color:e.crosshair?.color??W.crosshair.color},inputOverlay:{enabled:e.inputOverlay?.enabled??W.inputOverlay.enabled}}:W,ho=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled,color:t.selectionBox?.color??e.selectionBox.color,borderRadius:t.selectionBox?.borderRadius??e.selectionBox.borderRadius},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled,color:t.dragBox?.color??e.dragBox.color},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled,color:t.grabbedBoxes?.color??e.grabbedBoxes.color},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled,backgroundColor:t.elementLabel?.backgroundColor??e.elementLabel.backgroundColor,textColor:t.elementLabel?.textColor??e.elementLabel.textColor,borderColor:t.elementLabel?.borderColor??e.elementLabel.borderColor,padding:t.elementLabel?.padding??e.elementLabel.padding,cursorOffset:t.elementLabel?.cursorOffset??e.elementLabel.cursorOffset},successLabels:{enabled:t.successLabels?.enabled??e.successLabels.enabled},crosshair:{enabled:t.crosshair?.enabled??e.crosshair.enabled,color:t.crosshair?.color??e.crosshair.color},inputOverlay:{enabled:t.inputOverlay?.enabled??e.inputOverlay.enabled}});var yo=re('<span class="font-mono tabular-nums align-middle">1 element'),wo=re('<span class="font-mono tabular-nums align-middle">&lt;<!>>'),oa=re('<span class="tabular-nums text-[10px] ml-1 align-middle"> in '),xo=false,Mn=e=>{let t={enabled:true,keyHoldDuration:200,allowActivationInsideInput:true,...e},n=bo(t.theme);return t.enabled===false||xo?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{},copyElement:()=>Promise.resolve(false),getState:()=>({isActive:false,isDragging:false,isCopying:false,targetElement:null,dragBounds:null}),updateTheme:()=>{},getTheme:()=>n}:(xo=true,(()=>{try{let i="0.0.52",s=`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${i?` v${i}`:""}%c
29
+ </${t}>`:`<${t}${r} />`};var qs=()=>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();}),Qt=async(e,t)=>{await qs();try{try{return await navigator.clipboard.writeText(e),t?.(),!0}catch{return Ws(e,t)}}catch{return false}},Ws=(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 i=document.execCommand("copy");return i&&t?.(),i}finally{n.remove();}};var co=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var xt=e=>{if(e.closest(`[${nt}]`))return false;let t=window.getComputedStyle(e);return !(!co(e,t)||t.pointerEvents==="none")};var Nn=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(xt(r))return r;return null};var Zs=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),o=Math.min(e.bottom,t.bottom),s=Math.max(0,i-n),a=Math.max(0,o-r);return s*a},Ks=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,uo=(e,t,n)=>{let r=[],i=Array.from(document.querySelectorAll("*")),o={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};for(let s of i){if(!n){let l=(s.tagName||"").toUpperCase();if(l==="HTML"||l==="BODY")continue}if(!t(s))continue;let a=s.getBoundingClientRect(),c={left:a.left,top:a.top,right:a.left+a.width,bottom:a.top+a.height};if(n){let l=Zs(o,c),f=Math.max(0,a.width*a.height);f>0&&l/f>=.75&&r.push(s);}else Ks(c,o)&&r.push(s);}return r},fo=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),mo=(e,t)=>{let n=uo(e,t,true);return fo(n)},po=(e,t)=>{let n=uo(e,t,false);return fo(n)};var Qs=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),Js=e=>{let t=e.trim();if(!t)return null;let n=parseFloat(t);return Qs(n)?n:null},go=(e,t)=>{let n=e.split(",");if(n.length!==t)return null;let r=[];for(let i of n){let o=Js(i);if(o===null)return null;r.push(o);}return r},ea=(e,t,n,r)=>e===1&&t===0&&n===0&&r===1,ta=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[15]===1,Jt=e=>{try{if(!(e instanceof Element))return "none";let t=window.getComputedStyle(e);if(!t)return "none";let n=t.transform;if(!n||n==="none")return "none";let r=n.match(/^matrix3d\(([^)]+)\)$/);if(r){let o=go(r[1],16);if(o&&o.length===16){let s=[...o];return s[12]=0,s[13]=0,s[14]=0,ta(s)?"none":`matrix3d(${s.join(", ")})`}}let i=n.match(/^matrix\(([^)]+)\)$/);if(i){let o=go(i[1],6);if(o&&o.length===6){let[s,a,c,l]=o;return ea(s,a,c,l)?"none":`matrix(${s}, ${a}, ${c}, ${l}, 0, 0)`}}return "none"}catch{return "none"}};var en=e=>{let t=e.getBoundingClientRect();return {borderRadius:window.getComputedStyle(e).borderRadius||"0px",height:t.height,transform:Jt(e),width:t.width,x:t.left,y:t.top}};var W={enabled:true,hue:0,selectionBox:{enabled:true,color:void 0,borderRadius:void 0},dragBox:{enabled:true,color:void 0},grabbedBoxes:{enabled:true,color:void 0},elementLabel:{enabled:true,backgroundColor:void 0,textColor:void 0,borderColor:void 0,padding:void 0,cursorOffset:void 0},successLabels:{enabled:true},crosshair:{enabled:true,color:void 0},inputOverlay:{enabled:true}},bo=e=>e?{enabled:e.enabled??W.enabled,hue:e.hue??W.hue,selectionBox:{enabled:e.selectionBox?.enabled??W.selectionBox.enabled,color:e.selectionBox?.color??W.selectionBox.color,borderRadius:e.selectionBox?.borderRadius??W.selectionBox.borderRadius},dragBox:{enabled:e.dragBox?.enabled??W.dragBox.enabled,color:e.dragBox?.color??W.dragBox.color},grabbedBoxes:{enabled:e.grabbedBoxes?.enabled??W.grabbedBoxes.enabled,color:e.grabbedBoxes?.color??W.grabbedBoxes.color},elementLabel:{enabled:e.elementLabel?.enabled??W.elementLabel.enabled,backgroundColor:e.elementLabel?.backgroundColor??W.elementLabel.backgroundColor,textColor:e.elementLabel?.textColor??W.elementLabel.textColor,borderColor:e.elementLabel?.borderColor??W.elementLabel.borderColor,padding:e.elementLabel?.padding??W.elementLabel.padding,cursorOffset:e.elementLabel?.cursorOffset??W.elementLabel.cursorOffset},successLabels:{enabled:e.successLabels?.enabled??W.successLabels.enabled},crosshair:{enabled:e.crosshair?.enabled??W.crosshair.enabled,color:e.crosshair?.color??W.crosshair.color},inputOverlay:{enabled:e.inputOverlay?.enabled??W.inputOverlay.enabled}}:W,ho=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled,color:t.selectionBox?.color??e.selectionBox.color,borderRadius:t.selectionBox?.borderRadius??e.selectionBox.borderRadius},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled,color:t.dragBox?.color??e.dragBox.color},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled,color:t.grabbedBoxes?.color??e.grabbedBoxes.color},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled,backgroundColor:t.elementLabel?.backgroundColor??e.elementLabel.backgroundColor,textColor:t.elementLabel?.textColor??e.elementLabel.textColor,borderColor:t.elementLabel?.borderColor??e.elementLabel.borderColor,padding:t.elementLabel?.padding??e.elementLabel.padding,cursorOffset:t.elementLabel?.cursorOffset??e.elementLabel.cursorOffset},successLabels:{enabled:t.successLabels?.enabled??e.successLabels.enabled},crosshair:{enabled:t.crosshair?.enabled??e.crosshair.enabled,color:t.crosshair?.color??e.crosshair.color},inputOverlay:{enabled:t.inputOverlay?.enabled??e.inputOverlay.enabled}});var yo=re('<span class="font-mono tabular-nums align-middle">1 element'),wo=re('<span class="font-mono tabular-nums align-middle">&lt;<!>>'),oa=re('<span class="tabular-nums text-[10px] ml-1 align-middle"> in '),xo=false,Mn=e=>{let t={enabled:true,keyHoldDuration:200,allowActivationInsideInput:true,...e},n=bo(t.theme);return t.enabled===false||xo?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{},copyElement:()=>Promise.resolve(false),getState:()=>({isActive:false,isDragging:false,isCopying:false,targetElement:null,dragBounds:null}),updateTheme:()=>{},getTheme:()=>n}:(xo=true,(()=>{try{let i="0.0.53",s=`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${i?` v${i}`:""}%c
30
30
  https://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${s}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,""),navigator.onLine&&i&&fetch(`https://www.react-grab.com/api/version?t=${Date.now()}`,{referrerPolicy:"origin",keepalive:!0,priority:"low",cache:"no-store"}).then(a=>a.text()).then(a=>{a&&a!==i&&console.warn(`[React Grab] v${i} is outdated (latest: v${a})`);}).catch(()=>null);}catch{}})(),We(i=>{let[o,s]=L(n),[a,c]=L(false),[l,f]=L(-1e3),[m,C]=L(-1e3),[g,b]=L(false),[v,R]=L(-1e3),[F,E]=L(-1e3),[k,H]=L(false),[q,ie]=L(null),[ve,Ce]=L(null),[Se,we]=L(0),[x,p]=L([]),[d,w]=L([]),[T,P]=L(false),[M,I]=L(false),[B,z]=L(false),[O,Z]=L(false),[K,D]=L(-1e3),[Q,ge]=L(-1e3),[Qe,Ae]=L(false),[$e,at]=L(0),[be,xe]=L(false),[ae,ke]=L(""),le=null,Je=null,Ye=null,Te=null,_e=null,Xe=null,De=G(()=>T()&&!k()),Co=G(()=>l()>-1e3&&m()>-1e3),So=u=>(u.metaKey||u.ctrlKey)&&u.code==="KeyC",$n=(u,h)=>({top:h<25,bottom:h>window.innerHeight-25,left:u<25,right:u>window.innerWidth-25}),Dn=(u,h)=>{let S=`grabbed-${Date.now()}-${Math.random()}`,A=Date.now(),X={id:S,bounds:u,createdAt:A,element:h},oe=x();p([...oe,X]),setTimeout(()=>{p(fe=>fe.filter(Y=>Y.id!==S));},1700);},Hn=u=>{let h=`success-${Date.now()}-${Math.random()}`;w(S=>[...S,{id:h,text:u}]),setTimeout(()=>{w(S=>S.filter(A=>A.id!==h));},1700);},ko=u=>`<selected_element>
31
31
  ${u}
32
32
  </selected_element>`,on=u=>(u.tagName||"").toLowerCase(),To=u=>{let h=on(u);return h?`<${h}>`:"1 element"},Bn=u=>{try{let h=u.map(S=>({tagName:on(S)}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:h}}));}catch{}},vt=async(u,h,S)=>{D(u),ge(h),H(true),Lo(),await S().finally(()=>{H(false),Ct(),M()&&Ee();});},Eo=u=>"innerText"in u,Ro=u=>Eo(u)?u.innerText:u.textContent??"",zn=u=>u.map(h=>Ro(h).trim()).filter(h=>h.length>0).join(`
@@ -45,7 +45,7 @@ ${Y}`:Y;A=Le,S=await Qt(Le);}if(!S){let Y=zn(u);if(Y.length>0){let Le=h?`${h}
45
45
 
46
46
  ${Y}`:Y;A=Le,S=await Qt(Le);}}if(S)try{t.onCopySuccess?.(u,A);}catch{}}catch(oe){try{t.onCopyError?.(oe);}catch{}let fe=zn(u);if(fe.length>0){let Y=h?`${h}
47
47
 
48
- ${fe}`:fe;A=Y,S=await Qt(Y);}}try{t.onAfterCopy?.(u,S);}catch{}return S},jn=async(u,h)=>{try{t.onElementSelect?.(u);}catch{}o().grabbedBoxes.enabled&&Dn(en(u),u),await new Promise(A=>requestAnimationFrame(A)),await sn([u],h)&&o().successLabels.enabled&&Hn(To(u)),Bn([u]);},Vn=async u=>{if(u.length===0)return;for(let S of u)try{t.onElementSelect?.(S);}catch{}if(o().grabbedBoxes.enabled)for(let S of u)Dn(en(S),S);await new Promise(S=>requestAnimationFrame(S)),await sn(u)&&o().successLabels.enabled&&Hn(`${u.length} elements`),Bn(u);},He=G(()=>!De()||g()?null:Nn(l(),m())),Ao=G(()=>{$e();let u=He();if(!u)return;let h=u.getBoundingClientRect();return {borderRadius:window.getComputedStyle(u).borderRadius||"0px",height:h.height,transform:Jt(u),width:h.width,x:h.left,y:h.top}}),Gn=(u,h)=>{let S=u+window.scrollX,A=h+window.scrollY;return {x:Math.abs(S-v()),y:Math.abs(A-F())}},Un=G(()=>{if(!g())return false;let u=Gn(l(),m());return u.x>2||u.y>2}),Yn=(u,h)=>{let S=u+window.scrollX,A=h+window.scrollY,X=Math.min(v(),S),oe=Math.min(F(),A),fe=Math.abs(S-v()),Y=Math.abs(A-F());return {x:X-window.scrollX,y:oe-window.scrollY,width:fe,height:Y}},qe=G(()=>{if(!Un())return;let u=Yn(l(),m());return {borderRadius:"0px",height:u.height,transform:"none",width:u.width,x:u.x,y:u.y}}),_o=G(()=>{let u=He();if(!u)return yo();let h=on(u),S=qt(u);return h&&S?[(()=>{var A=wo(),X=A.firstChild,oe=X.nextSibling;oe.nextSibling;return ue(A,h,oe),A})(),(()=>{var A=oa();A.firstChild;return ue(A,S,null),A})()]:h?(()=>{var A=wo(),X=A.firstChild,oe=X.nextSibling;oe.nextSibling;return ue(A,h,oe),A})():yo()}),Xn=G(()=>k()?{x:K(),y:Q()}:{x:l(),y:m()}),qn=G(()=>k()?{x:K(),y:Q()}:{x:l(),y:m()});ne(Pe(()=>[He(),q()],([u,h])=>{if(h&&u&&h!==u&&ie(null),u)try{t.onElementHover?.(u);}catch{}})),ne(Pe(()=>$e(),()=>{let u=x();if(u.length===0)return;let h=u.map(S=>({...S,bounds:en(S.element)}));p(h);})),ne(Pe(()=>[T(),g(),k(),He(),qe()],([u,h,S,A,X])=>{try{t.onStateChange?.({isActive:u,isDragging:h,isCopying:S,targetElement:A,dragBounds:X?{x:X.x,y:X.y,width:X.width,height:X.height}:null});}catch{}}));let Lo=()=>{let u=Date.now();Ce(u),z(false),Ye=window.setTimeout(()=>{z(true),Ye=null;},150);let h=()=>{let S=ve();if(S===null)return;let X=(Date.now()-S)/t.keyHoldDuration,oe=1-Math.exp(-X),Y=k()?Math.min(oe,.95):1;we(Y),Y<1&&(Je=requestAnimationFrame(h));};h();},Ct=()=>{Je!==null&&(cancelAnimationFrame(Je),Je=null),Ye!==null&&(window.clearTimeout(Ye),Ye=null),Ce(null),we(1),z(false);},Oo=()=>{let u=()=>{if(!g()){lt();return}let h=$n(l(),m());h.top&&window.scrollBy(0,-10),h.bottom&&window.scrollBy(0,10),h.left&&window.scrollBy(-10,0),h.right&&window.scrollBy(10,0),h.top||h.bottom||h.left||h.right?Xe=requestAnimationFrame(u):Xe=null;};u();},lt=()=>{Xe!==null&&(cancelAnimationFrame(Xe),Xe=null);},St=()=>{Ct(),P(true),document.body.style.cursor="crosshair",t.onActivate?.();},Ee=()=>{I(false),c(false),P(false),xe(false),ke(""),document.body.style.cursor="",g()&&(b(false),document.body.style.userSelect=""),le&&window.clearTimeout(le),Te&&window.clearTimeout(Te),_e&&(window.clearTimeout(_e),_e=null),Ae(false),lt(),Ct(),t.onDeactivate?.();},Po=u=>{ke(u);},Fo=()=>{if(!be())return;let u=He(),h=ae().trim(),S=l(),A=m();xe(false),ke(""),u?vt(S,A,()=>jn(u,h||void 0)).then(()=>{Ee();}):Ee();},Wn=()=>{be()&&Ee();},Zn=new AbortController,Re=Zn.signal;window.addEventListener("keydown",u=>{if(u.code==="Escape"&&a()){if(be())return;Ee();return}if(u.code==="Enter"&&a()&&!be()){u.preventDefault(),u.stopPropagation(),I(true),Te!==null&&(window.clearTimeout(Te),Te=null),T()||(le&&window.clearTimeout(le),St()),xe(true);return}if(!(!t.allowActivationInsideInput&&wr(u))&&So(u)){if((T()||a())&&u.preventDefault(),T()){if(M())return;Te!==null&&window.clearTimeout(Te),Te=window.setTimeout(()=>{Ee();},200);return}a()&&u.repeat||(le!==null&&window.clearTimeout(le),a()||c(true),le=window.setTimeout(()=>{St();},t.keyHoldDuration));}},{signal:Re,capture:true}),window.addEventListener("keyup",u=>{if(!a()&&!T())return;let h=!u.metaKey&&!u.ctrlKey;if(u.code==="KeyC"||h){if(M())return;Ee();}},{signal:Re,capture:true}),window.addEventListener("mousemove",u=>{if(!be()&&(f(u.clientX),C(u.clientY),_e!==null&&window.clearTimeout(_e),Ae(false),_e=window.setTimeout(()=>{Ae(true),_e=null;},300),g())){let h=$n(u.clientX,u.clientY),S=h.top||h.bottom||h.left||h.right;S&&Xe===null?Oo():!S&&Xe!==null&&lt();}},{signal:Re}),window.addEventListener("mousedown",u=>{if(be()){u.target.closest("[data-react-grab-input]")||Wn();return}if(!De()||k())return;u.preventDefault(),b(true);let h=u.clientX+window.scrollX,S=u.clientY+window.scrollY;R(h),E(S),document.body.style.userSelect="none";try{t.onDragStart?.(h,S);}catch{}},{signal:Re}),window.addEventListener("mouseup",u=>{if(!g())return;let h=Gn(u.clientX,u.clientY),S=h.x>2||h.y>2;if(b(false),lt(),document.body.style.userSelect="",S){Z(true);let A=Yn(u.clientX,u.clientY),X=mo(A,xt);if(X.length>0){try{t.onDragEnd?.(X,A);}catch{}vt(u.clientX,u.clientY,()=>Vn(X));}else {let oe=po(A,xt);if(oe.length>0){try{t.onDragEnd?.(oe,A);}catch{}vt(u.clientX,u.clientY,()=>Vn(oe));}}}else {let A=Nn(u.clientX,u.clientY);if(!A)return;ie(A),vt(u.clientX,u.clientY,()=>jn(A));}},{signal:Re}),window.addEventListener("click",u=>{(De()||k()||O())&&(u.preventDefault(),u.stopPropagation(),O()&&Z(false),M()&&!k()&&(a()?I(false):Ee()));},{signal:Re,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&p([]);},{signal:Re}),window.addEventListener("scroll",()=>{at(u=>u+1);},{signal:Re,capture:true}),window.addEventListener("resize",()=>{at(u=>u+1);},{signal:Re}),document.addEventListener("copy",u=>{(De()||k())&&u.preventDefault();},{signal:Re,capture:true}),pe(()=>{Zn.abort(),le&&window.clearTimeout(le),Te&&window.clearTimeout(Te),_e&&window.clearTimeout(_e),lt(),Ct(),document.body.style.userSelect="",document.body.style.cursor="";});let an=xr(yr),Io=G(()=>o().selectionBox.enabled&&De()&&!g()&&!!He()),No=G(()=>o().dragBox.enabled&&De()&&Un()),Mo=G(()=>k()?"processing":"hover"),$o=G(()=>!o().elementLabel.enabled||be()?false:k()?true:d().length>0?false:De()&&!g()&&!!He()),Do=G(()=>k()&&B()&&Co()),Ho=G(()=>o().crosshair.enabled&&De()&&!g()),Bo=G(()=>o().inputOverlay.enabled&&be()),zo=G(()=>o().grabbedBoxes.enabled),jo=G(()=>o().successLabels.enabled);return ne(Pe(o,u=>{u.hue!==0?an.style.filter=`hue-rotate(${u.hue}deg)`:an.style.filter="";})),o().enabled&&pr(()=>N(Mr,{get selectionVisible(){return Io()},get selectionBounds(){return Ao()},get dragVisible(){return No()},get dragBounds(){return qe()},get grabbedBoxes(){return ye(()=>!!zo())()?x():[]},get successLabels(){return ye(()=>!!jo())()?d():[]},get labelVariant(){return Mo()},get labelContent(){return _o()},get labelX(){return Xn().x},get labelY(){return Xn().y},get labelVisible(){return $o()},labelZIndex:2147483647,get labelShowHint(){return Qe()},get progressVisible(){return Do()},get progress(){return Se()},get mouseX(){return qn().x},get mouseY(){return qn().y},get crosshairVisible(){return Ho()},get inputVisible(){return Bo()},get inputX(){return l()},get inputY(){return m()},get inputValue(){return ae()},onInputChange:Po,onInputSubmit:Fo,onInputCancel:Wn,get theme(){return o()}}),an),{activate:()=>{T()||St();},deactivate:()=>{T()&&Ee();},toggle:()=>{T()?Ee():St();},isActive:()=>T(),dispose:i,copyElement:async u=>{let h=Array.isArray(u)?u:[u];if(h.length===0)return false;try{await t.onBeforeCopy?.(h);}catch{}let S=await sn(h);try{t.onAfterCopy?.(h,S);}catch{}return S},getState:()=>({isActive:T(),isDragging:g(),isCopying:k(),targetElement:He(),dragBounds:qe()?{x:qe().x,y:qe().y,width:qe().width,height:qe().height}:null}),updateTheme:u=>{let h=o(),S=ho(h,u);s(S);},getTheme:()=>o()}}))};var vo=null,Bu=()=>vo;typeof window<"u"&&(vo=Mn());/*! Bundled license information:
48
+ ${fe}`:fe;A=Y,S=await Qt(Y);}}try{t.onAfterCopy?.(u,S);}catch{}return S},jn=async(u,h)=>{try{t.onElementSelect?.(u);}catch{}o().grabbedBoxes.enabled&&Dn(en(u),u),await new Promise(A=>requestAnimationFrame(A)),await sn([u],h)&&o().successLabels.enabled&&Hn(To(u)),Bn([u]);},Vn=async u=>{if(u.length===0)return;for(let S of u)try{t.onElementSelect?.(S);}catch{}if(o().grabbedBoxes.enabled)for(let S of u)Dn(en(S),S);await new Promise(S=>requestAnimationFrame(S)),await sn(u)&&o().successLabels.enabled&&Hn(`${u.length} elements`),Bn(u);},He=G(()=>!De()||g()?null:Nn(l(),m())),Ao=G(()=>{$e();let u=He();if(!u)return;let h=u.getBoundingClientRect();return {borderRadius:window.getComputedStyle(u).borderRadius||"0px",height:h.height,transform:Jt(u),width:h.width,x:h.left,y:h.top}}),Gn=(u,h)=>{let S=u+window.scrollX,A=h+window.scrollY;return {x:Math.abs(S-v()),y:Math.abs(A-F())}},Un=G(()=>{if(!g())return false;let u=Gn(l(),m());return u.x>2||u.y>2}),Yn=(u,h)=>{let S=u+window.scrollX,A=h+window.scrollY,X=Math.min(v(),S),oe=Math.min(F(),A),fe=Math.abs(S-v()),Y=Math.abs(A-F());return {x:X-window.scrollX,y:oe-window.scrollY,width:fe,height:Y}},qe=G(()=>{if(!Un())return;let u=Yn(l(),m());return {borderRadius:"0px",height:u.height,transform:"none",width:u.width,x:u.x,y:u.y}}),_o=G(()=>{let u=He();if(!u)return yo();let h=on(u),S=qt(u);return h&&S?[(()=>{var A=wo(),X=A.firstChild,oe=X.nextSibling;oe.nextSibling;return ue(A,h,oe),A})(),(()=>{var A=oa();A.firstChild;return ue(A,S,null),A})()]:h?(()=>{var A=wo(),X=A.firstChild,oe=X.nextSibling;oe.nextSibling;return ue(A,h,oe),A})():yo()}),Xn=G(()=>k()?{x:K(),y:Q()}:{x:l(),y:m()}),qn=G(()=>k()?{x:K(),y:Q()}:{x:l(),y:m()});ne(Pe(()=>[He(),q()],([u,h])=>{if(h&&u&&h!==u&&ie(null),u)try{t.onElementHover?.(u);}catch{}})),ne(Pe(()=>$e(),()=>{let u=x();if(u.length===0)return;let h=u.map(S=>({...S,bounds:en(S.element)}));p(h);})),ne(Pe(()=>[T(),g(),k(),He(),qe()],([u,h,S,A,X])=>{try{t.onStateChange?.({isActive:u,isDragging:h,isCopying:S,targetElement:A,dragBounds:X?{x:X.x,y:X.y,width:X.width,height:X.height}:null});}catch{}}));let Lo=()=>{let u=Date.now();Ce(u),z(false),Ye=window.setTimeout(()=>{z(true),Ye=null;},150);let h=()=>{let S=ve();if(S===null)return;let X=(Date.now()-S)/t.keyHoldDuration,oe=1-Math.exp(-X),Y=k()?Math.min(oe,.95):1;we(Y),Y<1&&(Je=requestAnimationFrame(h));};h();},Ct=()=>{Je!==null&&(cancelAnimationFrame(Je),Je=null),Ye!==null&&(window.clearTimeout(Ye),Ye=null),Ce(null),we(1),z(false);},Oo=()=>{let u=()=>{if(!g()){lt();return}let h=$n(l(),m());h.top&&window.scrollBy(0,-10),h.bottom&&window.scrollBy(0,10),h.left&&window.scrollBy(-10,0),h.right&&window.scrollBy(10,0),h.top||h.bottom||h.left||h.right?Xe=requestAnimationFrame(u):Xe=null;};u();},lt=()=>{Xe!==null&&(cancelAnimationFrame(Xe),Xe=null);},St=()=>{Ct(),P(true),document.body.style.cursor="crosshair",t.onActivate?.();},Ee=()=>{I(false),c(false),P(false),xe(false),ke(""),document.body.style.cursor="",g()&&(b(false),document.body.style.userSelect=""),le&&window.clearTimeout(le),Te&&window.clearTimeout(Te),_e&&(window.clearTimeout(_e),_e=null),Ae(false),lt(),Ct(),t.onDeactivate?.();},Po=u=>{ke(u);},Fo=()=>{if(!be())return;let u=He(),h=ae().trim(),S=l(),A=m();xe(false),ke(""),u?vt(S,A,()=>jn(u,h||void 0)).then(()=>{Ee();}):Ee();},Wn=()=>{be()&&Ee();},Zn=new AbortController,Re=Zn.signal;window.addEventListener("keydown",u=>{if(u.code==="Escape"&&a()){if(be())return;Ee();return}if(u.code==="Enter"&&a()&&!be()){u.preventDefault(),u.stopPropagation(),I(true),Te!==null&&(window.clearTimeout(Te),Te=null),T()||(le&&window.clearTimeout(le),St()),xe(true);return}if(!(!t.allowActivationInsideInput&&wr(u))&&So(u)){if((T()||a())&&u.preventDefault(),T()){if(M())return;Te!==null&&window.clearTimeout(Te),Te=window.setTimeout(()=>{Ee();},200);return}a()&&u.repeat||(le!==null&&window.clearTimeout(le),a()||c(true),le=window.setTimeout(()=>{St();},t.keyHoldDuration));}},{signal:Re,capture:true}),window.addEventListener("keyup",u=>{if(!a()&&!T())return;let h=!u.metaKey&&!u.ctrlKey;if(u.code==="KeyC"||h){if(M())return;Ee();}},{signal:Re,capture:true}),window.addEventListener("mousemove",u=>{if(!be()&&(f(u.clientX),C(u.clientY),_e!==null&&window.clearTimeout(_e),Ae(false),_e=window.setTimeout(()=>{Ae(true),_e=null;},300),g())){let h=$n(u.clientX,u.clientY),S=h.top||h.bottom||h.left||h.right;S&&Xe===null?Oo():!S&&Xe!==null&&lt();}},{signal:Re}),window.addEventListener("mousedown",u=>{if(be()){u.target.closest("[data-react-grab-input]")||Wn();return}if(!De()||k())return;u.preventDefault(),b(true);let h=u.clientX+window.scrollX,S=u.clientY+window.scrollY;R(h),E(S),document.body.style.userSelect="none";try{t.onDragStart?.(h,S);}catch{}},{signal:Re,capture:true}),window.addEventListener("mouseup",u=>{if(!g())return;let h=Gn(u.clientX,u.clientY),S=h.x>2||h.y>2;if(b(false),lt(),document.body.style.userSelect="",S){Z(true);let A=Yn(u.clientX,u.clientY),X=mo(A,xt);if(X.length>0){try{t.onDragEnd?.(X,A);}catch{}vt(u.clientX,u.clientY,()=>Vn(X));}else {let oe=po(A,xt);if(oe.length>0){try{t.onDragEnd?.(oe,A);}catch{}vt(u.clientX,u.clientY,()=>Vn(oe));}}}else {let A=Nn(u.clientX,u.clientY);if(!A)return;ie(A),vt(u.clientX,u.clientY,()=>jn(A));}},{signal:Re}),window.addEventListener("click",u=>{(De()||k()||O())&&(u.preventDefault(),u.stopPropagation(),O()&&Z(false),M()&&!k()&&(a()?I(false):Ee()));},{signal:Re,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&p([]);},{signal:Re}),window.addEventListener("scroll",()=>{at(u=>u+1);},{signal:Re,capture:true}),window.addEventListener("resize",()=>{at(u=>u+1);},{signal:Re}),document.addEventListener("copy",u=>{(De()||k())&&u.preventDefault();},{signal:Re,capture:true}),pe(()=>{Zn.abort(),le&&window.clearTimeout(le),Te&&window.clearTimeout(Te),_e&&window.clearTimeout(_e),lt(),Ct(),document.body.style.userSelect="",document.body.style.cursor="";});let an=xr(yr),Io=G(()=>o().selectionBox.enabled&&De()&&!g()&&!!He()),No=G(()=>o().dragBox.enabled&&De()&&Un()),Mo=G(()=>k()?"processing":"hover"),$o=G(()=>!o().elementLabel.enabled||be()?false:k()?true:d().length>0?false:De()&&!g()&&!!He()),Do=G(()=>k()&&B()&&Co()),Ho=G(()=>o().crosshair.enabled&&De()&&!g()),Bo=G(()=>o().inputOverlay.enabled&&be()),zo=G(()=>o().grabbedBoxes.enabled),jo=G(()=>o().successLabels.enabled);return ne(Pe(o,u=>{u.hue!==0?an.style.filter=`hue-rotate(${u.hue}deg)`:an.style.filter="";})),o().enabled&&pr(()=>N(Mr,{get selectionVisible(){return Io()},get selectionBounds(){return Ao()},get dragVisible(){return No()},get dragBounds(){return qe()},get grabbedBoxes(){return ye(()=>!!zo())()?x():[]},get successLabels(){return ye(()=>!!jo())()?d():[]},get labelVariant(){return Mo()},get labelContent(){return _o()},get labelX(){return Xn().x},get labelY(){return Xn().y},get labelVisible(){return $o()},labelZIndex:2147483647,get labelShowHint(){return Qe()},get progressVisible(){return Do()},get progress(){return Se()},get mouseX(){return qn().x},get mouseY(){return qn().y},get crosshairVisible(){return Ho()},get inputVisible(){return Bo()},get inputX(){return l()},get inputY(){return m()},get inputValue(){return ae()},onInputChange:Po,onInputSubmit:Fo,onInputCancel:Wn,get theme(){return o()}}),an),{activate:()=>{T()||St();},deactivate:()=>{T()&&Ee();},toggle:()=>{T()?Ee():St();},isActive:()=>T(),dispose:i,copyElement:async u=>{let h=Array.isArray(u)?u:[u];if(h.length===0)return false;try{await t.onBeforeCopy?.(h);}catch{}let S=await sn(h);try{t.onAfterCopy?.(h,S);}catch{}return S},getState:()=>({isActive:T(),isDragging:g(),isCopying:k(),targetElement:He(),dragBounds:qe()?{x:qe().x,y:qe().y,width:qe().width,height:qe().height}:null}),updateTheme:u=>{let h=o(),S=ho(h,u);s(S);},getTheme:()=>o()}}))};var vo=null,Bu=()=>vo;typeof window<"u"&&(vo=Mn());/*! Bundled license information:
49
49
 
50
50
  bippy/dist/rdt-hook-CrcWl4lP.js:
51
51
  (**
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { init } from './chunk-CBPK6MDL.js';
2
- export { DEFAULT_THEME, formatStack, getHTMLPreview, getNearestComponentName, getStack, init, Ee as isInstrumentationActive } from './chunk-CBPK6MDL.js';
1
+ import { init } from './chunk-XLGRJBAL.js';
2
+ export { DEFAULT_THEME, formatStack, getHTMLPreview, getNearestComponentName, getStack, init, Ee as isInstrumentationActive } from './chunk-XLGRJBAL.js';
3
3
 
4
4
  /**
5
5
  * @license MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-grab",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
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",