react-grab 0.0.27 → 0.0.29

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
@@ -530,16 +530,53 @@ var Crosshair = (props) => {
530
530
  context.scale(dpr, dpr);
531
531
  }
532
532
  };
533
+ const getSmallestElementBounds = (x, y) => {
534
+ const element = document.elementFromPoint(x, y);
535
+ if (!element || element === canvasRef || element === document.body || element === document.documentElement) {
536
+ return null;
537
+ }
538
+ const rect = element.getBoundingClientRect();
539
+ if (rect.width === 0 || rect.height === 0) {
540
+ return null;
541
+ }
542
+ return {
543
+ top: rect.top,
544
+ bottom: rect.bottom,
545
+ left: rect.left,
546
+ right: rect.right
547
+ };
548
+ };
549
+ const scanBoundary = (startX, startY, deltaX, deltaY, maxDistance) => {
550
+ const baseBounds = getSmallestElementBounds(startX, startY);
551
+ if (!baseBounds) return maxDistance;
552
+ const stepSize = 5;
553
+ for (let distance = stepSize; distance < maxDistance; distance += stepSize) {
554
+ const checkX = startX + deltaX * distance;
555
+ const checkY = startY + deltaY * distance;
556
+ if (checkX < 0 || checkX >= width || checkY < 0 || checkY >= height) {
557
+ return distance;
558
+ }
559
+ const currentBounds = getSmallestElementBounds(checkX, checkY);
560
+ if (!currentBounds || currentBounds.top !== baseBounds.top || currentBounds.bottom !== baseBounds.bottom || currentBounds.left !== baseBounds.left || currentBounds.right !== baseBounds.right) {
561
+ return distance;
562
+ }
563
+ }
564
+ return maxDistance;
565
+ };
533
566
  const render2 = () => {
534
567
  if (!context) return;
535
568
  context.clearRect(0, 0, width, height);
536
569
  context.strokeStyle = "rgba(210, 57, 192)";
537
570
  context.lineWidth = 1;
538
571
  context.beginPath();
539
- context.moveTo(currentX, 0);
540
- context.lineTo(currentX, height);
541
- context.moveTo(0, currentY);
542
- context.lineTo(width, currentY);
572
+ const topBoundary = scanBoundary(currentX, currentY, 0, -1, currentY);
573
+ const bottomBoundary = scanBoundary(currentX, currentY, 0, 1, height - currentY);
574
+ const leftBoundary = scanBoundary(currentX, currentY, -1, 0, currentX);
575
+ const rightBoundary = scanBoundary(currentX, currentY, 1, 0, width - currentX);
576
+ context.moveTo(currentX, currentY - topBoundary);
577
+ context.lineTo(currentX, currentY + bottomBoundary);
578
+ context.moveTo(currentX - leftBoundary, currentY);
579
+ context.lineTo(currentX + rightBoundary, currentY);
543
580
  context.stroke();
544
581
  };
545
582
  const animate = () => {
@@ -739,13 +776,14 @@ var getSourceTrace = async (element) => {
739
776
  Number.MAX_SAFE_INTEGER
740
777
  );
741
778
  if (!sources) return null;
742
- return sources.filter((source$1) => {
743
- return source.isSourceFile(source$1.fileName);
744
- }).map((source$1) => {
779
+ console.log(sources);
780
+ return sources.map((source$1) => {
745
781
  return {
746
782
  ...source$1,
747
783
  fileName: source.normalizeFileName(source$1.fileName)
748
784
  };
785
+ }).filter((source$1) => {
786
+ return source.isSourceFile(source$1.fileName);
749
787
  });
750
788
  };
751
789
  var getHTMLSnippet = (element) => {
@@ -1238,12 +1276,40 @@ var init = (rawOptions) => {
1238
1276
  const fileName = source.fileName ?? "unknown";
1239
1277
  const lineNumber = source.lineNumber ?? 0;
1240
1278
  const columnNumber = source.columnNumber ?? 0;
1241
- return ` ${functionName} - ${fileName}:${lineNumber}:${columnNumber}`;
1279
+ return ` at ${functionName} (${fileName}:${lineNumber}:${columnNumber})`;
1242
1280
  }).join("\n");
1243
1281
  };
1244
1282
  const wrapContextInXmlTags = (context) => {
1245
1283
  return `<selected_element>${context}</selected_element>`;
1246
1284
  };
1285
+ const getComputedStyles = (element) => {
1286
+ const computed = window.getComputedStyle(element);
1287
+ const rect = element.getBoundingClientRect();
1288
+ return {
1289
+ width: `${rect.width}px`,
1290
+ height: `${rect.height}px`,
1291
+ paddingTop: computed.paddingTop,
1292
+ paddingRight: computed.paddingRight,
1293
+ paddingBottom: computed.paddingBottom,
1294
+ paddingLeft: computed.paddingLeft,
1295
+ background: computed.background,
1296
+ opacity: computed.opacity
1297
+ };
1298
+ };
1299
+ const createStructuredClipboardHtml = (elements) => {
1300
+ const structuredData = {
1301
+ elements: elements.map((element) => ({
1302
+ tagName: element.tagName,
1303
+ content: element.content,
1304
+ computedStyles: element.computedStyles
1305
+ }))
1306
+ };
1307
+ const base64Data = btoa(JSON.stringify(structuredData));
1308
+ const htmlContent = `<div data-react-grab="${base64Data}"></div>`;
1309
+ return new Blob([htmlContent], {
1310
+ type: "text/html"
1311
+ });
1312
+ };
1247
1313
  const getElementContentWithTrace = async (element) => {
1248
1314
  const elementHtml = getHTMLSnippet(element);
1249
1315
  const componentStackTrace = await getSourceTrace(element);
@@ -1263,7 +1329,13 @@ ${formattedStackTrace}`;
1263
1329
  addGrabbedBox(createElementBounds(targetElement2));
1264
1330
  try {
1265
1331
  const content = await getElementContentWithTrace(targetElement2);
1266
- await copyContent(wrapContextInXmlTags(content));
1332
+ const plainTextContent = wrapContextInXmlTags(content);
1333
+ const htmlContent = createStructuredClipboardHtml([{
1334
+ tagName,
1335
+ content: await getElementContentWithTrace(targetElement2),
1336
+ computedStyles: getComputedStyles(targetElement2)
1337
+ }]);
1338
+ await copyContent([plainTextContent, htmlContent]);
1267
1339
  } catch {
1268
1340
  }
1269
1341
  addSuccessLabel(tagName ? `<${tagName}>` : "<element>", elementBounds.left, elementBounds.top);
@@ -1281,7 +1353,14 @@ ${formattedStackTrace}`;
1281
1353
  try {
1282
1354
  const elementSnippets = await Promise.all(targetElements.map((element) => getElementContentWithTrace(element)));
1283
1355
  const combinedContent = elementSnippets.join("\n\n---\n\n");
1284
- await copyContent(wrapContextInXmlTags(combinedContent));
1356
+ const plainTextContent = wrapContextInXmlTags(combinedContent);
1357
+ const structuredElements = await Promise.all(targetElements.map(async (element) => ({
1358
+ tagName: getElementTagName(element),
1359
+ content: await getElementContentWithTrace(element),
1360
+ computedStyles: getComputedStyles(element)
1361
+ })));
1362
+ const htmlContent = createStructuredClipboardHtml(structuredElements);
1363
+ await copyContent([plainTextContent, htmlContent]);
1285
1364
  } catch {
1286
1365
  }
1287
1366
  addSuccessLabel(`${targetElements.length} elements`, minPositionX, minPositionY);
@@ -1340,9 +1419,7 @@ ${formattedStackTrace}`;
1340
1419
  });
1341
1420
  const labelText = solidJs.createMemo(() => {
1342
1421
  const element = targetElement();
1343
- if (!element) return "(click or drag to select element(s))";
1344
- const tagName = getElementTagName(element);
1345
- return tagName ? `<${tagName}>` : "<element>";
1422
+ return element ? `<${getElementTagName(element)}>` : "<element>";
1346
1423
  });
1347
1424
  const labelPosition = solidJs.createMemo(() => {
1348
1425
  return {
@@ -1353,7 +1430,7 @@ ${formattedStackTrace}`;
1353
1430
  const isSameAsLast = solidJs.createMemo(() => {
1354
1431
  const currentElement = targetElement();
1355
1432
  const lastElement = lastGrabbedElement();
1356
- return !!currentElement && currentElement === lastElement;
1433
+ return Boolean(currentElement) && currentElement === lastElement;
1357
1434
  });
1358
1435
  solidJs.createEffect(solidJs.on(() => [targetElement(), lastGrabbedElement()], ([currentElement, lastElement]) => {
1359
1436
  if (lastElement && currentElement && lastElement !== currentElement) {
@@ -1521,7 +1598,7 @@ ${formattedStackTrace}`;
1521
1598
  const selectionVisible = solidJs.createMemo(() => false);
1522
1599
  const dragVisible = solidJs.createMemo(() => isRendererActive() && isDraggingBeyondThreshold());
1523
1600
  const labelVariant = solidJs.createMemo(() => isCopying() ? "processing" : "hover");
1524
- const labelVisible = solidJs.createMemo(() => isRendererActive() && !isDragging() && (!!targetElement() && !isSameAsLast() || !targetElement()) || isCopying());
1601
+ const labelVisible = solidJs.createMemo(() => isRendererActive() && !isDragging() && (Boolean(targetElement()) && !isSameAsLast() || !targetElement()) || isCopying());
1525
1602
  const progressVisible = solidJs.createMemo(() => isHoldingKeys() && showProgressIndicator() && hasValidMousePosition());
1526
1603
  const crosshairVisible = solidJs.createMemo(() => isRendererActive() && !isDragging());
1527
1604
  web.render(() => web.createComponent(ReactGrabRenderer, {
@@ -6,29 +6,29 @@ 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 cr=(e,t)=>e===t;var ur=Symbol("solid-track"),Xe={equals:cr},Zt=nn,ue=1,Le=2,Qt={owned:null,cleanups:null,context:null,owner:null};var $=null,y=null,Fe=null,Y=null,Z=null,te=null,We=0;function Oe(e,t){let n=Y,r=$,o=e.length===0,i=t===void 0?r:t,s=o?Qt:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>se(()=>Ce(s)));$=s,Y=null;try{return be(a,!0)}finally{Y=n,$=r;}}function P(e,t){t=t?Object.assign({},Xe,t):Xe;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),tn(n,o));return [en.bind(n),r]}function ae(e,t,n){let r=dt(e,t,false,ue);je(r);}function re(e,t,n){Zt=gr;let r=dt(e,t,false,ue);(r.user=true),te?te.push(r):je(r);}function U(e,t,n){n=n?Object.assign({},Xe,n):Xe;let r=dt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),en.bind(r)}function se(e){if(Y===null)return e();let t=Y;Y=null;try{return Fe?Fe.untrack(e):e()}finally{Y=t;}}function ve(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=se(()=>t(a,o,s));return o=a,l}}function Jt(e){re(()=>se(e));}function fe(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}P(false);function en(){let e=y;if(this.sources&&(this.state))if((this.state)===ue)je(this);else {let t=Z;Z=null,be(()=>qe(this),false),Z=t;}if(Y){let t=this.observers?this.observers.length:0;Y.sources?(Y.sources.push(this),Y.sourceSlots.push(t)):(Y.sources=[this],Y.sourceSlots=[t]),this.observers?(this.observers.push(Y),this.observerSlots.push(Y.sources.length-1)):(this.observers=[Y],this.observerSlots=[Y.sources.length-1]);}return e&&y.sources.has(this)?this.tValue:this.value}function tn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&be(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=y&&y.running;s&&y.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?Z.push(i):te.push(i),i.observers&&rn(i)),s?i.tState=ue:i.state=ue);}if(Z.length>1e6)throw Z=[],new Error},false);}return t}function je(e){if(!e.fn)return;Ce(e);let t=We;qt(e,e.value,t);}function qt(e,t,n){let r,o=$,i=Y;Y=$=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=ue,e.owned&&e.owned.forEach(Ce),e.owned=null)),e.updatedAt=n+1,mt(s)}finally{Y=i,$=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?tn(e,r):e.value=r,e.updatedAt=n);}function dt(e,t,n,r=ue,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||$!==Qt&&($.owned?$.owned.push(i):$.owned=[i]),Fe);return i}function De(e){let t=y;if((e.state)===0)return;if((e.state)===Le)return qe(e);if(e.suspense&&se(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<We);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ue)je(e);else if((e.state)===Le){let o=Z;Z=null,be(()=>qe(e,n[0]),false),Z=o;}}}function be(e,t){if(Z)return e();let n=false;t||(Z=[]),te?n=true:te=[],We++;try{let r=e();return mr(n),r}catch(r){n||(te=null),Z=null,mt(r);}}function mr(e){if(Z&&(nn(Z),Z=null),e)return;let n=te;te=null,n.length&&be(()=>Zt(n),false);}function nn(e){for(let t=0;t<e.length;t++)De(e[t]);}function gr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:De(r);}for(t=0;t<n;t++)De(e[t]);}function qe(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===ue?o!==t&&(!o.updatedAt||o.updatedAt<We)&&De(o):i===Le&&qe(o,t);}}}function rn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Le,r.pure?Z.push(r):te.push(r),r.observers&&rn(r));}}function Ce(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--)Ce(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ce(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 pr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function mt(e,t=$){let r=pr(e);throw r;}var br=Symbol("fallback");function Kt(e){for(let t=0;t<e.length;t++)e[t]();}function yr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return fe(()=>Kt(i)),()=>{let l=e()||[],c=l.length,f,m;return l[ur],se(()=>{let T,w,E,p,d,g,v,O,N;if(c===0)s!==0&&(Kt(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[br],o[0]=Oe(H=>(i[0]=H,n.fallback())),s=1);else if(s===0){for(o=new Array(c),m=0;m<c;m++)r[m]=l[m],o[m]=Oe(C);s=c;}else {for(E=new Array(c),p=new Array(c),a&&(d=new Array(c)),g=0,v=Math.min(s,c);g<v&&r[g]===l[g];g++);for(v=s-1,O=c-1;v>=g&&O>=g&&r[v]===l[O];v--,O--)E[O]=o[v],p[O]=i[v],a&&(d[O]=a[v]);for(T=new Map,w=new Array(O+1),m=O;m>=g;m--)N=l[m],f=T.get(N),w[m]=f===void 0?-1:f,T.set(N,m);for(f=g;f<=v;f++)N=r[f],m=T.get(N),m!==void 0&&m!==-1?(E[m]=o[f],p[m]=i[f],a&&(d[m]=a[f]),m=w[m],T.set(N,m)):i[f]();for(m=g;m<c;m++)m in E?(o[m]=E[m],i[m]=p[m],a&&(a[m]=d[m],a[m](m))):o[m]=Oe(C);o=o.slice(0,s=c),r=l.slice(0);}return o});function C(T){if(i[m]=T,a){let[w,E]=P(m);return a[m]=E,t(l[m],w)}return t(l[m])}}}function A(e,t){return se(()=>e(t||{}))}var Sr=e=>`Stale read from <${e}>.`;function Ke(e){let t="fallback"in e&&{fallback:()=>e.fallback};return U(yr(()=>e.each,e.children,t||void 0))}function X(e){let t=e.keyed,n=U(()=>e.when,void 0,void 0),r=t?n:U(n,void 0,{equals:(o,i)=>!o==!i});return U(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?se(()=>i(t?o:()=>{if(!se(r))throw Sr("Show");return n()})):i}return e.fallback},void 0,void 0)}var Ie=e=>U(()=>e());function Cr(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let f=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],f);}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let f=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],f),t[o]=n[i];}else {if(!c){c=new Map;let m=a;for(;m<i;)c.set(n[m],m++);}let f=c.get(t[s]);if(f!=null)if(a<f&&f<i){let m=s,C=1,T;for(;++m<o&&m<i&&!((T=c.get(t[m]))==null||T!==f+C);)C++;if(C>f-a){let w=t[s];for(;a<f;)e.insertBefore(n[a++],w);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function an(e,t,n,r={}){let o;return Oe(i=>{o=i,t===document?e():ye(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function oe(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function vr(e,t,n){(e.removeAttribute(t));}function Qe(e,t,n){if(!t)return n?vr(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function he(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Ee(e,t,n){return se(()=>e(t,n))}function ye(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ze(e,t,r,n);ae(o=>Ze(e,t(),o,n),r);}function Ze(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Ae(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=Ae(e,n,r);}else {if(s==="function")return ae(()=>{let l=t();for(;typeof l=="function";)l=l();n=Ze(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(ht(l,t,n,o))return ae(()=>n=Ze(e,l,n,r,true)),()=>n;if(l.length===0){if(n=Ae(e,n,r),a)return n}else c?n.length===0?sn(e,l,r):Cr(e,n,l):(n&&Ae(e),sn(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Ae(e,n,r,t);Ae(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function ht(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=ht(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=ht(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let f=String(a);l&&l.nodeType===3&&l.data===f?e.push(l):e.push(document.createTextNode(f));}}return o}function sn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Ae(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var Er=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],Rr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),_r=e=>Array.isArray(e),Or=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&Rr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return _r(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},cn=e=>Or(e,Er);var $e="data-react-grab",un=()=>{let e=document.querySelector(`[${$e}]`);if(e){let i=e.shadowRoot?.querySelector(`[${$e}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute($e,"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($e,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var de=(e,t,n)=>e+(t-e)*n;var Nr=oe("<div>"),Je=e=>{let[t,n]=P(e.bounds.x),[r,o]=P(e.bounds.y),[i,s]=P(e.bounds.width),[a,l]=P(e.bounds.height),[c,f]=P(1),m=false,C=null,T=null,w=e.bounds,E=false,p=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,d=()=>{if(E)return;E=true;let O=()=>{let N=de(t(),w.x,p()),H=de(r(),w.y,p()),k=de(i(),w.width,p()),Q=de(a(),w.height,p());n(N),o(H),s(k),l(Q),Math.abs(N-w.x)<.5&&Math.abs(H-w.y)<.5&&Math.abs(k-w.width)<.5&&Math.abs(Q-w.height)<.5?(C=null,E=false):C=requestAnimationFrame(O);};C=requestAnimationFrame(O);};re(ve(()=>e.bounds,O=>{if(w=O,!m){n(w.x),o(w.y),s(w.width),l(w.height),m=true;return}d();})),re(()=>{e.variant==="grabbed"&&e.createdAt&&(T=window.setTimeout(()=>{f(0);},1500));}),fe(()=>{C!==null&&(cancelAnimationFrame(C),C=null),T!==null&&(window.clearTimeout(T),T=null),E=false;});let g={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":"2147483646"},v=()=>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"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.2)",transition:e.variant==="grabbed"?"opacity 0.3s ease-out":void 0};return A(X,{get when(){return e.visible!==false},get children(){var O=Nr();return ae(N=>Qe(O,{...g,...v(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},N)),O}})};var Fr=oe('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),fn=e=>{let t;return Jt(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=Fr(),r=t;return typeof r=="function"?Ee(r,n):t=n,ae(o=>Qe(n,{...e.style},o)),n})()};var Be=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,c=i-r-8,f=Math.max(s,Math.min(e,l)),m=Math.max(a,Math.min(t,c));return {left:f,top:m}};var Ar=oe("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),Ir=oe("<div style=margin-right:4px>Copied"),$r=oe("<div style=margin-left:4px>to clipboard"),Mr=oe(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),Pr=oe(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),gt=e=>{let[t,n]=P(0),[r,o]=P(0),i,s=e.x,a=e.y,l=e.x,c=e.y,f=null,m=false,C=()=>{s=de(s,l,.3),a=de(a,c,.3),o(g=>g+1),Math.abs(s-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(C);},T=()=>{f===null&&(f=requestAnimationFrame(C));},w=()=>{if(l=e.x,c=e.y,!m){s=l,a=c,m=true,o(d=>d+1);return}T();};re(ve(()=>e.visible,d=>{if(d!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.variant==="success"){let g=setTimeout(()=>{n(0);},1500);fe(()=>clearTimeout(g));}})),re(()=>{w();}),fe(()=>{f!==null&&(cancelAnimationFrame(f),f=null);});let E=()=>i?.getBoundingClientRect(),p=()=>{r();let d=E();if(!d)return {left:s,top:a};if(e.variant==="success"){let k=Math.round(s),Q=Math.round(a)-d.height-6,ne=k<8,Me=Q<8,x=ne||Me,b=Be(k,Q,d.width,d.height);return x&&(b.left+=4,b.top+=4),b}let g=12,v=window.innerWidth,O=window.innerHeight,N=[{left:Math.round(s)+g,top:Math.round(a)+g},{left:Math.round(s)-d.width-g,top:Math.round(a)+g},{left:Math.round(s)+g,top:Math.round(a)-d.height-g},{left:Math.round(s)-d.width-g,top:Math.round(a)-d.height-g}];for(let k of N){let Q=k.left>=8&&k.left+d.width<=v-8,ne=k.top>=8&&k.top+d.height<=O-8;if(Q&&ne)return k}let H=Be(N[0].left,N[0].top,d.width,d.height);return H.left+=4,H.top+=4,H};return A(X,{get when(){return e.visible!==false},get children(){var d=Mr(),g=i;return typeof g=="function"?Ee(g,d):i=d,ye(d,A(X,{get when(){return e.variant==="processing"},get children(){return A(fn,{})}}),null),ye(d,A(X,{get when(){return e.variant==="success"},get children(){return Ar()}}),null),ye(d,A(X,{get when(){return e.variant==="success"},get children(){return Ir()}}),null),ye(d,A(X,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),ye(d,A(X,{get when(){return e.text.startsWith("(")},get fallback(){return (()=>{var v=Pr();return ye(v,()=>e.text),v})()},get children(){return e.text}}),null),ye(d,A(X,{get when(){return e.variant==="success"},get children(){return $r()}}),null),ae(v=>{var O=`${p().top}px`,N=`${p().left}px`,H=e.zIndex?.toString()??"2147483647",k=t();return O!==v.e&&he(d,"top",v.e=O),N!==v.t&&he(d,"left",v.t=N),H!==v.a&&he(d,"z-index",v.a=H),k!==v.o&&he(d,"opacity",v.o=k),v},{e:void 0,t:void 0,a:void 0,o:void 0}),d}})};var Lr=oe('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Dr=e=>{let[t,n]=P(0);return re(ve(()=>e,r=>{r!==false?requestAnimationFrame(()=>{n(1);}):n(0);})),t},dn=e=>{let t=Dr(e.visible),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerHeight,s=e.mouseX-o.width/2,a=e.mouseY+14+o.height+8>i?e.mouseY-o.height-14:e.mouseY+14;return Be(s,a,o.width,o.height)};return A(X,{get when(){return e.visible!==false},get children(){var o=Lr(),i=o.firstChild,s=i.firstChild,a=n;return typeof a=="function"?Ee(a,o):n=o,ae(l=>{var c=`${r().top}px`,f=`${r().left}px`,m=t(),C=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&he(o,"top",l.e=c),f!==l.t&&he(o,"left",l.t=f),m!==l.a&&he(o,"opacity",l.a=m),C!==l.o&&he(s,"width",l.o=C),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var Hr=oe("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),mn=e=>{let t,n=null,r=0,o=0,i=1,s=e.mouseX,a=e.mouseY,l=e.mouseX,c=e.mouseY,f=null,m=false,C=()=>{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));},T=()=>{n&&(n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(s,0),n.lineTo(s,o),n.moveTo(0,a),n.lineTo(r,a),n.stroke());},w=()=>{s=de(s,l,.3),a=de(a,c,.3),T(),Math.abs(s-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(w);},E=()=>{f===null&&(f=requestAnimationFrame(w));},p=()=>{if(l=e.mouseX,c=e.mouseY,!m){s=l,a=c,m=true,T();return}E();};return re(()=>{C(),T();let d=()=>{C(),T();};window.addEventListener("resize",d),fe(()=>{window.removeEventListener("resize",d),f!==null&&(cancelAnimationFrame(f),f=null);});}),re(()=>{p();}),A(X,{get when(){return e.visible!==false},get children(){var d=Hr(),g=t;return typeof g=="function"?Ee(g,d):t=d,d}})};var hn=e=>[A(X,{get when(){return Ie(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return A(Je,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),A(X,{get when(){return Ie(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return A(mn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),A(X,{get when(){return Ie(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return A(Je,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),A(Ke,{get each(){return e.grabbedBoxes??[]},children:t=>A(Je,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),A(Ke,{get each(){return e.successLabels??[]},children:t=>A(gt,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y}})}),A(X,{get when(){return Ie(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return A(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}})}}),A(X,{get when(){return Ie(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return A(dn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var bn="0.5.14",Ye=`bippy-${bn}`,gn=Object.defineProperty,jr=Object.prototype.hasOwnProperty,Ve=()=>{},yn=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{}},bt=(e=we())=>"getFiberRoots"in e,wn=false,pn,nt=(e=we())=>wn?true:(typeof e.inject=="function"&&(pn=e.inject.toString()),!!pn?.includes("(injected)")),tt=new Set,ke=new Set,Sn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ye,checkDCE:yn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),ke.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,tt.forEach(s=>s())),i},on:Ve,onCommitFiberRoot:Ve,onCommitFiberUnmount:Ve,onPostCommitFiberRoot:Ve,renderers:t,supportsFiber:true,supportsFlight:true};try{gn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,c)=>{ke.add(l),s.renderers.set(c,l);}),rt(e));}}});let o=window.hasOwnProperty,i=!1;gn(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{rt(e);}return r},rt=e=>{e&&tt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=yn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ye,t._instrumentationIsActive=!1;let n=bt(t);if(n||(t.on=Ve),t.renderers.size){t._instrumentationIsActive=!0,tt.forEach(i=>i());return}let r=t.inject,o=nt(t);o&&!n&&(wn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return ke.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,tt.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||nt())&&e?.();}catch{}},yt=()=>jr.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),we=e=>yt()?(rt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Sn(e),Tn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),wt=()=>{try{Tn()&&we();}catch{}};wt();var St=0,Tt=1;var xt=5;var Ct=11,vt=13;var Et=15,Rt=16;var _t=19;var Ot=26,kt=27,Nt=28,Ft=30;var At=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?At(t.type||t.render):null},ot=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=At(t);return r&&(r.displayName||r.name)||null};var It=e=>{let t=we(e.onActive);t._instrumentationSource=e.name??Ye;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let i=(s,a,l)=>{n!==i&&(n?.(s,a,l),e.onCommitFiberRoot?.(s,a,l));};t.onCommitFiberRoot=i;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let i=(s,a)=>{t.onCommitFiberUnmount===i&&(r?.(s,a),e.onCommitFiberUnmount?.(s,a));};t.onCommitFiberUnmount=i;}let o=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let i=(s,a)=>{t.onPostCommitFiberRoot===i&&(o?.(s,a),e.onPostCommitFiberRoot?.(s,a));};t.onPostCommitFiberRoot=i;}return t},it=e=>{let t=we();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},$t=new Set;var Jr=Object.create,kn=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,to=Object.getOwnPropertyNames,no=Object.getPrototypeOf,ro=Object.prototype.hasOwnProperty,oo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),io=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=to(t),i=0,s=o.length,a;i<s;i++)a=o[i],!ro.call(e,a)&&a!==n&&kn(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},so=(e,t,n)=>(n=e==null?{}:Jr(no(e)),io(kn(n,"default",{value:e,enumerable:true}),e)),ao=()=>{let e=we();for(let t of [...Array.from(ke),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},xn=e=>{for(let t of ke){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Se=e=>`
10
- in ${e}`,lo=(e,t)=>{let n=Se(e);return t&&(n+=` (at ${t})`),n},Mt=false,Pt=(e,t)=>{if(!e||Mt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Mt=true;let r=ao();xn(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let C;try{if(t){let T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[]);}catch(w){C=w;}Reflect.construct(e,[],T);}else {try{T.call();}catch(w){C=w;}e.call(T.prototype);}}else {try{throw Error()}catch(w){C=w;}let T=e();T&&typeof T.catch=="function"&&T.catch(()=>{});}}catch(T){if(T instanceof Error&&C instanceof Error&&typeof T.stack=="string")return [T.stack,C.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,m]=l.DetermineComponentFrameRoot();if(f&&m){let C=f.split(`
11
- `),T=m.split(`
12
- `),w=0,E=0;for(;w<C.length&&!C[w].includes("DetermineComponentFrameRoot");)w++;for(;E<T.length&&!T[E].includes("DetermineComponentFrameRoot");)E++;if(w===C.length||E===T.length)for(w=C.length-1,E=T.length-1;w>=1&&E>=0&&C[w]!==T[E];)E--;for(;w>=1&&E>=0;w--,E--)if(C[w]!==T[E]){if(w!==1||E!==1)do if(w--,E--,E<0||C[w]!==T[E]){let p=`
13
- ${C[w].replace(" at new "," at ")}`,d=ot(e);return d&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",d)),p}while(w>=1&&E>=0);break}}}finally{Mt=false,Error.prepareStackTrace=n,xn(r),console.error=o,console.warn=i;}let s=e?ot(e):"";return s?Se(s):""},co=(e,t)=>{let n=e.tag,r="";switch(n){case Nt:r=Se("Activity");break;case Tt:r=Pt(e.type,true);break;case Ct:r=Pt(e.type.render,false);break;case St:case Et:r=Pt(e.type,false);break;case xt:case Ot:case kt:r=Se(e.type);break;case Rt:r=Se("Lazy");break;case vt:r=e.child!==t&&t!==null?Se("Suspense Fallback"):Se("Suspense");break;case _t:r=Se("SuspenseList");break;case Ft:r=Se("ViewTransition");break;default:return ""}return r},uo=e=>{try{let t="",n=e,r=null;do{t+=co(n,r);let o=n._debugInfo;if(o&&Array.isArray(o))for(let i=o.length-1;i>=0;i--){let s=o[i];typeof s.name=="string"&&(t+=lo(s.name,s.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
9
+ var mr=(e,t)=>e===t;var gr=Symbol("solid-track"),We={equals:mr},en=sn,fe=1,De=2,tn={owned:null,cleanups:null,context:null,owner:null};var M=null,y=null,Ae=null,G=null,ee=null,ne=null,Ze=0;function Oe(e,t){let n=G,r=M,o=e.length===0,i=t===void 0?r:t,s=o?tn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ae(()=>ve(s)));M=s,G=null;try{return ye(a,!0)}finally{G=n,M=r;}}function D(e,t){t=t?Object.assign({},We,t):We;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),on(n,o));return [rn.bind(n),r]}function le(e,t,n){let r=gt(e,t,false,fe);je(r);}function re(e,t,n){en=wr;let r=gt(e,t,false,fe);(r.user=true),ne?ne.push(r):je(r);}function X(e,t,n){n=n?Object.assign({},We,n):We;let r=gt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),rn.bind(r)}function ae(e){if(G===null)return e();let t=G;G=null;try{return Ae?Ae.untrack(e):e()}finally{G=t;}}function Ee(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=ae(()=>t(a,o,s));return o=a,l}}function nn(e){re(()=>ae(e));}function de(e){return M===null||(M.cleanups===null?M.cleanups=[e]:M.cleanups.push(e)),e}D(false);function rn(){let e=y;if(this.sources&&(this.state))if((this.state)===fe)je(this);else {let t=ee;ee=null,ye(()=>Ke(this),false),ee=t;}if(G){let t=this.observers?this.observers.length:0;G.sources?(G.sources.push(this),G.sourceSlots.push(t)):(G.sources=[this],G.sourceSlots=[t]),this.observers?(this.observers.push(G),this.observerSlots.push(G.sources.length-1)):(this.observers=[G],this.observerSlots=[G.sources.length-1]);}return e&&y.sources.has(this)?this.tValue:this.value}function on(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&ye(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=y&&y.running;s&&y.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?ee.push(i):ne.push(i),i.observers&&an(i)),s?i.tState=fe:i.state=fe);}if(ee.length>1e6)throw ee=[],new Error},false);}return t}function je(e){if(!e.fn)return;ve(e);let t=Ze;Zt(e,e.value,t);}function Zt(e,t,n){let r,o=M,i=G;G=M=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=fe,e.owned&&e.owned.forEach(ve),e.owned=null)),e.updatedAt=n+1,ht(s)}finally{G=i,M=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?on(e,r):e.value=r,e.updatedAt=n);}function gt(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:M,context:M?M.context:null,pure:n};if(M===null||M!==tn&&(M.owned?M.owned.push(i):M.owned=[i]),Ae);return i}function He(e){let t=y;if((e.state)===0)return;if((e.state)===De)return Ke(e);if(e.suspense&&ae(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ze);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===fe)je(e);else if((e.state)===De){let o=ee;ee=null,ye(()=>Ke(e,n[0]),false),ee=o;}}}function ye(e,t){if(ee)return e();let n=false;t||(ee=[]),ne?n=true:ne=[],Ze++;try{let r=e();return br(n),r}catch(r){n||(ne=null),ee=null,ht(r);}}function br(e){if(ee&&(sn(ee),ee=null),e)return;let n=ne;ne=null,n.length&&ye(()=>en(n),false);}function sn(e){for(let t=0;t<e.length;t++)He(e[t]);}function wr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:He(r);}for(t=0;t<n;t++)He(e[t]);}function Ke(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<Ze)&&He(o):i===De&&Ke(o,t);}}}function an(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=De,r.pure?ee.push(r):ne.push(r),r.observers&&an(r));}}function ve(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ve(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ve(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Sr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ht(e,t=M){let r=Sr(e);throw r;}var Tr=Symbol("fallback");function Jt(e){for(let t=0;t<e.length;t++)e[t]();}function xr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return de(()=>Jt(i)),()=>{let l=e()||[],c=l.length,f,g;return l[gr],ae(()=>{let C,S,E,p,d,b,w,_,O;if(c===0)s!==0&&(Jt(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Tr],o[0]=Oe(F=>(i[0]=F,n.fallback())),s=1);else if(s===0){for(o=new Array(c),g=0;g<c;g++)r[g]=l[g],o[g]=Oe(v);s=c;}else {for(E=new Array(c),p=new Array(c),a&&(d=new Array(c)),b=0,w=Math.min(s,c);b<w&&r[b]===l[b];b++);for(w=s-1,_=c-1;w>=b&&_>=b&&r[w]===l[_];w--,_--)E[_]=o[w],p[_]=i[w],a&&(d[_]=a[w]);for(C=new Map,S=new Array(_+1),g=_;g>=b;g--)O=l[g],f=C.get(O),S[g]=f===void 0?-1:f,C.set(O,g);for(f=b;f<=w;f++)O=r[f],g=C.get(O),g!==void 0&&g!==-1?(E[g]=o[f],p[g]=i[f],a&&(d[g]=a[f]),g=S[g],C.set(O,g)):i[f]();for(g=b;g<c;g++)g in E?(o[g]=E[g],i[g]=p[g],a&&(a[g]=d[g],a[g](g))):o[g]=Oe(v);o=o.slice(0,s=c),r=l.slice(0);}return o});function v(C){if(i[g]=C,a){let[S,E]=D(g);return a[g]=E,t(l[g],S)}return t(l[g])}}}function $(e,t){return ae(()=>e(t||{}))}var vr=e=>`Stale read from <${e}>.`;function Qe(e){let t="fallback"in e&&{fallback:()=>e.fallback};return X(xr(()=>e.each,e.children,t||void 0))}function W(e){let t=e.keyed,n=X(()=>e.when,void 0,void 0),r=t?n:X(n,void 0,{equals:(o,i)=>!o==!i});return X(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?ae(()=>i(t?o:()=>{if(!ae(r))throw vr("Show");return n()})):i}return e.fallback},void 0,void 0)}var Ie=e=>X(()=>e());function _r(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let f=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],f);}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let f=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],f),t[o]=n[i];}else {if(!c){c=new Map;let g=a;for(;g<i;)c.set(n[g],g++);}let f=c.get(t[s]);if(f!=null)if(a<f&&f<i){let g=s,v=1,C;for(;++g<o&&g<i&&!((C=c.get(t[g]))==null||C!==f+v);)v++;if(v>f-a){let S=t[s];for(;a<f;)e.insertBefore(n[a++],S);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function un(e,t,n,r={}){let o;return Oe(i=>{o=i,t===document?e():we(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function ie(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function Or(e,t,n){(e.removeAttribute(t));}function et(e,t,n){if(!t)return n?Or(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 be(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Re(e,t,n){return ae(()=>e(t,n))}function we(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Je(e,t,r,n);le(o=>Je(e,t(),o,n),r);}function Je(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=$e(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=$e(e,n,r);}else {if(s==="function")return le(()=>{let l=t();for(;typeof l=="function";)l=l();n=Je(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(pt(l,t,n,o))return le(()=>n=Je(e,l,n,r,true)),()=>n;if(l.length===0){if(n=$e(e,n,r),a)return n}else c?n.length===0?cn(e,l,r):_r(e,n,l):(n&&$e(e),cn(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=$e(e,n,r,t);$e(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function pt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=pt(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=pt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let f=String(a);l&&l.nodeType===3&&l.data===f?e.push(l):e.push(document.createTextNode(f));}}return o}function cn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function $e(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var kr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],Nr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),Fr=e=>Array.isArray(e),Ar=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&Nr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return Fr(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},dn=e=>Ar(e,kr);var Pe="data-react-grab",mn=()=>{let e=document.querySelector(`[${Pe}]`);if(e){let i=e.shadowRoot?.querySelector(`[${Pe}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(Pe,"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(Pe,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var me=(e,t,n)=>e+(t-e)*n;var Ir=ie("<div>"),tt=e=>{let[t,n]=D(e.bounds.x),[r,o]=D(e.bounds.y),[i,s]=D(e.bounds.width),[a,l]=D(e.bounds.height),[c,f]=D(1),g=false,v=null,C=null,S=e.bounds,E=false,p=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,d=()=>{if(E)return;E=true;let _=()=>{let O=me(t(),S.x,p()),F=me(r(),S.y,p()),N=me(i(),S.width,p()),U=me(a(),S.height,p());n(O),o(F),s(N),l(U),Math.abs(O-S.x)<.5&&Math.abs(F-S.y)<.5&&Math.abs(N-S.width)<.5&&Math.abs(U-S.height)<.5?(v=null,E=false):v=requestAnimationFrame(_);};v=requestAnimationFrame(_);};re(Ee(()=>e.bounds,_=>{if(S=_,!g){n(S.x),o(S.y),s(S.width),l(S.height),g=true;return}d();})),re(()=>{e.variant==="grabbed"&&e.createdAt&&(C=window.setTimeout(()=>{f(0);},1500));}),de(()=>{v!==null&&(cancelAnimationFrame(v),v=null),C!==null&&(window.clearTimeout(C),C=null),E=false;});let b={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":"2147483646"},w=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.2)",transition:e.variant==="grabbed"?"opacity 0.3s ease-out":void 0};return $(W,{get when(){return e.visible!==false},get children(){var _=Ir();return le(O=>et(_,{...b,...w(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},O)),_}})};var Pr=ie('<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">'),gn=e=>{let t;return nn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=Pr(),r=t;return typeof r=="function"?Re(r,n):t=n,le(o=>et(n,{...e.style},o)),n})()};var Ve=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,c=i-r-8,f=Math.max(s,Math.min(e,l)),g=Math.max(a,Math.min(t,c));return {left:f,top:g}};var Mr=ie("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),Lr=ie("<div style=margin-right:4px>Copied"),Dr=ie("<div style=margin-left:4px>to clipboard"),Hr=ie(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),Br=ie(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),bt=e=>{let[t,n]=D(0),[r,o]=D(0),i,s=e.x,a=e.y,l=e.x,c=e.y,f=null,g=false,v=()=>{s=me(s,l,.3),a=me(a,c,.3),o(b=>b+1),Math.abs(s-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(v);},C=()=>{f===null&&(f=requestAnimationFrame(v));},S=()=>{if(l=e.x,c=e.y,!g){s=l,a=c,g=true,o(d=>d+1);return}C();};re(Ee(()=>e.visible,d=>{if(d!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.variant==="success"){let b=setTimeout(()=>{n(0);},1500);de(()=>clearTimeout(b));}})),re(()=>{S();}),de(()=>{f!==null&&(cancelAnimationFrame(f),f=null);});let E=()=>i?.getBoundingClientRect(),p=()=>{r();let d=E();if(!d)return {left:s,top:a};if(e.variant==="success"){let N=Math.round(s),U=Math.round(a)-d.height-6,te=N<8,ue=U<8,x=te||ue,h=Ve(N,U,d.width,d.height);return x&&(h.left+=4,h.top+=4),h}let b=12,w=window.innerWidth,_=window.innerHeight,O=[{left:Math.round(s)+b,top:Math.round(a)+b},{left:Math.round(s)-d.width-b,top:Math.round(a)+b},{left:Math.round(s)+b,top:Math.round(a)-d.height-b},{left:Math.round(s)-d.width-b,top:Math.round(a)-d.height-b}];for(let N of O){let U=N.left>=8&&N.left+d.width<=w-8,te=N.top>=8&&N.top+d.height<=_-8;if(U&&te)return N}let F=Ve(O[0].left,O[0].top,d.width,d.height);return F.left+=4,F.top+=4,F};return $(W,{get when(){return e.visible!==false},get children(){var d=Hr(),b=i;return typeof b=="function"?Re(b,d):i=d,we(d,$(W,{get when(){return e.variant==="processing"},get children(){return $(gn,{})}}),null),we(d,$(W,{get when(){return e.variant==="success"},get children(){return Mr()}}),null),we(d,$(W,{get when(){return e.variant==="success"},get children(){return Lr()}}),null),we(d,$(W,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),we(d,$(W,{get when(){return e.text.startsWith("(")},get fallback(){return (()=>{var w=Br();return we(w,()=>e.text),w})()},get children(){return e.text}}),null),we(d,$(W,{get when(){return e.variant==="success"},get children(){return Dr()}}),null),le(w=>{var _=`${p().top}px`,O=`${p().left}px`,F=e.zIndex?.toString()??"2147483647",N=t();return _!==w.e&&be(d,"top",w.e=_),O!==w.t&&be(d,"left",w.t=O),F!==w.a&&be(d,"z-index",w.a=F),N!==w.o&&be(d,"opacity",w.o=N),w},{e:void 0,t:void 0,a:void 0,o:void 0}),d}})};var jr=ie('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Vr=e=>{let[t,n]=D(0);return re(Ee(()=>e,r=>{r!==false?requestAnimationFrame(()=>{n(1);}):n(0);})),t},hn=e=>{let t=Vr(e.visible),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerHeight,s=e.mouseX-o.width/2,a=e.mouseY+14+o.height+8>i?e.mouseY-o.height-14:e.mouseY+14;return Ve(s,a,o.width,o.height)};return $(W,{get when(){return e.visible!==false},get children(){var o=jr(),i=o.firstChild,s=i.firstChild,a=n;return typeof a=="function"?Re(a,o):n=o,le(l=>{var c=`${r().top}px`,f=`${r().left}px`,g=t(),v=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&be(o,"top",l.e=c),f!==l.t&&be(o,"left",l.t=f),g!==l.a&&be(o,"opacity",l.a=g),v!==l.o&&be(s,"width",l.o=v),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var Yr=ie("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),pn=e=>{let t,n=null,r=0,o=0,i=1,s=e.mouseX,a=e.mouseY,l=e.mouseX,c=e.mouseY,f=null,g=false,v=()=>{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));},C=(w,_)=>{let O=document.elementFromPoint(w,_);if(!O||O===t||O===document.body||O===document.documentElement)return null;let F=O.getBoundingClientRect();return F.width===0||F.height===0?null:{top:F.top,bottom:F.bottom,left:F.left,right:F.right}},S=(w,_,O,F,N)=>{let U=C(w,_);if(!U)return N;let te=5;for(let ue=te;ue<N;ue+=te){let x=w+O*ue,h=_+F*ue;if(x<0||x>=r||h<0||h>=o)return ue;let u=C(x,h);if(!u||u.top!==U.top||u.bottom!==U.bottom||u.left!==U.left||u.right!==U.right)return ue}return N},E=()=>{if(!n)return;n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath();let w=S(s,a,0,-1,a),_=S(s,a,0,1,o-a),O=S(s,a,-1,0,s),F=S(s,a,1,0,r-s);n.moveTo(s,a-w),n.lineTo(s,a+_),n.moveTo(s-O,a),n.lineTo(s+F,a),n.stroke();},p=()=>{s=me(s,l,.3),a=me(a,c,.3),E(),Math.abs(s-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(p);},d=()=>{f===null&&(f=requestAnimationFrame(p));},b=()=>{if(l=e.mouseX,c=e.mouseY,!g){s=l,a=c,g=true,E();return}d();};return re(()=>{v(),E();let w=()=>{v(),E();};window.addEventListener("resize",w),de(()=>{window.removeEventListener("resize",w),f!==null&&(cancelAnimationFrame(f),f=null);});}),re(()=>{b();}),$(W,{get when(){return e.visible!==false},get children(){var w=Yr(),_=t;return typeof _=="function"?Re(_,w):t=w,w}})};var bn=e=>[$(W,{get when(){return Ie(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return $(tt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),$(W,{get when(){return Ie(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return $(pn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),$(W,{get when(){return Ie(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return $(tt,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),$(Qe,{get each(){return e.grabbedBoxes??[]},children:t=>$(tt,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),$(Qe,{get each(){return e.successLabels??[]},children:t=>$(bt,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y}})}),$(W,{get when(){return Ie(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return $(bt,{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}})}}),$(W,{get when(){return Ie(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return $(hn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var Sn="0.5.14",Ge=`bippy-${Sn}`,yn=Object.defineProperty,Gr=Object.prototype.hasOwnProperty,Ye=()=>{},Tn=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{}},wt=(e=Se())=>"getFiberRoots"in e,xn=false,wn,ot=(e=Se())=>xn?true:(typeof e.inject=="function"&&(wn=e.inject.toString()),!!wn?.includes("(injected)")),rt=new Set,ke=new Set,Cn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ge,checkDCE:Tn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),ke.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,rt.forEach(s=>s())),i},on:Ye,onCommitFiberRoot:Ye,onCommitFiberUnmount:Ye,onPostCommitFiberRoot:Ye,renderers:t,supportsFiber:true,supportsFlight:true};try{yn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,c)=>{ke.add(l),s.renderers.set(c,l);}),it(e));}}});let o=window.hasOwnProperty,i=!1;yn(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{it(e);}return r},it=e=>{e&&rt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Tn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ge,t._instrumentationIsActive=!1;let n=wt(t);if(n||(t.on=Ye),t.renderers.size){t._instrumentationIsActive=!0,rt.forEach(i=>i());return}let r=t.inject,o=ot(t);o&&!n&&(xn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return ke.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,rt.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||ot())&&e?.();}catch{}},St=()=>Gr.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Se=e=>St()?(it(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Cn(e),vn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Tt=()=>{try{vn()&&Se();}catch{}};Tt();var xt=0,Ct=1;var vt=5;var Et=11,Rt=13;var _t=15,Ot=16;var kt=19;var Nt=26,Ft=27,At=28,$t=30;var It=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?It(t.type||t.render):null},st=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=It(t);return r&&(r.displayName||r.name)||null};var Pt=e=>{let t=Se(e.onActive);t._instrumentationSource=e.name??Ge;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let i=(s,a,l)=>{n!==i&&(n?.(s,a,l),e.onCommitFiberRoot?.(s,a,l));};t.onCommitFiberRoot=i;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let i=(s,a)=>{t.onCommitFiberUnmount===i&&(r?.(s,a),e.onCommitFiberUnmount?.(s,a));};t.onCommitFiberUnmount=i;}let o=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let i=(s,a)=>{t.onPostCommitFiberRoot===i&&(o?.(s,a),e.onPostCommitFiberRoot?.(s,a));};t.onPostCommitFiberRoot=i;}return t},at=e=>{let t=Se();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},Mt=new Set;var ro=Object.create,An=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,io=Object.getOwnPropertyNames,so=Object.getPrototypeOf,ao=Object.prototype.hasOwnProperty,lo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),co=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=io(t),i=0,s=o.length,a;i<s;i++)a=o[i],!ao.call(e,a)&&a!==n&&An(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=oo(t,a))||r.enumerable});return e},uo=(e,t,n)=>(n=e==null?{}:ro(so(e)),co(An(n,"default",{value:e,enumerable:true}),e)),fo=()=>{let e=Se();for(let t of [...Array.from(ke),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},En=e=>{for(let t of ke){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Te=e=>`
10
+ in ${e}`,mo=(e,t)=>{let n=Te(e);return t&&(n+=` (at ${t})`),n},Lt=false,Dt=(e,t)=>{if(!e||Lt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Lt=true;let r=fo();En(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let v;try{if(t){let C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[]);}catch(S){v=S;}Reflect.construct(e,[],C);}else {try{C.call();}catch(S){v=S;}e.call(C.prototype);}}else {try{throw Error()}catch(S){v=S;}let C=e();C&&typeof C.catch=="function"&&C.catch(()=>{});}}catch(C){if(C instanceof Error&&v instanceof Error&&typeof C.stack=="string")return [C.stack,v.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,g]=l.DetermineComponentFrameRoot();if(f&&g){let v=f.split(`
11
+ `),C=g.split(`
12
+ `),S=0,E=0;for(;S<v.length&&!v[S].includes("DetermineComponentFrameRoot");)S++;for(;E<C.length&&!C[E].includes("DetermineComponentFrameRoot");)E++;if(S===v.length||E===C.length)for(S=v.length-1,E=C.length-1;S>=1&&E>=0&&v[S]!==C[E];)E--;for(;S>=1&&E>=0;S--,E--)if(v[S]!==C[E]){if(S!==1||E!==1)do if(S--,E--,E<0||v[S]!==C[E]){let p=`
13
+ ${v[S].replace(" at new "," at ")}`,d=st(e);return d&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",d)),p}while(S>=1&&E>=0);break}}}finally{Lt=false,Error.prepareStackTrace=n,En(r),console.error=o,console.warn=i;}let s=e?st(e):"";return s?Te(s):""},go=(e,t)=>{let n=e.tag,r="";switch(n){case At:r=Te("Activity");break;case Ct:r=Dt(e.type,true);break;case Et:r=Dt(e.type.render,false);break;case xt:case _t:r=Dt(e.type,false);break;case vt:case Nt:case Ft:r=Te(e.type);break;case Ot:r=Te("Lazy");break;case Rt:r=e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");break;case kt:r=Te("SuspenseList");break;case $t:r=Te("ViewTransition");break;default:return ""}return r},ho=e=>{try{let t="",n=e,r=null;do{t+=go(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+=mo(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}`:""}},fo=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}`:""}},po=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},mo=/(^|@)\S+:\d+/,Nn=/^\s*at .*(\S+:\d+|\(native\))/m,ho=/^(eval@)?(\[native code\])?$/;var go=(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=Cn(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(mo)){let i=vn(o,void 0)[0];i&&r.push(i);}return Lt(r,t)}return e.match(Nn)?Cn(e,t):vn(e,t)},Fn=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]},Lt=(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 Cn=(e,t)=>Lt(e.split(`
20
- `).filter(r=>!!r.match(Nn)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let i=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=i.match(/ (\(.+\)$)/);i=s?i.replace(s[0],""):i;let a=Fn(s?s[1]:i),l=s&&i||void 0,c=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:c,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}});var vn=(e,t)=>Lt(e.split(`
21
- `).filter(r=>!r.match(ho)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let i=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=o.match(i),a=s&&s[1]?s[1]:void 0,l=Fn(o.replace(i,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var po=oo((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let x=0;x<i.length;x++){let b=i.charCodeAt(x);s[x]=b,a[b]=x;}function l(x,b){let u=0,S=0,_=0;do{let L=x.next();_=a[L],u|=(_&31)<<S,S+=5;}while(_&32);let F=u&1;return u>>>=1,F&&(u=-2147483648|-u),b+u}function c(x,b,u){let S=b-u;S=S<0?-S<<1|1:S<<1;do{let _=S&31;S>>>=5,S>0&&(_|=32),x.write(s[_]);}while(S>0);return b}function f(x,b){return x.pos>=b?false:x.peek()!==r}let m=1024*16,C=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let b="";for(let u=0;u<x.length;u++)b+=String.fromCharCode(x[u]);return b}};class T{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(m);}write(b){let{buffer:u}=this;u[this.pos++]=b,this.pos===m&&(this.out+=C.decode(u),this.pos=0);}flush(){let{buffer:b,out:u,pos:S}=this;return S>0?u+C.decode(b.subarray(0,S)):u}}class w{constructor(b){this.pos=0,this.buffer=b;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(b){let{buffer:u,pos:S}=this,_=u.indexOf(b,S);return _===-1?u.length:_}}let E=[];function p(x){let{length:b}=x,u=new w(x),S=[],_=[],F=0;for(;u.pos<b;u.pos++){F=l(u,F);let L=l(u,0);if(!f(u,b)){let z=_.pop();z[2]=F,z[3]=L;continue}let I=l(u,0),D=l(u,0),j=D&1,B=j?[F,L,0,0,I,l(u,0)]:[F,L,0,0,I],q=E;if(f(u,b)){q=[];do{let z=l(u,0);q.push(z);}while(f(u,b))}B.vars=q,S.push(B),_.push(B);}return S}function d(x){let b=new T;for(let u=0;u<x.length;)u=g(x,u,b,[0]);return b.flush()}function g(x,b,u,S){let _=x[b],{0:F,1:L,2:I,3:D,4:j,vars:B}=_;b>0&&u.write(r),S[0]=c(u,F,S[0]),c(u,L,0),c(u,j,0);let q=_.length===6?1:0;c(u,q,0),_.length===6&&c(u,_[5],0);for(let z of B)c(u,z,0);for(b++;b<x.length;){let z=x[b],{0:M,1:W}=z;if(M>I||M===I&&W>=D)break;b=g(x,b,u,S);}return u.write(r),S[0]=c(u,I,S[0]),c(u,D,0),b}function v(x){let{length:b}=x,u=new w(x),S=[],_=[],F=0,L=0,I=0,D=0,j=0,B=0,q=0,z=0;do{let M=u.indexOf(";"),W=0;for(;u.pos<M;u.pos++){if(W=l(u,W),!f(u,M)){let J=_.pop();J[2]=F,J[3]=W;continue}let ie=l(u,0),Re=ie&1,Te=ie&2,_e=ie&4,Pe=null,me=E,ge;if(Re){let J=l(u,L);I=l(u,L===J?I:0),L=J,ge=[F,W,0,0,J,I];}else ge=[F,W,0,0];if(ge.isScope=!!_e,Te){let J=D,pe=j;D=l(u,D);let xe=J===D;j=l(u,xe?j:0),B=l(u,xe&&pe===j?B:0),Pe=[D,j,B];}if(ge.callsite=Pe,f(u,M)){me=[];do{q=F,z=W;let J=l(u,0),pe;if(J<-1){pe=[[l(u,0)]];for(let xe=-1;xe>J;xe--){let ze=q;q=l(u,q),z=l(u,q===ze?z:0);let at=l(u,0);pe.push([at,q,z]);}}else pe=[[J]];me.push(pe);}while(f(u,M))}ge.bindings=me,S.push(ge),_.push(ge);}F++,u.pos=M+1;}while(u.pos<b);return S}function O(x){if(x.length===0)return "";let b=new T;for(let u=0;u<x.length;)u=N(x,u,b,[0,0,0,0,0,0,0]);return b.flush()}function N(x,b,u,S){let _=x[b],{0:F,1:L,2:I,3:D,isScope:j,callsite:B,bindings:q}=_;S[0]<F?(H(u,S[0],F),S[0]=F,S[1]=0):b>0&&u.write(r),S[1]=c(u,_[1],S[1]);let z=(_.length===6?1:0)|(B?2:0)|(j?4:0);if(c(u,z,0),_.length===6){let{4:M,5:W}=_;M!==S[2]&&(S[3]=0),S[2]=c(u,M,S[2]),S[3]=c(u,W,S[3]);}if(B){let{0:M,1:W,2:ie}=_.callsite;M===S[4]?W!==S[5]&&(S[6]=0):(S[5]=0,S[6]=0),S[4]=c(u,M,S[4]),S[5]=c(u,W,S[5]),S[6]=c(u,ie,S[6]);}if(q)for(let M of q){M.length>1&&c(u,-M.length,0);let W=M[0][0];c(u,W,0);let ie=F,Re=L;for(let Te=1;Te<M.length;Te++){let _e=M[Te];ie=c(u,_e[1],ie),Re=c(u,_e[2],Re),c(u,_e[0],0);}}for(b++;b<x.length;){let M=x[b],{0:W,1:ie}=M;if(W>I||W===I&&ie>=D)break;b=N(x,b,u,S);}return S[0]<I?(H(u,S[0],I),S[0]=I,S[1]=0):u.write(r),S[1]=c(u,D,S[1]),b}function H(x,b,u){do x.write(o);while(++b<u)}function k(x){let{length:b}=x,u=new w(x),S=[],_=0,F=0,L=0,I=0,D=0;do{let j=u.indexOf(";"),B=[],q=true,z=0;for(_=0;u.pos<j;){let M;_=l(u,_),_<z&&(q=false),z=_,f(u,j)?(F=l(u,F),L=l(u,L),I=l(u,I),f(u,j)?(D=l(u,D),M=[_,F,L,I,D]):M=[_,F,L,I]):M=[_],B.push(M),u.pos++;}q||Q(B),S.push(B),u.pos=j+1;}while(u.pos<=b);return S}function Q(x){x.sort(ne);}function ne(x,b){return x[0]-b[0]}function Me(x){let b=new T,u=0,S=0,_=0,F=0;for(let L=0;L<x.length;L++){let I=x[L];if(L>0&&b.write(o),I.length===0)continue;let D=0;for(let j=0;j<I.length;j++){let B=I[j];j>0&&b.write(r),D=c(b,B[0],D),B.length!==1&&(u=c(b,B[1],u),S=c(b,B[2],S),_=c(b,B[3],_),B.length!==4&&(F=c(b,B[4],F)));}}return b.flush()}n.decode=k,n.decodeGeneratedRanges=v,n.decodeOriginalScopes=p,n.encode=Me,n.encodeGeneratedRanges=O,n.encodeOriginalScopes=d,Object.defineProperty(n,"__esModule",{value:true});});}),An=so(po()),In=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,bo=/^data:application\/json[^,]+base64,/,yo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,$n=typeof WeakRef<"u",Ge=new Map,st=new Map,wo=e=>$n&&e instanceof WeakRef,En=(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 f of o)if(f[0]<=r)i=f;else break;if(!i||i.length<4)return null;let[,s,a,l]=i;if(s===void 0||a===void 0||l===void 0)return null;let c=t[s];return c?{columnNumber:l,fileName:c,lineNumber:a+1}:null},So=(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 En(r.map.mappings,r.map.sources,o,i)}return En(e.mappings,e.sources,t-1,n)},To=(e,t)=>{let n=t.split(`
22
- `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(yo);s&&(r=s[1]||s[2]);}if(!r)return null;let o=In.test(r);if(!(bo.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},xo=e=>({file:e.file,mappings:(0, An.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),Co=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, An.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}},Rn=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(In);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},vo=async(e,t=fetch)=>{if(!Rn(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=To(e,n);if(!r||!Rn(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?Co(i):xo(i)}catch{return null}},Eo=async(e,t=true,n)=>{if(t&&Ge.has(e)){let i=Ge.get(e);if(i==null)return null;if(wo(i)){let s=i.deref();if(s)return s;Ge.delete(e);}else return i}if(t&&st.has(e))return st.get(e);let r=vo(e,n);t&&st.set(e,r);let o=await r;return t&&st.delete(e),t&&(o===null?Ge.set(e,null):Ge.set(e,$n?new WeakRef(o):o)),o},_n=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Ro=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],On="about://React/",_o=["<anonymous>","eval",""],Oo=/\.(jsx|tsx|ts|js)$/,ko=/(\.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,No=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Fo=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string";var Mn=e=>Fo(e)?fo(e._debugStack.stack):uo(e);var Pn=async(e,t=1,n=true,r)=>{let o=go(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let a=await Eo(s.file,n,r);if(a&&typeof s.line=="number"&&typeof s.col=="number"){let l=So(a,s.line,s.col);if(l){i.push(l);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},Dt=e=>{if(!e||_o.includes(e))return "";let t=e;if(t.startsWith(On)){let r=t.slice(On.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of Ro)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(_n.test(t)){let r=t.match(_n);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);No.test(r)&&(t=t.slice(0,n));}return t},Ln=e=>{let t=Dt(e);return !(!t||!Oo.test(t)||ko.test(t))};It({onCommitFiberRoot(e,t){$t.add(t);}});var Dn=async e=>{let t=it(e);if(!t)return null;let n=Mn(t),r=await Pn(n,Number.MAX_SAFE_INTEGER);return r?r.filter(o=>Ln(o.fileName)).map(o=>({...o,fileName:Dt(o.fileName)})):null};var Hn=e=>{let t=new Set(["article","aside","footer","form","header","main","nav","section"]),n=p=>{let d=p.tagName.toLowerCase();if(t.has(d)||p.id)return true;if(p.className&&typeof p.className=="string"){let g=p.className.trim();if(g&&g.length>0)return true}return Array.from(p.attributes).some(g=>g.name.startsWith("data-"))},r=(p,d=10)=>{let g=[],v=p.parentElement,O=0;for(;v&&O<d&&v.tagName!=="BODY"&&!(n(v)&&(g.push(v),g.length>=3));)v=v.parentElement,O++;return g.reverse()},o=p=>{let d=[],g=p,v=0,O=5;for(;g&&v<O&&g.tagName!=="BODY";){let N=g.tagName.toLowerCase();if(g.id){N+=`#${g.id}`,d.unshift(N);break}else if(g.className&&typeof g.className=="string"&&g.className.trim()){let H=g.className.trim().split(/\s+/).slice(0,2);N+=`.${H.join(".")}`;}if(!g.id&&(!g.className||!g.className.trim())&&g.parentElement){let H=Array.from(g.parentElement.children),k=H.indexOf(g);k>=0&&H.length>1&&(N+=`:nth-child(${k+1})`);}d.unshift(N),g=g.parentElement,v++;}return d.join(" > ")},i=(p,d=false)=>{let g=p.tagName.toLowerCase(),v=[];if(p.id&&v.push(`id="${p.id}"`),p.className&&typeof p.className=="string"){let k=p.className.trim().split(/\s+/);if(k.length>0&&k[0]){let ne=(d?k.slice(0,3):k).join(" ");ne.length>30&&(ne=ne.substring(0,30)+"..."),v.push(`class="${ne}"`);}}let O=Array.from(p.attributes).filter(k=>k.name.startsWith("data-")),N=d?O.slice(0,1):O;for(let k of N){let Q=k.value;Q.length>20&&(Q=Q.substring(0,20)+"..."),v.push(`${k.name}="${Q}"`);}let H=p.getAttribute("aria-label");if(H&&!d){let k=H;k.length>20&&(k=k.substring(0,20)+"..."),v.push(`aria-label="${k}"`);}return v.length>0?`<${g} ${v.join(" ")}>`:`<${g}>`},s=p=>`</${p.tagName.toLowerCase()}>`,a=p=>{let d=p.textContent||"";d=d.trim().replace(/\s+/g," ");let g=60;return d.length>g&&(d=d.substring(0,g)+"..."),d},l=p=>{if(p.id)return `#${p.id}`;if(p.className&&typeof p.className=="string"){let d=p.className.trim().split(/\s+/);if(d.length>0&&d[0])return `.${d[0]}`}return null},c=[];c.push(`Path: ${o(e)}`),c.push("");let f=r(e);for(let p=0;p<f.length;p++){let d=" ".repeat(p);c.push(d+i(f[p],true));}let m=e.parentElement,C=-1;if(m){let p=Array.from(m.children);if(C=p.indexOf(e),C>0){let d=p[C-1];if(l(d)&&C<=2){let v=" ".repeat(f.length);c.push(`${v} ${i(d,true)}`),c.push(`${v} </${d.tagName.toLowerCase()}>`);}else if(C>0){let v=" ".repeat(f.length);c.push(`${v} ... (${C} element${C===1?"":"s"})`);}}}let T=" ".repeat(f.length);c.push(T+" <!-- SELECTED -->");let w=a(e),E=e.children.length;if(w&&E===0&&w.length<40?c.push(`${T} ${i(e)}${w}${s(e)}`):(c.push(T+" "+i(e)),w&&c.push(`${T} ${w}`),E>0&&c.push(`${T} ... (${E} element${E===1?"":"s"})`),c.push(T+" "+s(e))),m&&C>=0){let p=Array.from(m.children),d=p.length-C-1;if(d>0){let g=p[C+1];l(g)&&d<=2?(c.push(`${T} ${i(g,true)}`),c.push(`${T} </${g.tagName.toLowerCase()}>`)):c.push(`${T} ... (${d} element${d===1?"":"s"})`);}}for(let p=f.length-1;p>=0;p--){let d=" ".repeat(p);c.push(d+s(f[p]));}return c.join(`
23
- `)};var Ao=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),Ht=async e=>{await Ao();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=jn(t);if(!n)return n}return !0}return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(t=>t instanceof Blob?[t.type??"text/plain",t]:["text/plain",new Blob([t],{type:"text/plain"})])))]),!0}else {if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return jn(e)}}}catch{return false}},jn=e=>{if(!document.execCommand)return false;let t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",(document.body||document.documentElement).append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove();}};var Bn=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var Ue=e=>{if(e.closest(`[${$e}]`))return false;let t=window.getComputedStyle(e);return !(!Bn(e,t)||t.pointerEvents==="none")};var jt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(Ue(r))return r;return null};var Vn=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),i=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height;for(let c of o){if(!n){let E=(c.tagName||"").toUpperCase();if(E==="HTML"||E==="BODY")continue}if(!t(c))continue;let f=c.getBoundingClientRect(),m=f.left,C=f.top,T=f.left+f.width,w=f.top+f.height;if(n){let E=Math.max(i,m),p=Math.max(s,C),d=Math.min(a,T),g=Math.min(l,w),v=Math.max(0,d-E),O=Math.max(0,g-p),N=v*O,H=Math.max(0,f.width*f.height);H>0&&N/H>=.75&&r.push(c);}else m<a&&T>i&&C<l&&w>s&&r.push(c);}return r},Yn=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Gn=(e,t,n)=>{if(e.length<=1)return null;let r=t.x,o=t.y,i=t.x+t.width,s=t.y+t.height,a=e[0];for(;a;){let l=a.parentElement;if(!l)break;let c=l.getBoundingClientRect(),f=Math.max(r,c.left),m=Math.max(o,c.top),C=Math.min(i,c.left+c.width),T=Math.min(s,c.top+c.height),w=Math.max(0,C-f),E=Math.max(0,T-m),p=w*E,d=Math.max(0,c.width*c.height);if(!(d>0&&p/d>=.75))break;if(!n(l)){a=l;continue}if(e.every(O=>l.contains(O)))return l;a=l;}return null},Un=(e,t)=>{let n=Vn(e,t,true),r=Yn(n),o=Gn(r,e,t);return o?[o]:r},zn=(e,t)=>{let n=Vn(e,t,false),r=Yn(n),o=Gn(r,e,t);return o?[o]:r};var Bt=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 Xn=1700,Io=150,qn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Oe(n=>{let[o,i]=P(false),[s,a]=P(-1e3),[l,c]=P(-1e3),[f,m]=P(false),[C,T]=P(-1e3),[w,E]=P(-1e3),[p,d]=P(false),[g,v]=P(null),[O,N]=P(null),[H,k]=P(0),[Q,ne]=P([]),[Me,x]=P([]),[b,u]=P(false),[S,_]=P(false),F=null,L=null,I=null,D=null,j=U(()=>b()&&!p()),B=U(()=>s()>-1e3&&l()>-1e3),q=h=>(h.metaKey||h.ctrlKey)&&h.key.toLowerCase()==="c",z=h=>{let R=`grabbed-${Date.now()}-${Math.random()}`,V=Date.now(),G={id:R,bounds:h,createdAt:V},ee=Q();ne([...ee,G]),setTimeout(()=>{ne(ce=>ce.filter(sr=>sr.id!==R));},Xn);},M=(h,R,V)=>{let G=`success-${Date.now()}-${Math.random()}`;x(ee=>[...ee,{id:G,text:h,x:R,y:V}]),setTimeout(()=>{x(ee=>ee.filter(ce=>ce.id!==G));},Xn);},W=h=>h.map(R=>{let V=R.functionName??"anonymous",G=R.fileName??"unknown",ee=R.lineNumber??0,ce=R.columnNumber??0;return ` ${V} - ${G}:${ee}:${ce}`}).join(`
24
- `),ie=h=>`<selected_element>${h}</selected_element>`,Re=async h=>{let R=Hn(h),V=await Dn(h);if(V?.length){let G=W(V);return `${R}
18
+ `,r)),r!==-1)n=n.slice(0,r);else return "";return n},bo=/(^|@)\S+:\d+/,$n=/^\s*at .*(\S+:\d+|\(native\))/m,yo=/^(eval@)?(\[native code\])?$/;var wo=(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=Rn(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(bo)){let i=_n(o,void 0)[0];i&&r.push(i);}return Ht(r,t)}return e.match($n)?Rn(e,t):_n(e,t)},In=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]},Ht=(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 Rn=(e,t)=>Ht(e.split(`
20
+ `).filter(r=>!!r.match($n)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let i=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=i.match(/ (\(.+\)$)/);i=s?i.replace(s[0],""):i;let a=In(s?s[1]:i),l=s&&i||void 0,c=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:c,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}});var _n=(e,t)=>Ht(e.split(`
21
+ `).filter(r=>!r.match(yo)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let i=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=o.match(i),a=s&&s[1]?s[1]:void 0,l=In(o.replace(i,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var So=lo((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let x=0;x<i.length;x++){let h=i.charCodeAt(x);s[x]=h,a[h]=x;}function l(x,h){let u=0,T=0,k=0;do{let H=x.next();k=a[H],u|=(k&31)<<T,T+=5;}while(k&32);let A=u&1;return u>>>=1,A&&(u=-2147483648|-u),h+u}function c(x,h,u){let T=h-u;T=T<0?-T<<1|1:T<<1;do{let k=T&31;T>>>=5,T>0&&(k|=32),x.write(s[k]);}while(T>0);return h}function f(x,h){return x.pos>=h?false:x.peek()!==r}let g=1024*16,v=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let h="";for(let u=0;u<x.length;u++)h+=String.fromCharCode(x[u]);return h}};class C{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(g);}write(h){let{buffer:u}=this;u[this.pos++]=h,this.pos===g&&(this.out+=v.decode(u),this.pos=0);}flush(){let{buffer:h,out:u,pos:T}=this;return T>0?u+v.decode(h.subarray(0,T)):u}}class S{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:u,pos:T}=this,k=u.indexOf(h,T);return k===-1?u.length:k}}let E=[];function p(x){let{length:h}=x,u=new S(x),T=[],k=[],A=0;for(;u.pos<h;u.pos++){A=l(u,A);let H=l(u,0);if(!f(u,h)){let q=k.pop();q[2]=A,q[3]=H;continue}let I=l(u,0),B=l(u,0),j=B&1,V=j?[A,H,0,0,I,l(u,0)]:[A,H,0,0,I],K=E;if(f(u,h)){K=[];do{let q=l(u,0);K.push(q);}while(f(u,h))}V.vars=K,T.push(V),k.push(V);}return T}function d(x){let h=new C;for(let u=0;u<x.length;)u=b(x,u,h,[0]);return h.flush()}function b(x,h,u,T){let k=x[h],{0:A,1:H,2:I,3:B,4:j,vars:V}=k;h>0&&u.write(r),T[0]=c(u,A,T[0]),c(u,H,0),c(u,j,0);let K=k.length===6?1:0;c(u,K,0),k.length===6&&c(u,k[5],0);for(let q of V)c(u,q,0);for(h++;h<x.length;){let q=x[h],{0:L,1:Z}=q;if(L>I||L===I&&Z>=B)break;h=b(x,h,u,T);}return u.write(r),T[0]=c(u,I,T[0]),c(u,B,0),h}function w(x){let{length:h}=x,u=new S(x),T=[],k=[],A=0,H=0,I=0,B=0,j=0,V=0,K=0,q=0;do{let L=u.indexOf(";"),Z=0;for(;u.pos<L;u.pos++){if(Z=l(u,Z),!f(u,L)){let J=k.pop();J[2]=A,J[3]=Z;continue}let se=l(u,0),_e=se&1,xe=se&2,ge=se&4,Ne=null,Me=E,he;if(_e){let J=l(u,H);I=l(u,H===J?I:0),H=J,he=[A,Z,0,0,J,I];}else he=[A,Z,0,0];if(he.isScope=!!ge,xe){let J=B,Ce=j;B=l(u,B);let pe=J===B;j=l(u,pe?j:0),V=l(u,pe&&Ce===j?V:0),Ne=[B,j,V];}if(he.callsite=Ne,f(u,L)){Me=[];do{K=A,q=Z;let J=l(u,0),Ce;if(J<-1){Ce=[[l(u,0)]];for(let pe=-1;pe>J;pe--){let Xe=K;K=l(u,K),q=l(u,K===Xe?q:0);let qe=l(u,0);Ce.push([qe,K,q]);}}else Ce=[[J]];Me.push(Ce);}while(f(u,L))}he.bindings=Me,T.push(he),k.push(he);}A++,u.pos=L+1;}while(u.pos<h);return T}function _(x){if(x.length===0)return "";let h=new C;for(let u=0;u<x.length;)u=O(x,u,h,[0,0,0,0,0,0,0]);return h.flush()}function O(x,h,u,T){let k=x[h],{0:A,1:H,2:I,3:B,isScope:j,callsite:V,bindings:K}=k;T[0]<A?(F(u,T[0],A),T[0]=A,T[1]=0):h>0&&u.write(r),T[1]=c(u,k[1],T[1]);let q=(k.length===6?1:0)|(V?2:0)|(j?4:0);if(c(u,q,0),k.length===6){let{4:L,5:Z}=k;L!==T[2]&&(T[3]=0),T[2]=c(u,L,T[2]),T[3]=c(u,Z,T[3]);}if(V){let{0:L,1:Z,2:se}=k.callsite;L===T[4]?Z!==T[5]&&(T[6]=0):(T[5]=0,T[6]=0),T[4]=c(u,L,T[4]),T[5]=c(u,Z,T[5]),T[6]=c(u,se,T[6]);}if(K)for(let L of K){L.length>1&&c(u,-L.length,0);let Z=L[0][0];c(u,Z,0);let se=A,_e=H;for(let xe=1;xe<L.length;xe++){let ge=L[xe];se=c(u,ge[1],se),_e=c(u,ge[2],_e),c(u,ge[0],0);}}for(h++;h<x.length;){let L=x[h],{0:Z,1:se}=L;if(Z>I||Z===I&&se>=B)break;h=O(x,h,u,T);}return T[0]<I?(F(u,T[0],I),T[0]=I,T[1]=0):u.write(r),T[1]=c(u,B,T[1]),h}function F(x,h,u){do x.write(o);while(++h<u)}function N(x){let{length:h}=x,u=new S(x),T=[],k=0,A=0,H=0,I=0,B=0;do{let j=u.indexOf(";"),V=[],K=true,q=0;for(k=0;u.pos<j;){let L;k=l(u,k),k<q&&(K=false),q=k,f(u,j)?(A=l(u,A),H=l(u,H),I=l(u,I),f(u,j)?(B=l(u,B),L=[k,A,H,I,B]):L=[k,A,H,I]):L=[k],V.push(L),u.pos++;}K||U(V),T.push(V),u.pos=j+1;}while(u.pos<=h);return T}function U(x){x.sort(te);}function te(x,h){return x[0]-h[0]}function ue(x){let h=new C,u=0,T=0,k=0,A=0;for(let H=0;H<x.length;H++){let I=x[H];if(H>0&&h.write(o),I.length===0)continue;let B=0;for(let j=0;j<I.length;j++){let V=I[j];j>0&&h.write(r),B=c(h,V[0],B),V.length!==1&&(u=c(h,V[1],u),T=c(h,V[2],T),k=c(h,V[3],k),V.length!==4&&(A=c(h,V[4],A)));}}return h.flush()}n.decode=N,n.decodeGeneratedRanges=w,n.decodeOriginalScopes=p,n.encode=ue,n.encodeGeneratedRanges=_,n.encodeOriginalScopes=d,Object.defineProperty(n,"__esModule",{value:true});});}),Pn=uo(So()),Mn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,To=/^data:application\/json[^,]+base64,/,xo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Ln=typeof WeakRef<"u",Ue=new Map,lt=new Map,Co=e=>Ln&&e instanceof WeakRef,On=(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 f of o)if(f[0]<=r)i=f;else break;if(!i||i.length<4)return null;let[,s,a,l]=i;if(s===void 0||a===void 0||l===void 0)return null;let c=t[s];return c?{columnNumber:l,fileName:c,lineNumber:a+1}:null},vo=(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 On(r.map.mappings,r.map.sources,o,i)}return On(e.mappings,e.sources,t-1,n)},Eo=(e,t)=>{let n=t.split(`
22
+ `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(xo);s&&(r=s[1]||s[2]);}if(!r)return null;let o=Mn.test(r);if(!(To.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},Ro=e=>({file:e.file,mappings:(0, Pn.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),_o=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, Pn.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},kn=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(Mn);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},Oo=async(e,t=fetch)=>{if(!kn(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=Eo(e,n);if(!r||!kn(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?_o(i):Ro(i)}catch{return null}},ko=async(e,t=true,n)=>{if(t&&Ue.has(e)){let i=Ue.get(e);if(i==null)return null;if(Co(i)){let s=i.deref();if(s)return s;Ue.delete(e);}else return i}if(t&&lt.has(e))return lt.get(e);let r=Oo(e,n);t&&lt.set(e,r);let o=await r;return t&&lt.delete(e),t&&(o===null?Ue.set(e,null):Ue.set(e,Ln?new WeakRef(o):o)),o},Nn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,No=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],Fn="about://React/",Fo=["<anonymous>","eval",""],Ao=/\.(jsx|tsx|ts|js)$/,$o=/(\.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,Io=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Po=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string";var Dn=e=>Po(e)?po(e._debugStack.stack):ho(e);var Hn=async(e,t=1,n=true,r)=>{let o=wo(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let a=await ko(s.file,n,r);if(a&&typeof s.line=="number"&&typeof s.col=="number"){let l=vo(a,s.line,s.col);if(l){i.push(l);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},Bt=e=>{if(!e||Fo.includes(e))return "";let t=e;if(t.startsWith(Fn)){let r=t.slice(Fn.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of No)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(Nn.test(t)){let r=t.match(Nn);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);Io.test(r)&&(t=t.slice(0,n));}return t},Bn=e=>{let t=Bt(e);return !(!t||!Ao.test(t)||$o.test(t))};Pt({onCommitFiberRoot(e,t){Mt.add(t);}});var jn=async e=>{let t=at(e);if(!t)return null;let n=Dn(t),r=await Hn(n,Number.MAX_SAFE_INTEGER);return r?(console.log(r),r.map(o=>({...o,fileName:Bt(o.fileName)})).filter(o=>Bn(o.fileName))):null};var Vn=e=>{let t=new Set(["article","aside","footer","form","header","main","nav","section"]),n=p=>{let d=p.tagName.toLowerCase();if(t.has(d)||p.id)return true;if(p.className&&typeof p.className=="string"){let b=p.className.trim();if(b&&b.length>0)return true}return Array.from(p.attributes).some(b=>b.name.startsWith("data-"))},r=(p,d=10)=>{let b=[],w=p.parentElement,_=0;for(;w&&_<d&&w.tagName!=="BODY"&&!(n(w)&&(b.push(w),b.length>=3));)w=w.parentElement,_++;return b.reverse()},o=p=>{let d=[],b=p,w=0,_=5;for(;b&&w<_&&b.tagName!=="BODY";){let O=b.tagName.toLowerCase();if(b.id){O+=`#${b.id}`,d.unshift(O);break}else if(b.className&&typeof b.className=="string"&&b.className.trim()){let F=b.className.trim().split(/\s+/).slice(0,2);O+=`.${F.join(".")}`;}if(!b.id&&(!b.className||!b.className.trim())&&b.parentElement){let F=Array.from(b.parentElement.children),N=F.indexOf(b);N>=0&&F.length>1&&(O+=`:nth-child(${N+1})`);}d.unshift(O),b=b.parentElement,w++;}return d.join(" > ")},i=(p,d=false)=>{let b=p.tagName.toLowerCase(),w=[];if(p.id&&w.push(`id="${p.id}"`),p.className&&typeof p.className=="string"){let N=p.className.trim().split(/\s+/);if(N.length>0&&N[0]){let te=(d?N.slice(0,3):N).join(" ");te.length>30&&(te=te.substring(0,30)+"..."),w.push(`class="${te}"`);}}let _=Array.from(p.attributes).filter(N=>N.name.startsWith("data-")),O=d?_.slice(0,1):_;for(let N of O){let U=N.value;U.length>20&&(U=U.substring(0,20)+"..."),w.push(`${N.name}="${U}"`);}let F=p.getAttribute("aria-label");if(F&&!d){let N=F;N.length>20&&(N=N.substring(0,20)+"..."),w.push(`aria-label="${N}"`);}return w.length>0?`<${b} ${w.join(" ")}>`:`<${b}>`},s=p=>`</${p.tagName.toLowerCase()}>`,a=p=>{let d=p.textContent||"";d=d.trim().replace(/\s+/g," ");let b=60;return d.length>b&&(d=d.substring(0,b)+"..."),d},l=p=>{if(p.id)return `#${p.id}`;if(p.className&&typeof p.className=="string"){let d=p.className.trim().split(/\s+/);if(d.length>0&&d[0])return `.${d[0]}`}return null},c=[];c.push(`Path: ${o(e)}`),c.push("");let f=r(e);for(let p=0;p<f.length;p++){let d=" ".repeat(p);c.push(d+i(f[p],true));}let g=e.parentElement,v=-1;if(g){let p=Array.from(g.children);if(v=p.indexOf(e),v>0){let d=p[v-1];if(l(d)&&v<=2){let w=" ".repeat(f.length);c.push(`${w} ${i(d,true)}`),c.push(`${w} </${d.tagName.toLowerCase()}>`);}else if(v>0){let w=" ".repeat(f.length);c.push(`${w} ... (${v} element${v===1?"":"s"})`);}}}let C=" ".repeat(f.length);c.push(C+" <!-- SELECTED -->");let S=a(e),E=e.children.length;if(S&&E===0&&S.length<40?c.push(`${C} ${i(e)}${S}${s(e)}`):(c.push(C+" "+i(e)),S&&c.push(`${C} ${S}`),E>0&&c.push(`${C} ... (${E} element${E===1?"":"s"})`),c.push(C+" "+s(e))),g&&v>=0){let p=Array.from(g.children),d=p.length-v-1;if(d>0){let b=p[v+1];l(b)&&d<=2?(c.push(`${C} ${i(b,true)}`),c.push(`${C} </${b.tagName.toLowerCase()}>`)):c.push(`${C} ... (${d} element${d===1?"":"s"})`);}}for(let p=f.length-1;p>=0;p--){let d=" ".repeat(p);c.push(d+s(f[p]));}return c.join(`
23
+ `)};var Mo=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),jt=async e=>{await Mo();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=Yn(t);if(!n)return n}return !0}return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(t=>t instanceof Blob?[t.type??"text/plain",t]:["text/plain",new Blob([t],{type:"text/plain"})])))]),!0}else {if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Yn(e)}}}catch{return false}},Yn=e=>{if(!document.execCommand)return false;let t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",(document.body||document.documentElement).append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove();}};var Gn=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var ze=e=>{if(e.closest(`[${Pe}]`))return false;let t=window.getComputedStyle(e);return !(!Gn(e,t)||t.pointerEvents==="none")};var Vt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(ze(r))return r;return null};var Un=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),i=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height;for(let c of o){if(!n){let E=(c.tagName||"").toUpperCase();if(E==="HTML"||E==="BODY")continue}if(!t(c))continue;let f=c.getBoundingClientRect(),g=f.left,v=f.top,C=f.left+f.width,S=f.top+f.height;if(n){let E=Math.max(i,g),p=Math.max(s,v),d=Math.min(a,C),b=Math.min(l,S),w=Math.max(0,d-E),_=Math.max(0,b-p),O=w*_,F=Math.max(0,f.width*f.height);F>0&&O/F>=.75&&r.push(c);}else g<a&&C>i&&v<l&&S>s&&r.push(c);}return r},zn=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Xn=(e,t,n)=>{if(e.length<=1)return null;let r=t.x,o=t.y,i=t.x+t.width,s=t.y+t.height,a=e[0];for(;a;){let l=a.parentElement;if(!l)break;let c=l.getBoundingClientRect(),f=Math.max(r,c.left),g=Math.max(o,c.top),v=Math.min(i,c.left+c.width),C=Math.min(s,c.top+c.height),S=Math.max(0,v-f),E=Math.max(0,C-g),p=S*E,d=Math.max(0,c.width*c.height);if(!(d>0&&p/d>=.75))break;if(!n(l)){a=l;continue}if(e.every(_=>l.contains(_)))return l;a=l;}return null},qn=(e,t)=>{let n=Un(e,t,true),r=zn(n),o=Xn(r,e,t);return o?[o]:r},Wn=(e,t)=>{let n=Un(e,t,false),r=zn(n),o=Xn(r,e,t);return o?[o]:r};var Yt=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 Kn=1700,Lo=150,Zn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Oe(n=>{let[o,i]=D(false),[s,a]=D(-1e3),[l,c]=D(-1e3),[f,g]=D(false),[v,C]=D(-1e3),[S,E]=D(-1e3),[p,d]=D(false),[b,w]=D(null),[_,O]=D(null),[F,N]=D(0),[U,te]=D([]),[ue,x]=D([]),[h,u]=D(false),[T,k]=D(false),A=null,H=null,I=null,B=null,j=X(()=>h()&&!p()),V=X(()=>s()>-1e3&&l()>-1e3),K=m=>(m.metaKey||m.ctrlKey)&&m.key.toLowerCase()==="c",q=m=>{let R=`grabbed-${Date.now()}-${Math.random()}`,P=Date.now(),Y={id:R,bounds:m,createdAt:P},z=U();te([...z,Y]),setTimeout(()=>{te(oe=>oe.filter(ft=>ft.id!==R));},Kn);},L=(m,R,P)=>{let Y=`success-${Date.now()}-${Math.random()}`;x(z=>[...z,{id:Y,text:m,x:R,y:P}]),setTimeout(()=>{x(z=>z.filter(oe=>oe.id!==Y));},Kn);},Z=m=>m.map(R=>{let P=R.functionName??"anonymous",Y=R.fileName??"unknown",z=R.lineNumber??0,oe=R.columnNumber??0;return ` at ${P} (${Y}:${z}:${oe})`}).join(`
24
+ `),se=m=>`<selected_element>${m}</selected_element>`,_e=m=>{let R=window.getComputedStyle(m),P=m.getBoundingClientRect();return {width:`${P.width}px`,height:`${P.height}px`,paddingTop:R.paddingTop,paddingRight:R.paddingRight,paddingBottom:R.paddingBottom,paddingLeft:R.paddingLeft,background:R.background,opacity:R.opacity}},xe=m=>{let R={elements:m.map(z=>({tagName:z.tagName,content:z.content,computedStyles:z.computedStyles}))},Y=`<div data-react-grab="${btoa(JSON.stringify(R))}"></div>`;return new Blob([Y],{type:"text/html"})},ge=async m=>{let R=Vn(m),P=await jn(m);if(P?.length){let Y=Z(P);return `${R}
25
25
 
26
26
  Component owner stack:
27
- ${G}`}return R},Te=h=>(h.tagName||"").toLowerCase(),_e=async h=>{let R=h.getBoundingClientRect(),V=Te(h);z(Bt(h));try{let G=await Re(h);await Ht(ie(G));}catch{}M(V?`<${V}>`:"<element>",R.left,R.top);},Pe=async h=>{if(h.length===0)return;let R=1/0,V=1/0;for(let G of h){let ee=G.getBoundingClientRect();R=Math.min(R,ee.left),V=Math.min(V,ee.top),z(Bt(G));}try{let ee=(await Promise.all(h.map(ce=>Re(ce)))).join(`
27
+ ${Y}`}return R},Ne=m=>(m.tagName||"").toLowerCase(),Me=async m=>{let R=m.getBoundingClientRect(),P=Ne(m);q(Yt(m));try{let Y=await ge(m),z=se(Y),oe=xe([{tagName:P,content:await ge(m),computedStyles:_e(m)}]);await jt([z,oe]);}catch{}L(P?`<${P}>`:"<element>",R.left,R.top);},he=async m=>{if(m.length===0)return;let R=1/0,P=1/0;for(let Y of m){let z=Y.getBoundingClientRect();R=Math.min(R,z.left),P=Math.min(P,z.top),q(Yt(Y));}try{let z=(await Promise.all(m.map(Le=>ge(Le)))).join(`
28
28
 
29
29
  ---
30
30
 
31
- `);await Ht(ie(ee));}catch{}M(`${h.length} elements`,R,V);},me=U(()=>!j()||f()?null:jt(s(),l())),ge=U(()=>{let h=me();if(!h)return;let R=h.getBoundingClientRect(),V=window.getComputedStyle(h);return {borderRadius:V.borderRadius||"0px",height:R.height,transform:V.transform||"none",width:R.width,x:R.left,y:R.top}}),J=2,pe=(h,R)=>({x:Math.abs(h-C()),y:Math.abs(R-w())}),xe=U(()=>{if(!f())return false;let h=pe(s(),l());return h.x>J||h.y>J}),ze=(h,R)=>{let V=Math.min(C(),h),G=Math.min(w(),R),ee=Math.abs(h-C()),ce=Math.abs(R-w());return {x:V,y:G,width:ee,height:ce}},at=U(()=>{if(!xe())return;let h=ze(s(),l());return {borderRadius:"0px",height:h.height,transform:"none",width:h.width,x:h.x,y:h.y}}),Wn=U(()=>{let h=me();if(!h)return "(click or drag to select element(s))";let R=Te(h);return R?`<${R}>`:"<element>"}),Vt=U(()=>({x:s(),y:l()})),Kn=U(()=>{let h=me(),R=g();return !!h&&h===R});re(ve(()=>[me(),g()],([h,R])=>{R&&h&&R!==h&&v(null);}));let Yt=U(()=>{let h=O();if(H(),h===null)return 0;let R=Date.now()-h;return Math.min(R/t.keyHoldDuration,1)}),Zn=()=>{N(Date.now()),_(false),I=window.setTimeout(()=>{_(true),I=null;},Io);let h=()=>{if(O()===null)return;k(V=>V+1),Yt()<1&&(L=requestAnimationFrame(h));};h();},lt=()=>{L!==null&&(cancelAnimationFrame(L),L=null),I!==null&&(window.clearTimeout(I),I=null),N(null),_(false);},Qn=()=>{lt(),u(true),document.body.style.cursor="crosshair";},ct=()=>{i(false),u(false),document.body.style.cursor="",f()&&(m(false),document.body.style.userSelect=""),F&&window.clearTimeout(F),D&&window.clearTimeout(D),lt();},Gt=new AbortController,Ne=Gt.signal;window.addEventListener("keydown",h=>{if(h.key==="Escape"&&o()){ct();return}cn(h)||q(h)&&(o()||(i(true),Zn(),F=window.setTimeout(()=>{Qn(),t.onActivate?.();},t.keyHoldDuration)),b()&&(D&&window.clearTimeout(D),D=window.setTimeout(()=>{ct();},200)));},{signal:Ne}),window.addEventListener("keyup",h=>{if(!o()&&!b())return;let R=h.key.toLowerCase()==="c",V=!h.metaKey&&!h.ctrlKey;(R||V)&&ct();},{signal:Ne,capture:true}),window.addEventListener("mousemove",h=>{a(h.clientX),c(h.clientY);},{signal:Ne}),window.addEventListener("mousedown",h=>{!j()||p()||(h.preventDefault(),m(true),T(h.clientX),E(h.clientY),document.body.style.userSelect="none");},{signal:Ne}),window.addEventListener("mouseup",h=>{if(!f())return;let R=pe(h.clientX,h.clientY),V=R.x>J||R.y>J;if(m(false),document.body.style.userSelect="",V){let G=ze(h.clientX,h.clientY),ee=Un(G,Ue);if(ee.length>0)d(true),Pe(ee).finally(()=>{d(false);});else {let ce=zn(G,Ue);ce.length>0&&(d(true),Pe(ce).finally(()=>{d(false);}));}}else {let G=jt(h.clientX,h.clientY);if(!G)return;d(true),v(G),_e(G).finally(()=>{d(false);});}},{signal:Ne}),document.addEventListener("visibilitychange",()=>{document.hidden&&ne([]);},{signal:Ne}),fe(()=>{Gt.abort(),F&&window.clearTimeout(F),D&&window.clearTimeout(D),lt(),document.body.style.userSelect="",document.body.style.cursor="";});let Jn=un(),er=U(()=>false),tr=U(()=>j()&&xe()),nr=U(()=>p()?"processing":"hover"),rr=U(()=>j()&&!f()&&(!!me()&&!Kn()||!me())||p()),or=U(()=>o()&&S()&&B()),ir=U(()=>j()&&!f());return an(()=>A(hn,{get selectionVisible(){return er()},get selectionBounds(){return ge()},get dragVisible(){return tr()},get dragBounds(){return at()},get grabbedBoxes(){return Q()},get successLabels(){return Me()},get labelVariant(){return nr()},get labelText(){return Wn()},get labelX(){return Vt().x},get labelY(){return Vt().y},get labelVisible(){return rr()},get progressVisible(){return or()},get progress(){return Yt()},get mouseX(){return s()},get mouseY(){return l()},get crosshairVisible(){return ir()}}),Jn),n})};qn();/*! Bundled license information:
31
+ `),oe=se(z),ft=await Promise.all(m.map(async Le=>({tagName:Ne(Le),content:await ge(Le),computedStyles:_e(Le)}))),ur=xe(ft);await jt([oe,ur]);}catch{}L(`${m.length} elements`,R,P);},J=X(()=>!j()||f()?null:Vt(s(),l())),Ce=X(()=>{let m=J();if(!m)return;let R=m.getBoundingClientRect(),P=window.getComputedStyle(m);return {borderRadius:P.borderRadius||"0px",height:R.height,transform:P.transform||"none",width:R.width,x:R.left,y:R.top}}),pe=2,Xe=(m,R)=>({x:Math.abs(m-v()),y:Math.abs(R-S())}),qe=X(()=>{if(!f())return false;let m=Xe(s(),l());return m.x>pe||m.y>pe}),Gt=(m,R)=>{let P=Math.min(v(),m),Y=Math.min(S(),R),z=Math.abs(m-v()),oe=Math.abs(R-S());return {x:P,y:Y,width:z,height:oe}},Qn=X(()=>{if(!qe())return;let m=Gt(s(),l());return {borderRadius:"0px",height:m.height,transform:"none",width:m.width,x:m.x,y:m.y}}),Jn=X(()=>{let m=J();return m?`<${Ne(m)}>`:"<element>"}),Ut=X(()=>({x:s(),y:l()})),er=X(()=>{let m=J(),R=b();return !!m&&m===R});re(Ee(()=>[J(),b()],([m,R])=>{R&&m&&R!==m&&w(null);}));let zt=X(()=>{let m=_();if(F(),m===null)return 0;let R=Date.now()-m;return Math.min(R/t.keyHoldDuration,1)}),tr=()=>{O(Date.now()),k(false),I=window.setTimeout(()=>{k(true),I=null;},Lo);let m=()=>{if(_()===null)return;N(P=>P+1),zt()<1&&(H=requestAnimationFrame(m));};m();},ct=()=>{H!==null&&(cancelAnimationFrame(H),H=null),I!==null&&(window.clearTimeout(I),I=null),O(null),k(false);},nr=()=>{ct(),u(true),document.body.style.cursor="crosshair";},ut=()=>{i(false),u(false),document.body.style.cursor="",f()&&(g(false),document.body.style.userSelect=""),A&&window.clearTimeout(A),B&&window.clearTimeout(B),ct();},Xt=new AbortController,Fe=Xt.signal;window.addEventListener("keydown",m=>{if(m.key==="Escape"&&o()){ut();return}dn(m)||K(m)&&(o()||(i(true),tr(),A=window.setTimeout(()=>{nr(),t.onActivate?.();},t.keyHoldDuration)),h()&&(B&&window.clearTimeout(B),B=window.setTimeout(()=>{ut();},200)));},{signal:Fe}),window.addEventListener("keyup",m=>{if(!o()&&!h())return;let R=m.key.toLowerCase()==="c",P=!m.metaKey&&!m.ctrlKey;(R||P)&&ut();},{signal:Fe,capture:true}),window.addEventListener("mousemove",m=>{a(m.clientX),c(m.clientY);},{signal:Fe}),window.addEventListener("mousedown",m=>{!j()||p()||(m.preventDefault(),g(true),C(m.clientX),E(m.clientY),document.body.style.userSelect="none");},{signal:Fe}),window.addEventListener("mouseup",m=>{if(!f())return;let R=Xe(m.clientX,m.clientY),P=R.x>pe||R.y>pe;if(g(false),document.body.style.userSelect="",P){let Y=Gt(m.clientX,m.clientY),z=qn(Y,ze);if(z.length>0)d(true),he(z).finally(()=>{d(false);});else {let oe=Wn(Y,ze);oe.length>0&&(d(true),he(oe).finally(()=>{d(false);}));}}else {let Y=Vt(m.clientX,m.clientY);if(!Y)return;d(true),w(Y),Me(Y).finally(()=>{d(false);});}},{signal:Fe}),document.addEventListener("visibilitychange",()=>{document.hidden&&te([]);},{signal:Fe}),de(()=>{Xt.abort(),A&&window.clearTimeout(A),B&&window.clearTimeout(B),ct(),document.body.style.userSelect="",document.body.style.cursor="";});let rr=mn(),or=X(()=>false),ir=X(()=>j()&&qe()),sr=X(()=>p()?"processing":"hover"),ar=X(()=>j()&&!f()&&(!!J()&&!er()||!J())||p()),lr=X(()=>o()&&T()&&V()),cr=X(()=>j()&&!f());return un(()=>$(bn,{get selectionVisible(){return or()},get selectionBounds(){return Ce()},get dragVisible(){return ir()},get dragBounds(){return Qn()},get grabbedBoxes(){return U()},get successLabels(){return ue()},get labelVariant(){return sr()},get labelText(){return Jn()},get labelX(){return Ut().x},get labelY(){return Ut().y},get labelVisible(){return ar()},get progressVisible(){return lr()},get progress(){return zt()},get mouseX(){return s()},get mouseY(){return l()},get crosshairVisible(){return cr()}}),rr),n})};Zn();/*! Bundled license information:
32
32
 
33
33
  bippy/dist/rdt-hook-DAGphl8S.js:
34
34
  (**
@@ -89,4 +89,4 @@ bippy/dist/source.js:
89
89
  * This source code is licensed under the MIT license found in the
90
90
  * LICENSE file in the root directory of this source tree.
91
91
  *)
92
- */exports.init=qn;return exports;})({});
92
+ */exports.init=Zn;return exports;})({});
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { 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
3
  import { instrument, _fiberRoots, getFiberFromHostInstance } from 'bippy';
4
- import { getOwnerStack, getSourcesFromStack, isSourceFile, normalizeFileName } from 'bippy/dist/source';
4
+ import { getOwnerStack, getSourcesFromStack, normalizeFileName, isSourceFile } from 'bippy/dist/source';
5
5
 
6
6
  /**
7
7
  * @license MIT
@@ -528,16 +528,53 @@ var Crosshair = (props) => {
528
528
  context.scale(dpr, dpr);
529
529
  }
530
530
  };
531
+ const getSmallestElementBounds = (x, y) => {
532
+ const element = document.elementFromPoint(x, y);
533
+ if (!element || element === canvasRef || element === document.body || element === document.documentElement) {
534
+ return null;
535
+ }
536
+ const rect = element.getBoundingClientRect();
537
+ if (rect.width === 0 || rect.height === 0) {
538
+ return null;
539
+ }
540
+ return {
541
+ top: rect.top,
542
+ bottom: rect.bottom,
543
+ left: rect.left,
544
+ right: rect.right
545
+ };
546
+ };
547
+ const scanBoundary = (startX, startY, deltaX, deltaY, maxDistance) => {
548
+ const baseBounds = getSmallestElementBounds(startX, startY);
549
+ if (!baseBounds) return maxDistance;
550
+ const stepSize = 5;
551
+ for (let distance = stepSize; distance < maxDistance; distance += stepSize) {
552
+ const checkX = startX + deltaX * distance;
553
+ const checkY = startY + deltaY * distance;
554
+ if (checkX < 0 || checkX >= width || checkY < 0 || checkY >= height) {
555
+ return distance;
556
+ }
557
+ const currentBounds = getSmallestElementBounds(checkX, checkY);
558
+ if (!currentBounds || currentBounds.top !== baseBounds.top || currentBounds.bottom !== baseBounds.bottom || currentBounds.left !== baseBounds.left || currentBounds.right !== baseBounds.right) {
559
+ return distance;
560
+ }
561
+ }
562
+ return maxDistance;
563
+ };
531
564
  const render2 = () => {
532
565
  if (!context) return;
533
566
  context.clearRect(0, 0, width, height);
534
567
  context.strokeStyle = "rgba(210, 57, 192)";
535
568
  context.lineWidth = 1;
536
569
  context.beginPath();
537
- context.moveTo(currentX, 0);
538
- context.lineTo(currentX, height);
539
- context.moveTo(0, currentY);
540
- context.lineTo(width, currentY);
570
+ const topBoundary = scanBoundary(currentX, currentY, 0, -1, currentY);
571
+ const bottomBoundary = scanBoundary(currentX, currentY, 0, 1, height - currentY);
572
+ const leftBoundary = scanBoundary(currentX, currentY, -1, 0, currentX);
573
+ const rightBoundary = scanBoundary(currentX, currentY, 1, 0, width - currentX);
574
+ context.moveTo(currentX, currentY - topBoundary);
575
+ context.lineTo(currentX, currentY + bottomBoundary);
576
+ context.moveTo(currentX - leftBoundary, currentY);
577
+ context.lineTo(currentX + rightBoundary, currentY);
541
578
  context.stroke();
542
579
  };
543
580
  const animate = () => {
@@ -737,13 +774,14 @@ var getSourceTrace = async (element) => {
737
774
  Number.MAX_SAFE_INTEGER
738
775
  );
739
776
  if (!sources) return null;
740
- return sources.filter((source) => {
741
- return isSourceFile(source.fileName);
742
- }).map((source) => {
777
+ console.log(sources);
778
+ return sources.map((source) => {
743
779
  return {
744
780
  ...source,
745
781
  fileName: normalizeFileName(source.fileName)
746
782
  };
783
+ }).filter((source) => {
784
+ return isSourceFile(source.fileName);
747
785
  });
748
786
  };
749
787
  var getHTMLSnippet = (element) => {
@@ -1236,12 +1274,40 @@ var init = (rawOptions) => {
1236
1274
  const fileName = source.fileName ?? "unknown";
1237
1275
  const lineNumber = source.lineNumber ?? 0;
1238
1276
  const columnNumber = source.columnNumber ?? 0;
1239
- return ` ${functionName} - ${fileName}:${lineNumber}:${columnNumber}`;
1277
+ return ` at ${functionName} (${fileName}:${lineNumber}:${columnNumber})`;
1240
1278
  }).join("\n");
1241
1279
  };
1242
1280
  const wrapContextInXmlTags = (context) => {
1243
1281
  return `<selected_element>${context}</selected_element>`;
1244
1282
  };
1283
+ const getComputedStyles = (element) => {
1284
+ const computed = window.getComputedStyle(element);
1285
+ const rect = element.getBoundingClientRect();
1286
+ return {
1287
+ width: `${rect.width}px`,
1288
+ height: `${rect.height}px`,
1289
+ paddingTop: computed.paddingTop,
1290
+ paddingRight: computed.paddingRight,
1291
+ paddingBottom: computed.paddingBottom,
1292
+ paddingLeft: computed.paddingLeft,
1293
+ background: computed.background,
1294
+ opacity: computed.opacity
1295
+ };
1296
+ };
1297
+ const createStructuredClipboardHtml = (elements) => {
1298
+ const structuredData = {
1299
+ elements: elements.map((element) => ({
1300
+ tagName: element.tagName,
1301
+ content: element.content,
1302
+ computedStyles: element.computedStyles
1303
+ }))
1304
+ };
1305
+ const base64Data = btoa(JSON.stringify(structuredData));
1306
+ const htmlContent = `<div data-react-grab="${base64Data}"></div>`;
1307
+ return new Blob([htmlContent], {
1308
+ type: "text/html"
1309
+ });
1310
+ };
1245
1311
  const getElementContentWithTrace = async (element) => {
1246
1312
  const elementHtml = getHTMLSnippet(element);
1247
1313
  const componentStackTrace = await getSourceTrace(element);
@@ -1261,7 +1327,13 @@ ${formattedStackTrace}`;
1261
1327
  addGrabbedBox(createElementBounds(targetElement2));
1262
1328
  try {
1263
1329
  const content = await getElementContentWithTrace(targetElement2);
1264
- await copyContent(wrapContextInXmlTags(content));
1330
+ const plainTextContent = wrapContextInXmlTags(content);
1331
+ const htmlContent = createStructuredClipboardHtml([{
1332
+ tagName,
1333
+ content: await getElementContentWithTrace(targetElement2),
1334
+ computedStyles: getComputedStyles(targetElement2)
1335
+ }]);
1336
+ await copyContent([plainTextContent, htmlContent]);
1265
1337
  } catch {
1266
1338
  }
1267
1339
  addSuccessLabel(tagName ? `<${tagName}>` : "<element>", elementBounds.left, elementBounds.top);
@@ -1279,7 +1351,14 @@ ${formattedStackTrace}`;
1279
1351
  try {
1280
1352
  const elementSnippets = await Promise.all(targetElements.map((element) => getElementContentWithTrace(element)));
1281
1353
  const combinedContent = elementSnippets.join("\n\n---\n\n");
1282
- await copyContent(wrapContextInXmlTags(combinedContent));
1354
+ const plainTextContent = wrapContextInXmlTags(combinedContent);
1355
+ const structuredElements = await Promise.all(targetElements.map(async (element) => ({
1356
+ tagName: getElementTagName(element),
1357
+ content: await getElementContentWithTrace(element),
1358
+ computedStyles: getComputedStyles(element)
1359
+ })));
1360
+ const htmlContent = createStructuredClipboardHtml(structuredElements);
1361
+ await copyContent([plainTextContent, htmlContent]);
1283
1362
  } catch {
1284
1363
  }
1285
1364
  addSuccessLabel(`${targetElements.length} elements`, minPositionX, minPositionY);
@@ -1338,9 +1417,7 @@ ${formattedStackTrace}`;
1338
1417
  });
1339
1418
  const labelText = createMemo(() => {
1340
1419
  const element = targetElement();
1341
- if (!element) return "(click or drag to select element(s))";
1342
- const tagName = getElementTagName(element);
1343
- return tagName ? `<${tagName}>` : "<element>";
1420
+ return element ? `<${getElementTagName(element)}>` : "<element>";
1344
1421
  });
1345
1422
  const labelPosition = createMemo(() => {
1346
1423
  return {
@@ -1351,7 +1428,7 @@ ${formattedStackTrace}`;
1351
1428
  const isSameAsLast = createMemo(() => {
1352
1429
  const currentElement = targetElement();
1353
1430
  const lastElement = lastGrabbedElement();
1354
- return !!currentElement && currentElement === lastElement;
1431
+ return Boolean(currentElement) && currentElement === lastElement;
1355
1432
  });
1356
1433
  createEffect(on(() => [targetElement(), lastGrabbedElement()], ([currentElement, lastElement]) => {
1357
1434
  if (lastElement && currentElement && lastElement !== currentElement) {
@@ -1519,7 +1596,7 @@ ${formattedStackTrace}`;
1519
1596
  const selectionVisible = createMemo(() => false);
1520
1597
  const dragVisible = createMemo(() => isRendererActive() && isDraggingBeyondThreshold());
1521
1598
  const labelVariant = createMemo(() => isCopying() ? "processing" : "hover");
1522
- const labelVisible = createMemo(() => isRendererActive() && !isDragging() && (!!targetElement() && !isSameAsLast() || !targetElement()) || isCopying());
1599
+ const labelVisible = createMemo(() => isRendererActive() && !isDragging() && (Boolean(targetElement()) && !isSameAsLast() || !targetElement()) || isCopying());
1523
1600
  const progressVisible = createMemo(() => isHoldingKeys() && showProgressIndicator() && hasValidMousePosition());
1524
1601
  const crosshairVisible = createMemo(() => isRendererActive() && !isDragging());
1525
1602
  render(() => createComponent(ReactGrabRenderer, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-grab",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "react",